Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

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

Featured Replies

  • Author
  • Localization

fardeas, posted Sun Aug 22, 2021 1:31 pm (65827)


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.
  • Author
  • Localization

fardeas, posted Thu Aug 26, 2021 8:31 am (65882)


step1:quickbms.exe [ps2]DragonQuest_Yangus_unpack.bms IMAGE.BIN unpack
Code:
# [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:
# [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?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.