Page 1 of 5

Sid Vicious - VIC 20 SID emulation

Posted: Sun Dec 17, 2006 10:40 pm
by aeb
I wrote a little piece of code which emulates the C-64 SID sound chip on VIC 20. Patched versions of the actual original C-64 music routines are used, only the SID part is emulated by software.

(For patching you need to change SID writes $d400-$d418 to somewhere else, like $03e0-$03f8, and check that the player doesn't overwrite any zeropage locations used by the tone generator)

Here's two examples that run on unexpanded VIC 20 (on NTSC they run a little too slow):

http://www.cncd.fi/aeeben/temp/upside.prg
http://www.cncd.fi/aeeben/temp/zoids.prg

Some sounds recorded from VICE:
http://www.cncd.fi/aeeben/temp/vic20-sid-emu-uuno.mp3
http://www.cncd.fi/aeeben/temp/vic20-si ... dedown.mp3
http://www.cncd.fi/aeeben/temp/vic20-si ... mmando.mp3
http://www.cncd.fi/aeeben/temp/vic20-sid-emu-zoids.mp3

What is emulated?
- Pulse wave (32 widths), triangle, sawtooth, noise
- ADSR envelopes, but decay and release are linear and there's only 8 volume steps
- Pitch accuracy is 1/13th of SID
- Output at 6.1 kHz, 4-bit DAC (through $900e)

The routine uses almost all rastertime (depending on playroutine used) and if there's any cycles free from NMI & IRQ, it runs in a busy loop generating random numbers to improve the noise emulation.

Here's how it's done:
http://www.cncd.fi/aeeben/temp/sidemu_source_v0.zip

This is still very much work in progress, for example most of the patching could be automated. SID players that are located below VIC 20 ROM's need to be relocated, which is a bit more work.

Have fun!

Posted: Mon Dec 18, 2006 2:18 am
by carlsson
Ah, so it generates a three note sample on the fly? Cool, along with what you'd expect from Aleksi.. Is the Polytracker also feasible to convert, or does it use too much RAM for samples?

Posted: Mon Dec 18, 2006 9:15 am
by GreyGhost
very cool

Posted: Mon Dec 18, 2006 9:42 am
by vic user
wow, is "upside down" ever well done!

Posted: Sat Dec 30, 2006 3:30 pm
by adam.klotblixt
Very nice indeed!

I like the Zoids clip, very close to the real thing.

I gather you use the wla_dx assembler?

Amazing

Posted: Sat Jan 06, 2007 1:17 am
by Victragic
This is exactly the sort of project I was hoping to find someone working on in rediscovering my interest in VIC 20s recently..

It's a very impressive result, and I'll say the 'Commando' soundtrack is spot on as well..

I guess it's possible to get the valiant VIC-I to emulate anything.. (but obviously not everything at the same time!)

Excellent work!

-G

Posted: Sat Jan 06, 2007 6:34 am
by Jaicen
Wow that's brilliant!
Seriously, Upside Down is fantastic! Great work for sure. Could it be applied to run sampled music during games? Though you mention it eats up most of the raster time, so i'm guessing that's a no?

Posted: Sat Jan 06, 2007 2:06 pm
by Jeff-20
Goodness! Amazing!

Posted: Sun Jan 07, 2007 7:19 pm
by aneurysm
\o/

too bad i know nothing about cross-platform development

Posted: Mon Jan 08, 2007 4:54 am
by Jaicen
You know how to rock a tasty jam tho ;)

Posted: Mon Jan 08, 2007 6:36 am
by ral-clan
The idea of emulating a SID on a VIC (and the fact that it can actually be done) is one of the most incredible things I've seen lately (and I've seen a lot of amazing VIC-20 things since joining DENIAL). 8)

Posted: Sun Jul 08, 2007 10:14 am
by blackystardust
I know it has been a while since this topic first appeared, but I just got wind of it now. I can't seem to be able to download any of the files, does anyone else still have them or has an alternate link to them.

Posted: Sun Jul 08, 2007 11:47 am
by Boray
Seems I missed this thread too...

Posted: Thu Jul 12, 2007 9:50 am
by Wonder-Boy
@blackystardust

I can download them

Posted: Thu Jul 12, 2007 10:15 am
by Boray
I can't