
The Gameboy program Pounder by 8cylinder lets the user trigger drum samples using the buttons and the directional pad. By hacking and replacing certain sections of the Gameboy ROM file, it is easy to replace the samples that are triggered. The aim of this post is to get you started - there are few different ways of going about replacing the sample data inside of the ROM.
What You Will Need
• Max/MSP or Max/MSP runtime (free) from Cyclin74.com
• The audio2fourbits_cr.maxpat Max/MSP patch
• Spreadsheet editor such as Microsoft Office or Open Office (free) from OpenOffice.org
• The dec2hex.xls MS Excel spreadsheet
• A hex editor such as HexFiend for OS X (free) from RidiculousFish.com
• The pounder2_001.gb Gameboy ROM file from 8cylinder
1. Load and Create New Sample

The OVERSAMPLE field lets you adjust the sample rate of the sample output data. For example, if your original sample has a sample rate of 44.1KHz, an OVERSAMPLE rate of 2.0 will divide your sample rate by 2 and so on. Once you have adjusted the SAMPLE RATE field, hit the STOP then the CLEAR button. Finally, hit the GO button. The sample is converted into 4 bit audio data.
Open the text object by double-clicking on the "text" object to the left of the READ button. Copy the entire contents of the text object into your copy clipboard.
2. Sample Position
The following list shows where each sample is in the ROM file. The following parameters are shown: sample number, sample length in bytes (not audio samples), sample offset in ROM file. As a reference point, sample #0 is equivalent to the sample that is triggered from bank A when the A button is pressed.
0 - 468 @ 16400
1 - 468 @ 32784
2 - 468 @ 49168
3 - 468 @ 65552
4 - 468 @ 81936
5 - 468 @ 98320
6 - 468 @ 114704
7 - (blank?)
8 - 469 @ 147472
9 - 471 @ 163856
10 - 469 @ 180240
11 - 468 @ 196624
12 - 540 @ 213008
13 - 470 @ 229392
14 - 468 @ 245776
15 - 540 @ 262160
16 - 1124 @ 278544
17 - 569 @ 294928
18 - (blank?)
19 - 89 @ 327696
20 - 49 @ 344080
21 - 534 @ 360464
22 - 900 @ 376848
23 - 613 @ 393232
3. Generate HEX Numbers in Spreadsheet

Open the dec2hex.xls spreadsheet. Delete all of the data contents of the column marked Data. Paste the contents of the clipboard to the column marked Data. The two columns marked High Nibble and Low Nibble will automatically re-calculate.
Copy the entire data contents of the two columns marked High Nibble and Low Nibble into your copy clipboard.
4. Edit the Game Boy ROM File

Repeat these four steps to replace all samples in the ROM.
5 comments:
DAWWWWWWWWWWWWWWWWW. AWESOME.
Definitely going to be trying this out soon. Could be really useful for playing live. Nice work, Seb!
How have you fond sample's positions into the rom?
@ aggaz: I opened up the rom in a sample editor, and found areas that seemed like they could be samples.
yer the best little-scale! thanx a lot for this!
Post a Comment