finished MEGA65 screen scrolling

This commit is contained in:
FeralChild64 committed 2020-08-31 17:46:45 +02:00
1 parent a25be2d083
commit c1e0bfa0c9
4 files changed
+56 -9

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@
.label M65_TXTWIN_Y0 = $58F // text window - top-left Y coordinate, starting from 0
.label M65_TXTWIN_X1 = $590 // text window - bottom-right X coordinate + 1
.label M65_TXTWIN_Y1 = $591 // text window - bottom-right Y coordinate + 1
.label M65_TXTROW_OFF = $592 // $592-$593 offset to the current text row
.label M65_TXTROW_OFF = $592 // $592-$593 offset to the current text row from the viewport start
// $594-$5EB -- UNUSED --
.label M65_DMAGIC_LIST = $5EF // $5EF-$5FF reserved for DMAgic list, 17 bytes
.label M65_RS232_INBUF = $600 // $600-$6FF -- reserved for RS-232 input buffer --
+41 -8
View File
@@ -241,16 +241,49 @@ m65_chrout_fix_scroll_up_scroll:
// Virtual screen is too small - we will lose one row
// XXX implement
// Calculate size of data to copy
// XXX set size
sec
lda M65_COLGUARD+0
sbc #$50
sta M65_DMAJOB_SIZE_0
lda M65_COLGUARD+1
sbc #$00
sta M65_DMAJOB_SIZE_1
// jsr m65_screen_dmasrcdst_screen
// XXX add $50 to DST
// jsr m65_dmagic_oper_copy
// Scroll up screen memory
// jsr m65_screen_dmasrcdst_color
// XXX add $50 to DST
// jsr m65_dmagic_oper_copy
jsr m65_screen_dmasrcdst_screen
jsr m65_screen_dmasrc_add_row
jsr m65_dmagic_oper_copy
// Scroll up color memory
jsr m65_screen_dmasrcdst_color
jsr m65_screen_dmasrc_add_row
jsr m65_dmagic_oper_copy
// Clear the last row - color and screen memory
phz
jsr m65_helper_scrlpnt_color
lda COLOR
and #$0F
ldz #$4F
!:
sta_lp (M65_LPNT_SCR), z
dez
bpl !-
jsr m65_helper_scrlpnt_to_screen
lda #$20
ldz #$4F
!:
sta_lp (M65_LPNT_SCR), z
dez
bpl !-
plz
rts
+2
View File
@@ -22,6 +22,8 @@ M65_CLRWIN:
// First initialize both pointers
// XXX use m65_helper_scrlpnt_color and m65_helper_scrlpnt_to_screen instead
clc
lda M65_COLVIEW+0
adc M65_SCRBASE+0
@@ -57,3 +57,15 @@ m65_screen_dmasrcdst_color:
sta M65_DMAJOB_DST_2
lda #$0F
jmp_8 !-
m65_screen_dmasrc_add_row:
clc
lda M65_DMAJOB_SRC_0
adc #$50
sta M65_DMAJOB_SRC_0
bcc !+
inc M65_DMAJOB_SRC_1
!:
rts