GB Memory: Fix OAM DMA from top 8 kB
Vicki Pfau vi@endrift.com
Tue, 16 Jun 2020 23:06:32 -0700
5 files changed,
4 insertions(+),
4 deletions(-)
D
cinema/gb/mooneye-gb/acceptance/oam_dma/sources-dmgABCmgbS/manifest.yml
@@ -1,1 +0,0 @@
-fail: true
M
src/gb/io.c
→
src/gb/io.c
@@ -191,7 +191,7 @@ }
GBIOWrite(gb, REG_SCY, 0x00); GBIOWrite(gb, REG_SCX, 0x00); GBIOWrite(gb, REG_LYC, 0x00); - GBIOWrite(gb, REG_DMA, 0xFF); + gb->memory.io[REG_DMA] = 0xFF; GBIOWrite(gb, REG_BGP, 0xFC); if (gb->model < GB_MODEL_CGB) { GBIOWrite(gb, REG_OBP0, 0xFF);
M
src/gb/memory.c
→
src/gb/memory.c
@@ -519,8 +519,8 @@ }
} void GBMemoryDMA(struct GB* gb, uint16_t base) { - if (base > 0xF100) { - return; + if (base >= 0xE000) { + base &= 0xDFFF; } mTimingDeschedule(&gb->timing, &gb->memory.dmaEvent); mTimingSchedule(&gb->timing, &gb->memory.dmaEvent, 8);