how to create custom .nsf file?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
infidelity
Posts: 486
Joined: Fri Mar 01, 2013 4:46 am

how to create custom .nsf file?

Post by infidelity »

in my Zelda romhack, I used the Capcom 6C80 Sound Engine. So I borrowed an .nsf file of Megaman 4, to see if I can pull off my roms music/sfx being in an .nsf file.

I looked at the nsf file in a windows hex program, and I notice that $80 is the start of where the sound engine starts. So what I did, was copy my entire sound engine in my rom from $B0010-$B4000 (4000 bytes), and pasted it into $80 of the .nsf file.

So to my surprise, it starts playing the tunes that are located within $8000-$BFFF.

Now, this sound engine allows you to bankswap to expand the addresses used to load additional songs & sfx, by allowing you to use address from $C000-$DFFF. But, it's not playing those songs in the .nsf file.

So within the nsf file I did....
$80-$407F (4000 bytes) = sound engine and songs/sfx

so I figured $4080 within the .nsf file would be the starting point for $C000-$DFFF.
$4080-$4F30 = $C000-$DFFF music in sound engine

So could someone please help me out on getting my additional music to play?

Thank You!

edit
nm I figured it out! turns out within the Capcom 6C80 sound engine .nsf files, the sound engine has that check for addresses in the $C000-$DFFF range EA'd out, stopping the sound engines bankswap routine kicking in. So I did the same, and now my .nsf is playing my music/sfx within the $C000-$DFFF range. :-)
Post Reply