Prev: 733E Up: Map Next: 7393
7374: Input: Fire
Used by the routine at JetmanThrust.
Check if this should be read from the Kempston joystick instead?
ReadInputFire 7374 LD A,($5CF3) If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick.
7377 BIT 1,A
7379 JR NZ,ReadKempstonJoystick
Check for "Fire" button input.
737B LD B,$02 B=02 (counter for checking two ports).
737D LD A,$FD Read from the keyboard;
Port Number Bit
0 1 2 3 4
$FD A S D F G
$BF ENTER L K J H
ReadInputFire_Loop 737F OUT ($FD),A
7381 IN A,($FE)
7383 AND %00011111 Keep only bits 0-4.
7385 CP $1F If any buttons were pressed jump to Input_Fire.
7387 JR NZ,Input_Fire
7389 LD A,$BF A=switch to port BF.
738B DJNZ ReadInputFire_Loop Decrease counter by one and loop back to ReadInputFire_Loop until counter is zero.
Return "no input".
738D LD A,$FF A=11111111.
738F RET Return.
Return "Fire" button pressed.
Input_Fire 7390 LD A,$EF A=11101111.
7392 RET Return.
View the equivalent code in;
Prev: 733E Up: Map Next: 7393