BBS: Inland Empire Archive
Date: 07-02-92 (21:14) Number: 2162
From: MATT HART Refer#: NONE
To: ERIC FORD Recvd: NO
Subj: Bload, Bsave Conf: (2) Quik_Bas
EF> Hey, how do I do this for SVGA?
You just change this:
> MH> InRegs.AX = &H10
To the mode listed in your SVGA manual for hi-res modes.
On my SVGA with Oak Technologies BIOS, I can get
1024x768x256 by using:
InRegs.AX = &H59
EF> How many colors can I get?
How ever many your graphics card will support. There is also an interrupt
call to change the palette colors. The "Colors" are
actually "Palettes". A color is assigned to a palette. If
you want 256 palettes, you can trick QB into doing it for
InRegs.AX = &H59
CALL InterruptX ....
The PALETTE command works because BASIC thinks it is in
320x200x256, when in reality the computer is in a higher
res mode. But the PALETTE command just calls the BIOS
interrupt (probably - there are other ways of changing the
palettes) and it still works no matter the mode - just pick
a BASIC supported screen mode that has the same number of
colors as the extended mode that you want.
EF> Can I do things other than a point?
Yes, you can do a LOCATE Row,Col,CursorON/OFF,StartScan,EndScan. If you
tried a LOCATE in a mode BASIC doesn't recognize, you'd
quickly find that it doesn't work quite right. But all of
the services are available through Interrupt 10h. You can
scroll the screen (or just part of it) up and down, read a
character (like a Char = SCREEN(Row,Col) command), print a
character (which no longer works through BASIC since it
thinks it's in a different mode), change video pages, and
on later versions of video BIOS, write an entire string
(rather than one character at a time). Some BIOS's also
have other commands, such as scroll left and right, smooth
EF> This should be faster, too?
The BPSET routine is probably faster than a regular PSET,
but the stuff required to do a LINE, CIRCLE, PAINT, etc...
doing only PSETs would be far slower than native QB
Do you have an alogarithm (so I won't have
EF> to make one) to do lines or circles using this thing?
I haven't written any in at least 8 years - the last time was on an Apple ][
and on a TRS-80 Model I. The best routines are direct
video writes rather than BIOS calls. I suggest a couple of
books - Power Graphics Programming by Michael Abrash, and
Programmer's Guide to the EGA and VGA w/Super VGA - I don't
remember the author (I'll try to remember to get it next
time I'm at work if you need it). Both have routines for
LINE and CIRCLE drawing. Unfortunately, they are either in
Assembly or C, and at least a small understanding of the
languages are needed. There are some SVGA libraries
available that are compatible with QB, including at least
one Shareware I've heard mention of. Personally, I'd try
finding one of those rather than try and write a line or
circle algorithm myself. Specialty needs are the only
thing I've tackled in assembly for SVGA.
* Origin: Midnight Micro! V.32/REL (918)451-3306 (1:170/600)