venoSci wrote:how do I determine that the load address is not $8000? Do I simply look for where the bulk of the hex data (song data) is? In my case, the largest chunk of the data IS located at address $8080 (with $8000 being the beginning of the file)
Oh, don't confuse the offsets inside the file (where the song data always starts at byte $80) with the memory layout of the NES. It's possible Deflemask actually does this (have load=$8080), but I don't use it so I'm not sure.
Your data would be located at $8080 if and only if bytes 8 and 9 of the .NSF header are $80.
Also, don't include the first 128 bytes from the .NSF, that's the header. It's metadata and it doesn't belong in the final .NES file.
(Ok, side note here: if the load address is indeed $8080, you could load the entire .nsf file at $8000 and the song data would in fact then be at $8080, because it would be shifted by the size of the header data, so some programs might even do that on purpose, but it's ugly and somewhat confusing! Just read the addresses from the header and then throw the header away. I know, it might take a bit of wrapping your head around all this)
Here's a quick and dirty diagram:
(I've made a test .nsf that is shown there, but the principle is always the same)
Don't worry about $70-$77, just check it's all zeroes (that means no bankswitching). If it's not all zeroes however, you're not gonna be able to use the simple playback method from the nerdtracker example.
Oh, and you can also ask in the nesdev forums, or in the famitracker.org discord (while this discord server is mainly for famitracker users, there are definitely people who know NES programming and might be willing to help, in the #development channel!).