Talk:NSF

From NESdev Wiki
Revision as of 17:05, 31 March 2012 by Zepper (talk | contribs)
Jump to navigationJump to search

A NSF tune is perfectly playable in an emulator; in short words, a "normal" NES emulator, not something clipped for exclusive NSF playing and behaviour.

Regarding 4015h, well... it's empirical. My experience says that setting 4015h to 0Fh is required in order to get *a lot of* tunes starting playing. I don't remember of *any* broken tune by setting such value. So, it's recommended *to follow* such thing. --Zepper 14:25, 29 March 2012 (PDT)

Adding NSF support involves a mapper, an executable format, and a piece of shell code to draw the title, artist, and publisher, run the player in a loop, and switch tracks. But you're right that an emulator incapable of playing NSF is incapable of emulating something that runs on an NES, as the PowerPak has an NSF player. --Tepples 20:29, 29 March 2012 (PDT)

Yup, I assigned mapper 256, since iNES cannot assign it. And yes, it's required a player (I wrote my own in asm) and commands to switch tracks, but that's all. Perhaps I wasn't crystal clear... :( --Zepper 14:31, 30 March 2012 (PDT)

NES 2.0 can assign mappers up to $FFF.F. Yes, that's a hexadecimal point, used to separate the mapper number from the variant number. No variants are officially assigned though. --Tepples 15:00, 30 March 2012 (PDT)

I admit that my first statement sounds like "any NSF file can be loaded into any NES emulator", which isn't true. Proper support for NSF is required, as tepples noted. So, the emulator must create a mapper (I assigned 256, since iNES 1.0 cannot assign it), a player (I use 6502 code loaded at $4018-$4FFF) and controls for changing tracks, plus the frame rate control. The NSF header is parsed and then the file is loaded as specified by the document. Sorry for the confusion! --Zepper 10:05, 31 March 2012 (PDT)