Lameguy64 / PSn00bSDK

The most powerful open source SDK for the PS1 (as far as open source PS1 SDKs go). Not recommended for beginner use.
Other
819 stars 66 forks source link

CDXA example locks on loop #50

Open matt456 opened 2 years ago

matt456 commented 2 years ago

The CDXA example locks on looping, it detects the video termination sector, then just locks in the CdControlF(CdlReadS, (u_char*)&xa_loc); call.

Looks like it gets stuck here inside _cd_control.s: https://github.com/Lameguy64/PSn00bSDK/blob/a8b404b3400c3ebd8e0b923dcaefcc49ea563e36/libpsn00b/psxcd/_cd_control.s#L89

I'm not too familar with the inner CD logic at this point to delve further.

This is a sample I created, first 5 channels have the same track (37800Hz stereo) interleaved in it the last 3 are blank. xasample.zip

spicyjpeg commented 2 years ago

Are you having this issue on real hardware or on an emulator? I tested the example on three different emulators (DuckStation, no$psx, pcsx-redux) using your XA file and it seems to work fine on all three, albeit with some minor glitching on pcsx-redux. If you are using another emulator you might be running into bugs, as most older emulators (ePSXe in particular) are notorious for their inaccuracy.

However, if you are experiencing this issue on real hardware I can investigate further, since I'm not sure about whether the XA example has ever been tested on an actual PS1.