mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 18:25:35 -04:00
7c99a88565
The runtime mounts one disc image at startup. No code path changes the mounted image after that. Some multi-disc games prompt for a disc change during play and then poll the drive. That poll never succeeds. The CD-reinsert path reopens the same image path, so it cannot mount the other disc. cdrom_disc_select() closes the current image and opens another roster entry, inside the existing lid window. cdrom_lid_media_ready() returns 0 for the whole window, so the guest cannot read the image until the window ends. The existing timed close then ends the window. cdrom_init() is not called. It also resets warm-route, trace and timing state, which would discard a running session. cdrom_disc_select() resets the sector buffers, the seek position, and the warm-route arming. Registered warm routes are configuration and are not reset. begin_tray_open_cycle() now holds the tray-open code, moved out of debug_force_cd_reinsert(). Both paths call it. Add a disc_select debug command. It returns the roster and mounts entry n when n is given. It also returns the sector count and track count of the mounted image, which confirms that the reader opened another image. Tested on Ace Combat 3: Electrosphere (SLPS-02020 / SLPS-02021). Boot disc 2 with no disc-2 save. The game prompts for disc 1. At that prompt the CD read count is static at 2955 and frames run at 60.5 Hz, so the drive is idle. disc_select n=1 mounts disc 1. The game resumes and plays its first cutscene. Reads restart within two seconds and pass 19971. The read addresses change to disc-1 values. The frame rate does not drop. Co-Authored-By: Claude <noreply@anthropic.com>