(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-05-24 03:18 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - GBA sound sample hacking made (sort of) easy. New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
SGR

Micro-Goomba


 





Since: 03-05-06

Last post: 6292 days
Last view: 6292 days
Posted on 09-04-06 06:06 PM Link | Quote
So, I decided I'd like to contribute a bit to this board on this fine day. I'm not sure if many of you are interested in hacking GBA sounds, but I might as well post this anyway.

You're going to need a few things:
1 - The ROM you're going to edit. (Don't ask me for one please.)
2 - CoolEditPro/Adobe Audtion. (Same program.) Get it at adobe.com. (It forces you to register, however. )
3 - Hex editor. (If you don't have one already, why are you in this forum? )

Step 1: Open up Adobe Audition/CoolEditPro. Now, see in the top left corner? The little button with sound waves on it? Click that. Next, go to file -> open. Now, go to the directory your GBA ROM you want to edit is. Now, in the "Open" window, see where "files of type" is? Select PCM raw data, and in the file name box, put an asterisk ( * ) and click "Open". Now, you should see your GBA ROM come up. Double click on it or open it.

Step 2: You should now see a window come up. Now, this is where you may need to experiment a bit. For the most part, 10000-11025 is the sample rate that usually works for GBA games. If not, you may need to set it higher or lower. Channels should be mono. Resolution should be 8-bit. Now, yet another window should pop up. You should select "8-bit unsigned." Go on ahead and proceed.

Step 3: Tada! Your GBA ROM is now all audio! You know what this means, right? GARBAGE! Yes, you will burn your ears out looking for samples. I highly suggest you turn down your volume. Anyway, the best way to look for samples is to look for waveforms that go barely over the white lines. Use your mouse wheel (if you have one) or that magnifying glass "Zoom In" button down there to get a good look at it. If you see what you suspect to be an actual audible waveform, click near it and press play. (A yellow dotted line should come up near to where you clicked.)

Step 4: Now that you've (hopefully) found the sample(s) you want to edit, now I'm going to tell you how to edit them! GBA samples have a header before every sound. (It's interpreted as a low-volume *pop* in Audition/CEP.) If you overwrite this header, (which is easily done) the sound will not play. Now, you can do cool stuff with this header. I'm not 100% sure, but you can either extend the sample, make it point to another sample at the end of the ROM, or both. (I haven't messed around with it yet.) Anyway, what you'll need to do is zoom in close enough to where you can "see" the pop. (It should look sort of like a spike. You should be able to easily notice it if you zoom in enough.) Starting a little after that spike, select the entire sample. Right click and select "Copy to new." Save that file as a .raw or .pcm. Heck, you could probably save it as .gba if you wanted, it wouldn't matter.

Step 5: Now, open up your hex editor. Open the .raw/.pcm/.gba file of the sample, and open up the ROM you're editing. Copy the first few bytes of the sample and search for it in the ROM. Remember the offset it begins at! Now, search for the last few bytes. Remember where those end as well. Now open up the sample you want to use to replace the original sample. You may want to use Adobe Audition/CEP to put it in the same settings as the original sample. (I'm using 10000 sample rate, mono, 8-bit unsigned.) Make sure it is the same size as the original sample! Now, copy that and paste over where the original sample began and ended. If done correctly, you should now have your new sample. Test it out in your ROM, and if it doesn't play or you get static, you've done something wrong. Just keep trying and you'll get the hang of it.

If you have any questions or are confused, PM me or ask in this topic. I'll see if I can help.

Have fun!
Zepper

Paragoomba








Since: 09-04-06
From: Brazil

Last post: 6286 days
Last view: 6285 days
Posted on 09-04-06 07:06 PM Link | Quote
Yes, you can even use N64 images. I remember doing the same thing for StarFox64. It's nice, but a HUGE archieve, hehehe
SGR

Micro-Goomba


 





Since: 03-05-06

Last post: 6292 days
Last view: 6292 days
Posted on 09-04-06 07:36 PM Link | Quote
Originally posted by Zepper
Yes, you can even use N64 images. I remember doing the same thing for StarFox64. It's nice, but a HUGE archieve, hehehe


Woah. How? Did you use the same program I'm using?
Zepper

Paragoomba








Since: 09-04-06
From: Brazil

Last post: 6286 days
Last view: 6285 days
Posted on 09-04-06 07:43 PM Link | Quote
If mind doesn't fail, I used Cool Edit. Well, even GoldWave can handle it.
Yoronosuku

Toss Tortoise


 





Since: 11-17-05
From: Massachusetts is my new home..

Last post: 6285 days
Last view: 6285 days
Skype
Posted on 09-04-06 08:22 PM Link | Quote
Um, but the problem with this is it dosn't properly set loop points, what you CAN do is paste the wave over some blank space in the rom and set up the appropriate 10 byte header in a hex editor. Also, 10125 and 13379 seems to be typical "default" frequencies used by the GBA. The only reason you'd get static is if you pasted over the old wav's header really, if you save any 8-bit unsigned wave file as raw and paste it in to your gba rom with a proper header, then it'll work. so much easier than having to open the rom in the wave editor
SGR

Micro-Goomba


 





Since: 03-05-06

Last post: 6292 days
Last view: 6292 days
Posted on 09-04-06 08:26 PM Link | Quote
Originally posted by Yoronosuku
Um, but the problem with this is it dosn't properly set loop points, what you CAN do is paste the wave over some blank space in the rom and set up the appropriate 10 byte header in a hex editor. Also, 10125 and 13379 seems to be typical "default" frequencies used by the GBA. The only reason you'd get static is if you pasted over the old wav's header really, if you save any 8-bit unsigned wave file as raw and paste it in to your gba rom with a proper header, then it'll work. so much easier than having to open the rom in the wave editor


Ah thanks. This is good info. I'll keep it in mind.
Keitaro

Mole


 





Since: 11-18-05
From: Massachusetts

Last post: 6443 days
Last view: 6443 days
Posted on 09-05-06 02:29 AM Link | Quote
Also, what you said about the header was entirely wrong it dosn't extend or point the sample....it contains 10 bytes. The fequency, backwards, determined by a mathimatical formula involving its actual frequency and the base note, the sample's loop points (technically theres 4, being that theres two for each type of loops, unused parameters are 00'd out), and of course the parameteres which state weather the sample loops in the first place, and what I beleive is the base note (this is also sometimes fucked with in the sample instrument headings for individual vgroup entries, but thats generaly only in the case of percussives. typically, anyway). The pointer for the sample itself is located within the respective voice group(s) that are using the sample. if you want to point it somewhere else, just change this pointer theres no parameter which states sample length--technically, they can be as long or as short as you like. However, larger samples mean more CPU usage which can make the sound or even the entire game lag like no tomorrow if too many are in memory at once.
Raccoon Sam

Boomerang Brother
Custom Title








Since: 11-20-05
From: Correct

Last post: 6285 days
Last view: 6285 days
Posted on 09-05-06 02:58 AM Link | Quote
Translations made easy.
Thank you.
FloBo

Goomba








Since: 05-18-06

Last post: 6361 days
Last view: 6286 days
Posted on 09-05-06 05:23 AM Link | Quote
Originally posted by Zepper
Yes, you can even use N64 images. I remember doing the same thing for StarFox64. It's nice, but a HUGE archieve, hehehe



If this would really be possible, you'd easily be able to make them characters actually talk your native language instread of Scramble or English....

have to check this one... perhaps we could just write a program that kind of searches for "non-scratchy" sounds that may be sound samples between all that program code... would be really handy for this one... =)
d4s

Shyguy








Since: 12-01-05

Last post: 6407 days
Last view: 6305 days
Posted on 09-05-06 10:23 AM Link | Quote
Originally posted by SGR
Originally posted by Zepper
Yes, you can even use N64 images. I remember doing the same thing for StarFox64. It's nice, but a HUGE archieve, hehehe


Woah. How? Did you use the same program I'm using?



you guys make it look like this was some kind of special discovery or something.
actually, it isnt.
its common knowledge that games that arent using compressed audio (either hardware-aided sample decompression as used by the snes on the one hand or formats such as mp3 which are usually decompressed by the cpu on the other)
usually store their samples in an 8 or 16bit pcm derivate, which can be played back in any audio editing software that can open raw pcm files.

its just the same with games that store text data in uncompressed ascii format. open the rom in word (or any other text-editor for that matter) and you'll be able to find the text thats used by the game.

the reason why editing audio data by opening the whole rom in an audio-editor isnt that popular is that you are limited to the size of the original sample and that you'll most likely render your rom useless if you insert a sample that isnt exactly the same size as the original.
if youre trying to replace looped instruments, this method is even less useful.


the proper way would be to search for the pointer table that points to the different
samples, dump each sample to a different file, edit these files in an audio-editor, then reinsert them into the rom and update the pointertable and eventual sample headers.


however, if youre just trying to rip samples from games, opening the rom file(s) in an audio-editor is a very good idea. i frequently did that in the past to get instrument samples from cps2 games.
actually, lots of arcade games i've seen use uncompressed pcm audio, often conveniently seperated from program code and graphics data in the sound roms.




Originally posted by FloBo
Originally posted by Zepper
Yes, you can even use N64 images. I remember doing the same thing for StarFox64. It's nice, but a HUGE archieve, hehehe


If this would really be possible, you'd easily be able to make them characters actually talk your native language instread of Scramble or English....



try starfox command if you want your own voice in a game, its one of the few games that put the microphone to good use.
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6285 days
Last view: 6285 days
Posted on 09-05-06 03:22 PM Link | Quote
If I wanted to, I could've added a sample importer to Sappy months ago.

It's hardly worth it.
Keitaro

Mole


 





Since: 11-18-05
From: Massachusetts

Last post: 6443 days
Last view: 6443 days
Posted on 09-05-06 04:20 PM Link | Quote
I guess. Especially when you can put any 8-bit unsigned wave in raw form in to your rom and just point to it with the correct header its not that...difficult.
Zepper

Paragoomba








Since: 09-04-06
From: Brazil

Last post: 6286 days
Last view: 6285 days
Posted on 09-07-06 10:20 PM Link | Quote
Don't think about sample replacement. What GoldWave or CoolEdit does is to read the data using a certain format that's acceptable. In other words, by replacing a sample, you're OVERWRITTING its original sound compression format with something else. The idea of opening ROM imagens in a sound editor is merely for fun, not for hacking. You CAN do it, but remember to get a bad final result...
BMF54123
WARNING: MOOD LEVEL CRITICAL








Since: 11-18-05
From: MOOGLES

Last post: 6285 days
Last view: 6285 days
Posted on 09-08-06 04:54 AM Link | Quote
Just FYI, I had to select 8-bit signed in GoldWave. Unsigned gave barely recognizable garbage.

I can't believe some games devote nearly half of their ROM space to samples, considering the relatively lo-fi nature of GBA digital audio. Seems like overkill to me.
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - GBA sound sample hacking made (sort of) easy. |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.020 seconds; used 422.02 kB (max 527.89 kB)