We recently ordered a programmer for PIC MCUs at work which happened to come with this cute little demo board, and for whatever reason I got it into my head to make an NSF player out of the bloody thing. This kind of thing has already been done half a dozen times but I suppose I had some notion of building myself a simple "mp3" player.
I've got it playing most tunes reasonably well by now, but emulation-wise it's wildly inaccurate and I was hoping for some tips on how to improve things. I've ended up cutting any number of corners and I don't really know whether I safely can get away with it. So I/O writes are mostly deferred to the next APU frame, code cannot be executed out of RAM and neither frame/DMC IRQs nor 5-step frames nor even frequency slides are implemented yet. Can you guys suggest some "important" soundtracks which rely on me getting these things right?
Oh, and perhaps someone might recommend a good editor for comparing and eyeballing audio waves.
This particular PIC is a bit short on FLASH (about 29k left over for tunes) so a number of my favorite songs just don't fit. Is there a ready-made tool out there for discovering dead code, or perhaps a collection of optimized NSF files?
Finally here's a little sample along with the code. As for the hardware all I've done is to connect a headphone jack straight to a PWM pin, so there's plenty of room for improvement on that front though I do kind of like the minimalism of it all.
I've got it playing most tunes reasonably well by now, but emulation-wise it's wildly inaccurate and I was hoping for some tips on how to improve things. I've ended up cutting any number of corners and I don't really know whether I safely can get away with it. So I/O writes are mostly deferred to the next APU frame, code cannot be executed out of RAM and neither frame/DMC IRQs nor 5-step frames nor even frequency slides are implemented yet. Can you guys suggest some "important" soundtracks which rely on me getting these things right?
Oh, and perhaps someone might recommend a good editor for comparing and eyeballing audio waves.
This particular PIC is a bit short on FLASH (about 29k left over for tunes) so a number of my favorite songs just don't fit. Is there a ready-made tool out there for discovering dead code, or perhaps a collection of optimized NSF files?
Finally here's a little sample along with the code. As for the hardware all I've done is to connect a headphone jack straight to a PWM pin, so there's plenty of room for improvement on that front though I do kind of like the minimalism of it all.