Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

PGM is all set for February. This month, we're playing through a game known as Eevee's Tile Trial. If you wish to earn rewards, please head over to our event thread by clicking on the provided link and give yourself a shot at the game!

Hey Unregistered! How fast can you game? The Marathon II is up and running in Video Game's - compete against your friends to see how quickly you can complete sixty intense in-game challenges. See you there!

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.

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.

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:

Well this looks certainly interesting, but do you think you could post how this would be more beneficial then using Sappy, or if it's different as a whole. Because I haven't tried it and don't see reason to until I know exactly what it can do better than what we have.

An NSF file is literally just a modified NES ROM, with only music code and data - since the format of music data and how it's played differs from game to game, there's no standard format and it can't really be done (although VirtuaNSF has a keyboard player thing for NSFs, I might look and see how that's done). You'll have to do with manually recreating songs in Famitracker (or composing new original ones).

I might be able to put in MIDI support later down the line, but that's just a pipe dream for now.

An NSF file is literally just a modified NES ROM, with only music code and data - since the format of music data and how it's played differs from game to game, there's no standard format and it can't really be done (although VirtuaNSF has a keyboard player thing for NSFs, I might look and see how that's done). You'll have to do with manually recreating songs in Famitracker (or composing new original ones).

I might be able to put in MIDI support later down the line, but that's just a pipe dream for now.

Updated OP with new bugfixed version, which should hopefully fix some of the bugs people are having. (Thanks to Team Fail for his help with this, even though we could never get it completely working on his computer )

Quote:

Would this work for Pokémon Gold? Also, how would I port R/B/Y music over to Gold?

If you changed the equates/macros in the pkms.asm file it could probably work, at least with the first three channels (noise channel values are hardcoded as of now, so you'd need to change those manually in the .asm file that RBY Music Importer outputs before compiling the .bin). This document is a pretty good resource for the G/S/C and R/B/Y music format (though I had to find the RBY coordination flags myself, but those are already documented in pkms.asm).

As for porting music from R/B/Y, that's not something this tool allows you to do (unless you resequence the entire thing in Famitracker, LOL) - you'd have to do that manually in a hex editor (changing pointers and all).

Too bad, this program has no Apreggio and ''4XX'' support.
PS: The ''4XX'' effect is a feature which is used in Game Boy games like Tetris, Name Entry.
I hope you will make a new version with support for that.

__________________

The ones who still ask what they know, just go walk long on a short pier!

The PokéCommunity

Meta

Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, or The Pokémon Company International. We just love Pokémon.