Hybrid SID Player

A place to document your own projects.

Re: Hybrid SID Player

Postby TonyD » Thu Jun 02, 2011 9:43 am

ian wrote: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. ....

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.
Tony
User avatar
TonyD
Jr. Member
Jr. Member
 
Posts: 90
Joined: Wed May 11, 2011 9:46 am

Re: Hybrid SID Player

Postby xad » Thu Jun 02, 2011 4:10 pm

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.
User avatar
xad
Newbie
Newbie
 
Posts: 2
Joined: Thu Jun 02, 2011 3:56 pm

Re: Hybrid SID Player

Postby Markus Gritsch » Fri Jun 03, 2011 2:17 am

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.
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 Jun 04, 2011 1:54 pm

I added digi-support and a follow-up video demonstrating digi playback is available here: http://www.youtube.com/watch?v=1nCUBvLy_ps

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: http://www.hvsc.de/download/files/archi ... 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.

Enjoy,
Markus
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby bigmessowires » Wed Jun 08, 2011 2:54 pm

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.
bigmessowires
Newbie
Newbie
 
Posts: 10
Joined: Wed Jun 08, 2011 2:50 pm

Re: Hybrid SID Player

Postby xad » Sat Jun 25, 2011 4:14 am

Hi Markus,

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

Best regards,
Dave.
User avatar
xad
Newbie
Newbie
 
Posts: 2
Joined: Thu Jun 02, 2011 3:56 pm

Re: Hybrid SID Player

Postby Markus Gritsch » Thu Jul 14, 2011 1:57 pm

Hi,

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: http://www.youtube.com/watch?v=mimSNZdvRj4

Please find the source code (firmware.zip) attached to this post.
UPDATE: firmware_2011-10-02.zip fixes some bugs and adds PAL/NTSC clock switching.

Enjoy,
Markus

[1] http://www.acid64.com/
[2] http://sourceforge.net/projects/goattracker2/
[3] http://jsidplay2.sourceforge.net/
Attachments
firmware_2011-10-02.zip
(326.06 KiB) Downloaded 311 times
firmware.zip
(319.84 KiB) Downloaded 385 times
IMG_0843.jpg
Last edited by Markus Gritsch on Sun Oct 02, 2011 2:46 pm, 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 d18c7db » Mon Jul 25, 2011 11:04 pm

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.
d18c7db
Newbie
Newbie
 
Posts: 8
Joined: Sun Dec 06, 2009 7:06 pm

Re: Hybrid SID Player

Postby Markus Gritsch » Tue Jul 26, 2011 2:03 am

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.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby d18c7db » Tue Jul 26, 2011 5:39 am

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.
d18c7db
Newbie
Newbie
 
Posts: 8
Joined: Sun Dec 06, 2009 7:06 pm

Re: Hybrid SID Player

Postby Markus Gritsch » Tue Jul 26, 2011 6:23 am

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.
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby d18c7db » Sun Jul 31, 2011 2:05 am

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.
d18c7db
Newbie
Newbie
 
Posts: 8
Joined: Sun Dec 06, 2009 7:06 pm

Re: Hybrid SID Player

Postby Markus Gritsch » Sun Jul 31, 2011 9:00 am

Good to hear that. Glad that the comments were helpful. Does the FPGA core support filtering?
User avatar
Markus Gritsch
Sr. Member
Sr. Member
 
Posts: 271
Joined: Tue Feb 09, 2010 6:54 am

Re: Hybrid SID Player

Postby d18c7db » Sun Jul 31, 2011 5:48 pm

No, I'm using a SID VHDL core with unknown attribution, I suspect it's possibly made by Kevin Horton at http://blog.kevtris.org and on his blog he states he implemented the filter externally to the FPGA in hardware.
d18c7db
Newbie
Newbie
 
Posts: 8
Joined: Sun Dec 06, 2009 7:06 pm

Re: Hybrid SID Player

Postby d18c7db » Tue Aug 02, 2011 8:00 am

In case you want to see the progress so far... http://www.youtube.com/watch?v=Ob8jZyfnujM :)
d18c7db
Newbie
Newbie
 
Posts: 8
Joined: Sun Dec 06, 2009 7:06 pm

PreviousNext

Return to Project logs