- CHAPTER 8 -
The Line-A portion of the operating system is so named
because it uses a special exception vector of 680x0 processors
triggered when the first nibble of the a command word is $A. On
Atari systems this vector is routed to the operating system ROMs
and provides a low-level yet high-speed graphics interface.
The Line-A system is included in this document for completeness
only. It is recommended that its use be avoided and that the counterpart
VDI calls be used instead. Atari has not guaranteed that
it will maintain Line-A compatibility in future systems.
Its functionality has already been limited as video capabilities
have advanced beyond its design.
The Line-A opcode $A000 will return a pointer to an internal
variable table in D0 and A0. This table is used by the Line-A
functions as a parameter passing mechanism as opposed to using
the stack or internal registers.
Members of the Line-A variable table are accessed via offsets
from the base address. The function, location, and size of documented
variables are as follows:
LINE-A
Overview
The Line-A Variable Table
Name |
|
| Contents |
---|---|---|---|
RESERVED |
|
| Reserved for future use. |
CUR_FONT |
|
| Pointer to the current font header. |
RESERVED |
|
| Reserved for future use. |
M_POS_HX |
|
| X Offset into the mouse form of the 'hot spot'. |
M_POS_HY |
|
| Y Offset into the mouse form of the 'hot spot'. |
M_PLANES |
|
| Writing mode for the mouse pointer (1 = VDI Mode, -1 = XOR Mode). Defaults to VDI mode. |
M_CDB_BG |
|
| Mouse pointer background color. |
M_CDB_FG |
|
| Mouse pointer foreground color. |
MASK_FORM |
|
| Image and Mask for the mouse pointer. Data is stored in the following format: Line 0 Mask
Line 0 Image Line 1 Mask Line 1 Image etc. |
INQ_TAB |
|
| This area contains 45 WORDs of information returned from a vq_extnd() of the physical screen workstation plus one extra reserved WORD. |
DEV_TAB |
|
| This area contains the first 45 WORDs of information returned from a v_opnwk() of the physical screen workstation plus one extra reserved WORD. |
GCURX |
|
| Current mouse pointer X position. |
GCURY |
|
| Current mouse pointer Y position. |
M_HID_CT |
|
| Current mouse 'hide' count (number of times mouse has been hidden, 0 = visible). |
MOUSE_BT |
|
| Bitmap of the current mouse button status. |
REQ_COL |
|
| Contains 48 WORDs of RGB data for the first 16 VDI color registers as would be returned by vq_color(). |
SIZ_TAB |
|
| This table contains the final 12 WORDs of information returned from a v_opnwk() of the physical screen workstation plus 3 reserved WORDs. |
RESERVED |
|
| Reserved for future use. |
RESERVED |
|
| Reserved for future use. |
CUR_WORK |
|
| Pointer to the current VDI workstation attribute table. |
DEF_FONT |
|
| Pointer to the default font header. |
FONT_RING |
|
| This area contains three pointers and a NULL. The first two pointers point to linked lists of system font headers. The third pointer points to the linked list of GDOS based fonts. |
FONT_COUNT |
|
| Total number of fonts pointed to by the FONT_RING pointers. |
RESERVED |
|
| Reserved for future use. |
CUR_MS_STAT |
|
| Bitmap of mouse status since the last interrupt as follows: Bit Meaning
0 Left mouse status (0=up) 1 Right mouse status (0=up) 2 Reserved 3 Reserved 4 Reserved 5 Mouse move flag (1=moved) 6 Right mouse status flag (0=hasn't changed) 7 Left mouse status flag (0=hasn't changed) |
RESERVED |
|
| Reserved for future use. |
V_HID_CNT |
|
| Number of times the text cursor has been hidden (0 = visible). |
CUR_X |
|
| X position where mouse pointer will be drawn. |
CUR_Y |
|
| Y position where mouse pointer will be drawn. |
CUR_FLAG |
|
| Mouse redraw flag (if non-zero, mouse pointer will be redrawn at the next vertical blank interrupt). |
MOUSE_FLAG |
|
| Mouse interrupt flag (0=disable interrupts) |
RESERVED |
|
| Reserved for future use. |
V_SAV_XY |
|
| X and Y position of the text cursor as saved by the VT-52 emulator. |
SAVE_LEN |
|
| Height of the form saved in SAVE_AREA in pixels. |
SAVE_ADDR |
|
| Address of the first WORD of screen data contained in SAVE_AREA. |
SAVE_STAT |
|
| Save status flag as follows: Bit Meaning
0 Save buffer valid? (0=no) 1 Width of save (0=16 bits, 1=32 bits) |
SAVE_AREA |
|
| Save buffer for the mouse pointer, |
USER_TIM |
|
| Pointer to a routine which occurs at each timer tick. (use vex_timv() instead). Routine ends by jumping to function pointed to by NEXT_TIM. |
NEXT_TIM |
|
| See above. |
USER_BUT |
|
| Pointer to a routine called each time a mouse button is pressed (use vex_butv() instead). |
USER_CUR |
|
| Pointer to a routine called each time the mouse needs to be rendered (use vex_curv() instead). |
USER_MOT |
|
| Pointer to routine called each time the mouse is moved (use vex_motv() instead). |
V_CEL_HT |
|
| Current text cell height. |
V_CEL_MX |
|
| Number of text columns - 1. |
V_CEL_MY |
|
| Number of text rows - 1. |
V_CEL_WR |
|
| Number of bytes between character cells. |
V_COL_BG |
|
| Text background color. |
V_COL_FG |
|
| Text foreground color. |
V_CUR_AD |
|
| Text cursor physical address. |
V_CUR_OF |
|
| Offset (in bytes) from physical screen address to the top of the first text character. |
V_CUR_XY |
|
| X and Y character position of the text cursor. |
V_PERIOD |
|
| Current cursor blink rate. |
V_CUR_CT |
|
| Countdown timer to next blink. |
V_FNT_AD |
|
| Pointer to system font data (monospaced). |
V_FNT_ND |
|
| Last ASCII character in font. |
V_FNT_ST |
|
| First ASCII character in font. |
V_FNT_WD |
|
| Width of the system font form in bytes. |
V_REZ_HZ |
|
| Horizontal pixel resolution. |
V_OFF_AD |
|
| Pointer to font offset table. |
RESERVED |
|
| Reserved for future use. |
V_REZ_VT |
|
| Vertical pixel resolution. |
BYTES_LIN |
|
| Bytes per screen line. |
PLANES |
|
| Number of planes in the current resolution. |
WIDTH |
|
| Width of the destination form in bytes. |
CONTRL |
|
| Pointer to the CONTRL array. |
INTIN |
|
| Pointer to the INTIN array. |
PTSIN |
|
| Pointer to the PTSIN array. |
INTOUT |
|
| Pointer to the INTOUT array. |
PTSOUT |
|
| Pointer to the PTSOUT array. |
COLBIT0 |
|
| Color bit value used for plane 0. |
COLBIT1 |
|
| Color bit value used for plane 1. |
COLBIT2 |
|
| Color bit value used for plane 2. |
COLBIT3 |
|
| Color bit value used for plane 3. |
LSTLIN |
|
| Last pixel draw flag (0=draw, 1=don't draw). Used to prevent the last pixel in a polyline segment drawn in XOR mode from overwriting the first pixel in the next line. |
LNMASK |
|
| Line draw pattern mask. |
WMODE |
|
| VDI writing mode. |
X1 |
|
| X coordinate for point 1. |
Y1 |
|
| Y coordinate for point 1. |
X2 |
|
| X coordinate for point 2. |
Y2 |
|
| Y coordinate for point 2. |
PATPTR |
|
| Fill-pattern pointer. |
PATMSK |
|
| This value is AND'ed with the value in Y1 to give an index into the current fill pattern for the current line. |
MFILL |
|
| Multiplane fill pattern flag (0=Mono). |
CLIP |
|
| Clipping flag (0=disabled). |
XINCL |
|
| Left edge of clipping rectangle. |
XMAXCL |
|
| Right edge of clipping rectangle. |
YMINCL |
|
| Top edge of clipping rectangle. |
YMAXCL |
|
| Bottom edge of clipping rectangle. |
XDDA |
|
| Text scaling accumulator (set to $8000 prior to blitting text). |
DDAINC |
|
| Scaling increment. If SIZE1 is the actual point size and SIZE2 is the desired point size then to scale up use:To scale down use: |
SCALDIR |
|
| Text scaling direction (0=down, 1=up). |
MONO |
|
| Monospaced font flag. |
SOURCEX |
|
| X coordinate of character in font form. |
SOURCEY |
|
| Y coordinate of character in font form. |
DESTX |
|
| X position on screen to output character at. |
DESTY |
|
| Y position on screen to output character at. |
DELX |
|
| Width of the character to output. |
DELY |
|
| Height of the character to output. |
FBASE |
|
| Pointer to the font character image block. |
FWIDTH |
|
| Width of the font form in bytes. |
STYLE |
|
| Special effects flag bitmap as follows: Bit Meaning
0 Thickening 1 Lightening 2 Skewing 3 Underlining (not supported by Line-A) 4 Outlining |
LITEMASK |
|
| Mask to lighten text (usually $5555). |
SKEWMASK |
|
| Mask to skew text (usually $5555). |
WEIGHT |
|
| Width to thicken characters by. |
ROFF |
|
| Offset above baseline used for italicizing. |
LOFF |
|
| Offset below baseline used for italicizing. |
SCALE |
|
| Text scaling flag (0=no scale). |
CHUP |
|
| Character rotation angle in tenths of degrees (supported only in 90 degree increments). |
TEXTFG |
|
| Text foreground color. |
SCRTCHP |
|
| Pointer to two contiguous scratch buffers used in creating text special effects. |
SCRPT2 |
|
| Offset from first buffer to second (in bytes). |
TEXTBG |
|
| Text background color. |
COPYTRAN |
|
| Copy raster mode (0=Opaque, 1=Transparent). |
SEEDABORT |
|
| Pointer to a routine called by the seedfill routine at each line. If not needed during a seed fill you should point it to a routine like the following:
seedabort: sub.l d0,d0 rts |
Raster system and GDOS fonts are linked to form a list of font headers which contain the information needed to render text. Outline text generated by FSM is inaccessible in this manner.
Each monospaced font contains a font header, character and horizonatal offset table, and font form. All data types are in "Little Endian" (Intel format) and as such must be byte-swapped before use.
The font form is a raster form with each character laid side-by-side on the horizontal plane. The first character is WORD aligned but padding within the form only occurs at the end of a scanline to force the next scanline to be WORD aligned.
Each font header contains a pointer to the next font in the list. The list is terminated by a NULL pointer. The font header format is as follows:
Name |
| Type | Contents |
---|---|---|---|
font_id |
| WORD | Font ID number (must be unique). |
point |
| WORD | Point size of font. |
name |
| 32 BYTEs | ASCII Name of font. |
first_ade |
| UWORD | First ASCII character in font. |
last_ade |
| UWORD | Last ASCII character in font. |
top |
| UWORD | Distance from the top line of the font to the baseline. |
ascent |
| UWORD | Distance from the ascent line of the font to the baseline. |
half |
| UWORD | Distance from the half line of the font to the baseline. |
descent |
| UWORD | Distance from the descent line of the font to the baseline. |
bottom |
| UWORD | Distance from the bottom line of the font to the baseline. |
max_char_width |
| UWORD | Width of the widest character in the font. |
max_cell_width |
| UWORD | Width of the widest character cell in the font. |
left_offset |
| UWORD | Amount character slants left when skewed. |
right_offset |
| UWORD | Amount character slants right when skewed. |
thicken |
| UWORD | Number of pixels to smear for thickening. |
ul_size |
| UWORD | Size of an appropriate underline for the font. |
lighten |
| UWORD | Mask for character lightening. |
skew |
| UWORD | Mask for character skewing. |
flags |
| UWORD | Font type flags. |
hor_table |
| LONG | Pointer to the horizontal offset table. The horizontal offset table is an array of bytes with one entry per character denoting the pixel offset to the character. |
off_table |
| LONG | Pointer to the character offset table. The character offset table is an array of WORDs with one entry per character denoting the byte offset into the font form of the character. |
dat_table |
| LONG | Pointer to the character data. |
form_width |
| UWORD | Width of the font form in bytes. |
form_height |
| UWORD | Height of the font form in pixels. |
next_font |
| LONG | Pointer to the next font in the list (0=no more fonts). |
reserved |
| UWORD | Reserved for future use. |
Line-A functions are called by simply inserting the opcode
into the instruction stream. For example, the 'Hide Mouse' function
is called with the following assembly language instruction:
Generally, the Line-A initialization function is called
($A000) and the address of the variable and/or font header tables
are stored. Prior to each Line-A call variables are set
as explained in the Line-A Function Reference and
the function is then called. There is no method of error reporting
available.