18 lines
568 B
Forth
18 lines
568 B
Forth
\ PS2! c c p-addr -- Data byte (A), high address byte (B), port address (C) - OUT to port with A and B registers set
|
||
: PC2! SWAP >< OR PC! ;
|
||
\ SIDSEND c c -- Data value, register (0-31); bits 5,6 are for interrupt settings; bit 7 (/CS) is handled
|
||
: SIDSEND 2DUP 128 OR 84 PC2! 2DUP 127 AND 84 PC2! 128 OR 84 PC2! ;
|
||
\ SIDRST -- Reset SID chip
|
||
: 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
|
||
|
||
|