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.

[PSP] Heroes Phantasia help needed

Featured Replies

  • Author
  • Localization

darkprince, posted Tue Sep 16, 2014 10:26 pm (494)


Hi everyone,

I am new here :D also new to mod/extraction.

Trying to extract images and sound files from "Heroes Phantasia" (a PSP game). Its ISO file is available here: http://www.emuparadise.me/Sony_Playstation_Portable_ISOs/Heroes_Phantasia_(Japan)/158790.

Noesis helped me to extract a file called HP.CPK (under USRDIR\). I got a bunch of folders and .bin/.dlz files, which I don't know how to open. For example, there are a bunch of .dlz files under HP_files\btl\chr\--I guess these are character image/3D model files. Then I tried to use QuickBMS. Since I don't know the compression algorithm, I used the reverse engineering method shown at http://aluigi.altervista.org/quickbms/comtype_scan.htm. However, none of the 500 files generated by comtype_scan2.bms comtype_scan2.bat seems to make any sense like those described in the example. Now I am stuck, not sure how to proceed.

Please advise. Thanks!

P.S. a sample .dlz file is attached for you to take a look.
  • Author
  • Localization

aluigi, posted Wed Sep 17, 2014 4:00 am (495)


You had to consider the first 32bit SIZE field before passing the file to the comtype2 scanner :)

The algorithm is LZSS with the dictionary initializer set to 0:
Code:
comtype saint_seya  # lzss "12 4 2 2 0" or puyo_lz00 (LZSS with init 0x00)
get SIZE long
savepos OFFSET
get ZSIZE asize
math ZSIZE -= OFFSET
clog MEMORY_FILE OFFSET ZSIZE SIZE

    get OFFSET long MEMORY_FILE
for i = 0
    get NEXT_OFFSET long MEMORY_FILE
    if NEXT_OFFSET == 0
        break
    endif
    xmath SIZE "NEXT_OFFSET - OFFSET"
    log "" OFFSET SIZE MEMORY_FILE
    math OFFSET = NEXT_OFFSET
next i

*edit* script
  • Author
  • Localization

darkprince, posted Wed Sep 17, 2014 4:45 am (496)


Thanks! I guess now I can use LZSS to write my own bms script for extracting the files?
  • Author
  • Localization

aluigi, posted Wed Sep 17, 2014 5:04 am (497)


Don't you like the one I posted?
  • Author
  • Localization

darkprince, posted Wed Sep 17, 2014 5:13 am (498)


You mean simply save the code you posted as a .bms file (e.g., hp.bms)?
I ran: "quickbms hp.bms c01001.dlz output" but only got the attached file.
Am I supposed to get those .tga files from the compressed file? Did I do something wrong here (maybe missing a crucial step)?
  • Author
  • Localization

aluigi, posted Wed Sep 17, 2014 5:55 am (501)


ok I have updated the script to extract the files contained in it.
Just some notes, these files are not ready to use, for example the first one probably contains some tgas (don't know if the original tga or some raw format), the 00000023.dat one contains a cpk archive but you need to cut the first 0x1040 bytes before unpacking it with cpk.bms.
So it's necessary some manual editing before being able to use them.
  • Author
  • Localization

darkprince, posted Wed Sep 17, 2014 3:18 pm (504)


As you suggested, I cut the first 0x1040 bytes from 00000023.dat and unpacked it using "quickbms cpk.bms 00000023.dat output." Script cpk.bms was found at http://aluigi.altervista.org/papers/bms/cpk.bms.

Now I have got a bunch of .vag files from 00000023.dat, and I don't know what to do with them. At the same time, I am not able to use other .dat files extracted from the original c01001.dlz although I know they may contain .tga files in some form. Am I missing some important information here? Even after I extracted those files, how could I make use of them?
  • Author
  • Localization

aluigi, posted Wed Sep 17, 2014 3:23 pm (505)


VAG is the audio format used on PlayStation, there are programs to read them (vgmstream for example).
For the other files, probably other users can help you.
On PSP that's quite normal to have files that cannot be used immediately (no dds, png, wav, mp3 and other known formats).
  • Author
  • Localization

darkprince, posted Wed Sep 17, 2014 9:56 pm (509)


Thanks! I'll do some more research on the file formats.
  • Author
  • Localization

AlphaTwentyThree, posted Sat Sep 20, 2014 12:18 am (528)


Sadly, the script doesn't work on the sound archives like this one: http://6dwrlh5ukl.1fichier.com/ :\
Can you tell what the problem is?
  • Author
  • Localization

aluigi, posted Sat Sep 20, 2014 7:42 am (530)


That script was for the dlz files.

The one you uploaded is a classical CPK one to open with cpk.bms.
  • Author
  • Localization

AlphaTwentyThree, posted Sat Sep 20, 2014 10:13 am (534)


My bad - had an old version of the script that didn't work with CPK files missing the file table. ;)
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.