Page 1 of 2

PSP MediEvil Resurrection .BIN

Posted: Sun Sep 30, 2012 1:58 pm
by ikskoks
Hi, I need help unpack the PSP MediEvil Resurrection .BIN file and possibly other files that contains game data.

Image

Image

Re: PSP MediEvil Resurrection .BIN

Posted: Wed Oct 03, 2012 10:37 am
by ikskoks
Refreshing...

I also upload a small copy of my archive made by WATTOs File Cutter.
I hope maybe someone will be interested in this topic ;)

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Oct 06, 2012 10:44 am
by aluigi
I guess the following script does the job, let me know the result:

Code: Select all

# MediEvil PSP
# script for QuickBMS http://quickbms.aluigi.org

idstring "TOCS"
get ARCHIVES long
for i = 0 < ARCHIVES
    get HEAD_SIZE long
    get OFFSET long
    getdstring NAME 0x20
    savepos TMP_OFF
    math OFFSET *= 0x800
    goto OFFSET
    savepos BASE_OFF
    idstring "TOC"
    get DUMMY byte
    get XFILES long
    get FILES long
    get DUMMY long
    for j = 0 < XFILES
        get OFFSET long
        get DUMMY short
        get DUMMY short
        putarray 0 j OFFSET
    next j
    for j = 0 < FILES
        get CRC long
        get SIZE long
        getdstring TYPE 4
        get DUMMY short
        get DUMMY short
        get DUMMY short
        get DUMMY short
        getarray OFFSET 0 j
        math OFFSET -= 1
        math OFFSET *= 0x800
        math OFFSET += BASE_OFF
        if SIZE != 0
            log "" OFFSET SIZE
        endif
    next j
    goto TMP_OFF
next i

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Oct 06, 2012 11:40 am
by ikskoks
Thank you aluigi! Your scripts are the best in the world! :)

Using quickbms and your script i extracted many files with extensions .dat .psm .act .mod .ipm .fli .lng .wav .nfc .pkg .neo .ske .sta .txt .frg
and there is one file .dfont Can it be file with all fonts from game?

.lng - all texts from game
.txt - game scripts
.wav - sounds
I don't know other extensions ;p
After extraction there are 6283 files in my folder :)

And I received following errors:
Image
Image

What do you think? Is everything good?

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Oct 06, 2012 1:35 pm
by aluigi
for the first problem I thought to have fixed some versions ago, are you using quickbms 0.5.15a?
if yes, I will in the next version.

anyway don't worry, just type the name manually removing weird chars like * and it's ok

while for the second problem I guess you can ignore it because you are just at the end of the archive so there is nothing else to extract.

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Oct 06, 2012 1:54 pm
by ikskoks
are you using quickbms 0.5.15a?
Yes, i am.

Is it possible to get proper file names?
For example if i have 000008d1.lng file can it be english.lng or something like that?
You can get lost in these names :D

Thanks again for your great work :)

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Oct 06, 2012 2:15 pm
by aluigi
filenames are not stored in the archive as far as I have seen so it's not possible to guess/retrieve them

Re: PSP MediEvil Resurrection .BIN

Posted: Sun Dec 30, 2012 5:02 pm
by InnocentSam2
I unpacked gamedata.bin with your quickbms, and only the .txt files are usable.

The output is only 223mb as well, and the file itself is 535mb.

Re: PSP MediEvil Resurrection .BIN

Posted: Tue Jan 01, 2013 6:51 am
by MiLØ
aluigi wrote:filenames are not stored in the archive as far as I have seen so it's not possible to guess/retrieve them
Just curious where else could the file names be then? There are other examples of PSP games that have the same type of .BIN file which contains pretty much the whole game's data.

Re: PSP MediEvil Resurrection .BIN

Posted: Fri Jan 04, 2013 3:45 pm
by Xeeynamo
MiLØ wrote:
aluigi wrote:filenames are not stored in the archive as far as I have seen so it's not possible to guess/retrieve them
Just curious where else could the file names be then? There are other examples of PSP games that have the same type of .BIN file which contains pretty much the whole game's data.
The file names are hashed inside the TOC files, there are no chances to know the original strings. Inside the game there is a function that with a string in input (for example "medievil_00.mdl", it give as output an hash that looks like 0x12345678, this hash is found on TOC that has a file entry structure like HASH, Position, Size, Format and the file is loaded. The only way to retrieve the original file names is to find how this hashing function works (the only way is to find and disassemble it from the EBOOT.BIN of the game) and bruteforce the strings. Kingdom Hearts 1 and 2 uses the same system, I cracked all the hashing system but in two years I didn't cracked all the hashed filenames =\. F(x) produce y where x is the string and y the hash, but it will be never a G(y) that will produce the x. I hope that my explanations are clear.

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Jan 05, 2013 6:01 pm
by MiLØ
Your explanation is good enough to understand that it's a ridiculously difficult process obtaining the file names. Thanks, Xeeynamo.
I guess it's a blessing that not all developers are using this hash madness, otherwise nothing would ever get done.

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Nov 04, 2017 11:35 am
by ViToTiV
aluigi, your script is not complete. Archive is more complicated than it seems at first.
My utility for FULL unpack and FULL repack "gamedata.bin" - https://mega.nz/#!Q9cGFJ7I!cO9RX4wzNsZr ... A_w7ulp1w8
Fonts in "01-global.group.toc_ex\00491.psm" - "01-global.group.toc_ex\00501.psm" files (metric in BIN files)
Text in *.LTR files
maybe, this will help to someone

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Nov 04, 2017 12:32 pm
by ikskoks
@ViToTiV, thank you :33

Could you please post full file format? I'm just curious. :)
Did you manage to edit those fonts? :p

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Nov 04, 2017 12:52 pm
by ViToTiV
i wrote this util some time ago, it's hard to remember file format
i can upload Delphi sourcecode, it will be easy to me

Re: PSP MediEvil Resurrection .BIN

Posted: Sat Nov 04, 2017 1:28 pm
by ViToTiV
ikskoks wrote:Did you manage to edit those fonts? :p
use TileMolester
codec - 4bit
offset - 0x60
Block size - 4x1
Canvas size - 32x30

Image