Why did I bother writing +F? There are already plenty of fully-featured, freely-available Spectrum emulators for more or less any platform you care to think of. Indeed, I remember using a perfectly playable one on the Commodore Amiga as far back as 1994 or 1995 (ZXAM by Antonio J. Pomar Roselló), so it’s hardly a novel idea. I did have a little twist which I wanted to add, which at the time I started writing didn’t appear to be available in any other emulator, namely the ability to play games across the Internet.
The fundamental thing an emulator does is, by definition, copy the behaviour of something else. And so it is with +F, which emulates a real ZX Spectrum. The catch, sadly, is that I don’t have one of those to hand, so without the real thing as a reference, how can I check that +F is working properly? The answer lies in the fantastic emulators that others have written.
Before I dive into the missteps and mishaps of +F, I’d like to start with one very important thing I did right, in the very early stages. The original idea for +F came from the tail end of an IM conversation with an old school friend, reminiscing about the computer games we used to play when we were young. A particular favourite of ours was Match Day II (for those of you too young to remember, it was sort of like the best bits of FIFA and PES combined in a single game, only about a hundred times better than that) and we were at the time convinced we would be world champions at it, if such a competition had existed.
The relationship between a programmer and a language is much like the relationship between the cricketer and a bat. Unless you know how to handle it properly, you’re not going to achieve much and you could end up in a lot of pain. And so it was with +F, or at least the program which eventually became +F. It started off with the working title QAOPM, and was written in Python.
Over the years, there have been all number of innovations, techniques, tools, tricks and fads purported to help you build better-quality applications more quickly - model-driven code generation, object-relational frameworks, IoC containers, unit testing, Scrum, Kanban, documenting everything, documenting nothing, pair programming - even industrial quantities of XML (in the case of the abomination that was SOAP). For me, though, one stands head and shoulders above all the rest, Test-Driven Development.
The just-about-holding-together addition of tape loading emulation I told you about last time was the last but one of the major bits of +F. Having reached this milestone, I decided to take some time out and enjoy playing a game or two of Match Day II before doing any more work on it. My work may have stopped, but it turns out my computer was working as hard as ever.