Skip to main content
Topic: Hybrid SID Player (Read 81937 times) previous topic - next topic

Re: Hybrid SID Player

Reply #15
[quote author="ian"]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. ....[/quote]
I've seen SID chips on ebay for silly money :(

According to wikipedia there were > 12 million C64 sold so you should be able to pick up a complete C64 from your favourite second hand store or local flee market or ebay for that matter.

Re: Hybrid SID Player

Reply #16
Your project is VERY COOL!!!

About the SID problem.

Try this "nano-swinsid-prototype-unboxing" with google.

This project is based on the microcontroller ATMEGA88PU from Atmel and the SID emulation code is written by Swinkels.

my two cents.

Re: Hybrid SID Player

Reply #17
The SwinSID is an amazing project by itself.

The purpose of this project here was to drive a *real* SID chip, not an emulated one. Besides, the TinySID emulator running on the PIC32 also emulates a SID chip, and both signals, the one from the hardware SID and the PWM one from the emulated one are available simultaneously.

Re: Hybrid SID Player

Reply #18
I added digi-support and a follow-up video demonstrating digi playback is available here:

Two things to keep in mind:
* The emulator code (TinySID) can only playback tunes in PSID format (in which the majority of the files in the HVSC are).  However, with update #50 the digi-tunes in the HVSC have been replaced by ones in the newer RSID format.  The old PSID digi-tunes are still avaliable separately here: ... laySID.rar
So use these for your digi pleasure :)

* The SID 8580R5 needs a digi-boost hack to play the digis sufficiently loud.  Add a 330 k resistor from EXT IN to GND, preferrably using a switch.


Re: Hybrid SID Player

Reply #19
What's your source for that OLED breakout board? It looks like a Seeed Studio module, in fact it matches the photo at the top of their OLED product category web page, yet they don't actually offer that module for sale. They only seem to have modules designed to work with the Twig or Seeeduino Film.

Re: Hybrid SID Player

Reply #20
Hi Markus,

Please make a PCB with embedded PIC32 / OLED (LCD like Nokia...) support for this project! i like so much!

Best regards,

Re: Hybrid SID Player

Reply #21

I wrote an alternative firmware for my HybridSID device:  It can now act as a 'Network SID Device' and can be used as the sound output device for 'ACID 64' [1] and 'GoatTracker' [2].

I also implemented a small "dual boot" firmware which runs at power-on and which allows selecting the desired use case by pressing the left or right button: Pressing the left button starts in the stand-alone 'HybridSID' mode, pressing the right button starts the 'Network SID Device' mode where the device receives the register values for the SID chip from the application running on a PC.

Beside the disadvantage of not being stand-alone, the 'Network SID Device' mode has several benefits:
* Newer tunes containing samples are only released in RSID format which the TinySID library used in stand-alone mode cannot play.  ACID 64 plays them nicely.
* ACID 64 sends the cycle information together with the register values, so it is possible to write the registers of the SID at the precise time.  The new firmware is cycle exact.
* Easier tune selection due to the larger PC screen and richer GUI program.  Also the STIL information can be viewed.
* ACID 64 has a nice song position slider to jump to an arbitrary time-position in the tune.

ACID 64 sends the data to a socket connection on port 6581.  Traditionally, there is 'Java SIDplay2' [3] listening on this port, so ACID 64 can be used to drive this sophisticated SID emulator.

To get ACID 64 talking to my device, I wrote a small socket server in Python which handles the socket communication with ACID 64, and writes the received cycle info and register values to my device.  This is done through an emulated serial port which the 'Network SID Device' firmware provides via a CDC/ACM USB device class.

By default the device buffers 100 ms worth of data which can be changed by turning the rotary encoder.

YouTube video:

Please find the source code ( attached to this post.
UPDATE: fixes some bugs and adds PAL/NTSC clock switching.



Re: Hybrid SID Player

Reply #22
Markus, I imagine you have to run the USB serial port at about 4Mbits/sec in order to keep up with the 380Kb/sec data coming out of ACID64.

Re: Hybrid SID Player

Reply #23
The data rate sent by ACID 64 varies greatly depending on the tune played.  Take a look at the video and you will see in the terminal window values from a few kB/s up to around 100 kB/s for the new-style digi tunes.  I don't know where you get your value of 380 kB/s you mentioned.

Re: Hybrid SID Player

Reply #24
So what baud rate are you running the serial port at then, just the standard 9600?

Basically, I run ACID64 playing ghosts'n'goblins (5.5Kb file) into your python server script modified to write to a file instead of sending the data out to serial. After 10 sec I ended up with a 3.8Mb file, hence ~ 380Kb/sec.

Re: Hybrid SID Player

Reply #25
For virtual COM ports like the one provided by the CDC/ACM device class, there is no configurable baud rate.  Data will be sent as fast as the receiver can processes it.  There is an upper limit though, depending on the Windows drivers, the CDC/ACM implementation, and also the theoretical achievable USB Full-Speed.

The way you run the script ACID 64 sends data as fast as possible, limited by file write speed and CPU utilization.  The unmodified Python server blocks in the ser.write() function until the firmware reads some data into its buffer, limiting the transfer rate this way.

You could take the unmodified file and comment-in the currently commented-out lines in the TRY_WRITE (and if you are using GoatTracker also in the TRY_DELAY) case.  Now the data from ACID 64 will be consumed in real time.

Re: Hybrid SID Player

Reply #26
Thanks Markus, that makes perfect sense, it didn't occur to me that serial would block. I imagined that ACID64 was sending data at a constant rate, which is was the rate to be played at.

Now you pointed me in the right direction, I spent some time this weekend and got some initial sounds out of my board. I'm using a Papilio FPGA board with a SID core written in VHDL. The sounds coming out sound 90% correct, the tunes are definitely recognizable :) but it's early days, I still need to fix a bunch of things.

Re: Hybrid SID Player

Reply #27
Good to hear that.  Glad that the comments were helpful.  Does the FPGA core support filtering?

Re: Hybrid SID Player

Reply #28
No, I'm using a SID VHDL core with unknown attribution, I suspect it's possibly made by Kevin Horton at and on his blog he states he implemented the filter externally to the FPGA in hardware.