← 995C Clear the tile map to empty Map 997A → Clear the back buffer
996B: Clear the dirty counters
Marks every tile-map cell clean.
clear_workbuf 996B LD HL,WORKBUF_FB Zero every dirty counter, so a new screen starts with nothing marked dirty.
996E LD BC,TILEMAP_SIZE
clear_workbuf_0 9971 LD (HL),$00
9973 INC HL
9974 DEC BC
9975 LD A,B
9976 OR C
9977 JR NZ,clear_workbuf_0
9979 RET
← 995C Clear the tile map to empty Map 997A → Clear the back buffer
Fork me on GitHub