From ea40a7be05f5eb6a2481572819b29d10c62d8312 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 16 Sep 2022 12:20:59 +0300 Subject: [PATCH] Fix DMA regression, fixes #495 --- Core/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/memory.c b/Core/memory.c index c3e9750..8bdc952 100644 --- a/Core/memory.c +++ b/Core/memory.c @@ -533,7 +533,7 @@ static uint8_t read_high_memory(GB_gameboy_t *gb, uint16_t addr) return 0xFF; } - if (GB_is_dma_active(gb)) { + if (GB_is_dma_active(gb) && gb->dma_current_dest != 0) { /* Todo: Does reading from OAM during DMA causes the OAM bug? */ return 0xFF; }