mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-08-15 08:27:41 +00:00
hgr: sier more optimization
This commit is contained in:
@@ -76,27 +76,27 @@ sier:
|
|||||||
jsr HGR2 ; set FULLGR, sets A=0
|
jsr HGR2 ; set FULLGR, sets A=0
|
||||||
|
|
||||||
|
|
||||||
lda #0 ; start with multiplier 0
|
; lda #0 ; start with multiplier 0
|
||||||
sta T_L
|
sta T_L
|
||||||
sta T_H
|
sta T_H
|
||||||
|
|
||||||
sier_outer:
|
sier_outer:
|
||||||
ldy #$40
|
lda #$40
|
||||||
sty GBASH
|
sta GBASH
|
||||||
|
|
||||||
|
lda #0 ; YY starts at 0
|
||||||
|
sta YY
|
||||||
|
sta GBASL
|
||||||
|
|
||||||
ldy #0 ; YY starts at 0
|
sta YY_TL
|
||||||
sty YY
|
sta YY_TH
|
||||||
sty GBASL
|
|
||||||
|
sta YY
|
||||||
|
|
||||||
sty YY_TL
|
|
||||||
sty YY_TH
|
|
||||||
|
|
||||||
sier_yloop:
|
sier_yloop:
|
||||||
|
|
||||||
ldy #0 ; y is x/7
|
lda #$C0 ; 192
|
||||||
|
|
||||||
lda #$C0
|
|
||||||
sta HGR_HMASK
|
sta HGR_HMASK
|
||||||
|
|
||||||
; calc YY_T (8.8 fixed point add)
|
; calc YY_T (8.8 fixed point add)
|
||||||
@@ -111,6 +111,7 @@ sier_yloop:
|
|||||||
|
|
||||||
; reset XX to 0
|
; reset XX to 0
|
||||||
|
|
||||||
|
ldy #0 ; y is x/7
|
||||||
ldx #0 ; XX
|
ldx #0 ; XX
|
||||||
stx XX_TL
|
stx XX_TL
|
||||||
stx XX_TH
|
stx XX_TH
|
||||||
@@ -171,42 +172,39 @@ no_shift:
|
|||||||
eor (GBASL),Y ; 5+
|
eor (GBASL),Y ; 5+
|
||||||
sta (GBASL),Y ; 6
|
sta (GBASL),Y ; 6
|
||||||
|
|
||||||
; inline move_right
|
;=======
|
||||||
|
; 19
|
||||||
|
; inline MOVE_RIGHT
|
||||||
|
|
||||||
lda HGR_HMASK ; get mask
|
lda HGR_HMASK ; get mask ; 3
|
||||||
asl ; adjust
|
asl ; adjust ; 2
|
||||||
eor #$80 ; toggle top bit
|
eor #$80 ; toggle top bit ; 2
|
||||||
bmi lr_1 ; if set, done?
|
bmi lr_1 ; if set, done? ; 3/2
|
||||||
lda #$81 ; otherwise set to $81
|
lda #$81 ; otherwise set to $81 ; 2
|
||||||
iny ; and move to next multiple of 7
|
iny ; and move to next mult of 7 ; 2
|
||||||
|
|
||||||
; no need to check for right boundary
|
; no need to check for
|
||||||
|
; right boundary
|
||||||
; as we do that separately
|
; as we do that separately
|
||||||
|
|
||||||
lr_4:
|
lr_1:
|
||||||
; sta HGR_HMASK ; save out hmask
|
sta HGR_HMASK ; 3
|
||||||
; sty HGR_HORIZ
|
;======
|
||||||
; lda HGR_BITS
|
; 16
|
||||||
;color_shift:
|
|
||||||
; asl
|
|
||||||
; cmp #$c0
|
|
||||||
; bpl cs_1
|
|
||||||
; lda HGR_BITS
|
|
||||||
; eor #$7f
|
|
||||||
; sta HGR_BITS
|
|
||||||
cs_1:
|
|
||||||
; jmp after
|
|
||||||
|
|
||||||
lr_1: sta HGR_HMASK
|
|
||||||
; jmp after
|
|
||||||
|
|
||||||
after:
|
|
||||||
|
|
||||||
|
|
||||||
;==================================
|
;==================================
|
||||||
inx ; 2
|
inx ; 2
|
||||||
bne sier_xloop ; 3/2
|
bne sier_xloop ; 3/2
|
||||||
|
|
||||||
|
|
||||||
|
;=================
|
||||||
|
; total roughly 36+4+19+16+5 = 80
|
||||||
|
; 49152 per inside *80 = 3,932,160
|
||||||
|
; apple II cyles/frame = 17,030
|
||||||
|
; 1FPS = 1,021,800
|
||||||
|
|
||||||
|
|
||||||
;==================================
|
;==================================
|
||||||
|
|
||||||
jsr MOVE_DOWN ; X/Y left alone
|
jsr MOVE_DOWN ; X/Y left alone
|
||||||
|
Reference in New Issue
Block a user