Search the Community
Showing results for tags 'zx spectrum next'.
Spinning off from the ZX Spectrum Next thread, here's a thread devoted to Speccy dev. I kind of missed the boat on ZX Spectrum dev as a kid - I think I was both a bit too young, and not particularly motivated, as abundant cheap budget titles, covertape wars and my friend's twin-deck tape player meant we were never short of games. I've always felt a bit like I missed out though, and really enjoyed doing Z80 Assembler at Uni (part of a project to build a custom Z80-based computer on a breadboard and make it play RTTTL ringtones, weirdly). Having backed the Next, I've decided it's time I finally righted a historical wrong and at least make one crap game, in the YS tradition. I'll be posting my notes/findings/queries etc here, in case anyone's interested. Note that this isn't "my thread" in anyway - anyone can stick anything Speccy Dev related in here. I know there are some very experienced Speccy coders here, so I'm not trying to teach anyone to suck eggs, just journaling for my benefit and others' interest. Notes on Approach I won't be bothering with any BASIC, barring that required to start up a machine code program and/or do basic debugging. ASM all the way. Similarly, I won't be using the C based z88dk. This sounds like an awesome tool, but I'm keen to work directly in ASM and reinvent a few wheels to make sure I understand the hardware. I'm aware there are pre-rolled tools like the various kits Jonathan Cauldwell has put together, but again, I think they'd take me too far away from the interesting meaty stuff. Development Environment One thing's for sure - I didn't fancy bashing out code on the Speccy itself. I'm a web dev by trade, and I don't fancy living without syntax highlighting, source control, decent debugging tools, etc. Fortunately, it seems that things have really come in this area, at least on the Windows platform. After reading up online, I'm using the following kit: Sublime Text - nice middleweight text editor, similar in heft to the likes of Notepad++. The free version pesters you about registering occasionally, but seems fully functional. Mainly using it because it supports... z80asm plugin - this plugin for Sublime Text gives you syntax highlighting, plus the ability to hook up a compiler and emulator so you can Build + Run your code and have it run straight away. Invaluable. sjasmplus compiler - this turns your ASM source into a Speccy .bin, which you can then turn into a TAP. Or, much easier for general debugging, it can make a .SNA snapshot which can then be instantly run in an emulator. Asides from customary ASM, this includes a few special directives which are worth reading up on. A Speccy Emulator - I'm using Unreal Speccy Portable, as that's what one of the tutorials I read uses, but it seems a bit basic (if bombproof). FUSE is another popular one, but it sounds like the (not free) Spectaculator might have the best debugging features. Here's a screenshot of this environment in action: Resources I'm chasing down a few vintage Z80 books just because I like a physical book for reference purposes, but there seem to be scans of a lot online: Spectrum Machine Language for the Absolute Beginner - reportedly does a good job of explaining registers, binary bytes/words, stacks, flags etc if you're completely unfamiliar with this stuff. Programming the Z80 by Rodnay Zaks - this has a reputation as the Z80 bible. Incidentally, if the name Zaks sounds familiar, it's not a coincidence. Physical copies seem to command a hefty premium, sadly. The Complete ZX Spectrum ROM Disassembly - this also seems to be considered a required text. It's based on the 48k, so the ROM routines on the 128k might be different. Useful web resources I've found: ZX Spectrum Memory Map - nice explainer of how the RAM is laid out, and how the first 16Kb is slower than the rest. Jonathan Cauldwell's How To Write Spectrum Games - this is either available as a word doc from his site, or there's a bloggified (and partially corrected) version hosted here, along with some other useful tutorials. That'll do for now - I'll cover off other stuff like spriting and music when I get there.