size-optimized screen clearing

This commit is contained in:
FeralChild64 committed 2020-01-03 20:48:38 +01:00
1 parent 64c8bc6b82
commit da2fa7ac90
3 files changed
+31 -68

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
//
// Clear screen and initialise line link table, described in:
//
// - [CM64] Computes Mapping the Commodore 64 - pages 215-216
//
clear_screen:
// Clear the line link table - cheecked on original ROMs,
// the highest bit set means that the line is NOT a logical
// continuation of the previous one
lda #$80
ldy #24
!:
sta LDTBL,y
dey
bpl !-
// Clear all the rows
ldx #24
!:
jsr screen_clear_line
dex
bpl !-
// Fall to cursor home routine
jmp cursor_home