From 40ded1114f49c5ef6ae36a69ccb0c2b0008ec501 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sun, 10 Dec 2023 14:56:41 +0200 Subject: [PATCH] Correct timing TODO --- Core/display.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/display.c b/Core/display.c index cf6705bb8..9e9e8b92d 100644 --- a/Core/display.c +++ b/Core/display.c @@ -1820,13 +1820,10 @@ void GB_display_run(GB_gameboy_t *gb, unsigned cycles, bool force) gb->objects_y[gb->n_visible_objs - 1], gb->mode2_y_bus, gb->object_flags); - GB_SLEEP(gb, display, 40, 1); - - /* TODO: timing not verified. Probably happens a cycle earlier, but needs to verify it doesn't - break any DMA tests. { */ + dma_sync(gb, &cycles); gb->object_tile_data[1] = vram_read(gb, gb->object_low_line_address + 1); - /* } */ + GB_SLEEP(gb, display, 40, 1); uint8_t palette = (gb->object_flags & 0x10) ? 1 : 0;