The toolchain I’ve started using for development on the ZX Spectrum is as follows:
- Visual Studio Code – Editor, with the following extensions:
- Z80 Assembly 0.0.3 by Imanolea
- DeZog 1.5.4 by Maziac (this is a renamed update to Z80 Debugger 0.9.1, also by Maziac)
- ZEsarUX 9.0 – Emulator
- sjasmplus 1.17,0 – Z80 compiler
Click on the links for instructions on installing them.
Copying and building the source code
Download the latest source code here and follow the build instructions to test your build toolchain
Visual Studio Project File: launch.json
Visual Studio Code configuration file for launching the debugger
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "dezog", "request": "launch", "name": "Z80 Debugger", "zrcp": { "hostname": "localhost", "port": 10000 }, // "topOfStack": "Stack_Top", "rootFolder": "${fileDirname}", "sjasmplus": [ { "path": "${fileDirname}/${fileBasenameNoExtension}.lst", "useFiles": true, "asm": "sjasmplus", "mainFile": "${fileDirname}/${fileBasenameNoExtension}.z80" } ], "disassemblerArgs": { "esxdosRst": true }, "load": "${fileDirname}/${fileBasenameNoExtension}.sna", "skipInterrupt": false, "startAutomatically": false, "preLaunchTask": "sjasmplus" } ] }
Visual Studio Project File: tasks.json
Visual Studio Code configuration file for compiling the source code
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "sjasmplus", "type": "shell", "command": "sjasmplus", "args": [ "--lst=${fileDirname}/${fileBasenameNoExtension}.lst", "${file}" ], "group": { "kind": "build", "isDefault": true } } ] }
Z80 Source Sample
Compile a SNA file with sjasmplus
DEVICE ZXSPECTRUM48 Code_Start: EQU 0x8000 ORG Code_Start include "demo_scroll.z80" SAVESNA "Demo/demo_scroll.sna", Code_Start