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

Author Topic: Nintendo DS - FPK and ASH Files  (Read 12013 times)

Hubz

  • Jr. Member
  • **
  • Posts: 31
  • LEVEL - 99++
    • View Profile
    • Spooky Tornado Studio
Nintendo DS - FPK and ASH Files
« on: June 24, 2013, 03:03:11 pm »
Hi all,

I'm taking a crack at translating Dragon Quest Monsters 2 Joker Pro with some others for the Nintendo DS. Luckily all the menus and what not are easily hackable. But the dialog is compressed somehow. I believe we've found where the dialog is located but they are FPK files, and within those are ASH files. I didn't know if anybody knew of tools already out there that can open these formats for the DS? I haven't had any luck outside of some FPK unpacker written for Wii but that didn't work unfortunately. I am not a coder either so if anybody out there wants to take a stab at it feel free. I'll continue working on the menus etc in the meantime.

- Hubz
- Hubz

FAST6191

  • Hero Member
  • *****
  • Posts: 2490
    • View Profile
Re: Nintendo DS - FPK and ASH Files
« Reply #1 on: June 24, 2013, 05:30:09 pm »
There was a patch attempt already happening if a quick search is to be believed -- http://www.woodus.com/forums/index.php?showtopic=19262
It might take some search engine coaxing but you might drag one of the betas up.

Others reading the formats in question seem to be the .e files, .d16 files and the occasional .m file. Some have a flanking file (.enct being the common one) but I have not really investigated this before.

FPK format.
Run of the mill archive format like we have seen loads of times before, I have seen things very much like this but a bit more complex. Can house more than ASH files.

8 bytes to start
Magic stamp of FPK
At 4h is the number of files indicator (usually 01 but sometimes more)
28h per entry or 14h for the name and another 14h for the size and location entry.
Either way name in ASCII followed by 4 bytes location (flipped and counts from the start of the file) and 4 bytes size?
A quick test of the numbers says there may be some alignment padding between files.

ASH....

S_model.m is interesting
Seems to house an NSBMD file but it is compressed (guess of LZ). No magic stamp but the size marker before the BMD0 stamp and the internal NSBMD file size match the value shortly after ASH (0348 if you flip it). I tried a few basic tests to stick a flag back in and force various tools to work but no joy, do not dismiss it if you try though as this gets very fiddly and a stray byte somewhere could bring the whole ship down.

Otherwise every ASH I had a look at had 64h at 8h in the ASH section and a magic stamp of ASH.
Files themselves always appeared to start at 11h (odd for something to not be aligned)
Will have to look more but not sure what 4 bytes at 4 hex are and 4 bytes at C hex are about nor the final byte at 10h if indeed it is separate. 4h looks like a file size but might contain something else and C looks to be related to size or something as well.

Hubz

  • Jr. Member
  • **
  • Posts: 31
  • LEVEL - 99++
    • View Profile
    • Spooky Tornado Studio
Re: Nintendo DS - FPK and ASH Files
« Reply #2 on: June 25, 2013, 03:41:08 pm »
Yeah I am working with a guy named Cain to continue his work. Saw your previous discussions on gbatemp, glad you are here as well! I have not gotten ahold of Souimet yet but did get ahold of someone else helping with the project and he provided us with some stuff. Was able to create a table that seems to be good and double checked it against Souimet's.

Cain created a program to extract the FPK's today that works. Now just gotta tackle the ASH files.
- Hubz