1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How to access VGA port???????

Discussion in 'Software Development' started by shank, Sep 9, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. shank

    shank Thread Starter

    Joined:
    Sep 8, 2003
    Messages:
    6
    Hi,
    I have tried many places to get the answer for this question, but failed to get any reply.........
    Also I had posted this question to Hardware group but, they diverted me to this forum ........

    Any help in this regard will be very helpfull..........

    I want to access VGA port's(15 pin D_SUB connector which connects the monitor to the PC) SDA (pin no.12) and SCL(pin no. 15) lines.

    Does anyone by any chance know how to send and recieve data to and from DDC Control registor of the graphic chip?
    or by any chance know how to send and receive data to VGA port?????


    I have tried using the videoprt.sys for this purpose, to get the base address of the graphic device, but it is not giving me any help.
    I am having on board matrox graphic chip in my system.
    If I see the information in device manager, I get the information as PCI bus 1, device 0, function 0.

    But if I use VideoPortGetBusData function to get the information about the device and the base address of this device , it is returning 0, what must be the resion?

    PCI_COMMON_CONFIG PciData;
    VideoDebugPrint((0,"\nVideoPortGetBusData\n"));

    PciSlotNumber.u.bits.Reserved = 0;
    PciSlotNumber.u.bits.DeviceNumber = 0;
    PciSlotNumber.u.bits.FunctionNumber = 0;

    vpStatus = VideoPortGetBusData( hwDeviceExtension,
    PCIConfiguration,
    1,
    &PciData,
    0,
    PCI_COMMON_HDR_LENGTH);

    VideoDebugPrint((0,"\nvpStatus is 0x%x \n",vpStatus));

    I am using windows 2000 DDK kit and working on windows 2000.



    is there any other way to get the base address of the device????????

    Please help me out............
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    If it is returning a 0 there is no PCI video device. Is this vidoe controller on an AGP bus?
     
  3. shank

    shank Thread Starter

    Joined:
    Sep 8, 2003
    Messages:
    6
    Thanks for the reply
    Finally I am able to get bus data by using HalGetBusData and scanning all the BUs.
    But now the problem is how to identify what will be the offset of the registor which I want to write? I want to write to the DDC_control registor
    Any help in this regard will be very helpfull
     
  4. shank

    shank Thread Starter

    Joined:
    Sep 8, 2003
    Messages:
    6
    As I said earlier I have got success in finding the particular device with
    vpStatus = HalGetBusData(PCIConfiguration,Bus,PciSlotNumber.u.AsULONG,
    PciData,PCI_COMMON_HDR_LENGTH);

    Here I am not getting one thing that why the system is returning correct PCIinformation when I am calling HalGetBusData on bus 1,device 0, function 0 and failing to return when I am calling

    VideoPortGetBusData(HwDeviceExtension,
    PCIConfiguration,
    1,
    PciData,
    0,
    PCI_COMMON_HDR_LENGTH);

    Please help me out in this as, unless this works, I won't be able to use
    vpStatus = VideoPortGetAccessRanges(HwDeviceExtension,
    0,
    NULL,
    NumRegions,
    AccessRange,
    &VendorID,
    &DeviceID,
    &i);
    at present it is returning failure.....
    Please reply
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/163391

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice