as for DQ samples
some songs are silent.
opus5 said
A bug in aosdk that I faithfully reproduced. In psx_bios_hle, DeliverEvent (B0 0x07) leaves the function with a bare return when the target event isn't active:
if (Event[ev][spec].status != LE32(EvStACTIVE))
{
printf("event not active\n");
return; /* skips the "PC = RA" every other path falls through to */
}
That leaves the pc sitting on the HLECALL instruction that got us there, so the next step runs the same call again — for ever. The sound driver never advances, no voice is ever keyed, and the output is silence.
The probe made it obvious. In a track that works, the CPU idles in the driver's main loop; in a silent one it never leaves the kernel vector:
916 (plays) peak=9500 pc 800f01a4 ×1306 pc 800f01a8 ×461
917 (silent) peak=0 pc 000000b0 ×1950 ← t1=0x07, a0=0xf0000009
PsxHw now breaks instead, falling through to PC = RA like every other call.
- return;
+ // Nothing to deliver, but the call still has to return: aosdk leaves the
+ // function here instead, which skips the "PC = RA" at the bottom and leaves
+ // the pc on the HLECALL that got us here, so the next step runs the same
+ // call again and the song spins at 0xb0 for ever. Fourteen of the forty six
+ // tracks of Dragon Quest Monsters 1+2 are silent in aosdk for this reason.
+ break;
as for DQ samples
some songs are silent.
opus5 said
A bug in aosdk that I faithfully reproduced. In
psx_bios_hle,DeliverEvent(B00x07) leaves the function with a barereturnwhen the target event isn't active:That leaves the pc sitting on the
HLECALLinstruction that got us there, so the next step runs the same call again — for ever. The sound driver never advances, no voice is ever keyed, and the output is silence.The probe made it obvious. In a track that works, the CPU idles in the driver's main loop; in a silent one it never leaves the kernel vector:
PsxHwnowbreaks instead, falling through toPC = RAlike every other call.