mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-23 00:53:01 +02:00
Writing to BGPD/OBPD while it’s blocked still increases BGPI/OBPI if needed. Fixes #145
This commit is contained in:
@@ -792,10 +792,15 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
|
||||
is required. */
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t index_reg = (addr & 0xFF) - 1;
|
||||
if (gb->cgb_palettes_blocked) {
|
||||
if (gb->io_registers[index_reg] & 0x80) {
|
||||
gb->io_registers[index_reg]++;
|
||||
gb->io_registers[index_reg] |= 0x80;
|
||||
}
|
||||
return;
|
||||
}
|
||||
uint8_t index_reg = (addr & 0xFF) - 1;
|
||||
((addr & 0xFF) == GB_IO_BGPD?
|
||||
gb->background_palettes_data :
|
||||
gb->sprite_palettes_data)[gb->io_registers[index_reg] & 0x3F] = value;
|
||||
|
Reference in New Issue
Block a user