I spent most of this beautiful Sunday afternoon cloistered indoors and working on bringing up the new 6522 VIA board for the RC2014.
Attachment:
File comment: 6522 board
6522board-small.jpg [ 220.54 KiB | Viewed 4566 times ]
It is set up as a typical RC2014 board except for the use of the R/W signal on pin 39 of the RC2014 bus. I decided not to use the /WR signal since that is gated on Phi2 and there's usually a pre-Phi2 rising edge setup time for 6800/6500 style peripherals. The 2 connectors for the ports are per Daryl's specs.
In any case, I was looking at the sample code on this site
http://6502.org/source/io/6522timr.htm and found at least a couple of errors in the use of Timer 1:
1. For Timer 1, the value that you compare IFR against is not $20 but $40.
2. Clearing the interrupt flag requires a read from T1CL (per Rockwell specs and my own testing).
Check out my modified test code on GitHub:
https://github.com/ancientcomputing/rc2014/tree/master/source/6502/6522.
The code's probably a little cryptic but I was running 10ms timeouts on the 6522 timer to drive a software counter. This gave me a 1 second tick (+/- 10ms
)
My next step is to put together an audio output with the same free-running counter.