Crates.io | zeerust |
lib.rs | zeerust |
version | 0.2.1 |
source | src |
created_at | 2019-03-16 03:59:14.803608 |
updated_at | 2019-05-03 15:56:15.051864 |
description | A Z80 CPU Emulator |
homepage | |
repository | https://github.com/stillinbeta/zeerust |
max_upload_size | |
id | 121259 |
size | 129,411 |
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!
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%
DAA
)cargo install --path .
zeerust tests/zeerust.bin
ZEERUST%