Prev: F8CF Up: Map Next: F981
F916: Selection Screen
Used by the routine at GameEntryPoint.
This routine builds the game selection screen.
SelectionScreen F916 XOR A Set border colour to BLACK.
F917 OUT ($FE),A
F919 CALL UpdateXXXXXBuffer Call UpdateXXXXXBuffer.
The admin screens show the right-hand side of level 2.
F91C LD A,$02 A=level 02.
F91E CALL FindScene Call FindScene.
F921 CALL WriteSceneToShadowBuffer Call WriteSceneToShadowBuffer.
F924 CALL CreateAdminPageTemplate Call CreateAdminPageTemplate.
F927 CALL Print_SelectionScreen Call Print_SelectionScreen.
The selection page displays for a period of time, and then the game cycles through playareas.
F92A LD B,$FF B=FF (counter).
SelectionScreen_0 F92C HALT Halt operation (suspend CPU until the next interrupt).
F92D PUSH BC Stash BC on the stack.
F92E CALL ChooseControlType Call ChooseControlType.
F931 POP BC Restore BC from the stack.
F932 JR NZ,SelectionScreen_1 Jump to SelectionScreen_1 if {} is not zero.
F934 LD A,D Jump to SelectionScreen_1 if D is equal to FF.
F935 CP $FF
F937 JR Z,SelectionScreen_1
F939 CP $1E Return if A is equal to 1E.
F93C CP $0F Jump to SelectionScreen_0 if A is not equal to 0F.
F93E JR NZ,SelectionScreen_0
Removes the print termination bit from the entire table at Table_ASCII.
F940 LD HL,$FBF2 HL=Table_ASCII.
F943 LD B,$28 B=28 (length).
StripPrintTerminationBit_Loop F945 LD A,(HL) A=*HL.
F946 AND %01111111 Keep only bits 0-6.
F948 LD (HL),A Write A to *HL.
F949 INC HL Increment HL by one.
F94A DJNZ StripPrintTerminationBit_Loop Decrease counter by one and loop back to StripPrintTerminationBit_Loop until counter is zero.
F94C CALL CreateAdminPageTemplate Call CreateAdminPageTemplate.
F94F CALL ChangeControls Call ChangeControls.
F952 JR SelectionScreen Jump to SelectionScreen.
SelectionScreen_1 F954 DJNZ SelectionScreen_0 Decrease counter by one and loop back to SelectionScreen_0 until counter is zero.
F956 CALL PressAnyKey_Pause Call PressAnyKey_Pause.
F959 JR NZ,SelectionScreen Jump to SelectionScreen if {} is not zero.
This loops over some level playareas until a key is pressed or we reach level 0B.
F95B LD B,$01 B=level 01.
DisplayLevels_Loop F95D PUSH BC Stash the current level on the stack twice.
F95F CALL UpdateXXXXXBuffer Call UpdateXXXXXBuffer.
F962 POP BC Restore current level from the stack.
F963 LD A,B A=current level to display.
F964 CALL FindScene Call FindScene.
F967 CALL WriteSceneToShadowBuffer Call WriteSceneToShadowBuffer.
F96A CALL Scene_DisplayCarpet Call Scene_DisplayCarpet.
F96D CALL ScreenBuffer_Update Call ScreenBuffer_Update.
F970 CALL AttributeBuffer_Update Call AttributeBuffer_Update.
F973 CALL PressAnyKey_Pause Call PressAnyKey_Pause.
F976 POP BC Restore current level from the stack.
F977 JR NZ,SelectionScreen Jump to SelectionScreen if any key has been pressed.
F979 INC B Increment current level by one.
Only display levels 00-0A.
F97A LD A,B Loop back to DisplayLevels_Loop until B is equal to 0B.
F97B CP $0B
F97D JR NZ,DisplayLevels_Loop
Display the selection screen options.
F97F JR SelectionScreen Jump to SelectionScreen.
Prev: F8CF Up: Map Next: F981