-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtests_r.yaml
249 lines (244 loc) · 7.03 KB
/
tests_r.yaml
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
init:
load:
unit_tests:
program: /code/include_me_full_r.prg
tests:
- name: sprites-positions-correctly-without-msb
description: Sprite X pos < 256 sets MSB to 0
set_registers:
- description: Sprite 0
register: x
byte_value: $00
- description: X pos low byte at 255
register: a
byte_value: $ff
- description: X pos high byte at $00
register: y
byte_value: $00
set_memory:
- description: Sprite Y position at $40
address: "$02"
byte_value: "$40"
- description: MSB for all sprites to 0
address: "{vic.MSIGX}"
byte_value: "$00"
jump_address: "{PositionSprite}"
assert:
- description: Sprite 0's X pos is at ff
type: memory_test
address: "{vic.SP0X}"
op: eq
byte_value: "$ff"
- description: Sprite 0's Y pos is at $40
type: memory_test
address: "{vic.SP0Y}"
op: eq
byte_value: "$40"
- description: And sprite 0's MSB is set to 0
type: memory_test
address: "{vic.MSIGX}"
op: eq
byte_value: "$00"
- name: sprites-sets-msb-properly
description: Moving a sprite horizontally sets the MSB properly
set_registers:
- description: Sprite 0
register: x
byte_value: $00
- description: X pos low byte at 255
register: a
byte_value: $00
- description: X pos high byte at $00
register: y
byte_value: $01
set_memory:
- description: Sprite Y position at $40
address: "$02"
byte_value: "$40"
- description: MSB for all sprites to 0
address: "{vic.MSIGX}"
byte_value: "$00"
jump_address: "{PositionSprite}"
assert:
- description: Sprite 0's X pos is at 0
type: memory_test
address: "{vic.SP0X}"
op: eq
byte_value: "$00"
- description: But sprite 0's MSB is set to 1
type: memory_test
address: "{vic.MSIGX}"
op: eq
byte_value: "$01"
- description: Sprite 0's Y pos is at $40
type: memory_test
address: "{vic.SP0Y}"
op: eq
byte_value: "$40"
- name: sprites-enable-x-expand-correctly
description: Enable horizontal expansion of a sprite
set_registers:
- description: X register is sprite number
register: x
byte_value: "$01"
- description: Y register is attribute
register: y
byte_value: "{SPR_X_EXPAND}"
- description: A register is value
register: a
byte_value: "{SPR_EXPAND}"
set_memory:
- description: Enable X expansion for Sprite 7
address: "{vic.XXPAND}"
byte_value: "$80"
jump_address: "{ChangeSpriteAttribute}"
assert:
- description: Sprite 1's horizontal expansion is set to True
type: memory_test
address: "{vic.XXPAND}"
op: eq
byte_value: "$82"
- name: vic-set-bank-chars-and-screen-i
description: Set VIC bank to 0, screen to 1024 and chars to 12288
set_registers:
- description: X register is bank 0
register: x
byte_value: "$00"
- description: A register is character memory
register: a
byte_value: "$06"
- description: Y register is screen memory
register: y
byte_value: "$01"
jump_address: "{SetVICBank}"
assert:
- description: CIA 2 is set properly
type: memory_test
address: "{cia.CI2PRA}"
op: eq
byte_value: "$03"
- description: VIC is set properly
type: memory_test
address: "{vic.VMCSB}"
op: eq
byte_value: "$1c"
- description: Bank Memory Base is set properly
type: memory_test
address: "{vic.BankMemoryBase}"
op: eq
word_value: "$0000"
- description: Screen Memory Base is set properly
type: memory_test
address: "{vic.ScreenMemoryBase}"
op: eq
word_value: "$0400"
- description: Character Memory Base is set properly
type: memory_test
address: "{vic.CharacterMemoryBase}"
op: eq
word_value: "$3000"
- description: Sprite Pointer Base is set properly
type: memory_test
address: "{vic.SpritePointerBase}"
op: eq
word_value: "$07f8"
- description: Make sure we're executing within 170 cycles
type: cycle_count
op: lt
cycle_count: 170
- name: vic-set-bank-chars-and-screen-ii
description: Set VIC bank to 3, screen to 4096 and chars to 8192
set_registers:
- description: X register is bank 0
register: x
byte_value: "$03"
- description: A register is character memory
register: a
byte_value: "$04"
- description: Y register is screen memory
register: y
byte_value: "$04"
jump_address: "{SetVICBank}"
assert:
- description: CIA 2 is set properly
type: memory_test
address: "{cia.CI2PRA}"
op: eq
byte_value: "$00"
- description: VIC is set properly
type: memory_test
address: "{vic.VMCSB}"
op: eq
byte_value: "$48"
- description: Bank Memory Base is set properly
type: memory_test
address: "{vic.BankMemoryBase}"
op: eq
word_value: "$c000"
- description: Screen Memory Base is set properly
type: memory_test
address: "{vic.ScreenMemoryBase}"
op: eq
word_value: "$d000"
- description: Character Memory Base is set properly
type: memory_test
address: "{vic.CharacterMemoryBase}"
op: eq
word_value: "$e000"
- description: Sprite Pointer Base is set properly
type: memory_test
address: "{vic.SpritePointerBase}"
op: eq
word_value: "$d3f8"
- description: Make sure we're executing within 170 cycles
type: cycle_count
op: lt
cycle_count: 170
- name: vic-set-bank-chars-and-screen-iii
description: Set VIC bank to 2, screen to 8192 and chars to 0
set_registers:
- description: X register is bank 0
register: x
byte_value: "$02"
- description: A register is character memory
register: a
byte_value: "$00"
- description: Y register is screen memory
register: y
byte_value: "$08"
jump_address: "{SetVICBank}"
assert:
- description: CIA 2 is set properly
type: memory_test
address: "{cia.CI2PRA}"
op: eq
byte_value: "$01"
- description: VIC is set properly
type: memory_test
address: "{vic.VMCSB}"
op: eq
byte_value: "$80"
- description: Bank Memory Base is set properly
type: memory_test
address: "{vic.BankMemoryBase}"
op: eq
word_value: "$8000"
- description: Screen Memory Base is set properly
type: memory_test
address: "{vic.ScreenMemoryBase}"
op: eq
word_value: "$a000"
- description: Character Memory Base is set properly
type: memory_test
address: "{vic.CharacterMemoryBase}"
op: eq
word_value: "$8000"
- description: Sprite Pointer Base is set properly
type: memory_test
address: "{vic.SpritePointerBase}"
op: eq
word_value: "$a3f8"
- description: Make sure we're executing within 170 cycles
type: cycle_count
op: lt
cycle_count: 170