Hi edale,
Update to the ship music, it contains the water wave sound effects now!
In the original game, the water waves sound effect was produced separately from the music score. This made the water have a pseudo-random placement in time with respect the music score. When I rewrote this for Namco-163, I used the noise channel for a snare drum in the second half of the song. However, you could not hear it because the wave sound effect interfered. The waves were written to the noise channel control registers so often that very little could get through from the music score.
I figured out how to disable the wave effect and hard-coded my own wave effect into the music score. This way I can stop the waves when it is time for me to play the snare drum. I think it turned out pretty good! The original waves used a fixed frequency band on the noise channel. I am now shifting around the frequency band for a more choppy / breaking through waves effect.
Video:
https://youtu.be/P_NwAGQgWPsFiles:
https://sites.google.com/site/benboldt2/files/ff_namcot_ship.zipI do have info about the sound engine, mostly provided by Disch who originally put this together. I have mostly been writing music scores/wave shapes/envelopes/etc, with some small hacking here and there as needed. I know that the sound engine starts at ROM file address 0x3C010 (which is Page 0x0F, address 0x8000 in the Namco-163 memory mapping). You can search for this data signature:
A5 4B 30 5C F0 0C
which disassembles to:
A5 4B = LDA 0x004B ;Load the contents of RAM address 4B into the accumulator
30 5C = BMI 0x8060 ;If bit 7 is set in the accumulator (i.e. '
MInus' or negative), branch to address 0x8060
F0 0C = BEQ 0x8009 ;If the accumulator
EQuals 0x00, branch to 0x8009
The Nintendo runs the music engine with a JSR to 0x3C010. This gets called each VBlank. I am not familiar with how NSF works, but it is a safe bet to get the Vblank connected to this point of the code somehow.
RAM address 0x004B contains the number starting at 0x41 that you played around with earlier. I think it is a matter of putting the correct number into 0x004B, getting the sound engine to initialize and start, and calling that function at 0x3C010. In fact, the '4' in 41 may serve as a bitfield with the 'initialize/start' bit set! I am not sure on that but it seems like an idea consistent with the approach of checking bit 7 as seen above.
It might be a lot easier said than done though. I really have no clue because I have never made an NSF before. As we get farther along, we can figure out how to do NSF. For now we at least have the Game Genie codes to get by with.