Mercurial > hg > Members > kono > nitros9-code
annotate defs/systype @ 1086:8391bf11ab31
ROM code moved to cloud9
author | boisy |
---|---|
date | Thu, 03 Apr 2003 22:23:44 +0000 |
parents | df0d4a622a2c |
children | ba4b50f63658 |
rev | line source |
---|---|
373
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
1 ifeq SYSTYPE |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
2 |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
3 SYSTYPE set 1 |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
4 |
61 | 5 nam SysType |
426 | 6 ifeq Level-1 |
7 ttl CoCo OS-9 Level One System Type Definitions | |
8 endc | |
9 ifeq Level-2 | |
10 ifne NitrOS9 | |
11 ttl CoCo NitrOS-9 Level Two System Type Definitions | |
12 else | |
13 ttl CoCo OS-9 Level Two System Type Definitions | |
14 endc | |
15 endc | |
61 | 16 |
17 ***************** | |
18 * Edition History | |
19 * | |
20 * Date Changes Made by | |
21 * -------- ------------------------------------------------------------ --- | |
22 * 98/10/13 Added defs by Bruce Isted from his Eliminator archive BGP | |
23 * 98/10/31 Merged cc3global.defs into this file BGP | |
24 * 02/04/30 Merged Level One and Level Two sysdefs BGP | |
25 | |
26 ********************** | |
27 * CPU Type Definitions | |
28 * | |
29 Color set 1 | |
30 Color3 set 2 | |
31 ifeq Level-1 | |
32 CPUType set Color | |
33 else | |
34 CPUType set Color3 | |
35 endc | |
36 | |
37 ****************************** | |
38 * Clock Speed Type Definitions | |
39 * | |
40 OneMHz equ 1 | |
41 TwoMHz equ 2 | |
42 ifeq CPUType-Color | |
43 CPUSpeed set OneMHz | |
44 else | |
45 CPUSpeed set TwoMHz | |
46 endc | |
47 | |
48 ********************************** | |
49 * Power Line Frequency Definitions | |
50 * | |
51 Hz50 equ 1 Assemble clock for 50 hz power | |
52 Hz60 equ 2 Assemble clock for 60 hz power | |
53 PwrLnFrq set Hz60 Set to Appropriate freq | |
54 | |
55 ********************************** | |
56 * Ticks per second | |
57 * | |
58 ifeq PwrLnFrq-Hz50 | |
59 TkPerSec equ 50 | |
60 else | |
61 TkPerSec equ 60 | |
62 endc | |
63 | |
64 ****************** | |
65 * ACIA type set up | |
66 * | |
67 org 1 | |
68 ACIA6850 rmb 1 MC6850 acia. | |
69 ACIA6551 rmb 1 SY6551 acia. | |
70 ACIA2661 rmb 1 SC2661 acia. | |
71 ACIATYPE set ACIA6551 | |
72 | |
73 **************************************** | |
74 * Special character Bit position equates | |
75 * | |
76 SHIFTBIT equ %00000001 | |
77 CNTRLBIT equ %00000010 | |
78 ALTERBIT equ %00000100 | |
79 UPBIT equ %00001000 | |
80 DOWNBIT equ %00010000 | |
81 LEFTBIT equ %00100000 | |
82 RIGHTBIT equ %01000000 | |
83 SPACEBIT equ %10000000 | |
84 | |
85 ****************** | |
86 * Device addresses | |
87 * | |
88 A.AciaP set $FF68 Aciapak Address | |
89 A.ModP set $FF6C ModPak Address | |
90 DPort set $FF40 Disk controller base address | |
91 MPI.Slct set $FF7F Multi-Pak slot select | |
92 MPI.Slot set $03 Multi-Pak default slot | |
64 | 93 PIA0Base equ $FF00 |
94 PIA.U4 equ PIA0Base | |
95 PIA1Base equ $FF20 | |
96 PIA.U8 equ PIA1Base | |
61 | 97 |
98 * | |
99 * VDG Devices | |
100 * | |
101 A.TermV set $FFC0 VDG Term | |
102 A.V1 set $FFC1 Possible additional VDG Devices | |
103 A.V2 set $FFC2 | |
104 A.V3 set $FFC3 | |
105 A.V4 set $FFC4 | |
106 A.V5 set $FFC5 | |
107 A.V6 set $FFC6 | |
108 A.V7 set $FFC7 | |
109 | |
110 ifeq Level-1 | |
111 | |
112 ************************************************* | |
113 * | |
114 * OS-9 Level One CoCo 1/2 Section | |
115 * | |
116 ************************************************* | |
117 | |
118 HW.Page set $FF Device descriptor hardware page | |
976 | 119 BTStart set $EF00 boot track memory start |
61 | 120 |
121 else | |
122 | |
123 ************************************************* | |
124 * | |
125 * OS-9 Level Two CoCo 3 Section | |
126 * | |
127 ************************************************* | |
128 | |
129 **************************************** | |
130 * Dynamic Address Translator Definitions | |
131 * | |
132 DAT.BlCt equ 8 D.A.T. blocks/address space | |
133 DAT.BlSz equ (256/DAT.BlCt)*256 D.A.T. block size | |
134 DAT.ImSz equ DAT.BlCt*2 D.A.T. Image size | |
135 DAT.Addr equ -(DAT.BlSz/256) D.A.T. MSB Address bits | |
136 DAT.Task equ $FF91 Task Register address | |
137 DAT.TkCt equ 32 Number of DAT Tasks | |
138 DAT.Regs equ $FFA0 DAT Block Registers base address | |
139 DAT.Free equ $333E Free Block Number | |
140 DAT.BlMx equ $3F Maximum Block number | |
141 DAT.BMSz equ $40 Memory Block Map size | |
142 DAT.WrPr equ 0 no write protect | |
143 DAT.WrEn equ 0 no write enable | |
144 SysTask equ 0 Coco System Task number | |
145 IOBlock equ $3F | |
146 ROMBlock equ $3F | |
147 IOAddr equ $7F | |
148 ROMCount equ 1 number of blocks of ROM (High RAM Block) | |
149 RAMCount equ 1 initial blocks of RAM | |
150 MoveBlks equ DAT.BlCt-ROMCount-2 Block numbers used for copies | |
151 BlockTyp equ 1 chk only first bytes of RAM block | |
152 ByteType equ 2 chk entire block of RAM | |
153 Limited equ 1 chk only upper memory for ROM modules | |
154 UnLimitd equ 2 chk all NotRAM for modules | |
155 * NOTE: this check assumes any NotRAM with a module will | |
156 * always start with $87CD in first two bytes of block | |
157 RAMCheck equ BlockTyp chk only beg bytes of block | |
158 ROMCheck equ Limited chk only upper few blocks for ROM | |
159 LastRAM equ IOBlock maximum RAM block number | |
160 | |
161 *************************** | |
162 * Color Computer 3 Specific | |
163 * | |
164 CPUType set Color3 | |
165 CPUSpeed set TwoMHz | |
166 MappedIO equ True (Actually False but it works better this way) | |
167 | |
168 ******************** | |
169 * Hardware addresses | |
170 * | |
171 GIMERegs equ $FF00 Base address of GIME registers | |
172 IrqEnR equ $FF92 GIME IRQ enable/status register | |
173 BordReg equ $FF9A Border color register | |
174 PalAdr equ $FFB0 Palette registers | |
175 | |
176 HW.Page set $07 Device descriptor hardware page | |
177 | |
178 * | |
179 * Window Devices | |
180 * | |
181 org $FF9F | |
182 A.W rmb 1 $FF9F Generic Window Descriptor | |
183 A.TermW rmb 1 $FFA0 Windowing Term | |
184 A.W1 rmb 1 $FFA1 | |
185 A.W2 rmb 1 $FFA2 | |
186 A.W3 rmb 1 $FFA3 | |
187 A.W4 rmb 1 $FFA4 | |
188 A.W5 rmb 1 $FFA5 | |
189 A.W6 rmb 1 $FFA6 | |
190 A.W7 rmb 1 $FFA7 | |
191 A.W8 rmb 1 $FFA8 | |
192 A.W9 rmb 1 $FFA9 | |
193 A.W10 rmb 1 $FFAA | |
194 A.W11 rmb 1 $FFAB | |
195 A.W12 rmb 1 $FFAC | |
196 A.W13 rmb 1 $FFAD | |
197 A.W14 rmb 1 $FFAE | |
198 A.W15 rmb 1 $FFAF | |
199 | |
200 ********************************** | |
201 * Pointer Device Packet Definition | |
202 * | |
203 org 0 | |
204 Pt.Valid rmb 1 Is returned info valid (0=no/1=yes) | |
205 Pt.Actv rmb 1 Active Side 0=off/1=Right/2=left | |
206 Pt.ToTm rmb 1 Time out Initial value | |
207 rmb 2 reserved | |
208 Pt.TTTo rmb 1 Time Till Timeout | |
209 Pt.TSSt rmb 2 Time Since Start Counter | |
210 Pt.CBSA rmb 1 Current Button State Button A | |
211 Pt.CBSB rmb 1 Current Button State Button B | |
212 Pt.CCtA rmb 1 Click Count Button A | |
213 Pt.CCtB rmb 1 Click Count Button B | |
214 Pt.TTSA rmb 1 Time This State Counter Button A | |
215 Pt.TTSB rmb 1 Time This State Counter Button B | |
216 Pt.TLSA rmb 1 Time Last State Counter Button A | |
217 Pt.TLSB rmb 1 Time Last State Counter Button B | |
218 rmb 2 Reserved | |
219 Pt.BDX rmb 2 Button down X value EXPERIMENTAL | |
220 Pt.BDY rmb 2 Button down Y value | |
221 Pt.Stat rmb 1 Window Pointer type location | |
222 Pt.Res rmb 1 Resolution (0..640 by: 0=ten/1=one) | |
223 Pt.AcX rmb 2 Actual X Value | |
224 Pt.AcY rmb 2 Actual Y Value | |
225 Pt.WRX rmb 2 Window Relative X | |
226 Pt.WRY rmb 2 Window Relative Y | |
227 Pt.Siz equ . Packet Size 32 bytes | |
228 | |
229 ************************** | |
230 * window regions for mouse | |
231 * | |
232 WR.Cntnt equ 0 content region | |
233 WR.Cntrl equ 1 control region | |
234 WR.OfWin equ 2 off window | |
235 | |
236 ************************************* | |
237 * Standard system get/put buffer defs | |
238 * | |
239 * | |
240 * system group numbers | |
241 * | |
242 org 200 | |
243 Grp.Fnt rmb 1 font group | |
244 Grp.Clip rmb 1 clipboard group | |
245 Grp.Ptr rmb 1 pointer group | |
246 Grp.Pat2 rmb 1 pattern group 2 color | |
247 Grp.Pat4 rmb 1 pattern group 4 color | |
248 Grp.Pat6 rmb 1 pattern group 16 color | |
249 * | |
250 * font buffer numbers | |
251 * | |
252 org 1 | |
253 Fnt.S8x8 rmb 1 standard 8x8 font | |
254 Fnt.S6x8 rmb 1 standard 6x8 font | |
255 Fnt.G8x8 rmb 1 standard graphics 8x8 font | |
256 * | |
257 * pattern buffer numbers | |
258 * | |
259 org 1 | |
260 Pat.Dot rmb 1 | |
261 Pat.Vrt rmb 1 | |
262 Pat.Hrz rmb 1 | |
263 Pat.XHtc rmb 1 | |
264 Pat.LSnt rmb 1 | |
265 Pat.RSnt rmb 1 | |
266 Pat.SDot rmb 1 | |
267 Pat.BDot rmb 1 | |
268 * | |
269 * pointer buffer numbers | |
270 * | |
271 org 1 | |
272 Ptr.Arr rmb 1 Arrow pointer | |
273 Ptr.Pen rmb 1 Pencil pointer | |
274 Ptr.LCH rmb 1 Large cross hair pointer | |
275 Ptr.Slp rmb 1 Wait timer pointer | |
276 Ptr.Ill rmb 1 Illegal action pointer | |
277 Ptr.Txt rmb 1 Text pointer | |
278 Ptr.SCH rmb 1 Small cross hair pointer | |
279 | |
280 ******************************** | |
281 * Window/Menu Bar Data Structure | |
282 * | |
283 * To be used in SS.WnSet SETSTAT to set up a Framed Window | |
284 * for use in the high level windowing package. | |
285 * | |
286 NUMMENS equ 10 maximum number of menus on menu bar | |
287 NUMITMS equ 20 maximum number of items in a menu | |
288 MXTTLEN equ 15 max chars for menu and item names | |
289 WINSYNC equ $C0C0 synch bytes for window validation | |
290 * | |
291 * Menu Item Descriptor : (MN.ITEMS) | |
292 * one required for each item within the menu | |
293 * | |
294 org 0 | |
295 MI.TTL rmb MXTTLEN item name | |
296 MI.ENBL rmb 1 enable flag | |
297 MI.RES rmb 5 reserved bytes | |
298 MI.SIZ equ . size of menu item descriptor | |
299 * | |
300 * Menu Descriptor : | |
301 * one for each menu on the manu bar | |
302 * each is pointed to by MB.MPTR below | |
303 * | |
304 org 0 | |
305 MN.TTL rmb MXTTLEN menu title | |
306 MN.ID rmb 1 menu id number (1-255) | |
307 MN.XSIZ rmb 1 horiz. size of desired pull down | |
308 MN.NITS rmb 1 number of items in menu | |
309 MN.ENBL rmb 1 enable flag | |
310 MN.RES rmb 2 reserved bytes | |
311 MN.ITEMS rmb 2 pointer to array of menu items | |
312 MN.SIZ equ . size of menu descriptor | |
313 * | |
314 * Window Descriptor: | |
315 * one required for each application in a framed window | |
316 * | |
317 org 0 | |
318 WN.TTL rmb 20 title of window for title bar | |
319 WN.NMNS rmb 1 number of menus in menu bar | |
320 WN.XMIN rmb 1 minimal horiz. size for application to run | |
321 WN.YMIN rmb 1 minimal vert. size for application to run | |
322 WN.SYNC rmb 2 synch bytes ($C0C0) | |
323 WN.RES rmb 7 reserved bytes | |
324 WN.BAR rmb 2 pointer to arry of menu descriptors | |
325 WN.SIZ equ . size of window/menu bar descriptor | |
326 | |
327 ************************* | |
328 * Window Type Definitions | |
329 * | |
330 * To be used in setting up the border of the window in | |
331 * the SS.WnSel SETSTAT | |
332 * | |
333 org 0 | |
334 WT.NBox rmb 1 No Box | |
335 WT.FWin rmb 1 Framed Window | |
336 WT.FSWin rmb 1 Framed Window w/Scroll Bars | |
337 WT.SBox rmb 1 Shadowed Box | |
338 WT.DBox rmb 1 Double Box | |
339 WT.PBox rmb 1 Plain Box | |
340 | |
341 ************************************* | |
342 * Pre-Defined Menu IDs for the system | |
343 * | |
344 org 1 | |
345 MId.Mov rmb 1 move box | |
346 MId.Cls rmb 1 close box | |
347 MId.Grw rmb 1 grow box | |
348 MId.SUp rmb 1 scroll up | |
349 MId.SDn rmb 1 scroll down | |
350 MId.SRt rmb 1 scroll right | |
351 MId.SLt rmb 1 scroll left | |
352 MId.Chr rmb 1 character was depressed | |
353 org 20 | |
354 MId.Tdy rmb 1 Tandy menu | |
355 MId.Fil rmb 1 Files Menu | |
356 MId.Edt rmb 1 Edit Menu | |
357 MId.Sty rmb 1 Styles menu | |
358 MId.Fnt rmb 1 Font menu | |
359 | |
360 | |
361 ****************************************************************************** | |
362 ****************************************************************************** | |
363 ** ** | |
364 ** OS-9 Windowing system Global data definitions ** | |
365 ** ** | |
366 ****************************************************************************** | |
367 ****************************************************************************** | |
368 ** ** | |
369 ** System memory block 0 layout: ** | |
370 ** ** | |
371 ** $0000-$0001 : FHL/Isted WD 1002-05 - interface base address ** | |
372 ** $0002 : FHL/Isted WD 1002-05 - boot device physical drive # ** | |
373 ** $0008 : Bruce Isted Serial mouse - button counter & rx count ** | |
374 ** $0009-$000B : Bruce Isted Serial mouse - RX buffer ** | |
375 ** $000C-$000D : Bruce Isted Serial mouse - Current X position ** | |
376 ** $000E-$000F : Bruce Isted Serial mouse - Current Y position ** | |
377 ** $0010-$001F : unused (User definable) ** | |
378 ** $0020-$00FF : system direct page & some IRQ vectors ** | |
379 ** $0100-$011F : Task usage table ** | |
380 ** $0120-$01FF : Virtual DAT tasks (pointed to by <D.TskIPt) ** | |
381 ** $0200-$02FF : memory block usage map ($80=Not RAM,$01=in use,$02=module) ** | |
382 ** $0300-$03FF : system's system call dispatch table ** | |
383 ** $0400-$04FF : user's sysem call dispatch table ** | |
384 ** $0500-$05FF : process descriptor pointer table ** | |
385 ** $0600-$07FF : System task (Task 0, ID 1) process descriptor ** | |
386 ** $0800-$08FF : System's stack space (initial ptr is $0900) ** | |
387 ** $0900-$09FF : SMAP table ($01=in used, $80=NOT RAM) ** | |
388 ** $0A00-$0FFF : module directory DAT Images (8 bytes each) ** | |
389 ** $1000-$10FF : System Global memory (pointed to by D.CCMem) ** | |
390 ** $1100-$11FF : GRFDRV global memory (DP=$11 in GRFDRV) ** | |
391 ** $1200-$1247 : shared buffer between Grf/WindInt & GRFDRV (GP buffers) ** | |
392 ** $1248-$127F : ???? ** | |
393 ** $1280-$1A7F : the window tables (32 of $40 bytes each) ** | |
394 ** $1A80-$1C7F : the screen tables (16 of $20 bytes each) ** | |
395 ** $1C80-$2000 : the CC3 global mem stack (for windowing) ** | |
396 ** ** | |
397 ****************************************************************************** | |
398 ****************************************************************************** | |
399 | |
400 * User settable values for CC3IO/TC9IO/GrfInt/WindInt & GrfDrv | |
401 MaxLines equ 25 Max. Y coord text value | |
402 Meg set false "true" if 1 or 2 meg machine | |
403 | |
404 COMP equ 0 composite monitor | |
405 RGB equ 1 RGB Analog monitor | |
406 MONO equ 2 monochrome monitor | |
407 | |
408 Monitor set RGB | |
409 | |
410 * Global definitions | |
411 KeyMse equ %00000001 keyboard mouse enabled | |
412 NumLck equ %00000010 Numlock enabled (TC-9 use only) | |
413 CapsLck equ %00000100 Capslock enabled | |
414 MaxRows equ 640 maximum X co-ordinate allowed on mouse | |
415 ifeq MaxLines-25 | |
416 MaxLine equ 198 maximum Y co-ordinate allowed on mouse | |
417 else | |
418 MaxLine equ 191 maximum Y co-ordinate allowed on mouse | |
419 endc | |
420 | |
421 ***************************************************************************** | |
422 * Static memory area for each window (CC3IO/TC9IO) | |
423 * Should set up a write buffer (using parm area?) between SCF, CC3IO & Grfdrv | |
424 * so we can 'burst mode' text output (copy up to 48 chars to Grfdrv's parm | |
425 * area, and have grfdrv loop through & write all 48 chars to screen in 1 loop | |
426 * May have to have smaller limit for text to gfx screens, as it will run much | |
427 * slower, unless GrfDrv is made Partially/Fully Re-Entrant | |
428 * | |
429 * STRONG CAUTION: scfdefs MUST be included first before this file if | |
430 * V.SCF is to be resolved properly in pass 1!! | |
431 org V.SCF | |
432 | |
433 WinType rmb 1 window type (0=Windint/GrfInt,2=VDGInt) $1D | |
434 InfVld rmb 1 Rest of info here valid? (0=NO, >0 = YES) $1E | |
435 DevPar rmb 2 high bit=window device $1F | |
436 ULCase rmb 1 special key flags (Capslck & keyboard mouse) $21 | |
437 KySnsFlg rmb 1 flag for key sense setstat $22 | |
438 ScrChg rmb 1 screen change flag $23 | |
439 SS.SigID rmb 1 data ready process ID $24 | |
440 SS.SigSg rmb 1 data ready signal code $25 | |
441 MS.SigID rmb 1 mouse signal process ID $26 | |
442 MS.SigSg rmb 1 mouse signal signal code $27 | |
443 MS.Smpl rmb 1 mouse sample rate $28 | |
444 MS.Time rmb 1 mouse timeout value $29 | |
445 MS.Side rmb 1 MSB of mouse auto-follow flag $2A | |
446 PrtSide rmb 1 auto follow mouse flag $2B | |
447 ParmCnt rmb 1 parameter count $2C | |
448 ParmVct rmb 2 parameter vector $2D | |
449 PrmStrt rmb 2 pointer to params start $2F | |
450 NxtPrm rmb 2 pointer to next param storage $31 | |
451 EndPtr rmb 1 last character read offset $33 | |
452 InpPtr rmb 1 next character read offset $34 | |
453 WinNum rmb 1 window table entry # $35 | |
454 DWNum rmb 1 dwnum from descriptor $36 | |
455 CallCde rmb 1 internal comod call code # $37 | |
456 CC3Parm rmb 128-. global parameter area | |
457 ReadBuf rmb 256-. read input buffer (keyboard) | |
458 CC3DSiz equ . | |
459 | |
460 ***************************************************************************** | |
461 * GrfInt/WindInt global memory area | |
462 * This area sits in system block 0 from $1000 to $10ff | |
463 WGlobal equ $1000 useful value (points to address starting below) | |
464 org 0 | |
465 G.CurTik rmb 1 Constant - # Clock ticks/cursor updates (2) | |
466 G.CntTik rmb 1 Current tick count for cursor updates | |
467 G.GfBusy rmb 1 Grfdrv is busy flag (1=busy) | |
468 g0003 rmb 2 NEW: UNUSED | |
469 g0005 rmb 2 ??? | |
470 G.GrfStk rmb 2 grfdrv stack pointer ($07) | |
471 G.MonTyp rmb 1 monitor type | |
472 g000A equ . Old label for compatibility | |
473 G.CrDvFl rmb 1 Are we current device flag (only set when all | |
474 * Parms have been moved to Dev Mem) | |
475 * 0=We are not on our device | |
476 * 1=We are the current device | |
477 * (Used by comod (GRF/WIND/VDGInt) to determine | |
478 * whether or not to update GIME regs themselves | |
479 * If not current device, they don't.) | |
480 g000B rmb 1 current device's V.TYPE | |
481 G.CurDvM rmb 2 current device memory pointer for co-module use | |
482 G.WIBusy rmb 1 WindInt is busy flag (1=busy) | |
483 G.AlPckt rmb 6 F$Alarm time packet | |
484 G.AlPID rmb 1 F$Alarm proc ID ($15) | |
485 G.AlSig rmb 1 F$Alarm signal code ($16) | |
486 G.BelVec rmb 2 BELL routine vector | |
487 G.DefPal rmb 2 pointer to default palette data in global mem | |
488 G.TnCnt rmb 1 SS.Tone duration counter | |
489 G.BelTnF rmb 1 BELL tone flag | |
490 g001D rmb 3 | |
491 G.CurDev rmb 2 current device's static memory pointer ($20) | |
492 G.PrWMPt rmb 2 previous window static mem pointer $(22) | |
493 G.BCFFlg rmb 1 bit coded co-module found flags ($24) | |
494 * 00000010 : VDGInt found | |
495 * 10000000 : GrfDrv found | |
496 g0025 rmb 1 | |
497 G.KTblLC rmb 1 Key table entry# last checked (1-3) | |
498 * ifeq TC9-true | |
499 *CurLght rmb 1 current keyboard light settings | |
500 * else | |
501 G.LastCh rmb 1 last keyboard character (ASCII value) | |
502 * endc | |
503 G.LKeyCd rmb 1 last keyboard code | |
504 G.KyRept rmb 1 key repeat counter | |
505 * A secondary 3 key table (same format as g002D below) | |
359 | 506 G.2Key1 rmb 1 $2A |
507 G.2Key2 rmb 1 $2B | |
61 | 508 G.2Key3 rmb 1 |
509 * Up to 3 keys can be registerd at once, and they are stored here. If more | |
510 * than 3 are hit, the last key is overwritten with the very last key down that | |
511 * was checked. Format for all three is the same as the PIA column/row byte @ | |
512 * KeyFlag below. | |
513 G.Key1 rmb 1 Key 1 being held down (Row/Column #) | |
514 G.Key2 rmb 1 Key 2 being held down (Row/Column #) | |
515 G.Key3 rmb 1 Key 3 being held down (Row/Column #) | |
516 G.ShftDn rmb 1 SHIFT key down flag (COM'd) ($30) | |
517 G.CntlDn rmb 1 CTRL key down flag (0=NO) | |
518 G.KeyFlg rmb 1 Keyboard PIA bit #'s for columns/rows | |
519 * %00000111-Column # (Output, 0-7) | |
520 * %00111000-Row # (Input, 0-6) | |
521 G.AltDwn rmb 1 ALT key down flag (0=NO) | |
522 G.KySns rmb 1 key sense byte | |
523 G.KySame rmb 1 same key flag | |
524 G.CapLok rmb 1 CapsLock/SysRq key down flag | |
525 rmb 1 | |
526 g0038 rmb 1 grfdrv initialized flag | |
527 rmb 2 | |
528 G.MSmpRt rmb 1 Current mouse sample # (# ticks till next read) | |
529 G.Mouse rmb Pt.Siz mouse packet ($3C) | |
530 g005C rmb 2 Temp for relative mouse X coord calculation | |
531 g005E rmb 2 Temp for relative mouse Y coord calculation | |
532 G.MSmpRV rmb 1 Mouse sample reset value (# ticks till next read) | |
533 G.KyDly rmb 1 initial key repeat delay constant | |
534 G.KySpd rmb 1 secondary key repeat delay constant | |
535 * ifeq TC9-true | |
536 *KeyParm rmb 1 keyboard command parameter byte | |
537 * else | |
538 G.KyMse rmb 1 keyboard mouse flag | |
539 * endc | |
540 G.Clear rmb 1 "one-shot" CapsLock/SysRq key flag | |
541 G.KyButt rmb 1 keyboard F1 and F2 "fire" button info | |
542 G.AutoMs rmb 1 Auto-follow mouse flag for current device (0=NO) | |
543 G.MseMv rmb 1 mouse moved flag | |
544 G.CoTble rmb 6 co-module table | |
545 G.GrfEnt rmb 2 GRFDRV Entry address ($6E) | |
546 g0070 rmb 1 # bytes to move in 1 block (1-72) | |
547 G.WUseTb rmb 4 windows in use bit table (0=unused, 32 windows) ($71) | |
548 G.GfxTbl rmb 2 Pointer to GFX tables ($75) | |
549 G.WrkWTb rmb $40 Work window table. WindInt only ($77) | |
550 g00B7 rmb 2 Current Device static mem ptr for WindInt | |
551 g00B9 rmb 2 Current window table ptr for WindInt | |
552 g00BB rmb 2 Pointer to work window table (g0077+$10) | |
553 g00BD rmb 1 Current screen type for work window table | |
554 g00BE rmb 1 Topmost overlay window # when check for title bars | |
555 g00BF rmb 1 Flag for keypress while processing menu select | |
556 g00C0 rmb 2 Ptr to current path descriptor | |
557 G.WindBk rmb 2 shift-clear routine vector | |
558 G.MsInit rmb 2 set mouse routine vector | |
559 G.MsSig rmb 1 mouse signal flag | |
560 G.DefPls rmb 16 Default palettes (2 repeats of 8 is default) ($C7) | |
561 g00D7 rmb 41 | |
562 | |
563 ***************************************************************************** | |
564 * GrfDrv global memory data definitions | |
565 * This area sits in system block 0 from $1100 to $119E | |
566 GrfMem equ $1100 useful label used to point to mem starting below | |
567 org 0 | |
568 gr0000 rmb 1 Pixel mask for 1st byte of GP line | |
569 gr0001 rmb 1 Pixel mask for last byte of a GP line | |
570 gr0002 rmb 2 Ptr to table of bit masks for colors | |
571 gr0004 rmb 1 # of bytes wide GP buffer is (including partials) | |
572 gr0005 rmb 1 # pixels per byte in GP Buffer | |
573 gr0006 rmb 1 # of pixels used in 1st byte of GP buffer line | |
574 gr0007 rmb 1 # of pixels used in last byte of GP buffer line | |
575 gr0008 rmb 1 Bit mask that is common to both screen & GP buffer | |
576 gr0009 rmb 1 # bytes for width of overlay window | |
577 gr000A rmb 1 # bytes to offset to get to next line after | |
578 * overlay width has been copied | |
579 gr000B rmb 1 | |
580 gr000C rmb 2 Cursor address for proportional spacing? | |
581 gr000E rmb 1 | |
582 gr000F rmb 1 Left-based bit mask for proportional spacing? | |
583 gr0010 rmb 2 Vector for text to gfx screen (either prop. or normal) | |
584 gr0012 rmb 6 | |
585 gr0018 rmb 2 Working Center X coord for Circle/Ellipse | |
586 gr001A rmb 2 Working Center Y coord for Circle/Ellipse | |
587 gr001C rmb 2 Some variable for Circle/Ellipse (initially 0) | |
588 gr001E rmb 2 Working Y radius value for Circle/Ellipse | |
589 gr0020 rmb 2 Arc 'clip line' X01 | |
590 gr0022 rmb 2 Arc 'clip line' Y01 | |
591 gr0024 rmb 2 Arc 'clip line' X02 | |
592 gr0026 rmb 2 Arc 'clip line' Y02 | |
593 gr0028 rmb 1 full-byte background color to FFILL on mask | |
594 gr0029 rmb 1 pixels per byte: set up by FFILL | |
595 gr002A rmb 1 Flag for FFill: 1=no error, 0=Stack overflow error | |
596 gr002B rmb 1 current Y-direction to travel in FFILL | |
597 gr002C rmb 2 | |
598 gr002E rmb 2 current window table entry | |
599 gr0030 rmb 2 current screen table ptr | |
600 gr0032 rmb 1 Last block # we used for buffers | |
601 gr0033 rmb 2 Last offset we used for buffers | |
602 gr0035 rmb 1 group | |
603 gr0036 rmb 2 offset | |
604 gr0038 rmb 1 group returned (new) | |
605 gr0039 rmb 1 0=Text cursor inverted off, >0 is inverted on | |
606 gr003A rmb 1 0=Graphics cursor XOR'd off,>0 is XOR'd on scrn | |
607 gr003B rmb 2 end of vars ptr? | |
608 gr003D rmb 2 Last X coordinate Graphics cursor was ON at | |
609 gr003F rmb 2 Last Y coordinate Graphics cursor was ON at | |
610 gr0041 rmb 2 Screen address for start of current gfx cursor | |
611 gr0043 rmb 1 Pixel mask for start of gfx cursor | |
612 gr0044 rmb 1 Block # Graphics cursor is in | |
613 gr0045 rmb 2 Offset in block Graphics cursor is in | |
614 gr0047 rmb 2 'Working' X coordinate | |
615 gr0049 rmb 2 'Working' Y coordinate | |
616 gr004B rmb 2 current X | |
617 gr004D rmb 2 current Y | |
618 gr004F rmb 2 X Size (in bytes) | |
619 gr0051 rmb 2 Y Size (in bytes) | |
620 gr0053 rmb 2 Horizontal radius (circle/ellipse/arc) | |
621 gr0055 rmb 2 Vertical radius (circle/ellipse/arc) | |
622 gr0057 rmb 1 group | |
623 gr0058 rmb 1 buffer # | |
624 gr0059 rmb 1 save switch for overlay | |
625 gr005A rmb 1 PRN | |
626 gr005B rmb 2 X coordinate of Graphics cursor | |
627 gr005D rmb 2 Y coordinate of Graphics cursor | |
628 gr005F rmb 1 ATD: new video mode for 24/25/28-line windows | |
629 Gr.STYMk rmb 1 STY marker | |
630 gr0061 rmb 1 foreground RGB data | |
631 gr0062 rmb 1 background RGB data | |
632 gr0063 rmb 1 bytes/row (on current screen...not window) | |
633 gr0064 rmb 2 PSet vector | |
634 gr0066 rmb 2 pset offset | |
635 gr0068 rmb 2 LSet vector | |
636 gr006A rmb 2 max X co-ordinate | |
637 gr006C rmb 2 max Y co-ordinate | |
638 gr006E rmb 2 X pixel count | |
639 gr0070 rmb 2 Y pixel count | |
640 gr0072 rmb 2 Screen address of pixel we are doing | |
641 gr0074 rmb 1 Pixel mask for pixel we are doing | |
642 gr0075 rmb 2 ??? Pixel mask for last byte of GP buffer? | |
643 gr0077 rmb 2 Vector for right direction FFill | |
644 gr0079 rmb 1 bit mask for 1st pixel in byte for right dir. FFill | |
645 gr007A rmb 2 Vector for left direction FFill | |
646 gr007C rmb 1 bit mask for last pixel in byte for left dir. FFill | |
647 gr007D rmb 1 buffer block # | |
648 gr007E rmb 2 buffer offset # | |
649 gr0080 rmb 2 Buffer length (in bytes) | |
650 gr0082 rmb 3 3 byte extended screen address | |
651 gr0085 rmb 2 temp | |
652 gr0087 rmb 16 grfdrv (sysmap 1) DAT image | |
653 gr0097 rmb 1 temp | |
654 gr0098 rmb 1 temp | |
655 * In ARC, 97-98 is the width of the clip line in pixels (after scaling) | |
656 gr0099 rmb 2 temp | |
657 * In ARC, 99-9A is the height of the clip line in pixels (after scaling) | |
658 gr009B rmb 1 counter temp | |
659 gr009C rmb 1 | |
660 gr009D rmb 2 offset to buffer in block | |
661 gr009F rmb 1 | |
662 gr00A0 rmb 1 # lines left to do of GP buffer onto screen | |
663 gr00A1 rmb 2 vector routine for (changes lots) | |
664 * In ARC A1-A2 is the vector to the proper clipping routine | |
665 gr00A3 rmb 2 Vector for shifting GP buffers | |
666 gr00A5 rmb 2 Vector for shifting GP buffers (can dupe A1) | |
667 gr00A7 rmb 2 | |
668 gr00A9 rmb 2 NEW: Window tbl ptr for last window GRFDRV used | |
373
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
669 grBigFnt rmb 2 Flag for 224 char font/gfx mode on (0=No) V2.00a |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
670 gr00AD rmb 2 FFill:orig. start X coord|Circ/Ell saved start X |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
671 gr00AF rmb 2 FFill:orig. start Y coord|Circ/Ell saved end X |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
672 gr00B1 rmb 1 Flag in FFill: 1=1st time through, 0=not 1st time |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
673 gr00B2 rmb 1 Filled (circle,ellipse) flag 0=Not filled |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
674 gr00B3 rmb 256-. ??? UNUSED |
61 | 675 * GPLoad buffer - $1200 in system block 0 |
676 GPBuf rmb 72 common move buffer for gpload/get/put | |
677 gb0000 equ 72 Size of get/put buffer ($48) | |
678 | |
679 ***************************************************************************** | |
680 * Window table entry structure | |
681 * These tables sit in system block 0 and there is 1 for every window init'd | |
682 * including any overlay windows. | |
683 MaxWind equ 32 maximum allowable window tables | |
684 WinBase equ $1290 base address to start of window tables | |
685 org -$10 | |
686 Wt.STbl rmb 2 Screen table pointer ($FFFF=Not used) -$10 | |
687 Wt.BLnk rmb 1 overlay window parent entry # ($FF=base) -$0E | |
688 Wt.LStrt rmb 2 screen logical start address -$0D | |
689 Wt.CPX rmb 1 current X coord. start -$0B | |
690 Wt.CPY rmb 1 current Y coord. start -$0A | |
691 Wt.SZX rmb 1 current X size (CWArea) -$09 | |
692 Wt.SZY rmb 1 current Y size (CWArea) -$08 | |
693 Wt.SXFct rmb 1 X scaling factor -$07 | |
694 Wt.SYFct rmb 1 Y scaling factor (0=no scaling) -$06 | |
695 Wt.Cur rmb 2 cursor physical address on screen -$05 | |
696 Wt.FMsk rmb 1 font bit mask (based from left) -$03 | |
697 Wt.CurX rmb 2 X coord of cursor -$02 | |
698 Wt.CurY rmb 2 Y Coord of cursor $00 | |
699 Wt.XBCnt rmb 1 width of window (in bytes) $02 | |
700 Wt.CWTmp rmb 1 bytes wide each text chr (1,2,4) $03 | |
701 Wt.BRow rmb 2 bytes/text row (8x width in gfx) $04 | |
702 Wt.Fore rmb 1 foreground palette # $06 | |
703 Wt.Back rmb 1 background palette # $07 | |
704 Wt.Attr rmb 1 default attributes (FUTTTBBB) $08 | |
705 Wt.BSW rmb 1 character BSW switches $09 | |
706 Wt.LSet rmb 1 LSet type $0A | |
707 Wt.FBlk rmb 1 Font memory block # $0B | |
708 Wt.FOff rmb 2 Font offset in block $0C | |
709 Wt.PBlk rmb 1 PSet memory block # $0E | |
710 Wt.POff rmb 2 PSet offset in block $0F | |
711 Wt.OBlk rmb 1 Overlay memory block # $11 | |
712 Wt.OOff rmb 2 Overlay offset in block $12 | |
713 Wt.LVec rmb 2 LSet vector $14 | |
714 Wt.PVec rmb 2 PSet vector $16 | |
715 Wt.GBlk rmb 1 GCursor memory block # $18 | |
716 Wt.GOff rmb 2 GCursor offset in block $19 | |
717 Wt.MaxX rmb 2 Maximum X cord. (0-79,0-639) $1B | |
718 Wt.MaxY rmb 2 Maximum Y cord. (0-24,0-191) $1D | |
719 Wt.BLen rmb 2 bytes left in GPLoad block below $1F | |
720 Wt.NBlk rmb 1 memory block # for next GPLoad $21 | |
721 Wt.NOff rmb 2 Offset in block for next GPLoad $22 | |
722 Wt.LStDf rmb 2 screen logical start default $24 | |
723 * NOTE: The following default settings are what the window was initialized | |
724 * with, and thus are the MAXIMUM start/size the window can handle | |
725 * until it is restarted (DWEnd & DWSet) | |
726 * They also appear to be used in WindInt to determine the coords & | |
727 * sizes for control+content regions | |
728 Wt.DfCPX rmb 1 default X cord. start $26 | |
729 Wt.DfCPY rmb 1 default Y cord. start $27 | |
730 Wt.DfSZX rmb 1 default X size $28 | |
731 Wt.DfSZY rmb 1 default Y size $29 | |
732 Wt.Res rmb 6 unused $2A-$2F | |
733 Wt.Siz equ .+$10 | |
734 | |
735 ***************************************************************************** | |
736 * Screen table entrys | |
737 * These tables sit in system block 0 base=$1A80 | |
738 | |
739 STblMax equ 16 Maximum number of screen tables | |
740 STblBse equ $1A80 base address of screen tables | |
741 org 0 | |
742 St.Sty rmb 1 Screen type $00 | |
743 St.SBlk rmb 1 Ram block start # $01 | |
744 St.LStrt rmb 2 Screen logical start (for GIME) $02 | |
745 St.BRow rmb 1 Bytes per row $04 | |
746 St.Brdr rmb 1 Border palette register # $05 | |
747 St.Fore rmb 1 Foreground palette register # $06 | |
748 St.Back rmb 1 Background palette register # $07 | |
749 St.ScSiz rmb 1 screen size: 24..28 lines $08 | |
750 St.Res rmb 7 UNUSED??? $09 | |
751 * NOTE: SHOULD USE ONE OF THESE UNUSED BYTES TO KEEP THE # OF DEVICE WINDOW | |
752 * TABLES THAT ARE USING THIS SCREEN TABLE. DWSET & DWEND WOULD KEEP TRACK OF | |
753 * THESE, AND THE WINDINT TITLE BAR ROUTINE WOULD CHECK IT. IF IT IS ONLY 1, | |
754 * IT WON'T BOTHER CHANGING THE TITLE BAR WHEN SELECTING WINDOWS | |
755 St.Pals rmb 16 Palette register contents $10 | |
756 St.Siz equ . | |
757 | |
758 ***************************************************************************** | |
759 * Graphics buffer tables | |
760 * They contain a 20 byte header (shown below), followed by the raw pixel | |
761 * data. | |
762 org 0 | |
763 Grf.Bck rmb 1 back block link # $00 | |
764 Grf.Off rmb 2 back block header offset $01 | |
765 Grf.Grp rmb 1 group # $03 | |
766 Grf.Buff rmb 1 buffer # $04 | |
767 Grf.BSz rmb 2 buffer size (not including header) $05 | |
768 Grf.XSz rmb 2 X size (in pixels) $07 | |
769 Grf.YSz rmb 2 Y size (in pixels/bytes) $09 | |
770 Grf.XBSz rmb 1 X size in bytes $0B | |
771 Grf.LfPx rmb 1 # pixels used in first byte of line $0C | |
772 Grf.RtPx rmb 1 # pixels used in last byte of line $0D | |
773 Grf.STY rmb 1 Screen type buffer intended for $0E | |
774 Grf.NBlk rmb 1 number blocks used $0F | |
775 Grf.Pal rmb 16 Copy of palette registers? $10 | |
776 Grf.Siz equ . $20 | |
777 | |
778 ***************************************************************************** | |
779 * GFX tables (1 for each window, 18 ($12) bytes each) pointed to by | |
780 * $1075-$0176 | |
781 * GRFINT only uses gt0001-gt0004, the rest is exclusive to WINDINT | |
782 org 0 | |
783 Gt.WTyp rmb 1 WindInt window type (Framed, Scroll Bar, etc.) $00 | |
784 Gt.GXCur rmb 2 X coord of graphics cursor $01 | |
785 Gt.GYCur rmb 2 Y coord of graphics cursor $03 | |
786 Gt.DPtr rmb 2 Ptr to WindInt window descriptor $05 | |
787 Gt.FClr rmb 1 Foreground color $07 | |
788 Gt.BClr rmb 1 Background color $08 | |
789 Gt.FMsk rmb 1 Foreground mask $09 | |
790 Gt.BMsk rmb 1 Background mask $0A | |
791 Gt.GBlk rmb 1 Block # of graphics cursor $0B | |
792 Gt.GOff rmb 2 Offset into block of graphics cursor $0C | |
793 Gt.Proc rmb 1 Process # of window creator $0E | |
794 Gt.PBlk rmb 1 Process descriptor block # of creator $0F | |
795 Gt.Res rmb 2 ??? RESERVED ??? $10 | |
796 GTabSz equ . | |
797 | |
798 ***************************************************************************** | |
799 * This table is located in the graphics table memory and is offset from | |
800 * graphics table pointer stored at $1075-$1076. This is used exclusively by | |
801 * WindInt. | |
802 * NOTE: USING UNUSED BYTES IN CC3 GLOBAL MEM, SET UP SEPARATE PTRS FOR EACH | |
803 * OF THE BELOW SO WE CAN SPEED UP ACCESS BY NOT HAVING TO DO A LOAD/LEAx | |
804 * COMBINATION EVERY TIME | |
805 org $0240 | |
806 rmb WN.SIZ copy of last accessed window descriptor | |
807 rmb MN.SIZ copy of last accessed menu descriptor | |
808 rmb MI.SIZ copy of last accessed item descriptor | |
809 rmb 65 menu handling table (16 entrys of 4 bytes) | |
810 | |
811 ***************************************************************************** | |
812 * WindInt menu handling table entry definition | |
813 org 0 | |
814 MnuXNum rmb 1 menu # | |
815 MnuXStrt rmb 1 X start text co-ordinate | |
816 MnuXEnd rmb 1 X end text co-ordinate | |
817 rmb 1 unused? | |
818 MnuHSiz equ . | |
819 | |
820 ***************************************************************************** | |
821 * Character binary switches | |
822 TChr equ %10000000 transparent characters | |
823 Under equ %01000000 underline characters | |
824 Bold equ %00100000 bold characters | |
825 Prop equ %00010000 proportional spacing of characters | |
826 Scale equ %00001000 automatic window scaling | |
827 Invers equ %00000100 inverse characters | |
828 NoCurs equ %00000010 no cursor display | |
829 Protect equ %00000001 device window protection | |
830 | |
831 ***************************************************************************** | |
832 * Screen types (high bit set=hardware text, else graphics) in GRFDRV | |
833 Current equ $ff Current screen | |
834 * equ 1 640x200x2 | |
835 * equ 2 320x200x4 | |
836 * equ 3 640x200x4 | |
837 * equ 4 320x200x16 | |
838 * equ $85 80 column text | |
839 * equ $86 40 column text | |
840 | |
841 ************************************* | |
842 * Window default palette color codes | |
843 * | |
844 org 0 | |
845 White. rmb 1 | |
846 Blue. rmb 1 | |
847 Black. rmb 1 | |
848 Green. rmb 1 | |
849 Red. rmb 1 | |
850 Yellow. rmb 1 | |
851 Magenta. rmb 1 | |
852 Cyan. rmb 1 | |
853 | |
854 endc | |
855 | |
373
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
856 endc |
c07686556109
Added ifeq statements at top to allow for multiple use's of same def
boisy
parents:
359
diff
changeset
|
857 |