[comp.sys.ibm.pc] Paradise VGA Plus undocumented video modes

hermit@shockeye.UUCP (Mark Buda) (12/14/88)

I recently downloaded a file from a local bulletin board (interrup.arc on
simtel20) that is chock full of wonderful information on assorted
interrupts. Imagine my puzzlement when I read (under the BIOS set video
mode int) that my Paradise VGA Plus board has a 640x480 256-color mode!
I looked in the little booklet you get with the board, and there's not
mention of it. It's not advertised anywhere I've seen either. So I played
with it. 640 x 480 x 256 > 128K. Problem. How do you get access to the
bottom half of the screen in this mode? I fiddled with the mysterious
"Paradise Registers" and discovered that by putting 0x70 (I think) in
Paradise register #2, I could write to the bottom of the screen BUT it also
crashed the machine. If I disable interrupts, it doesn't crash the machine.

Why do I have to disable interrupts to do this? What is the REAL magic
procedure I need to get at the second 128K of video RAM? Inquiring minds
want to know.
-- 
Mark Buda / Smart UUCP: hermit@shockeye.uucp / Phone(work):(717)299-5189
Dumb UUCP: ...rutgers!bpa!vu-vlsi!devon!shockeye!hermit
I hate this $%$@%!$@%!@$%@#$@!% machine.
"A little suction does wonders." - Gary Collins

malloy@nprdc.arpa (Sean Malloy) (12/15/88)

In article <247@shockeye.UUCP> hermit@shockeye.UUCP (Mark Buda) writes:
>            Imagine my puzzlement when I read (under the BIOS set video
>mode int) that my Paradise VGA Plus board has a 640x480 256-color mode!
>I looked in the little booklet you get with the board, and there's not
>mention of it. It's not advertised anywhere I've seen either. So I played
>with it. 640 x 480 x 256 > 128K. Problem. How do you get access to the
>bottom half of the screen in this mode?

>Why do I have to disable interrupts to do this? What is the REAL magic
>procedure I need to get at the second 128K of video RAM? Inquiring minds
>want to know.

I don't want to rain on your parade, but 640x480x256 on a VGA board
requires 44K _more_ memory than a 256K VGA board has, so you won't be
able to use that mode unless you've got 512K on your VGA board (it
actually requires 300K). The reason that you're crashing your system
is that you're trying to write into nonexistent memory on your
graphics board.

If you still want to play with higher-resolution modes on a VGA, all
the resolutions are set the same way that the MODE command does it --
320x200x256 is mode 0x13, for example. The file VGIF36.ARC in
PD1:<MSDOS.GIF> on SIMTEL20 has, in the documentation, a list of some
of the extended VGA modes available on various boards, and the mode
numbers that is 'standard' for them. The VGIF program itself will
display the modes that your board will handle at the top of the screen
above the GIF file list when run, as well.


	Sean Malloy
	Navy Personnel Research & Development Center
	San Diego, CA 92152-6800
	malloy@nprdc.arpa

liber@darth.UUCP (Eric Liber) (12/16/88)

> interrupts. Imagine my puzzlement when I read (under the BIOS set video
> mode int) that my Paradise VGA Plus board has a 640x480 256-color mode!
> I looked in the little booklet you get with the board, and there's not
> mention of it. It's not advertised anywhere I've seen either. So I played
> with it. 640 x 480 x 256 > 128K. Problem. How do you get access to the
           ^^^^^^^^^^^^^^^

I have the Paradise VGA 16 plus and i didn't know about this either but...
Let's think about this for a minute.  These boards (8 and 16) come with 
256k of ram on board.  To get 256 colors requires 8 bits (a byte). 
If we multiply the pixel counts 640 x 480 = 307200 (or 300K).  It looks to me
like we are short 56k from filling the screen.  If you devide 256K (262144)
by 640 lines we can get 409 lines with 256 colors.  And lo and behold there
is indeed a supported resolution of 640 x 400 x 256!  

What I think is happening here is that Paradise also makes a VGA professional
board that does have a 640 x 480 x 256 color resolution.  (Actually it will
go to 800 x 600 x 256 ).  ( 800 x 600 = 480000 bytes necessary).  While 
looking at the board (VGA 16 plus) i noticed an unused ram row and position
for one support chip on the board... Is it just possible that the professional
board is just the VGA 16 plus with more ram?   If so It would make sense that
the BIOS would probably be the same for all of the boards.  Any paradise 
people out there to verify or deny this?

Before you flame paradise for holding out on us this is very common in the
electonic hardware arena.  Make one board and firmware and simply do or do 
not include some chips to provide the level of price/performance you want.
It makes a lot of sense from a marketing and production standpoint.
good luck .. Eric (the red) Liber

hermit@shockeye.UUCP (Mark Buda) (12/17/88)

In article <1180@skinner.nprdc.arpa> malloy@nprdc.arpa (Sean Malloy) writes:
>In article <247@shockeye.UUCP> I ask:
>> [How do I write to the bottom of half of a Paradise VGA board in
>> undocumented video modes?]
>
>I don't want to rain on your parade, but 640x480x256 on a VGA board
>requires 44K _more_ memory than a 256K VGA board has, so you won't be
>able to use that mode unless you've got 512K on your VGA board (it
>actually requires 300K).

Oh. I hadn't bothered to think of that. Nevertheless, I get the same
problem with 640x400x256 mode, which requires less than 256k.

>The reason that you're crashing your system
>is that you're trying to write into nonexistent memory on your
>graphics board.

No that's not it, because the same problem happens in 640x400x256 mode.
Anyway, why would disabling interrupts keep it from crashing in that case?
The board has 256K.
I know how to put it into 640x400x256 mode.
I _can_ write to the bottom half of the screen.
I want to know if there is a 'right' way to do it, that doesn't involve
having to disable interrupts.
-- 
Mark Buda / Smart UUCP: hermit@shockeye.uucp / Phone(work):(717)299-5189
Dumb UUCP: ...rutgers!bpa!vu-vlsi!devon!shockeye!hermit
I hate this $%$@%!$@%!@$%@#$@!% machine.
"A little suction does wonders." - Gary Collins

network@hgcvax.uucp (craig chaiken) (12/18/88)

> I have the Paradise VGA 16 plus and i didn't know about this either but...
> Let's think about this for a minute.  These boards (8 and 16) come with 
> 256k of ram on board.  To get 256 colors requires 8 bits (a byte). 
> If we multiply the pixel counts 640 x 480 = 307200 (or 300K).  It looks to me
> like we are short 56k from filling the screen.  If you devide 256K (262144)
> by 640 lines we can get 409 lines with 256 colors.  And lo and behold there

     I wrote an assembly language routine which allows me to address 
640x409x256 colors on my Paradise VGA Plus.  While the display is beautiful
once the drawing is done, it suffers from terrible snow effects whenever
the display is updated.  In others words, the quality is unacceptable.
I imagine THAT is the reason Paradise chose not to document it.  In any
case, I can post my routine if anyone is willing to trade quality for
resolution.

Craig Chaiken
Hartford Graduate Center
Computing Services

liber@darth.UUCP (Eric Liber) (12/20/88)

Yes I would like to see your code.  I am always interested in how someone
else does these things.  Thanks for the Offer.
Eric (the red) Liber

manuel@hpspkla.HP.COM (John L. Manuel) (12/22/88)

   YES!,


       Please post your 640x480x256 program example!  I have been trying to
  get documentation on how to get to these modes and have been unsuccessful
  so far.  I would really like to see this.


                                   Thank-you

                                    John Manuel
                                    manuel@hpspkla.HP.COM

network@hgcvax.uucp (craig chaiken) (12/23/88)

accessing the undocumented 640x409x256 color mode on the
Paradise VGA Plus card, so I am posting the code.  This is
Turbo Pascal 4.0 (or higher) source which displays a preprocessed
TARGA-16 file (512x400x32768 colors).  The program expects the first
768 bytes of the file to define 256 palette entries.  It expects 400
records of 512 bytes each to define the contents of the 400 pixel rows.
The pixel rows start at the bottom, rather than the top of the display.

I would post the program used to reduce the 32768 TARGA-16 colors to
256 VGA colors, but I just got a nice letter from Kenneth Sheldon of
BYTE, and its seems that they would like to see my article of the
subject.  If BYTE decides not to publish it, I will certainly share it
here.
 
Craig Chaiken
Hartford Graduate Center
Computing Services

------------------------------ CUT HERE --------------------------
program raster_to_super_vga;
(*************************************************************
* 640x400x256 Color Raster to VGA Mode 5EH     (RAS2SVGA.PAS)*
* by Craig Chaiken                                           *
* September 24, 1988                                         *
*************************************************************)
uses dos;

var	i,j:integer;
	regs:registers;
	infilevar:file;
	buf:array[0..767] of byte;
	numread,segment,offset:word;


begin
	regs.ax:=$5e;	(*** Video Mode 5EH, 640x400x256 Colors ***)
	intr($10,regs);

(*** Load Color Raster File into Memory Buffer ***)
     assign(infilevar,paramstr(1));
     reset(infilevar,1);
	blockread(infilevar,buf,768,numread);


(*** Initialize Palette from First 768 Bytes of File ***)

	regs.ax:=$1012;
	regs.bx:=$0;
	regs.cx:=$100;
	regs.es:=seg(buf);
	regs.dx:=ofs(buf);
	intr($10,regs);

(*** Display Image to Screen ***)
	for j:=399 downto 0 do
	begin
		segment:=$a000+((j mod 96)*$28);
		offset:=15*(j div 96);
          port[$3ce]:=$9;port[$3cf]:=offset;
		blockread(infilevar,mem[segment:0],512);
	end;
	close(infilevar);

(*** Exit and Restore to Text Mode Upon Sensing Carriage Return ***)

	readln;
	regs.ax:=$3;
	intr($10,regs);
end.