Category : Assembly Language Source Code
Archive   : VGAKIT60.ZIP
Filename : VGAKIT.DOC

 
Output of file : VGAKIT.DOC contained in archive : VGAKIT60.ZIP
VGAKIT Version 6.0

Here is my latest SVGA/VGA info pack. I've included the .OBJ versions in case
anyone who does not have an assembler wants to play with these routines.

5.0 Changes:

Support for VESA defined line widths, and correct support for bank sizes other
than 64k. Old versions of VGAKIT would adjust all bank boundries to 64k by
shifting up the bank numbers on cards that have 4k or 16k banks. To correct
this I've changed the code to use an address table for screen offsets and
bank numbers, this is very close to what I do in my own graphics code. To
simplify things I've made the address table a fixed array that supports up
to 1024 scanlines. In a real program I would probably allocate this array
at runtime using malloc or some similar memory allocation function.

5.2 Changes:

New VESA memory detect
VESA 1.2 support
Memory detect for Tseng3000
DAC Type call added
More accurate Tseng4000 detect

5.2b Changes:

DAC detect call for Tseng4000 boards would hang many other boards

now it is only made on Tseng4000 boards

MKADRTBL function would not handle bank sizes less than 64k correctly

VESASET function would not get the bank size correctly (it was using Winsize
instead of WinGranularity


5.3 Changes:

New utility called INFO added which displays all the information figured
out by the detect code in BANKS.ASM. MKINFO.BAT compiles and links INFO.

A couple variables added to BANKS to avoid compatability problems, they
are "justvesa" which forces the detect code to only check for vesa vbe
support, and nosvga which disables all svga detect.


5.4 Changes:

I removed use of @@ local label in SVGAMODE.ASM, this is not supported
by some assemblers, and there was no real reason to use it over a
dummy label.


6.0 Changes:

Fixed a bug in Oak detect, added some flags to disable VESA detect

Mode set code for 320x200, 800x600 and 1024x768 256 color modes
are now thrown in. The common code is put into modeset.asm.

New example program called GRAV, started as a small screen saver project
but the deal fell through, so I'm throwing it in as a cute example.



John Bridges 1/1/1994

Compuserve ID: John Bridges [GRASP] 75300,2137
Internet: [email protected] (John Bridges)

I can be found regularly in the GRAPHVEN forum on Compuserve (where GRASP is
supported), as well as the GRAPHSUP forum (formally called PICS).

-------------------------------------------------------------------------------


The included modules are:

GRAV.C Neat little display program which does an approximation of
serveral objects affecting each other. The first pass is
to determine machine speed (about 3 seconds long).

VGAKIT.MAK make file for compiling/assembling/linking all of VGAKIT.

EXAMPLE.C is a silly C program which shows that this code works,
it just plots a nice calculated pattern using the
point functions.


MKEXAMP.BAT batch file to compile and link EXAMPLE.C into EXAMPLE.EXE
for Microsoft C 6.0 and MASM 6.1

STICKS.C is another silly C program which shows that this code works,
it uses the line function to draw a LOT of lines to make a
very nice complex weave type pattern. Amazing how complex the
image gets from such a trivial program.


MKSTICKS.BAT batch file to compile and link STICKS.C into STICKS.EXE
for Microsoft C 6.0 and MASM 6.1


INFO.C displays all the information figured out by the svga detect
code in whichvga() (which is in BANKS.ASM).


MKINFO.BAT batch file to compile and link INFO.C into INFO.EXE
for Microsoft C 6.0 and MASM 6.1


BANKS.ASM SVGA bank switch code, used to address the beyond 64k
addressing sceams of the various SVGA chipsets. Also
includes a global variable "curbk" which is the current
hardware bank number which can be checked before each
bank switch to prevent the extra overhead of switching
into a currently selected bank. An example of this is
in the point routine in POINT.ASM which only switches
memory banks when required.
BANKS.ASM includes the global variables ativga,tseng, tseng4
trident,video7,everex,paradise,chipstech, aheada, aheadb,
oaktech and vgamem. These variables are set by the WHICHVGA()
function which must be called at program startup time to
determine which SVGA (if any) you have installed. This
function returns a 1 (true) if you have a SVGA card installed.


MODE13X.ASM Is the function to setup the non-standard (ie: not supported
by the BIOS) 360x480x256 mode, this mode works on virtually
VGA that is fully IBM compatable. It's a great mode for
those without SVGA capabilities.

SVGA640.ASM Is a limited function which sets up 640x480x256 color
mode on a SVGA, it uses the global chipset flags to
determine the BIOS mode number.

SVGA800.ASM Same as SVGA640 except it sets 800x600x256 color mode.

SVGA1024.ASM Same as SVGA640 except it sets 1024x768x256 color mode.

SVGA320.ASM Same as SVGA640 except it sets 320x200x256 color mode.

POINT.ASM Is a pair of simple point plotting functions,

point(xpos,ypos,color)

which plots a point at x,y coorinates xpos,ypos in SVGA
modes calling newbank() in BANKS.ASM to switch memory
banks when necessary.

point13x(xpos,ypos,color)

which plots a point at x,y coorinates xpos,ypos in 360x480
mode. Both point functions will clip at screen boundries
correctly.


XPOINT.ASM Is just like POINT.ASM except that it's point functions draw
the points XOR'd to the screen.

xpoint(xpos,ypos,color)
xpoint13x(xpos,ypos,color)


RDPOINT.ASM Is just like POINT.ASM except that instead of plotting points
it reads the color of screen pixel.

color=rdpoint(xpos,ypos)
color=rdpoint13x(xpos,ypos)

LINE.ASM Is a line plotting function callable from C, you pass it the
coordinates for the two end points of the line, the color to
draw the line in and the function to call to plot each point.

bline(x1,y1,x2,y2,color,xpoint);


here is a list of VGA Chipset producers and their BIOS mode numbers:

=======================================================

ACUMOS
------
width height colors
----- ------ ------
0x59 800 600 2
0x58 800 600 16
0x5e 640 400 256
0x5f 640 480 256
0x5c 800 600 256
0x5d 1024 768 16

AX=MODE

=======================================================

AHEAD
-----
width height colors
----- ------ ------
0x6A 800 600 16
0x71 800 600 16
0x74 1024 768 16
0x60 640 400 256
0x61 640 480 256
0x62 800 600 256
0x63 1024 768 256

AX=MODE

=======================================================

ATI
---
width height colors
----- ------ ------
0x54 800 600 16
0x65 1024 768 16
0x61 640 400 256
0x62 640 480 256
0x63 800 600 256
0x64 1024 768 256

AX=MODE

=======================================================

CHIPS & TECH
------------
width height colors
----- ------ ------
0x70 800 600 16
0x72 1024 768 16
0x78 640 400 256
0x79 640 480 256
0x7b 800 600 256

AX=MODE

=======================================================

COMPAQ
------
width height colors
----- ------ ------
0x2e 640 480 256
0x38 1024 768 256

=======================================================

EVEREX
------
width height colors
----- ------ ------
0x01 752 410 16
0x02 800 600 16
0x11 1280 350 4
0x12 1280 600 4
0x13 640 350 256
0x14 640 400 256
0x15 512 480 256
0x20 1024 768 16
0x30 640 480 256
0x31 800 600 256
0x32 1024 768 256

AX=0x70 BL=MODE

=======================================================

GENOA GVGA
----------
width height colors
----- ------ ------
0x7c 512 512 16
0x59 720 512 16
0x79 or 0x6a 800 600 16
0x7d 512 512 256
0x5b 640 350 256
0x7e 640 400 256
0x5c 640 480 256
0x5d 720 512 256
0x5e or 0x6c 800 600 256
0x7f 1024 768 4
0x5f 1024 768 16

AX=MODE

=======================================================

NCR
---
width height colors
----- ------ ------
0x59 800 600 2
0x58 800 600 16
0x5e 640 400 256
0x5f 640 480 256
0x5c 800 600 256
0x5a 1024 768 2
0x5d 1024 768 16
0x62 1024 768 256

AX=MODE

=======================================================

OAK TECH
--------
width height colors
----- ------ ------
0x52 800 600 16
0x53 640 480 256
0x54 800 600 256
0x56 1024 768 16
0x59 1024 768 256
0x58 1280 1024 16

AX=MODE

=======================================================

PARADISE
--------
width height colors
----- ------ ------
0x59 800 600 2
0x58 800 600 16
0x5e 640 400 256
0x5f 640 480 256
0x5d 1024 768 16
0x5c 800 600 256

AX=MODE

=======================================================

TRIDENT
-------
width height colors
----- ------ ------
0x5b 800 600 16
0x5f 1024 768 16
0x5c 640 400 256
0x5d 640 480 256
0x5e 800 600 256

AX=MODE

=======================================================

TRIDENT 8900
------------
width height colors
----- ------ ------
0x5b 800 600 16
0x5c 640 400 256
0x5d 640 480 256
0x5e 800 600 256
0x60 1024 768 4
0x5f 1024 768 16
0x62 1024 768 256

AX=MODE

=======================================================

TSENG (Genoa, Orchid, Willow)
-----
width height colors
----- ------ ------
0x29 800 600 16
0x37 1024 768 16
0x2d 640 350 256
0x2e 640 480 256
0x2f 720 512 256
0x30 800 600 256

AX=MODE

=======================================================

TSENG 4000
----------
width height colors
----- ------ ------
0x29 800 600 16
0x37 1024 768 16
0x2d 640 350 256
0x2f 640 400 256
0x2e 640 480 256
0x30 800 600 256
0x38 1024 768 256

AX=MODE

=======================================================

VIDEO7
------
width height colors
----- ------ ------
0x60 752 410 16
0x61 720 540 16
0x62 800 600 16
0x63 1024 768 2
0x64 1024 768 4
0x65 1024 768 16
0x66 640 400 256
0x67 640 480 256
0x68 720 540 256
0x69 800 600 256
0x6A 1024 768 256

AX=0x6f05 BL=MODE

=======================================================







  3 Responses to “Category : Assembly Language Source Code
Archive   : VGAKIT60.ZIP
Filename : VGAKIT.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/