’Cause all games were better on the GBC

You are not logged in.

#1 2014-06-27 17:39:09

G0ld Z!
From: New Bark Town
Registered: 2013-11-01
Post 80/82

[Gen II] Inserting New Music

=====this is a tutorial Heavyweight because even missing details to enhance
the melody, but for now if possible insert correctly midis=====

Welcome, this is one of my greatest achievements in hacking GBC, is to insert a melody rom, include steps to do that we need to have theMIDI2GSC by Froggestspirit.

Putting our own music to the game, is somewhat difficult, but this will
give you more style to our hack, so this is quite necessary

Tools to use

• Gold Finger (or any hex editor)
• Anvil Studio (find on google)
• A-Point
• MIDI2GSC by Froggestspirit
• a MIDI with 4 tracks
• Wordpad
this document about music hacking

Step 1: Separating the channels
First we take a MIDI melody, I will use for the tutorial battle theme Diantha X / Y adapted to 4 channels, the studio will open with Anvil, and immediately see the list of channels and instruments, should be just 4 the channels to be displayed (if there is more need to reorganize so that they are only MIDI 4l), now what we do is separate the melody per channel, each channel will keep bone as a single MIDI, leaving MIDI1.mid, MIDI2.mid, MIDI3.mid and MIDI4.mid.

For this on anvil studio only we click right channels were removed, and we give "Delete Track", leaving only a channel, and we click on file> Save as a MIDI format 0, remember that it is mandatory that each channel is in that format, and keep ready. Repeat the process for the other three channels, and finished with step 1.

Step 2: Loopkng the Channels
Now comes a very difficult step, which is looping the melody, and we should loop each channel manually with anvil studio, for it opened the first channel, and then we'll go on anvil studio to view> piano roll editor

[spoiler=imagen 1]kXDlaNr.png[/spoiler]
Now we can see the notes on channel 1, now play the melody, and when we get to the point where we want to start the melody, we hit pause quickly, and we'll go to where it says "cue" and hit "add", we will display a window for put the name of the loop, there will the opening bracket symbol, I mean "[" Ok we give, and we have already inserted the start of the loop
Now we return to play the melody, and when we get to where we want to end the melody quickly hit pause, and hit again to "add cue" this time we will enter "]" which is where the loop finishes, we click ok, keep as "Midi format 0" and voila, we have our loop inserted, repeat the process for the other channels

Step 3: Assembly the melody
Now we have 4 channels properly looped, proceed to assemble the melody, for it will open the application "Midi2gsc.exe" (requires .Net 3.5 or higher) and we will open a window for file selection, now look at where we left the pc channels, select the channel first, then we will ask the other three channels, selecting channel the program was closed, but we created a file with the name of our melody format. asm, now we copy that file to the folder "songs "that is inside the folder where you have the MIDI2GSC, and we have assembled the melody

Paso 4: Array the .Asm File
Now we need to modify the. Asm that led us, so we must use wordpad, so we open the program, and we will open the file. Asm, now we will open as a common text, now we have to go to where it says "SONG_START_EQU $ 0 "and replace the 0 for the offset where will the melody, using this document we know where are the headers of each tune, I will replace Melody menu continue / new game, and I'll go to a free site, at $ 1E4000 much room considering that before the melody head is located, but as the header occupies $ B bytes, add that amount to self-offset, then the melody will start at $1E400C, then write "SONG_START_EQ $ 1E400C" store and ready, with this stay perfect loop to put the ROM.
[SPOILER=Imagen 3]sfAHULE.png[/spoiler]
Step 5: Generate the Binary file and inserting
Now we will have to create the binary file you insert the ROM, for this go to the folder where we have the MIDI2GSC, and we'll open the application "gscimport.exe" Now we will open the program, and we will locate under "ASM> BIN", and mark the box "inject to rom" and give up more, now hit "load asm" and it opens the window of navigation, and we'll go to songs, and there select the file. asm of our melody, minimize and open a-point, and calculate the 3-pointer bytes where will the melody, copy it, and return to gscimport, and in the first field, under the direction of the. asm, will the direction of where we put the MIDI, and bottom field will pointer 3-bytes of the address above, and give the button "Make BIN", we give you a notice that compile the. bin properly, and then notice that the MIDI was injected into the ROM. Now the melody is inside the ROM.
Step 6: Repointing Channels and Headers
Now open the ROM with gold finger, and we'll go to the head of the melody, in my case $ F7900, the head data are organized as follows:


Thats means:
UV= U determines the number of channels, so it is not necessarily to be 4 channels. to determine this is a somewhat rare form channel 4
0: 0 -1 channels
4: 0 - 2 channels
8: 0-3 channels
C: 0-4 channels, now V determines the channel number (0 to 3), so that These two bytes are a pointer to the channel, in this case channel 1
WW= 2-bytes pointer of Channel 1
XX= 2-bytes pointer of Channel 2
YY= 2-bytes pointer of Channel 3
ZZ= 2-bytes pointer of Channel 1

Now with the Melash document format GBC music we will have to manually rearrange the 4 channels of the melody, now reorganize, save and ready! already have inserted the MIDI in your game ^ ^

Now open your rom and go to the area where you put your midi, check yourself as you stay melody. If you arranged the melody or make a wrong loop point, repeat the process.

My final result as weird, but using the melash document about music you can get a better melody, look the insert MIDI: Pokemon Sterling Silver: Diantha's Battle Theme


#2 2014-06-27 19:45:36

Registered: 2013-01-13
Post 79/112

Re: [Gen II] Inserting New Music

Good tutorial. Now, maybe we won't have as many users asking how to insert music into their game. :)


#3 2014-06-29 15:03:14

From: Dutchland.
Registered: 2013-03-29
Post 1,100/1,200

Re: [Gen II] Inserting New Music

Very good tutorial. Now I can finally hack GSC music instead of stuggling with the limits of R/B/Y.

Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.

“God created the Earth, but the Dutch created the Netherlands.”


#4 2014-06-29 17:25:34

From: Internet
Registered: 2014-06-16
Post 40/45

Re: [Gen II] Inserting New Music

Very good tutorial. Thanks for posting it here.

My Web:
My Hacks:
Pokemon Plasma(Hack of gold currently in progress)
Do not underestimate the power of a beginner hacker.


#5 2014-06-30 16:12:42

Registered: 2013-03-18
Post 349/383

Re: [Gen II] Inserting New Music



Board footer

Powered by FluxBB