| Chase H.Q. | Routines |
| Prev: 99EC | Up: Map | Next: 9AAB |
|
The counter comes down by one and is stored back. Reaching zero means the effect is over, so print_chatter is called to reveal the face and the message; otherwise the routine falls through and draws the next frame of static.
Used by the routine at drive_chatter.
|
||||||||
| drive_noise_effect | 9A55 | DEC A | Decrement noise_counter | |||||
| 9A56 | LD ($963C),A | |||||||
| 9A59 | JP Z,print_chatter | Exit via print_chatter if it's zero, otherwise fallthrough | ||||||
|
This entry point is used by the routine at drive_chatter.
|
||||||||
| draw_noise_effect | 9A5C | RRA | Shift A's bottom bit into carry | |||||
| 9A5D | LD A,$FF | A = 255 -- plot_mini_font_cursor_off flag? | ||||||
| 9A5F | LD D,$20 | D = 32 -- ASCII character for plot_mini_font* | ||||||
| 9A61 | JR C,ne_9a68 | If A on input was odd then jump | ||||||
| 9A63 | CALL plot_mini_font_cursor_on | |||||||
| 9A66 | JR ne_9a6b | else call plot_mini_font_cursor_on and continue at $9a6b | ||||||
| ne_9a68 | 9A68 | CALL plot_mini_font_cursor_off | Call plot_mini_font_cursor_off | |||||
| ne_9a6b | 9A6B | LD DE,$4036 | Set plot address to (176,8) | |||||
| 9A6E | LD C,$28 | B,C = 4 columns/bytes, 40 rows | ||||||
| ne_9a70 | 9A70 | LD B,$04 | ||||||
| 9A72 | PUSH DE | Preserve row ptr | ||||||
| 9A73 | LD HL,$9634 | Point HL at noise_bytes | ||||||
| ne_plot_loop | 9A76 | LD A,(HL) | A = *HL - B -- Subtract row counter (4,3,2,1) | |||||
| 9A77 | SUB B | |||||||
| 9A78 | LD (HL),A | *HL++ = A | ||||||
| 9A79 | INC HL | |||||||
| 9A7A | RLCA | Rotate A left by 1 | ||||||
| 9A7B | ADD A,(HL) | *HL += A | ||||||
| 9A7C | LD (HL),A | |||||||
| 9A7D | LD (DE),A | *DE++ = A -- Store 8 random bits | ||||||
| 9A7E | INC E | |||||||
| 9A7F | DJNZ ne_plot_loop | Loop while columns remain | ||||||
| 9A81 | POP DE | Restore row ptr | ||||||
| 9A82 | INC D | Move to next row | ||||||
| 9A83 | LD A,D | Usual row movement magic here | ||||||
| 9A84 | AND $07 | |||||||
| 9A86 | JR NZ,drive_noise_effect_0 | |||||||
| 9A88 | LD A,E | |||||||
| 9A89 | ADD A,$20 | |||||||
| 9A8B | LD E,A | |||||||
| 9A8C | JR C,drive_noise_effect_0 | |||||||
| 9A8E | LD A,D | |||||||
| 9A8F | SUB $08 | |||||||
| 9A91 | LD D,A | |||||||
| drive_noise_effect_0 | 9A92 | DEC C | Loop while rows remain | |||||
| 9A93 | JP NZ,ne_9a70 | |||||||
| 9A96 | LD A,$47 | A = attribute $47 => BRIGHT + white over black | ||||||
|
This entry point is used by the routine at drive_chatter.
|
||||||||
| clear_face_attributes | 9A98 | LD HL,$5836 | Screen attribute position (22,1) | |||||
| 9A9B | LD B,$05 | 5 rows | ||||||
| 9A9D | LD DE,$001D | 32 - 3 = row skip | ||||||
| ne_9a00_loop | 9AA0 | LD (HL),A | Set four attribute bytes | |||||
| 9AA1 | INC L | |||||||
| 9AA2 | LD (HL),A | |||||||
| 9AA3 | INC L | |||||||
| 9AA4 | LD (HL),A | |||||||
| 9AA5 | INC L | |||||||
| 9AA6 | LD (HL),A | |||||||
| 9AA7 | ADD HL,DE | Move to start of next row | ||||||
| 9AA8 | DJNZ ne_9a00_loop | Loop while rows remain | ||||||
| 9AAA | RET | Return | ||||||
| Prev: 99EC | Up: Map | Next: 9AAB |