5 ms·
R.T. Russell's Z80 BBC Basic Is Now Open Source
- bcaa7f3a8bbc 7y agoGreat! I'm currently working on a homebrew Z80 computer on breadboards and wirewrapped boards, and building all the (simple) hardware and software from scratch, using vintage chips (strictly no post-1989 chips) and Steve Ciarcia's Build Your Own Z80 Computer as a reference, but with a much higher spec (32K or better). My original plan is porting Li-Chen Wang's Tiny BASIC (https://en.wikipedia.org/wiki/Tiny_BASIC https://en.wikipedia.org/wiki/Tiny_BASIC) to my homebrew computer, and describing its operation at my local hackerspace. Basically, after Bill Gates' has written his letter, there was a revolt in the microcomputer scene and many hobbyists sought alternative implementations. Around the same time, Li-Chen Wang released his hobby project - Tiny BASIC, with full source in public domain. In retrospect, it can be seen as a free software project before the free software movement. Although its functionality was extremely limited Proof-of-Concept and never widely used, but I believe it's a piece of important legacy of the FLOSS community worth mentioning. But now, since BBC Basic is now free, I'm looking forward to port BBC Basic to my system as well!
- Theodores 7y agoGood luck with your project. I am sure you will find it really rewarding when everything is wired up and it actually works. I like your detail of using strictly vintage chips, not heard of that before, you are taking the art to new levels with that. I built my own computer with breadboards and a very simple EEPROM. My goal was to have it just turn on a few LED lights and do so according to a few very simple switches. That was satisfying enough. The wow it works moment was worth the many hours with things like an oscilloscope. If you want to do more than what I did - just get the thing to turn on - then I highly recommend the BBC BASIC. It is just built better than other BASICs that were doing the rounds and definitely suits a hardware oriented project. If you wanted a breadboard built computer to do actual interfacing, maybe to a strain gauge or other hardware then you will do well to take the BBC BASIC route. You can talk to your IO controller with it and do so with the built in assembler. Your code for presenting results or storing data can be done in BASIC and you can drop down to assembler to do the nitty gritty stuff quite easily. On today's modern computer even if running Linux you are kind of stuck as to where to start, with BBC BASIC you can accomplish low level things from first principles. Whatever you end up doing with your project, I think that there is definite merit in doing it with BBC BASIC, I think you can beat a path that others (particularly in the UK) will see as a good one to follow. Good luck and have fun stripping those wires!
- billforsternz 7y agoSounds like a great project, good luck. I'll share my favourite tip from back in the day when I regularly brought up new bare metal Z80 systems. Just on the off chance it might be useful. Use a blank EPROM as your first program. It's all 0xff bytes which are RST 7 instructions, equivalent to a subroutine call to 0x0038. So you should observe an super tight loop of an 8 bit read of 0xff from 0x0038, then a 16 bit write of 0x0039 to an ever incrementing address. Suitable for scoping each bit of your address and data bus. The incrementing write address is the stack pointer, which just cycles through 64K. The most significant address bit toggles at the rate it takes to cycle through 64K. Although 0x0039 return address keeps getting pushed onto the stack, there's no corresponding pop, the stack is just perpetually overflowing. But it doesn't matter given this 1 byte "program" serves only to give you the simplest possible repeating pattern to look at with your oscilloscope.
- Theodores 7y agoThe original Sophie Wilson version of BBC BASIC was brilliant. I did not get to play with the Z80 version but if it is a faithful original of the BBC 6502 version then this a valuable contribution to open source software. The UK owes a lot to the people such as Sophie Wilson (who wasn't Sophie then) that were extremely forward thinking. The BBC Micro was just for kids. Rather than dumb it down the creators went the other way. Anyone not familiar with the BBC Micro (because they weren't a kid in the UK in the 1980's) can't really appreciate how good it was and for its time. Perhaps an analogy could be found between arcade games machines and home consoles of the era, the arcade machine just worked, the console was just compromised in every way in comparison to what you had in the arcade original. It was the same with the BBC and home computer rivals. There was just an edge of performance to it that no other home computers had. This was because the hardware had all the add ons, e.g. a decent sound chip, not just one but two competent graphics chips, a socket next to the keyboard to put your home blown EEPROM in and every port you could imagine at the back and under the machine. The BBC Model B was a true Rolls Royce of a machine and we gave it to kids. BBC BASIC was equally deluxe. The built in assembler that was embedded in was awesome. Particularly when you only had a 6502 which has all of three registers - X, Y and A. I was doing assembler at school and plenty of other kids were. No extra software was needed, nobody needed to pay for a compiler, it was all in there. The rest of BBC BASIC was sophisticated compared to all other BASICs of the time. You could and did write procedures at a time when other BASICs would have you doing GOSUB with a line number. Later when I moved on to the IBM PC with MS-DOS I felt extremely disappointed. It was actually backward! It lacked the sophistication the BBC Micro had. It was MS-DOS that I found particularly dumb, I just felt 'is this all there is?' and could not believe this was the new 'better'. Exposure to BBC BASIC, UNIX and today's Linux makes me wonder whether Microsoft's products from MS-DOS to Windows have really advanced computing as we know it. I am not knocking Microsoft entirely as I do believe some of their products such as Word 2.0c were fantastic at enabling progress. But with Microsoft came a particular model of personal computing, we stayed on floppy disks far too long and Microsoft BASIC introduced things that are best not taught - i.e. the GOTO statement. Anyway, the BBC Micro and BBC BASIC were free from this Microsoft way of doing things, the BBC Micro got it right and it was a vision that was gifted to a generation of schoolchildren.
- 7y ago
- mikehall314 7y agoRichard Russell was also involved in the Colour Recovery Working Group, which successfully sought to recover the colour signal from black and white telerecordings. For background: many programmes produced on colour videotape by the BBC in the 70s, were distributed to overseas broadcasters on black and white film only. When the BBC destroyed the original videotapes, this left the black and white films as the only remaining copies of these programmes. In some cases, however, the colour information had been accidentally embedded into the black and white film (a notch filter should have been used to remove it). So around 2008, Richard developed a piece of software, in BBC BASIC, which was able to recover the embedded colour signal and restore several programmes held in black and white to their full colour glory.
- gugagore 7y agoThe process seems fairly DSP intensive. If I recall, the IQ modulated color signal would leave a dot pattern in the luminance signal. I wonder how many frames it could process a second, if written in BASIC.
- mikehall314 7y agoFrom memory, it would do 1.5 frames per second.
- rollthehard6 7y ago"during the early eighties every school child in the United Kingdom was exposed to it, spawning a whole generation of bedroom programmers." Erm no. When I was at secondary school, only those deemed to be good at Maths were allowed to work with the BBC Micros, despite having some skills already from owning a ZX Spectrum at home. This maths centric view was partly why I didn't try to study Comp Sci at Uni and went to do Chem, and then fell into more IT classes and post grad and onto an IT career subsequently.
- pankajdoharey 7y agoWoW! Finally, my second programming language.