CS 181-AR

Sample Spectrum Emulator

Get a ZX Spectrum ROM

To run a ZX Spectrum emulator, you'll need a copy of the ZX Spectrum ROM. You can download a copy of the ROM from this link. It should be in the same directory as the emulator.

C++ Implementation — SDL2

Click this link to download the C++ implementation using SDL2.

To compile and run this code, on Linux or Mac, run:

clang++ -Wall -O3  -std=c++20 -o omse-mini omse-mini-k.cpp $(pkg-config --cflags --libs sdl2)
./omse-mini

On Windows, if you're not using a Unix-style shell, you'll need to run

pkg-config --cflags --libs sdl2

and the copy the output to your compilation command line.

C++ Implementation — SDL3

Click this link to download the C++ implementation using SDL3.

To compile and run this code, on Linux or Mac, run:

clang++ -Wall -O3  -std=c++20 -o omse-mini omse-mini-k-sdl3.cpp $(pkg-config --cflags --libs sdl3)
./omse-mini

Go Implementation — SDL2

As an alternative, you can download the Go implementation from this link.

To run this code, you'll need to have the Go compiler installed. You can compile and run the code with:

go mod init omse-mini-k
go get github.com/veandco/go-sdl2/sdl
go get github.com/imneme/chips-to-go/z80
go run omse-mini-k.go

(When logged in, completion status appears here.)