Sonic65
welp
- 27
- Posts
- 14
- Years
- Age 30
- Columbia, Maryland
- Seen Mar 10, 2011
Figured I should probably register and post this here too, since this thread here was a big help to me...even if this entire post is basically just a copypaste from the Pokecommunity one (well, will be as soon as it gets approved anyway)
Anyway, I've been researching R/B/Y ROM hacking for a short while now, and I found that there was little real documentation or tools on the music side of the game (well actually in general, compared to 2nd/3rd gen). So I made this program to import music into an R/B/Y ROM - more specifically, import .ftm songs made with the program Famitracker, a music tracker for the NES.
What does it support?
What doesn't it support?
Files in zip:
To illustrate how to use RBY Music Importer, we're going to import the sample song (route202.ftm) and replace Pallet Town's music with it. Here's a step-by-step guide (I suck at writing tutorials but hopefully you'll understand this):
There doesn't appear to be any hard-set formula for converting Famitracker song tempo into PKMS song tempo, but here are a few tempo matchups which might be useful to you:
Finally, I'd like to thank:
So yeah, that's all. Hopefully this utility will be useful to somebody other than me.
Anyway, I've been researching R/B/Y ROM hacking for a short while now, and I found that there was little real documentation or tools on the music side of the game (well actually in general, compared to 2nd/3rd gen). So I made this program to import music into an R/B/Y ROM - more specifically, import .ftm songs made with the program Famitracker, a music tracker for the NES.
What does it support?
- Importing of all 4 basic sound channels (square 1/2, triangle, noise)
- Both .ASM and .BIN export
- Quick ROM inject feature for .BINs
- Famitracker note fade-outs (using the volume column) and duty cycle changes (by changing instruments)
What doesn't it support?
- MIDI import or any other file format other than .ftm
- Any Famitracker effects
Files in zip:
- rbyImport.exe - The actual RBY Music Importer program.
- blitz3d_gui_dll.dll - A DLL the program uses.
- readme.txt - Derp. Doesn't have anything this post doesn't anyway.
- route202.ftm - Sample FTM file to import (used in tutorial below). A NES/GB demake of the Route 202 theme for Pokemon Diamond/Pearl.
- noiseChannelDoc.txt - Documentation on the music format Pokemon R/B/Y uses for noise channels (this didn't seem to be documented anywhere, so I investigated it myself - it's different from the regular music channels, and uses drum presets)
- pkms.asm - Macros and equates for ASM files created with RBY Music Importer. (PKMS is what I call the Pokemon RBY music format, standing for Pokemon Music System)
- rgbasm.exe - GB compiler, part of RGBDS suite
- xlink.exe - GB linker, part of RGBDS suite
How to Use: A Tutorial
To illustrate how to use RBY Music Importer, we're going to import the sample song (route202.ftm) and replace Pallet Town's music with it. Here's a step-by-step guide (I suck at writing tutorials but hopefully you'll understand this):
- Open up RBY Music Importer and go to the FTM->ASM section. Load route202.ftm using the Load FTM button.
- Using the DataCrystal ROM map of Pokemon Red, you'll find that Pallet Town's music data starts at $A7C5, so put in $A7C5 as the start offset.
- Check the "Import noise channel" box. You don't need to change the tempo for this particular song, but you might need to for other songs (more on that later).
- Click the "Make ASM File" button. RBY Music Importer will generate an .asm file called route202.asm. At this point you have one of two options: either you can go and tweak the ASM file (changing notes, adding effects like vibrato and modulation, etc.), or just proceed straight to .BIN conversion. Let's go straight to .BIN conversion and injecting, for the purposes of this tutorial.
- Go to the ASM->BIN section and load the route202.asm file we just created.
- Click the "Inject music into ROM" checkbox.
- Set $A7C5 (the same offset as above) as the injection offset. (If you changed the start offset in the ASM file, you'd put that value here instead.) Using the same ROM map as above, you'll find that Pallet Town's song pointers start at $822E, so input that for the pointer offset.
- Click the "Compile BIN File" button.
- Done! If you did everything right, when you load your RBY ROM, Pallet Town's music should be replaced with Route 202!
Special Notes
There doesn't appear to be any hard-set formula for converting Famitracker song tempo into PKMS song tempo, but here are a few tempo matchups which might be useful to you:
Code:
$E0 - speed 6, tempo 85
$D0 - speed 6, tempo 90
$C0 - speed 6, tempo 100
$B0 - speed 6, tempo 110
$A0 - speed 6, tempo 120
$90 - speed 6, tempo 140
$80 - speed 6, tempo 160
$70 - speed 6, tempo 180
$60 - speed 6, tempo 200
$50 - speed 6, tempo 220
$40 - speed 6, tempo 260
$30 - speed 6, tempo 340
- Coolboyman and Melash, for creating the document I linked
- Data Crystal, for their Pokemon ROM map
So yeah, that's all. Hopefully this utility will be useful to somebody other than me.
Last edited: