Home

Awesome

RustZX

RustZX CI Crates.io License Discord

logo

ZX Spectrum emulator written in Rust.

Features

Install

  1. Ensure that you have C compiler and CMake to build bundled sdl2
  2. Linux only: Install required development packages: [libasound2-dev]
  3. Install it with cargo
cargo install rustzx

How to use

rustzx --help # Show help
rustzx test.tap # Autodetect file type and run in 48K mode
rustzx --ay test.tap # Run in 48K mode with AY sound chip
rustzx -m128 --tape test128.tap # Run in 128K mode with tape
rustzx --rom tester.rom -s3 # Run with custom rom and 3x screen scaling
rustzx --nofastload test.tap # Run without fast tape loading
rustzx --mouse test.tap # Run with Kempston mouse support

For loading tape in 48K mode, press j then Ctrl+p twice, as on a real Spectrum. You should see LOAD "" on emulator's screen, then press Enter (in 128K mode just press enter). In --nofastload mode, press Insert to play the tape and Delete to stop.

If you have choppy audio, try --sound-latency option with bigger values.

Default key bindings:

Shortcut KeyFunction
F1Quick save
F2Quick load
F3Set normal emulation speed
F4Set 2x emulation speed
F5Max possible emulation speed
F6Enable frame trace info
F9Enable Kempston/Sinclair joy keyboard layer
InsertStart tape
DeleteStop tape
EndBreak command
Caps LockCaps lock command
BackspaceDelete
<Arrows>128K arrow keys
EscUnlock mouse (if --mouse is used)

In joy keyboard layer mode (F9)

Shortcut KeyFunction
<Arrows>Kempston joy arrows
AltKempston fire
WASDSinclair Joy 1 arrows
Caps LockSinclair Joy 1 fire
IJKLSinclair Joy 2 arrows
EnterSinclair Joy 2 fire

Screenshots

References

Many resources were used to find out how to build this emulator. Huge thanks to the following resources that helped figure out a lot of details about ZX Spectrum.

ROMs

Emulator contains ROMs, created by by Sinclair Research Ltd (now owned by Amstrad plc).

Amstrad has given permission to distribute their ROM's in conjunction with emulators.

In RustZX these ROMs are included in the source of the core emulator library mod rustzx_core::zx::roms. Embedded roms can be opted-out from the core library by disabling feature embedded-roms.