diff --git a/bin/basic_generic.rom b/bin/basic_generic.rom index 2760d057..075bec04 100644 Binary files a/bin/basic_generic.rom and b/bin/basic_generic.rom differ diff --git a/bin/basic_mega65.rom b/bin/basic_mega65.rom index 7ed322bc..31f6c4df 100644 Binary files a/bin/basic_mega65.rom and b/bin/basic_mega65.rom differ diff --git a/bin/basic_testing.rom b/bin/basic_testing.rom index 89d34c30..eeeba812 100644 Binary files a/bin/basic_testing.rom and b/bin/basic_testing.rom differ diff --git a/bin/basic_ultimate64.rom b/bin/basic_ultimate64.rom index 05bf4fc7..025ea811 100644 Binary files a/bin/basic_ultimate64.rom and b/bin/basic_ultimate64.rom differ diff --git a/bin/kernal_generic.rom b/bin/kernal_generic.rom index 74f50648..4c51d8d2 100644 Binary files a/bin/kernal_generic.rom and b/bin/kernal_generic.rom differ diff --git a/bin/kernal_mega65.rom b/bin/kernal_mega65.rom index 1808816e..d05ad7cc 100644 Binary files a/bin/kernal_mega65.rom and b/bin/kernal_mega65.rom differ diff --git a/bin/kernal_testing.rom b/bin/kernal_testing.rom index 2c45f902..12cfea86 100644 Binary files a/bin/kernal_testing.rom and b/bin/kernal_testing.rom differ diff --git a/bin/kernal_ultimate64.rom b/bin/kernal_ultimate64.rom index a2b05e35..1d79fd74 100644 Binary files a/bin/kernal_ultimate64.rom and b/bin/kernal_ultimate64.rom differ diff --git a/c64/kernal/screen/screen_grow_logical_line.s b/c64/kernal/screen/screen_grow_logical_line.s index d2995b3c..b90f36de 100644 --- a/c64/kernal/screen/screen_grow_logical_line.s +++ b/c64/kernal/screen/screen_grow_logical_line.s @@ -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 diff --git a/c64/kernal/screen/screen_scroll_up_if_on_last_line.s b/c64/kernal/screen/screen_scroll_up_if_on_last_line.s index 8f8281b9..1ad713cc 100644 --- a/c64/kernal/screen/screen_scroll_up_if_on_last_line.s +++ b/c64/kernal/screen/screen_scroll_up_if_on_last_line.s @@ -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: