To begin with, I'm fairly new to the game hacking scene. I normally only deal with scripts and graphical editing/ripping from Ace Attorney and Dai Gyakuten Saiban, so I apologize in advance for my ignorance.
I wish to extract graphical and sound assets from the Tengen Toppa Gurren Lagann game. Unfortunately, as with a few games in Japanese on the DS, the files are compressed into .nfp.
There are only two threads from 2008 (With this one being the only one which appears to make major progress) which even touch upon the subject. The second one only briefly mentions that someone had created a tool to extract from it, and provides some basic information on addresses. However, the tool itself is not linked, and no further mention of the file format appears until a 2013 post on asking for information regarding the format.
Any assistance would be appreciated, either direct, or in pointing me in a good direction in regards to where to go to begin working with unknown compression formats.
An archive of the relevant files can be found here.
Tengen Toppa Gurren-Lagann .nfp file
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Tengen Toppa Gurren-Lagann .nfp file
The only problem of this format is how the data is compressed and where are stored the information about the compressed size.
What I mean is that the TOC (information about the archived files) contains only the filename, offset and uncompressed size, if you go at the offset you can see 4 bytes used only to tell what's the type of file and the rest is a bit chaotic because if you compare the first file of ETC.NFP and the first of SOUND.NFP they clearly have no format in common.
I leave an incomplete script (DOES NOT WORK) to document the TOC:
What I mean is that the TOC (information about the archived files) contains only the filename, offset and uncompressed size, if you go at the offset you can see 4 bytes used only to tell what's the type of file and the rest is a bit chaotic because if you compare the first file of ETC.NFP and the first of SOUND.NFP they clearly have no format in common.
I leave an incomplete script (DOES NOT WORK) to document the TOC:
Code: Select all
idstring "NFP2.0" # "NFP2.0 (c)NOBORI 1997-2006"
goto 0x34
get FILES long
get INFO_OFF long
get BASE_OFF long
goto INFO_OFF
for i = 0 < FILES
getdstring NAME 0x10
get OFFSET long
get SIZE long
savepos TMP
goto OFFSET
get ???
comtype ???
clog NAME OFFSET ZSIZE SIZE # ???
goto TMP
next i
-
- Posts: 2
- Joined: Tue Feb 13, 2018 12:00 am
Re: Tengen Toppa Gurren-Lagann .nfp file
If it helps at all, that thread I linked mentions this:
Apologies if it's something you already knew. I'm fairly in the dark in regards to what ACTUALLY needs to be done. And I'm not certain if it applies to all nfp files.
0x00000000 ~ 0x0000002F a header that says "NFP2.0 ©NOBORI 1997-2002"
0x00000030 ~ 0x00000033 00's
0x00000034 ~ 0x00000037 the number of files contained in the NFP (1695 in this file)
0x00000038 ~ 0x0000003B offset where the file table starts (0x00000040 in this file)
0x0000003C ~ 0x0000003F offset where the individual files start (0x00016990 in this file)
and then comes the file table section. Each file is divided into a 16 byte section:
0x00000000 ~ 0x0000000B the file name
0x0000000C ~ 0x0000000F pointer for the file
Apologies if it's something you already knew. I'm fairly in the dark in regards to what ACTUALLY needs to be done. And I'm not certain if it applies to all nfp files.