home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Graphics
/
Graphics.zip
/
nhview0e.zip
/
SVGALIB.TXT
< prev
next >
Wrap
Text File
|
1995-04-14
|
3KB
|
89 lines
Graphics library version 1.0 08. March 1995
This is the first revision of a fullscreen graphics library for OS/2.
What can it do:
- Setting up a fullscreen session in the following videomodes:
0- 320x240 8 bit colours
1- 320x400 8 bit colours
2- 360x480 8 bit colours
3- 640x400 4 bit colours
4- 640x480 4 bit colours
5- 320x200 8 bit colours
6- 640x480 8 bit colours
7- 800x600 4 bit colours
8- 800x600 8 bit colours
9- 1024x768 4 bit colours
10- 1024x768 8 bit colours
11- 1280x1024 4 bit colours
12- 1280x1024 8 bit colours
13- 640x480 15 bit colours
14- 640x480 16 bit colours
15- 640x480 24 bit colours
16- 800x600 15 bit colours
17- 800x600 16 bit colours
18- 800x600 24 bit colours
19- 1024x768 15 bit colours
20- 1024x768 16 bit colours
- More can be added by simply editing the grp_mode.c file.
- Setting the video memory bank correctly for all these modes, this is done
through the SVGA driver that must be installed *CORRECTLY* for your SVGA graphics
card.
- For 8bit video modes there are sample funcions for putting pixels, drawing
lines and boxes, and for putting images to the screen.
- Functions for working with the palette for 8bit graphics cards.
Fadeout
Blackout
FadeTo
and more...
What it doesn't do:
- Switch between pages like in the infamous modeX.
This can be fixed, but it involves writing directly to the I/O ports of
the graphics card.
What this project involved:
- Getting basic I/O access to different ports on the graphics card.
Solved by setting the correct IOPL for the affected segment.
- Getting general bankswitching in SVGA modes to work.
Solved by using the SVGA base handler sevices with DosDeviceIOCtls.
- Getting access to the graphics memory using the Watcom 10.A compiler.
This was complicated by a bug in the generation of thunking code.
Solved by using DIVE (Direct Interface to Video Extensions).
what this library demands:
- OS/2 Warp version 2.x or newer.
- MMPM/2 and Warp must be installed if Watcom C/C++ 10 is to be used as a compiler.
- Watcom C/C++ 10.0 or IBM C-set++ 2.1 or newer.
That should be all.
I hope you will be satisfied with it.
Troubleshooting:
Q. It doesn't work?
A. 1- Install a SVGA driver or use the normal VGA reolutions.
2- Check that your svgadata.pmi file supports the resolution you want to
set. If not, reinstall the Displaydriver.
The Nighttime Hackers (C) 1995
Jonny Rein Eriksen