← All projects
kotlinmicronautin progress

Spektrum

A work in progress Sinclair ZX Spectrum emulator written in Kotlin and Micronaut, starting with an emulation of the Z80 CPU.

BuildLicence

A Sinclair ZX Spectrum emulator written in Kotlin and Micronaut. The goal is to faithfully recreate the classic home computer, starting from its heart: the Zilog Z80 CPU.

Status

Spektrum is at a very early stage, and there’s nothing to see on screen yet. So far it has:

  • The Z80 register set: the main and alternate register sets, flags, index registers, stack pointer and program counter
  • An opcode decoder, built from a specification of each instruction’s addressing mode and cycle count
  • The first instructions: ADC A,r for each of the general purpose registers
  • A command line entry point and a setting for the emulation speed

Next up is the rest of the Z80 instruction set, then memory, the ULA and the display.

Requirements

  • Java 25 or later

Usage

Build and run it with Gradle:

./gradlew build
./gradlew run --args="--verbose"

For now this prints the banner and version. Most of the work happens in the tests, which run with ./gradlew test.

The emulation speed is set in src/main/resources/application.properties:

spektrum.speed.cpu=100

Built with

Acknowledgements

Spektrum is a tribute to Sir Clive Sinclair and the ZX Spectrum, which introduced a generation to computing.

Licence

Apache 2.0. See LICENSE.