mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-19 15:30:08 +00:00
lovebyte: work on rainbowsquares
This commit is contained in:
parent
67d993a9ed
commit
23d75504ee
@ -23,8 +23,7 @@ XX_TL = $F9
|
||||
;YY = $FA
|
||||
YY_TH = $FB
|
||||
YY_TL = $FC
|
||||
;T_L = $FD
|
||||
;T_H = $FE
|
||||
FRAME = $FD
|
||||
SAVED = $FF
|
||||
|
||||
; Soft switches
|
||||
@ -40,21 +39,24 @@ HPLOT0 = $F457
|
||||
PLOT1 = $F80E ;; PLOT at (GBASL),Y (need MASK to be $0f or $f0)
|
||||
GBASCALC= $F847 ;; take Y-coord/2 in A, put address in GBASL/H ( a trashed, C clear)
|
||||
SETGR = $FB40
|
||||
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||
|
||||
;================================
|
||||
; Clear screen and setup graphics
|
||||
;================================
|
||||
sier:
|
||||
jsr HGR2 ; set FULLGR, sets A=0
|
||||
rainbow_squares:
|
||||
jsr HGR ; set FULLGR, sets A=0,Y=0
|
||||
sta FRAME ; init frame
|
||||
|
||||
sier_outer:
|
||||
rainbow_outer:
|
||||
; Y=0 from both paths
|
||||
|
||||
ldy #0 ; YY starts at 0
|
||||
; ldy #0 ; YY starts at 0
|
||||
|
||||
sty YY_TL
|
||||
sty YY_TH
|
||||
|
||||
sier_yloop:
|
||||
rainbow_yloop:
|
||||
|
||||
; calc YY_T (8.8 fixed point add)
|
||||
; save space by skipping clc as it's only a slight variation w/o
|
||||
@ -66,36 +68,13 @@ sier_yloop:
|
||||
adc T_H
|
||||
sta YY_TH
|
||||
|
||||
; txa ; YY ; plot call needs Y/2
|
||||
; lsr
|
||||
|
||||
; php
|
||||
|
||||
; bcc even_mask
|
||||
; ldy #$f0
|
||||
; .byte $2C ; bit hack
|
||||
;even_mask:
|
||||
; ldy #$0f
|
||||
; sty MASK
|
||||
|
||||
; jsr GBASCALC ; take Y-coord/2 in A, put address in GBASL/H ( a trashed, C clear)
|
||||
|
||||
; lda GBASH
|
||||
;draw_page_smc:
|
||||
; adc #0
|
||||
; 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
|
||||
|
||||
ldx #0 ; XX
|
||||
stx XX_TL
|
||||
stx XX_TH
|
||||
|
||||
sier_xloop:
|
||||
rainbow_xloop:
|
||||
|
||||
; want (YY-(XX*T)) & (XX+(YY*T)
|
||||
|
||||
@ -130,6 +109,7 @@ sier_xloop:
|
||||
|
||||
beq white
|
||||
black:
|
||||
bit $C030
|
||||
lda #00 ; black
|
||||
.byte $2C ; bit trick
|
||||
white:
|
||||
@ -153,39 +133,51 @@ white:
|
||||
|
||||
inx ; XX
|
||||
cpx #255
|
||||
bne sier_xloop
|
||||
bne rainbow_xloop
|
||||
|
||||
iny ; YY
|
||||
cpy #192
|
||||
bne sier_yloop
|
||||
bne rainbow_yloop
|
||||
|
||||
; inc T
|
||||
inc T_L
|
||||
|
||||
; clc
|
||||
lda T_L
|
||||
blah_smc:
|
||||
adc #1
|
||||
sta T_L
|
||||
bcc no_carry
|
||||
inc T_H
|
||||
no_carry:
|
||||
; lda T_L
|
||||
;blah_smc:
|
||||
; adc #1
|
||||
; sta T_L
|
||||
; bcc no_carry
|
||||
; inc T_H
|
||||
;no_carry:
|
||||
|
||||
; speed up the zoom as it goes
|
||||
; inc blah_smc+1
|
||||
; done frame
|
||||
|
||||
|
||||
; x is 48
|
||||
;flip_pages:
|
||||
; lda draw_page_smc+1 ; DRAW_PAGE
|
||||
; beq done_page
|
||||
; inx
|
||||
;done_page:
|
||||
; X=48 ($30) PAGE1=$C054-$30=$C024
|
||||
; ldy $C024,X ; set display page to PAGE1 or PAGE2
|
||||
|
||||
; eor #$4 ; flip draw page between $400/$800
|
||||
; sta draw_page_smc+1 ; DRAW_PAGE
|
||||
inc FRAME
|
||||
lda FRAME
|
||||
cmp #2
|
||||
beq really_done
|
||||
|
||||
jmp sier_outer ; what can we branch on?
|
||||
jsr HGR2
|
||||
; A/Y=0
|
||||
|
||||
jmp rainbow_outer ; what can we branch on?
|
||||
|
||||
really_done:
|
||||
|
||||
lda #200
|
||||
jsr WAIT
|
||||
|
||||
bit PAGE1
|
||||
|
||||
lda #200
|
||||
jsr WAIT
|
||||
|
||||
bit PAGE2
|
||||
|
||||
jmp really_done
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user