Help with bms script creation

Doubts, help and support about QuickBMS and other game research tools
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Help with bms script creation

Post by Kratos9999 »

Hi everyone, I want to know if someone can tell me what is wrong in this bms script, I have no experience in creation of scripts, this is my first attempt:
#script for fatal frame 2 ps2 img_bd.bin

endian big

get archiveSize long
get fileCount long
get null long
for i = 0 < fileCount
getdstring name 0x8
log NAME OFFSET SIZE
next i

I am trying to make an script to extract the files inside of a archive, here is a link with the sample of archive and some screenshots of my failed attempt in extract the files: https://drive.google.com/file/d/0B24D4L ... p=drivesdk

What is wrong and why the
supposed files extracted in
the image are 0kb in size?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with bms script creation

Post by aluigi »

Why don't you use a simple format to make practice with the bms language? :)

Additionally where you got that structure you used in your script? It's completely unrelated with the format, like if it has been copied somewhere else.

What you have there is a raw container and NOT an archive, which means that the information are probably stored in another file.
It's just a sequence of files aligned to 2048 bytes.

In short there is no way to extract data from img_bd.bin itself.

The only script available on my website about this game is the following:
http://aluigi.org/bms/fatal_frame.bms
But I don't know if there is a way to get the files from img_db.bin.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with bms script creation

Post by Kratos9999 »

I used as base an tutorial for quickbms that I have found in net. You mean that information
can be in a TOC file, I did
not find a toc file for img_
db.bin. Can that TIM3 name
at the beginning of the file
be a header for the tim2
files? I thought so, but I'm
not sure. I tried the script
you posted, but it did not
work
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with bms script creation

Post by Kratos9999 »

Hi aluigi, I made some modifications in my script and got the files in the image, however, I think there is more files inside the img_bd.bin, manys, pss videos, audio files, tim2, and others. But this files don't appear.
I think it was already a
breakthrough I get these
files, do you think I'm too
far from making the script
properly extract all files?
THIS IS the script edited:

#script for fatal frame 2 ps2 img_bd.bin

endian big

get archiveSize long
get FILES long
get fileSize long
get fileCount long
for i = 0 < files
get offset long
get size long
SavePos FILEOFF
log "" OFFSET SIZE
next i
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with bms script creation

Post by aluigi »

I guess you completely ignored what I wrote.
Oh well, time is yours :)
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with bms script creation

Post by Kratos9999 »

I don't understand, my script is wrong, or there is no way to extract the files?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with bms script creation

Post by aluigi »

There is no way to extract the files because there is no index, so your script is wrong because it tries to read fields that don't exist.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with bms script creation

Post by Kratos9999 »

So must there is a toc file for this img_bd.bin, but it seems that is hidden in game iso, there are some hidden files in iso. It is possible to make an script to extract hidden files in filesystem ISO-9660?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with bms script creation

Post by aluigi »

Mah, it looks strange.
Anyway in the Fatal Frame game on which I worked, the filenames were stored in lfm_order.bin and the big archive contained also the TOC.
I have no idea why img_bd.bin is so different.