GB MBC: Remove erroneous bank 0 wrapping

This commit is contained in:
Vicki Pfau 2017-11-05 21:05:06 -08:00
parent 7fd3eb722b
commit fb939ab042
6 changed files with 1 additions and 6 deletions

View File

@ -38,6 +38,7 @@ Misc:
- Qt: Prevent window from being created off-screen
- Qt: Add option to disable FPS display
- GBA: Improve multiboot image detection
- GB MBC: Remove erroneous bank 0 wrapping
0.6.1: (2017-10-01)
Bugfixes:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 518 B

View File

@ -45,9 +45,6 @@ void GBMBCSwitchBank(struct GB* gb, int bank) {
mLOG(GB_MBC, GAME_ERROR, "Attempting to switch to an invalid ROM bank: %0X", bank);
bankStart &= (gb->memory.romSize - 1);
bank = bankStart / GB_SIZE_CART_BANK0;
if (!bank) {
++bank;
}
}
gb->memory.romBank = &gb->memory.rom[bankStart];
gb->memory.currentBank = bank;