XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Wed May 24, 2017 1:26 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 465 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18, 19, 20 ... 31  Next
Author Message
 Post subject: Re: My quickBMS scripts
PostPosted: Thu May 03, 2012 2:17 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times














You can make the ads go away by registering

*.mic to *.ss2 converter
Encountered in Sniper Elite for PS2.

Code:
# converts PS2 *.mic files to playable *.ss2 files
# known games with this format:
# - Sniper Elite (PS2)
# - Worms Forts: Under Siege (PS2)
# (c) 2012-05-03 by AlphaTwentyThree of XeNTaX

include "func_header_SS2.bms"
get OFFSET long
get UNK long
get CH long
get FREQ long
get INTERLEAVE long
get SIZE asize
math SIZE -= OFFSET
set NAME ""
callfunction SS2 1

_________________
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 Wed Sep 05, 2012 12:49 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Thu May 03, 2012 9:18 pm 
Offline
Moderator

Joined: Sun Mar 27, 2011 8:42 pm
Posts: 931
Has thanked: 10 times
Have thanks: 120 times
AlphaTwentyThree wrote:
Sniper Elite V2 - StreamingSounds.asrBE extractor
Strange file table, but works with a dumb work-around.

Code:
# extracts the StreamingSounds.asrBE from Sniper Elite V2 (Xbox 360)
# (c) 2012-05-01 by AlphaTwentyThree of XeNTaX

idstring "Asura   STSA"
endian big
get FSIZE long
get UNK long
get ZERO long
get FILES long
get DUMMY byte
goto 0x1d
for i = 1 <= FILES
   get NAME string
   if i != FILES
      FindLoc NXT string "sounds" 0 ""
   else
      FindLoc NXT string "RIFF" 0 ""
   endif
   math NXT -= 8
   goto NXT
   get SIZE long
   get OFFSET long
   log NAME OFFSET SIZE
next i



Does it also work for X360 AV2010 text containning files pls ?

_________________
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri May 04, 2012 1:08 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Nope. I'd have written otherwise. ;)

_________________
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: Sat May 05, 2012 9:43 pm 
Offline
ultra-n00b

Joined: Sat May 05, 2012 9:08 pm
Posts: 2
Has thanked: 0 time
Have thanks: 2 times
Alpha,
could you by any chance do a script for extracting towav-compatible xma from aux files (found in Kinect Disneyland Adventures)... I got the orchestral score from a former vgm rip, but I´d also like to extract the voice elements and park bgm from my disc...

Thanks a lot
ebbelein


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon May 07, 2012 1:58 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
ebbelein wrote:
Alpha,
could you by any chance do a script for extracting towav-compatible xma from aux files (found in Kinect Disneyland Adventures)... I got the orchestral score from a former vgm rip, but I´d also like to extract the voice elements and park bgm from my disc...

Thanks a lot
ebbelein

That's no extraction, that's a complete manipulation. I don't remember the header of those aux files but I guess they have RIFF headers, so procedure is the same as always:
- strip the header with RIFF_to_uxma
- parse with xma_parse (if it doesn't work, try 0x10000 blocksize)
- add header with my script
Resulting files are decodable with toWAV.

_________________
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 May 09, 2012 9:05 pm 
Offline
ultra-n00b

Joined: Sat May 05, 2012 9:08 pm
Posts: 2
Has thanked: 0 time
Have thanks: 2 times
thanks, alpha - i tried your method and it worked well, but only for a few files...

All of the aux files have a rifx wave fmt header or are bkhd files containing rifx wave fmt... Some of the files could be decoded with your method, some files got compatible for towav by just replacing the rifx header with a riff header in hex editor...
but on some of the files (like the one in the attached screenshot) i had no sucess with either method... There´s only digital noise after decoding it with towav... Perharps you could take a look on the file screenshots attached and give me a hint, what makes the left file so "special"...

thanks a lot...


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Thu May 17, 2012 3:15 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Electronic Arts TGQ video demultiplexer
Tested with Need for Speed and WarCraft II: Dark Sage for Saturn.
I know there are other games that use the format so the script may be extended in the future.

Code:
# demultiplexes Electronic Arts TGQ videos
# if audio is PCM, a valid header will automatically be added
# (c) 2012-05-17 by AlphaTwentyThree of XeNTaX

endian big
idstring "1SNh"
get SIZE_HEADER long
getDstring CODEC 4
if CODEC != "EACS"
   print "non-recognizable codec"
   cleanexit
endif
   # audio specs
   get FREQ long
   reverseLong FREQ
   get CH byte
   get BLOCKALIGN byte
   get CODEC byte
   if CODEC == 1 # some ADPCM
      reverselong FREQ
   endif
   set BITS 0x10
   
log MEMORY_FILE 0 0 # reserved for audio header
log MEMORY_FILE2 0 0 # 1SNd - audio
log MEMORY_FILE3 0 0 # pQGT (little endian)/TGVk (big endian) - video
set SIZE_VIDEO 0
set SIZE_AUDIO 0
get FSIZE asize


for i = 0 < 2
   set OFFSET SIZE_HEADER
   append
   do
      goto OFFSET
      getDstring TYPE 3
      get DUMMY byte
      get SIZE long
      if TYPE == "pQG"
         reverselong SIZE
      endif
      math OFFSET += 8
      math SIZE -= 8
      if TYPE == "TGV"
         if i == 0
            math SIZE_VIDEO += SIZE
         else
            log MEMORY_FILE3 OFFSET SIZE
         endif
      elif TYPE == "pQG"
         if i == 0
            math SIZE_VIDEO += SIZE
         else
            log MEMORY_FILE3 OFFSET SIZE
         endif
      elif TYPE == "1SN"
         if i == 0
            math SIZE_AUDIO += SIZE
         else
            log MEMORY_FILE2 OFFSET SIZE
         endif
      else
         print "ERROR: block not recognizable - check file for consistency."
         cleanexit
      endif
      math OFFSET += SIZE
      math j += 1
   while OFFSET != FSIZE
   append
   if i == 0 # prealloc memory
      putVarChr MEMORY_FILE2 SIZE_AUDIO 0
      putVarChr MEMORY_FILE3 SIZE_VIDEO 0
      log MEMORY_FILE2 0 0
      log MEMORY_FILE3 0 0
      set SSIZE SIZE_AUDIO
      math SSIZE += SIZE_VIDEO
   else
      get NAME basename
      set SIZE SIZE_AUDIO
      set OFFSET 0
      if CODEC == 0
         string NAME += ".wav"
         callfunction PCM 1
      elif CODEC == 1
         string NAME += "_"
         string NAME += FREQ
         string NAME += "Hz_"
         string NAME += CH
         string NAME += "ch.aud"
         log NAME 0 SIZE MEMORY_FILE2
      endif
   
      get VNAME basename
      string VNAME += ".vid"
      log VNAME 0 SIZE_VIDEO MEMORY_FILE3
   endif
next i

startfunction PCM
   endian little
   set PRE SIZE
   math PRE += 0x2c
   putVarChr MEMORY_FILE PRE 0
   log MEMORY_FILE 0 0
   set MEMORY_FILE binary "\x52\x49\x46\x46\x20\xC0\xB1\x00\x57\x41\x56\x45\x66\x6D\x74\x20\x10\x00\x00\x00\x01\x00\x02\x00\x44\xAC\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00\x64\x61\x74\x61\xFC\xBF\xB1\x00"
   append
   log MEMORY_FILE OFFSET SIZE MEMORY_FILE2
   append
   set RIFFSIZE SIZE
   math RIFFSIZE += 36
   set AVGBYTES FREQ
   math AVGBYTES *= BLOCKALIGN
   
   putvarchr MEMORY_FILE 0x04 RIFFSIZE long
   putvarchr MEMORY_FILE 0x14 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
   putvarchr MEMORY_FILE 0x16 CH short   # wChannels
   putvarchr MEMORY_FILE 0x18 FREQ short   # dwSamplesPerSec
   putvarchr MEMORY_FILE 0x1c AVGBYTES long    # dwAvgBytesPerSec
   putvarchr MEMORY_FILE 0x20 BLOCKALIGN short # wBlockAlign
   putvarchr MEMORY_FILE 0x22 BITS short       # wBitsPerSample
   putvarchr MEMORY_FILE 0x28 SIZE long
   if NAME == ""
      get NAME basename
      string NAME += ".wav"
   endif
   get SIZE asize MEMORY_FILE
   log NAME 0 SIZE MEMORY_FILE
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Thu May 17, 2012 3:31 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
BIGF extractor for WarCraft II: The Dark Saga (PSX/Saturn)

Extracts the *.war and *.cud archives from the game. Automatically adds a *.bank extension to the soundbanks for postprocessing. Had to use a little workaround for truncated archives.

Code:
# extract archives with BIGF signature from
# WarCraft II: The Dark Saga (Playstation & Saturn)
# (c) 2012-05-17 by AlphaTwentyThree of XeNTaX

idstring "BIGF"
# endian big # un-comment for Saturn version
get UNK long
get FILES long
get FSIZE asize
set i 1
for
   get OFFSET long
   if OFFSET == 0xadf0adf0
      cleanexit
   elif OFFSET == 0xf0adf0ad
      cleanexit
   endif
   get SIZE long
   set TEST SIZE
   math TEST += OFFSET
   if TEST > FSIZE # corrupt file end
      print "Warning: Last file may be truncated"
      get SIZE asize
      math SIZE -= OFFSET
   endif
   if SIZE != 0xffffffff
      get NAME basename
      string NAME += "_"
      string NAME += i
      savepos MYOFF
      goto OFFSET
      getDstring TYPE 4
      if TYPE == "BANK"
         string NAME += ".bank"
      endif
      goto MYOFF
      log NAME OFFSET SIZE
      math i += 1
   endif
next

_________________
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 May 17, 2012 3:58 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Thu May 17, 2012 3:52 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
BANK extractor for WarCraft II: The Dark Saga (Playstation)

Just to have the sound extraction complete. ;)

Code:
# extracts *.bank files from
# WarCraft II: The Dark Sagea (Playstation)
# (c) 2012-05-17 by AlphaTwentyThree of XeNTaX

idstring "BANK"
get FILES long
set BIAS FILES
math BIAS *= 0x10
math BIAS += 8
for i = 1 <= FILES
   getDstring NAME 8
   get OFFSET long
   math OFFSET += BIAS
   get SIZE long
   log NAME OFFSET SIZE
next i

_________________
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: Thu May 17, 2012 4:21 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Agon *.sfl extractor
Extracts the main archives from Agon. Subfolder creation for better batch processing. :)

Code:
# extracts *.sfl files from Agon (PC)
# (c) 2012-05-17 by AlphaTwentyThree of XeNTaX

idstring "SFL10"
get UNK long
get INFO long
get NAMEOFF long
get UNK long
get FILES threebyte
goto INFO
for i = 1 <= FILES
   get NAMEPOS long
   math NAMEPOS += NAMEOFF
   get DUMMY byte
   get FILE_NUMBER long
   get OFFSET long
   get SIZE long
   savepos MYOFF
   goto NAMEPOS
   get NAME string
   goto MYOFF
   get FNAME basename
   string FNAME += "/"
   string FNAME += NAME
   log FNAME OFFSET SIZE # use NAME to disable subfolder
next i

_________________
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 May 18, 2012 7:45 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Headhunter: Redemption (PS2) - *.DAT extractor
Unfortunately the file names are only saved as CRC so you have to post-process all files.
Main videos and some music is in FSKOLME.DAT, sounds, music and cutscenes are in FSPIENI.DAT. VAG interleave i 0x1000 if you're wondering. ;)

If anyone can provide me with a sample of the Xbox version, I'd be happy to check if it works for this console, too. :) PM me.

Code:
# extracts the *.DAT archives from Headhunter: Redmption (PS2)
# (c) 2012-05-18 by AlphaTwentyThree of XeNTaX

get INFO asize
math INFO -= 0x800
goto INFO
get UNK long
get INFOSIZE long
get FILES long
math INFOSIZE /= 0x800
math INFOSIZE += 1
math INFOSIZE *= 0x800
math INFO -= INFOSIZE
goto INFO
for i = 1 <= FILES
   get NAME_CRC long
   string NAME_CRC p= "0x%08x" NAME_CRC
   get OFFSET long
   get SIZE long
   math OFFSET *= 0x800
   math OFFSET += 0x200000
   get NAME basename
   string NAME += "_"
   string NAME += NAME_CRC
   log NAME OFFSET SIZE
next i

_________________
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 May 23, 2012 11:58 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Astro Boy: The Video Game (2009) PS2

Code:
# extracts the DATA.WAD/.DIR from "Astro Boy: The Video Game" for PS2
# (c) 2012-05-24 by AlphaTwentyThree of XeNTaX

open FDDE DIR 0
open FDDE WAD 1
get FILES long 0
for i = 1 <= FILES
   getDstring NAME 0x40 0
   get SIZE long 0
   get OFFSET long 0
   math OFFSET *= 0x800
   log NAME OFFSET SIZE 1
next i

_________________
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: Thu May 24, 2012 1:50 am 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 822
Has thanked: 5 times
Have thanks: 31 times
Hi alpha!

I am currently stuck trying to parse this particular XMA file from max Payne 3. Will Pm you the file ;)

As far as this structure goes, It appears to be a mono stream with dual channels blocked or interleave in a certain way. These blocked Intelreaved mono channels are also packed into packets separated by zeroes in the file. Some packets within a file have 2 channels in a packet but some have 12 channels. The first packet of every audio file has the mono XMA flag FC038000 which you can then identify and extract the channels easy of h first packet but the other packets don't have this flag and therefore have to find the interleaving. I tried to assume that the interleaving found in the first packet is the interleaving for all but such as not the case because when playing back the files it gives errors and the channels do not align right. So something is choking there. Hell im not even sure the FC038000 flag even states the correct interleaving in the first packet. :(


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri May 25, 2012 6:52 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
POD3 extractor

Code:
# known games that use this format:
# BloodRayne (PS2)
# (c) 2012-05-25 by AlphaTwentyThree of XeNTaX

idstring "POD3"
goto 0x58
get FILES long
goto 0x108
get INFO long
goto INFO
set NAMEBIAS FILES
math NAMEBIAS *= 0x14
math NAMEBIAS += INFO
for i = 1 <= FILES
   get NAMEPOS long
   math NAMEPOS += NAMEBIAS
   get SIZE long
   get OFFSET long
   get UNK long
   get UNK long
   savepos MYOFF
   goto NAMEPOS
   get NAME string
   goto MYOFF
   log NAME OFFSET SIZE
next i

_________________
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 May 25, 2012 7:13 pm 
Offline
veteran

Joined: Tue Nov 27, 2007 8:30 pm
Posts: 93
Has thanked: 19 times
Have thanks: 5 times
AlphaTwentyThree wrote:
Headhunter: Redemption (PS2) - *.DAT extractor
Unfortunately the file names are only saved as CRC so you have to post-process all files.
Main videos and some music is in FSKOLME.DAT, sounds, music and cutscenes are in FSPIENI.DAT. VAG interleave i 0x1000 if you're wondering. ;)

If anyone can provide me with a sample of the Xbox version, I'd be happy to check if it works for this console, too. :) PM me.


I've got it on the Xbox. I'll check it out sometime soon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 465 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18, 19, 20 ... 31  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