PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive

Notices

Archive Old threads that serve no purpose are here.

 
 
Thread Tools Display Modes
Old 23rd August 2013, 12:39 PM   #1
Gal
Beginner
 
Join Date: Jul 2013
Location: Israel
Posts: 36
Gal
Default [GBA] Music Hacking

I don't really have a good title for this one, like always...

Another thing, this is NOT a tutorial on music hacking. Here, I will explain about music hacking, not how to do it.

Okay, let's start.

First of all, let's talk about the DirectSound itself. The DirectSound has slots:

  • What are DirectSound slots?
DirectSound slots are the slots for the music. As always, it has a limit.

  • What's the limit?
The limit is simple - 5 DirectSound tracks per moment.

4 slots are for Direct tracks (Overdriven Guitar, Timpani, Acoustic Guitar, etc.), Multi samples (Bright Acoustic, String, etc.) and Drums. The 5th slot is for the GB tracks (Squares, noises, etc.). I found something about it:

Spoiler:
1 Direct track = 1 Direct track (;-;)

1 Multi Sample = 2 Direct tracks

Multi Notes = Every note requires a slot (Example: If the limit is 5 DirectSound tracks per moment, if you have Bright Acoustic playing 5 notes at same time, the game won't be able to play another track at same time)
To extend that, do this:
Quote:
Originally Posted by Jambo51
So, I've gotten sick of being asked for this, so I figured it might be a good idea to share it. It's so short and easy that it definitely doesn't warrant having its own thread, so putting it here seems like a good compromise.
Quote:
Originally Posted by Jambo51

Extending the Number of Direct Sound Tracks on 3rd Gen Pokémon Games

It's as easy as this:

Search for the hex string "00 C5 94 00" in your ROM
Replace said string with "00 CX 94 00" where X stands for the number of maximum DS tracks


Now, there are limits here. Fire Red and Emerald (presumably Leaf Green too) can support a maximum of 12 (0xC) tracks, so you can put 00 CC 94 00 for these ROMs, however, Ruby (presumably Sapphire too) are different. RS can only support a maximum of 7!

BPR - 12
BPG - 12
BPE - 12
AXV - 7
AXP - 7
So now, once we figured out how the DirectSound works, let's move on!


  • Instruments
Instruments in GBA are "telling" the game which sound to play.
The table for the instrument goes like that:
Spoiler:

Direct track:

Code:
00 3C 00 00 MM MM MM 08 NN YY CC ZZ

MM MM MM - Pointer to the sound (Reverse hex ofcourse)
NN - Atk
YY - Dec
CC - Sus
ZZ - Rel


Multi track:

Code:
40 00 00 00 XX XX XX 08 YY YY YY 08
Code:


XX XX XX - Address1
YY YY YY - Address2

Drum track:

Code:
80 00 00 00 XX XX XX 08 00 00 00 00
XX XX XX - Pointer to the sound


Square 1 track:
Code:
01 3C 00 00 XX 00 00 00 ZZ YY MM NN
XX - Square Pattern

ZZ - Atk
YY - Dec
MM - Sus
NN - Rel


Square 2 track:

Code:
02 3C 00 00 XX 00 00 00 ZZ YY MM NN
XX - Square Pattern

ZZ - Atk
YY - Dec
MM - Sus
NN - Rel


Wave Memory track:

Code:
03 3C 00 00 XX XX XX 08 MM NN YY ZZ
XX XX XX - Pointer to the sound

MM - Atk
NN - Dec
YY - Sus
ZZ - Rel

Noise track:

Code:
0C 3C 00 00 XX 00 00 00 MM NN YY ZZ
XX - Noise Pattern

MM - Atk
NN - Dec
YY - Sus
ZZ - Rel


Quote:
Originally Posted by gogojjtech
The gba could handle any instrument you throw at it.
That's true! And there's a thing I wanna say about it. Darthatron explains that better than me:
Quote:
Originally Posted by Darthatron
THIS IS AWESOME!
Yup! This is awesome!

How it works? Simple!
It works with the AMAZING thing people call "voicegroups"!

  • Voicegroups

What the hell voicegroups are?

A voicegroup is a group of the bytes I showed you above.

It can be edited easily using Sappy Mod. If you don't use sappy, just fill out the tables i showed you before one by one.

The order is the order of the instruments:
First table = first instrument
Second table = second instrument
Third table = third instrument
etc.

The GBA is not that smart at all, when it comes to voicegroups. Let's say you put a trumpet sample on address 800000, you repoint the bright acoustic sound to the new trumpet and the game will play trumpet sound!
That's how it works with the Acoustic Grand - in MIDI it sounds like Acoustic Grand but in-game it sounds like drums!

With that, you could import other samples from other games like B/W, D/P/Pt and even R/B/Y!
To do that, follow gogojjtech's tutorial: http://www.pokecommunity.com/showthread.php?t=301027

Now, let's move on to the final part!


  • Songtable
Songtable is a group of pointers to songs, which you import with Sappy. The final song is 12A (346). To extend it, follow my tutorial: http://www.pokecommunity.com/showthread.php?t=303787

__________________________________________________ _________________________________

Okay, we're done!

I hope you enjoyed my tutorial, I worked hard on it!

Credits:

gogojjtech
Jambo51
Shiro
__________________
Odd Jokes:

Spoiler:
#1 - I saw Saw
#2 - Mateo's name is NOT Matt!
#3 - Karatekid is a n00b ROM hacker (;
#4 - LaZ doesn't like deadly metal music (;
#5 - Mateo doesn't like Flannery
#6 - Mateo is a bad guy ;(
#7 - Enough jokes about Mateo (;
#8 - I EM 7 YIRZ OLD
#9 - Ann Oldman
#10 - Stunfisk
#11 - Smexy Lotads

Last edited by Gal; 5th September 2013 at 11:49 AM.
Gal is offline  
Sponsored Links
 

Tags
gba, hacking, music, [Document]

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 04:31 AM.

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