← 9635 Draw or color the mirror side wall on the bat's side Map 9695 → Copy a run of bytes
9667: Draw a top/bottom border strip
Draws a border strip into the tile map and colors its attribute cells.
It stamps no dirty counters, unlike the side wall. The border reaches the screen through the tile-map render once per level.
Input
HL top-left tile-map cell of the 28×2 strip
draw_wide_strip 9667 PUSH HL Save the strip's top-left cell twice: for the second tile row and for the attribute pass.
9668 PUSH HL
9669 LD B,$1C Copy the first row of the border strip tiles into the strip's top row.
966B LD DE,border_strip_tiles
966E CALL copy_bytes
9671 POP HL Restore the top-left cell and drop to the next tile row.
9672 CALL advance_buffer_row
9675 LD B,$1C Copy the table's second row into the strip's bottom row; the table continues where the first copy left off.
9677 CALL copy_bytes
967A POP HL Reuse the saved cell offset as an attribute-file address: the tile-map page maps to the attribute-file page of the same cell, low byte unchanged.
967B LD A,H
967C AND $03
967E ADD A,$58
9680 LD H,A
9681 PUSH HL Color the top row.
9682 LD B,$1C
color_strip_top 9684 LD (HL),$45 Color 28 cells bright cyan ink on black paper.
9686 INC L
9687 DJNZ color_strip_top
9689 POP HL Drop to the bottom attribute row and color it.
968A CALL advance_buffer_row
968D LD B,$1C
color_strip_bottom 968F LD (HL),$44 Color 28 cells bright green ink.
9691 INC L
9692 DJNZ color_strip_bottom
9694 RET
← 9635 Draw or color the mirror side wall on the bat's side Map 9695 → Copy a run of bytes
Fork me on GitHub