more work on logical line growth

This commit is contained in:
FeralChild64 committed 2019-12-16 20:57:12 +01:00
1 parent 291b250890
commit 0d46e6a390
1 file changed
+23 -6
+23 -6
View File
@@ -1,10 +1,24 @@
screen_grow_logical_line_done:
rts
screen_grow_logical_line: screen_grow_logical_line:
ldy TBLX
// Don't grow line if it is already grown
lda LDTBL,y
bmi_far not_last_line // done grow line
// Do not grow line if it is already grown
ldy TBLX
lda LDTBL,y
bmi screen_grow_logical_line_done
// Do not grow line if previous grown
dey
bmi !+
lda LDTBL,y
bmi screen_grow_logical_line_done
!:
iny
// Mark current line as grown
lda #$80 lda #$80
sta LDTBL,y sta LDTBL,y
@@ -13,8 +27,8 @@ screen_grow_logical_line:
// Then we need to scroll the screen up // Then we need to scroll the screen up
jsr screen_scroll_up_if_on_last_line jsr screen_scroll_up_if_on_last_line
// Count the number of logical lines to scroll down // Count the number of physical lines to scroll down
ldx #$00 ldx #$01
ldy TBLX ldy TBLX
!: !:
iny iny
@@ -44,6 +58,9 @@ screen_grow_logical_line:
lda EAL+1 lda EAL+1
pha pha
// XXX prevent cursor from interfering
// XXX fix TBLX value
// Set pointers to end of screen line, and one line // Set pointers to end of screen line, and one line
// above. (It is always one physical line, because // above. (It is always one physical line, because
// this can only happen when expanding a line from 40 to // this can only happen when expanding a line from 40 to