This commit is contained in:
2025-07-22 15:51:21 -04:00
parent d5efabdd36
commit b40c3c503f
8 changed files with 122 additions and 36 deletions
+27
View File
@@ -0,0 +1,27 @@
use std::fs;
use core::computers::ram_rom::RamRomComputer;
use core::periph::backplane::Backplane;
fn main() {
println!("Taxation is theft");
let path = "/home/tmerritt/Projects/mos6502/resources/test/periph/at28c256/checksum.bin";
let bytes = match fs::read(path) {
Ok(bytes) => {
println!("Loaded {} bytes", bytes.len());
bytes
},
Err(e) => vec![]
};
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()
);
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()
);
}
+3 -3
View File
@@ -1,5 +1,6 @@
use std::fs;
use core::computers::rom_only::RomOnlyComputer;
use core::periph::backplane::Backplane;
fn main() {
println!("Taxation is theft");
@@ -15,6 +16,5 @@ fn main() {
let mut rom_only = RomOnlyComputer::program((&bytes[..]).to_vec());
rom_only.tick2(0x05, 0b0000_0001, 0x05);
println!("COMPUTER: Read {:02x} from ROM", rom_only.data_bus()) ;
println!("COMPUTER: Read {:04x} from Address Bus", rom_only.address_bus());
}
println!("COMPUTER: Read {:02x} from ROM / {:04x} from Address bus", rom_only.data_bus(), rom_only.address_bus()) ;
}