peasant: make hgr_copy artificially slow to give the windowblind effect

This commit is contained in:
Vince Weaver 2021-12-30 13:56:09 -05:00
parent bb60cd8536
commit f33a338c72
3 changed files with 67 additions and 26 deletions

View File

@ -77,6 +77,7 @@ qload.o: qload.s qboot.inc \
text/word_list.s \
clear_bottom.s \
hgr_hgr2.s \
hgr_copy.s \
gr_offsets.s \
qkumba_popwr.s \
random16.s

View File

@ -3,38 +3,38 @@
;=========================================================
; copy $2000 to $4000
; would be faster if we unroll it, but much bigger
; 14+ ((14*256)+20)*32 + 5 = 115347 = 8.6fps
; theoretical unrolled, 30*6 bytes bigger (180 bytes?)
; 2 + ((9*32)+5)*256 + 5 = 75015 = 13.3 fps
; intentionally slow for the miniblind effect
hgr_copy:
lda $0
sta INL
sta OUTL
ldx #0 ; 2
lda #$20 ; 2
sta hgr_copy_smc+2 ; 4
lda #$40 ; 2
sta hgr_copy_smc+5 ; 4
lda #$20
sta INH
lda #$40
sta OUTH
hgr_copy_column:
hgr_copy_smc:
lda $2000,X ; 4
sta $4000,X ; 5
ldy #0
hgr_copy_outer:
dex ; 2
bne hgr_copy_column ; 2nt/3t
hgr_copy_inner:
lda #1
jsr wait
lda (INL),Y
sta (OUTL),Y
iny
bne hgr_copy_inner
inc INH
inc OUTH
lda OUTH
cmp #$60
bne hgr_copy_outer
rts
inc hgr_copy_smc+2 ; 6
inc hgr_copy_smc+5 ; 6
lda hgr_copy_smc+2 ; 4
cmp #$40 ; 2
bne hgr_copy_column ; 2/3
rts ; 6

View File

@ -0,0 +1,40 @@
;=========================================================
; hgr copy from $2000 to $4000
;=========================================================
; copy $2000 to $4000
; would be faster if we unroll it, but much bigger
; 14+ ((14*256)+20)*32 + 5 = 115347 = 8.6fps
; theoretical unrolled, 30*6 bytes bigger (180 bytes?)
; 2 + ((9*32)+5)*256 + 5 = 75015 = 13.3 fps
hgr_copy:
ldx #0 ; 2
lda #$20 ; 2
sta hgr_copy_smc+2 ; 4
lda #$40 ; 2
sta hgr_copy_smc+5 ; 4
hgr_copy_column:
hgr_copy_smc:
lda $2000,X ; 4
sta $4000,X ; 5
dex ; 2
bne hgr_copy_column ; 2nt/3t
inc hgr_copy_smc+2 ; 6
inc hgr_copy_smc+5 ; 6
lda hgr_copy_smc+2 ; 4
cmp #$40 ; 2
bne hgr_copy_column ; 2/3
rts ; 6