Prev: D392 Up: Map Next: D3B4
D39B: Reads In-Game Keyboard Controls (1-2-3)
Used by the routine at Controls_Joystick.
Controls_Keyboard D39B LD A,$F7 Read from the keyboard;
Port Number Bit
0 1 2 3 4
F7 1 2 3 4 5
D39D IN A,($FE)
Handle "1" being pressed.
Controls_Input_01 D39F BIT 0,A If "1" isn't being pressed then jump to Controls_Input_02.
D3A1 JR NZ,Controls_Input_02
D3A3 LD A,$12 Set A=$12 and return.
D3A5 RET
Handle "2" being pressed.
Controls_Input_02 D3A6 BIT 1,A If "2" isn't being pressed then jump to Controls_Input_03.
D3A8 JR NZ,Controls_Input_03
D3AA LD A,$10 Set A=$10 and return.
D3AC RET
Handle "3" being pressed.
Controls_Input_03 D3AD BIT 2,A If "3" isn't being pressed then jump to Controls_Input_O_P.
D3AF JR NZ,Controls_Input_O_P
D3B1 LD A,$11 Set A=$11 and return.
D3B3 RET
Prev: D392 Up: Map Next: D3B4