-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.rop
More file actions
80 lines (50 loc) · 2.6 KB
/
Copy pathtest.rop
File metadata and controls
80 lines (50 loc) · 2.6 KB
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
EE042 // set the RAM address at '2' to 4
EE053 // set RAM address at '3' to 5 (this is paddle 1's Y)
EE464 // set RAM address at '4' to 46 (this is ball's X)
EE465 // set RAM address at '5' to 46 (this is ball's Y)
EE006 // set RAM address at '6' to 1 (this is ball's volocity X )
EE007 // set RAM address at '7' to 0 (this is ball's volocity Y )
DF92 // dump the RAM address at '2' into V9
A1604 // set V6 to be a random number from 0-4
1F600 EE016 // if V6 == 0, ball volocity X = 1
1F600 EE007 // if V6 == 0, ball volocity y = 0
1F601 EE-16 // if V6 == 1, ball volocity X = 01
1F601 EE007 // if V6 == 1, ball volocity Y = 0
1F602 EE016 // if V6 == 2, ball volocity X = 1
1F602 EE017 // if V6 == 2, ball volocity Y = 1
1F603 EE-16 // if V6 == 3, ball volocity X = -1
1F603 EE-17 // if V6 == 3, ball volocity Y = -1
1A904 // while the data at V9 == 4
// draw paddle
D40500 // move (5, 0) to (V4, V5)
DF53 // dump the RAM address at '5' into V5 ( sets the paddle's Y to our var for the paddle's Y )
D60903 // move (9, 3) to (V5, V6) (sets the paddle width/height)
DES4 // draw rect using the data from V4 - V6
// draw ball
DF44 // dump the RAM address at '4' into V4 ( sets the paddle's X to our var for the paddle's X )
DF55 // dump the RAM address at '5' into V5 ( sets the paddle's Y to our var for the paddle's Y )
D60303 // move (3, 3) to (V6, V7) (sets the ball width/height)
DES4 // draw rect using the data from V4 - V6
// draw paddle 2
D49500 // move (5, 0) to (V4, V5)
DF55 // dump the RAM address at '3' into V5 ( sets the paddle's Y to our var for the paddle's Y [which is the same as the ball's Y] )
D60903 // move (9, 3) to (V6, V7) (sets the paddle width/height)
DES4 // draw rect using the data from V5 - V7
DFA6 // load the RAM address at '6' [the ball's volocity x] into VA
EFA4 // ADD VA to the RAM address at '4', the ball's x
DFA7 // load the RAM address at '7' [the ball's volocity x] into VA
EFA5 // ADD VA to RAM address at 5, the ball's x
C000 // clear the screen
1FF01 EA-13 // if the up key is pressed, add -1 to paddle 1's Y
1FF02 EA013 // if the down key is pressed, add 1 to paddle 1's Y
1FF05 A1604 // if the 'A' button is pressed (Z key) generate a new random number
1F600 EE016 // if V6 == 0, ball volocity X = 1
1F600 EE007 // if V6 == 0, ball volocity y = 0
1F601 EE-16 // if V6 == 1, ball volocity X = 01
1F601 EE007 // if V6 == 1, ball volocity Y = 0
1F602 EE016 // if V6 == 2, ball volocity X = 1
1F602 EE017 // if V6 == 2, ball volocity Y = 1
1F603 EE-16 // if V6 == 3, ball volocity X = -1
1F603 EE-17 // if V6 == 3, ball volocity Y = -1
0000 // end the while loop
0000 // end the script