Prev: 53512 Up: Map Next: 53615
53516: 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 53516 LD DE,53615 DE=Messaging_PressFireButton.
53519 CALL PrintString Call PrintString.
Pause to let the message sink in...
53522 LD BC,1000 BC=1000 (pause loops).
SetInterface2Joystick_Loop 53525 PUSH BC Stash the pause loop counter on the stack.
53526 CALL SmallPause Call SmallPause.
53529 CALL 654 Call KEY_SCAN.
53532 POP BC Restore the pause loop counter from the stack.
53533 LD A,E Jump to SetInterface2Joystick_Left if the left-hand joystick port fire button was pressed (4 == "5").
53534 CP 4
53536 JP Z,SetInterface2Joystick_Left
53539 CP 35 Jump to SetInterface2Joystick_Right if the right-hand joystick port fire button was pressed (35 == "0").
53541 JP Z,SetInterface2Joystick_Right
53544 DEC BC Decrease the pause loop counter by one.
53545 LD A,C Jump to SetInterface2Joystick_Loop until the pause loop counter is zero.
53546 OR B
53547 JR NZ,SetInterface2Joystick_Loop
No response from the player, so do nothing and return.
53549 LD B,18 Clear the bottom 18 lines using CL_LINE.
53551 CALL 3652
53554 JP Print_TitleScreen Jump to Print_TitleScreen.
Sets the user-defined keys for the right-hand Interface 2 joystick.
SetInterface2Joystick_Right 53557 LD DE,23531 DE=UserDefinedKeys_Left.
53560 LD HL,53610 HL=Interface2KeyMap_Right.
53563 LD BC,5 BC=0005.
53566 LDIR Copy the keymap to the user-defined keys store.
53568 LD A,28 Write Interface 2 joystick (28) to *ControlMethod.
53570 LD (23530),A
53573 LD B,18 Clear the bottom 18 lines using CL_LINE.
53575 CALL 3652
53578 JP Print_TitleScreen Jump to Print_TitleScreen.
Sets the user-defined keys for the left-hand Interface 2 joystick.
SetInterface2Joystick_Left 53581 LD DE,23531 DE=UserDefinedKeys_Left.
53584 LD HL,53605 HL=Interface2KeyMap_Left.
53587 LD BC,5 BC=0005.
53590 LDIR Copy the keymap to the user-defined keys store.
53592 LD A,28 Write Interface 2 joystick (28) to *ControlMethod.
53594 LD (23530),A
53597 LD B,18 Clear the bottom 18 lines using CL_LINE.
53599 CALL 3652
53602 JP Print_TitleScreen Jump to Print_TitleScreen.
The key maps for left and right Interface 2 joystick ports.
Interface2KeyMap_Left 53605 DEFB 36,28,12,20,4
Interface2KeyMap_Right 53610 DEFB 3,11,27,19,35
Prev: 53512 Up: Map Next: 53615