mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-06-12 22:29:33 +00:00
Optimization
This commit is contained in:
parent
e7ada08d40
commit
0b5ba93a22
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
26
terrain.s
26
terrain.s
|
@ -63,14 +63,24 @@ renderClippedSpanChain:
|
||||||
sta renderSpanComplete+1 ; 4
|
sta renderSpanComplete+1 ; 4
|
||||||
|
|
||||||
; Find right edge of screen within span chains
|
; Find right edge of screen within span chains
|
||||||
; = 27 cycles per skipped span
|
; = 26 cycles per skipped span
|
||||||
renderClippedSpanChainLoop:
|
renderClippedSpanChainLoop:
|
||||||
|
|
||||||
lda spanChain,y ; 4
|
lda spanChain,y ; 4
|
||||||
sec ; 2
|
sec ; 2
|
||||||
sbc <RIGHTEDGE ; 3
|
sbc <RIGHTEDGE ; 3
|
||||||
bmi renderClippedSpanChainNextSpan ; 2/3
|
beq renderClippedSpanChainNextSpan ; 2
|
||||||
beq renderClippedSpanChainNextSpan ; 2/3
|
bpl renderClippedSpanChainLoop2 ; 2
|
||||||
|
|
||||||
|
renderClippedSpanChainNextSpan:
|
||||||
|
; Track remaining distance from right edge and
|
||||||
|
; continue searching for visible right edge
|
||||||
|
eor #$ffff ; 2
|
||||||
|
inc ; 2
|
||||||
|
sta <RIGHTEDGE ; 3
|
||||||
|
dey ; 2
|
||||||
|
dey ; 2
|
||||||
|
bra renderClippedSpanChainLoop ; 3
|
||||||
|
|
||||||
renderClippedSpanChainLoop2:
|
renderClippedSpanChainLoop2:
|
||||||
; Now render spans until left edge of screen
|
; Now render spans until left edge of screen
|
||||||
|
@ -107,16 +117,6 @@ renderClippedSpanChainRenderNext:
|
||||||
lda spanChain,y ; 5
|
lda spanChain,y ; 5
|
||||||
bra renderClippedSpanChainLoop2 ; 3
|
bra renderClippedSpanChainLoop2 ; 3
|
||||||
|
|
||||||
renderClippedSpanChainNextSpan:
|
|
||||||
; Track remaining distance from right edge and
|
|
||||||
; continue searching for visible right edge
|
|
||||||
eor #$ffff ; 2
|
|
||||||
inc ; 2
|
|
||||||
sta <RIGHTEDGE ; 3
|
|
||||||
dey ; 2
|
|
||||||
dey ; 2
|
|
||||||
bra renderClippedSpanChainLoop ; 3
|
|
||||||
|
|
||||||
renderClippedSpanChainLastSpan:
|
renderClippedSpanChainLastSpan:
|
||||||
; Render visible portion of last visible span
|
; Render visible portion of last visible span
|
||||||
; = 26 cycles per row
|
; = 26 cycles per row
|
||||||
|
|
Loading…
Reference in New Issue
Block a user