pub fn install_vblank_counter()Expand description
Install and enable the VBlank counter interrupt path.
This writes a branch into the MIPS general exception vector,
enables the VBlank source in I_MASK, and sets the COP0 interrupt
enable bits used by the R3000A. The operation is idempotent for
the current runtime: reinstalling simply resets the software
counter and refreshes the vector.
The handler owns VBlank only. Another source enabled in I_MASK that
fires while no VBlank is pending is acknowledged and counted
(stray_interrupt_count) rather than re-entering forever, so a source a
game needs must be serviced by the game’s own handler ahead of this one
(which then chains here), not left to this handler.