"Vagrant Story" not working after rebuild
Closed this issue · 13 comments
Hi all,
I dump all the files and rebuild them without altering anything, and the resulting ISO file is not correct as I can only see the first "LOADING..." image, but nothing else. Suggestions?
Thank you and regards.
The game probably uses a custom, internal table with all file's LBA (addresses). If mkpsxiso does not reorganize the files in the image in the exact same order the original game did, the table needs to be modified to point to the new addresses for each file.
The game probably uses a custom, internal table with all file's LBA (addresses). If mkpsxiso does not reorganize the files in the image in the exact same order the original game did, the table needs to be modified to point to the new addresses for each file.
This is the game's LBA I think:
https://datacrystal.romhacking.net/wiki/Vagrant_Story/SLUS_LBA_List
What can I do with it?
When regenerating the iso with mkpsxiso you should ask mkpsxiso to also output the list of LBAs of all files it added to the iso. Then, you should replace the old LBAs where they are stored in the games files with the new ones, and rebuild again the iso.
I think mkpsxiso has an option to only "virtually" build the iso at the first step, so you can get the LBAs without actually generating the iso yet.
When regenerating the iso with mkpsxiso you should ask mkpsxiso to also output the list of LBAs of all files it added to the iso. Then, you should replace the old LBAs where they are stored in the games files with the new ones, and rebuild again the iso. I think mkpsxiso has an option to only "virtually" build the iso at the first step, so you can get the LBAs without actually generating the iso yet.
Unfortunately the LBA output is just a FYI dump (I think), not a usable file within the mkpsxiso ecosystem. Am I right?
mkpsxiso has the -lba option that makes it output the list of all LBAs in a text file. Then, it is up to you to use that file to modify the LBA list in the game's file. For this you would need to implement your own program that parses the LBA file given by mkpsxiso and automatically changes the LBA values in all game files where needed.
mkpsxiso has the -lba option that makes it output the list of all LBAs in a text file. Then, it is up to you to use that file to modify the LBA list in the game's file. For this you would need to implement your own program that parses the LBA file given by mkpsxiso and automatically changes the LBA values in all game files where needed.
Ahhh ok, too much work to be done, I think I'll pass LOL.
This game has no issues with LBA.
Recently I pushed a PR with lots of fixes that is waiting for approval. In the meantime, you can download a precompiled version of it from my repo. Go to the Actions tab and download it from there, then check if it works.
If that doesn't work, it might be because this game uses a non-standart (0x01 and 0x03) file flags, instead of 0x00 and 0x02.
In that case, you will need to change line 470 in iso.cpp with the following and then compile it.
if (entry.lba == 22 && entry.id.empty()) {
dirEntry->flags = 0x02;
}
else if ( entry.type == EntryType::EntryDir )
{
dirEntry->flags = 0x03;
}
else
{
dirEntry->flags = 0x01;
}
This game has no issues with LBA.
Recently I pushed a PR with lots of fixes that is waiting for approval. In the meantime, you can download a precompiled version of it from my repo. Go to the Actions tab and download it from there, then check if it works.
If that doesn't work, it might be because this game uses a non-standart (0x01 and 0x03) file flags, instead of 0x00 and 0x02. In that case, you will need to change line 470 in iso.cpp with the following and then compile it.
if (entry.lba == 22 && entry.id.empty()) { dirEntry->flags = 0x02; } else if ( entry.type == EntryType::EntryDir ) { dirEntry->flags = 0x03; } else { dirEntry->flags = 0x01; }
Yep I think it worked, many thanks!
Regards
This game has no issues with LBA.
Recently I pushed a PR with lots of fixes that is waiting for approval. In the meantime, you can download a precompiled version of it from my repo. Go to the Actions tab and download it from there, then check if it works.
If that doesn't work, it might be because this game uses a non-standart (0x01 and 0x03) file flags, instead of 0x00 and 0x02. In that case, you will need to change line 470 in iso.cpp with the following and then compile it.
if (entry.lba == 22 && entry.id.empty()) { dirEntry->flags = 0x02; } else if ( entry.type == EntryType::EntryDir ) { dirEntry->flags = 0x03; } else { dirEntry->flags = 0x01; }
The game has issues with LBAs. They might not appear when rebuilding the bin with the original game files, but as soon as some file is modified and it changes in size, when you rebuild the bin, the game will simply not work, no matter how many bugfixes you apply to mkpsxiso.
This game has no issues with LBA.
Recently I pushed a PR with lots of fixes that is waiting for approval. In the meantime, you can download a precompiled version of it from my repo. Go to the Actions tab and download it from there, then check if it works.
If that doesn't work, it might be because this game uses a non-standart (0x01 and 0x03) file flags, instead of 0x00 and 0x02. In that case, you will need to change line 470 in iso.cpp with the following and then compile it.
if (entry.lba == 22 && entry.id.empty()) { dirEntry->flags = 0x02; } else if ( entry.type == EntryType::EntryDir ) { dirEntry->flags = 0x03; } else { dirEntry->flags = 0x01; }The game has issues with LBAs. They might not appear when rebuilding the bin with the original game files, but as soon as some file is modified and it changes in size, when you rebuild the bin, the game will simply not work, no matter how many bugfixes you apply to mkpsxiso.
The majority of the files I want to modify (fan translation) are aligned to 0x800 bytes, so even if I change sizes, we have still margin:
https://datacrystal.romhacking.net/wiki/Vagrant_Story/SLUS_LBA_List
As far as they have enough padding inside the sector boundary of course! Hopefully you will not need to expand the files.
The game has issues with LBAs. They might not appear when rebuilding the bin with the original game files, but as soon as some file is modified and it changes in size, when you rebuild the bin, the game will simply not work, no matter how many bugfixes you apply to mkpsxiso.
Yes, my bad, I misspoke. Actually I didn't mean that this game doesn't check files through LBA, I meant that the issue the OP was facing was not related to the game's LBA itself (like having a strange LBA order that mkpsxiso can't replicate) but to mkpsxiso. That's why even when using the original files, the game got stuck.
if you need exact lba, you can specify it yourself or use the -pt option when dumping (with variable results)