XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Dec 17, 2017 3:12 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 469 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 32  Next
Author Message
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Nov 29, 2010 6:37 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times

The contents of this post was deleted because of possible forum rules violation.

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Nov 29, 2010 11:45 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4020
Location: Dungeons of Doom
Has thanked: 414 times
Have thanks: 554 times
Hehe that FileLoc in MultiEx Commander's MexScript used to be

Code:
FindFileID <string> <variable>:
-------------------------------

This command searches the file from the current fileposition for a
<string> of max 40 length and saves the position (when found) in
<variable>. This way, if you know that a datafile contains only
a certain type of file with a set ID you can get the OFFSET of this
file that way. Just search for the ID and let MEX save its pos in FILEOFF.


in the DOS version in 1998.


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Nov 30, 2010 4:30 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
The contents of this post was deleted because of possible forum rules violation.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Nov 30, 2010 5:01 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times
Google solves the problem with .at3 files. Now KMPlayer play at3 files from Battle Fantasia, Puzzle Fighter and Street Fighter. Zhal no aa3 decoder(Tekken: Dark Resurrection).

Quote:
Sonic Ultimate Gensesis Collection is PS2 ADPCM (seemingly mono), starting at 0x40. Will implement that into my script soon.

I will be wait.


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Wed Dec 01, 2010 12:46 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Researchman wrote:
Zhal no aa3 decoder(Tekken: Dark Resurrection).
I already referred to Sony SoundForge - it's the only of three Sony programs that can decode atrac3+. You may also try Sonic Stage with HiMDRenderer (both free), but it doesn't support all at3+ formats.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Wed Dec 01, 2010 3:31 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times
I`m mean aa3 plugin for winamp or aa3 acm or something codec. Сurrently remains SoundForge.


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Wed Dec 01, 2010 8:28 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Researchman wrote:
I`m mean aa3 plugin for winamp or aa3 acm or something codec. Сurrently remains SoundForge.

There is none. SoundForge is pretty much the only possibility to decode them.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sun Dec 05, 2010 12:13 pm 
Offline
advanced

Joined: Thu Jul 01, 2010 1:48 pm
Posts: 56
Has thanked: 22 times
Have thanks: 10 times
The contents of this post was deleted because of possible forum rules violation.


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sun Dec 05, 2010 9:28 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
The contents of this post was deleted because of possible forum rules violation.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sun Dec 19, 2010 2:47 am 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 836
Has thanked: 5 times
Have thanks: 32 times
Alpha your rsf script problem might be multichannel related. in the file's header i see either 8 or 6 channels,but not 02 channels. I have converted a 2ch file and it worked. but when i converted a multichannel file the script still outputs the file as two channels and changing the channel count in the RIFF header doesn't work either.

http://www.megaupload.com/?d=O0R0B0TW


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Dec 20, 2010 2:10 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
OrangeC wrote:
Alpha your rsf script problem might be multichannel related. in the file's header i see either 8 or 6 channels,but not 02 channels. I have converted a 2ch file and it worked. but when i converted a multichannel file the script still outputs the file as two channels and changing the channel count in the RIFF header doesn't work either.

http://www.megaupload.com/?d=O0R0B0TW

I know that it doesn't read the channels because the standard atrac format only support stereo - or at least SoundForge only supports stereo files... I'm a bit confused of all these mono and multichannel atrac files. I currently don' know how to handle them, maybe there's a way to split the channels. Will try around with them some day.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Dec 24, 2010 5:26 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
nonconform_XMA_to_XMA.bms
This script removes the seek and fact section of XMA files so that toWAV supports these afterwards. Good example are XMA files from fsb containers that have been extracted with "fsbext -a [name].fsb"
Code:
set MEMORY_FILE binary "\x52\x49\x46\x46\xb8\x59\xa7\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x20\x00\x00\x00\x65\x01\x10\x00\xd6\x10\x00\x00\x01\x00\x00\x03\xe3\x9a\x00\x00\x80\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x02\x00\x64\x61\x74\x61\x00\x58\xa7\x00"
goto 0x16
get CH short
get FREQ long
FindLoc DAT string "data" 0 ""
math DAT += 4
goto DAT
get SIZE long
savepos OFFSET

get NAME basename
string NAME += ".xma"
set RIFFSIZE SIZE
math RIFFSIZE += 0x34
putVarChr MEMORY_FILE 0x04 RIFFSIZE long
putVarChr MEMORY_FILE 0x24 FREQ long
putVarChr MEMORY_FILE 0x31 CH byte
putVarChr MEMORY_FILE 0x38 SIZE long

append
log MEMORY_FILE OFFSET SIZE
append
get SIZE asize MEMORY_FILE
log NAME 0 SIZE MEMORY_FILE

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sun Dec 26, 2010 6:05 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Playstation ADPCM 0x10 bytes re-interleave
As the title says, this script de-interleaves a PS2 ss2 file and re-interleaves it with a 0x10 byte interleave. Apparently, the PS ADPCM plugin for vgmstream has a staggering problem with incomplete last interleave blocks. As those occur very often there's no other possibility than to re-interleave the files.
The new version 1.1 automatically deletes end silence (if the file has no stop marker). Next version will also remove silence of streams with different markers.
But another GREAT use for this script is the possibility of joining segments with different interleaves with the little script below that deletes the 0x28 size headers.
What I normally do to join files on Windows 7:
- select all files I want to join
- press F2 (rename)
- write down a single name and press Enter (Windows 7 will automatically number the files)
- use Flexible Renamer (google it!) to rename the files to the format [name].001, [name].002 and so on
- use 7zip or WinRAR to join the files
Afterwards you can just re-add a correct SS2 header with my other script.
Of course this is also very practical to split ss2 files practically everywhere. =)

Code:
# re-interleaves *.ss2 files with 0x10 bytes interleave
# needed to prepare streams for joining or cutting (without decoding)

idstring "SShd"
goto 0xc
get FREQ long
get CH long
if CH == 1 # no re-interleave needed
   cleanexit
endif
goto 0x14
get INTERLEAVE long
set OFFSET 0x28
get STREAMSIZE asize
math STREAMSIZE -= OFFSET
set SBLOCK INTERLEAVE
math SBLOCK *= 2 # stereo block
set BLOCKS STREAMSIZE
math BLOCKS /= SBLOCK
set RES STREAMSIZE
math RES %= SBLOCK
math RES /= 2 # size of single channel of last block
callfunction deinterleave 1
   get SIZE1 asize MEMORY_FILE
   get SIZE2 asize MEMORY_FILE2
   if SIZE1 != SIZE2
      print "error: memory files are of different size!"
      cleanexit
   endif
callfunction reinterleave 1
callfunction addSS2header 1
get SIZE asize MEMORY_FILE4
get NAME basename
string NAME += "_0x10.ss2"
log NAME 0 SIZE MEMORY_FILE4

startfunction deinterleave
   log MEMORY_FILE 0 0
   log MEMORY_FILE2 0 0
   set DEOFF OFFSET
   append
   for k = 1 <= BLOCKS
      log MEMORY_FILE DEOFF INTERLEAVE
      math DEOFF += INTERLEAVE
      log MEMORY_FILE2 DEOFF INTERLEAVE
      math DEOFF += INTERLEAVE
   next k
   log MEMORY_FILE DEOFF RES # write last residual block
   log MEMORY_FILE2 DEOFF RES
   append
endfunction

startfunction reinterleave
   set SIZE SIZE1
   set OFFSET 0
   append
   do
      log MEMORY_FILE3 OFFSET 0x10 MEMORY_FILE
      log MEMORY_FILE3 OFFSET 0x10 MEMORY_FILE2
      math OFFSET += 0x10
   while OFFSET < SIZE
   append
endfunction

startfunction addSS2header
   set MEMORY_FILE4 binary "\x53\x53\x68\x64\x18\x00\x00\x00\x10\x00\x00\x00\xb0\x36\x00\x00\x02\x00\x00\x00\xc0\x2f\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x53\x53\x62\x64\x00\xe8\x11\x00"
   get SIZE asize MEMORY_FILE3
   do
      math SIZE -= 0x20
      goto SIZE MEMORY_FILE3
      get TEST long MEMORY_FILE3
   while TEST == 0
   math SIZE += 0x20
   do
      math SIZE -= 0x20
      goto SIZE MEMORY_FILE3
      get TEST long MEMORY_FILE3
   while TEST == 0xc
   math SIZE += 0x20
   append
   log MEMORY_FILE4 0 SIZE MEMORY_FILE3
   append
   putVarChr MEMORY_FILE4 0xc FREQ long
   putVarChr MEMORY_FILE4 0x10 CH byte
   set INTERLEAVE 0x10
   putVarChr MEMORY_FILE4 0x14 INTERLEAVE long
   putVarChr MEMORY_FILE4 0x24 SIZE long
endfunction

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Last edited by AlphaTwentyThree on Thu Dec 30, 2010 10:54 pm, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Dec 28, 2010 2:17 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
baf_extract.bms (X360 only!)
Extracts the XMA files from sound banks and adds a valid header for toWAV. Frequency and channels is taken from the file info table of course.
Code:
idstring "BANK"
endian big
get UNK long
get UNK long
get FILES long
goto 0x34

for i = 1 <= FILES
   savepos OFF
   idstring "WAVE"
   get INFOSIZE long
   get HEADERSIZE long
   getDstring NAME 0x20
   string NAME += ".xma"
   get OFFSET long
   get SIZE long
   get UNK long
   get UNK long
   get FREQ long
   get UNK long
   get CH long
   endian little
   callfunction addXMAheader 1
   endian big
   get SIZE asize MEMORY_FILE
   log NAME 0 SIZE MEMORY_FILE
   math OFF += INFOSIZE
   goto OFF
next i

startfunction addXMAheader
   set MEMORY_FILE binary "\x52\x49\x46\x46\xb8\x59\xa7\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x20\x00\x00\x00\x65\x01\x10\x00\xd6\x10\x00\x00\x01\x00\x00\x03\xe3\x9a\x00\x00\x80\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x02\x00\x64\x61\x74\x61\x00\x58\xa7\x00"
   set RIFFSIZE SIZE
   math RIFFSIZE += 0x34
   putVarChr MEMORY_FILE 0x04 RIFFSIZE long
   putVarChr MEMORY_FILE 0x24 FREQ long
   putVarChr MEMORY_FILE 0x31 CH byte
   putVarChr MEMORY_FILE 0x38 SIZE long
   append
   log MEMORY_FILE OFFSET SIZE
   append
endfunction

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Last edited by AlphaTwentyThree on Tue Sep 25, 2012 10:37 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Thu Dec 30, 2010 10:49 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Just updated the 0x10-byte re-interleaver with automatic end silence removal. Will update it frequently when I encounter files that need script enhancement.


_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 469 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 32  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group