more screeen work, provided unofficial line clear routine

This commit is contained in:
FeralChild64 committed 2020-01-03 20:43:32 +01:00
1 parent ca22b228d7
commit 64c8bc6b82
11 files changed
+50 -24

No files matched your search

+1 -1
View File
@@ -245,7 +245,7 @@ Not all of them - only these we want to have implemented.
| `$E8DA` | color code table | DONE | |
| `$E8EA` | scroll line | NOT DONE | |
| `$E96C` | insert line on top | NOT DONE | |
| `$E9FF` | clear line | NOT DONE | |
| `$E9FF` | clear line | DONE | |
| `$EA31` | default IRQ | PARTIAL | |
| `$EA7E` | ack CIA1 + below | DONE | |
| `$EA81` | ret from IRQ/NMI | DONE | |
-4
View File
@@ -1,4 +0,0 @@
// XXX provide documentation and implementation
STUB_IMPLEMENTATION()
+1 -3
View File
@@ -3,9 +3,7 @@
// CLR key handling within CHROUT
//
chrout_screen_CLR: /* YYY disabled for rework
chrout_screen_CLR:
jsr clear_screen
jmp chrout_screen_done
*/
-5
View File
@@ -4,12 +4,7 @@
//
chrout_screen_HOME:
rts
/* YYY disabled for rework
chrout_screen_HOME:
jsr cursor_home
jmp chrout_screen_done
*/
+2 -4
View File
@@ -4,13 +4,11 @@
//
chrout_screen_RETURN: /* YYY disabled for rework
chrout_screen_RETURN:
// RETURN clears quote and insert modes, it also clears reverse flag
lda #$00
sta QTSW
sta INSRT
sta RVS
jmp chrout_screen_advance_to_next_line
*/
jmp screen_advance_to_next_line
+1 -1
View File
@@ -19,7 +19,7 @@ clear_screen_real:
dey
bpl !-
// YYY flow can probably be size-optimized, by clearing a single row each time (we will need such a subroutine)
// YYY flow can probably be size-optimized by calling screen_clear_line in a loop
// Clear screen character RAM. Unfortunately, the HIBASE value is not on the zero page,
// we will reuse PNT (it will be overridden in a moment nevertheless) as the pointer
@@ -9,7 +9,11 @@
screen_calculate_PNT_USER:
// YYY jsr screen_normalize_xy - do we need this? probably not
ldx TBLX
// FALLTROUGH
screen_calculate_PNT_USER_from_X: // entry point for screen_clear_line
// Reset pointer to start of screen
@@ -20,7 +24,7 @@ screen_calculate_PNT_USER:
// Add 40 to PNT for every line
ldx TBLX
cpx #$00
beq screen_calculate_USER
!:
lda #40
File renamed without changes.
@@ -0,0 +1,34 @@
//
// Well-known routine, described in:
//
// - [CM64] Computes Mapping the Commodore 64 - page 219
// - http://sta.c64.org/cbm64scrfunc.html
//
// input: .X - screen line to clear
//
// Checked that original routine preserves X (convenient for loops),
// and leaves space screen code in .A, so duplicate this behaviour
//
screen_clear_line:
// First, calculate PNT and USER
phx_trash_a
jsr screen_calculate_PNT_USER_from_X
plx_trash_a
// Now clear the line
ldy #39
!:
lda COLOR
sta (USER), y
lda #$20 // space character screen code
sta (PNT), y
dey
bpl !-
// Done
rts
@@ -1,8 +1,8 @@
screen_advance_to_next_line:
.break
rts
jmp screen_advance_to_next_line
/* YYY disabled for rework
+3 -2
View File
@@ -6,8 +6,9 @@ screen_grow_logical_line_done:
screen_grow_logical_line:
.break
rts
jmp screen_grow_logical_line // YYY
/* YYY disabled for rework