-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
super_mario.asm
142 lines (132 loc) · 1.51 KB
/
super_mario.asm
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
start:
lpc create_graphics
mario_head_left:
byte 0x00
byte 0x00
byte 0x01
byte 0x03
byte 0x03
byte 0x05
byte 0x05
byte 0x06
mario_head_right:
byte 0x00
byte 0x00
byte 0x18
byte 0x1f
byte 0x08
byte 0x08
byte 0x04
byte 0x0f
mario_body_left_1:
byte 0x0f
byte 0x1f
byte 0x1e
byte 0x18
byte 0x01
byte 0x07
byte 0x07
byte 0x04
mario_body_right_1:
byte 0x18
byte 0x10
byte 0x08
byte 0x18
byte 0x08
byte 0x08
byte 0x10
byte 0x18
mario_body_left_2:
byte 0x0f
byte 0x1f
byte 0x0e
byte 0x08
byte 0x01
byte 0x08
byte 0x1f
byte 0x0c
mario_body_right_2:
byte 0x1c
byte 0x18
byte 0x08
byte 0x0d
byte 0x07
byte 0x1f
byte 0x03
byte 0x00
create_graphics:
ldi mario_head_left
tab
ldi 0x00
udg
ldi mario_head_right
tab
ldi 0x01
udg
ldi mario_body_left_1
tab
ldi 0x02
udg
ldi mario_body_right_1
tab
ldi 0x03
udg
ldi mario_body_left_2
tab
ldi 0x04
udg
ldi mario_body_right_2
tab
ldi 0x05
udg
mario_walk:
ldi 0x00
RCH
cmp 0x52
jmp exit
cmp 0x4d
jmp exit
cmp 0x4b
jmp exit
cmp 0x6c
jmp exit
ldi 0x00
tab
lda count
cmp 0x11
jmp reset_mario
inm count
ldi 0x00
tab
ldi 0x00
pos
spr 0x00
spr 0x01
ldi 0x01
tab
ldi 0x00
pos
spr 0x02
spr 0x03
dly 0xff
dly 0xff
ldi 0x01
tab
ldi 0x00
pos
spr 0x04
spr 0x05
dly 0xff
dly 0xff
sdr
lpc mario_walk
count:
byte 0x00
reset_mario:
ldi 0x00
sta count
cls
lpc mario_walk
exit:
cls
byte 0x00