use std::fs;
use core::computers::ram_rom::RamRomComputer;
use core::traits::backplane::Backplane;


fn main() {
    let bytes = include_bytes!("/home/tmerritt/Projects/mos6502/resources/test/periph/at28c256/checksum.bin");
    println!("Taxation is theft");

    let mut ramrom_computer = RamRomComputer::program_rom((&bytes[..]).to_vec());

    ramrom_computer.tick2(0x05, 0b0000_0000, 0x05);
    println!("COMPUTER: Read {:02x} from ROM / {:04x} from Address bus",
             ramrom_computer.data_bus(),
             ramrom_computer.address_bus()
    );
    println!("--TICK--");
    ramrom_computer.tick2(0x4005, 0b0000_0001, ramrom_computer.data_bus());
    println!("COMPUTER: Read {:02x} from ROM / {:04x} from Address bus",
             ramrom_computer.data_bus(),
             ramrom_computer.address_bus()
    );
    println!("--TICK--");
    ramrom_computer.tick2(0x4005, 0b0000_0000, ramrom_computer.data_bus());
    println!("COMPUTER: Read {:02x} from ROM / {:04x} from Address bus",
             ramrom_computer.data_bus(),
             ramrom_computer.address_bus()
    );
    println!("--TICK--");
}