Closed 0xJes closed 6 years ago
What ROM are you trying to load? try using a decrypted NDS ROM and maybe one that's pretty common as well. 'btafb' is the buffer of the BTAF file; aka the files in the buffer. This means that it should indeed match btaf.files * 8; since 8 bytes are noted per file in the FAT.
I'm using Pokémon Platinum, i tried other 2 decrypted roms with several narc files and all fails the same way.
Strange, what's the origin of the ROM? The US, the EU? Because both of those work for me. Could you send me the values of the NARC; including the size of the binary data?
EDIT: Qt works on Linux right? So you could try to build NFSU (requires building Qt for Linux first) and then open the ROM with that.
I tried with two releases, EUR and ESP, however, both narcs are identical.
It seems like you are right, it is checking against the incorrect size, I'll check how I can fix that.
It should be fixed in the new push; check if that works. I did test it on MSVC and the file you tried also worked for me. Be aware that not all file formats can be recognized and that means that some files might be called "32.????". A NARC doesn't provide any names and or extensions, so it is impossible to find the meaning of every file with just that format.
This is the code:
For some reason i can't step into
nfs::Archive arc(narc);
to see what exactly happens, but looks likebtafb.size != btaf.files * 8
in archive.cpp evaluates to true and throwsEXCEPTION("Archive BTAF didn't match format");
.I checked for these values in the main function:
Looks like you want to check if the FAT size correspond to the number of files but
buffer.size
only holds the properties of the FAT, not the FAT itself.