This informations shown here i have found threw looking into the GEM/3
screen driver sources and GDOS sources and looking into the binaries of the drivers.
So i take no responsiblity that the informations i show here are right.
In GEM 1.2 the screendrivers was named in the following method
IBMCHMP3
| |
| +-----Version number (P3)
+-----------Name of driver
In GEM 2.2 the started a simple system for the names of the drivers.
Extension
Driver type
SD
Screen Driver
PD
Printer Driver
MD
Metafile Driver
UD
Screen Driver (Viewmax)
CD
Camera Driver
ID
Scanner Driver
VD
Plotter Driver
Drivers which are not from DRI don't take care of this nameing convention. After SD there comes the name of the driver which is 3 chars long which is followed by a number that seems to be a version number
For example
SDPSC8.VGA
| | |
| | +-----Version number
| +--------Name of driver (3 chars long)
+----------Extension (SD for screen driver)
System
Version number
GEM 1.2
P3
GEM 2.2
7
GEM/3
8 and 9
GEM/4
10
GEM/5
11
Viewmax I
9
Viewmax II
9
The extension EGA,VGA or CGA which was used in GEM/3,GEM/4 seems to be used to
identify which fonts to load.The fonts which have the same extension as the driver
are used. The GEM/5 screen driver has .BS as extension. In GEM/5 there are also
fonts which have this extension. I am not sure if they are used.
The GEM/3 drivers with version number 9 are not the same as the Viewmax drivers.
Drivers with version number 10,11 have bezier support integrated.
In all drivers from GEM 1.2,GEM 2.2,GEM/3,GEM/4,GEM/5,Viewmax you find a patch area
db "zyxg" ; Patch string
db 0FFh ; 0FF = No Port
; 0 = Com1 (3F8h)
; 1 = Com2
db 2 ; 0 = None (Keyboard)
; 1 = Mouse systems
; 2 = Microsoft bus mouse (Mouse.com)
; 3 = Microsoft RS232 Mouse
; 4 = MM1201 SummaSketch Stylus
; 5 = MM1201 SummaSketch Cursor
; 6 = MM961 SummaSketch Stylus
; 7 = MM961 SummaSketch Cursor
; 8 = MM1812 SummaSketch Stylus
; 9 = MM1812 SummaSketch Cursor
; 10 = PS/2 Mouse
The following info strings exists only in drivers with a version number 8 and up
db ??? ; Short name of driver ( 13 Bytes )
db ??? ; Long description ( 81 Bytes )
The position of the patch area in in every driver at a other position to find
it it is the easiest way to search the file for the zyxg string.
The informations string you find in the source of the drivers in files called names.??? the
extension is always different and is when compiling renamed to .inc.
The patch area you find in the file zyxg.a86 which includes the file names.inc
when compiling.
Port 0FFh and Mousetype 2 are the defaults when compiling a screendriver.
Changing the resoultion of a screen driver
If you want to change the resoultion of a screen driver always remeber that
if you not want to make big changes (reprogramming big parts) the following things must be
made.
The size of the Bitmap can't be bigger than 65535 (64Kb) Max. Res:(800x600)
You can only use Monochrom or a maximum of 16 Colors
If you want to use a other mode you have to change the init routine.
Which you find in the main file. After this you have to set the new Sizes in the
Externs.a86 file. There you have to change the following lines
xresmx equ 639
yresmx equ 479
plane_size equ 38400
bytes_line equ 80
xresmx is the maximum x resolution - 1
yresmx is the maximum y resolution - 1
bytes per line is the maximum x resolution div 8 ( 640/8=80 )
plane_size is the size of a single graphics plane which you can calculate
with this formula.
Size=(MX/8)*MY
Size is the size of a plane
MX is the Maximum X resolution (example 640)
MY is the Maximum Y resolution (example 480)
For example: 38400=(640/8)*480
This table is only correct when using with the original GEM/3 screendriver sources.
Driver
Main File
Externs.a86
Names.Inc
VGA 16 Colors
VERTICMF.A86
EXTERNS.VRF
NAMES.VRF
VGA 2 Colors
VERTICOM.A86
EXTERNS.VRT
NAMES.VRT
ATT
DEVDEB.DEB
EXTERNS.DEB
NAMES.DEB
EGA HiRes 16 colors
IBMEGAHC.A86
EXTERNS.EHC
NAMES.EHC
EGA LoRes 16 colors
IBMEGALC.A86
EXTERNS.ELF
NAMES.ELF
EGA 2 colors
IBMEGAHM.A86
EXTERNS.EH1
NAMES.EH1
EGA Monochrom
EGAMONHI.A86
EXTERNS.EGA
NAMES.EGA
GENIUS
GENIUS.A86
EXTERNS.GEN
NAMES.GEN
HERCULES
HERCSPPC.A86
EXTERNS.HRC
NAMES.HRC
CGA
IBMBLMPC.A86
EXTERNS.IBM
NAMES.IBM
Advanced programming infos
The routine to calculate the memory adress of a X,Y position you find in the
main file it is called CONCAT.
In file IBMMDVSP.A86 you find the routine to clear the screen.
In file MONOBJ.C and MONOUT.C you find the C routines which call the ASM drawing
routines.(MONOBJ.C and MONOUT.C are used in every driver!)
Monodrivers use the drawing routines in the files
MONMMRE1.A86,MONMMRE2.A86,OPTDRAW.A86,OPTTXT1.A86,OPTTXT2.A86
Colordrivers use the drawing routines in the files
EGAMMRE1.A86,EGAMMRE2.A86,EOPTDRAW.A86,EOPTTXT1.A86,EOPTTXT2.A86
Mousedrivers inside the screen drivers
The mouse drivers you find in file IMOUSE.A86 which is when compiling the screendrivers
included into every driver.
The screendriver needs 3 functions for every mouse or sketch tablett.
Initialize mouse
Deinitialize mouse
Return mouse status/coordinates
There are three tables which are used to call for every mouse type the right routine
For initialize mouse
tab_init
For tabdeinitialie mouse
tab_deinit
For mouse status
tab_status
If you want to write a new Mouse driver you simple must add your functions in this tables
or overwrite one of the old ones. There seems to be no limitation to the number of drivers.
Bezier Curves
Function calls for Bezier Curves WORD v_bez_on(handle);
Turns Bezier curves On
Calls Function 11 (GDP) with ID=13 WORD v_bez_off(handle);
Turns Bezier curves Off
Calls Function 11 (GDP) with ID=13 WORD v_bez_qual(handle, prcnt);
Calls Function 5 Escape Code 99 subopcode 32 MLOCAL VOID v_bezier_all(opcode, handle, count, xyarr, bezarr, minmax, npts, nmove);
Is called from v_bez and v_bezfill
Calls function (opcode) with contl[5]=13 VOID v_bez(handle, count, xyarr, bezarr, minmax, npts, nmove);
Calls v_bezier_all with opcode 6 (v_pline) VOID v_bezfill(handle, count, xyarr, bezarr, minmax, npts, nmove);
Calls v_bezier_all with opcode 9 (v_fillarea)
Function 11 with ID=12 means non filled bezier
Function 11 with ID=11 (This call is not documented in the documentation i have)
is called from this function
VOID v_etext( handle, x, y, string, offsets)
Description strings inside of the screendrivers
You can read out this strings with the call
VOID v_get_driver_info(device_id, info_select, info_string)
info_select = 1 : get full driver filename
2 : get short device name
3 : get long device name
4 : get font path string
5 : get driver patch byte(s)
This call is existing in my GEM PTK 3.1 Turbo C bindings but is missing
in the version of Pacific C bindings i own.
In the Drivers with version 10 there are in the description strings spaces before
the text instead of this spaces i have made _ in this info.
Also the description strings inside the Viewmax I and II drivers are different
and sometimes wrong.
The Hercules driver UDHRC9.EGA from ViewMax II shows VGA 16 HIRES as description.