Page 1 of 1

Final Fantasy 1 for PSP (*.dpk)

Posted: Tue Apr 24, 2007 1:19 pm
by slush
Hello i was wondering if there is any extractor for ff1's dpk file. Unfortuneatly there is only one big .dpk file in the game and it's 100MiB big so i had to use that filecutter anyways.

It seems to only contain "F1 07" at the start, after that it begins to list all the files in the archive.

Which looks like this: (9) - (00) - (3) - (00) - (21 - filename) - (00)
so it has 36 "chunks"

the first one looks like this:

Code: Select all

00 00 30 48 03 08 00 00 00 00 00 00 00 00 53 45 30 30 30 2E 4E 50 4B 00 00 00 00 00 00 00 00 00 00 00 00 00

..0H..........SE000.NPK.............
while the 2nd one look like this

Code: Select all

3F 02 40 D7 3E 05 50 C9 03 00 50 C9 03 00 53 45 30 30 31 2E 4E 50 4B 00 4B 00 00 00 00 00 00 00 00 00 00 00

?.@×>.PÉ..PÉ..SE001.NPK.K...........
im not sure if this got included in the zip but it seems like every file ends with something like

Code: Select all

ss0000.bmp.test2.Wed Feb 21 19:19:ÿ...37 2007.GimConv 1.40
Since the filesize was too big for the zip i uploaded it at my site ff1psp.dpk.zip (1.4MiB)

The file contains .gim files (i think one is included on the head.bin)
If you want to test them out use this gim/mig to bmp extract it somewhere and put the files you want to convert in /convfiles/ and run the bat (i think, not really sure since its japanese and i dont have any gim to test it on)

Posted: Tue Jul 03, 2007 6:54 am
by Mr.Mouse
I've taken a look at them,haven't come up with anything useful yet. :(

Posted: Tue Jul 03, 2007 9:53 am
by fatduck
byte 7-10 and 11-14(same value) looks like a offset value in Big-Endian

I want to take a look as well, but the link above is not working!

Posted: Fri Jul 27, 2007 3:24 am
by samwh
The contents of this post was deleted because of possible forum rules violation.

Re: Final Fantasy 1 for PSP (*.dpk)

Posted: Sun May 03, 2009 11:14 pm
by Doctor Loboto
Ah, this is something I've been wondering about as well. I've wanted to extract sprites from this game but everything is compressed into one big .dpk file. It'd be very nice if someone could figure this out for us.

Re: Final Fantasy 1 for PSP (*.dpk)

Posted: Mon May 04, 2009 11:53 am
by aluigi
the extraction of the files is not a problem, for example the following script does the job:

Code: Select all

get FILES long
get FULLSIZE long
get DUMMY long
get DUMMY long

for i = 0 < FILES
    getdstring NAME 24
    get OFFSET long
    get ZSIZE long
    get SIZE long

    if ZSIZE != SIZE
        # Wp16 compression not supported, file is saved in compressed form
        log NAME OFFSET ZSIZE
    else
        log NAME OFFSET SIZE
    endif
next i
(note that the PCK and NPK files are just other archives like DPK so must be extracted in the same way).

the real problem is the so called "Wp16" compression, which is not clear.
these compressed files start with the "Wp16" signature, followed by the 32 bit uncompressed size and (probably) the raw compressed data.

so as final solution the following script extracts directly ANY file (gim and music files) from the non-compressed archives in the dpk file:

Code: Select all

# script for QuickBMS http://aluigi.org/papers.htm#quickbms

get FILES long
get FULLSIZE long
get DUMMY long
get DUMMY long

for i = 0 < FILES
    getdstring NAME 24
    get PCK_OFFSET long
    get ZSIZE long
    get SIZE long
    savepos INFO_OFFSET

    if ZSIZE != SIZE
        # skip the compressed Wp16 archives (not supported)
    else
        goto PCK_OFFSET

        get XFILES long
        get FULLSIZE long
        get DUMMY long
        get DUMMY long
        for j = 0 < XFILES
            getdstring NAME 24
            get OFFSET long
            get ZSIZE long
            get SIZE long

            math OFFSET += PCK_OFFSET
            log NAME OFFSET SIZE
        next j
    endif

    goto INFO_OFFSET
next i
usage: quickbms script.bms ff1psp.dpk output_folder

Re: Final Fantasy 1 for PSP (*.dpk)

Posted: Fri Aug 20, 2010 7:45 pm
by Doctor Loboto
Sorry to necropost if I am, but I've been looking for a batch script that extracts both .npk and .pck files from this archive. The script above extracts most things, but it's still missing vital graphics files, which I am primarily concerned with.

Re: Final Fantasy 1 for PSP (*.dpk)

Posted: Mon Apr 16, 2012 3:20 pm
by LordSith
Doctor Loboto wrote:Sorry to necropost if I am, but I've been looking for a batch script that extracts both .npk and .pck files from this archive. The script above extracts most things, but it's still missing vital graphics files, which I am primarily concerned with.

sorry to necropost but did you manage to extract those file (extracts both .npk and .pck files) from the Final Fantasy 1 package?