ROM Hack Xenoblade Chronicles 3D Save Compression

moosehunter

Well-Known Member
OP
Member
Joined
Nov 26, 2008
Messages
219
Trophies
0
XP
342
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

  • Saves.zip
    29 KB · Views: 406

moosehunter

Well-Known Member
OP
Member
Joined
Nov 26, 2008
Messages
219
Trophies
0
XP
342
Country
United States
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
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
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 :)
 

WulfyStylez

SALT/Bemani Princess
Member
Joined
Nov 3, 2013
Messages
1,149
Trophies
0
XP
2,867
Country
United States
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,

cualquiercosa327

Well-Known Member
Member
Joined
Mar 24, 2009
Messages
201
Trophies
1
XP
428
Country
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,

WulfyStylez

SALT/Bemani Princess
Member
Joined
Nov 3, 2013
Messages
1,149
Trophies
0
XP
2,867
Country
United States
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

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @Mondooooo, sadly I dont have any tips