mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-20 01:29:36 +00:00
more work
This commit is contained in:
parent
e985c20ed5
commit
12b476f882
|
@ -1,29 +1,217 @@
|
||||||
# Person, shoulders up
|
|
||||||
1
|
; zero page locations
|
||||||
START
|
HGR_SHAPE = $1A
|
||||||
RT RT
|
SEEDL = $4E
|
||||||
RT UP
|
FRAME = $A4
|
||||||
UP LT
|
RND_EXP = $C9
|
||||||
UP UP
|
HGR_PAGE = $E6
|
||||||
UP RT
|
HGR_SCALE = $E7
|
||||||
UP RT
|
HGR_ROTATION = $F9
|
||||||
RT DN
|
SCALE = $FC
|
||||||
LT DN
|
XPOS = $FD
|
||||||
LT RT NRT
|
XPOSH = $FE
|
||||||
RT UP
|
YPOS = $FF
|
||||||
DN NDN
|
|
||||||
LT LT
|
; soft switches
|
||||||
LT DN NRT
|
; Soft Switches
|
||||||
RT RT
|
KEYPRESS = $C000
|
||||||
DN NLT
|
KEYRESET = $C010
|
||||||
LT DN
|
SPEAKER = $C030
|
||||||
RT RT
|
PAGE0 = $C054
|
||||||
RT RT
|
PAGE1 = $C055
|
||||||
RT NDN
|
|
||||||
LT LT
|
; ROM calls
|
||||||
LT LT
|
RND = $EFAE
|
||||||
LT LT
|
HGR2 = $F3D8
|
||||||
LT LT
|
HCLR = $F3F2
|
||||||
LT LT
|
HCLR_COLOR = $F3F4
|
||||||
LT
|
HPOSN = $F411
|
||||||
STOP
|
XDRAW0 = $F65D
|
||||||
|
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||||
|
|
||||||
|
dsr_person:
|
||||||
|
|
||||||
|
lda #$20 ; clear HGR page0 to white
|
||||||
|
sta HGR_PAGE
|
||||||
|
|
||||||
|
lda #$ff
|
||||||
|
jsr HCLR_COLOR
|
||||||
|
|
||||||
|
jsr HGR2 ; clear HGR page1 to black
|
||||||
|
; Hi-res graphics, no text at bottom
|
||||||
|
; Y=0, A=$60 after this call
|
||||||
|
|
||||||
|
ldx #1
|
||||||
|
stx HGR_SCALE
|
||||||
|
|
||||||
|
ldx #30
|
||||||
|
stx XPOS
|
||||||
|
lda #0
|
||||||
|
sta XPOSH
|
||||||
|
sta FRAME
|
||||||
|
lda #180
|
||||||
|
sta YPOS
|
||||||
|
|
||||||
|
crowd_loop:
|
||||||
|
|
||||||
|
jsr xdraw ; draw
|
||||||
|
|
||||||
|
lsr HGR_PAGE ; $40 -> $20
|
||||||
|
|
||||||
|
jsr xdraw ; draw
|
||||||
|
|
||||||
|
asl HGR_PAGE ; $20 -> $40
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda XPOS
|
||||||
|
adc #20
|
||||||
|
sta XPOS
|
||||||
|
cmp #250
|
||||||
|
bne crowd_loop
|
||||||
|
|
||||||
|
; get ready for DSR loop
|
||||||
|
|
||||||
|
ldx #<shape_dsr ; point to our shape
|
||||||
|
stx shape_smc+1
|
||||||
|
|
||||||
|
reset_loop:
|
||||||
|
lda #10
|
||||||
|
sta XPOS
|
||||||
|
sta YPOS
|
||||||
|
|
||||||
|
lda #2
|
||||||
|
sta HGR_SCALE
|
||||||
|
|
||||||
|
main_loop:
|
||||||
|
|
||||||
|
; increment FRAME
|
||||||
|
|
||||||
|
inc FRAME
|
||||||
|
lda FRAME
|
||||||
|
|
||||||
|
and #$7
|
||||||
|
beq long_frame
|
||||||
|
|
||||||
|
done_frame:
|
||||||
|
|
||||||
|
|
||||||
|
jsr xdraw ; draw
|
||||||
|
|
||||||
|
lda #200
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
jsr xdraw ; draw
|
||||||
|
|
||||||
|
lda YPOS
|
||||||
|
adc #2
|
||||||
|
sta YPOS
|
||||||
|
|
||||||
|
lda XPOS
|
||||||
|
adc #5
|
||||||
|
sta XPOS
|
||||||
|
cmp #250
|
||||||
|
bcs reset_loop
|
||||||
|
bcc main_loop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
long_frame:
|
||||||
|
|
||||||
|
bit PAGE0
|
||||||
|
lsr HGR_PAGE
|
||||||
|
|
||||||
|
asl HGR_SCALE
|
||||||
|
|
||||||
|
jsr xdraw ; draw
|
||||||
|
|
||||||
|
jsr beep
|
||||||
|
|
||||||
|
jsr xdraw ; draw
|
||||||
|
|
||||||
|
asl HGR_PAGE
|
||||||
|
lsr HGR_SCALE
|
||||||
|
|
||||||
|
bit PAGE1
|
||||||
|
|
||||||
|
jmp done_frame
|
||||||
|
|
||||||
|
|
||||||
|
xdraw:
|
||||||
|
ldy XPOSH ; setup X and Y co-ords
|
||||||
|
ldx XPOS
|
||||||
|
lda YPOS
|
||||||
|
jsr HPOSN ; X= (y,x) Y=(a)
|
||||||
|
|
||||||
|
shape_smc:
|
||||||
|
ldx #<shape_person ; point to our shape
|
||||||
|
ldy #>shape_person
|
||||||
|
|
||||||
|
rot_smc:
|
||||||
|
lda #0 ; ROT=0
|
||||||
|
|
||||||
|
|
||||||
|
jmp XDRAW0 ; XDRAW 1 AT X,Y
|
||||||
|
; Both A and X are 0 at exit
|
||||||
|
|
||||||
|
|
||||||
|
scale_lookup:
|
||||||
|
;.byte 1,2,3,4,5,4,3,2
|
||||||
|
|
||||||
|
shape_person:
|
||||||
|
; Person, shoulders up
|
||||||
|
|
||||||
|
;.byte $01,$00,$04,$00,
|
||||||
|
.byte $2d,$25,$3c,$24
|
||||||
|
.byte $2c,$2c,$35,$37,$6f,$25,$16,$3f
|
||||||
|
.byte $77,$2d,$1e,$37,$2d,$2d,$15,$3f
|
||||||
|
.byte $3f,$3f,$3f,$3f,$07,$00
|
||||||
|
|
||||||
|
shape_arm:
|
||||||
|
;.byte $49,$49,$49,$24
|
||||||
|
;.byte $24,$24,$ac,$36,$36,$36,$00
|
||||||
|
|
||||||
|
shape_dsr:
|
||||||
|
.byte $2d,$36,$ff,$3f
|
||||||
|
.byte $24,$ad,$22,$24,$94,$21,$2c,$4d
|
||||||
|
.byte $91,$3f,$36,$00
|
||||||
|
|
||||||
|
|
||||||
|
;===========================
|
||||||
|
; BEEP
|
||||||
|
;===========================
|
||||||
|
beep:
|
||||||
|
; BEEP
|
||||||
|
; repeat 34 times
|
||||||
|
lda #34 ; 2
|
||||||
|
tone1_loop:
|
||||||
|
ldy #21 ; 2
|
||||||
|
jsr delay_tone ; 3
|
||||||
|
|
||||||
|
ldy #24 ; 2
|
||||||
|
jsr delay_tone ; 3
|
||||||
|
|
||||||
|
ldy #235 ; 2
|
||||||
|
jsr delay_tone ; 3
|
||||||
|
|
||||||
|
sec ; 1
|
||||||
|
sbc #1 ; 2
|
||||||
|
bne tone1_loop ; 2
|
||||||
|
|
||||||
|
rts ; 1
|
||||||
|
|
||||||
|
|
||||||
|
; Try X=6 Y=21 cycles=757
|
||||||
|
; Try X=6 Y=24 cycles=865
|
||||||
|
; Try X=7 Y=235 cycles=9636
|
||||||
|
|
||||||
|
delay_tone:
|
||||||
|
loopC: ldx #6 ; 2
|
||||||
|
loopD: dex ; 1
|
||||||
|
bne loopD ; 2
|
||||||
|
dey ; 1
|
||||||
|
bne loopC ; 2
|
||||||
|
|
||||||
|
bit SPEAKER ; 3 ; click speaker
|
||||||
|
|
||||||
|
rts ; 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user