Hybrid SID Player

A place to document your own projects.

Hybrid SID Player

Postby Markus Gritsch » Sun Apr 17, 2011 4:25 am

Hi,

I am currently working on a kind of hybrid between an emulated and a hardware SID Player. The CPU and CIA stuff runs emulated on a PIC32 and the sound is generated by a hardware SID chip.

I had the TinySID emulator already running [1] on a PIC32 board I built some time ago [2], and now had the idea, that it would be cool to have the sound being generated by a real SID. To say it with NVIDIA's words: The way it's meant to be played ;)

The emulation routine runs as previously, but every time new values for the virtual SID chip are calculated, I write this virtual registers to the corresponding ones of the real SID chip. It works pretty well.

Two pictures of my initial setup are attached. After this proof of concept, it took me quite some time to get the analog part to a level, where I was satisfied with the audio quality. In the process of experimenting with different power supplies and voltage regulators to get rid of the noise and supply-hum, I subsequentially destroyed all three SID chips, I had. These old chips are quite sensitive -- not comparable with todays ESD protected chips.

On eBay, SID chips are not as cheap as they used to be, and I had to wait another long time to receive one I bought there. But finally it seems I have a working setup with quite good audio quality. I recorded two examples and attached them also. (I had to put the MP3s into .zip files since this forum software prohibits .mp3 as extension x-)

Have fun,
Markus

[1] http://www.youtube.com/watch?v=ZNu0-MZ9WLI
[2] http://overtone-labs.ning.com/forum/top ... ent%3A1805
Attachments
example_1.mp3.zip
(337.59 KiB) Downloaded 2787 times
example_2.mp3.zip
(377.02 KiB) Downloaded 599 times
IMG_0699.jpg
IMG_0697.jpg
Last edited by Markus Gritsch on Sat Jun 04, 2011 3:39 pm, edited 2 times in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby Markus Gritsch » Sat May 21, 2011 2:27 pm

Hi,

just a quick update -- the breadboard prototype and the firmware (attached to this post) are fairly complete.

The PIC32 acts as USB host to the attached memory stick, which contains all my favorite tunes in .sid format from the HVSC [1]. I used Elm Chan's FatFs library [2] because it hat LFS (long filename support) together with the Microchip USB stack [3].

The SSD1308 OLED displays the filesystem, and the rotary encoder is used to scroll up and down. By pressing the rotary encoder button one can change into a subdirectory or start a .sid tune for playing. The screen content is rendered into a framebuffer in RAM and transferred using DMA autonomously. In playing-mode the OLED displays some tune information, the selected subtune and the playing time.

The two small push-buttons on the beadboard are used to temporarily suspend playback (pause) and change the playing speed to 10x (fast forward).

[1] http://www.hvsc.c64.org/
[2] http://elm-chan.org/fsw/ff/00index_e.html
[3] http://code.google.com/p/cui32/source/b ... s_Test_MGr
Attachments
firmware.zip
(88.67 KiB) Downloaded 604 times
IMG_0741.JPG
schematic.jpg
Last edited by Markus Gritsch on Sat Jun 04, 2011 1:14 pm, edited 2 times in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby Markus Gritsch » Sun May 22, 2011 7:14 am

Hi,

here are some pictures of the shield I made for my CUI32 using a perfboard. Since I needed the vertical space to stack the OLED display, the "socket" for the SID chip consists only of the precision drilled pins. They can easily be sunk-in by widening the perfboard wholes using a 1.5 mm drill. The two switches on the upper-right side are for the left and right channel where one can select between the emulated TinySID output of the PIC32 and the analog output of the SID chip, as shown in the schematic.
Attachments
IMG_0754.jpg
IMG_0756.jpg
IMG_0757.jpg
IMG_0760.jpg
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby Markus Gritsch » Sun May 29, 2011 3:06 pm

To conclude this project, I added a headphone amplifier to the perfboard. I had this in my mind when soldering the other parts on it, so luckily there was enough space left :) Here is the updated schematic and some pictures of the finnished board.
Attachments
schematic.jpg
158-5842_IMG.JPG
158-5844_IMG.JPG
158-5862_IMG.JPG
Last edited by Markus Gritsch on Mon Dec 12, 2011 3:20 pm, edited 4 times in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby Markus Gritsch » Sun May 29, 2011 4:18 pm

A YouTube video is available here: http://www.youtube.com/watch?v=gw-TQaskkQ8

And here is a follow-up video http://www.youtube.com/watch?v=1nCUBvLy_ps demonstrating digi-support.

This video shows some level-meters: http://www.youtube.com/watch?v=95nSrqpmLa0
Last edited by Markus Gritsch on Sun Jun 12, 2011 2:57 pm, edited 2 times in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby ian » Mon May 30, 2011 2:55 am

Amazing work, as always!
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Hybrid SID Player

Postby Gianni » Wed Jun 01, 2011 1:14 am

This is one of the most interesting projects I've ever seen. I hope you'll release the firmware and that a kit will be soon available. I really like this project... I need to have this
Gianni
Newbie
Newbie
 
Posts: 11
Joined: Wed Jun 01, 2011 1:09 am
Location: Italy

Re: Hybrid SID Player

Postby Markus Gritsch » Wed Jun 01, 2011 1:39 am

The firmware is attached to the second post. As for the kit, I'm afraid you will have to build it yourself from the schematic.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby Gianni » Wed Jun 01, 2011 1:57 am

Where I can get the SSD1308 display you've used?
Gianni
Newbie
Newbie
 
Posts: 11
Joined: Wed Jun 01, 2011 1:09 am
Location: Italy

Re: Hybrid SID Player

Postby Markus Gritsch » Wed Jun 01, 2011 2:25 am

I got mine from SeeedStudio, but it seems they no longer carry this exact board. Further, since they made only the slow I2C interface available, I modded it so that the much faster SPI interface can be used.

Mind you, the PIC32 board is also custom built and uses a PIC32MX795F512H, because it has 128 kB RAM.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby Gianni » Wed Jun 01, 2011 2:51 am

Sigh... Then is impossible for me to realize this project... Why don't you make a complete kit, without the sid? Many people will be interested in this... I'm the first.
Gianni
Newbie
Newbie
 
Posts: 11
Joined: Wed Jun 01, 2011 1:09 am
Location: Italy

Re: Hybrid SID Player

Postby ian » Wed Jun 01, 2011 3:20 am

It would be a killer kit!

The SID availability seems like a big issue though - in the original post Markus said it took a while to get a replacement for the broken test chips. Now, if you could make a DIP-shaped adapter that dropped in if you don't have an SID chip...

Another problem is SMD components. I don't think any PIC32s come in DIP, or even an easy TQFP-44. In my (humble) experience with SMD kits, more people order them by accident than want to build them, once SSOP or TQFP64 parts are involved.

I would *love* to see something like this as a kit though. It's retro fun.
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: Hybrid SID Player

Postby voidptr » Wed Jun 01, 2011 1:16 pm

great project , real cool results ! :-)

now it needs to be "more mobile", some battery pack will be needed so you can replace your ipod with it !
:-)
voidptr
Full Member
Full Member
 
Posts: 244
Joined: Fri Oct 08, 2010 5:58 am

Re: Hybrid SID Player

Postby Markus Gritsch » Wed Jun 01, 2011 2:19 pm

Well, it actually *does* replace my first generation iPod nano running Rockbox [1] which can play .sid tunes :) I commute by train, and they usually do have power outlets, so no problem there. I can only imagine how geeky I must look plugging earphones into this "thing" ;)

It was not really designed for battery use, since there are some limiting factors for power saving: The USB stick gets quite warm. USB memory sticks are not designed to conserve power, but to be fast. Second, the PIC32 runs at 80 MHz and thus also gets warm. Third the SID chip itself is vintage design dissipating a good part itself :)

The whole thing draws about 370 mA, so I decided to use a small switch mode wall wart.

[1] http://www.rockbox.org/
Last edited by Markus Gritsch on Sun Jun 05, 2011 3:15 am, edited 1 time in total.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby voidptr » Wed Jun 01, 2011 7:16 pm

:o)
voidptr
Full Member
Full Member
 
Posts: 244
Joined: Fri Oct 08, 2010 5:58 am

Next

Return to Project logs