ZenHAX
http://zenhax.com/

[script] EA mus to wave
http://zenhax.com/viewtopic.php?f=6&t=4683
Page 1 of 1

Author:  AlphaTwentyThree [ Wed Jul 26, 2017 2:30 pm ]
Post subject:  [script] EA mus to wave

Hi there!

Sometimes EA games use files that look like EA MUS but are in reality just wave or AT3 files, e.g. Medal of Honor: Heroes 2 for PSP. The following script parses those files.

Code:
# parse pseudo EA MUS files to wave
# written by AlphaTwentyThree of Zenhax
# script for QuickBMS http://quickbms.aluigi.org

idstring "SCHl" # header
get BLOCKSIZE long
goto BLOCKSIZE
savepos OFFSET
getDstring IDENT 4
get BLOCKSIZE long
math OFFSET += BLOCKSIZE
log MEMORY_FILE 0 0
for
   goto OFFSET
   getDstring IDENT 4
   if IDENT == "SCEl"
      get NAME basename
      string NAME += ".wav"
      get SIZE asize MEMORY_FILE
      log NAME 0 SIZE MEMORY_FILE
      cleanexit
   endif
   get SIZE long
   math SIZE -= 0x18
   math OFFSET += 0x18
   append
   log MEMORY_FILE OFFSET SIZE
   append
   math OFFSET += SIZE
next

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