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.

Wii SDF to playable GENH

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Tue Jul 25, 2017 11:36 pm (25020)


Hi folks,

this is no request, I just wanted to post my little conversion script here. I found several Wii games that use sdf as audio format, which is currently unsupported. The following script converts these files to something playable.
This could also be a template for a generic script.
Have fun! :)

Code:
# converts Wii SDF audio files to playable GENH streams
# written by AlphaTwentyThree of Zenhax
# script for QuickBMS http://quickbms.aluigi.org

idstring "SDF"
set OFFSET 0x84
set OFF_COEFF1 0x28
set OFF_COEFF2 0x56
set OFF_NOS 0x20
set OFF_FREQ 0x10
set OFF_CH 0x14
set OFF_INTERLEAVE 0x18
set REVERSE 1

goto OFF_NOS
get NOS long
goto OFF_FREQ
get FREQ long
goto OFF_CH
get CH byte
goto OFF_INTERLEAVE
get INTERLEAVE long

get SIZE asize
math SIZE -= OFFSET
xmath PRE_SIZE "SIZE 0xc0"
putVarChr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0

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"
if REVERSE == 1
   callfunction rev
endif
log NAME 0 SIZE MEMORY_FILE

startfunction rev
   goto 0x80 MEMORY_FILE
   for i = 1       savepos OFF MEMORY_FILE
      get DUMMY short MEMORY_FILE
      reverseshort DUMMY
      putVarChr MEMORY_FILE OFF DUMMY short
   next i
endfunction
  • Author
  • Localization

Mygoshi, posted Tue Jul 25, 2017 11:42 pm (25021)


Very useful, thanks!
  • Author
  • Localization

AnonBaiter, posted Wed Jul 26, 2017 12:40 am (25022)


Welcome back, AlphaTwentyThree!
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.