Prev: EBBC Up: Map Next: ECA4
EBC8: Display High Score Entry Screen
Used by the routines at Check_Any_Key_During_Display and Attract_Mode_Loop.
Initialises the high score entry screen: clears the display, prints the option header from Messaging_SelectOptions, and renders the current score entries with their cursor markers. Runs a 4B-frame input loop allowing keyboard and joystick adjustment of the three score entry fields via Adjust_Score_Field_Cursor and Adjust_Name_Entry_Cursor. After name entry, redraws the final score table and cycles the display for 32 frames before jumping to the attract mode at Attract_Mode_Loop.
Display_High_Score_Entry_Screen EBC8 XOR A Clear the display with attribute BLACK via Initialise_Display_And_Border.
EBC9 CALL Initialise_Display_And_Border
EBCC CALL Draw_Colour_Border Initialise the scrolling display via Draw_Colour_Border.
EBCF CALL Cycle_Border_Colour Advance the colour cycle via Cycle_Border_Colour.
EBD2 LD HL,$EE66 Call PrintMessaging using Messaging_SelectOptions.
EBD5 CALL PrintMessaging
EBD8 LD A,$06 Write 06 to *C500.
EBDA LD ($C500),A
EBDD LD A,$46 Write 46 to *C501.
EBDF LD ($C501),A
EBE2 LD A,$04 Write 04 to *C502.
EBE4 LD ($C502),A
EBE7 LD A,($C4FD) Load the first score entry cursor from C4FD.
EBEA LD B,$19 Set the column position to 19.
EBEC CALL Render_Score_Character Render the first score entry character via Render_Score_Character.
EBEF LD A,($C4FE) Load the second score entry cursor from C4FE.
EBF2 CALL Highlight_Score_Entry_Cell Highlight the second score entry character via Highlight_Score_Entry_Cell.
EBF5 LD A,($C4FF) Load the third score entry cursor from C4FF.
EBF8 LD B,$49 Set the column position to 49.
EBFA CALL Render_Score_Character Render the third score entry character via Render_Score_Character.
EBFD XOR A Clear A.
EBFE LD B,$99 Set the column position to 99.
EC00 CALL Render_Score_Character Clear the bottom score entry position via Render_Score_Character.
EC03 EXX Switch to the alternate registers.
EC04 LD B,$4B Set the name entry frame counter to 4B in B'.
Per-frame name entry loop: services controls and handles character selection for all three score entry fields each frame.
High_Score_Entry_Loop EC06 EXX Switch back to the main registers for this frame.
EC07 LD C,$64 Set the frame delay count to 64.
EC09 CALL Display_Loop_Delay Run the per-frame timing delay via Display_Loop_Delay.
EC0C CALL CheckBreakKey Check for the BREAK key combination via CheckBreakKey.
EC0F CALL Check_S_Key_During_Display Check for the S key via Check_S_Key_During_Display.
EC12 CALL Save_Or_Load_High_Scores Check for tape save/load keys (J/L) via Save_Or_Load_High_Scores.
EC15 CALL Scan_And_Cycle_Screen_Attributes Read the joystick input via Scan_And_Cycle_Screen_Attributes.
EC18 LD DE,$C500 Point DE to the score entry columns at C500.
EC1B LD IX,$C503 Point IX to the score entry parameters at C503.
EC1F CALL Scan_Score_Display_Attributes Update the score display via Scan_Score_Display_Attributes.
EC22 CALL Cycle_Border_Colour Advance the colour cycle via Cycle_Border_Colour.
EC25 CALL $028E Call KEY_SCAN.
EC28 JR NZ,High_Score_Entry_Loop_End Skip character field handling if no player input is registered.
EC2A INC E Advance the character selection index.
EC2B JR Z,High_Score_Entry_Loop_End Skip to High_Score_Entry_Loop_End if the selection index has overflowed.
EC2D DEC E Step the selection index back by one.
EC2E LD B,$02 Set the field count to 02.
EC30 LD A,($C500) Load the first cursor column from C500 into C.
EC33 LD C,A
EC34 LD A,($C4FD) Load the first cursor position from C4FD into D.
EC37 LD D,A
EC38 LD IX,$EE28 Point IX to the first character table at EE28.
EC3C CALL Adjust_Score_Field_Cursor Adjust the first score entry field via Adjust_Score_Field_Cursor.
EC3F LD A,D Write the updated first cursor position back to C4FD.
EC40 LD ($C4FD),A
EC43 JR Z,High_Score_Entry_Loop_End Skip to High_Score_Entry_Loop_End if only the first field was updated.
EC45 LD B,$09 Set the field count to 09.
EC47 LD A,($C501) Load the second cursor column from C501 into C.
EC4A LD C,A
EC4B LD A,($C4FE) Load the second cursor position from C4FE into D.
EC4E LD D,A
EC4F LD IX,$EE2E Point IX to the second character table at EE2E.
EC53 CALL Adjust_Name_Entry_Cursor Adjust the second score entry field via Adjust_Name_Entry_Cursor.
EC56 LD A,D Write the updated second cursor position back to C4FE.
EC57 LD ($C4FE),A
EC5A JR Z,High_Score_Entry_Loop_End Skip to High_Score_Entry_Loop_End if only the second field was updated.
EC5C LD B,$06 Set the field count to 06.
EC5E LD A,($C502) Load the third cursor column from C502 into C.
EC61 LD C,A
EC62 LD A,($C4FF) Load the third cursor position from C4FF into D.
EC65 LD D,A
EC66 LD IX,$EE49 Point IX to the third character table at Score_Entry_Field_Three_Table.
EC6A CALL Adjust_Score_Field_Cursor Adjust the third score entry field via Adjust_Score_Field_Cursor.
EC6D LD A,D Write the updated third cursor position back to C4FF.
EC6E LD ($C4FF),A
High_Score_Entry_Loop_End EC71 EXX Switch to the alternate registers.
EC72 DJNZ High_Score_Entry_Loop Decrement the frame counter and loop back to High_Score_Entry_Loop.
EC74 EXX Switch back to the main registers.
This entry point is used by the routine at Save_Or_Load_High_Scores.
Name entry complete: clear the display and redraw the final score table before the display cycling phase.
High_Score_Display EC75 XOR A Clear the display with attribute BLACK via Initialise_Display_And_Border.
EC76 CALL Initialise_Display_And_Border
EC79 CALL Draw_Colour_Border Initialise the scrolling display via Draw_Colour_Border.
EC7C CALL Cycle_Border_Colour Advance the colour cycle via Cycle_Border_Colour.
EC7F CALL Display_High_Score_Screen Render the high score table via Display_High_Score_Screen.
EC82 EXX Switch to the alternate registers.
EC83 LD B,$32 Set the display frame counter to 32 in B'.
Per-frame display cycling loop: services controls and colour attributes for 32 frames before returning to the attract mode.
High_Score_Display_Loop EC85 EXX Switch back to the main registers for this frame.
EC86 LD C,$64 Set the frame delay count to 64.
EC88 CALL Display_Loop_Delay Run the per-frame timing delay via Display_Loop_Delay.
EC8B CALL CheckBreakKey Check for the BREAK key combination via CheckBreakKey.
EC8E CALL Check_S_Key_During_Display Check for the S key via Check_S_Key_During_Display.
EC91 CALL Save_Or_Load_High_Scores Check for tape save/load keys (J/L) via Save_Or_Load_High_Scores.
EC94 CALL Check_Any_Key_During_Display Restart the high score display if any key is held via Check_Any_Key_During_Display.
EC97 CALL Scan_And_Cycle_Screen_Attributes Read the joystick input via Scan_And_Cycle_Screen_Attributes.
EC9A CALL Cycle_Border_Colour Advance the colour cycle via Cycle_Border_Colour.
EC9D EXX Switch to the alternate registers.
EC9E DJNZ High_Score_Display_Loop Decrement the frame counter and loop back to High_Score_Display_Loop.
ECA0 EXX Switch back to the main registers.
ECA1 JP Attract_Mode_Loop Jump to the attract mode loop at Attract_Mode_Loop.
Prev: EBBC Up: Map Next: ECA4