Skip to main content

Crate u880

Crate u880 

Source
Expand description

A cycle-stepped MME U880 emulator.

§Example

use u880::{Cpu, pins};

let mut cpu = Cpu::new();
let mut mem = [0u8; 1 << 16];
let mut bus = 0u64;

for _ in 0..32 {
    bus = cpu.tick(bus);
    if bus & pins::MREQ != 0 {
        let addr = pins::addr(bus);
        if bus & pins::RD != 0 {
            bus = pins::set_data(bus, mem[addr as usize]);
        } else if bus & pins::WR != 0 {
            mem[addr as usize] = pins::data(bus);
        }
    }
}

Re-exports§

pub use cpu::Cpu;
pub use cpu::Revision;
pub use flags::Flags;
pub use registers::Registers;
pub use state::InterruptMode;
pub use state::State;

Modules§

cpu
The U880 CPU struct and its primary interface: Cpu::new, Cpu::tick, and Cpu::reset.
flags
U880 status flags register and flag-bit constants.
pins
The U880 pin bus.
registers
U880 registers: main and shadow banks, index registers, and special-purpose registers.
state
CPU execution state: decoder step, interrupt mode, and IFF flip-flops.