ROM Hack Unpacking an NDS .pak file

huckleberrypie

Member
Newcomer
Joined
May 16, 2011
Messages
21
Trophies
0
XP
176
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
0
Location
toronto
Website
rastsan.wordpress.com
XP
396
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
Newcomer
Joined
May 16, 2011
Messages
21
Trophies
0
XP
176
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
0
Location
toronto
Website
rastsan.wordpress.com
XP
396
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
Newcomer
Joined
May 16, 2011
Messages
21
Trophies
0
XP
176
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
Newcomer
Joined
May 16, 2011
Messages
21
Trophies
0
XP
176
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
555
Trophies
0
Age
48
XP
590
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

General chit-chat
Help Users
  • linuxares @ linuxares:
    This is not the EOF
  • The Real Jdbye @ The Real Jdbye:
    wait i didn't get the time to see what it said
  • The Real Jdbye @ The Real Jdbye:
    damn it, linuxares
  • The Real Jdbye @ The Real Jdbye:
    the shitbox has been effectively eof for a long time and it was perfect that way
  • The Real Jdbye @ The Real Jdbye:
    ehh post it in the eof chat instead? i still want to see it
  • linuxares @ linuxares:
    exactly, that's a good place for it x3
  • WiiHomebrew+Snes @ WiiHomebrew+Snes:
    Well this is interesting
  • kenenthk @ kenenthk:
    For what?
  • The Real Jdbye @ The Real Jdbye:
    i don't like this new shitbox, it's too complicated
  • linuxares @ linuxares:
    well this isn't a shoutbox but a chat
  • kenenthk @ kenenthk:
    It's basically the same thing shoutbox has been around for years just upgraded
  • gudenau @ gudenau:
    Oh the floating chat thing is new.
  • gudenau @ gudenau:
    And you can do formatting.
  • Arecaidian Fox @ Arecaidian Fox:
    Oooooh, colors.
  • gudenau @ gudenau:
    I think what you meant was "colors".
  • gudenau @ gudenau:
    :^)
    +1
  • antiNT @ antiNT:
    nice
  • HinaNaru Cutie @ HinaNaru Cutie:
    hi o w o
  • HinaNaru Cutie @ HinaNaru Cutie:
    yo does anyone know how to fix the 'no main boot entries found, check that bootloader/hekate_ipl.ini has boot entries or use more configs button for more boot entries' error on hekate??? i keep getting it when i try to click the launch option
  • HinaNaru Cutie @ HinaNaru Cutie:
    nvm got it to work now q uq someone helped me out
  • chrisrlink @ chrisrlink:
    ugh always have trouble sleeping
  • SG854 @ SG854:
    Have you tried closing your eyes?
  • HarvHouHacker @ HarvHouHacker:
    Hey, this is cool! Now we can chat pretty much anywhere.
  • AsPika2219 @ AsPika2219:
    RAINBOW 🌈
    AsPika2219 @ AsPika2219: RAINBOW 🌈