![]() |
Routines |
| Prev: 60360 | Up: Map | Next: 60638 |
|
Used by the routines at Display_High_Score_Entry_Screen and Save_Or_Load_High_Scores.
Clears the display pixel area (16384-22527) to black and fills the 768 attribute cells with the byte in A, then derives the border colour from A's paper bits and updates both BORDCR (23624) and the ULA border port (254).
|
||||||||
| Initialise_Display_And_Border | 60580 | LD HL,16384 | Set up to clear the pixel area (16384-22527 6144 bytes). | |||||
| 60583 | LD DE,16385 | |||||||
| 60586 | LD BC,6144 | |||||||
| 60589 | LD (HL),0 | Clear the first pixel byte and fill the remaining display pixels to black via LDIR. | ||||||
| 60591 | LDIR | |||||||
| 60593 | LD BC,768 | Set the attribute fill count to 768 cells. | ||||||
| 60596 | LD (HL),A | Seed the first attribute cell with A and fill all 768 attribute cells via LDIR. | ||||||
| 60597 | LDIR | |||||||
| 60599 | AND %00111000 | Isolate the paper colour bits from the attribute. | ||||||
| 60601 | BIT 5,A | Skip to Set_Border_Colour if the paper colour is in the upper range (4-7). | ||||||
| 60603 | JR NZ,Set_Border_Colour | |||||||
| 60605 | XOR %00000111 | Complement the ink colour bits to contrast with dark paper. | ||||||
| Set_Border_Colour | 60607 | LD (23624),A | Write the background colour to *BORDCR. | |||||
| 60610 | AND %00111000 | Re-isolate the paper colour bits. | ||||||
| 60612 | RRCA | Shift the paper colour into the low 3 bits. | ||||||
| 60613 | RRCA | |||||||
| 60614 | RRCA | |||||||
| 60615 | OUT (254),A | Write the paper colour to the ULA border port 254. | ||||||
| 60617 | RET | Return. | ||||||
|
This entry point is used by the routine at Display_High_Score_Entry_Screen.
Alternate entry: compute a score character position as A × 8 + B and highlight its attribute row via Calculate_Attr_Cell_Address and Highlight_Score_Entry_Row.
|
||||||||
| Render_Score_Character | 60618 | ADD A,A | Compute the character position index as A × 8 + B. | |||||
| 60619 | ADD A,A | |||||||
| 60620 | ADD A,A | |||||||
| 60621 | ADD A,B | |||||||
| 60622 | CALL Calculate_Attr_Cell_Address | Calculate the attribute cell address for this position via Calculate_Attr_Cell_Address. | ||||||
| 60625 | CALL Highlight_Score_Entry_Row | Highlight the score entry row with bright white via Highlight_Score_Entry_Row. | ||||||
| 60628 | RET | Return. | ||||||
|
This entry point is used by the routine at Display_High_Score_Entry_Screen.
Alternate entry: highlight a single score entry attribute cell on row 89 directly, using A × 2 + 1 as the cell offset.
|
||||||||
| Highlight_Score_Entry_Cell | 60629 | ADD A,A | Compute the attribute cell offset as A × 2 + 1. | |||||
| 60630 | ADD A,1 | |||||||
| 60632 | LD L,A | |||||||
| 60633 | LD H,89 | Write INK: WHITE, PAPER: BLACK (BRIGHT) to attribute row 89 at the computed offset. | ||||||
| 60635 | LD (HL),71 | |||||||
| 60637 | RET | Return. | ||||||
| Prev: 60360 | Up: Map | Next: 60638 |