[FE7/FE8] Fix for getting the full 8 instruments in songs

There was an issue as described in this topic which @Brendor seems to have found a fix for.

For FE7, you just need to go to $3FCD and change D0 to E0. Somewhere there is a function that compares the song ID to 0x5A if it’s < 0x7F or below. (Maybe @Brendor can elaborate on this a little more?)

As Brendor said…

[11:28:44 AM] No-Bark Noonan: changing d0 to e0 negates the comparison
[11:28:44 AM] No-Bark Noonan: and treats every value like the title

We believe in FE8 the same holds true for changing $2900 to 0C E0 but I haven’t had the chance to test it yet - perhaps someone like @AlfredKamon would like to?

8 Likes

@Brendor I love you

Love you too

For anyone that’s interested, the function in question looks like this:

The item of interest here are these opcodes

cmp r0,#0x5A
beq #0x8003FF0

The code is comparing the current song value to $5A which is the title screen music and if it is, branch to 0x8003FF0
By changing D0 to E0, you’re making the code jump there unconditionally

Why all songs don’t act like this, I don’t know

[1:53:31 AM] No-Bark Noonan: you said the game plays 8 tracks right?
[2:03:45 AM] No-Bark Noonan: http://pastebin.com/Z9thaJaP
[2:03:51 AM] No-Bark Noonan: lines 28 and 30
[2:04:22 AM] No-Bark Noonan: they’re using 8 as some variable
maybe you could make it higher

does someone want to test this theory?
change the 8’s at $3FF6 and $3FFA to some higher number like 10 and see if it’ll actually play more tracks

offhand i want to say we tried that already and it started screwing the sound driver (don’t quote me on this)

I tried to change it to see if it would play more sounds (i.e. 9 sounds over 8 tracks) and it didn’t seem to make any difference. It’s entirely possible that the game will still read past 8 tracks but won’t play any, as opposed to its current state where it simply doesn’t read past 8 tracks at all, but I’d have to do a bit more testing when I have access to my desktop. Apologies.

UPDATE: @Brendor and I are in the process of figuring out how to bust the 8-track limit entirely. Looks promising so far. Seems that the game is somewhat limited in a CPU sense: it lags if we increase the track limit too far. Warrants further investigation over the next few days…

Let me know guys. If this is successful it’ll be awesome for MS as well.
Even 8 notes instead of 7 is already good imo.
I just don’t want things to screw up tho.

1 Like

I moved a post to a new topic: [FE7] Getting more than 8 “sounds”

For FE8, change $2900 to 10 E0

2 Likes