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