Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!mirror!rayssd!raybed2!linus!philabs!pwa-b!hgcvax!network From: network@hgcvax.uucp (craig chaiken) Newsgroups: comp.sys.ibm.pc Subject: Re: Paradise VGA Plus undocumented video modes Message-ID: <686@hgcvax.uucp> Date: 23 Dec 88 09:04:03 GMT References: <247@shockeye.UUCP> <418@darth.UUCP> <685@hgcvax.uucp> <420@darth.UUCP> Organization: Hartford Graduate Center, Hatrford, CT. Lines: 70 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.