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