| Chase H.Q. | Routines |
| Prev: C25D | Up: Map | Next: C2F6 |
|
Advances each of the 10 screen addresses in the row-offset table at $C401 (built by insert_high_score_entry) down by one pixel row, handling the ZX screen's non-linear third-boundary wrap. If a row's address runs into one of the bottom-of-window bounds ($C2D3-$C2EB), calls redraw_score_name to redraw/reset that row's name text. The byte at $C2F2 (normally NOP) is patched to RET by name_entry_input when name entry finishes, which stops this scroll immediately.
Used by the routine at insert_high_score_entry.
|
||||
| scroll_score_rows | C2B1 | LD B,$0A | B = 10 rows | |
| C2B3 | LD HL,$C401 | HL -> row-offset table | ||
| ssr_row_loop | C2B6 | LD E,(HL) | DE = this row's screen address | |
| C2B7 | INC HL | |||
| C2B8 | LD D,(HL) | |||
| C2B9 | INC D | Advance one pixel row | ||
| C2BA | LD A,D | |||
| C2BB | AND $07 | Handle the screen-third boundary wrap (as in cycle_and_draw_letter) | ||
| C2BD | JP NZ,scroll_score_rows_0 | |||
| C2C0 | LD A,D | |||
| C2C1 | SUB $08 | |||
| C2C3 | LD D,A | |||
| C2C4 | LD A,E | |||
| C2C5 | ADD A,$20 | |||
| C2C7 | LD E,A | |||
| C2C8 | JR NC,scroll_score_rows_0 | |||
| C2CA | LD A,D | |||
| C2CB | ADD A,$08 | |||
| C2CD | LD D,A | |||
| scroll_score_rows_0 | C2CE | LD (HL),D | Write the updated address back into the table | |
| C2CF | DEC HL | |||
| C2D0 | LD (HL),E | |||
| C2D1 | INC HL | |||
| C2D2 | INC HL | |||
|
$C2D3-$C2EB tests whether this row's address has reached the bottom of one of its two allowed screen windows; if so, jumps to redraw_score_name instead of continuing the scroll.
|
||||
| C2D3 | LD A,D | |||
| C2D4 | CP $48 | |||
| C2D6 | JR C,scroll_score_rows_2 | |||
| C2D8 | CP $50 | |||
| C2DA | JR NC,scroll_score_rows_1 | |||
| C2DC | LD A,E | |||
| C2DD | CP $E0 | |||
| C2DF | JR C,scroll_score_rows_2 | |||
| C2E1 | JP redraw_score_name | |||
| scroll_score_rows_1 | C2E4 | CP $58 | ||
| C2E6 | JR NC,scroll_score_rows_2 | |||
| C2E8 | LD A,E | |||
| C2E9 | CP $E0 | |||
| C2EB | JP C,redraw_score_name | |||
| scroll_score_rows_2 | C2EE | LD DE,$001F | Advance to the next row's table slot (31-byte stride) | |
| C2F1 | ADD HL,DE | |||
|
This entry point is used by the routine at redraw_score_name.
|
||||
| ssr_continue | C2F2 | NOP | Self-modified to RET by name_entry_input to stop the scroll | |
| C2F3 | DJNZ ssr_row_loop | |||
| C2F5 | RET | |||
| Prev: C25D | Up: Map | Next: C2F6 |