libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.77k stars 1.77k forks source link

Unable to scan early PSX games #14192

Open kikmon opened 1 year ago

kikmon commented 1 year ago

Hi

When scanning a folder on PSX games (redump cue+bin) several games failed being scanned properly, mostly the very early PSX Games that didn't have the serial in the game data itself. Example with Ridge Racer (Japan)

So Retroarch properly finds the 'Magic Numbers' in the data track, and knows it's dealing with a PS1 game. But since the serial can't be found, it decides to report it found a fake serial 'XXXXXXXXXX' (in \tasks\task_database_cue.c(280)) I've modified this function to actually return false at the end, and RetroArch then naturally used the crc fallback and my games were properly identified.

What is the reason for returning this fake 'XXXXXXXXXX' serial ? Can't we just change the function to return a real failure so retroarch know the serial could not be extracted ?

Expected behavior

We can scan Ridge Racer (Japan) with the folder scanner (other games also have this issue)

Actual behavior

RetroArch detects the game is ps1, but can't extract the serial, so it's returning a fake 'XXXXXXXXXX' serial, which can't be looked up in the database.

Steps to reproduce the bug

  1. Get a clean Redump rip of Ridge Racer (Japan) and place it in a folder.
  2. In retroarch, use the Scanner to analyze this folder

Environment information

kikmon commented 1 year ago

Several changes were made in RA scan logic and more PS1 can be scanned now. Scan speed can be improved a bit for games like 'Macross Digital Mission VF-X (Japan) (Rev 1)' that seem to have the 'PLAYSTATION' string located at a different location than what RA is expecting.

Remaining issues are mostly related to the rdb themselves:

Getting closer to 100% scan :)