Prev: 42542 Up: Map Next: 42695
42613: Game Selection Menu
Used by the routine at GameEntryPoint.
Prints "Please select method of control".
GameMenu 42613 LD HL,43915 HL=Messaging_SelectControl.
42616 LD DE,18464 DE=18464 (screen buffer location).
42619 CALL PrintString Call PrintString.
Prints "1 : Keyboard ( cursor keys )".
42622 LD HL,43947 HL=Messaging_SelectKeyboard.
42625 LD DE,18529 DE=18529 (screen buffer location).
42628 CALL PrintString Call PrintString.
Prints "2 : Kempston joystick".
42631 LD HL,43976 HL=Messaging_SelectKempston.
42634 LD DE,18561 DE=18561 (screen buffer location).
42637 CALL PrintString Call PrintString.
Prints "3 : Interface 2".
42640 LD HL,43998 HL=Messaging_SelectInterface2.
42643 LD DE,18593 DE=18593 (screen buffer location).
42646 CALL PrintString Call PrintString.
Prints "4 : Cursor key type joysticks".
42649 LD HL,44014 HL=Messaging_SelectCursor.
42652 LD DE,18625 DE=18625 (screen buffer location).
42655 CALL PrintString Call PrintString.
Handle retrieving the players input.
42658 LD BC,63486 Read from the keyboard;
Port Number Bit
0 1 2 3 4
247 1 2 3 4 5
GameMenu_Loop 42661 IN A,(C)
42663 BIT 0,A If "1" is pressed, set HL to Handler_Controls_Keyboard and jump to GameMenu_WriteControl.
42665 LD HL,46783
42668 JR Z,GameMenu_WriteControl
42670 BIT 3,A If "4" is pressed jump to GameMenu_WriteControl.
42672 JR Z,GameMenu_WriteControl
42674 LD HL,46821 If "2" is pressed, set HL to Handler_Controls_Kempston and jump to GameMenu_WriteControl.
42677 BIT 1,A
42679 JR Z,GameMenu_WriteControl
42681 LD HL,46851 If "3" is not pressed, set HL to Handler_Controls_Interface2 and jump to GameMenu_Loop.
42684 BIT 2,A
42686 JR NZ,GameMenu_Loop
The controller routine is written as the target address for a CALL operation at Handler_Controls.
GameMenu_WriteControl 42688 LD (46780),HL Write the appropriate controller location from HL into the CALL target at *46780.
42691 CALL PressAnyKey_0 Call PressAnyKey_0.
42694 RET Return.
Prev: 42542 Up: Map Next: 42695