HI,

I am using INTEL 82845G grapghic controller (which support DDC2BI
protocol)and working on windows 2000 operating system.
I am developing a software which will interact with the monitor
through VGA port's SDA(system data line) and SCL(system clock line)
data lines.
According to access.bus protocol, pin 12 and pin 15 of a VGA port
(D_SUB connector) are for SDA and SCl data lines. And they have given
a protocoll about the data which should be sent to these data lines.

Now my problem is how to send the data these lines through program.
setSDA(), getSDA() .... should be the underline functions which will
interact with the hardware (VGA port), which I guess should be
implemented in the driver , now how to access these functions through
my software?

If I have to write a driver, I can use VideoPortDDCMonitorHelper
function , but here also I have to supply the address were I want to
send the data. I have to write the functions like

typedef struct _I2C_CALLBACKS {
PVIDEO_WRITE_CLOCK_LINE WriteClockLine;
PVIDEO_WRITE_DATA_LINE WriteDataLine;
PVIDEO_READ_CLOCK_LINE ReadClockLine;
PVIDEO_READ_DATA_LINE ReadDataLine;
} I2C_CALLBACKS, *PI2C_CALLBACKS;

VOID I2CWriteClock(PVOID HwDeviceExtension, UCHAR data)
{
const ULONG nbitClock = 3;
const ULONG Clock = 1 << nbitClock;

PHW_DEVICE_EXTENSION hwDeviceExtension = HwDeviceExtension;
ULONG ul;
P2_DECL;

ul = VideoPortReadRegisterUlong(DDC_DATA);
ul &= ~Clock;
ul |= (data & 1) << nbitClock;
VideoPortWriteRegisterUlong(DDC_DATA, ul);
}

Can anybody over there guid me , how to write these functions and the
addresses which I should supply so that it will get written on VGA
port's 12'th and 15'th pin.

for eg. this is sample code from 3dlab's driver, Now if I want to use
same code, what will be the value of DDC_DATA, DDC_DATA is actually a
virtual address of the DDC_control registor. Will it be same for all
graphic chips?


VOID I2CWriteClock(PVOID HwDeviceExtension, UCHAR data)
{
const ULONG nbitClock = 3;
const ULONG Clock = 1 << nbitClock;

PHW_DEVICE_EXTENSION hwDeviceExtension = HwDeviceExtension;
ULONG ul;
P2_DECL;

ul = VideoPortReadRegisterUlong(DDC_DATA);
ul &= ~Clock;
ul |= (data & 1) << nbitClock;
VideoPortWriteRegisterUlong(DDC_DATA, ul);
}

Also I want to know who supply the PVIDEO_PORT_CONFIG_INFO ConfigInfo
parameter in the Find Adapter function?
As to get the base affress I need AdapterInterface = PCIBus, but in my
case, this whole struture is something like not accesseble.

Please help


There must be some predefined mapping of physical registers to the
virtual registers, does any bbody is having idea about this mapping
and how DDC control register will be mapped?