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] RIFX dsp to GENH

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Tue May 24, 2016 5:48 pm (13678)


Apparently I'm on fire right now because I finally figured out how to properly deal with GC_ADPCM. ;)
This script converts RIFX-headered gcadpcm streams to playable genh files. :)

Code:
# converts RIFX header files with GCADPCM stream to playable GENH
# written by AlphaTwentyThree of Zenhax
# script 1.01
# script for QuickBMS http://quickbms.aluigi.org

idstring "RIFX"
endian big
get RSIZE long
idstring "WAVEfmt "
get BSIZE long
savepos MYOFF
get CODEC short
if CODEC == 2
   set INTERLEAVE 8
else
   set INTERLEAVE 4
endif
get CH short
get FREQ long
get UNK long
get UNK short
get BITS short
get UNK longlong
get NOS long
savepos TEMP

set Wii_Area 0
for
   math MYOFF = BSIZE
   goto MYOFF
   getDstring IDENT 4
   get BSIZE long
   savepos MYOFF
   if IDENT == "smpl"
      get NAME basename
      string NAME = ".smpl"
      log NAME MYOFF BSIZE
   elif IDENT == "WiiH"
   set Wii_Area 1
      set OFF_COEFF1 MYOFF
      getDstring COEFF1 0x20
      getDstring DUMMY 0xe
      savepos OFF_COEFF2
      getDstring COEFF2 0x20
      getDstring DUMMY 0xe
   elif IDENT == "data"
      set OFFSET MYOFF
      set SIZE BSIZE
      break
   else # do nothing, just skip, e.g. JUNK
   endif
next
if Wii_Area == 0
   goto TEMP
   set OFF_COEFF1 TEMP
   getDstring COEFF1 0x20
   getDstring DUMMY 0xe
    savepos OFF_COEFF2
    getDstring COEFF2 0x20
    getDstring DUMMY 0xe
endif

xmath PRE_SIZE "SIZE 0xc0"
putVarChr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0

endian little
putVarChr MEMORY_FILE 0 0x484e4547 long # "GENH"
putVarChr MEMORY_FILE 4 CH long # ch
putVarChr MEMORY_FILE 8 INTERLEAVE long # interleave
putVarChr MEMORY_FILE 0xc FREQ long
putVarChr MEMORY_FILE 0x10 0xffffffff long
putVarChr MEMORY_FILE 0x14 NOS long # number of samples
putVarChr MEMORY_FILE 0x18 0xc long # ?
putVarChr MEMORY_FILE 0x1c 0xc0 long # stream start
putVarChr MEMORY_FILE 0x20 0xc0 long # stream start
putVarChr MEMORY_FILE 0x24 0x80 long # coeff1
putVarChr MEMORY_FILE 0x28 0xa0 long # coeff2
putVarChr MEMORY_FILE 0x2c 1 long
putVarChr MEMORY_FILE 0x34 0x80 long # coeff1
putVarChr MEMORY_FILE 0x38 0xa0 long # coeff2
putVarChr MEMORY_FILE 0x7f 0 byte
append
log MEMORY_FILE OFF_COEFF1 0x20
log MEMORY_FILE OFF_COEFF2 0x20
log MEMORY_FILE OFFSET SIZE
append
get SIZE asize MEMORY_FILE
get NAME basename
string NAME = ".genh"
log NAME 0 SIZE MEMORY_FILE
  • Author
  • Localization

AlphaTwentyThree, posted Fri May 27, 2016 11:52 am (13718)


Just updated the script to support two other variants! :)
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.