Hi all,
I want to include a .nsf file in my game but I am not able to do so. Is there a code available which includes .nsf file and I just need to change the .nsf file to play it?
(I found one here, but it does not work
:
http://0xabad1dea.net/main/doku.php?id=nsf-asm-player )
Thanks in advance
It's possible to include the code from an NSF in a game. But first, I'll need to know 1. what part of ROM address space the NSF covers, 2. what part of RAM its playback engine uses, and 3. how much CPU time it uses. Do you know how to measure these?
No...I am not completely aware of those terms.....
Can we manually set the Loading, playing address of the NFS file?
if we open the NFS file in Nestopia and the see its info ...there we see ROM address that is covered right?
I am not sure of other things u mentioned.
Maybe we need a bit more information. Are you just trying to include someone else's nsf in your game, or did you write it? It'd be a little easier to achieve your goal if you wrote the nsf yourself, with Famitracker for example. It can write out both nsf's, and raw binary data for use in your own NES programs. If you export raw binary data, then you can use the driver provided with Famitracker to play your music in your own program/game. I have a little demo sitting around demonstrating how to do this if you're interested.
Any NSF you include in your own program is going to use parts of RAM for itself. If your program uses these RAM areas too, bad things happen. Either the NSF won't play or your program will mess up or both. You must know where the NSF wants to be located at in memory along with all RAM it ever accesses to reserve that in your program for the NSF.
Here's an older topic that describes the steps necessary:
http://nesdev.com/bbs/viewtopi ... hlight=nsf
You may have to refer to a doc called nsfspec.txt (I think that's the proper name). Hope this helps!