Prev: D108 Up: Map Next: D16F
D10C: Set Interface 2 Joystick
Used by the routine at TitleScreen.
Discover which port is being used.
Ask the player to press the fire button on their joystick.
SetInterface2Joystick D10C LD DE,$D16F DE=Messaging_PressFireButton.
D10F CALL PrintString Call PrintString.
Pause to let the message sink in...
D112 LD BC,$03E8 BC=03E8 (pause loops).
SetInterface2Joystick_Loop D115 PUSH BC Stash the pause loop counter on the stack.
D116 CALL SmallPause Call SmallPause.
D119 CALL $028E Call KEY_SCAN.
D11C POP BC Restore the pause loop counter from the stack.
D11D LD A,E Jump to SetInterface2Joystick_Left if the left-hand joystick port fire button was pressed (04 == "5").
D11E CP $04
D120 JP Z,SetInterface2Joystick_Left
D123 CP $23 Jump to SetInterface2Joystick_Right if the right-hand joystick port fire button was pressed (23 == "0").
D125 JP Z,SetInterface2Joystick_Right
D128 DEC BC Decrease the pause loop counter by one.
D129 LD A,C Jump to SetInterface2Joystick_Loop until the pause loop counter is zero.
D12A OR B
D12B JR NZ,SetInterface2Joystick_Loop
No response from the player, so do nothing and return.
D12D LD B,$12 Clear the bottom 12 lines using CL_LINE.
D12F CALL $0E44
D132 JP Print_TitleScreen Jump to Print_TitleScreen.
Sets the user-defined keys for the right-hand Interface 2 joystick.
SetInterface2Joystick_Right D135 LD DE,$5BEB DE=UserDefinedKeys_Left.
D138 LD HL,$D16A HL=Interface2KeyMap_Right.
D13B LD BC,$0005 BC=0005.
D13E LDIR Copy the keymap to the user-defined keys store.
D140 LD A,$1C Write Interface 2 joystick (1C) to *ControlMethod.
D142 LD ($5BEA),A
D145 LD B,$12 Clear the bottom 12 lines using CL_LINE.
D147 CALL $0E44
D14A JP Print_TitleScreen Jump to Print_TitleScreen.
Sets the user-defined keys for the left-hand Interface 2 joystick.
SetInterface2Joystick_Left D14D LD DE,$5BEB DE=UserDefinedKeys_Left.
D150 LD HL,$D165 HL=Interface2KeyMap_Left.
D153 LD BC,$0005 BC=0005.
D156 LDIR Copy the keymap to the user-defined keys store.
D158 LD A,$1C Write Interface 2 joystick (1C) to *ControlMethod.
D15A LD ($5BEA),A
D15D LD B,$12 Clear the bottom 12 lines using CL_LINE.
D15F CALL $0E44
D162 JP Print_TitleScreen Jump to Print_TitleScreen.
The key maps for left and right Interface 2 joystick ports.
Interface2KeyMap_Left D165 DEFB $24,$1C,$0C,$14,$04
Interface2KeyMap_Right D16A DEFB $03,$0B,$1B,$13,$23
Prev: D108 Up: Map Next: D16F