mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-28 09:30:41 +00:00
horiz_scroll: some pending work
This commit is contained in:
parent
43f515b04f
commit
a32887f0fc
@ -9,3 +9,30 @@ original scroll code from second reality:
|
||||
|
||||
orig 427a2 272,290 266ms 3.8fps 37s
|
||||
opt 364a2 222,370 217ms 4.6fps 30s
|
||||
|
||||
|
||||
|
||||
current:
|
||||
image in page1+page2, gradually shifts off, in end
|
||||
page1 is same as page2
|
||||
|
||||
to use page flipping
|
||||
page1+page2 get results
|
||||
need two more pages with graphics? 32k? excessive?
|
||||
instead, load page1, page2 is page1 shifted by 2
|
||||
then shift in page3
|
||||
|
||||
|
||||
why not just walk through memory instead?
|
||||
|
||||
$2000...$2027 (grab from $4000)
|
||||
$2028...$204F
|
||||
$2050...$2077 (grab from) (skip 8 bytes
|
||||
|
||||
$2080...$20A7
|
||||
$20A8...$20CF
|
||||
$20D0...$20F7 (skip 8 bytes)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -7,167 +7,88 @@ pan_loop:
|
||||
|
||||
lda #0
|
||||
sta COUNT
|
||||
sta TICKER
|
||||
sta SCROLL_SUBSCROLL
|
||||
sta SCROLL_OFFSET
|
||||
|
||||
pan_outer_outer_loop:
|
||||
ldy #0
|
||||
|
||||
ldx #191
|
||||
pan_outer_loop:
|
||||
|
||||
; $2000 ; 0010 -> 0100 0011 -> 0101
|
||||
lda hposn_high,X
|
||||
sta pil_smc1+2
|
||||
sta pil_smc2+2
|
||||
sta pil_smc3+2
|
||||
sta pil_smc6+2
|
||||
lda #$20
|
||||
sta pol_smc1+2
|
||||
sta pol_smc2+2
|
||||
sta pol_smc3+2
|
||||
|
||||
; $4000
|
||||
eor #$60
|
||||
sta pil_smc5+2
|
||||
sta pil_smc7+2
|
||||
sta pil_smc8+2
|
||||
sta pil_smc9+2
|
||||
lda #$40
|
||||
sta e_smc1+2
|
||||
sta e_smc2+2
|
||||
sta e_smc3+2
|
||||
|
||||
; $2000
|
||||
lda hposn_low,X
|
||||
sta pil_smc1+1
|
||||
sta pil_smc2+1
|
||||
sta pil_smc6+1
|
||||
sta pil_smc5+1
|
||||
sta pil_smc8+1
|
||||
|
||||
; $2000+1
|
||||
clc
|
||||
adc #1
|
||||
sta pil_smc3+1
|
||||
sta pil_smc7+1
|
||||
sta pil_smc9+1
|
||||
|
||||
stx XSAVE
|
||||
|
||||
; inner loop
|
||||
|
||||
ldy #0 ; start col0 ; 2
|
||||
|
||||
pil_smc1:
|
||||
ldx $2000,Y ; even col ; 4+
|
||||
pan_inner_loop:
|
||||
|
||||
; X from previous loop
|
||||
|
||||
pol_smc1:
|
||||
ldx $2000,Y
|
||||
lda left_lookup_main,X ; lookup next ; 4+
|
||||
; sta TEMPY ; 3
|
||||
|
||||
pil_smc3:
|
||||
ldx $2000+1,Y ; odd col ; 4+
|
||||
cpy #$27
|
||||
bne itsgood
|
||||
|
||||
; edge of screen
|
||||
|
||||
e_smc1:
|
||||
ldx $4000
|
||||
ora left_lookup_next,X ; 4+
|
||||
|
||||
pil_smc2:
|
||||
sta $2000,Y ; update ; 5
|
||||
|
||||
iny ; 2
|
||||
cpy #39 ; 2
|
||||
bne pan_inner_loop ; 2/3
|
||||
lda left_lookup_main,X
|
||||
ldx $4001
|
||||
ora left_lookup_next,X
|
||||
e_smc2:
|
||||
sta $4000
|
||||
|
||||
; leftover
|
||||
lda left_lookup_main,X
|
||||
e_smc3:
|
||||
sta $4001
|
||||
|
||||
; X has $2000,39
|
||||
lda left_lookup_main,X ; 4+
|
||||
; sta TEMPY ; 3
|
||||
|
||||
pil_smc5:
|
||||
ldx $4000 ; 4+
|
||||
ora left_lookup_next,X ; 4+
|
||||
; ora TEMPY ; 3
|
||||
|
||||
pil_smc6:
|
||||
sta $2000,Y ; 5
|
||||
|
||||
; X has $4000
|
||||
lda left_lookup_main,X ; 4+
|
||||
; sta TEMPY ; 3
|
||||
|
||||
pil_smc7:
|
||||
ldx $4000+1 ; 4+
|
||||
ora left_lookup_next,X ; 4+
|
||||
; ora TEMPY ; 3
|
||||
|
||||
pil_smc8:
|
||||
sta $4000 ; 5
|
||||
|
||||
lda left_lookup_main,X ; 4+
|
||||
pil_smc9:
|
||||
sta $4000+1 ; 5
|
||||
|
||||
; $2038 $2039 $4000 $4001
|
||||
;0 DCCBBAA GGFFEED KJJIIHH NNMMLLK
|
||||
;1 EDDCCBB HHGGFFE LKKJJII ~~NNMML
|
||||
;2 FEEDDCC IIHHGGF MLLKKJJ ~~~~NNM
|
||||
;3 GFFEEDD JJIIHHG NMMLLKK ~~~~~~N
|
||||
;4 HGGFFEE KKJJIIH ~NNMMLL ~~~~~~~
|
||||
;5 IHHGGFF LLKKJJI ~~~NNMM ~~~~~~~
|
||||
;6 JIIHHGG MMLLKKJ ~~~~~NN ~~~~~~~
|
||||
;7 KJJIIHH NNMMLLK ~~~~~~~ ~~~~~~~
|
||||
;8 RQQPPOO UUTTSSR
|
||||
|
||||
; every 8 clicks need to copy over two more columns
|
||||
|
||||
ldx XSAVE
|
||||
|
||||
dex
|
||||
cpx #$FF ; to top of screen
|
||||
beq done_pan_outer_loop
|
||||
jmp pan_outer_loop
|
||||
done_pan_outer_loop:
|
||||
|
||||
lda KEYPRESS
|
||||
bmi done_pan
|
||||
|
||||
; check if update
|
||||
; FIXME: use mod 7 table here
|
||||
inc TICKER
|
||||
lda TICKER
|
||||
cmp #7
|
||||
bne no_ticker
|
||||
|
||||
lda #0
|
||||
sta TICKER
|
||||
inc SCROLL_OFFSET
|
||||
inc SCROLL_OFFSET
|
||||
|
||||
ldx #0
|
||||
p2_loop:
|
||||
lda hposn_low,X
|
||||
sta GBASL
|
||||
lda hposn_high,X
|
||||
eor #$60
|
||||
sta GBASH
|
||||
|
||||
ldy SCROLL_OFFSET
|
||||
lda (GBASL),Y
|
||||
pha
|
||||
iny
|
||||
lda (GBASL),Y
|
||||
ldy #1
|
||||
sta (GBASL),Y
|
||||
sty e_smc1+1
|
||||
sty e_smc2+1
|
||||
iny
|
||||
sty e_smc3+1
|
||||
dey
|
||||
pla
|
||||
sta (GBASL),Y
|
||||
|
||||
inx
|
||||
cpx #192
|
||||
bne p2_loop
|
||||
jmp alt
|
||||
|
||||
itsgood:
|
||||
|
||||
pol_smc2:
|
||||
ldx $2001,Y ; odd col ; 4+
|
||||
ora left_lookup_next,X ; 4+
|
||||
|
||||
pol_smc3:
|
||||
sta $2000,Y ; update ; 5
|
||||
|
||||
|
||||
no_ticker:
|
||||
inc COUNT
|
||||
lda COUNT
|
||||
cmp #139
|
||||
beq done_pan
|
||||
|
||||
; bne pan_outer_outer_loop
|
||||
jmp pan_outer_outer_loop
|
||||
iny ; 2
|
||||
alt:
|
||||
bne pan_inner_loop
|
||||
|
||||
|
||||
inc e_smc1+2
|
||||
inc e_smc2+2
|
||||
inc e_smc2+2
|
||||
|
||||
inc pol_smc1+2
|
||||
inc pol_smc2+2
|
||||
inc pol_smc3+2
|
||||
|
||||
lda pol_smc1+2
|
||||
cmp #$40
|
||||
bne pan_inner_loop
|
||||
|
||||
jmp pan_outer_loop
|
||||
|
||||
done_pan:
|
||||
bit KEYRESET
|
||||
|
Loading…
Reference in New Issue
Block a user