Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicolasbauw/zilogz80
Zilog Z80 emulation library
https://github.com/nicolasbauw/zilogz80
emulator rust z80 zilog
Last synced: about 5 hours ago
JSON representation
Zilog Z80 emulation library
- Host: GitHub
- URL: https://github.com/nicolasbauw/zilogz80
- Owner: nicolasbauw
- License: mit
- Created: 2022-08-12T13:51:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-22T21:25:44.000Z (about 1 year ago)
- Last Synced: 2024-04-24T02:40:37.572Z (10 months ago)
- Topics: emulator, rust, z80, zilog
- Language: Rust
- Homepage:
- Size: 523 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zilog_z80
[![Current Crates.io Version](https://img.shields.io/crates/v/zilog_z80.svg)](https://crates.io/crates/zilog_z80)
[![Current docs Version](https://docs.rs/zilog_z80/badge.svg)](https://docs.rs/zilog_z80)
[![Downloads badge](https://img.shields.io/crates/d/zilog_z80.svg)](https://crates.io/crates/zilog_z80)This is a Z80 emulator.
Example for a small loop:
```rust
use zilog_z80::cpu::CPU;
let mut c = CPU::new(0xFFFF);
c.reg.pc = 0x0100; // sets pc to 0x0100
// Here we create a small machine code program for demo purpose.
// Usually you will rather load an assembled code in memory with the load_bin function.
c.bus.write_byte(0x0100, 0x3e); // LD A,0x0F
c.bus.write_byte(0x0101, 0x0F);
c.bus.write_byte(0x0102, 0x3d); // DEC A
c.bus.write_byte(0x0103, 0xc2); // JP NZ,0x0102
c.bus.write_word(0x0104, 0x0102);
c.bus.write_byte(0x0106, 0xc9); // RET
loop {
c.execute();
if c.reg.pc == 0x0000 { break }
}
```For IO and MMIO examples see my [demonstration TRS-80 emulator.](https://github.com/nicolasbauw/TRS-80)
License: MIT