•  Back 
  •  VDI 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                            Device Drivers


Printer and Plotter Drivers

Printer drivers are the most common form of GDOS driver available, though
some plotter drivers do exist. The VDI Function Reference can be used to
determine if a particular function call is required to be available on
a particular device. This does not, however, prohibit the addition of
supplementary functions.

Some special printer driver features are available with drivers designed
to support them as follows:

Dot-Matrix Printers

Dot-matrix printers with wide carriages can have their print region
expanded by passing a custom X and Y resolution for the driver in ptsin[0]
and ptsin[1] respectively prior to the v_opnwk() call. In addition,
contrl[1] should be set to 1 to indicate the presence of the parameters.

SLM804

After a v_opnwk() call to an SLM804 driver contrl[0] will contain the MSB
and contrl[1] will contain the LSB of the allocated printer buffer
address.

After a v_updwk() call, intout[0] will contain a printer status code as
follows:

          Name         Error Code       Meaning

          SLM_OK          0x00          No Error

          SLM_ERROR       0x02          General Printer Error

          SLM_NOTONER     0x03          Toner Empty

          SLM_NOPAPER     0x05          Paper Empty

All Printer Drivers

A user-defined printer buffer may be passed to the v_updwk() call by
specifying the address of the buffer in intin[0] and intin[1]. In
addition, contrl[3] must be set to 2 to indicate the new parameters and
contrl[1] must be set to 1 to instruct the VDI to not clear the buffer
first.

Camera and Tablet Drivers

As of this writing, no camera or tablet drivers existed for Atari GEM.
Several functions are reserved to support them which were developed under
PC-GEM, however, many remain undocumented. Where documentation was
available, those calls are included for completeness in the VDI Function
Reference.

The Metafile Driver

'META.SYS' drivers are specially designed drivers which create '.GEM'
disk files rather than produce output on a device. When a metafile device
is opened, the file 'GEMFILE.GEM' is created in the current GEMDOS path.
The function vm_filename() may be used to change the filename to which the
metafile is written to, however, the file 'GEMFILE.GEM' must be deleted by
the application.

When a metafile is opened, several defaults relating to the coordinate
space and pixel size are set. Each pixel is assigned a default width and
height of 85 microns (1 micron = 1/25400 inch). This equates to a default
resolution of 300dpi.

The device size is specified where Normalized Device Coordinates (NDC) =
Raster Coordinates (RC). The coordinate space of the metafile has ( 0, 0 )
in the lower-left corner and ( 32767, 32767 ) in the upper-right. This
coordinate system may be modified with vm_coords(). The size of the actual
object space being written to the metafile should also be specified with
vm_pagesize() so that an application may correctly clip the objects when
reading.

After changing coordinate space, values returned by vq_extnd() related to
pixel width, height and page size will not change. Also, font metrics
returned by functions such as vqt_fontinfo() and vqt_advance() will remain
based on the default metafile size information. In most cases, text metric
information should be embedded based on the workstation metrics of the
destination device (such as a screen or printer) anyway.

The metafile is closed when a v_clswk() call is issued. Other
applications which read metafiles will play back the file by issuing
commands in the same order as recorded by the driver. For more information
on the metafile format see Appendix C: Native File Formats.
The Memory Driver

'MEMORY.SYS' includes all of the standard VDI calls yet works only in
memory and is not designed to be output to a device. Normally, the memory
driver should be assigned in the user's 'ASSIGN.SYS' file as device number
61. Upon calling v_opnwk() to the memory driver, contrl[1] should be set
to 1 and ptsin[0] and ptsin[1] should contain the X and Y extent of the
memory area. Upon return from the call, contrl[0] and contrl[1] will
contain the high and low WORD respectively of the address of the memory
device raster. v_updwk() clears the raster.