ROM Hack Unpacking an NDS .pak file

huckleberrypie

Member
OP
Newcomer
Joined
May 16, 2011
Messages
22
Trophies
0
XP
179
Country
United States
IDK if it's OK to post a sample archive file here, but I'm just wondering as to what sort of packing/compression does this file use?



I'm currently planning to hack/peek at an NDS game and extract something useful out of it for a personal project or two.
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
that could be some form of unicode codepage(one that lists englsh in the ff-- range).
You mgiht also be looking at an image. I have seen the same thing in the map file of simcity creator.

but 4d doesn't strike me as compressed. But that is not tos say there isn't compression in it. Did you use ct2 to look for any? in hex mode put your cursor at the start of the file then goto tools lz77/huffman compression search...
In the header box see the 10 that is what it looks for... you will need to change that to 11 20 30 40 and maybe someother types that are eluding me right now. If 10 doesn't return any results, move on to the next and so on.
(probably doesn't make that much sense).
anyways if there are results click on one and goto to the start of it. then tools lz77/huffman extract and exrtact and open the file... look through what opens.

edit: if it is indeed a pak file there are decompressors out there for it depending on the type of pak file. (I think there is one here on gbatemp...hmm)- as there are ps1, ps2, etc type pak files. Unfortunately there may not be compressors.
 

huckleberrypie

Member
OP
Newcomer
Joined
May 16, 2011
Messages
22
Trophies
0
XP
179
Country
United States
rastsan said:
that could be some form of unicode codepage(one that lists englsh in the ff-- range).
You mgiht also be looking at an image. I have seen the same thing in the map file of simcity creator.

but 4d doesn't strike me as compressed. But that is not tos say there isn't compression in it. Did you use ct2 to look for any? in hex mode put your cursor at the start of the file then goto tools lz77/huffman compression search...
In the header box see the 10 that is what it looks for... you will need to change that to 11 20 30 40 and maybe someother types that are eluding me right now. If 10 doesn't return any results, move on to the next and so on.
(probably doesn't make that much sense).
anyways if there are results click on one and goto to the start of it. then tools lz77/huffman extract and exrtact and open the file... look through what opens.

edit: if it is indeed a pak file there are decompressors out there for it depending on the type of pak file. (I think there is one here on gbatemp...hmm)- as there are ps1, ps2, etc type pak files. Unfortunately there may not be compressors.

Thanks for the tip, but the CT2 that I have right now has a rather mangled translation, I'm afraid, and I'm not that sure as to how to use that compression search thingy.
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
Okay, the company webfoot technologies, is responsible for the compression. If you would like to compare how they compress take a look at Homie rolllerz the same file: filesystem.pak. they are set up the same way. Possible directory with offset and a flag for either compression or directory(unsure).
Either way both files have the same structure they may not be identical. They do have the same structure though. so I tried to follow in the one whether it was an offset listing. I can't make anything of it. I have only taken a quick look so far. But I am pretty sure that there is byte reversal. as the 10 shows up as 01 where I am pretty sure the first compressed file starts and seems to repeat in structure for the next compressed file.

So hucklebarrypie take some time to learn the terms and just sit and play with this file. (or both files in case you start to doubt yourself). If you are lucky maybe one of the other webfoot technologies games has been hacked. but the quick search I did last night did not turn up anything. (try searching in another language). webfoot website to check out other games they have developed and check out whether my hunch is right... that its webfoot technology games with this specific type compression, not thq.

now in case you are just ripping graphics. Emulators are really good for that. Use the memory dump and look for images in it if screenshots can't help you.

Sorry I wasn't that much help.
 

huckleberrypie

Member
OP
Newcomer
Joined
May 16, 2011
Messages
22
Trophies
0
XP
179
Country
United States
rastsan said:
Okay, the company webfoot technologies, is responsible for the compression. If you would like to compare how they compress take a look at Homie rolllerz the same file: filesystem.pak. they are set up the same way. Possible directory with offset and a flag for either compression or directory(unsure).
Either way both files have the same structure they may not be identical. They do have the same structure though. so I tried to follow in the one whether it was an offset listing. I can't make anything of it. I have only taken a quick look so far. But I am pretty sure that there is byte reversal. as the 10 shows up as 01 where I am pretty sure the first compressed file starts and seems to repeat in structure for the next compressed file.

So hucklebarrypie take some time to learn the terms and just sit and play with this file. (or both files in case you start to doubt yourself). If you are lucky maybe one of the other webfoot technologies games has been hacked. but the quick search I did last night did not turn up anything. (try searching in another language). webfoot website to check out other games they have developed and check out whether my hunch is right... that its webfoot technology games with this specific type compression, not thq.

now in case you are just ripping graphics. Emulators are really good for that. Use the memory dump and look for images in it if screenshots can't help you.

Sorry I wasn't that much help.

Thanks for the tip. As for ripping, well, I'm actually planning to rip the models out of the game (don't worry, I won't post the ripped stuff here). I managed to get the textures from it using either GLIntercept or 3D Ripper DX (plus an OpenGL-DirectX wrapper), but the way the emulators work kept me from grabbing the meshes from the games. There was a Chinese dude who managed to dump them, but it seemed as though he's not yet finished with it.
 

gshock

Well-Known Member
Member
Joined
Mar 8, 2008
Messages
63
Trophies
0
XP
131
Country
Canada
huckleberrypie said:
Thanks for the tip. As for ripping, well, I'm actually planning to rip the models out of the game (don't worry, I won't post the ripped stuff here). I managed to get the textures from it using either GLIntercept or 3D Ripper DX (plus an OpenGL-DirectX wrapper), but the way the emulators work kept me from grabbing the meshes from the games. There was a Chinese dude who managed to dump them, but it seemed as though he's not yet finished with it.

Try using 3DVIA Printscreen. It has native OpenGL support and it's been posted on other emulation forums for capturing OpenGL meshes in emulators.
 

huckleberrypie

Member
OP
Newcomer
Joined
May 16, 2011
Messages
22
Trophies
0
XP
179
Country
United States
gshock said:
huckleberrypie said:
Thanks for the tip. As for ripping, well, I'm actually planning to rip the models out of the game (don't worry, I won't post the ripped stuff here). I managed to get the textures from it using either GLIntercept or 3D Ripper DX (plus an OpenGL-DirectX wrapper), but the way the emulators work kept me from grabbing the meshes from the games. There was a Chinese dude who managed to dump them, but it seemed as though he's not yet finished with it.

Try using 3DVIA Printscreen. It has native OpenGL support and it's been posted on other emulation forums for capturing OpenGL meshes in emulators.

Tried it, but still I can't capture anything with it, too. Szfzafa from Xentax had a code snippet for Desmume that allows you to dump models to an OBJ file, but IDK where to put it as it was a tad confusing to use.
 

Auryn

Well-Known Member
Member
Joined
Jul 21, 2011
Messages
559
Trophies
1
Age
51
XP
706
Country
Swaziland
I would say
4 bytes number of entries / 4 bytes CRC of file?? or just pointer section?? / 4 bytes data offset (offset of the first file/ 4 bytes deconpressed filesize / 4 bytes flags file 1? / 4 bytes file n CRC / 4 bytes offset file n / 4 bytes decompressed file n size/ 4 bytes flag file n / .....
 
  • Like
Reactions: huckleberrypie

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    S @ salazarcosplay: How are you @AncientBoi :tpi: :tpi: :tpi: :tpi: :tpi: