Page 1 of 1

SidPi project C64 sound chip (SID 6581) and the Pi's GPIO

Posted: Thu Apr 24, 2014 7:27 pm
by papawattu
Check out my mating of a SID and a Raspberry Pi - SidPi was born!

https://www.youtube.com/watch?v=plyVYZ6XPwQ

Used the GPIO to connect to the address and data pins of the SID, they are one way so no need for any voltage conversions. Implements the HardSid protocol and the ./dev/sid device so works nicely with sidplay2. Plus I wrote a network interface for a Acid64 driver .

Took a lot of effort and money (Sids are not cheap) but It was worth it in the end. Started off as a bread board now is on a prototype board. Sounds great but need to reduce the electrical noise.

Project is on GitHub here https://github.com/papawattu/SidPiController I got some work to do to on the documentation but happy to guide anyone through if they want to have ago themselves.

With that real SID sound and some classic chip tunes its 1984 all over again!

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Fri Apr 25, 2014 1:03 am
by Oldbitcollector
Very Nice!

I'll be looking at this project. Thank you for sharing.

Posted to reddit: http://www.reddit.com/r/raspberry_pi/co ... pio_links/
(This is simply too cool to let it get buried in the forums...)

Jamie, would you mind if I had a batch of PCB's made for those who might want to make their own? (I want one)

Jeff

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Fri Apr 25, 2014 2:02 am
by Oldbitcollector
I had an odd thought while out walking the dog...

If memory serves, it doesn't take too much more to physically connect a second SID chip. (Think StereoSID)

Jeff

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Fri Apr 25, 2014 6:29 am
by papawattu
Sure, feel free to have some printed and thanks for your interest and the redit post :D It did feel good when it all came together both hardware and software.

I'm ordering my own soon, but I'm a bit nervous as I'm no expert. Its on a prototype board at the moment and when there is no sound there is a lot of interference from the signals from the Pi. I'm hoping a printed PCB with a big ground plane will help reduce it but may need to add a few more caps to clean the signals.

The hardest bit is getting the SID's they are few and far between these days.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Fri Apr 25, 2014 11:40 am
by Oldbitcollector
Jamie,

I've done a few PCB designs, so I might be able to help a little.

I don't remember much of an audio circuit in the actual C64, but I'll take at the schematic over the weekend.

Jeff

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Fri Apr 25, 2014 12:24 pm
by papawattu
That would be good, thanks Jeff.

Here's the reference datasheet if it helps

http://www.waitingforfriday.com/index.p ... _Datasheet

Jamie.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Fri Apr 25, 2014 8:36 pm
by Oldbitcollector
Jamie,

According to this (http://www.lyonlabs.org/commodore/stere ... ematic.txt) pin 8 is the "Chip Select" pin would might need one additional GPIO pin to select it. The rest of the address lines, etc would tie to the same location as the first chip. Add a second audio-out line and you'd be in business.

Any chance we can get the software to support this?

Jeff

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Mon Apr 28, 2014 8:23 pm
by Oldbitcollector
I've got the SID wired up, and cloned your Github folders.

I'm having some trouble getting the software up and running..

A "make" on the Makefile returns:

make: *** /lib/modules/3.10.25+/build: No such file or directory. Stop.
make: *** [all] Error 2

Can you assist with some help on getting all the software up and running?

Thanks

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Tue Apr 29, 2014 9:40 am
by papawattu
Hi Jeff,

You'll need to download the kernel sources from github here https://github.com/raspberrypi/linux. I have some work todo on the build scripts to install the module. But you can compile the and run the server (as root) without the module. I've updated the README to reflect how to do this.

As for mutli-sid support I will get to work on that as soon as I get back from my work trip. I have two free GPIO pins free so in theory can support up to 8!

Jamie.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Tue Apr 29, 2014 11:03 am
by toxibunny
Finally the pi has a real sound chip!

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Wed Apr 30, 2014 10:41 am
by papawattu
toxibunny wrote:Post by toxibunny ยป Tue Apr 29, 2014 11:03 am
Finally the pi has a real sound chip!
:D :D :D

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Wed Apr 30, 2014 10:49 am
by MrEngman
Oldbitcollector wrote:I've got the SID wired up, and cloned your Github folders.

I'm having some trouble getting the software up and running..

A "make" on the Makefile returns:

make: *** /lib/modules/3.10.25+/build: No such file or directory. Stop.
make: *** [all] Error 2

Can you assist with some help on getting all the software up and running?

Thanks
You need to generate a symbolic link to point /lib/modules/3.10.25+/build to your linux source directory. Like

Code: Select all

sudo ln -s /home/pi/src/linux /lib/modules/3.10.25+/build
Just set /home/pi/src/linux to where you have installed your linux source.


MrEngman

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Thu May 08, 2014 9:09 am
by papawattu
Hi Jeff

Did you get it to compile ok? If not I've added the a pre-compiled sidpi.ko into git hub, hopefully this will work.

Jamie.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Tue Jun 10, 2014 9:40 pm
by papawattu
Ooops mistake... the schematic had two errors the reset and RW pins were mixed up, they are fixed now on the latest revision

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Thu Jun 12, 2014 11:52 am
by rga24
Hello papawattu / Oldbitcollector,

As soon as you have these boards made up I will buy a few of them.

For the audio amplifier circuit, you can copy the one in the C64 / C64C / C128. It's an emitter follower with a bit of filtering.

It's the circuit connected between pin 27 of the SID and pin 3 of the video socket.

http://www.zimmers.net/anonftp/pub/cbm/ ... 1-left.gif
http://www.zimmers.net/anonftp/pub/cbm/ ... -right.gif
http://www.zimmers.net/anonftp/pub/cbm/ ... 2278-1.gif
http://www.zimmers.net/anonftp/pub/cbm/ ... 6-2of2.gif
http://www.zimmers.net/anonftp/pub/cbm/ ... 8-1of2.gif
http://www.zimmers.net/anonftp/pub/cbm/ ... 9-1of2.gif

Comparing these versions, the 310378-1-left.gif and 250469-rev.A-right.gif use a different component numbering scheme from the others. I will refer to the scheme in the other versions.

Pull-down resistor R6 (1K) is fitted where you have a 6581 and omitted for an 8580R5.
R7 (10K) and C37 (1000pF) are always present and form a low pass filter.
Pull-down resistor R8 (1K) is always fitted.

The following components are where the variation occurs between different circuit boards. If you provide solder pads for both of these components, the user can decide which circuit to use.

310378-1-left.gif has a 470pF capacitor (C112) across the base-emitter junction of the transistor and a 220pF capacitor (C84) on the emitter.
250469-rev.A-right.gif has a 470pF capacitor (C76) across the base-emitter junction of the transistor only.
The other circuits have the 220pF capacitor C205 on the emitter only.

For the final audio output, a 10uF decoupling capacitor is fitted on all the versions.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Thu Jun 12, 2014 3:45 pm
by rga24
OK, I've cloned the repository on GitHub, will modify the schematic file in Eagle and produce a new PCB for your consideration.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Thu Jun 12, 2014 3:51 pm
by rga24
One consideration is what power supply to use for the SID board. It would be great if it used the same power supply as the Raspberry Pi itself, with a step-up converter to generate 12V or 9V (depending on SID type) and a pass through for the Raspberry Pi itself. Or it could be powered off 12V or 9V and a linear or switching regulator used to generate 5V for the digital part of the chip, with the Raspberry Pi on a separate 5V power supply.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Sat Jun 14, 2014 8:38 pm
by papawattu
Hi

Cool thanks rga24, I'm an electronics novice so I just followed the reference spec, I had a few boards made up (with the mistake) but I managed to fix them with some creative wiring.

You can order the correct boards from here ...
https://oshpark.com/shared_projects/vRw7mWuD

there is a minimum order of three but the price is pretty reasonable.

As for the 12v supply, yes I'm looking into that using a DC-DC converter to get to the power from the Pi but I need to check a few things. At the moment the updated design does actually power the Pi from the same 12v line using the regulator.

Always happy for any help to improve SidPI !

Jamie

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Sat Jun 14, 2014 8:43 pm
by papawattu
Also looking at adding some more caps and connecting up the ext in order to reduce noise.

Still sounds pretty good some captures can be found here

https://soundcloud.com/jamie-nuttall-2/sets/sidpi

Jamie.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Mon Jul 14, 2014 2:49 pm
by rga24
This is the kind of thing I'd like to do with the Raspberry Pi.

At the moment the software in these videos runs on an old PC with ISA slots and a HardSID card.

https://www.youtube.com/watch?v=RWTjJeDuvqs

https://www.youtube.com/watch?v=LQt6j_p3O8U

But running the software on a Raspberry Pi instead would bring the project to a wider audience and make it a lot more portable too.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Thu Dec 18, 2014 11:11 pm
by farvardin
Hello,

I've installed the kernel source and headers. It began to compile for kernel 3.12.22+, but then I got this:

CC [M] /home/pi/gpio/SidPi/module/src/sidpithread.o
/home/pi/gpio/SidPi/module/src/sidpithread.c:17:27: fatal error: mach/platform.h: No such file or directory
compilation terminated.

I noticed in /usr/src/linux-headers-3.12-1-common/arch/arm there are several "mach-####" folders, such as mach-at91 mach-exynos etc but I don't know which one to choose.

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Tue May 03, 2016 12:19 pm
by rga24
Hi Jamie,

Just a quick question, I'm building a SidPi board now and I want to source some of the same connectors you designed the board around.

Which exact parts are SK1, CN1 and J2, the Raspberry Pi GPIO header, power supply connector and audio output socket? - and where did you buy them?

Richard

Re: SidPi project C64 sound chip (SID 6581) and the Pi's GPI

Posted: Tue May 03, 2016 5:31 pm
by solar3000
Nice.
I remember my commodore 64 with its 3 voice sound.