libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
309 stars 131 forks source link

Disc change does not work directly for Valkyrie Profile (if pause content is enabled?) #694

Open whocares0101 opened 4 years ago

whocares0101 commented 4 years ago

Disc change does not work directly for Valkyrie Profile (if pause content is enabled?) It will only work if I eject the disc, resume, and then insert the next disc otherwise it will only stay at the insert disc screen.

This should be easy to fix just make sure the game actually sees that there is no disc and only then insert the next disc.

i30817 commented 4 years ago

This is a known issue and you're right it's pretty annoying. I opened a bug for it on the main retroarch bug listing

https://github.com/libretro/RetroArch/issues/10728

The reason it happens is because it's easier for the hardware engineers to figure out that a disc was reinserted mechanically than have to interface with software that is polling for the new disc to check (push not pull), so they need to figure out that the disc slot opened, that a new disc was inserted, and the slot closed back again before delivering the interrupt event to the software, which requires that some time has passed in emulation for the emulated drive to figure out it needs to send events. If it's paused it's probably like the disc 'teleported' outside and was replaced by the 'disc tray closed' interrupt event probably overrides the 'disc tray opened' event or vice-versa.

It should be solvable by placing some 'running frames' in the finalization of the load process where all the steps of a disc change would be done all at once in a small amount of frames, when the user confirmed the change, with some experimentation of how many frames are needed for each emulator (maybe a new part of a libretro interface too, for the different number of frames needed, assuming a sensible default can't be found).