From ce80acc818bbd6129df1f4a0902539264f07522a Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 20 Jul 2018 12:34:52 +0300 Subject: [PATCH] Fixed HDMA timing )But still not verified) --- Core/display.c | 4 ++-- Core/gb.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/display.c b/Core/display.c index d88978e..2759146 100644 --- a/Core/display.c +++ b/Core/display.c @@ -823,8 +823,8 @@ void GB_display_run(GB_gameboy_t *gb, uint8_t cycles) /* Todo: Measure this value */ - gb->cycles_for_line += 16; - GB_SLEEP(gb, display, 25, 16); + gb->cycles_for_line += 12; + GB_SLEEP(gb, display, 25, 12); if (gb->hdma_on_hblank) { gb->hdma_starting = true; diff --git a/Core/gb.c b/Core/gb.c index 5f7b4f4..8ce8326 100644 --- a/Core/gb.c +++ b/Core/gb.c @@ -465,7 +465,7 @@ static void reset_ram(GB_gameboy_t *gb) } break; #if 0 - /* Not emulated yet, for documentation only*/ + /* Not emulated yet, for documentation only */ case GB_MODEL_SGB2: for (unsigned i = 0; i < gb->ram_size; i++) { gb->ram[i] = 0x55;