Move render to HBLANK start.

This commit is contained in:
Brandon Wright 2018-08-17 10:23:20 -05:00
parent 8064f7f289
commit 933c861063
2 changed files with 10 additions and 10 deletions

View File

@ -357,6 +357,11 @@ static inline void S9xReschedule (void)
switch (CPU.WhichEvent)
{
case HC_HBLANK_START_EVENT:
CPU.WhichEvent = HC_RENDER_EVENT;
CPU.NextEvent = Timings.RenderPos;
break;
case HC_RENDER_EVENT:
CPU.WhichEvent = HC_HDMA_START_EVENT;
CPU.NextEvent = Timings.HDMAStart;
break;
@ -372,11 +377,6 @@ static inline void S9xReschedule (void)
break;
case HC_HDMA_INIT_EVENT:
CPU.WhichEvent = HC_RENDER_EVENT;
CPU.NextEvent = Timings.RenderPos;
break;
case HC_RENDER_EVENT:
CPU.WhichEvent = HC_WRAM_REFRESH_EVENT;
CPU.NextEvent = Timings.WRAMRefreshPos;
break;

View File

@ -272,11 +272,11 @@
#define SNES_WRAM_REFRESH_HC_v2 538
#define SNES_WRAM_REFRESH_CYCLES 40
#define SNES_HBLANK_START_HC 1096 // H=274
#define SNES_HDMA_START_HC 1106 // FIXME: not true
#define SNES_HBLANK_END_HC 4 // H=1
#define SNES_HDMA_INIT_HC 20 // FIXME: not true
#define SNES_RENDER_START_HC (48 * ONE_DOT_CYCLE) // FIXME: Snes9x renders a line at a time.
#define SNES_HBLANK_START_HC 1096 // H=274
#define SNES_HDMA_START_HC 1106 // FIXME: not true
#define SNES_HBLANK_END_HC 4 // H=1
#define SNES_HDMA_INIT_HC 20 // FIXME: not true
#define SNES_RENDER_START_HC 1096 // FIXME: Snes9x renders a line at a time.
#define SNES_TR_MASK (1 << 4)
#define SNES_TL_MASK (1 << 5)