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