Expand description
Guest-side telemetry event emitters (Expansion 2 MMIO ports).
Every game carried a hand-copied shim of these writes (voxide and hl-psx
byte-identical, oot-psx a subset); this module is that shim, once. The
MMIO writes compile only with the crate’s emit feature AND a MIPS
target; games forward their own flag
(emulator-telemetry = ["psx-telemetry/emit"]) so shipping builds pay
only empty inlined calls.
Ports (decoded by emulator-core, addresses in psx_hw::memory::expansion2::telemetry):
the event word (kind << 24 | id), the value latch (written before the
event that consumes it) and the debug-log byte stream.
console is deliberately NOT feature-gated (mips-gated only): it is the
Play debug terminal used from normal builds. Use sparingly.
Functions§
- console
- Write a line to the emulator’s guest debug-log port UNCONDITIONALLY (mips-gated, not feature-gated), so it reaches PSoXide’s Play debug terminal from a normal build. Use sparingly (debug tooling only).
- counter
- Record
valueunder a counter id (seecrate::counter). - cycles
- Emulator cycle counter, wrapping at 32 bits. Returns zero on host builds
and when the
emitfeature is disabled, without touching telemetry MMIO. - debug_
log - Write a line to the emulator debug log, telemetry builds only.
- frame_
begin - Mark the start of guest frame
frame(drives--guest-framesstops). - stage_
begin - Enter a profiling stage (see
crate::stagefor ids). - stage_
end - Leave a profiling stage.
- task_
begin - Enter a background-task span (see
crate::task). - task_
end - Leave a background-task span.