Skip to content

NibiruOS/zxstudio

Repository files navigation

ZX Studio

This is a pet Kotlin Multiplatform project (very incomplete at the moment).

Description

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.).

Main components

  • 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:
  • Snapshot file read/write components. Current implementations are:

How to try it

Sample code

Yo can try the examples in test classes. They include examples for both, parser and DSL approaches.

Compose Multiplatform app

You can run the sample Compose App. You can also run a demo in the browser.

Current limitations

  • 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.

Ideas for the future

  • 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?

Useful links

About

ZX Spectrum development tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages