Improved Fuzzball rip

Discussion about Amiga / C64 / Demoscene music and the ExoticA music archive. Favourite music, new rips, musicians, demo sounds, audio software. It's all welcome here.

Moderators: XtC, BuZz

Post Reply
Posts: 126
Joined: Thu Nov 14, 2002 1:58 am
Location: Edinburgh, Scotland

Improved Fuzzball rip

Post by kyz »

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:
  • title music is 10898 bytes loaded from sector 934 (offset $74C00)
  • ingame music is 27332 bytes loaded from sector 956 (offset $77800)
For both tunes, they're loaded to $94BC in memory, but the standard FredMon header begins $44 bytes later at $9500. In the title module, the extra bytes are "nop"s. In the ingame module, they're a routine that looks at what subsong you want to play, and if subsong > 11, it swaps in different song and sample data, and if subsong <= 10, it swaps back the original data. The replayer is patched so the normal init routine calls this, and it then jumps to the usual init routine.

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!

Post Reply