PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Hacking Suite > Resources and Tutorials > Generation 1 & 2

Notices

Generation 1 & 2 RBY and GSC Resources and Tutorials. Mostly for disassembly.

User Tag List

Reply
 
Thread Tools Display Modes
Old 15th July 2013, 01:14 AM   #1
Linkandzelda
RHO つぃちょう
Webmaster
 
Linkandzelda's Avatar
 
Join Date: Apr 2012
Location: United Kingdom
Posts: 286
Linkandzelda Linkandzelda Linkandzelda
Default Pokémon RBY Music Importer

This tool was not created by me, and was posted on PHO in the past by an unknown user. I'm simply reposting it and reviving the tool.

Figured I might as well register and post this here too along with PC and Skeetendo =P (although at first glance this forum appears to be more 3gen+ centered, but whatever)

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. 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
Finally, I'd like to thank:
  • Coolboyman and Melash, for creating a document which helped me figure out the RBY music format
  • Data Crystal, for their Pokemon ROM map

So yeah, that's all. Hopefully this utility will be useful to somebody other than me.
Attached Files
File Type: zip rbyImportBugfix.zip (761.9 KB, 201 views)
__________________





Linkandzelda is offline   Reply With Quote
Likes Elsa liked this post
Sponsored Links
Old 2nd August 2013, 01:54 PM   #2
Lazura
I liek dem Mudkipz, y'know.
 
Lazura's Avatar
 
Join Date: Jul 2013
Posts: 52
Lazura
Default

Wow, cool.This is definate going to help me with my ROM Hack(which is still planned)
BTW, do we have a FamiTracker guide here?
Lazura is offline   Reply With Quote
Old 15th August 2013, 03:22 AM   #3
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 564
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

We don't, although I bet there's a bunch of them somewhere on Google.
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline   Reply With Quote
Old 15th September 2014, 04:42 PM   #4
TheUser
Newbie
 
Join Date: Sep 2014
Posts: 1
TheUser
Default

Having the hardest time locating the offset for the Yellow intro music, what would be called the intro battle section in other versions.
TheUser is offline   Reply With Quote
Old 8th June 2015, 01:46 AM   #5
spartanreptile13
Newbie
 
Join Date: Apr 2015
Posts: 1
spartanreptile13
Unhappy



I'm having a hard time trying to replace the RBY Trainer Battle theme with the XY trainer battle, but I can't find the start offset for the trainer battle.

Help?
spartanreptile13 is offline   Reply With Quote
Old 24th September 2015, 08:10 PM   #6
SirZexx
Mapper
 
SirZexx's Avatar
 
Join Date: Sep 2015
Location: But I live in a box D;
Posts: 13
SirZexx
Default

Let see if this tool can help me put the song I want in....

[Gotta be 8 bit only or it wont work]
SirZexx is offline   Reply With Quote
Reply

Tags
importer, music, pokemon, rby, [Sound]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:58 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts