| ← 969C | Map | 9731 → |
96EB: Blank the safety net band
|
Erases the safety net barrier from the side band on the bat's side, and leaves those cells empty and bright white.
The band is the mirror of the permanent border wall. That is why the bat-side test here runs the other way.
|
|||
|
Walks the same rows as draw_side_wall. It writes the empty tile into both cells and stamps them dirty.
|
|||
| blank_safety_net | 96EB | LD A,(bat_side) | Anchor the band on the mirror edge, the side the mirror wall routine draws after it flips the bat side. |
| 96EE | OR A | ||
| 96EF | JR NZ,blank_safety_net_0 | ||
| 96F1 | LD HL,TILEMAP_BASE+$9E | A zero side takes the right edge, column 30. | |
| 96F4 | JR blank_safety_net_1 | ||
| blank_safety_net_0 | 96F6 | LD HL,TILEMAP_BASE+$80 | A non-zero side takes the left edge, column 0. |
| blank_safety_net_1 | 96F9 | PUSH HL | Hold the anchor for the passes below. |
| 96FA | PUSH HL | Point DE at the anchor's own cell in the work buffer (INC D three times). | |
| 96FB | POP DE | ||
| 96FC | INC D | ||
| 96FD | INC D | ||
| 96FE | INC D | ||
| 96FF | LD B,$12 | Walk the wall band's full height. | |
| 9701 | LD A,$02 | Hold the dirty-counter value in A across the row loop. | |
| blank_safety_net_2 | 9703 | LD (HL),$20 | Write the empty tile into both cells and stamp both work-buffer cells dirty. |
| 9705 | LD (DE),A | ||
| 9706 | INC DE | ||
| 9707 | INC HL | ||
| 9708 | LD (HL),$20 | ||
| 970A | LD (DE),A | ||
| 970B | DEC HL | ||
| 970C | DEC DE | ||
| 970D | EX AF,AF' | Step both pointers down one 32-column row. The count byte rides in AF' across both calls. The first advances HL, and the second advances DE through EX DE,HL. | |
| 970E | CALL advance_buffer_row | ||
| 9711 | EX DE,HL | ||
| 9712 | CALL advance_buffer_row | ||
| 9715 | EX DE,HL | ||
| 9716 | EX AF,AF' | ||
| 9717 | DJNZ blank_safety_net_2 | ||
| 9719 | POP HL | Reload the anchor and convert it to its attribute-file address once, from the anchor alone. The tile-map page maps to the attribute-file page with the cell offset unchanged. The per-row step then walks the attribute pages in lockstep with the tile-map pages across rows 4–21. | |
| 971A | LD A,H | ||
| 971B | AND $03 | ||
| 971D | RRCA | ||
| 971E | RRCA | ||
| 971F | RRCA | ||
| 9720 | ADD A,$58 | ||
| 9722 | LD H,A | ||
| 9723 | LD B,$12 | ||
| blank_safety_net_3 | 9725 | LD (HL),$47 | Color both columns bright white ink on black paper, written straight to the attribute file for all 18 rows. |
| 9727 | INC L | ||
| 9728 | LD (HL),$47 | ||
| 972A | DEC L | ||
| 972B | CALL advance_buffer_row | ||
| 972E | DJNZ blank_safety_net_3 | ||
| 9730 | RET | ||
| ← 969C | Map | 9731 → |
