On Dec 7, 2007 12:00 PM, Mark Meiss <chaosotter76 at gmail.com> wrote:
Reading the digital inputs from the joystick ports is indeed just a matter
of reading $DC00 (port 2) and $DC01 (port 1). The question is whether
there's any obstacle to setting the DDR on the CIA to make some of the pins
on the joystick ports digital outputs rather than inputs. I don't know
whether this would work or not, because the joystick pins on the CIA are
shared with the keyboard matrix. I can dig out my Programmer's Reference
tonight and peek at the schematics, or maybe somebody out there just
knows...?
Following up to myself, it seems that as long as you disable interrupts to
avoid having the keyboard scan routine execute, all is well and you're free
to set the DDR for output. Here's a project that does just that:
http://esglabs.com/personal/parody/commies/joyport.html