- // Schedule next call, in hsyncs
- hsync_steps = HSyncTotal[Config.PsxType] - hSyncCount;
- next_vsync = VBlankStart - hSyncCount; // ok to overflow
- if( next_vsync && next_vsync < hsync_steps )
- hsync_steps = next_vsync;
-
- rcnts[3].cycleStart = cycle - leftover_cycles;
- if (Config.PsxType)
- // 20.12 precision, clk / 50 / 313 ~= 2164.14
- base_cycle += hsync_steps * 8864320;
- else
- // clk / 60 / 263 ~= 2146.31
- base_cycle += hsync_steps * 8791293;
- rcnts[3].cycle = base_cycle >> 12;
- base_cycle &= 0xfff;