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

todo: added new todo

parent 1d44d53a
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,10 @@ impl Mmu { ...@@ -73,6 +73,10 @@ impl Mmu {
} else { } else {
match addr & 0x00f0 { match addr & 0x00f0 {
0x40 | 0x50 | 0x60 | 0x70 => self.ppu.read(addr), 0x40 | 0x50 | 0x60 | 0x70 => self.ppu.read(addr),
0x00 => {
//@todo implement the gamepad as a controller
0x00
}
_ => { _ => {
println!("Reading from unknown IO control 0x{:04x}", addr); println!("Reading from unknown IO control 0x{:04x}", addr);
0x00 0x00
...@@ -90,15 +94,15 @@ impl Mmu { ...@@ -90,15 +94,15 @@ impl Mmu {
match addr & 0xf000 { match addr & 0xf000 {
// BOOT (256 B) + ROM0 (4 KB/16 KB) // BOOT (256 B) + ROM0 (4 KB/16 KB)
0x0000 => { 0x0000 => {
println!("WRITING to BOOT") println!("Writing to BOOT")
} }
// ROM0 (12 KB/16 KB) // ROM0 (12 KB/16 KB)
0x1000 | 0x2000 | 0x3000 => { 0x1000 | 0x2000 | 0x3000 => {
println!("WRITING TO ROM 0"); println!("Writing to ROM 0");
} }
// ROM1 (Unbanked) (16 KB) // ROM1 (Unbanked) (16 KB)
0x4000 | 0x5000 | 0x6000 | 0x7000 => { 0x4000 | 0x5000 | 0x6000 | 0x7000 => {
println!("WRITING TO ROM 1"); println!("Writing to ROM 1");
} }
// Graphics: VRAM (8 KB) // Graphics: VRAM (8 KB)
0x8000 | 0x9000 => { 0x8000 | 0x9000 => {
...@@ -133,9 +137,17 @@ impl Mmu { ...@@ -133,9 +137,17 @@ impl Mmu {
self.ppu.hram[(addr & 0x007f) as usize] = value; self.ppu.hram[(addr & 0x007f) as usize] = value;
} else { } else {
match addr & 0x00f0 { match addr & 0x00f0 {
0x40 | 0x50 | 0x60 | 0x70 => { 0x40 | 0x60 | 0x70 => {
self.ppu.write(addr, value); self.ppu.write(addr, value);
} }
0x50 => {
match addr & 0x00ff {
0x50 => self.boot_active = false,
_ => {
println!("Writing to unknown IO control 0x{:04x}", addr);
}
}
}
_ => { _ => {
println!("Writing to unknown IO control 0x{:04x}", addr); println!("Writing to unknown IO control 0x{:04x}", addr);
} }
......
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