Fix detection of some CDs such as Wild Arms USA detected as a PAL game. (#222)
authorgameblabla <gameblabla@users.noreply.github.com>
Sat, 2 Oct 2021 13:23:27 +0000 (13:23 +0000)
committerGitHub <noreply@github.com>
Sat, 2 Oct 2021 13:23:27 +0000 (16:23 +0300)
I was able to confirm it fixed the issue for Wild Arms.

Co-authored-by: bardeci <37640967+bardeci@users.noreply.github.com>
libpcsxcore/misc.c

index 213040c..1b38e28 100644 (file)
@@ -379,7 +379,13 @@ int CheckCdrom() {
                strcpy(CdromId, "SLUS99999");
 
        if (Config.PsxAuto) { // autodetect system (pal or ntsc)
-               if (CdromId[2] == 'e' || CdromId[2] == 'E')
+               if (
+                       /* Make sure Wild Arms SCUS-94608 is not detected as a PAL game. */
+                       ((CdromId[0] == 's' || CdromId[0] == 'S') && (CdromId[2] == 'e' || CdromId[2] == 'E')) ||
+                       !strncmp(CdromId, "DTLS3035", 8) ||
+                       !strncmp(CdromId, "PBPX95001", 9) || // according to redump.org, these PAL
+                       !strncmp(CdromId, "PBPX95007", 9) || // discs have a non-standard ID;
+                       !strncmp(CdromId, "PBPX95008", 9))   // add more serials if they are discovered.
                        Config.PsxType = PSX_TYPE_PAL; // pal
                else Config.PsxType = PSX_TYPE_NTSC; // ntsc
        }