I uploaded the source of a music hack, if someone needs it:
Put "Sonic The Hedgehog (NES) Improvement V1.0 + Music Hack.nes" into folder, and run build.bat to create a new ROM "Sonic_The_Hedgehog_(NES)_Improvement_V1.0_+_Music_Hack_NEW.nes"
cpu: $8000-$9FFF is a driver/sfx/some common sequences, $A000-BFFF banks with music tracks (see for lines : .PAD $C000,$FF
.base $A000 - this split into other bank) - one track must not be in different banks.
As I remember only "initial bank" works, and others are ignored.
So, after export from famitracker, you split tracks between 8kb banks, and adjust initial bank # (first = $20).
The sound effects/engine:
My own, plays registers values with some sort of compression, uses only 6 bytes.
Some of sfx I took from other games.
Open drv.asm and find " sound0: " to edit. (line 3681)
sound0 hardcoded to triangle, and sound8 to noise, others uses pulse2 (see line 3475 to edit)
You can dump apu registers with this script for Fceux:
f = io.open ("regs.txt", "wb+");
i = 0;
while (i<30) do
a = memory.readbyte(0x4000+4);
b = memory.readbyte(0x4001+4);
c = memory.readbyte(0x4002+4);
d = memory.readbyte(0x4003+4);
io.write (a);io.write (',');
io.write (b);io.write (',');
io.write (c);io.write (',');
io.write (d);io.write (',');
The ram adresses used by ftm driver are $700-$7FF, and several other ZP values described in the beginning of drv.asm file. Make sure that this variables are not used by other hacks.