Writes to SVBK should work before the boot ROM is disabled
This commit is contained in:
parent
18007f0e53
commit
5b9746084d
@ -1243,13 +1243,12 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
|
|||||||
gb->io_registers[GB_IO_DMA] = value;
|
gb->io_registers[GB_IO_DMA] = value;
|
||||||
return;
|
return;
|
||||||
case GB_IO_SVBK:
|
case GB_IO_SVBK:
|
||||||
if (!gb->cgb_mode) {
|
if (gb->cgb_mode || (GB_is_cgb(gb) && !gb->boot_rom_finished)) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
gb->cgb_ram_bank = value & 0x7;
|
gb->cgb_ram_bank = value & 0x7;
|
||||||
if (!gb->cgb_ram_bank) {
|
if (!gb->cgb_ram_bank) {
|
||||||
gb->cgb_ram_bank++;
|
gb->cgb_ram_bank++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
case GB_IO_VBK:
|
case GB_IO_VBK:
|
||||||
if (!gb->cgb_mode) {
|
if (!gb->cgb_mode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user