mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-08-15 08:27:41 +00:00
sier: get zoom down to 122 bytes
This commit is contained in:
@@ -17,11 +17,15 @@
|
|||||||
|
|
||||||
|
|
||||||
; 140 bytes -- bot demo version
|
; 140 bytes -- bot demo version
|
||||||
; 137 bytes -- remvoe & jump
|
; 137 bytes -- remove & jump
|
||||||
; 135 bytes -- init with HGR, which sets A=0
|
; 135 bytes -- init with HGR, which sets A=0
|
||||||
; 133 bytes -- remove ldx #0 in paeg flip code
|
; 133 bytes -- remove ldx #0 in page flip code
|
||||||
; 130 bytes -- load in zero page
|
; 130 bytes -- load in zero page
|
||||||
; 128 bytes -- init T_L, T_H as part of zero page since we live there
|
; 128 bytes -- init T_L, T_H as part of zero page since we live there
|
||||||
|
; 126 bytes -- shorter 16-bit increment of T_L
|
||||||
|
; 122 bytes -- use trick of jumping mid-PLOT for MASK calculation
|
||||||
|
|
||||||
|
; LoveByte requires 124 bytes
|
||||||
|
|
||||||
; zero page
|
; zero page
|
||||||
|
|
||||||
@@ -90,21 +94,25 @@ sier_yloop:
|
|||||||
txa ; YY ; plot call needs Y/2
|
txa ; YY ; plot call needs Y/2
|
||||||
lsr
|
lsr
|
||||||
|
|
||||||
bcc even_mask
|
php
|
||||||
ldy #$f0
|
|
||||||
.byte $2C ; bit hack
|
; bcc even_mask
|
||||||
even_mask:
|
; ldy #$f0
|
||||||
ldy #$0f
|
; .byte $2C ; bit hack
|
||||||
sty MASK
|
;even_mask:
|
||||||
|
; ldy #$0f
|
||||||
|
; sty MASK
|
||||||
|
|
||||||
jsr GBASCALC ; take Y-coord/2 in A, put address in GBASL/H ( a trashed, C clear)
|
jsr GBASCALC ; take Y-coord/2 in A, put address in GBASL/H ( a trashed, C clear)
|
||||||
|
|
||||||
lda GBASH
|
lda GBASH
|
||||||
|
|
||||||
draw_page_smc:
|
draw_page_smc:
|
||||||
adc #0
|
adc #0
|
||||||
sta GBASH ; adjust for PAGE1/PAGE2 ($400/$800)
|
sta GBASH ; adjust for PAGE1/PAGE2 ($400/$800)
|
||||||
|
|
||||||
|
plp
|
||||||
|
jsr $f806 ; trick to calculate MASK by jumping
|
||||||
|
; into middle of PLOT routine
|
||||||
|
|
||||||
; reset XX to 0
|
; reset XX to 0
|
||||||
|
|
||||||
@@ -112,7 +120,6 @@ draw_page_smc:
|
|||||||
sty XX_TL
|
sty XX_TL
|
||||||
sty XX_TH
|
sty XX_TH
|
||||||
|
|
||||||
|
|
||||||
sier_xloop:
|
sier_xloop:
|
||||||
|
|
||||||
; want (YY-(XX*T)) & (XX+(YY*T)
|
; want (YY-(XX*T)) & (XX+(YY*T)
|
||||||
@@ -172,9 +179,9 @@ green:
|
|||||||
blah_smc:
|
blah_smc:
|
||||||
adc #1
|
adc #1
|
||||||
sta T_L
|
sta T_L
|
||||||
lda T_H
|
bcc no_carry
|
||||||
adc #0
|
inc T_H
|
||||||
sta T_H
|
no_carry:
|
||||||
|
|
||||||
; speed up the zoom as it goes
|
; speed up the zoom as it goes
|
||||||
inc blah_smc+1
|
inc blah_smc+1
|
||||||
@@ -192,7 +199,6 @@ done_page:
|
|||||||
eor #$4 ; flip draw page between $400/$800
|
eor #$4 ; flip draw page between $400/$800
|
||||||
sta draw_page_smc+1 ; DRAW_PAGE
|
sta draw_page_smc+1 ; DRAW_PAGE
|
||||||
|
|
||||||
|
|
||||||
jmp sier_outer ; what can we branch on?
|
jmp sier_outer ; what can we branch on?
|
||||||
|
|
||||||
T_L: .byte $00
|
T_L: .byte $00
|
||||||
|
Reference in New Issue
Block a user