mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
9179c1ad5d
debug_server_record_frame (every vblank) and the sio_state handler read SIO_STAT/CTRL/RX via the GUEST-BUS sio_read(), which has hardware side-effects: sio_tick(0) advances the delayed-IRQ state machine, reading SIO_STAT decrements sio_ack_visible_reads and clears the ACK bit, reading SIO_RX_DATA pops the RX FIFO. So the observer silently mutated the SIO/pad handshake every frame in dev builds (the cardinal observability-alters-state violation the event_ring header itself warns against). Add side-effect-free sio_peek_stat/ctrl/rx_data() and use them on the debug path; the guest bus keeps sio_read() with its real side effects. Also add an fmv_state TCP command reporting the resolved config path + auto_skip_fmv + frame-count-table params + live MDEC/XA/pad state, so the FMV-skip + config state can be observed rather than inferred. Note: this removes a real per-vblank SIO perturbation but is NOT the full fix for the dev-build FMV-skip divergence (residual is the cycle-timing-core class; see precise_irq_slice_state). It is correct observability hygiene. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>