mirror of
https://github.com/libretro/parallel-dc.git
synced 2026-11-10 17:26:21 -10:00
retro_get_system_av_info bucketed timing.fps to 60.00 (VGA) / 59.94 (NTSC) / 50.00 (PAL) from a pixel-clock table whose constants didn't even reconcile with those figures, and the VGA case was wrong: Dreamcast VGA runs at 59.94, not 60 (27MHz / (858*525) = 59.9401). It also missed that 240p NTSC is ~59.83, not 59.94, and NAOMI boards run faster still. The scheduler already computes the exact frame period in CalculateSync from the SPG registers the game programs (Line_Cycles * pvr_numscanlines). Expose it as spg_get_refresh_rate() -- pixel_clock / ((hcount+1) * (vcount+1)) -- and report that. timing.fps now equals the rate frames and audio are actually produced at, per mode and per game: 59.94 for VGA/480i, ~59.83 for 240p NTSC, 50.00 for PAL 480i, ~49.92 for PAL 240p, and the correct higher rates for NAOMI. Matches the hardware-derived values confirmed upstream (flyinghead/flycast PR #2033) and keeps frontend frame pacing in step with the core, pairing with the per-frame audio flush. Falls back to 60 before CalculateSync has run.
core
All of the interesting bits are here