ROM Hack Xenoblade Chronicles 3D Save Compression

  • Thread starter Thread starter moosehunter
  • Start date Start date
  • Views Views 4,521
  • Replies Replies 9

moosehunter

Well-Known Member
Member
Joined
Nov 26, 2008
Messages
219
Reaction score
25
Trophies
1
XP
353
Country
United States
It appears that Xenoblade 3D uses a similar or identical format to the Wii version, but the save files are compressed with a format I haven't seen before. The header starts with !qbz. I've uploaded some compressed and uncompressed samples in the hopes that somebody more experienced than me might be able to help.
 

Attachments

quick glance

0xC header:
4byte magic
uint uncompressed size
uint compressed size

data
byte 4F
uint size
uint uncompressed size
...

if I had to take a guess it'd be some form of bzip if endianness is considered
 
It does seem to swap each word of the original file. After the first 0x20-ish bytes it would only be compressing zeros. What algorithm might give the data that repeats the way it does in the compressed file?
ObdsCbb.png
 
Hi,

I'm trying to figure out how to decompress XB3D saves, but I'm not very good at this :(
I tried a lot of methods, zlib, bz2, gzip ... without success :(

I found some things, I think that the 0x8B first bytes aren't compressed. I found in this "header" some similarities with the uncompressed Wii version (some "magic" numbers in common, they are just reversed), and we can clearely see the name of the characters so this part doesn't seem to be compressed.
Then, at 0x8C, there are 4 bytes which are the same (only for non empty save ?) : CE FA ED FE
I googled it without succes, I only was able to find that this is the magic number of some old mac binaries or whatever :/

Here is a screenshot with some of the similarities I was able to find :
hKJVIrS.png


If anyone can help us it would be very great :)

Thank you :)
 
For the record, these saves seem to be compressed with Nintendo's proprietary CX compression, in the Huffman mode. AFAIK there's no public tools to handle this type of CX compression, though it could readily be reversed from the game code itself or the wii or 3DS SDKs (for symbols).

EDIT: Actually dug into the executable and it seems to be some home-grown RLE encoding, if I can get the time I'll fully RE it and release a tool for compression/decompression.
 
Last edited by WulfyStylez,
Thanks!
It would be great if were someway to share the savefile between both versions (somekind of Sony's "Cross Save").I did some research and it was already a tool for extract,compress,uncompres and add the wii version.
Also found a n3ds save file extracted.

I tried some test but i fail .Maybe it can help
The only i found was :
1-Both has the 3 monado0x files but n3ds had a extra file called "specialmode"). Wii had no the "special mode" file
2-the wii version was much larger than the same n3ds files

3-The magic number is diferent betwen both,but the rest of initial chunks are identical
Here i put the original links i used as reference (it had the source code ):

https://www.mediafire.com/folder/9jdbd1xwmi6gw/Xenoblade

from

https://forums.dolphin-emu.org/Thre...nicles-v5-0u-may-17-2014?pid=317059#pid317059

https://forums.dolphin-emu.org/Thread-xenoblade-save-file-tools

and here the info/files i found of n3ds:

https://gbatemp.net/threads/request-xenoblade-chronicles-3d-save-editor.398912/


Yours
Dani
 
Last edited by cualquiercosa327,
Xenoblade saves on 3DS seem to be identical to the Wii version actually, except for that layer of compression. The decompressed size is the same as a Wii save. Given compress/decompress tools I bet there's a pretty good chance you could move a save back and forth.
 

Site & Scene News

Popular threads in this forum