Quote:
Originally Posted by robinsonb5
Yes, basically the code polls a CIA register multiple times to create a fixed delay, allowing the shift register to do its thing. Some games poll the register fewer times, cutting the timing to the absolute minimum.
|
Ok, thanks! I was just looking at some CD32 gamepad reading routines but I'm more or less an assembly illiterate. What I know is a serial shift register sets the output to the first "input pin" value directly after loading, then for every clock pulse the output of the shift register will correspond to the next "input pin" value.
So is a "normal" CD32 gamepad read routine something along these lines:?
1. PotX (pin 5) is set low to enable shift mode of the LS165.
2. PotY (pin 9) is read?
3. Button1 (pin 6) is set HIGH and then LOW (clock pulse for the LS165)
4. Small wait then Amiga is reading PotY (the wait varies between games)
5. Repeat 3 and 4 until all data shifted.
6. PotX (pin 5) is set HIGH to enable load mode of the LS165.