umd0 solution: Add "OnlyEntireISOFileSystem"

Wraps around an ISOFileSystem, redirecting all the filenames to "" to
achieve the desired effect (should fix Bleach Soul Carnival 2 without resorting
to CPkmn's hack from #6638)

Probably breaks savestates as-is...
This commit is contained in:
Henrik Rydgard 2014-07-27 23:42:46 +02:00
parent 82421f4dcf
commit 8146ff85f3
3 changed files with 89 additions and 33 deletions

View file

@ -60,6 +60,7 @@ void InitMemoryForGameISO(std::string fileToStart) {
FileInfo info;
if (!getFileInfo(fileToStart.c_str(), &info)) return;
bool actualIso = false;
if (info.isDirectory)
{
umd2 = new VirtualDiscFileSystem(&pspFileSystem, fileToStart);
@ -71,15 +72,24 @@ void InitMemoryForGameISO(std::string fileToStart) {
if (!bd)
return;
umd2 = new ISOFileSystem(&pspFileSystem, bd);
actualIso = true;
}
// Parse PARAM.SFO
//pspFileSystem.Mount("host0:",umd2);
pspFileSystem.Mount("umd0:", umd2);
pspFileSystem.Mount("umd1:", umd2);
IFileSystem *entireIso = 0;
if (actualIso) {
entireIso = new OnlyEntireISOFileSystem(static_cast<ISOFileSystem *>(umd2));
} else {
entireIso = umd2;
}
pspFileSystem.Mount("umd0:", entireIso);
pspFileSystem.Mount("umd1:", entireIso);
pspFileSystem.Mount("disc0:", umd2);
pspFileSystem.Mount("umd:", umd2);
pspFileSystem.Mount("umd:", entireIso);
std::string gameID;