Files
psxrecomp/runtime
Matthew Stanley c586badcb4 cdrom: implement CD command 0x07 (MotorOn)
Sibling gap to the 0x08 (Stop) fix: cmd 0x07 (MotorOn) also had no case
in the CDROM command switch and fell through to default -> CDIRQ_ERROR
(INT5) with no error code. A game that spins the motor up (e.g. after a
Stop) and waits for the MotorOn completion IRQ would never see it.

Model MotorOn faithfully per psx-spx "07h MotorOn": INT3 (ACK) now with
the current status, then a pending INT2 (COMPLETE) after spin-up with the
motor bit set. If the motor is already spinning the hardware rejects it
with INT5 (ERROR) + error code 0x20 — replicated. Matching case added in
process_pending, mirroring the Stop completion.

Cross-title safe: strictly additive — every game previously got a bare
INT5 for MotorOn; the success path now completes correctly and the
already-on rejection now carries the documented error code. Tsumu itself
does not issue MotorOn (verified: still progresses past the Stop wedge,
gp0_draw climbing), so this is reasoned from psx-spx + the Stop handler,
not visually exercised.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 10:46:23 -07:00
..