Hacking wav2btsnd - simple tool to create .btsnd files

cathor

Well-Known Member
Newcomer
Joined
Oct 15, 2016
Messages
78
Trophies
0
Age
37
XP
1,119
Country
Thanks , just what i was looking for!

Trying to run this from osx terimnal. What are the arguments for input/output file? any other options/flags available?

tried to run
java -jar wav2btsnd.jar myfile.wav

myfile.wav is 3 sec / 48000khz / 16bit stereo

This is what i get
"You need to provide a 48000khz 16bit steroe .wav as input"

Cheers,
 

BDS

Well-Known Member
Member
Joined
Jan 7, 2016
Messages
179
Trophies
0
XP
297
Country
France
For anyone wondering about btsnd's and loops, afaik they all loop from their loop start value to the end of the stream. The loop start value is the 32bit uint (in big endian) at 0x4 at the beginning of a btsnd.
If you don't want a loop, you just need to loop "silence".

To find the start value you want to set with your wav, either act as if you were about to make a brstm with BrawlBox (for example, if you have another free software that can do custom loops, you're free to share your knowledge) and get the number of samples for the start value or (much more "painful") try to be as precise as possible in some audio editing software (ex: Audacity) when finding the start point and multiply that value (in seconds) by 48000 (the sample rate). Then convert your number of frames in hex, for example with Windows'calc in programmer mode, open your btsnd with a hex editor such as HxD, select the block from 0x4 to 0x7 and (if your value has less than 8 chars, complete it with 0's at the beginning, ex: 296575=>0x4867f=>0x00048674) enter your start point value in hex.
 

galneon

Well-Known Member
Member
Joined
Jul 9, 2006
Messages
254
Trophies
1
XP
536
Country
United States
Thanks , just what i was looking for!

Trying to run this from osx terimnal. What are the arguments for input/output file? any other options/flags available?

tried to run
java -jar wav2btsnd.jar myfile.wav

myfile.wav is 3 sec / 48000khz / 16bit stereo

This is what i get
"You need to provide a 48000khz 16bit steroe .wav as input"

Cheers,

Same problem, only in Windows. File is definitely right, but I get the same error. Tried your syntax and [source] [destination].
 

galneon

Well-Known Member
Member
Joined
Jul 9, 2006
Messages
254
Trophies
1
XP
536
Country
United States
That worked. Thanks!

Edit: Here's my placeholder (dead air) boot sound if anyone wants it.

It can be useful for your Haxchi launcher, or shortcuts to homebrew apps in sigpatched mode. How useful, I don't know--does the absence of a boot sound prevent an application from launching? Beats me, but if an application already has a boot sound, you can replace it with this.
 
Last edited by galneon,

AboodXD

I hack NSMB games, and other shiz.
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates

JohnathanMonkey

Well-Known Member
Member
Joined
Apr 26, 2013
Messages
633
Trophies
1
Age
36
XP
744
Country
United States
yeah its not a compatible wav(i might look into adding support) but for now just run it through audacity(open the wav and then re-export)

When we export this using audacity, what exactly do we need to export this as? I click export, but there doesn't seem to be an option for a Riff wav using audacity. Please see the attached images. I think I am just missing something, but when I replace the bootSound.btsnd, it just plays the original sound like I never replaced it at all.
Capture.PNG

Untitled.png

Here is the WAV file:
Code:
https://mega.nz/#!5wJWiTaY!0fHIdbN0ik43dMxqUecBUWLPPX5Ne5j8PuiA_tkLdNg
 
Last edited by JohnathanMonkey,
D

Deleted User

Guest
When we export this using audacity, what exactly do we need to export this as? I click export, but there doesn't seem to be an option for a Riff wav using audacity. Please see the attached images. I think I am just missing something, but when I replace the bootSound.btsnd, it just plays the original sound like I never replaced it at all.


Here is the WAV file:
Code:
https://mega.nz/#!5wJWiTaY!0fHIdbN0ik43dMxqUecBUWLPPX5Ne5j8PuiA_tkLdNg
Audacity outputs RIFF WAV files by default. You just need to make sure that at the bottom of the screen, you select 48000Hz (the default selection is 44100Hz), then click File -> Export Audio and make sure that WAV is selected as the file format. On the next screen, you will be asked to add metadata to the file, ensure that all these boxes are blank.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
  • TwoSpikedHands @ TwoSpikedHands:
    @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the mail lol
  • I @ I-need-help-with-wup-wiiu:
    i need help with nusspli failed downloads, can someone respond to my thread? pretty please:wub: