Intel 8080 emu
An intel 8080 emulator library (another one). Initially implemeted to build a space invaders emulator (another another one).
This library provides provides utilities to parse 8080 binary and simulate an 8080 microprocessor. All op codes are implemented and there is no external dependencies.
Quickstart
The main struct is intel_8080_emu::proc_state::Proc8080
. It needs basically two things to work :
- The memory, a simple
Box<[u8]>
containing the rom and the ram. - A structure implementing
intel_8080_emu::proc_state::DataBus
which handles theIN
andOUT
calls.
use Proc8080;
use MyCustomDataBus;
use std;
// load your rom as an array
let rom: = load_rom;
// copy the rom into the 8008 memory
let mut memory = Box new;
memory.copy_from_slice;
let i8080 = new;
// we're ready !
// Here is naive way to slow down the simulation so that it matches the original speed of the 8080
let mut states = i8080.states;
loop
Possible improvements
- Maybe better memory handling. It is currently a simple
Box<[u8]>
and does not distinguish between ROM and RAM.