[X] I have checked existing issues for duplicates and found none
Describe the issue
Commit 0156510d00858f784322248cf90f3aaf863240f4 which introduced 64-bit size support breaks PS2Disk. The issue manifests as wLaunchELF giving the error PS2Disk => Failed CDVD 0x14. The "problem" seems to lie in the genLseek used by preloadCNF. when preloadCNF tries to guess the media type by looking for a proper SYSTEM.CNF it first tries to open it with genOpen which succeeds, and then it tries to get its file size using genLseek which returns -1 (actually it returns 4294967295 as the value is not cast to an int). The commit updated the genLseek function to use lseek64 which at least in this in this specific instance returns -1. Reverting back (as a test) to lseek, the correct SYSTEM.CNF size is returned and the game boots correctly.
It is reasonable to assume that the change may affect other use cases and break other functions.
Checks
Describe the issue
Commit 0156510d00858f784322248cf90f3aaf863240f4 which introduced 64-bit size support breaks PS2Disk. The issue manifests as wLaunchELF giving the error
PS2Disk => Failed CDVD 0x14
. The "problem" seems to lie in thegenLseek
used bypreloadCNF
. whenpreloadCNF
tries to guess the media type by looking for a properSYSTEM.CNF
it first tries to open it withgenOpen
which succeeds, and then it tries to get its file size usinggenLseek
which returns -1 (actually it returns4294967295
as the value is not cast to an int). The commit updated thegenLseek
function to uselseek64
which at least in this in this specific instance returns-1
. Reverting back (as a test) tolseek
, the correctSYSTEM.CNF
size is returned and the game boots correctly. It is reasonable to assume that the change may affect other use cases and break other functions.Console model
PCSX2 and SCPH90004