You are not logged in.
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.
Example of what this program can output (in-game sound recording)
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:
$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
Finally, I'd like to thank:
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.
Offline
It never asked me for the song pointer offset.
Offline
It never asked me for the song pointer offset.
Wait, it didn't? Did you say Yes when it asked you whether you wanted to inject the song in or not?
Works fine on here and on the other computers in the house.
Offline
It never asked me for the song pointer offset.
Wait, it didn't? Did you say Yes when it asked you whether you wanted to inject the song in or not?
Works fine on here and on the other computers in the house.
Yeah, I said yes.
Offline
You could've atleast made it possible to show errors. Whenever I try to compile to bin it throws a compilation error at me and when I attempt to view the errors the prompt closes before I can so I don't know what the problem is. Fix it please.
EDIT: I tried a different file and it just caused my game to freeze when the music was supposed to play.
Offline
Updated OP with new version (the interface's also been slightly changed, so check the also-updated tutorial if there's any confusion). Hopefully this will fix some of the bugs people are having.
Offline
Looks like a useful tool. Haven’t tried it yet, but I certainly like the idea.
This seems like a pretty nifty program. I haven't tried it out as I don't hack Red myself, but I'm sure people will find it useful. Do you think it would be possible to make a version that compiles songs in the GSC format as well?
I am not very active on this forum. I only pop in from time to time.
Offline
I'm not that big fan of D/P/P but that was just amazing in R/B/Y :D
Btw Sonic65, you made a really nice tool (and the one for G/S/C wouldn't hurt either) ☺
Offline
This seems like a pretty nifty program. I haven't tried it out as I don't hack Red myself, but I'm sure people will find it useful. Do you think it would be possible to make a version that compiles songs in the GSC format as well?
Still does not work. Still freezes the game when the music loads. Only route202.asm has worked so far.
Offline
Still does not work. Still freezes the game when the music loads. Only route202.asm has worked so far.
Can you attach/send the .ftm file you used? All the .ftms I tried are working (though most of them are ones I've composed/sequenced myself).
Alternatively, try importing without the noise channel enabled.
Remember, it doesn't support Famitracker effects as of now (this shouldn't cause any huge problems because the code skips over them but maybe there's a bug there).
Offline
Here is the ftm file. I'm trying to overwrite Route 12's music:
Offline
Btw, did you guys have RSE trainer battle song ftm?
If yes, could you guys posting to this thread pleease..,
I've the song too, but I can't play it in Famitracker.,
So, I need your help guys.. :)
[POKÉMON JOURNEY] hacking planning 2012
Visit my website www.pokemonhackingblog.blogspot.com
Offline
Try pkmsSetMod
This isn't easy to say, but…
Music and ASM hacker
Offline
THE LINK is dead
reupload plz
Offline
I have decided to re-upload rbyImport, so everyone who hasn't dowloaded it but wanted to can also enjoy the program.
Credits to Sonic65.
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker
Offline
Theres a bit of a problem... I can't find a rom for Pokemon Red/Blue/Yellow that has a format of .gbc, or .bin, Can you add .gb, Video Tutorial, a more specific Tutorial or am I doing something wrong? I just made this Awesome remake of the music from Deku Palace from Majora's mask in Famitracker. If not can you at least tell me where to find the correct ROM?
(EDIT: I found out you can just change the .gb into the .gbc format and still work, I just feel stupid now.)
(EDIT 2: Now it keeps crashing when it trys to play, I got the pointers Right, I will give you a download link to the FTM file.)
(Deku Palace: http://www.mediafire.com/download/bbm8m … Palace.ftm )
Also when I check the asm file, It shows that its blankish, None of the channels, There REALLY needs to be a video tutorial.
Last edited by Deathkiller90 (2014-11-13 01:09:50)
Offline
Theres a bit of a problem... I can't find a rom for Pokemon Red/Blue/Yellow that has a format of .gbc, or .bin, Can you add .gb, Video Tutorial, a more specific Tutorial or am I doing something wrong? I just made this Awesome remake of the music from Deku Palace from Majora's mask in Famitracker. If not can you at least tell me where to find the correct ROM?
(EDIT: I found out you can just change the .gb into the .gbc format and still work, I just feel stupid now.)
(EDIT 2: Now it keeps crashing when it trys to play, I got the pointers Right, I will give you a download link to the FTM file.)(Deku Palace: http://www.mediafire.com/download/bbm8m … Palace.ftm )
Also when I check the asm file, It shows that its blankish, None of the channels, There REALLY needs to be a video tutorial.
Edit 1: :P
Edit 2: There are a lot of things that are needed to make this method work, and it can be very difficult and tedious to make it all work properly. You need the right versions of FamiTracker to make working FTM's. I recommend to make them in 0.3.6 and then open them in 0.3.5 and overwrite them in that version after you set New style to Old style in the module properties.
Also, the FTM's can't be too complicated because the program as far as I know only recognizes the length of each note by the volumes you have typed in the note bar, the pulse duty you gave an instrument and the notes itself.
In the most cases, you need to edit the output ASM manually because the program puts random mistakes in it. If want it, you could also edit the ASM a little to make it even better before you inject it into the ROM. When you inject it, you have to give an offset and pointer of an existing song to replace (example: Pallet Town: offset = $A7C5, pointer = $822E).
If you are good at hex editing, you can even edit the code of your song and make it fancier with effects like arpeggiated duty, which I did once.
A short tutorial from me, I hope it helps you and maybe other people a bit. ;)
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker
Offline
At this point, you're better off composing a midi and using mtolly's pokemid to create a source file that works with pokered.
Offline
I just started this FamiTracker thing, and I wish I knew how to bring the Deku Palace thing into 0.3.5... Because the version i'm using is the Newest one.
Offline