About me

Vladimir Nabokov

Books
Programming
Biochemistry
Aim | Communicate

Search
 


 
   
Letters from Terra - Life in water warmed by sunlight
 
 

     
 
 

     
The excessive power of the SVGA graphics engine is demostrated by the patterns visual demo, included with the SVGA toolkit. Click here to Download.
 
 
     

The SVGA Engine

In a similar manner to my description of the MCGA engine, I think I have discussed the development history and workings of the engine in considerable detail in the history section, so I will confine this page to a listing of the technical capabilities of the SVGA graphics engine. The engine is available as the SVGA Toolkit, which contains (in a similar manner to its MCGA counterpart) the basic engine unit, GrphUnit.Pas and GrphUnit.TPU, as well as the SVGA imaging unit Images.Pas and its compiled TPU file. These can be added to your programs by simply including them as used units. In turn, these units are dependent upon the third party EMS and XMS memory engines, that power the automatic access to EMS and XMS memory for image storage if requested. Itialisation of the engine is simply executed in two instructions, and drawing on the real and virtual screen is implemented through simple instruction, fully annotated in the graphical engine's source code. Images of the Canvas II .IMG format can be loaded either directly into buffers assigned by the images engine, or can be extracted individually from compiled images libraries created by the image compressor. These images are assigned a simple number as a handle, and can be invoked for the numerous display routines included in the engine using this number, allowing you to place an image on the SVGA display simply. The graphics engine included several simple geometrical routines, and is written entirely in pure 32-bit optimised assembly language, making it extremely fast; the line drawing procedure used to create the demo program Patterns has to include code to slow it down, otherwise the display is smothered before the patterns can be appreciated. The imaging routines included are similarly speedy, drawing several hundred large images a second when drawing onto the real screen, and allowing any full screen-drawing program sufficient power to create smooth animation even on a slowly-paced machine such as mine (all my programs run perfectly on my P133). Images can be stored throughout the XMS memory and invoked at similar speed to images in conventional or EMS memory, allowing almost infinite storage capacity for images. This is facilitated by an entriely integrated engine that, once the images have been specified for loading into the XMS or EMS, automatically deals with bank switching and obtaining the image when it is invoked by its handle number. Similarly, direct pixel access and geometrical routines to the several segments required by the SVGA display or the virtual screen is managed by the engine, allowing you to treat it as a multisegment 300000 byte storage system, with retrieval times as fast as direct memory access in pascal. Palette routines are handled independently, allowing seperate manipulation without constriction of image palette conversion. The screen clearing and page flipping routines are particularly well refined, to ensure maximum speed when animation must be employed. The download comes with full source, as well as an short tutorial on integrating the engine with your own programs, a simple fully anotated demo program, the more complex (and impressive) patterns demo program, and fully anotated source code for the graphics and images engine. The engine contains routines for PCX file loading, and a small compatible third party unit is also included to allow screen dumps to be made to PCX files for export. Any problems or queries, I would be delighted to be contacted. Enjoy it, Jon

Download the SVGA Toolkit (80 Kb, zipped) | Back to Graphics Engines

 
 
Letters from Terra | Updated 15th December 2004 | By Jonathan Ayling