Skip to main content

Quazar SID Interface

SID Programming

1000013963.png

Memory Addresses of the SID

RegFunction
0frequency voice 1 low byte
1frequency voice 1 high byte
2pulse wave duty cycle voice 1 low byte
 7..43..0
3pulse wave duty cycle voice 1 high byte
4control register voice 1
 76543210
 noisepulsesawtoothtriangletestring modulation with voice 3synchronize with voice 3gate
 7..43..0
5attack durationdecay duration voice 1
6sustain levelrelease duration
7frequency voice 2 low byte
8frequency voice 2 high byte
9pulse wave duty cycle voice 2 low byte
 7..43..0
10pulse wave duty cycle voice 2 high byte
11control register voice 2
 76543210
 noisepulsesawtoothtriangletestring modulation with voice 1synchronize with voice 1gate
 7..43..0
12attack durationdecay duration voice 2
13sustain levelrelease duration voice 2
14frequency voice 3 low byte
15frequency voice 3 high byte
16pulse wave duty cycle voice 3 low byte
 7..43..0
17pulse wave duty cycle voice 3 high byte
18control register voice 3
 76543210
 noisepulsesawtoothtriangletestring modulation with voice 2synchronize with voice 2gate
 7..43..0
19attack durationdecay duration voice 3
20sustain levelrelease duration voice 3
21filter cutoff frequency low byte
22filter cutoff frequency high byte
23filter resonance and routing
 7..43210
 filter resonanceexternal inputvoice 3voice 2voice 1
24filter mode and main volume control
 76543..0
 mute voice 3high passband passlow passmain volume
25paddle x value (read only)
26paddle y value (read only)
27oscillator voice 3 (read only)
28envelope voice 3 (read only)

Using with RC2014 Mini II Picasso

rc2014-sid-picasso.jpg

Basic

Set ROM address to 0 100 (just Bank 2 set) to boot into Microsoft BASIC (Phil Green).

Insert SID interface card: marked A15 pin is pin 1.

Use the following test BASIC program (as provided in the instructions):

10 DATA 205,7,10,123,66,14,84,237,121
20 DATA 0,0,0,203,248,237,121,195,125,17
30 FOR A=-1024 TO -1006
40 READ D
50 POKE A,D
60 NEXT A
70 POKE -32695,0
80 POKE -32694,252
90 LET A=USR(1024)
100 LET A=USR(6159)
101 LET A=USR(1280)
102 LET A=USR(1776)
103 LET A=USR(1041)
110 FOR D=256 TO 511
120 LET A=USR(D)
130 NEXT D
140 GOTO 110

Type RUN to start it. You should hear "siren" audio effect.

CamelForth

Set ROM address to 0 001 (just Bank 8 set) to boot into CamelForth (Justin Skists).

Paste following Forth program.

: PC2! SWAP >< OR PC! ; 
: SIDSEND 2DUP 128 OR 84 PC2! 2DUP 127 AND 84 PC2! 128 OR 84 PC2! ;
: SIDRST 0 24 SIDSEND 0 4 SIDSEND ;
: SIDTEST 15 24 SIDSEND  10 0 DO 255 0 DO I 1 SIDSEND LOOP LOOP 0 24 SIDSEND ;

SIDRST 
15 24 SIDSEND 
0 5 SIDSEND 
240 6 SIDSEND 
17 4 SIDSEND 
SIDTEST
PS2!     c c p-addr --   Data byte (A), high address byte (B), port address (C) - OUT to port with A and B registers set
SIDSEND  c c --          Data value, register (0-31); bits 5,6 are for interrupt settings; bit 7 (/CS) is handled
SIDRST   --              Reset SID chip

Decimals used:

  • 84 = 0x52 - I/O port number
  • 24 = 0x18  register 0x18 (24), no interrupt
  • 128 - high bit set
  • 127 - all but high bit set