Portable NSF/MP3 player

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Portable NSF/MP3 player
by on (#90495)
Hello there guys! Recently, i've become interested in making of portable nsf\mp3 player, due to my own interest in NES music and science project in the institute i have to do. I want to tell you about what i've found so far on this subject, and would like to hear any suggestions and advices you can help with!

First of all ideas was to made NSF player using existing open source libraries, or even whole open source NSF player. But problem is, most of NSF players i've found requieres around 166-500 MHz CPUs, so bassicaly it would be hard to run on something like Atmel's microcontrollers, on which i was going to made this project. Also i've found this thread:

http://nesdev.com/bbs/viewtopi ... a75f285283

But as far as i can see, nothing came out from there. It's just noone really needs device like this nowdays, just amateurs-enthusiasts like me. So if anyone can help with some information about existing NSF player on microcontroller, let me know!

Second idea was to write my own NES APU emulator and use it in player, but this seems like a very time consuming activity. But hey, i've found some guy who made NSF player on TurboGrafix 16, and this is just incredible. It's quite possible to code it not harsh on CPUs frequency i guess.. So again, if there's some article about writing your own NSF player, let me know!

by on (#90496)
There was also an idea to build whole project around MP2520F signal processor, which seems like a legitimately good idea, since it's already powerful enough. On the other hand it's not that smart to make portable player on MP2520F, since there are existing devices that can do the same. Idea behind using Atmel's microcontrollers is neat, and cheaper i guess, hm..

by on (#90498)
TG16 has CPU that is compatible with NES but few times faster.

What exactly the Atmel MCUs you intend to use? AVRs? In case of AVR 8-bit I'd say you would need two MCUs to get good sound quality - one would emulate CPU and other would emulate sound. In this case you probably will be able to write everything in C.

by on (#90499)
Yeah, it makes sense, otherwise emulating NES on TG16 would be quite a task.

I was thinking of mega family, but there are others like xmega and UC3, which is 32 bit, and runs on 60 MHz, but this is all AVRs, anyways.. I haven't thought about using two of them, thanks for idea! I wonder if they "fast enough" for "separate" emulation, mm. I should have done more coding to know that..

by on (#90501)
It is 100% known that a Mega is fast enough to emulate 8080 and run simple video generation simlutaneosly (PMD85 emulator[/url]. It is 100% known that an (overclocked) Mega is capable to emulate SID to some extent with extra features, or emulate AY-3-8910 (many projects), or play some chiptunes while doing a lot of other stuff (Craft, Uzebox). So I think it is pretty safe to state that a NSF player is doable with two Megas programmed in C. With a single AVR - it may be doable if everything is programmed in assembly, although I have doubts about sound quality.

by on (#90512)
Thank you Shiru! Interesting projects, haven't seen any of them. Now i'm sure to work on AVRs!

by on (#90513)
Also, you can get some nice results at early stage if you emulate sound part first and use register write logs to test it. You can create such log by modifying an existing NSF player or emulator code.

by on (#90538)
There's the NSF emulator for PIC18 at 16MIPS, and RockBox has had NSF support for a while now; it seems to require a ~30MHz ARM.

by on (#90553)
Interesting, i was thinking about using RockBox.. Thanks for advices guys!