Skip to content
Snippets Groups Projects
Verified Commit 97c020f5 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: new boot disable support

parent 6a5dad18
No related branches found
No related tags found
No related merge requests found
...@@ -33,25 +33,17 @@ impl Mmu { ...@@ -33,25 +33,17 @@ impl Mmu {
&self.ppu &self.ppu
} }
pub fn read(&self, addr: u16) -> u8 { pub fn read(&mut self, addr: u16) -> u8 {
match addr & 0xf000 { match addr & 0xf000 {
// BIOS // BIOS
0x0000 => { 0x0000 => {
//@todo we still need to control if we're reading from boot // in case the boot mode is active and the
// if(MMU._inboot) // address is withing boot memory reads from it
// { if self.boot_active && addr <= 0x00fe {
// if(addr < 0x0100) if addr == 0x00fe {
// return MMU._boot[addr]; self.boot_active = false;
// else if(Z80._r.pc == 0x0100) }
// MMU._inboot = 0; return self.boot[addr as usize];
//}
//return MMU._rom[addr];
if self.boot_active {
if addr < 0x0100 {
return self.boot[addr as usize];
} /* else if self.cpu.as_ref().unwrap().borrow().pc() == 0x0100 {
self.boot_active = false;
}*/
} }
self.rom[addr as usize] self.rom[addr as usize]
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment