@Simion32: You are correct in assuming that it is a sound-font related issue, but the real sound effect is supposed to use
neither of those source files. The platform sound effect data references a source file (a.k.a. BRR sample) that isn't even loaded in the Life in the Mines sound-font. Thus the sound engine grabs a "random" (well, not exactly) source file from the ones loaded, and plays the sound effect using that one instead.
Relevant ROM Addresses:
92D95-93BBE Sound effect data block (Byte 0x00: Size of block (0xE26), Byte 0x1: SPC RAM Destination (2380), Bytes 0x04-0xF1: Sound effect pointers (in SPC RAM), Bytes 0xF2 and beyond: Sound effect data)
9FF00-9FFD1 BRR source data pointers (3 bytes per pointer; 0x46 source waveforms)
AB245-AB280 Global source set (a.k.a. sound-font) data (Two bytes per source ID; values are offsets to the pointer table above, divided by three; #$FFFF tells the CPU to stop uploading source files)
AB20D-AB244 Song-specific sound-font pointers (2 bytes per pointer; 0x1C songs)
Here is the platform sound effect (sound #$2C) data as it appears at 2C07 in SPC RAM:
- Code: Select all
2C07: 01 19 02 40 40 10 8F FA 0D 06 01 08 A0 03 80 01 A0 04 B1 04 02 22 22 B1 04 00
The very first byte in the data, #$
01, is a control code telling the sound to use the source file with the identifier value immediately following it. In this case, it is #$
19.
In all three DKC games, there are some BRR source files that are always loaded into memory, and others that change depending on which music track is loaded. Let's look at the global set of source files:
- Code: Select all
AB245: 01 00 02 00 03 00 06 00 07 00 08 00 09 00 0A 00 0B 00 0E 00 0F 00 1F 00 20 00 21 00 22 00 23 00 24 00 25 00 44 00 26 00 27 00 28 00 29 00 2A 00 2B 00 11 00 1D 00 16 00 36 00 FF FF
No value #$0019 here...
Now for the set specific to Life in the Mines:
- Code: Select all
AB305: 0C 00 00 00 12 00 15 00 35 00 38 00 04 00 1B 00 FF FF
#$0019 isn't here either. Hmmm...
Similar issues exist in one of the sound effects played when Dumb Drum slams into the ground, and the steel keg sound in the snow levels. Source file #$12 isn't loaded for Bad Boss Boogie or Northern Hemispheres.
This is where I would normally place a link to a patch that fixes these problems, but I ran into problems trying to create it.EDIT: I found what the problem was, so here's the patch:
EDIT 2 (2024-08-29): Uploaded a new, smaller version of the patch with several unnecessary byte changes removed. I must have accidentally selected an unclean ROM when creating the patch.