further line grow fixes
This commit is contained in:
1 parent
b498d4010b
commit
2e27b7f9c2
2 files changed
+27
-13
No files matched your search
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// YYY does not work properly on growing logical line
|
// YYY does not work properly on growing logical line
|
||||||
// YYY implement LNMX
|
|
||||||
|
|
||||||
|
|
||||||
chrout_screen_INS:
|
chrout_screen_INS:
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
screen_grow_logical_line_screen_up:
|
screen_grow_logical_line_screen_up:
|
||||||
|
|
||||||
jsr screen_scroll_up
|
jsr screen_scroll_up
|
||||||
|
ldy TBLX
|
||||||
|
lda #$00
|
||||||
|
sta LDTBL+1, y // mark the next line as continuation
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
@@ -17,7 +20,7 @@ screen_grow_logical_line:
|
|||||||
|
|
||||||
// Do not grow line if previus one is grown
|
// Do not grow line if previus one is grown
|
||||||
ldy TBLX
|
ldy TBLX
|
||||||
lda LDTBL,y
|
lda LDTBL+0, y
|
||||||
bpl screen_grow_logical_line_done
|
bpl screen_grow_logical_line_done
|
||||||
|
|
||||||
// If last line, scroll the screen up
|
// If last line, scroll the screen up
|
||||||
@@ -25,22 +28,35 @@ screen_grow_logical_line:
|
|||||||
beq screen_grow_logical_line_screen_up
|
beq screen_grow_logical_line_screen_up
|
||||||
|
|
||||||
// Do not grow line if already grown
|
// Do not grow line if already grown
|
||||||
iny
|
lda LDTBL+1, y
|
||||||
lda LDTBL,y
|
|
||||||
bpl screen_grow_logical_line_done
|
bpl screen_grow_logical_line_done
|
||||||
|
|
||||||
// Mark current line as grown
|
|
||||||
lda #$00
|
|
||||||
sta LDTBL,y
|
|
||||||
|
|
||||||
// Now we have to scroll lines downwards to make space. We start from the end,
|
|
||||||
// and work backwards. We cannot be as simple and efficient here as we are
|
|
||||||
// for scrolling up, because we do not know how much must be scrolled.
|
|
||||||
|
|
||||||
// Preserve SAL and EAL
|
// Preserve SAL and EAL
|
||||||
|
|
||||||
jsr screen_preserve_sal_eal
|
jsr screen_preserve_sal_eal
|
||||||
|
|
||||||
|
// Scroll LDTBL down (start from the end)
|
||||||
|
ldy #23
|
||||||
|
!:
|
||||||
|
cpy TBLX
|
||||||
|
beq !+
|
||||||
|
bcc !+
|
||||||
|
|
||||||
|
lda LDTBL+0, y
|
||||||
|
sta LDTBL+1, y
|
||||||
|
|
||||||
|
dey
|
||||||
|
bne !-
|
||||||
|
!:
|
||||||
|
// Mark current line as grown
|
||||||
|
ldy TBLX
|
||||||
|
lda #$00
|
||||||
|
sta LDTBL+1, y
|
||||||
|
|
||||||
|
// Now we have to scroll lines downwards to make space. We start from the end,
|
||||||
|
// and work backwards. We cannot be as simple and efficient here as we are
|
||||||
|
// for scrolling up, because we do not know how much must be scrolled.
|
||||||
|
|
||||||
// Work out how many physical lines to scroll down
|
// Work out how many physical lines to scroll down
|
||||||
|
|
||||||
lda #23
|
lda #23
|
||||||
@@ -71,7 +87,6 @@ screen_grow_logical_line:
|
|||||||
screen_grow_logical_line_loop:
|
screen_grow_logical_line_loop:
|
||||||
|
|
||||||
// Scroll down one line each loop iteration
|
// Scroll down one line each loop iteration
|
||||||
// YYY add LDTBL scrolling
|
|
||||||
|
|
||||||
ldy #39
|
ldy #39
|
||||||
!:
|
!:
|
||||||
|
|||||||
Reference in new issue
Block a user