In the previous articles I discussed: Now that I ve got the emulator more-or-less working, I needed more code to test it with, and to do that I needed to be able to load emulator files. Tape Emulation There are a handful of emulator file formats for the ZX Spectrum to choose from, identifiable by their file extension: Tape file formats contain a serialised data stream of the tape contents, whereas…
In the previous articles I discussed: I was now in a position to start testing the emulator in earnest. If you want to cut to the chase, you can view the latest source files here. Testing the emulator With keyboard and video emulated, I could finally put Sinclair BASIC through its paces. This would in turn test my emulated Z80. Initially everything worked fine. I could enter BASIC programs and run…
In the last three blog posts, I managed to get the emulator booting up and displaying the famous Sinclair copyright message in an SDL window. But I had no way to interact with the emulator with the keyboard, so couldn t progress any further. Background The original rubber-keyed Spectrum has 40 keys that press down on a two-layer membrane with traces and switch contacts embedded within it. When a…
In the previous two posts I d been concentrating on getting the Z80 emulator up to the point where it would run fragments of machine code. By now I was reasonable certain it could handle more challenging code. My first choice was the 48K ZX Spectrum ROM, mostly because it was well documented, relatively straightforward, and familiar to me. Thankfully Amstrad Consumer Electronics, the current…
In the previous post I mentioned how opcodes are decoded into groups using bitwise operators. Now we re going to expand upon that to look at how to fetch, decode and execute Z80 opcodes. The code for the emulator can be found on my Git here. If you look at the Decoding Z80 Opcodes guide you can see that it lends itself to look-up tables, and if you compare the document with the tables in z80.h,…
If there is one thing for sure, I ve got no shortage of projects on the go at the moment, so wasn t exactly looking to start a new one. But sometimes inspiration sneaks up on you like a thief in the night. My bright idea I was at work brushing up on lookup tables in C++, trying to remember the syntax for function pointers to class members and to functions in other classes. I was looking The post I…
We ve now covered the foundations of how to run code on the Z80 co-processor and establish communications to it using a shared circular buffer in memory. Now it s time to study of the music driver works, and how the data for the music is stored. Initialisation Once the music driver is loaded into the Z80 s RAM, it will start executing code at address 0x0000 (RST 0) and will The Interrupt Routine…
As mentioned in the introduction, the Sega Megadrive has a Z80 co-processor that serves two purposes: Backwards Compatibility Backwards compatibility with the Master System requires a Power Base Convertor, a fairly dumb adaptor that maps the pins of the smaller Master System cartridges to the Megadrive cartridge connector. The convertor is designed to fit on the Megadrive 1, though does work on…
My second job after Software Creations was as a games developer for Malibu Interactive. Long story short, I was part of a group of friends working at Software Creations that fancied a change: Tim, Mike and Geoff Follin, Mark Wilson, Neal Sutton, and me. Tim approached Bob Jacobs, the CEO of Malibu Interactive, with the intention of them setting up a development studio in the Northwest of England…
The theme for RetroFest 2025 at The Centre for Computing History was Gaming with a related theme of Games Development . Tony Jewell, the organiser, set aside the museum schoolroom for games developers, which worked out great. I d driven down with Kevin Edwards. It was his first time as an exhibitor, and my people carrier was full to the brim with 8-bit goodness. This year I was demonstrating old…