It is currently Sun Oct 21, 2018 10:28 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Mar 12, 2011 6:37 am 
Offline

Joined: Sat Mar 12, 2011 6:36 am
Posts: 5
Hello!

I was looking for a hardware player for video game music formats, module formats and chiptune formats for years. I didn't find one which could do these things natively. I always had to convert the music to MP3, which could take quite a lot of time, and as we all now, MP3s need far more space than SPCs or SIDs, for example. I finally found a way: I bought a Dingoo game console, put a custom firmware and a linux music player on it.

So I now thought: I might be able to build such a player myself (for as many of these formats as possible: MOD, IT, XM, S3M, SID, SPC, NSF, GSF, GBS, PSF). But since this is quite a large project, I won't start it unless I could kinda "mass-produce" it later, which means having the PCBs manufactured and reusing my software (which needs probably the most work). The device will be as small as possible for me and use an SD card storage.

So, is there any need for such a player? Would - hypothetically - anybody buy it from me? I don't know the cost yet, however, it could be anything between - dunno - $30 and $250...

Best regards,
Cherry

PS: This is something like a "I wanna create a MMORPG!!!!!!" thread in a game developer forum - I have quite a lot of experience with microcontrollers, designing electronics, etc.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2011 6:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20681
Location: NE Indiana, USA (NTSC)
Just so I can get a ballpark idea of what you're talking about: What kind of UI would it have? Screen or no screen? Would "as small as possible" be iPod shuffle small, Sansa Clip small, or Sansa Fuze small?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2011 7:19 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3132
Location: Tampere, Finland
"Kevtris already did it" (with an FPGA). It hasn't been released though and I don't know if he has plans to do so. I'll let him tell more about it himself if he wants...

I put the Rockbox firmware in to my 2nd gen iPod nano and it could play NSF at least. I didn't test other codecs but if this page http://www.rockbox.org/wiki/SoundCodecs is any indication it should play MOD, SPC and a bunch of other format as well.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2011 7:29 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20681
Location: NE Indiana, USA (NTSC)
Right now I play MODs and NSFs in Droidsound on my Archos 43. It should work on any Android device that has "Unknown sources" turned on (sorry AT&T customers).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2011 7:39 am 
Offline

Joined: Sat Mar 12, 2011 6:36 am
Posts: 5
I know Rockbox, and I also know the Android players.

However, I myself would prefer an extra device (not my Android phone, or the Dingoo I am currently using) and I don't know if others think the same.

But probably, my idea is some years too late :)

@tepples: I don't know yet how small I can do it. If the cost wouldn't be too much, I'd include a small lcd screen.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2011 2:44 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3569
Location: Indianapolis
I've thought something like that would be cool before, but I probably wouldn't buy it unless it was really cheap. I like my MP3 player because I can use it while I'm driving, working, or doing almost anything. And it's small enough to carry around everywhere. But with MODs and especially chiptunes, they tend to loop forever so it seems like you would have to hit the 'next track' button too much. So it would be more portable than a PC, but not really hands-free like any other music player.

I've been coding a synth to run on the PIC32 MCU. I found this project http://www.k9spud.com/traxmod/ which is fairly similar to my hardware, it's open source but there's not much implemented in the software. It's made to be battery-powered, my design is not.

What MCU do you have in mind?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 12, 2011 7:49 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20681
Location: NE Indiana, USA (NTSC)
Memblers wrote:
But with MODs and especially chiptunes, they tend to loop forever so it seems like you would have to hit the 'next track' button too much.

A smart MOD player would mark each order table entry with a number-of-times-played flag and start a fadeout once an order table entry begins for the third time. And several chiptune formats carry length info as well.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 13, 2011 5:35 am 
Offline

Joined: Sat Mar 12, 2011 6:36 am
Posts: 5
Memblers wrote:
What MCU do you have in mind?


Either a PIC32 or a Stellaris ARM Cortex-M3-based microcontroller.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 13, 2011 3:03 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3569
Location: Indianapolis
Well that's interesting, if you could write something like that on the PIC32 actually I would be fairly interested in the software, would you have any interest in licensing it? I don't know how much of my hardware will be produced (as much as possible), but something like this could certainly help it along. It's very much a sound-oriented device. Yeah, the software really is a lot of work, heheh.

I've been curious how many channels (and max sample sizes) of an XM module could be done on the PIC. Seems like you would either be limited by the internal memory, but I'm wondering how well it works to stream/DMA samples off an SD card.


Last edited by Memblers on Sun Mar 13, 2011 5:21 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 13, 2011 3:09 pm 
Offline

Joined: Sat Mar 12, 2011 6:36 am
Posts: 5
For now, it looks that my idea really came some years too late (I asked at other forums too), and there will be hardly any people who would actually buy it.

So I probably won't do it at all, at least not in that large dimension originally planned. However, I'm still interested in building at least a hardware MOD or XM player...

Still, thank you for your answers!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2011 9:47 am 
Offline
User avatar

Joined: Sat Oct 29, 2005 2:09 am
Posts: 504
Location: Indianapolis
thefox wrote:
"Kevtris already did it" (with an FPGA). It hasn't been released though and I don't know if he has plans to do so. I'll let him tell more about it himself if he wants...

I put the Rockbox firmware in to my 2nd gen iPod nano and it could play NSF at least. I didn't test other codecs but if this page http://www.rockbox.org/wiki/SoundCodecs is any indication it should play MOD, SPC and a bunch of other format as well.



Since ya asked... hehe

First a few pictures:

outside:
http://blog.kevtris.org/blogfiles/IMG_2821.JPG
http://blog.kevtris.org/blogfiles/IMG_2822.JPG
http://blog.kevtris.org/blogfiles/IMG_2823.JPG

inside:
http://blog.kevtris.org/blogfiles/IMG_2826.JPG
http://blog.kevtris.org/blogfiles/IMG_2828.JPG


Basically, what it is, is a multiformat chiptune player. It has support for the following sound hardware:

SID (4x, 2 analog filters, 12 channels)
NES APU (regular NES audio)
MMC 5
VRC 6
VRC 7
N106
FME 7
FDS (audio only)
AY-3-8910
SN76489 (dual)
pokey (quad)
gameboy APU (all modes and channels fully supported)
OPL2
OPL3
YMF2413
atari 2600 TIA (8 channels. proper pitch range or limited 2600 range)

All of the above is fully implemented, debugged, and as accurate as I can make it. For the SID, I implemented the filters using op-amps and resistors and other things in a similar fashion to the real chip.

It has support for the following formats:

NSF (NES sound format)
SID (C64)
SAP (atari 8 bit sound format)
GBS (Gameboy sound)
SGC (sega, game gear, colecovision format)
WLF/IMF (wolfenstein / ID software FM format)
D00 (vibrants/JCH FM format)
CMF (Creative music format (FM))
KSM (ken's labyrinth sound format)
RAW (raw FM format)

Support for the formats is complete, and I have tested the entire libraries of tunes on it. All the known SID bugs and stuff are emulated, like noise LFSR stuffing, analog effects of turning the waveforms off, filter nonlinearities, loadable waveforms for the mixed waveforms (which allows for things like custom waveforms on the SID!)

Everything is done on an FPGA, except for the SID filters which are external to it and implemented using analog circuitry. All output channels are selectable between the left and right outputs or center, but I will eventually add channel panning most likely.

The filter is also usable by other chips, so you can pass say, gameboy through the SID filter.. or NES or both at once.

There is an SD card on it which holds all the tunes, and I wrote a complete mini DOS in 6502 asm to run it. It's boosted by a hardware DMA system so loading stuff is quite fast; around 400Kbytes/second can be loaded from the card into RAM. Loading tunes is instant unless they are very large (> 200K).

Display is a 122*32 pixel LCD which has a hardware accelerator that automagically refreshes it directly from a frame buffer. This way, you just write to the frame buffer and the controller figures out how to get it to the LCD. This way, changing output devices does not require any code changes.

Power is provided by 4 AA cell rechargables (runs it for 5-6 hours), AC adapter, or USB power. USB port allows for PC connection. I debugged and tested the PC interface but didn't implement anything that uses it yet.

There IS a MIDI port on it, but I have not implemented MIDI yet. The idea was to have a complete chip "symphony" playable all at once. i.e. you would be able to use ALL the sound chips at one time in a single piece of music.

There's tons of sample audio in my temp holding directory if you want to listen to it. Almost all the MP3s in said directory are from the synth:

http://blog.kevtris.org/blogfiles/

some quick highlights tho:

gameboy http://blog.kevtris.org/blogfiles/fpga_ ... s11_t2.mp3
SID (lfsr stuffing) http://blog.kevtris.org/blogfiles/fpga_ ... ojoing.mp3
SID (filter ex.) http://blog.kevtris.org/blogfiles/fpga_ ... naloop.mp3
YMF2413 http://blog.kevtris.org/blogfiles/ym2413_test.mp3
D00 FM http://blog.kevtris.org/blogfiles/zaxmi ... ersion.mp3
SID (Waveform hold) http://blog.kevtris.org/blogfiles/fpga_ ... _space.mp3
NSF (with 5 or 6 expansion chips at once) http://blog.kevtris.org/blogfiles/FPGA_ ... 17-Kay.mp3
brix album (DOS game, CMF format) http://blog.kevtris.org/blogfiles/FPGAs ... _Album.rar
SID (filter) http://blog.kevtris.org/blogfiles/filte ... analog.mp3
SGC http://blog.kevtris.org/blogfiles/fpga_ ... megear.mp3

_________________
/* this is a comment */


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 14, 2011 6:50 pm 
Offline
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 472
Location: Rive nord de Montréal
Kevtris, you implemented the SID filters using opamps in a SVF configuration, right? I'm just curious, how have you made the cutoff freq and Q eletronically variable? Using FETs as voltage controlled resistors or using fancier amps like OTAs (ex: LM13700)? Something else?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2011 1:04 pm 
Offline
User avatar

Joined: Sat Oct 29, 2005 2:09 am
Posts: 504
Location: Indianapolis
~J-@D!~ wrote:
Kevtris, you implemented the SID filters using opamps in a SVF configuration, right? I'm just curious, how have you made the cutoff freq and Q eletronically variable? Using FETs as voltage controlled resistors or using fancier amps like OTAs (ex: LM13700)? Something else?


Yes, I used FETs like on a real SID chip. It's connected up in a similar manner to the SID also. OTAs are cool but seem to be hard to get. I *did* try them out, and they do indeed work pretty good actually.

The problem was they just weren't what I wanted. For a totally new design, they would work pretty good I think.

I actually tried three methods:

* OTA's (used plenty on electronic music stuff)
* PWM (this is the "Votrax" method. you use an analog switch and PWM the control signal to emulate a variable resistor)
* FET (the "SID" method, which is what I ended up using)

OTAs worked fine but availability and a few other parameters were the reasons I didn't use them.

PWM worked pretty well but didn't have the range (it'd be much more useful in a new synth not emulating anything else)

FET worked out to be as close to a SID as I could get, which isn't too surprising since that's how it works in real life.

_________________
/* this is a comment */


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2011 7:20 pm 
Offline
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 472
Location: Rive nord de Montréal
kevtris wrote:
Yes, I used FETs like on a real SID chip. It's connected up in a similar manner to the SID also

Like in this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 15, 2011 9:59 pm 
Offline

Joined: Sat Mar 12, 2011 6:36 am
Posts: 5
Oh, it has been done before. Even better than I thought.

So, forget it^^ There is no need to create a second player like that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group