mirror of https://github.com/mgba-emu/mgba.git
GB MBC: Remove erroneous bank 0 wrapping
This commit is contained in:
parent
5522286c57
commit
7f9c7706bc
1
CHANGES
1
CHANGES
|
@ -8,6 +8,7 @@ Bugfixes:
|
||||||
- GBA Savedata: Fix crash when resizing flash
|
- GBA Savedata: Fix crash when resizing flash
|
||||||
Misc:
|
Misc:
|
||||||
- GBA: Improve multiboot image detection
|
- GBA: Improve multiboot image detection
|
||||||
|
- GB MBC: Remove erroneous bank 0 wrapping
|
||||||
|
|
||||||
0.6.1: (2017-10-01)
|
0.6.1: (2017-10-01)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
|
@ -39,9 +39,6 @@ void GBMBCSwitchBank(struct GB* gb, int bank) {
|
||||||
mLOG(GB_MBC, GAME_ERROR, "Attempting to switch to an invalid ROM bank: %0X", bank);
|
mLOG(GB_MBC, GAME_ERROR, "Attempting to switch to an invalid ROM bank: %0X", bank);
|
||||||
bankStart &= (gb->memory.romSize - 1);
|
bankStart &= (gb->memory.romSize - 1);
|
||||||
bank = bankStart / GB_SIZE_CART_BANK0;
|
bank = bankStart / GB_SIZE_CART_BANK0;
|
||||||
if (!bank) {
|
|
||||||
++bank;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
gb->memory.romBank = &gb->memory.rom[bankStart];
|
gb->memory.romBank = &gb->memory.rom[bankStart];
|
||||||
gb->memory.currentBank = bank;
|
gb->memory.currentBank = bank;
|
||||||
|
|
Loading…
Reference in New Issue