Open skierpage opened 2 years ago
PCSX2 only needs to see the main BIN/ROM0 file, the others are generally unimportant unless you're in China, but yeah it should be detecting them.
It would work on Windows as the paths are case insensitive. The "simple" solution would to rename the files and make the extensions lowercase. As far as I can tell, even going back a few versions, PCSX2 has searched for lowercase extension ROM files.
It would work on Windows as the paths are case insensitive. The "simple" solution would to rename the files and make the extensions lowercase.
Should https://pcsx2.net/guides/basic-setup/#dumping-the-bios mention this? (BTW, I have a pull request improving the guide.) An alternative is to change PCSX2 code to use uppercase extensions in
// This function does not fail if rom1, rom2, or erom files are missing, since none are
// explicitly required for most emulation tasks.
...
LoadExtraRom("rom1", eeMem->ROM1);
LoadExtraRom("rom2", eeMem->ROM2);
LoadExtraRom("erom", eeMem->EROM);
...
std::string mecfile(FileSystem::ReplaceExtension(BiosPath, "mec"));
std::string nvmfile(FileSystem::ReplaceExtension(BiosPath, "nvm"));
As far as I can tell, even going back a few versions, PCSX2 has searched for lowercase extension ROM files. ... PCSX2 only needs to see the main BIN/ROM0 file
I think the main .BIN
file loads because FindBiosImage()
looks at every file in EmuFolders::Bios
regardless of extension to find one that looks like it holds the main BIOS.
BTW, when SSX on Tour appeared in a window with sound, I jumped up and down :joy:. Thanks for your work!
An alternative is to change PCSX2 code to use uppercase extensions in
That would break everyone's existing setups on Linux/Mac which are using the lowercase extensions (which was the case, going back at very least a few stable releases).
IMO, the least risky solution is to add a rename step in the guide.
Feels weird, considering PS2 uses UDF for discs, and they're all upper-case named. Might should've been upper from the start for a sense of continuity? I dunno, chiming in.
considering PS2 uses UDF for discs,
Most if not all use ISO9660. I'm not sure if the firmware/BIOS is even able to speak UDF, I've never checked.
considering PS2 uses UDF for discs,
Most if not all use ISO9660. I'm not sure if the firmware/BIOS is even able to speak UDF, I've never checked.
? For the PS2 DVDs even? Could have sworn it was ISO+UDF/UDF.
why are you opening the NVM as read only? it can be modified at any time by the BIOS (if the user changes any options). Unless I've misunderstood what's going on here.
For the same reason it is opened read-only now : https://github.com/PCSX2/pcsx2/blob/aae53fb9da136f372a5fb0526950538374fdfde0/pcsx2/CDVD/CDVD.cpp#L193
fair enough, the diff was just confusing, looked like you'd changed it.
I wonder if a general "open case insensitive" routine would be better. i.e. if the open fails, read the directory, and look for any matches without case sensitivity. Because otherwise e.g. .Mec / .Nvm
still wouldn't work on unix, but would be fine on Windows.
The bios dumpers usually write all uppercase or all lowercase file extensions. Other combinations are less likely to be encountered. Another issue is to decide which file to use when multiple files are present : .nvm
, .Nvm
or .NVM
. Ideally is to have the user decide, but would be too much headache for nothing.
If you somehow had multiple variants of extension case, I think you probably have greater problems :)
I haven't the slightest idea why I can't reproduce this, but link suggested I try: I've capitalized the file extensions, and the line Failed to open NVM file '/path/to/blahblahblah.nvm' for writing
or anything similar doesn't appear anywhere in the Zsh log or in the emulog window. Instead, the .NVM file remains, and when the game is booted (trying SSX On Tour as well), a .nvm file is simply created as well.
For the sake of resolving this to 'almost all scenarios' I'd suggest checking for all upper and using that, then lower and using that (or whatever order preferred). I'd say almost all cases would be one or the other. In a filepicker I'd add both as possible sources, just to ease any issue.
Describe the Bug
I followed the PCSX2 Getting Started instructions to dump my PS2 BIOS files which created the files `SCPH-70012_BIOS_V12_USA_200.{BIN,EROM,NVM,ROM1,ROM2}. I ran the PCSX2 flatpak and pointed it at the BIOS files and chose my machine BIOS, then opened my game ISO (SSX on Tour)
But
~/.var/app/net.pcsx2.PCSX2/config/PCSX2/logs/emuLog.txt
containsNote the program is trying to open files with lowercase extensions (
.nvm
), but the dumped files have uppercase extensions (.NVM
). I ran strace on the flatpak and confirmed it is attempting e.g.However, SSX on Tour starts up and runs! I don't see how PCSX2 can work when it indicates it can't read these files :confused:
Reproduction Steps
emuLog.txt
file.Expected Behavior
Maybe the instructions should tell the user to rename the dumped BIOS files to have lowercase extensions.
PCSX2 Revision
PCSX2 Nightly - v1.7.2648 Compiled on Apr 24 2022
Operating System
Linux (64bit) - Specify Distro Below
If Linux - Specify Distro
Fedora (running Flatpak)