Minecraft Xbox 360 Edition XBLA savegame.dat compression method?

Reading, editing and everything related to the files created by games to contain savegames and configurations
guuudvibez
Posts: 4
Joined: Sat Jul 31, 2021 9:48 am

Minecraft Xbox 360 Edition XBLA savegame.dat compression method?

Post by guuudvibez »

Does anybody know the compression method used in savegame.dat files (after extracted from STFS)? There is a tool that can extract but I would like to know more than that. Nothing else on this website or anywhere really. Aluigi was credited in the original tool for his quickBMS tool.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Minecraft Xbox 360 Edition XBLA savegame.dat compression method?

Post by aluigi »

A sample savegame.dat may be useful for who wants to analyze it.
guuudvibez
Posts: 4
Joined: Sat Jul 31, 2021 9:48 am

Re: Minecraft Xbox 360 Edition XBLA savegame.dat compression method?

Post by guuudvibez »

savegame.dat
savegame.dat

Decompressed savegame was too big, let me figure out something.
Edit: here it is https://github.com/h55ia/savegame.dat

The first 4 bytes is the compressed size: 0x0029051A (2,688,282)

skipping 4 null bytes???, the next 4 is the decompressed size: 0x0053A960 (5,482,848)

now the actual file starting at 12 bytes (0x0C)

compressed:
0x0000 38 2C 20 20 F5 63 71 14 00 C0 00 00 10 02 00 00: 8, ⌡cq .└.. ..
0x0010 00 00 EE 2E EE EE EE EE 77 17 BB 70 5D B8 DD DD: ..ε.εεεεw ╗p]╕▌▌
0x0020 CB DD BB BB 8B BB BB BB 5D B8 DD DD 80 8B 11 4D: ╦▌╗╗ ╗╗╗]╕▌▌ M
0x0030 9C 15 00 1C 00 00 03 0C FE F7 FF D1 83 7A A8 B7: . .. ■≈ ╤ z¿╖

decompressed:
0x0000 00 53 A2 10 00 00 00 0D 00 05 00 05 00 00 00 00 .Só ... . . ....
0x0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0040 00 00 00 00 00 00 00 00 00 00 07 01 00 00 1D 01 .......... ..
0x0050 00 00 36 01 00 00 51 01 00 00 68 01 00 00 80 01 ..6 ..Q ..h ..
0x0060 00 00 9A 01 00 00 B1 01 00 00 C8 01 00 00 E2 01 .. ..▒ ..╚ ..Γ
0x0070 00 00 F9 01 00 01 10 01 00 01 29 01 00 01 41 01 ..∙ . . ) . A
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Minecraft Xbox 360 Edition XBLA savegame.dat compression method?

Post by aluigi »

Since it's an Xbox game I tried to use the good old XMemDecompress compression and... it did the magic :D

Code: Select all

comtype xmemdecompress
endian big
get ZSIZE long
get ZERO long
get SIZE long
savepos OFFSET
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE
guuudvibez
Posts: 4
Joined: Sat Jul 31, 2021 9:48 am

Re: Minecraft Xbox 360 Edition XBLA savegame.dat compression method?

Post by guuudvibez »

aluigi wrote:Since it's an Xbox game I tried to use the good old XMemDecompress compression and... it did the magic :D

Code: Select all

comtype xmemdecompress
endian big
get ZSIZE long
get ZERO long
get SIZE long
savepos OFFSET
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE

Thank you! Funny thing is I had suspicions it was xmemdecompress but it never worked. Please upload this script to database so people can decompress their own save games!