-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtorus.asm
76 lines (71 loc) · 1.4 KB
/
torus.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
torusmain
lda vscnt
cmpa #12
bne skiptorus
clr vscnt
inc sceneval
jsr scrollinit
bra actualendiswear
skiptorus
lda torusflag
cmpa #0
beq skiptorusinit
jsr creditsinit
skiptorusinit
;jsr palswap
inc vscnt2
lda vscnt2
cmpa #3
bne actualendiswear
;DBGPAL
clr vscnt2
jsr torusdraw
jsr toruscopy2
ldx torusgfxaddr
leax 512,x
;DBGPAL
cmpx #torusgfxend
bne torusend
ldx #torusgfx
torusend
stx torusgfxaddr
actualendiswear
rts
torusdraw
ldx torusgfxaddr
ldy #$400
clr xcnt
toruscopy
ldd ,x++ ;only one increment for other cool effect
std ,y++
inc xcnt
lda xcnt
cmpa #8
bne torusskipreset
leay 16,y
clr xcnt
torusskipreset
cmpy #$800
bne toruscopy
rts
toruscopy2
clr xcnt
ldx #$400
ldy #$410
toruscopy2lp
ldd ,x++
std ,y++
inc xcnt
lda xcnt
cmpa #8
bne torusskipreset2
leax 16,x
leay 16,y
clr xcnt
torusskipreset2
cmpx #$800
bne toruscopy2lp
rts
torusgfx
includebin "torus/torus5.bin"
torusgfxend