euan
Deep Blooper
Posts: 6
|
Post by euan on Jul 20, 2021 1:23:24 GMT
Hello, I'm working on a website that converts save files between different game console formats (check it out here: savefileconverter.com)
I'm currently working on converting Wii Virtual Console files, and I'm stuck on the PC Engine files specifically (Genesis, NES, SNES, etc files I can correctly convert). I can open and decrypt the Wii save file fine, but inside it contains a file called "pcengine.bup" which is in a format that I don't recognize. It looks different than the save files I create for the same game using an emulator.
I did a bit of googling, and it seems that .bup files can contain several save files in one. To me, the file looks encrypted or compressed and I'm not sure where to begin parsing it into something that can be loaded by an emulator.
Does anyone have any information about this format, or can anyone point me in the right direction? Or maybe are there emulators that can load these files? So far I haven't been able to turn up very much with googling.
Thank you very much!
|
|
|
Post by dshadoff on Jul 20, 2021 1:38:17 GMT
I think TerraOnion uses a format with a ".bup" suffix, but I can't say whether it's compatible. Do you have an example file ?
|
|
euan
Deep Blooper
Posts: 6
|
Post by euan on Jul 20, 2021 3:24:41 GMT
Yeah I saw their docs that mention it, but no info on the actual format that I can find. I don't think I can attach a file here? But in my first message there's a couple links that can let you recreate the file.
|
|
euan
Deep Blooper
Posts: 6
|
Post by euan on Aug 12, 2021 19:38:08 GMT
In case anyone else ever happens across this from Googling or whatever, github.com/JanErikGunnar has reverse engineered this format and an implementation can be found at github.com/euan-forrester/save-file-converter/blob/main/frontend/src/save-formats/Wii/ConvertFromPcEngine.jsThe basic idea is to ignore the 16 byte header and footer, then work in blocks of 4 bytes and xor each block with bitwise-not the block before it. For the first block, there's a seed in the header. The file may need to be truncated and a pointer it contains would then need to be fixed up. More details are in the implementation. It's a strange, seemingly purposefully-obfuscated format and Jan did great work figuring it out!
But now you can convert Wii VC console saves found around the Internet into files usable by a PC Engine emulator (or real hardware if you can write them!): savefileconverter.com/#/wii
|
|
|
Post by dshadoff on Aug 12, 2021 21:18:39 GMT
Wow, this is really interesting. Good work figuring this out !
|
|
euan
Deep Blooper
Posts: 6
|
Post by euan on Aug 13, 2021 4:54:36 GMT
Yeah it was impressive work on his part, and it was fun working with him on it
|
|
|
Post by dshadoff on Aug 15, 2021 4:40:35 GMT
As a follow-up, while TerraOnion uses a save file with a naming convention of ".bup" (on their SSDS3 and SHDS3 Pro devices), it is simply an unencoded save file (usually ".sav" elsewhere), and is not related to the .bup files related to Virtual Console .bup files.
|
|
euan
Deep Blooper
Posts: 6
|
Post by euan on Aug 15, 2021 16:02:08 GMT
Ah cool -- that makes a lot of sense. Thanks for figuring that out!
|
|