This is a pet Kotlin Multiplatform project (very incomplete at the moment).
This project was started with the goal of having the ability to develop code for the ZX Spectrum in an easy way (without the need for installing any extra tool).
With this goal in mind, 2 development approaches were implemented:
- Parser-based: This approach would allow implementing a Web-based IDE (no server-side logic). To do this, the code must be compatible with WASMS/JS targets. A simple, regex-based parser was implemented, to avoid platform-specific dependencies.
- DSL-based: This approach would allow using a Kotlin-based DSL to code. This way, development could be integrated in standard Kotlin tooling (Gradle, etc.).
- Snapshot: Represents a ZX Spectrum state (memory, registers, etc.)
- Program: Represents a block of code which can be applied to an snapshot. You can apply multiple programs to the same snapshot. Current implementations are:
- BasicProgram: A Sinclair Basic program.
- AssemblyProgram: A Z80 assembly program.
- Snapshot file read/write components. Current implementations are:
Yo can try the examples in test classes. They include examples for both, parser and DSL approaches.
You can run the sample Compose App. You can also run a demo in the browser.
- Program implementations (both assembly and basic) are in their early stages.
- Only 48K ZX Spectrum is supported
- Z80 file format reading is not yet implemented. Z80 writing logic has bugs fro V1 and V2, only V3 seems to be working.
- Implement a improved DSL for Sinclair Basic:
- Labels instead of line numbers.
- Basic to assembly compiler.
- Basic and assembly decompilers.
- Image management:
- Implement an "image" program which writes to snapshots?
- Image editor (for screens and for user defined characters).
- Image conversion (from standard image files to ZX Spectrum screens).
- A game engine?
- https://jsspeccy.zxdemo.org/
- https://worldofspectrum.net/ZXBasicManual/index.html
- https://skoolkid.github.io/rom/maps/all.html
- http://fileformats.archiveteam.org/wiki/Sinclair_BASIC_tokenized_file
- https://sinclair.wiki.zxnet.co.uk/wiki/SNA_format
- https://worldofspectrum.org/faq/reference/z80format.htm
- https://github.com/deanthecoder/ZXSpeculator
- https://trastero.speccy.org/cosas/manuales/manuales.htm
- http://www.retro8bitcomputers.co.uk/Content/downloads/manuals/ZXInterface1-Microdrive-Manual.pdf
- https://www.zilog.com/docs/z80/um0080.pdf
- https://map.grauw.nl/resources/z80instr.php