← 990B Render the tile map to the screen Map 996B → Clear the dirty counters
995C: Clear the tile map to empty
Fills the tile map with the empty tile so the playfield starts blank.
clear_tilemap 995C LD HL,TILEMAP_BASE Start at the tile map.
995F LD BC,TILEMAP_SIZE Process every cell.
clear_tilemap_0 9962 LD (HL),$20 Write the empty tile and advance.
9964 INC HL
9965 DEC BC
9966 LD A,B
9967 OR C
9968 JR NZ,clear_tilemap_0
996A RET
← 990B Render the tile map to the screen Map 996B → Clear the dirty counters
Fork me on GitHub