Hi. I'm new to the Arduino and relatively new to electronics, so please bear with me, as I probably will have a few stupidities along the way. I like to learn by throwing myself into the fire and working on an intermediate project and making a whole lot of mistakes along the way. Anyhow, I do know there are a few SID projects out there, and I have looked at them, but I'm also trying to figure this out for myself and conceptually how all the parts fit together. I am familiar with the Commodore 64 and SID registers and how to program it from that computer. I have the SID pinout chart and data sheet as well.
So let me explain what I do have in my project: I have two 595 shift registers cascaded together. One shift register is for the address bus (of which I use the lower five bits), the second is for the data. I have LEDs connected to each so I can see what's going on. My sequence of steps is to clear the registers, set the volume to max, wait, set frequency, set envelope, then turn on the waveform. I tested the equivalent code on a C64 emulator, and a sound is produced. At the end of each address & data pair, I have a pause of a second, so I could see what LEDs light up and what values are going through. So far as I can tell, the correct addresses and data are being sent.
Now, here is where I get a little confused. I have the SID's address and data pins connected to the appropriate output pins on the shift register. I have a 12V power supply to the Arduino and VDD (12V) is connected to VIn (which shows 12.5V on my multimeter) and VCC is connected to 5V. R-/W is grounded. RES pin is set +5V. My /CS pin is set to a pin on the Arduino--I originally tried just tying this to ground. The clock pin is connected to pin 9 using code in the setup that I found that generates a 1 MHz pulse. How am I supposed to synchronize this all? Right now I just shiftOut the address and data to the registers and before I set the latchPin HIGH, I set the 6581's /CS low. I wait a bit, then reset the /CS to high. Is that supposed to work in theory, or am I completely off-base with how it works? And how is this supposed to sync with the 1 MHz clock?
And the dumbest question: can I just connect a cheap earphone to the Audio Out and the other end to ground to hear if it's working, or am I even wrong about that?
Sorry about the really dumb questions, but I want to understand where conceptually I'm not understanding what I'm supposed to be doing.