Is there any documentation on the VIA #33
Replies: 3 comments 6 replies
-
It is much like a C64 although the C64 used a 6526 CIA instead of the 6522 VIA. Nevertheless it is very similar and I used code that was intended to read a SNES controller on a C64 user port with very little modification. I hooked up 2 SNES controllers to the VIA. If you want an example of how to interface with the VIA my code both reads and writes to the pins; you should be able to adapt it to an Atari joystick which is simpler because it uses 1 pin per button I instead of latch and clock like the NES/SNES. Here is my code: Here is the documentation for the VIA: |
Beta Was this translation helpful? Give feedback.
-
Here is some basic code to read an atari style joystick. To answer your question about registers, in the rp6502.inc assembly include file there are registers to use in assembly. VIA_DDRA controls the direction of port A and VIA_PA1 is the port A IO register. As far as using the VIA registers in C directly I dont' think that is included but CC65 does have a header for a 6522 so you could set it up. Try:
Maybe this will be added to the rp6502.h at some point? |
Beta Was this translation helpful? Give feedback.
-
I don't have a board -- if you get a built board, how do you get to the VIA pins? |
Beta Was this translation helpful? Give feedback.
-
Not sure if I missed it, but I would like to add a basic atari joystick or perhaps a retro keyboard.
Guessing it's very must like on the C64
Beta Was this translation helpful? Give feedback.
All reactions