ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat May 26, 2018 10:15 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: New version bug
PostPosted: Sat Feb 03, 2018 3:53 pm 

Joined: Mon Oct 27, 2014 1:49 pm
Posts: 691
Hi. I just want to warn about a bug I encountered while using a specific script with quickbms.

THIS (https://mega.nz/#!GtcT3QyT!pRdku1cInuNj ... jtiKI79a1o) particular script, written by Alpha23 in order to add XBOX ADPCM header to a file, was producing LWAV output files that were readable or convertable with vgmstream/towav, but it no longer works. It does produce LWAVs but they are unplayable (the header is wrong) (sample : https://mega.nz/#!z9Vn1IyJ!RYueZNgtw56u ... 2G-CtjzqUI)
Using the older version of quickbms from 25 September 2014, it works correctly. (here is a sample : https://mega.nz/#!yhNjBQyA!8AOwHaq2O2hE ... fyIrgrfgX8)
So, it is a problem with the last version of quickbms (and maybe other versions after 25 September 2014)

Audio streams from Spongebob Movie Game XBOX are in .WAV.SNDS format. They are headerless XBOX ADPCM. I have to add a GENH header with codec Xbox 4-Bit IMA ADPCM, offset 0x0, interleave 0x10, channels 2, frequency 44100. After this, I add Xbox ADPCM header to the GENH files with offset 0x1000, freq 44100, testv 0, channels 2. I convert the resulting LWAV into WAV with towav in order to remove artifact noises that occurs with vgmstream.

SNDS file: https://mega.nz/#!G1EikTJB!t07N87bSlJ6y ... YzmrcTcjr4
GENH file: https://mega.nz/#!K0cUDT7S!mYL7vnaXtlzs ... 4YLKcoMI4I

Thanks in advance if the bug can be solved


Last edited by Mygoshi on Sat Mar 24, 2018 7:47 pm, edited 1 time in total.

Top
   
 Post subject: Re: New version bug
PostPosted: Sat Feb 03, 2018 6:30 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8127
Well done, it's a good catch.
In Quickbms 0.8.0 the behaviour of the putvarchr command has been improved to allow to store also the address of the variable instead of just its content, that's necessary for calling some external dll where you have to fill a struct with data and pointers to data, quite rare but it may happens.

In quickbms the function that decides if the data to store is a number or a string (pointer to a string) is get_var_ptr_cmd that in fact checks if the variable is a string and returns its address.
The script made by alpha23 sets the variable in this way "set VAR 0x123" which is interpreted by quickbms like a way to store the number as a string, so "0x123" and not 0x123.

I will for sure fix the bug in the next version of quickbms because putvarchr must use the address only when you use '&' or '*' before the variable.

In the meantime it's enough to replace the "set VAR number" instructions in the main script with one of the following:
math VAR = number
set VAR long number


Top
   
 Post subject: Re: New version bug
PostPosted: Sat Feb 03, 2018 6:34 pm 

Joined: Mon Oct 27, 2014 1:49 pm
Posts: 691
Thank you for the explanation.


Last edited by Mygoshi on Sat Mar 24, 2018 7:46 pm, edited 1 time in total.

Top
   
 Post subject: Re: New version bug
PostPosted: Sat Feb 03, 2018 6:47 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8127
Ah right I forgot it, obviously the other alternative is using quickbms 0.7.7 which is the latest version not affected by the bug:
http://aluigi.org/papers/quickbms_0.7.7.zip


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited