🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #716

Re: ATI VGA Wonder and TP

#716
From: J.A. MacDonald
Date: Sun, 09 Dec 1990 21:53
70 lines
2783 bytes
In article <76816@iuvax.cs.indiana.edu> wcwang@iuvax.cs.indiana.edu (Bill Wang) writes:
>
>
>
>Does anyone have experience to use ATI VGA wonder graphics boards with
>its super VGA capabilities in Turbo Pascal?  Any hints and drivers
>would be greatly appreciated.
>

I've written several image display programs now for the ATI VGAWonder
board in Turbo Pascal. There are several ways to get at it. The simplest
is to use the DOS unit's register type variable, then load up the
registers and make a call to interrupt 10h using the Intr($10, regs)
procedure. 

  The other way is to write routines that will directly access the
board's memory. This would involve sending bank switching commands
directly to the port and then writing to the memory with the Mem array.
While much more complicated to use, the second method is much faster.
The drawback is that it becomes very board specific (I.e. specific to
the ATI VGA Wonder board). If you use the 10h interrupt calls the code
becomes much more portable to other boards.

  For information on programming the registers look up the Intr
procedure in the TP manuals. Also get a copy of Ralf Brown's interrupt
list by ftp. This incredible list has all the ATI VGA Wonder stuff in it
(along with Hords of other stuff).

Here's an example of a procedure to put a pixel to the screen:

Program Display_Image;

Uses
  Dos;

Var
  regs  : Register;

Procedure Init_Screen(mode : byte);
begin
  With regs do begin
    AH := $00;           { set video mode }
    AL := mode;             
  end;
  Intr ($10, regs);
end;

Procedure Put_Pixel(x,y : word; dn : byte);
begin
  With regs do begin
    AH := $0C;             { Write dot to screen }
    AL := dn;              { colour of dot to write }
    BH := $00;             { display page }
    CX := x;               { column, 0 at left }
    DX := y;               { row, 0 at top }
  end;
  Intr ($10, regs);
end;

etc.......

Hope this helps.

J.A. MacDonald

Real BMWs have two wheels...
===============================================================
jay-m@equinox.unr.edu	| I lit out from Reno
jay@chaos.unr.edu	| I was trailed by twenty hounds...
===============================================================
Technical Details
Message-ID: <5085@tahoe.unr.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cs.utexas.edu!usc!apple!tahoe!chaos!jay
References: <76816@iuvax.cs.indiana.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cs.utexas.edu!usc!apple!tahoe!chaos!jay
From: jay@chaos.unr.edu (J.A. MacDonald)
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.os.msdos.misc,comp.lang.pascal,comp.graphics
Subject: Re: ATI VGA Wonder and TP
Message-ID: <5085@tahoe.unr.edu>
Date: 9 Dec 90 21:53:58 GMT
References: <76816@iuvax.cs.indiana.edu>
Sender: news@tahoe.unr.edu
Reply-To: jay@chaos.unr.edu (J.A. MacDonald)
Organization: University of Nevada, Reno  Department of Chemistry
Lines: 70