[FE7] Getting the full 8 instruments in songs

EDIT: A fix has been found!

Abstract

Current resources indicate that FE7 is capable of playing 8 instruments simultaneously, but actually in most cases the limit is 7, even though the game will read up to 8 tracks. This tutorial will explain how to get the 8th instrument playing all the time, rather than just in the title screen. Presumably the same principles applies to FE6 and FE8; however, as of writing I have not looked into these and thus cannot confirm.

Explanation of terminology

MIDI: A sequence of notes organised into tracks which will play with a given set of samples.

Track: One track from a MIDI.

“Instrument”: The term I use for sample. A sample can be any sampled sound i.e. a pre-recorded sound, from a sound effect like footsteps to an instrument like a base guitar.

Waveform: A sound that the GBA hardware is able to generate on its own. These are erroneously known as “8-bit sounds” or “chiptune sounds”. The game will use these for certain sound effects, such as the cursor flicking through. These do not count as “instruments” and will not be covered in this tutorial.

Sappy engine: Also known as the M4A engine, this is the sound engine that the majority of GBA games utilise to get sound playback.

The problem

If you have ever been hacking with music then you may have noticed by now the very strict limitations of the FE7 music engine. There are, unfortunately, very few ways around this. However, one of the most frustrating parts is the limited number of samples that the game can play at once. Until very recently, it was believed that music worked like this:

Instrument 1
Instrument 2
Instrument 3
Instrument 4
Instrument 5
Instrument 6
Instrument 7
Instrument 8*

*This track is sometimes cut off to play sampled sound effects, such as those heard in battle, or footsteps made by units on the map, or the “fwop” sound made while swapping through stat screens. As sounds like the cursor on the map and most of the internal menu sound effects are made by waveforms, these do not present the same issue.

However, at a certain point one may observe that this rule only applies to music playing in the title screen, and during battles. Everywhere else, it works like this:

Instrument 1
Instrument 2
Instrument 3
Instrument 4
Instrument 5
Instrument 6
Instrument 7*

This, of course causes problems. Having one instrument less in map themes and BGM themes can be detrimental to a song.

The solution

Oddly enough, this is easily remedied by writing the song to an entry in the song table in any value past 0x007F, and making sure that no song before 0x80 besides the title screen music and the opening theme ever plays.

(NB: I still strongly suspect that this is related to the sound room. One may notice that if you change a sound room song to something beyond 0x007F it will not be playable even if the song has played in-game, suggesting a correlation between the two. However, I’ve not the know-how to determine this link so I’ll leave it as pure speculation for now. Still, it might be worth looking into the routine that unlocks songs in the sound room.)

This seems simple enough, since you can just change the bytes in music editors such as the Chapter Data Editor and do your events such that no music in other slots is played. However, it presents a problem when one plays battle music (since there is no editor for this) and other seemingly unchangeable songs such as the armory, battle preparations, etc. But the same can be done with these, you just have to know which bytes to edit. The following are addresses to each byte that controls these themes, followed by the default song table entries that play. Simply change these to entries between 0x80 and 0xFF (you can’t go past 0xFF as they are 1-byte entries only) then change the pointers/priorities of those entries in the Music Array Editor accordingly. You can even just copy and paste the same pointer over.

0x3116C - 0x49 Prepare to Charge
0x680AA - 0x19 Healing
0x680B0 - 0x1A Curing
0x67ECC - 0x1B To the Heights
0x6802C - 0x1D Receive the Blessings of Water
0x67E76 - 0x1F Safeguard (battle version, not BGM version)
0x67E80 - 0x20 Strike
0x7965C - 0x2B Game Over
0x79690 - 0x2C Within Sadness
0xB1368 - 0x4D Armory
0xB1372 - 0x46 Shop

3 Likes

Nice abstract. Much professional.

Makes sense to me. Another “Intelligent Systems at their finest” moment.