Board index » delphi » port[] on old ISA vga and new PCI vga

port[] on old ISA vga and new PCI vga

This program works on an old 256K VGA card but not on a PCI 2 MByte
card. Could someone tell me the reason? Is the port address wrong ?

program screen_vanish;
uses crt; { bp/tp }
{ uses crt, go32; } { fpc }
var ch : char;

begin
port[$03D8] := $25;
repeat until keypressed;
port[$03D8] := $2D;
ch := readkey;
end.

 

Re:port[] on old ISA vga and new PCI vga


My immediate reaction is: DON'T!
Programming directly into i/o address space should never be attempted
unless absolutely unavoidable, and then only if you definitely know what
you are doing.

My guess is that $03D8 is an address used for the ISA VGA while the
similar address for the PCI VGA is somewhere else. You will need a
good knowledge of the hardware interfaces to do this the right way, and
more likely than not your program will be system dependent.

Incidently, Not only is the $03D8 address probably wrong, but so are
quite possibly also the (hard coded) constants $25 and $2D.

regards Sven

Quote
enztec <enz...@xmission.com> wrote in message

news:37E00111.5BA19A10@xmission.com...
Quote
>This program works on an old 256K VGA card but not on a PCI 2 MByte
>card. Could someone tell me the reason? Is the port address wrong ?

>program screen_vanish;
>uses crt; { bp/tp }
>{ uses crt, go32; } { fpc }
>var ch : char;

>begin
>port[$03D8] := $25;
>repeat until keypressed;
>port[$03D8] := $2D;
>ch := readkey;
>end.

Re:port[] on old ISA vga and new PCI vga


Quote
On Wed, 15 Sep 1999, enztec wrote:
> This program works on an old 256K VGA card but not on a PCI 2 MByte
> card. Could someone tell me the reason? Is the port address wrong ?

If it is a VESA VBE 3.0+ compatible PCI card, then this is very well
possible: as of VBE 3.0 video cards aren't requireds anymore to be VGA
compatible. (if it's not a VBE 3.0 card, it's of course also possible that
it's not VGA register compatible, but in such a case it's not really
compatible to the VBE specs)

Jonas

Re:port[] on old ISA vga and new PCI vga


Would you know of web site that would have the port addresses on PCI/AGP
video cards?

I know the port function works using fpc/bpc/dcc - I am writing
accurately to A/D board ports :

Port[$20D] := 0;  { channel 2 - DAC2 pin 7 }  
Port[$209] := 0;  { channel 1 - DAC1 pin 16 }

and Speaker port :
port[$61]

So I must have the wrong video ports addresses.

Quote
Jonas Maebe wrote:

> On Wed, 15 Sep 1999, enztec wrote:

> > This program works on an old 256K VGA card but not on a PCI 2 MByte
> > card. Could someone tell me the reason? Is the port address wrong ?

> If it is a VESA VBE 3.0+ compatible PCI card, then this is very well
> possible: as of VBE 3.0 video cards aren't requireds anymore to be VGA
> compatible. (if it's not a VBE 3.0 card, it's of course also possible that
> it's not VGA register compatible, but in such a case it's not really
> compatible to the VBE specs)

> Jonas

Re:port[] on old ISA vga and new PCI vga


how intricate driver wise is running the speaker using port - it is
considered a real port - right?
Quote
Sven Pran wrote:

> My immediate reaction is: DON'T!
> Programming directly into i/o address space should never be attempted
> unless absolutely unavoidable, and then only if you definitely know what
> you are doing.

> My guess is that $03D8 is an address used for the ISA VGA while the
> similar address for the PCI VGA is somewhere else. You will need a
> good knowledge of the hardware interfaces to do this the right way, and
> more likely than not your program will be system dependent.

> Incidently, Not only is the $03D8 address probably wrong, but so are
> quite possibly also the (hard coded) constants $25 and $2D.

> regards Sven

> enztec <enz...@xmission.com> wrote in message
> news:37E00111.5BA19A10@xmission.com...
> >This program works on an old 256K VGA card but not on a PCI 2 MByte
> >card. Could someone tell me the reason? Is the port address wrong ?

> >program screen_vanish;
> >uses crt; { bp/tp }
> >{ uses crt, go32; } { fpc }
> >var ch : char;

> >begin
> >port[$03D8] := $25;
> >repeat until keypressed;
> >port[$03D8] := $2D;
> >ch := readkey;
> >end.

Other Threads