News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Unpacking an NDS .pak archive?  (Read 3679 times)

huckpie

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Unpacking an NDS .pak archive?
« on: January 25, 2012, 09:15:23 pm »
Can anyone help me with this?

http://www.mediafire.com/?71jx2vdx5q5rfzd

File's ripped from an NDS image, and idk if it's LZ77-encoded or something else. Opening it in Crystal Tile 2 seemed to turn up an LZ-like scheme, but I'm yet to verify this. Feel free to move, edit or delete if this seems inappropriate.

Oh, and another thing: the reason why I wanted to unpack it is so that I can get the model files off them. I tried ripping them off with Desmume and HijackGL but all I get are vertices.

CUE

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • Nasío pa'jakear
Re: Unpacking an NDS .pak archive?
« Reply #1 on: January 23, 2012, 04:50:24 am »
Header:
- 4 bytes <- number of files
For each entry:
- 4 bytes <- unknown, maybe a checksum or hash
- 4 bytes <- file offset (aligned to 4 bytes)
- 4 bytes <- file length unpacked/uncompressed
- 4 bytes <- number of file parts

Each file has a header with offsets to each part (the last offset is the offset to the next file) and the data packed or compressed (no idea).

huckpie

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Unpacking an NDS .pak archive?
« Reply #2 on: January 26, 2012, 07:58:37 am »
Thanks. But can it be done or something?

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Unpacking an NDS .pak archive?
« Reply #3 on: January 26, 2012, 01:47:01 pm »
Sure, just write a little code and it will be easy.

huckpie

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Unpacking an NDS .pak archive?
« Reply #4 on: January 26, 2012, 09:02:27 pm »
Sure, just write a little code and it will be easy.

Yeah but I'm a little sucky at that.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Unpacking an NDS .pak archive?
« Reply #5 on: January 27, 2012, 04:54:29 pm »
Which game is this anyway?

huckpie

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Unpacking an NDS .pak archive?
« Reply #6 on: January 27, 2012, 09:23:35 pm »
Kit's Mystery Challenge.  ;D