Skip to content

Commit

Permalink
OR Masks
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed May 2, 2024
1 parent c8cfcea commit 78c26ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/mmu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl Memory for MMU {
0xFF10..=0xFF3F => self.apu.read(a),
0xFF0F => self.intf.bits(),
0xFF51..=0xFF6F => self.ppu.read(a),
0xFF70 => self.wram_bank as u8,
0xFF70 => 0xF8 | self.wram_bank as u8,
0xFEA0..=0xFEFF => 0xFF,
0xFFFF => self.inte.bits(),
_ => panic!("Read to unsupported address ({:#06x})!", a),
Expand Down
3 changes: 2 additions & 1 deletion src/components/ppu/ppu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ impl Memory for PPU {
0xFF49 => self.op1,
0xFF4A => self.wy,
0xFF4B => self.wx,
0xFF4D => 0x00,
// TODO: Speed Switch
0xFF4D => 0x7E,
0xFF4F => 0xFE | self.vram_bank as u8,
// TODO: DMA
0xFF51..=0xFF55 => 0x00,
Expand Down
2 changes: 1 addition & 1 deletion src/components/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Memory for Serial {
fn read(&self, a: u16) -> u8 {
match a {
0xFF01 => self.sb,
0xFF02 => self.sc,
0xFF02 => 0x7C | self.sc,
_ => panic!("Read to unsupported Serial address ({:#06x})!", a),
}
}
Expand Down

0 comments on commit 78c26ee

Please sign in to comment.