- Notifications
You must be signed in to change notification settings - Fork18
ZX Spectrum emulator written in Rust
License
rustzx/rustzx
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ZX Spectrum emulator written in Rust.
- Watchthis video showcase (
v0.9.x
) - ReadCHANGELOG.md for info on the latest version changes
- Written in pure rust
- Cross-platform
- Full ZX Spectrum 48K and 128K emulation
- Highly accurate emulation of Z80 core
- Highly precise AY chip emulation
- Beeper sound emulation
- Supported formats:
tap
- tapesna
- snapshot, both 48K and 128K versions supportedszx
- snapshot, both 48k and 128k versions supported along withzlib compression.scr
- screenshot
- Fast loading of tap files with standard loader
- Very accurate timings
- Full border emulation
- Joystick emulation: Kempston, Sinclair
- Kempston mouse emulation
- Extended 128K keys emulation (arrows, backspace, caps lock)
- Quick save/load
- Compressed assets support (only
.gz
for now) - Separate
no_std
core library which can be used to port emulatoralmost anywhere.- Global allocator is still needed, but all dynamicallocations are minimized
- All resource-heavy features are configurable via cargo
features
- Obscure Z80 features emulation:
WZ/memptr
register (F3/F5
flags obscure behavior inBIT n, (HL)
)Q
register (F3/F5
flags obscure behavior inSCF
andCCF
)- Block instruction flagsoddities (
LDxR
/CPxR
/INxR
/OTxR
)
- Ensure that you have C compiler and CMake to build bundled
sdl2
- Linux only: Install required development packages: [
libasound2-dev
] - Install it with cargo
cargo install rustzx
rustzx --help# Show helprustzx test.tap# Autodetect file type and run in 48K moderustzx --ay test.tap# Run in 48K mode with AY sound chiprustzx -m128 --tape test128.tap# Run in 128K mode with taperustzx --rom tester.rom -s3# Run with custom rom and 3x screen scalingrustzx --nofastload test.tap# Run without fast tape loadingrustzx --mouse test.tap# Run with Kempston mouse support
For loading tape in 48K mode, pressj
thenCtrl+p
twice, as on a real Spectrum.You should seeLOAD ""
on emulator's screen, then pressEnter
(in 128K mode just press enter).In--nofastload
mode, pressInsert
to play the tape andDelete
to stop.
If you have choppy audio, try--sound-latency
option with bigger values.
Shortcut Key | Function |
---|---|
F1 | Quick save |
F2 | Quick load |
F3 | Set normal emulation speed |
F4 | Set 2x emulation speed |
F5 | Max possible emulation speed |
F6 | Enable frame trace info |
F9 | Enable Kempston/Sinclair joy keyboard layer |
Insert | Start tape |
Delete | Stop tape |
End | Break command |
Caps Lock | Caps lock command |
Backspace | Delete |
<Arrows> | 128K arrow keys |
Esc | Unlock mouse (if--mouse is used) |
Shortcut Key | Function |
---|---|
<Arrows> | Kempston joyarrows |
Alt | Kempstonfire |
WASD | Sinclair Joy 1arrows |
Caps Lock | Sinclair Joy 1fire |
IJKL | Sinclair Joy 2arrows |
Enter | Sinclair Joy 2fire |
Many resources were used to find out how to build this emulator.Huge thanks to the following resources that helped figure out a lot ofdetails about ZX Spectrum.
- z80.info of course!
- Decoding Z80 opcodes
- Opcodes list
- CPU user manual
- CPU architecture
- Interrupt behaviour
- Z80 undocumented documented
- Instruction table fromClrHome
- "Floating bus explained!" byRamsoft
- 16K / 48K ZX SpectrumReference
- 128K ZX SpectrumReference
- Z80 hardware organization
- disassembler.io online disassembler
- Cool z80 assemblerzasm
- Diagnostic ROM byPhill
- zx-modules.de - great resource, check it out!
- speccy.info
- Harlequin
- FUSE emulator source for finding out correct timings
- YAZE test suite
- z80test test suite
- ROM routines
- And many other great material, which helped me to make rustzx!
Emulator contains ROMs, created by by Sinclair Research Ltd (now owned by Amstrad plc).
Amstrad hasgivenpermission to distribute their ROM's in conjunction with emulators.
In RustZX these ROMs are included in the source of the core emulator librarymod rustzx_core::zx::roms
. Embedded romscan be opted-out from the core library by disabling featureembedded-roms
.
About
ZX Spectrum emulator written in Rust
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.