Skip to content
Rust z80 emulator
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests Use Rc<Refcell> instead of references for attached devices Apr 30, 2019
.gitignore Registers Mar 5, 2019
.travis.yml Don't clippy tests for the time being May 2, 2019
Cargo.toml Version 0.2.1 May 3, 2019
LICENSE README and License Mar 5, 2019
README.md

README.md

crates.io docs.rs Build Status codecov

Zeerust

Something — a character design, a building, anything — used to be someone's idea of futuristic.

Zeerust is a Z80 emulator written entirely in rust. It contains modules for parsing Z80 opcodes, executing a symbolic representation, and attaching input and output devices.

There is also a binary that will print any bytes written to OUT (0) to stdout.

Take a look at the tests/ directory for some example programs and usage!

Debugging

Debug output will be provided when compiled in debug mode:

$ target/debug/zeerust tests/zeerust.bin
DEBUG - Running LD8(Reg(A), Immediate(90))
DEBUG - A: 00, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 00
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 5a, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 02
DEBUG - Running LD8(Reg(A), Immediate(69))
DEBUG - A: 5a, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 04
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 45, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 06
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 45, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 08
DEBUG - Running LD8(Reg(A), Immediate(82))
DEBUG - A: 45, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 0a
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 52, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 0c
DEBUG - Running LD8(Reg(A), Immediate(85))
DEBUG - A: 52, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 0e
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 55, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 10
DEBUG - Running LD8(Reg(A), Immediate(83))
DEBUG - A: 55, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 12
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 53, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 14
DEBUG - Running LD8(Reg(A), Immediate(84))
DEBUG - A: 53, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 16
DEBUG - Running OUT(Reg(A), Immediate(0))
DEBUG - A: 54, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 18
DEBUG - Running HALT
DEBUG - A: 54, B: 00, C: 00, D: 00, HL: 0000, F: 00000000, PC: 1a
ZEERUST%

TODO

  • Loading registers
  • Arithmetic (8-bit)
  • Opcode parsing
  • Other operations!
  • CALL/RET
  • Jumping / Looping
  • 8-bit Bitwise operations
  • Input/Output
  • 16-bit arithmetic
  • Interrupts
  • BCD support (DAA)
  • Memory mapping
  • ZX Spectrum or TI83 graphical emulation
  • Debugger
  • ???

Show me!

cargo install --path .
zeerust tests/zeerust.bin
ZEERUST%
You can’t perform that action at this time.