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