+
+ // Schedule next call, in hsyncs
+ hsync_steps = SpuUpdInterval[Config.PsxType] - spuSyncCount;
+ next_vsync = VBlankStart[Config.PsxType] - hSyncCount; // ok to overflow
+ next_lace = HSyncTotal[Config.PsxType] - hSyncCount;
+ if( next_vsync && next_vsync < hsync_steps )
+ hsync_steps = next_vsync;
+ if( next_lace && next_lace < hsync_steps )
+ hsync_steps = next_lace;
+ if( gpu_wants_hcnt )
+ hsync_steps = 1;
+
+ rcnts[3].cycleStart = cycle - leftover_cycles;
+ rcnts[3].cycle = hsync_steps * rcnts[3].target;
+ psxRcntSet();