[ps2]How to extract text file compressed by lzh5 in .bin whith fpk format?

How to translate the files of a game
fardeas
Posts: 2
Joined: Sun Aug 22, 2021 3:20 am

[ps2]How to extract text file compressed by lzh5 in .bin whith fpk format?

Post by fardeas »

Hello everyone,

I am interested in translating Dragon Quest - Shounen Yangus to Fushigi no Dungeon [NTSC-J] [SLPM-66363].iso (Playstation 2)
The .iso file include:
    MODULES a folder with some modules that are loaded by the PS2 at game runtime (like .IRX .ioprp files)Both ERX and IRX are ELF executables.
    IMAGE.BIN (160MB)contains an "fpk" header but it seems a proprietary format,I suppose it means "file PacKage"
    MOV00JP.BIN (1.22GB) movie in Japanese, useless
    MOV01JP.BIN (1.45GB) movie in Japanese, useless
    MOV02JP.BIN (562MB) movie in Japanese, useless
    SLPM_663.63 (4.36MB) is a elf file, the "executable" file for launcher
    SYSTEM.CNF (57bytes) is a config file Including simple info like video mode and game ver, useless
    TBGM2.BIN (136MB) BGM music or sound, useless

I think all the talk text files would be packed in IMAGE.BIN, and file SLPM_663.63 has the file names.
I found string "\IMAGE.BIN" at 0x00439B01 in file SLPM_663.63 use UltraEdit, and found a file name "language" at 0x00439C30 after it.I guess this file "language" is my target,but i can't find it in IMAGE.BIN use UltraEdit.
My friend tell me that the text just sleep in IMAGE.BIN,but compressed by lzh5 algorithm, i need to unpack it with quickbms first,then uncompress,i will find the text file use "unicode" coding at last.
But i can't find the OFFSET use UltraEdit,i don't know how to write .bms script without OFFSET and SIZE.Can you help me?
The IMAGE.BIN is so big that i can't upload it,i upload SLPM_663.63 and two screenshots instead.

Any guidance or assistance would be greatly appreciated.
SLPM-663.63.zip
fardeas
Posts: 2
Joined: Sun Aug 22, 2021 3:20 am

Re: [ps2]How to extract text file compressed by lzh5 in .bin whith fpk format?

Post by fardeas »

step1:quickbms.exe [ps2]DragonQuest_Yangus_unpack.bms IMAGE.BIN unpack

Code: Select all

# [ps2]DragonQuest_Yangus_unpack.bms
get Dummy LONGLONG  # 7041126
get fileCount LONG
print "fileCount=%fileCount%"
get Dummy LONG  # 2048
get Dummy LONGLONG  # 128
get fileListSize LONGLONG
print "fileListSize=%fileListSize%"
get Dummy LONGLONG  # 0
get firstFileOffset LONG
print "firstFileOffset=%firstFileOffset%"
get allDataSize LONG
print "allDataSize=%allDataSize%"
for i = 0 < fileCount
   set fileListOffset 0x10
   math fileListOffset * i
   math fileListOffset + 0x80
   goto fileListOffset
   get Dummy LONG
   get offset LONG
   math offset + firstFileOffset
   get compressSize LONG
   if compressSize != 0
      get decompressSize LONG
      print "offset=%offset%,compressSize=%compressSize%,decompressSize=%decompressSize%"
      goto offset
      log "" offset compressSize
   endif
next i

step2:quickbms.exe [ps2]DragonQuest_Yangus_decompress.bms unpack decompress

Code: Select all

# [ps2]DragonQuest_Yangus_decompress.bms
comtype lzh13
endian little

get MAGIC long
print "MAGIC=%MAGIC%"
get unknow long
print "unknow=%unknow%"
get decompressSize long
get compressSize long
print "compressSize=%compressSize%,decompressSize=%decompressSize%"
math compressSize -= 0x10
get name filename
print "name=%name%"
if compressSize == decompressSize
   log name 0x10 compressSize
else
   clog name 0x10 compressSize decompressSize
endif

step3:I can't find text file use "unicode" coding in folder "decompress".What's wrong?