Page 1 of 1

Star Wars: Episode III: Revenge of the Sith *.hsh/*.pk2

Posted: Fri Oct 01, 2010 8:09 pm
by AlphaTwentyThree
Hi everybody!
I just wrote a script that extracts the files from the two big PK2 containers using the HSH information file. Use the script on the HSH.
Hope I could help someone with this. :)

Code: Select all

open FDSE "PS2PAK_0.PK2" 1
open FDSE "PS2PAK_1.PK2" 2

get FSIZE asize
DO
    getCT NAME string 0x20
    getDstring FILE 1
    get DUMMY byte
    getCT SIZE string 0x20
    set NUM SIZE
    callfunction STR2NUM 1
    set SIZE NUM
    getCT OFFSET string 0x0D
    set NUM OFFSET
    callfunction STR2NUM 1
    set OFFSET NUM
    get DUMMY byte
    savepos MYOFF
    if FILE == "0"
        log NAME OFFSET SIZE 1
    elseif FILE == "1"
        log NAME OFFSET SIZE 2
    endif
WHILE MYOFF != FSIZE

startfunction STR2NUM
    set TONUM 0
    strlen l NUM
    for i = 0 < l
        set EXP l
        math EXP -= i
        math EXP -= 1
        set B 0xA
        math B p EXP
        getVarChr T NUM i
        math T -= 0x30
        math T *= B
        math TONUM += T
    next i
    set NUM TONUM
endfunction

Re: Star Wars: Episode III: Revenge of the Sith *.hsh/*.pk2

Posted: Sun Oct 03, 2010 4:33 am
by Acewell
Thanks for sharing your script but how do you use it?
Does it do the same thing as the tool Jockel released HERE about 5 years ago?

Re: Star Wars: Episode III: Revenge of the Sith *.hsh/*.pk2

Posted: Sun Oct 03, 2010 9:12 am
by AlphaTwentyThree
This is a QuickBMS script. Save it in a text file as *.bms and open with QuickBMS (http://aluigi.altervista.org/papers.htm#quickbms)
I don't know about the other tools.

[PS2] Star Wars: Ep III: Revenge of the Sith *.hsh/*.pk2

Posted: Fri Oct 08, 2010 6:18 am
by Acewell
AlphaTwentyThree wrote:This is a QuickBMS script
Okay Thanks, i wasn't 100% sure. :D

Jockel's tool can extract, rebuild and relink the files.

Re: Star Wars: Episode III: Revenge of the Sith *.hsh/*.pk2

Posted: Wed Oct 05, 2016 8:06 pm
by ginev
Ok i extracted the pk2 files.Now how to open the pak files since i think this files contain the models.Waht to do now?

Re: Star Wars: Episode III: Revenge of the Sith *.hsh/*.pk2

Posted: Sat Jan 11, 2020 3:13 am
by StrangeUsernames
Can you share with me all the textures and models you got. How did you get them? I tried using NinjaRipper running pcsx2 and don't want to go through the hassel.