scroll-down fix (incomplete, but at least the crash is gone)
This commit is contained in:
1 parent
8a9f6e4321
commit
291b250890
2 files changed
+19
-17
No files matched your search
@@ -118,8 +118,8 @@
|
|||||||
|
|
||||||
#define CONFIG_COLORS_BRAND
|
#define CONFIG_COLORS_BRAND
|
||||||
// #define CONFIG_BANNER_SIMPLE
|
// #define CONFIG_BANNER_SIMPLE
|
||||||
#define CONFIG_BANNER_FANCY
|
// #define CONFIG_BANNER_FANCY
|
||||||
// #define CONFIG_BANNER_BRAND // do not enable for now, triggers screen editor bug under XEMU
|
#define CONFIG_BANNER_BRAND
|
||||||
#define CONFIG_SHOW_FEATURES
|
#define CONFIG_SHOW_FEATURES
|
||||||
// #define CONFIG_SHOW_PAL_NTSC
|
// #define CONFIG_SHOW_PAL_NTSC
|
||||||
|
|
||||||
|
|||||||
@@ -13,28 +13,30 @@ 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
|
||||||
|
ldx #$00
|
||||||
|
ldy TBLX
|
||||||
|
!:
|
||||||
|
iny
|
||||||
|
cpy #23
|
||||||
|
bcs !+
|
||||||
|
|
||||||
|
lda LDTBL,y
|
||||||
|
bmi !-
|
||||||
|
inx
|
||||||
|
bne !- // branch always
|
||||||
|
!:
|
||||||
|
cpx #$00
|
||||||
|
beq no_copy_down
|
||||||
|
|
||||||
// Scroll screen down to make space
|
// Scroll screen down to make space
|
||||||
// As we are scrolling down, we start from the end,
|
// As we are scrolling down, we start from the end,
|
||||||
// and work backwards. We can't be as simple and efficient
|
// and work backwards. We can't be as simple and efficient
|
||||||
// here as we are for scrolling up, because we don't know
|
// here as we are for scrolling up, because we don't know
|
||||||
// how much must be scrolled.
|
// how much must be scrolled.
|
||||||
// Simple solution is to work out how many physical lines
|
// Simple solution is to work out how many physical lines
|
||||||
// need shifting down, and then move lines at a time after
|
// need shifting down, and then move lines at a time after
|
||||||
// initialising the pointers to the end area of the screen.
|
// initialising the pointers to the end area of the screen.
|
||||||
ldx #25-2
|
|
||||||
ldy #0
|
|
||||||
count_rows_loop:
|
|
||||||
dex
|
|
||||||
lda LDTBL,y
|
|
||||||
bpl !+
|
|
||||||
dex
|
|
||||||
!: iny
|
|
||||||
cpy TBLX
|
|
||||||
bne count_rows_loop
|
|
||||||
|
|
||||||
cpx #0
|
|
||||||
beq no_copy_down
|
|
||||||
bmi no_copy_down
|
|
||||||
|
|
||||||
// Preserve EAL
|
// Preserve EAL
|
||||||
lda EAL+0
|
lda EAL+0
|
||||||
|
|||||||
Reference in new issue
Block a user