Improved Fuzzball rip
Posted: Tue Nov 27, 2018 9:32 am
The music from Fuzzball does not play in EaglePlayer, UADE, DroidSound-E, etc. The tunes do play in DeliTracker.
Were the existing rips were done correctly?
I looked at the original game disk:
If you remove these extra $44 bytes, you get the current fuzzball-title.fred and fuzzball-ingame.fred, so the modules were ripped verbatim. But the replayers don't know how to recognise the extra subsongs piggy-backed into the data, so I split fuzzball-ingame.fred into fuzzball-ingame1.fred and fuzzball-ingame2.fred
Why does DeliTracker load the modules, but not EaglePlayer?
Because DeliTracker has a "fuzzier" load routine.
FredMon modules include both replay code and data. Both the DeliPlayer and EaglePlayer check the module starts with four JMP instructions.The DeliPlayer checks that the init routine roughly starts with MOVE.B $xxxx(PC),D1; CMP.B D1,D0, and allows these to be up to 16 bytes further than expected, while the EaglePlayer requires the init routine to start precisely with those instructions, and doesn't allow any movement. It has 14 such checks on the replay code and they can't be in different places or the module won't load.
I looked at all the other FredMon tunes, and saw that they mostly use the same replay code. I examined how Fuzzball's replay code varied. What I found is that it does some extra little hacks (reading and writing 0.w in memory to turn channels on/off) but is otherwise identical to the common replay code.
So, I tried combining each module's data with the "standard" replay code. This almost works, but I also needed to patch up a couple of offsets in the music data - they are relative to the start of the replay code, and so using different replay code requires the offsets to be corrected.
The result is new fuzzball-title.fred, fuzzball-ingame1.fred and fuzzball-ingame2.fred files which work in DeliTracker and EaglePlayer (and UADE, etc.) Not only do EaglePlayer users get to hear it for the first time, but everyone gets to hear fuzzball-ingame2.fred for the first time. Enjoy!
Were the existing rips were done correctly?
I looked at the original game disk:
- title music is 10898 bytes loaded from sector 934 (offset $74C00)
- ingame music is 27332 bytes loaded from sector 956 (offset $77800)
If you remove these extra $44 bytes, you get the current fuzzball-title.fred and fuzzball-ingame.fred, so the modules were ripped verbatim. But the replayers don't know how to recognise the extra subsongs piggy-backed into the data, so I split fuzzball-ingame.fred into fuzzball-ingame1.fred and fuzzball-ingame2.fred
Why does DeliTracker load the modules, but not EaglePlayer?
Because DeliTracker has a "fuzzier" load routine.
FredMon modules include both replay code and data. Both the DeliPlayer and EaglePlayer check the module starts with four JMP instructions.The DeliPlayer checks that the init routine roughly starts with MOVE.B $xxxx(PC),D1; CMP.B D1,D0, and allows these to be up to 16 bytes further than expected, while the EaglePlayer requires the init routine to start precisely with those instructions, and doesn't allow any movement. It has 14 such checks on the replay code and they can't be in different places or the module won't load.
I looked at all the other FredMon tunes, and saw that they mostly use the same replay code. I examined how Fuzzball's replay code varied. What I found is that it does some extra little hacks (reading and writing 0.w in memory to turn channels on/off) but is otherwise identical to the common replay code.
So, I tried combining each module's data with the "standard" replay code. This almost works, but I also needed to patch up a couple of offsets in the music data - they are relative to the start of the replay code, and so using different replay code requires the offsets to be corrected.
The result is new fuzzball-title.fred, fuzzball-ingame1.fred and fuzzball-ingame2.fred files which work in DeliTracker and EaglePlayer (and UADE, etc.) Not only do EaglePlayer users get to hear it for the first time, but everyone gets to hear fuzzball-ingame2.fred for the first time. Enjoy!