The MCGA Engine
Having largly discussed the history
and conceptual development behind both graphics
engines in other sections (see the development
history), I will largly confine this page to a
description of the engines capabilites and uses.
The engine is available for download as the MCGA
Toolkit, which contains the basic MCGA graphics
engine, GraphV1.Pas (and its compiled version,
GraphV1.tpu), and the imaging engine Images31.Pas
in a source and compiled state. These units are
in turn reliant upon the third party
EMS
and XMS memory engines,
full description of which can be found in the
tools section, notably the units entitled XMSLib
and EMS. To link the engine to your program,
simply invoke the graphics engine and the images
engine, if required, in your uses statement. The
engines are relatively compact, and your only
memory considerations should be those required
for the image buffers. The graphics engine can
be invoked with two simple procedure, and shut
down with one. Drawing onto the real display can
occur immediately, and the virtual screen can
be used once initialised. Images are loaded either
in .IMG format (see Canvas
II for more info) or extracted from
compressed libraries created by the image
compressor. The memory for the storage
of these images can be reserved using one command,
and the images given a simple handle in the form
of a number. This number is then used to invoke
the image for drawing on the real or virtual screen
or for use in several drawing effects. Information
concerning images loaded can be extracted directly
by examining the ImgPos registry, that stores
details of all images loaded. Palette routines
are dealt with entirely independent of imaging,
so the palette can be changed and manipulated
at will; palettes have their source in palette
files (.PAL) which can be created with
Canvas II. Included with the download is a simple
graphical demo showing the capabilites of the
engine, and full source for the demo and all units,
allowing an insight into how to being coding your
own MCGA graphics. A short tutorial is included
in the download, and the source code for the imaging
engine is fully anotated. Much of the MCGA engine
is written in pascal, with the exception of the
PCX reading routines, screen clearing and virtual
page flipping. The engine includes provision for
fast pixel read/write, drawing of simple geometical
shapes and retrace waiting, as well as fast page
flipping and screen clearance. Sadly, time constrains
me to this simple list of the engine's attributes,
but I hope you can make some sense of the engine
and produce the desired results. Any problems,
questions of observations, down't hesitate to
contact me (preferably through the communicate
section). Enjoy it, Jon
Download
the MCGA Toolkit (53 Kb, zipped) | Back
to Graphics Engines