wcwang@iuvax.cs.indiana.edu (Bill Wang) (12/07/90)
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. Bill Wang US Mail = Psychology Department, Indiana University, Bloomington, IN 47405 UUCP = {rutgers, att, ames}!iuvax!wcwang Internet = wcwang@iuvax.cs.indiana.edu -- Bill Wang US Mail = Psychology Department, Indiana University, Bloomington, IN 47405 UUCP = {rutgers, att, ames}!iuvax!wcwang Internet = wcwang@iuvax.cs.indiana.edu
jay@chaos.unr.edu (J.A. MacDonald) (12/10/90)
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... ===============================================================