Sappy and Anvil Studio (Custom Music)
Hey all, welcome back to the blog. This post is going to be covering the process of implementing custom music into a Pokemon FireRed ROM. Now, I know what you're thinking: "Custom music? That sounds both easy and fun!" Sadly, dear reader, it is far from either. Implementing custom music into Pokemon FireRed proved to be a frustrating, hair-pulling process that killed my passion for hacking the game and left me with a meager end result.
So naturally I'm going to show you all how it works!
To begin, we're going to need to download a few applications.
1. Sappy - Sappy is a third-party tool used in extracting, importing, and editing Game Boy music. Sappy can also convert .mid files into In this case, we're going to be using it for Pokemon FireRed. Note: Sappy is very stubborn and may not always work for some people. This can be due to a missing dependency or operating system incompatibility. I am running a Windows 10 PC and have not run into any problems of the sort with Sappy (yet). Do NOT proceed with any installation procedures with Sappy until I cover it later in this post.
2. Anvil Studio - This application allows for running .mid music files, editing instruments played in the files, and more. Anvil Studio is integral for implementing custom music into designated voicegroups in your Pokemon game, which I'll explain more about later.
On the download page for Sappy (hyperlinked above), first click the link that says "Download Sappy Installer." Download it directly from its DropBox and place the zipped file in a folder on your PC. Unzip the folder and run "Installateur_Sappy.exe" and go through the setup wizard. Uncheck the box that says to run Sappy now, go back to the webpage for Sappy, and click "Download Sappy 2006 mod 15". With this folder, we're going to place the sappy.exe that came with this download and replace the sappy.exe that came with the previous folder's download.
Now, let's run Sappy. Upon running the executable, you should be greeted to a screen that resembles this:
Under "File", click "Open" and select the Pokemon FireRed ROM you've been using. Click the green play button to test it out.
Now, let's go over some of what those various numbers on screen meant.
The red-pink numbers under the hexadecimals represent the instruments being played in that track. Each music track has its own assigned voicegroup. A voicegroup is like a collection of various instruments stored together in a certain value inside a ROM. If you want your custom music to sound good and accurately when importing it into Sappy and your game, you'll need to assign your .midi instruments accordingly into a specific voicegroup, which I'll touch on later. More information on voicegroups can be found here.
Alternatively, if working alongside voicegroups sounds too complicated or time-consuming, a patch was created by the ROMhacking community that integrates all 127 MIDI instruments inside a "universal" voicegroup to Pokemon FireRed. The patch and more information for it can be found here.
With Sappy running and set up, its time to load in a MIDI. Your installation of Sappy should have come with a file that reads "Futaba_Town.mid" (The directory for it should look like "SappyMid2Agb\Mid2Agb\mid". If you cannot find it, I'll also post it here). Though you're free to download whatever MIDI you'd like, I'll be using this for the sake of the tutorial. Move the track into the Mid2Agb folder, and open the file in Anvil Studio.
We need to set a loop for the song so that it plays again after hitting a certain point in the song. Click "Edit Track" and it'll take you to a piano roll editor. Left-click a spot in the time space, click "New Cue", and type in an opening bracket "[" when the text prompt appears. This is your starting loop point. Choose a later spot for the loop point that will bring you back to the starting loop point, typically the end of the song, and type in a closing a bracket "]". Click File -> Export MIDI-Format 0 file, and save your new track. Then, drag your new file into mid2agb.exe to generate a ".s" file of that music track. This file format is used in importing the song into the Game Boy Advance ROM.
If we re-open Sappy, we can replace Pallet Town's music for the custom track we just created. In Sappy, click "Assemble Song".
Base destination offset refers to the hex space the .s file will be stored in the ROM. Voicegroup offset is the voicegroup to be used with this track (If you're using the all-instruments patch, use 0xB30C5C). Ignore the last box and click Cook It. Now, let's listen to the result:
Its not perfect, but it works! For further testing, I also decided to add another song, this time using the all-instruments patch. This replaces the Pokemon opening with the theme of the second opening of the anime "Jojo's Bizarre Adventure," which you can also download from my earlier Google Drive link.
So naturally I'm going to show you all how it works!
To begin, we're going to need to download a few applications.
1. Sappy - Sappy is a third-party tool used in extracting, importing, and editing Game Boy music. Sappy can also convert .mid files into In this case, we're going to be using it for Pokemon FireRed. Note: Sappy is very stubborn and may not always work for some people. This can be due to a missing dependency or operating system incompatibility. I am running a Windows 10 PC and have not run into any problems of the sort with Sappy (yet). Do NOT proceed with any installation procedures with Sappy until I cover it later in this post.
2. Anvil Studio - This application allows for running .mid music files, editing instruments played in the files, and more. Anvil Studio is integral for implementing custom music into designated voicegroups in your Pokemon game, which I'll explain more about later.
On the download page for Sappy (hyperlinked above), first click the link that says "Download Sappy Installer." Download it directly from its DropBox and place the zipped file in a folder on your PC. Unzip the folder and run "Installateur_Sappy.exe" and go through the setup wizard. Uncheck the box that says to run Sappy now, go back to the webpage for Sappy, and click "Download Sappy 2006 mod 15". With this folder, we're going to place the sappy.exe that came with this download and replace the sappy.exe that came with the previous folder's download.
Now, let's run Sappy. Upon running the executable, you should be greeted to a screen that resembles this:
Under "File", click "Open" and select the Pokemon FireRed ROM you've been using. Click the green play button to test it out.
Now, let's go over some of what those various numbers on screen meant.
The red-pink numbers under the hexadecimals represent the instruments being played in that track. Each music track has its own assigned voicegroup. A voicegroup is like a collection of various instruments stored together in a certain value inside a ROM. If you want your custom music to sound good and accurately when importing it into Sappy and your game, you'll need to assign your .midi instruments accordingly into a specific voicegroup, which I'll touch on later. More information on voicegroups can be found here.
Alternatively, if working alongside voicegroups sounds too complicated or time-consuming, a patch was created by the ROMhacking community that integrates all 127 MIDI instruments inside a "universal" voicegroup to Pokemon FireRed. The patch and more information for it can be found here.
With Sappy running and set up, its time to load in a MIDI. Your installation of Sappy should have come with a file that reads "Futaba_Town.mid" (The directory for it should look like "SappyMid2Agb\Mid2Agb\mid". If you cannot find it, I'll also post it here). Though you're free to download whatever MIDI you'd like, I'll be using this for the sake of the tutorial. Move the track into the Mid2Agb folder, and open the file in Anvil Studio.
We need to set a loop for the song so that it plays again after hitting a certain point in the song. Click "Edit Track" and it'll take you to a piano roll editor. Left-click a spot in the time space, click "New Cue", and type in an opening bracket "[" when the text prompt appears. This is your starting loop point. Choose a later spot for the loop point that will bring you back to the starting loop point, typically the end of the song, and type in a closing a bracket "]". Click File -> Export MIDI-Format 0 file, and save your new track. Then, drag your new file into mid2agb.exe to generate a ".s" file of that music track. This file format is used in importing the song into the Game Boy Advance ROM.
If we re-open Sappy, we can replace Pallet Town's music for the custom track we just created. In Sappy, click "Assemble Song".
Base destination offset refers to the hex space the .s file will be stored in the ROM. Voicegroup offset is the voicegroup to be used with this track (If you're using the all-instruments patch, use 0xB30C5C). Ignore the last box and click Cook It. Now, let's listen to the result:
Its not perfect, but it works! For further testing, I also decided to add another song, this time using the all-instruments patch. This replaces the Pokemon opening with the theme of the second opening of the anime "Jojo's Bizarre Adventure," which you can also download from my earlier Google Drive link.
Comments
Post a Comment