Help with with quickbms (noob here)

Doubts, help and support about QuickBMS and other game research tools
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

Help with with quickbms (noob here)

Post by V12-POWER »

Hi all, im having no clue how to write an script for these files. From the thread https://zenhax.com/viewtopic.php?f=6&t=1116&start=220 Excuse my sorry ass, but im just new at this

This is the format

0x00 - Id, long

now we skip some bytes since theyre useless for this (do this on EVERY file)

0x58 - data block 1 size/offset, gin/snr section begins after this
0x5c - data block 1 + gin/snr section size (audio data begins after this)

skip all the bytes till the offset given in 0x58, Gin and SNR section begins, each sample present in the file has an string of 36 bytes in ths section. It's easy to guess the number of audio files by just doing 0x5c - 0x58 and dividing by 36.

anyways, to the small section here.

0x00 - file format
0x04 - file enumeration (first file is always 00)
0x08 - audio data offset. To get the actual offset in the file, you must add the value you got frmo 0x5c at the beginning to this one

skip 8 bytes

0x14 - random byte is always 01

skip 4 bytes

0x1c - RPM of sample, used for SNR files since they're supposed to be recorded at a static rpm, gin files use a value of 1000

skip 4 bytes

0x24 next audio file string...

Getting to know the size of each audio file is easy substracting the offsets, the only "problem" is getting the size of the last file, it beings in the given offset and goes to the end of the file

When these audio description strings end, the audio data begins.

----------

On another topic from the same thread, is there any way to make quickbms parse data into a text file? On .gin files, there are 2 arrays, which size is specified in the header, every int32 has a value (numerical) and this relates to sound data, what Im needing is just to get all the values together so I can make a graph out of it and see this in depth.

If anyone can give me hand it would be great.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with with quickbms (noob here)

Post by aluigi »

I answer to the section question.
You can redirect the output of quickbms in a txt or csv file and then doing what you want with it.

For example I guess that a script like the following should generate a good csv file to open with Excel:

Code: Select all

get FILES long
for i = 0 < FILES
    get OFFSET long
    print "%OFFSET%,"
next i

Then: quickbms.exe script.bms file.dat > output.csv

It's just an example but the concept is correct.
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

Re: Help with with quickbms (noob here)

Post by V12-POWER »

aluigi wrote:I answer to the section question.
You can redirect the output of quickbms in a txt or csv file and then doing what you want with it.

For example I guess that a script like the following should generate a good csv file to open with Excel:

Code: Select all

get FILES long
for i = 0 < FILES
    get OFFSET long
    print "%OFFSET%,"
next i

Then: quickbms.exe script.bms file.dat > output.csv

It's just an example but the concept is correct.


It prints the values correctly on the cmd window, but there's no file (The option for "Save as type" is empty) Missing command maybe?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with with quickbms (noob here)

Post by aluigi »

Ah sorry, I meant that you have to execute that command from the console's command-line.
> is the standard output redirector of the Windows console.