From 7caef77459e4e3c65640594cda99327fb6f07860 Mon Sep 17 00:00:00 2001 From: Matthew Stanley <1379tech@gmail.com> Date: Sat, 26 Sep 2026 15:39:51 -0700 Subject: [PATCH] debug_server: report the live video standard and frame timing in vblank_rate Co-Authored-By: Claude Opus 5.5 (1M context) --- runtime/src/debug_server.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/runtime/src/debug_server.c b/runtime/src/debug_server.c index 48dc5c98..7db1203d 100644 --- a/runtime/src/debug_server.c +++ b/runtime/src/debug_server.c @@ -17,6 +17,7 @@ #endif #include #include "debug_server.h" +#include "psx_video_timing.h" #include "psx_bss.h" #include "nd_intro_ot.h" #include "latency_ring.h" @@ -5553,12 +5554,19 @@ static void handle_vblank_rate(int id, const char *json) "\"cycle_paced_raise\":%llu," "\"delivered\":%llu," "\"pollhack_raise\":%llu," - "\"doff_min\":%d,\"doff_max\":%d,\"doff_cnt\":%u}", + "\"doff_min\":%d,\"doff_max\":%d,\"doff_cnt\":%u," + "\"video_standard\":\"%s\",\"vblank_cycles\":%u," + "\"hblank_cycles\":%u,\"lines_per_frame\":%u," + "\"video_standard_changes\":%u}", id, (unsigned long long)g_vblank_raise_count, (unsigned long long)g_vblank_deliver_count, (unsigned long long)g_pollhack_vblank_count, - g_doff_min_last, g_doff_max_last, g_doff_cnt_last); + g_doff_min_last, g_doff_max_last, g_doff_cnt_last, + psx_video_timing_is_pal() ? "PAL" : "NTSC", + (unsigned)g_psx_vblank_cycles, (unsigned)g_psx_hblank_cycles, + (unsigned)g_psx_lines_per_frame, + (unsigned)psx_video_timing_generation()); } static void handle_timers_state(int id, const char *json)