-
Notifications
You must be signed in to change notification settings - Fork 21
/
endless_scroll.mfk
68 lines (57 loc) · 1.16 KB
/
endless_scroll.mfk
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
const word dlAddr = $3000
const word lms1Addr = $4000
const word lms2Addr = $4060
const word lms3Addr = $40c0
array(byte) dl @ dlAddr = [
$70,$70,$70,
$52, @word[lms1Addr],
$52, @word[lms2Addr],
$52, @word[lms3Addr],
$41,lo(dlAddr),hi(dlAddr)
]
noinline asm void wait(byte register(a) f) {
clc
adc os_RTCLOK.b2
.rt_check:
cmp os_RTCLOK.b2
bne .rt_check
rts
}
void main() {
word lms1 @ dlAddr + 4
word lms2 @ dlAddr + 7
word lms3 @ dlAddr + 10
byte hscroli @ $80, a, b, c
pointer screeni @ $82
hscroli = $f
screeni = lms1Addr
wait(1)
os_SDLST = dl.addr
while true {
if hscroli == $b {
a = (pokey_random & 15) + 33
b = (pokey_random & 15) + 33
c = (pokey_random & 15) + 33
screeni[0] = a
screeni[$60] = b
screeni[$c0] = c
screeni[$30] = a
screeni[$30 + $60] = b
screeni[$30 + $c0] = c
lms1 += 1
lms2 += 1
lms3 += 1
screeni += 1
if lms1 == lms1Addr + $30 {
lms1 = lms1Addr
lms2 = lms2Addr
lms3 = lms3Addr
screeni = lms1Addr
}
hscroli = $f
}
antic_hscrol = hscroli
hscroli -= 1
wait(1)
}
}