BBS: Inland Empire Archive
Date: 08-02-92 (11:56) Number: 185
From: MATT PRITCHARD @ 930/21 Refer#: NONE
To: JIM CALES Recvd: NO
Subj: 320x200x16???? on cga 1/2 Conf: (1) 80xxx
IZ> There's always the trick of changing palettes every time the monitor's
IZ>moves to a new line. A friend of mine used this trick to get a 320x200x16
IZ>mode with a CGA adapter.
JC>This information on the multi color CGA stuff is getting my curiosity
JC>going. Could you elaborate on this process or perhaps provide a small
JC>snippet of code? Thanks. Jim
No, actually the CGA is capable of 160x100x16 colors directly.. a Graphics
mode that IBM should have included in their BIOS (they did
have it the PCjr)... Here is some code in BASIC for setting
Credit goes to the Origional author, Lawrence McCaplin
Since the code just sets registers, plots points, etc, and
lets you use another undocumented graphics mdoe, I think
people shouldn't be too mad about it...
Also, on my ATI VGA-Wonder XL, I have to run a Batch file
to set up the VGA card so it can properly emulate this
============================ CGA-16.BAS ==========================
DECLARE SUB ScreenMode160 (Mode%)
DECLARE SUB ClearScreen (Mode%, DrawColor%, NoClear%)
DECLARE SUB ExitMode () DECLARE SUB DrawDot (x%, y%,
DrawColor%) DECLARE SUB DrawLine (x1%, y1%, x2%, y2%,
DrawColor%) DECLARE SUB GetInput () DECLARE SUB Pause ()
SCREEN 0, 0, 0: WIDTH 80
PRINT "Super CGA"
PRINT "Version 1.0"
PRINT "Tesseract Productions"
PRINT "Programmed by Lawrence McAlpin"
PRINT "Demonstration program on the 160x100 128-color capabilities of the
CGA" PRINT "monitor. Tested on an AT&T PC 6300 with built-
in AT&T CGA and a" PRINT "Verxion 386 with BOCA SuperVGA."
PRINT PRINT "WARNING! This program may not work properly on
emulated CGA sreen" PRINT "modes (i.e., it may not work right on EGA, VGA,
MCGA, or XGA cards.)" PRINT "The author assumes no
liability for any damag that may result from" PRINT "the
use of this program. If you try this program out you are"
PRINT "responsible for anything that may occur." PRINT
PRINT "128 Color CGA Demonstration Program" PRINT PRINT
to change between box and fuzzy modes" PRINT "Hit
ClearScreen 1, 0, 0
DrawLine 0, 1, 79, 1, 3
DrawLine 0, 1, 0, 79, 3
DrawLine 3, 1, 40, 80, 4
FOR counter = 0 TO 79
DrawDot counter, 15, counter
FOR counter = 80 TO 127
DrawDot counter - 80, 20, counter
and fuzz, ScreenMode160 and ClearScreen take the mode
parameter for box as zero, and fuzz for anything else
fuzz mode smooths the box-graphics so they don't look AS
boxy as they
ClearScreen 1, 0, 0
neglect to ExitMode then you will find your screen display
SUB DrawDot (x, y, DrawColor)
IF DrawColor < 0 OR DrawColor > 255 THEN EXIT SUB
IF x < 0 OR x > 79 THEN EXIT SUB
IF y < 0 OR y > 99 THEN EXIT SUB
a = ((2 * x + (y * 160)) AND &HFFFE) + 1
n = PEEK(a)
POKE a, (n AND &HF0) OR DrawColor
SUB DrawLine (x1, y1, x2, y2, DrawColor)
IF ABS(x1 - x2) > ABS(y1 - y2) THEN
IF x1 > x2 THEN
SWAP x1, x2
SWAP y1, y2
dx = (x2 - x1)
dy = (y2 - y1)
IF dx <> 0 THEN
b! = dy / dx
b! = 0
m! = y1 - x1 * b!
FOR x = x1 TO x2
IF b! <> 0 THEN
y = INT(m! + x * b!) + .5
y = y1
>>> Continued to next message
* SLMR 2.1a * hAS ANYONE SEEN MY cAPSLOCK KEY?
--- InterPCB 1.50
# Origin: CENTRAL BBS -Texas' BEST BBS! 214-393-7090 HST 3+GIGs (8:930/21)
* Origin: Gateway System to/from RBBS-NET (RBBS-PC 1:10/8)