1908
|
1 ****************************************************************************
|
|
2 *
|
|
3 * dashboard.a - draw the dashboard
|
|
4 *
|
|
5 *
|
|
6
|
|
7 psect dashboard_a,0,0,0,200,0
|
|
8
|
|
9 vsect
|
1909
|
10 numbuf rmb 24
|
1908
|
11 endsect
|
|
12
|
|
13
|
|
14 white equ $00
|
|
15 blue equ $01
|
|
16 black equ $02
|
|
17 green equ $03
|
|
18 red equ $04
|
|
19 yellow equ $05
|
|
20 magenta equ $06
|
|
21 cyan equ $07
|
|
22
|
|
23
|
|
24 inshlgt equ blue
|
|
25 insfill equ cyan
|
|
26 txtclr equ $03 green
|
|
27
|
|
28 * byte stream to send to window to make dashboard
|
|
29 dash
|
|
30 fdb WScaleSw
|
|
31 fcb $01 turn on scaling
|
|
32
|
|
33 ***** TITLE *****
|
|
34 fdb WFont
|
|
35 fdb $C801
|
|
36 fcb WPosCur,$20+17,$20+1
|
|
37 fdb WFColor
|
|
38 fcb red
|
|
39 fdb WBoldSw
|
|
40 fcb $01
|
|
41 fcc /COYOTA!/
|
|
42 fdb WFont
|
|
43 fdb $C802
|
|
44 fdb WBoldSw
|
|
45 fcb $00
|
|
46
|
|
47 fdb WFColor
|
|
48 fcb inshlgt
|
|
49
|
|
50 ***** SPEEDOMETER *****
|
|
51 fdb WSetDPtr
|
|
52 fdb 320,96
|
|
53 fdb WCircle
|
1909
|
54 fdb 128
|
1908
|
55 fdb WCircle
|
1909
|
56 fdb 136
|
1908
|
57 fdb WCircle
|
|
58 fdb 32
|
|
59 fdb WCircle
|
|
60 fdb 38
|
|
61 fdb WFColor
|
|
62 fcb insfill
|
|
63 fdb WRSetDPtr
|
|
64 fdb 0,-17
|
|
65 fdb WFFill
|
|
66 fdb WRSetDPtr
|
1909
|
67 fdb 0,-50
|
1908
|
68 fdb WFFill
|
|
69
|
|
70 * draw 0MPH marker
|
|
71 fdb WFColor
|
|
72 fcb insfill
|
|
73 fdb WSetDPtr
|
|
74 fdb 227,132
|
|
75 fdb WRLine draw the tick mark
|
|
76 fdb 5,-4
|
|
77 fcb WPosCur,$20+20,$20+15
|
|
78 fdb WFColor
|
|
79 fcb txtclr
|
|
80 fcc /0/
|
|
81
|
|
82 * draw 60MPH marker
|
|
83 fdb WFColor
|
|
84 fcb insfill
|
|
85 fdb WSetDPtr
|
1909
|
86 fdb 320,32
|
1908
|
87 fdb WRLine draw the mid-speed tick mark
|
1909
|
88 fdb 0,5
|
|
89 fcb WPosCur,$20+26,$20+5
|
1908
|
90 fdb WFColor
|
|
91 fcb txtclr
|
|
92 fcc /60/
|
|
93 fdb WFColor
|
|
94 fcb insfill
|
|
95
|
|
96 * draw 120MPH marker
|
|
97 fdb WSetDPtr
|
|
98 fdb 413,132
|
|
99 fdb WRLine draw the tick mark
|
|
100 fdb -5,-4
|
|
101 fcb WPosCur,$20+31,$20+15
|
|
102 fdb WFColor
|
|
103 fcb txtclr
|
|
104 fcc /120/
|
|
105 fdb WFColor
|
|
106 fcb inshlgt
|
|
107
|
|
108 ***** ENGINE TEMPERATURE (UPPER LEFT) *****
|
|
109 fdb WSetDPtr
|
|
110 fdb 104,52
|
|
111 fdb WCircle
|
|
112 fdb 66
|
|
113 fdb WCircle
|
|
114 fdb 72
|
|
115 fdb WRSetDPtr
|
|
116 fdb 0,-34
|
|
117 fdb WFColor
|
|
118 fcb insfill
|
|
119 fdb WFFill
|
|
120
|
|
121 ***** FUEL GAUGE (UPPER RIGHT) *****
|
|
122 fdb WFColor
|
|
123 fcb inshlgt
|
|
124 fdb WSetDPtr
|
|
125 fdb 536,52
|
|
126 fdb WCircle
|
|
127 fdb 66
|
|
128 fdb WCircle
|
|
129 fdb 72
|
|
130 fdb WRSetDPtr
|
|
131 fdb 0,-34
|
|
132 fdb WFColor
|
|
133 fcb insfill
|
|
134 fdb WFFill
|
|
135
|
|
136 ***** DATE/TIME (LOWER LEFT) *****
|
|
137 fdb WFColor
|
|
138 fcb inshlgt
|
|
139 fdb WSetDPtr
|
|
140 fdb 104,192-52
|
|
141 fdb WCircle
|
|
142 fdb 66
|
|
143 fdb WCircle
|
|
144 fdb 72
|
|
145 fdb WRSetDPtr
|
|
146 fdb 0,-34
|
|
147 fdb WFColor
|
|
148 fcb insfill
|
|
149 fdb WFFill
|
|
150
|
|
151 ***** ???? (LOWER LEFT) *****
|
|
152 fdb WFColor
|
|
153 fcb inshlgt
|
|
154 fdb WSetDPtr
|
|
155 fdb 536,192-52
|
|
156 fdb WCircle
|
|
157 fdb 66
|
|
158 fdb WCircle
|
|
159 fdb 72
|
|
160 fdb WRSetDPtr
|
|
161 fdb 0,-34
|
|
162 fdb WFColor
|
|
163 fcb insfill
|
|
164 fdb WFFill
|
|
165
|
|
166 * finally, draw text color from now now
|
|
167 fdb WFColor
|
|
168 fcb txtclr set text draw color
|
|
169
|
|
170 dashL equ *-dash
|
|
171
|
|
172 * entry point
|
|
173 dashboard:
|
|
174 * draw the dashboard
|
|
175 Scrn leax dash,pcr
|
|
176 ldy #dashL
|
|
177 lda #1
|
|
178 os9 I$Write
|
|
179 rts
|
|
180
|
|
181 speedtag
|
1909
|
182 fcb WPosCur,$20+25,$20+11
|
1908
|
183 fdb WFColor
|
|
184 fcb yellow
|
|
185 fcb $00
|
|
186
|
|
187 speedtag2
|
|
188 fcb WPosCur,$20+25,$20+12
|
|
189 fcc /MPH./
|
|
190 fdb WFColor
|
|
191 fcb txtclr
|
|
192 fcb $00
|
|
193
|
|
194
|
|
195 * Show Speed
|
|
196 speed:
|
|
197 leax <speedtag,pcr
|
|
198 lbsr PUTS
|
|
199 lbsr getspeed get speed in D
|
|
200 leax numbuf,u
|
|
201 lbsr BIN_DEC
|
|
202 lbsr PUTS
|
|
203 leax <speedtag2,pcr
|
|
204 lbsr PUTS
|
|
205 rts
|
|
206
|
|
207
|
1909
|
208 odomtag fcb WPosCur,$20+23,$20+18
|
|
209 fdb WBColor
|
|
210 fcb red
|
1908
|
211 fcb $00
|
1909
|
212 odomtag2
|
|
213 fdb WBColor
|
|
214 fcb black
|
|
215 fcb $00
|
|
216 odomtag2l equ *-odomtag2
|
1908
|
217
|
|
218 odometer:
|
|
219 leax <odomtag,pcr
|
|
220 lbsr PUTS
|
|
221 lbsr getmileage get odometer in D,X
|
1909
|
222 pshs d,x
|
1908
|
223 leax numbuf,u
|
1909
|
224 leay ,s
|
|
225 lda #$01
|
|
226 lbsr BIN_DEC32
|
1908
|
227 lbsr PUTS
|
1909
|
228 leas 4,s
|
|
229 leax <odomtag2,pcr
|
|
230 ldy #odomtag2l
|
|
231 lda #$01
|
|
232 os9 I$Write
|
1908
|
233 rts
|
|
234
|
|
235 etemptag fcb WPosCur,$20+7,$20+8
|
|
236 fcb $00
|
|
237
|
|
238 engtemp:
|
|
239 leax <etemptag,pcr
|
|
240 lbsr PUTS
|
|
241 lbsr getengtemp get engine temperature in D
|
|
242 leax numbuf,u
|
|
243 lbsr BIN_DEC
|
|
244 lbsr PUTS
|
|
245 rts
|
|
246
|
|
247 fueltag fcb WPosCur,$20+44,$20+8
|
|
248 fcb $00
|
|
249
|
|
250 fuelgauge:
|
|
251 leax <fueltag,pcr
|
|
252 lbsr PUTS
|
|
253 lbsr getfuel get fuel in D
|
|
254 leax numbuf,u
|
|
255 lbsr BIN_DEC
|
|
256 lbsr PUTS
|
|
257 rts
|
|
258
|
|
259 timetag fcb WPosCur,$20+18,$20+23
|
|
260 fcb $00
|
|
261
|
|
262 systime:
|
|
263 leax <timetag,pcr
|
|
264 lbsr PUTS
|
|
265 leax numbuf,u
|
|
266 lbsr STIMESTR get fuel in D
|
|
267 lbsr PUTS
|
|
268 rts
|
|
269
|
|
270 endsect
|