ZenHAX
http://zenhax.com/

Help with bms script creation
http://zenhax.com/viewtopic.php?f=13&t=3694
Page 1 of 1

Author:  Kratos9999 [ Tue Jan 17, 2017 7:37 pm ]
Post subject:  Help with bms script creation

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?

Attachments:
pic000.jpg [128.94 KiB]
Downloaded 1 time

Author:  aluigi [ Wed Jan 18, 2017 12:40 pm ]
Post subject:  Re: Help with bms script creation

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.

Author:  Kratos9999 [ Wed Jan 18, 2017 1:07 pm ]
Post subject:  Re: Help with bms script creation

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

Author:  Kratos9999 [ Wed Jan 18, 2017 5:59 pm ]
Post subject:  Re: Help with bms script creation

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

Attachments:
Pic001.jpg [215.12 KiB]
Not downloaded yet
pic000.jpg [115.66 KiB]
Not downloaded yet

Author:  aluigi [ Wed Jan 18, 2017 6:41 pm ]
Post subject:  Re: Help with bms script creation

I guess you completely ignored what I wrote.
Oh well, time is yours :)

Author:  Kratos9999 [ Wed Jan 18, 2017 6:50 pm ]
Post subject:  Re: Help with bms script creation

I don't understand, my script is wrong, or there is no way to extract the files?

Author:  aluigi [ Wed Jan 18, 2017 7:03 pm ]
Post subject:  Re: Help with bms script creation

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.

Author:  Kratos9999 [ Wed Jan 18, 2017 7:11 pm ]
Post subject:  Re: Help with bms script creation

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?

Author:  aluigi [ Wed Jan 18, 2017 7:48 pm ]
Post subject:  Re: Help with bms script creation

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/