diff --git a/aiie/applesoft.bin b/aiie/applesoft.bin new file mode 100644 index 0000000..7c515ab Binary files /dev/null and b/aiie/applesoft.bin differ diff --git a/aiie/char.bin.new.bin b/aiie/char.bin.new.bin deleted file mode 100644 index c268030..0000000 Binary files a/aiie/char.bin.new.bin and /dev/null differ diff --git a/aiie/char.bin b/aiie/character.bin similarity index 100% rename from aiie/char.bin rename to aiie/character.bin diff --git a/aiie/firmware.bin b/aiie/firmware.bin new file mode 100644 index 0000000..c93511c Binary files /dev/null and b/aiie/firmware.bin differ diff --git a/aiie/monitor.bin b/aiie/monitor.bin new file mode 100644 index 0000000..cb6d7e1 Binary files /dev/null and b/aiie/monitor.bin differ diff --git a/src/systems/aiie/mod.rs b/src/systems/aiie/mod.rs index b1e63a7..7545a2a 100644 --- a/src/systems/aiie/mod.rs +++ b/src/systems/aiie/mod.rs @@ -299,9 +299,6 @@ impl SystemBuilder for AiieSystemB let peripheral_card = LoggingMemory::new(Box::new(NullMemory::new()), "Peripheral Card", 0xC100); - //let applesoft_interpreter = BlockMemory::from_file(0x2800, roms.applesoft); - //let monitor = BlockMemory::from_file(0x4000, roms.monitor); - let rom = BlockMemory::from_file(16128, roms.rom); let memory = BranchMemory::new() .map( @@ -361,9 +358,18 @@ impl SystemBuilder for AiieSystemB Box::new(io), // Box::new(LoggingMemory::new(Box::new(io), "I/O", 0xC000)), ) - .map(0xC100, Box::new(rom)); - //.map(0xD000, Box::new(applesoft_interpreter)) - //.map(0xF800, Box::new(monitor)); + .map( + 0xC100, + Box::new(BlockMemory::from_file(0x0F00, roms.firmware)), + ) + .map( + 0xD000, + Box::new(BlockMemory::from_file(0x2800, roms.applesoft)), + ) + .map( + 0xF800, + Box::new(BlockMemory::from_file(0x0800, roms.monitor)), + ); let cpu = Mos6502::new(Box::new(memory)); diff --git a/src/systems/aiie/roms.rs b/src/systems/aiie/roms.rs index 184179a..22cc00f 100644 --- a/src/systems/aiie/roms.rs +++ b/src/systems/aiie/roms.rs @@ -6,7 +6,14 @@ pub struct AiieSystemRoms { /// Character ROM. Used to generate the 7x8 character bitmaps. pub character: RomFile, - pub rom: RomFile, + /// Firmware ROM. Contains text drawing and I/O routines. + pub firmware: RomFile, + + /// AppleSoft BASIC ROM. Contains the BASIC interpreter and editor. + pub applesoft: RomFile, + + /// Monitor ROM. Contains reset vectors and the system monitor. + pub monitor: RomFile, } impl AiieSystemRoms { @@ -14,14 +21,16 @@ impl AiieSystemRoms { pub fn from_disk() -> Self { use crate::roms::DiskLoadable; - // let character = RomFile::from_file("aiie/char.bin"); - //let applesoft = RomFile::from_file("aiie/applesoft.bin"); - //let monitor = RomFile::from_file("aiie/monitor.bin"); - let rom = RomFile::from_file("aiie/appleiie.bin"); - let character = RomFile::from_file("aiie/char.bin"); + let character = RomFile::from_file("aiie/character.bin"); + let firmware = RomFile::from_file("aiie/firmware.bin"); + let applesoft = RomFile::from_file("aiie/applesoft.bin"); + let monitor = RomFile::from_file("aiie/monitor.bin"); + Self { character, - rom + firmware, + applesoft, + monitor, } } }