View Single Post
Old 09 May 2014, 18:42   #18
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
Quote:
Originally Posted by Asman View Post

1.
Set ciaddra joystick button bit
Clear ciapra joystick button bit

But for what is that code ? Is it necessary to do it ?
The CD32 pad contains a serial shift register (74LS165) which is used to send the status of each button in turn to pin 9 of the gameport (which is the pin usually assigned to the right mouse button, or second button on a two-button pad.) This shift register is clocked using pin 6 of the gameport (which is normally the fire button pin) - so the initialisation code changes that pin from input to output, then pulls it low. The set/clear later on in the main loop sends a clock pulse to the shift register, placing the next button's status on pin 9.

Pin 5 is used as a select line - normally high (in which case only the red button is readable, as a normal fire button), and pulled low by the POTGO stuff to activate the shift register.
robinsonb5 is offline  
 
Page generated in 0.05035 seconds with 11 queries