OXYGENHUB

The RRDC control port, with contract 0.6's performance metrics (GET/POST /perf) issue #1 closed: completed andymccall opened this · 0 comments

issue #1 closed ← closed by proposal #2 The RRDC control port, with contract 0.6's performance metrics (GET/POST /perf) (#1) landed

andymccall

Ask: the RRDC control port (-controlport), serving contract 0.6's performance metrics from the measurements the Performance panel and DAP's x16/perfStats already make. A test harness can then read them the way it reads memory and steps frames, and Metal Gear's harness can run on this emulator.

  • The port: RRDC's core, vendored as an oxy submodule (src/extern/retro-remote-debug-controller), and a backend mapping it onto the machine, ported from the plain fork's: memory, registers, the screen, stepping, keys, reset, audio, the pointer and pads. Pads go through this emulator's own virtual joysticks.
  • GET and POST /perf, built from the same JSON builders as x16/perfStats (moved into perf_json.c), plus:
    • per-window zone statistics (not just 30 s);
    • raw frames since= a frame;
    • each scanline's bus clocks;
    • the sprite renderer's time, not exposed remotely before.
  • A guest marker region can be named before the guest enters it.

Found with Metal Gear's markers, which measuring a real game turned up:

  • A region open at the frame boundary was closed there. A game's frame starts where it waits, so its work runs across the boundary, and the phase running there lost the rest of its cycles: Metal Gear's "common" read 2.8 scanlines against a true 4.3.
  • In marker mode, an interrupt handler running after $F1 counted as idle. The docs already say interrupt cycles are never idle.

andymccall referenced by change 2980b7b6d7cd on rrdc-perf ·

andymccall assigned andymccall ·

andymccall closed ·