diff --git a/builds/genesis_plus_gx_libretro.dll b/builds/genesis_plus_gx_libretro.dll index 7264f77..0921c6f 100644 Binary files a/builds/genesis_plus_gx_libretro.dll and b/builds/genesis_plus_gx_libretro.dll differ diff --git a/builds/genplus_cube.dol b/builds/genplus_cube.dol index 9aa4eb6..f6dbc89 100644 Binary files a/builds/genplus_cube.dol and b/builds/genplus_cube.dol differ diff --git a/builds/genplus_wii.dol b/builds/genplus_wii.dol index 762c972..8911950 100644 Binary files a/builds/genplus_wii.dol and b/builds/genplus_wii.dol differ diff --git a/core/cd_hw/gfx.c b/core/cd_hw/gfx.c index 26b986e..85600e3 100644 --- a/core/cd_hw/gfx.c +++ b/core/cd_hw/gfx.c @@ -2,7 +2,7 @@ * Genesis Plus * CD graphics processor * - * Copyright (C) 2012-2023 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2012-2024 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -683,7 +683,7 @@ void gfx_update(int cycles) /* update Vdot remaining size */ scd.regs[0x64>>1].byte.l -= lines; - /* increment cycle counter */ + /* update cycle counter */ gfx.cycles += lines * gfx.cyclesPerLine; } else @@ -694,14 +694,20 @@ void gfx_update(int cycles) /* clear Vdot remaining size */ scd.regs[0x64>>1].byte.l = 0; + /* update cycle counter */ + gfx.cycles += lines * gfx.cyclesPerLine; + /* end of graphics operation */ scd.regs[0x58>>1].byte.h = 0; /* SUB-CPU idle on register $58 polling ? */ if (s68k.stopped & (1<<0x08)) { - /* sync SUB-CPU with GFX chip */ - s68k.cycles = scd.cycles; + /* sync SUB-CPU with GFX chip (only if not already ahead) */ + if (s68k.cycles < gfx.cycles) + { + s68k.cycles = gfx.cycles; + } /* restart SUB-CPU */ s68k.stopped = 0; diff --git a/core/cd_hw/gfx.h b/core/cd_hw/gfx.h index 18b4008..2bb8b63 100644 --- a/core/cd_hw/gfx.h +++ b/core/cd_hw/gfx.h @@ -2,7 +2,7 @@ * Genesis Plus * CD graphics processor * - * Copyright (C) 2012-2023 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2012-2024 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: