fix for EAL corruption

This commit is contained in:
FeralChild64 committed 2019-11-07 22:05:49 +01:00
1 parent 0e28f89806
commit 54fd24d704
10 files changed
+26 -1

No files matched your search

+13 -1
View File
@@ -36,7 +36,13 @@ count_rows_loop:
cpx #0
beq no_copy_down
bmi no_copy_down
// Preserve EAL
lda EAL+0
pha
lda EAL+1
pha
// Set pointers to end of screen line, and one line
// above. (It is always one physical line, because
// this can only happen when expanding a line from 40 to
@@ -105,6 +111,12 @@ cl_inner:
dex
bne copy_line_down_loop
// Restore EAL
pla
sta EAL+1
pla
sta EAL+0
no_copy_down:
jsr screen_calculate_line_pointer
@@ -28,6 +28,13 @@ is_last_line:
// FALLTHROUGH
scroll_screen_up:
// Preserve EAL
lda EAL+0
pha
lda EAL+1
pha
// Now scroll the whole screen up either one or two lines
// based on whether the first screen line is linked or not.
@@ -88,6 +95,12 @@ scroll_copy_loop2:
dex
bne scroll_copy_loop2
// Restore EAL
pla
sta EAL+1
pla
sta EAL+0
// Fill in scrolled up area
ldx SAL+0
scroll_copy_loop3: