Refinement to that last fix

This commit is contained in:
Lior Halphon 2018-02-25 23:23:55 +02:00
parent 90a943d05a
commit b02e40d5a2

View File

@ -110,10 +110,11 @@ static uint8_t read_banked_ram(GB_gameboy_t *gb, uint16_t addr)
static uint8_t read_high_memory(GB_gameboy_t *gb, uint16_t addr) static uint8_t read_high_memory(GB_gameboy_t *gb, uint16_t addr)
{ {
if (gb->hdma_on) {
return gb->last_opcode_read;
}
if (addr < 0xFE00) { if (addr < 0xFE00) {
if (gb->hdma_on) {
return gb->last_opcode_read;
}
return gb->ram[addr & 0x0FFF]; return gb->ram[addr & 0x0FFF];
} }