banner sounds to MP3

Discussion in 'Wii - Hacking' started by xakmad, May 24, 2010.

  1. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    first thread ever - hope its in the right place - go easy on me, feedback welcome

    heres my guide for getting wii banners and making them mp3 for use as e.g. ring tones / message alerts for mobile phones

    have the ISO file?
    i use this if i have an iso and about to convert it to a wbfs
    but as i delete the ISO straight after, so its rare i have an ISO...

    you are set to use wii scrubber
    Download Wii Scrubber
    i googles and got to this site, dont need to pay or register

    WinRar or decent unzipper
    You will need winrar/7zip/winzip to get into the wiiscrubber tools above , etc

    WiiScrubber key files
    unrar and run "MakeKeyBin.exe" to generate 2 KEY.BIN files to go in the same folder as you run wiiscrubber

    open wii scrubber
    "load iso" button
    in the lower part of the window, look in "partition 1" for "opening.bnr"
    extract that somewhere easy to find

    have a wbfs file?
    option 1
    have "wbfs_file.exe" in your main wbfs folder
    standard layout seems to be e.g. "j:\wbfs\"

    use explorer to get to your folder e.g.
    "J:\wbfs\X-Men Origins- Wolverine [RWUP52]"

    to get a command prompt easily:
    hold SHIFT while you Right-Click a BLANK part of the window (i.e. not a file or folder) then left click on "command promp here)

    run this command
    j:\wbfs\wbfs_file.exe *.wbfs extract_file RWUP52 opening.bnr

    note the *.wbfs instead ofRWUP52.wbfs - this sould help for a bulk scripting solution (see end)

    this give the result:
    extracted: (RWUP52) 'opening.bnr' -> 'opening.bnr'

    so "opening.bnr" is in the "J:\wbfs\X-Men Origins- Wolverine [RWUP52]"
    i usually leave the file in there as its small and not in the way, in case i want something again

    option 2
    use "wbfs_file Simple Gui 1.0.9" - brilliant program
    but i would wish for "BULK banner extraction"
    i suggest a "same as source folder" option or "specific folder" (like "J:\Banners") for bulk
    no offence to the original programmer, it does a great job

    Got the opening.bnr - what next ?

    Download some Wii Tools
    i had them anyway, but I found a download link at
    which is a "Banner Editing Thread" by deba94 - hope you dont mind, deba94!
    link (working 25th may 2010)

    run u8extr.exe
    i have a non-english one [​IMG]
    the top box is "IN" (hit the ... to get your opening.bnr
    the lower is "OUT" and is pre-filled - just leave it
    click Extract ("extraer" in lower left corner)
    this creates a "opening_bnr_out" folder
    inside that folder are : "banner.bin", "icon.bin" and "sound.bin"

    I usually copy "sound.bin" to the same folder as u8ext and the other tools downloaded (and about to download)
    makes it easier to fine [​IMG] and you have the original too if you mess up

    Download "BannerSoundToPcm"

    run "BannerSoundToPcm.exe"
    type in a 1 or 2 in the box ( i think this is a loop counter but didnt seem to do much for me)
    click channel 1 _or_ channel 2
    doesnt seem to matter which, all my samples have ended up the same, feel free to correct me!
    This generates "sound.bin.pcm"
    you can rename it to game.pcm if you wish as the .bin confuses audacity for the export to mp3

    Download "audacity" (free audio editor)
    if you downloaded the tools above you will have a portable verion (as long as you keep it in the tools folder for it to work)
    or get it here I used the 1.3.12 beta on windows with no probs

    Download "lame addon" (free lame add-on needed for exporting mp3)
    this is NOT included in the tools link above (am sure deba94 didnt need it, he uses WAV not mp3 for his work)
    info here
    or download page here

    open Audacity

    file menu | import | raw data
    chose "sound.bin.pcm" (or game.pcm if you rename it!)

    keep the settings as mono and change 44100 to 32000

    STEREO import
    i think this might be a bug, but having "stereo and 32000" doesnt seem to work it goes too fast, ie at the 44100 speed,
    so after chooseing stereo and 3200 you have to slow it down
    effects menu | change speed
    enter "-27.43%" into the box
    leave out the quotes [​IMG] & remember the minus sign as its a _slowdown_
    this is the difference between 44100 and 32000 [[ =100-(32000/44100*100) ]]

    edit away
    Once opened you may want to trim the silence at the end, or copy paste so it plays a few times
    knock yourself out

    Export the MP3
    file menu | export it as an mp3 (thats what the LAME download was about earlier)
    make sure to name it "game_name.mp3", else you MAY get a ".bin" ending left over from earlier step if you kept default name throughout

    Other notes
    IF sound.bin is compressed you MIGHT need to open a command prompt and run "gbalzss.exe e sound.bin output.bin".
    obviously use the output.bin for the filename in above steps
    i havent needed to use this so maybe bannertopcm does the decompress automatically?

    And Finally [​IMG]
    i mentioned scripting -

    EDIT == removed some pidgeon code here and added a new post with code that works (for me)

    needless to say - ___not___ my code at all all based on move_dirs.bat from oggzee i believe [​IMG]

    thanks in advance to the wonderful people at cfg loader
  2. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    BTW my fav is super mario galaxy 1 for a message tone

    let me know your favorites, please, as i've only tried a few!!!
  3. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    :: batch file to take a cfgloader folder and create an opening.banner file
    :: its not perfect - it hates ! ("toy story mania!" and it hates the funny dot in Wall@E)
    :: thats cos the cd command cant swap to a dir like that ---ÂÂunsure what thenÂÂcure is
    :: as usual credit oggzee of cfg loader as i ripped most code from him,ÂÂand several DOS web-site re striping text
    :: apologies for not usingthe variable names set - something it claimed to not find wbfs_exe
    ::the code could probably be cleaned up and thing taken out, but it works
    :: i do assume a standard FAT setup, which is a wbfs folder having lots of game folders, and each one has a wbfs in it
    :: note that it WILL fail on things like "hd num sect does match", but there is no log, other than to use the scroll bar and 
    :: to pause it while its running, or if the file just aint there in j:\wbfs
    :: xakmad
    echo off
    set WBFS_DIR="j:\wbfs"
    set WBFS_FILE=wbfs_file.exe
    if NOT '%1'=='' (
    ÂÂÂÂecho Using specified wbfs dir: %1
    ÂÂÂÂset WBFS_DIR=%1
    ÂÂÂÂ:: for %%X in (%0) do cd /D %%~dpX
    ÂÂÂÂfor %%X in (%0) do set WBFS_FILE=%%~dpX\wbfs_file.exe
    ÂÂÂÂecho Error: missing wbfs dir: %WBFS_DIR%
    ÂÂÂÂexit /B
    ÂÂÂÂecho Error: missing %WBFS_FILE%
    ÂÂÂÂexit /B
    VERIFY OTHER 2>nul
    dir "*]" /d /b /o:N -p > temp_wbfs_folders1.txt
    ::type temp_wbfs_folders1.txt
    for /F "delims=" %%I in (temp_wbfs_folders1.txt) do (
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:: IDT1 is the proper path BUT seems ! arent allowed...
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:: IDT2 is to strip the last lot of chars from the end of the path to give the game ID - unsure why now...
    ÂÂÂÂset IDT2=!IDT1:~-7!
    ÂÂÂÂset IDT2=!IDT2:~0,6!
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:: IDT3 is a replace IDT sp1aces with under_scores so that the banner gets named properly
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:: this is cos wbfs_file does not like spaces, at least not with the way i use a variable as below
    ÂÂÂÂset IDT3=%%I
    ÂÂÂÂset IDT3=!IDT3: =_!
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂj:\wbfs\wbfs_file.exe *.wbfs extract_file !IDT2! Opening.bnr !IDT3!".bnr"
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:: wbfs_file extract doesnt let you specify an output path (at least, not in my attempts above)
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmove /y !IDT3!".bnr" "j:\banners\"
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:: have to change to a specific directory instead of cd.. as sometimes the cd avove fails cos of ! and bad characters
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcd /d j:\wbfs\
    again, commetns welcome
  4. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    just me then - LOL
    never mind - PM me if anything needed
  5. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    welcome to the latest edition of the least popular topic on the internet
    to get lots of sound.bin files from the folder (e.g. j:\Banners\"), I wsrote this code
    pop this codew into motepad, and save it as a bat file (e.g. sound.bat) in that same folder

    easy enough to see what it does -
    1. gets directory liosting of all your *.bnr files and writes them top a list
    2. the parse-opening file will extract a sound.bin, a banner.bin and an icon.bin
    3. as each sound.bin would overwrite the previous one, the next bit renames the sound.bin, you can see i have it as "originalname.bnr_sound.bin"
    4. i've remm'ed out the renaming of banner.bin and icon.bin, as we dont need them for this topic
    for completeness, i kept them but you can delete the constantly-overwritten "banner.bin" and "icon.bin" manually once at the end (didnt bother coding it!))

    so now all those mario_kart.bin typr files are ready to import as raw into audacity as described above


    echo off
    dir *.bnrÂÂ/d /b /o:N -p > temp_wbfs_folders1.txt
    ::type temp_wbfs_folders1.txt
    for /F "delims=" %%I in (temp_wbfs_folders1.txt) do (
    parse-opening %%I %%I
    cd meta
    ÂÂ rename sound.bin %%I"_sound.bin"
    ::ÂÂrename banner.bin %%I"_banner.bin"
    ::ÂÂrename icon.bin %%I"_icon.bin"
  6. XFlak

    XFlak Wiitired but still kicking

    Sep 12, 2009
    FYI, I think there is an easier method (easier in my opinion anyways)

    Just use customize mii to load the wad/channel, then extract the audio in WAV form (then u can use any number of audio converting programs to convert to MP3).

    If you are trying to get the sound out of an ISO, just make a forwarder channel of it using "CRAP" (or Loadstructor), then load the forwarder channel/wad using customize mii and extract the WAV.

    Anyways, I would never discourage you from making instructions or a program to make this process easier... but I find the instructions I listed above pretty simple... so food for thought.

  7. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    hi xflak - at last someone commented!!
    i'd been tinkering with the last post to add better code and a bit more background

    to answer the question, i was keen to do this in bulk on a PC with the wbfs files on the ext drive. I dont do WADS or Channels (or discs or duvets!)

    if audacity had a command line to convert the bin i'd be happy, of some other utils that a Wii Wizard could point me to. As you know the experts are all into C. ie not me [​IMG]

    using only 2 batch files (that a fool like me can understand!) i have sorted 480 games, and 3 files (banner sound and icons) for each

    not bad as it took about 2 minutes of each batchfile to run [​IMG]
    but about 10 hours of tinkering with batch files! LOL [​IMG]

    i've enjoyed it, and hope it helps someone

    would love feedback on what applications are out there to do stuff with the icon / banner .bins, though

    all the best
  8. SifJar

    SifJar Not a pirate

    Apr 4, 2009
    Convert pcm to mp3. Get LAME from here :
    (You need more than Audacity plugin version)
  9. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    thanks for that - only been on the case for a few mins,

    D:\meta\meta\Sounds>lame.exe -r "A_Boy_and_His_Blob_[SBLE5G].bnr_sound.bin" boy.mp3
    LAME 3.99 (alpha 10, JunÂÂ7 2010 11:27:59) 32bits (
    warning: alpha versions should be used for testing only
    CPU features: MMX (ASM used), SSE (ASM used), SSE2
    Using polyphase lowpass filter, transition band:ÂÂ8269 Hz -ÂÂ8535 Hz
    Encoding A_Boy_and_His_Blob_[SBLE5G].bnr_sound.bin to boy.mp3
    Encoding as 22.05 kHz single-ch MPEG-2 Layer III (11x)ÂÂ32 kbps qval=3
    ÂÂÂÂFrameÂÂÂÂÂÂÂÂÂÂ|ÂÂCPU time/estim | REAL time/estim | play/CPU |ÂÂÂÂETA
    ÂÂ 269/269ÂÂ (100%)|ÂÂÂÂ0:00/ÂÂÂÂ0:00|ÂÂÂÂ0:00/ÂÂÂÂ0:00|ÂÂ 73.197x|ÂÂÂÂ0:00
    ÂÂ kbpsÂÂÂÂÂÂ mono %ÂÂÂÂ long switch short %
    ÂÂ 32.0ÂÂÂÂÂÂ100.0ÂÂÂÂÂÂÂÂ97.8ÂÂ 1.5ÂÂ 0.7
    Writing LAME Tag...done
    ReplayGain: +8.9dB
    i'll mess about early next week

  10. xakmad

    xakmad Advanced Member

    Aug 28, 2007
    couldnt help myself
    guessing that most people could combine all these scripts into 1 by messing about with the bit inside the loop
    her's my code.
    first time, the loop likes a "set IDT1 o %% I", but again like last time, this code hates it.
    if it had have lioked it, i wouild have trimmed the code, so now you have a filename ending ".bnr._sound.bin.mp3", which isnt great
    anyhow, it still works

    grateful for the feedback, as you can tell., i'm an amatuer who is just getting by and trying to help others.
    it's been a lovely time for me, this was never going to be as popular as, say, a loader, but hey, it's a community/
    any more re BULK banner animations/icons would be nice

    one day i'll build a code to try and extract the contents banner from the iso/wbfs, get the "bnr banner" to seperate bins (banner/sound/icon), and finally (thanks to SifJar and of course a decent lame cmd line) the sound.bin to mp3.

    hoping more people have read this and simply not commented, and thanks top gbatemp for hosting. Maybe i'll help a GUI person out there some day, way beyond me.

    I'll enphasis this is BULK wbfs so far, and i will check back and see if anyone tells me banner or icon stuff

    i'd encourage anyone who is crap (eg me) to get a wee thread going if they have something to give back, nomatter how small

    thanks all

    Posts merged

    echo off
    :: dir *.binÂÂ/d /b /o:N -p > z_dirsounds.txt
    ::type z_dirsounds.txt
    for /F "delims=" %%G in (z_dirsounds.txt) do (
    ÂÂÂÂlame.exe -r %%G __temp.mp3
    ÂÂÂÂrename __temp.mp3 %%G".mp3"