-
Notifications
You must be signed in to change notification settings - Fork 6
/
joystick.acme
77 lines (61 loc) · 807 Bytes
/
joystick.acme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
JOYSTICK !zone {
ldx CUR_SPR
inc SPR_A, x
lda CIA1_PORT_2
asl
asl
asl
.fire
asl
pha
bcs .right
dec CUR_SPR
bpl .right
lda #SPRITES-1
sta CUR_SPR
.right
pla
asl
bcs .left
pha
jsr SCROLL_R
pla
ldx CUR_SPR
inc SPR_X, x
.left
asl
bcs .down
pha
jsr SCROLL_L
pla
ldx CUR_SPR
dec SPR_X, x
.down
asl
bcs .up
pha
jsr SCROLL_D
pla
ldx CUR_SPR
ldy SPR_Y, x
cpy #SPRITES_MAX_Y
beq .up
cpy #SPRITES_TOP_Y
beq .up
inc SPR_Y, x
.up
asl
bcs .exit
jsr SCROLL_U
ldx CUR_SPR
ldy SPR_Y, x
cpy #FIRST_BADLINE+SCR_ROWS
beq .exit
cpy #SPRITES_TOP_Y
beq .exit
dec SPR_Y, x
.exit
rts
}
CUR_SPR
!by SPRITES-1