Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

[script] VID1 audio extractor

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Tue Jun 05, 2018 1:41 pm (35609)


I just wrote an audio extractor for the *.vid movies in GameCube games like GUN, Tony Hawk's American Wasteland or 007: Everything or nothing. Audio is saved as *.logg which is playable with vgmstream.
Have fun! ;)

Code:
# Audio extractor for *.vid movies (VID1 identifier)
#
# 007: Everything or Nothing (GameCube)
# Gun (GameCube)
# Tony Hawk's American Wasteland (GameCube)
#
# script for QuickBMS http://quickbms.aluigi.org
# written by AlphaTwentyThree of Zenhax

log MEMORY_FILE 0 0
endian big
idstring "VID1"
goto 0
getDstring DATA 0x2c
putDstring DATA 0x2c MEMORY_FILE
goto 0x24
get SIZE long
math SIZE -= 0x20
append
putVarChr MEMORY_FILE 0x24 SIZE long
append
get ZERO long
savepos MYOFF
idstring "VIDH"
get VHSIZE long
goto MYOFF
getDstring DATA VHSIZE
savepos MYOFF
getDstring AUDH 4
if AUDH != "AUDH"
   cleanexit
endif
get SIZE long
math SIZE = 0x14
goto MYOFF
getDstring DATA SIZE
putDstring DATA SIZE MEMORY_FILE
get FSIZE asize

for
   savepos OFFSET
   getDstring IDENT 4
   get SIZE long
   goto OFFSET
   if IDENT == "FRAM"
      getDstring DATA 0x20
      putDstring DATA 0x20 MEMORY_FILE
      savepos OFFSET
      getDstring IDENT 4
      get SIZE long
   endif
   goto OFFSET
   getDstring DATA SIZE
   if   IDENT == "AUDD"
      putDstring DATA SIZE MEMORY_FILE
   endif
   savepos OFFSET
   if OFFSET == FSIZE || IDENT == ""
      # get SIZE asize MEMORY_FILE
      # get NAME basename
      # string NAME = ".raw"
      # log NAME 0 SIZE MEMORY_FILE
      callfunction corr_fram 1
   endif
next

startfunction corr_fram
   get MSIZE asize MEMORY_FILE
   goto 0x20 MEMORY_FILE
   savepos MYOFF MEMORY_FILE
   getDstring IDENT 4 MEMORY_FILE
   get SIZE long MEMORY_FILE
   goto MYOFF MEMORY_FILE
   math MYOFF = SIZE
   goto MYOFF MEMORY_FILE
   set GO MYOFF
   for
      goto GO MEMORY_FILE
      getDstring IDENT 4 MEMORY_FILE
      if IDENT != "FRAM"
         print "no FRAM at %GO%"
         cleanexit
      endif
      savepos WRITE_TO MEMORY_FILE
      get FRAM_SIZE long MEMORY_FILE
      xmath GO "WRITE_TO 0x1c"
      if GO >= MSIZE
         xmath SIZE "WRITE_TO - 4"
         callfunction wrapup 1
      endif
      goto GO MEMORY_FILE
      getDstring IDENT 4 MEMORY_FILE
      if IDENT == "FRAM" # last two empty FRAMs
         savepos SIZE MEMORY_FILE
         math SIZE -= 0x24
         callfunction wrapup 1
      endif
      get AUDD_SIZE long MEMORY_FILE
      xmath FRAM_SIZE "AUDD_SIZE 0x20"
      putVarChr MEMORY_FILE WRITE_TO FRAM_SIZE long
      savepos MYOFF MEMORY_FILE
      xmath GO "MYOFF - 0x28 FRAM_SIZE"
      if GO >= MSIZE
         get SIZE asize MEMORY_FILE
         callfunction wrapup 1
      endif
   next
endfunction

startfunction wrapup
   get NAME basename
   string NAME = ".logg"
   log NAME 0 SIZE MEMORY_FILE
   cleanexit
endfunction
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.