-
Notifications
You must be signed in to change notification settings - Fork 0
/
curs-1.s65
134 lines (95 loc) · 3.54 KB
/
curs-1.s65
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
;-------------------------------------------------------------------------
; This code is free software: you can redistribute it and/or modify it
; under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
; This code is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; General Public License for more details.
; You should have received a copy of the GNU General Public License
; along with this code. If not, see <https://www.gnu.org/licenses/>.
;-------------------------------------------------------------------------
draw_timer_adjustment=0
.include "framework.s65"
;-------------------------------------------------------------------------
.section zp
.send zp
;-------------------------------------------------------------------------
.section code
;-------------------------------------------------------------------------
fx_init_1: .proc
ldx #0
-
lda init_text,x
cmp #$ff
beq +
jsr oswrch
inx
jmp -
+
ldx #0
lda #'_'
-
jsr oswrch
dex
bne -
rts
init_text:
.byte 22,4
.byte 19,0,4,0,0,0
.byte 255
.pend
;-------------------------------------------------------------------------
blink=false
slow_blink=true
; No blink + slow blink (%x01xxxxx) hides the cursor...
r10_value=(blink?64:0)|(blink&&slow_blink?32:0)
fx_init_2: .proc
.set_crtc 8,0 ;enable cursor
.set_crtc 10,r10_value
.set_crtc 11,8
.set_crtc 14,>crtc_addr($5800)
.set_crtc 15,<crtc_addr($5800)
rts
.pend
;-------------------------------------------------------------------------
fx_update: .proc
rts
.pend
;-------------------------------------------------------------------------
cursor .macro addr
.set_crtc 14,>crtc_addr(\addr)
.set_crtc 15,<crtc_addr(\addr)
.endm
cursor_addr=$5940
cursor_addr_0=cursor_addr+128
cursor_addr_1=cursor_addr+256
fx_draw: .proc
jsr cycles_wait_1024
.rept 8
.cursor cursor_addr_0 ;32
.cursor cursor_addr_1 ;32
.nops 128-64
.next
.cursor $6000
; .cursor addr1 ;32
; .nops 128-32
; .cursor addr0 ;32
; .nops 128-32
; .cursor addr1 ;32
; .nops 128-32
; .cursor addr0 ;32
; .nops 128-32
; .cursor addr1 ;32
; .nops 128-32
; .cursor addr0 ;32
; .nops 128-32
; .cursor addr1 ;32
; .nops 128-32
; .set_crtc 14,>crtc_addr($5a00)
; .set_crtc 15,<crtc_addr($5a00)
rts
.pend
;-------------------------------------------------------------------------
.send code