rustzx
ZX Spectrum emulator which I writing in rust.
I develop this project just for fun and for learning the basics of computer
architecture.
Licensed under MIT License.
Watch this video showcase!
Features
- Written in pure rust
- Cross-platform
- Documented source
- Full ZX Spectrum 48K and 128K emulation
- Perfect emulation of Z80 core
- Highly precise AY chip emulation with Ayumi library
- Beeper sound emulation
- Can handle tap, sna files
- Fast loading of tap files with standard loader
- Emulates border
- Kempston joystick emulation
- Correct contentons
Download [v0.9.2]
Packages are available in github releases.
Note: On linux platforms sdl2 library must be installed
Compiling
Before compiling make shure that sdl2 and its dev libs are installed.
For additional information about sdl2 click
here
Then just install it with cargo (~/.cargo/bin
must be in your PATH)
cargo install
For advenced info use --help
flag
How to use
Here some examples of usage:
rustzx --help
rustzx --fastload --tap test.tap
rustzx -f --128k --AY abc --tap test128.tap
rustzx --rom tester.rom --scale 3 --volume 50
For loading tape in 48K mode, press j
then Ctrl+p
twice, as on real Spectrum.
You must see LOAD ""
on emulator's screen. And then press Enter
.
If you --fastload
option before launching, game will be launched, in other
case press Insert
to insert tape. Delete
can be used for ejecting tape from
tape reader. --128k
flag launches emulator in 128K mode. For loading tape just
press Enter
.
If you have some audio troubles - use --latency
flag with bigger samples
count.
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
Log
Watch LOG for details and github issues for current plans and help requests.
References
Of course, I used many resources to find out, how to build my first emulator in life. So there is a list of useful references, from where I dig most information about Z80, ULA and other ZX Spectrum hardware parts:
- Of course z80.info
- Instruction table from ClrHome
- "Floating bus explained!" by Ramsoft
- 16K / 48K ZX Spectrum Reference
- 128K ZX Spectrum Reference
- Z80 hardware organization
- disassembler.io online disassembler
- Cool z80 assembler zasm
- Diagnostic ROM by Phill
- zx-modules.de - great resource, check it out!
- speccy.info
- Harlequin
- And many other great material, which helped me to make rustzx!
- FUSE emulator source for finding out correct timings
ROM's
Emulator contains ROM's, created by by Sinclair Research Ltd (now owned by Amstrad plc), Amstrad was given permissions for distributing their ROM's with emulators, so they are included in source of emulator (mod zx::roms). More about this read here