#ay #sound #emulator #no-std

no-std aym

AY/YM sound chip emulation library

2 releases

0.1.1 May 24, 2021
0.1.0 May 16, 2021

#132 in Audio


Used in 3 crates (2 directly)

MIT license

25KB
581 lines

RustZX

RustZX CI

logo

ZX Spectrum emulator written in Rust

  • Watch this video showcase (v0.9.x)
  • Read CHANGELOG.md for info on the latest version changes

Features

  • Written in pure rust
  • Cross-platform
  • Full ZX Spectrum 48K and 128K emulation
  • Perfect emulation of Z80 core
  • Highly precise AY chip emulation
  • Beeper sound emulation
  • Supported formats: TAP, SNA
  • Fast loading of tap files with standard loader
  • Precise timings
  • Full border emulation
  • Joystick emulation: Kempston
  • Separate no_std core library which can be used to port emulator almost anywhere.
    • Global allocator is still needed, but all dynamic allocations were minimized
    • All resource-heavy features are configurable via cargo features

Compiling from the latest master

  1. Sure that you have C compiller and CMake to build bundled sdl2
  2. Install it with cargo
cargo install --path ./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

For loading tape in 48K mode, press j then Ctrl+p twice, as on 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.

Use keys F3 - F5 to set speed of emulation - this can be usefull when skipping some boring stuff. Use F6 to display FPS in window title.

Screenshots

References

Many resources were used to find out, how to buildthis emulator. Huge thanks to the following resources which helped to figure out a lot of defails about ZX Spectrum.

ROM's

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 included in 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.

Dependencies

~545KB
~11K SLoC