Skip to content

Commit

Permalink
rainbow: fixed extended background bank offset issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BrokeStudio committed Feb 12, 2024
1 parent 0e5c22d commit 0dca851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/NES/Mappers/Homebrew/Rainbow.h
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ class Rainbow : public BaseMapper
return ReadFromChr(((addr & ~0x07) | (_windowSplitYPos & 0x07)) & 0xFFF);
case 2: // extended tiles
case 3: // extended attributes + tiles
return ReadFromChr(((_windowExtModeLastValue & 0x3F) << 12) + (((addr & ~0x07) | (_windowSplitYPos & 0x07)) & 0xFFF));
return ReadFromChr((_bgBankOffset * 0x40000) + ((_windowExtModeLastValue & 0x3F) << 12) + (((addr & ~0x07) | (_windowSplitYPos & 0x07)) & 0xFFF));
}
}
}
Expand Down Expand Up @@ -1576,7 +1576,7 @@ class Rainbow : public BaseMapper
return InternalReadVram(addr);
case 2: // extended tiles
case 3: // extended attributes + tiles
return ReadFromChr(((_extModeLastValue & 0x3f) << 12) + (addr & 0xFFF));
return ReadFromChr((_bgBankOffset * 0x40000) + ((_extModeLastValue & 0x3f) << 12) + (addr & 0xFFF));
}
}
}
Expand Down

0 comments on commit 0dca851

Please sign in to comment.