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