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