Skip to content

Commit

Permalink
Do not expand I/O area beyond bank 0xBF (but ROM is fine)
Browse files Browse the repository at this point in the history
  • Loading branch information
twvd committed May 12, 2024
1 parent 8af4fac commit c6ed009
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/snes/bus/mainbus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,7 @@ where
0x7E..=0x7F => Some(self.wram[((bank - 0x7E) * WRAM_BANK_SIZE) + addr]),

// System area
// This is supposed to run until bank 0xBF, but some LoROM games expect it to
// expand further to 0xFF?
0x00..=0x3F | 0x80..=0xFF => match addr {
0x00..=0x3F | 0x80..=0xBF => match addr {
// WRAM mirror
0x0000..=0x1FFF => Some(self.wram[addr]),
// Picture Processing Unit
Expand Down Expand Up @@ -682,9 +680,7 @@ where
0x7E..=0x7F => Some(self.wram[((bank - 0x7E) * WRAM_BANK_SIZE) + addr] = val),

// System area
// This is supposed to run until bank 0xBF, but some LoROM games expect it to
// expand further to 0xFF?
0x00..=0x3F | 0x80..=0xFF => match addr {
0x00..=0x3F | 0x80..=0xBF => match addr {
// WRAM mirror
0x0000..=0x1FFF => Some(self.wram[addr] = val),
// Picture Processing Unit
Expand Down

0 comments on commit c6ed009

Please sign in to comment.