vs: mostly working

This commit is contained in:
Vince Weaver 2020-02-17 14:33:26 -05:00
parent b7e70b388c
commit 3e6284b135
3 changed files with 137 additions and 5 deletions

View File

@ -1,7 +1,8 @@
;=========================================================
; gr_copy_to_current, large, 40x48 version
; for scrolling
;=========================================================
; copy A000 to DRAW_PAGE
; copy linear image at A000 to DRAW_PAGE
;
gr_copy_to_current_large:
@ -39,6 +40,36 @@ gr_copy_to_current_large:
;===========
; 45
; self modify source address
ldx #0
smc_loop:
; line 0
lda OUTH
sta gr_copy_line_large+2,X
lda OUTL
sta gr_copy_line_large+1,X
; line 1
clc
adc #$28 ; 16 bit add
sta OUTL
lda OUTH
adc #$0
sta OUTH
inx
inx
inx
inx
inx
inx
cpx #48
bne smc_loop
ldy #39 ; for early ones, copy 120 bytes ; 2
gr_copy_line_large:
@ -71,6 +102,36 @@ gr_copy_line_large:
; self modify source address
ldx #0
smc_loop2:
; line 0
lda OUTH
sta gr_copy_line_large2+2,X
lda OUTL
sta gr_copy_line_large2+1,X
; line 1
clc
adc #$28 ; 16 bit add
sta OUTL
lda OUTH
adc #$0
sta OUTH
inx
inx
inx
inx
inx
inx
cpx #48
bne smc_loop2
ldy #39 ; for early ones, copy 120 bytes ; 2
gr_copy_line_large2:
@ -102,6 +163,38 @@ gr_copy_line_large2:
bpl gr_copy_line_large2 ; ; 2nt/3
; self modify source address
ldx #0
smc_loop3:
; line 0
lda OUTH
sta gr_copy_line_large3+2,X
lda OUTL
sta gr_copy_line_large3+1,X
; line 1
clc
adc #$28 ; 16 bit add
sta OUTL
lda OUTH
adc #$0
sta OUTH
inx
inx
inx
inx
inx
inx
cpx #48
bne smc_loop3
ldy #39 ; for early ones, copy 120 bytes ; 2
gr_copy_line_large3:

View File

@ -70,15 +70,53 @@
lda #$a0
jsr load_rle_large
jsr gr_copy_to_current_large ; copy to page1
rescroll:
lda #0
sta SCROLL_COUNT
lda #<$A000
sta OUTL
sta INL
lda #>$A000
sta OUTH
sta INH
; delay
lda #200
jsr WAIT
scroll_loop:
jsr gr_copy_to_current_large ; copy to page1
jsr page_flip
sl2:
lda INL ; inc to next line
clc
adc #$28
sta INL
sta OUTL
lda INH
adc #$0
sta INH
sta OUTH
lda #100
jsr WAIT
inc SCROLL_COUNT
lda SCROLL_COUNT
cmp #72
bne scroll_loop
jsr wait_until_keypress
jmp rescroll
forever:
jmp forever

View File

@ -70,6 +70,7 @@ PT3_TEMP = $8A
DISP_PAGE = $ED ; ALL
DRAW_PAGE = $EE ; ALL
SCROLL_COUNT = $F9
TEMP = $FA
TEMPY = $FB
INL = $FC