I've found the I2C specification and several tutorials, and I understand it so far as I could work it if I could figure out the location of the SDA/SDC bits.
I found this in RBIL (I'm really close I think):
Code: Select all
Bitfields for S3 Local Peripheral Bus serial-port register:
Bit(s) Description (Table M0079)
0 I2C clock line [SCL] (write)
=1 tri-state SCL, allowing other devices to pull it low
1 I2C data line [SDA] (write)
=1 tri-state SDA, allowing other devices to pull it low
2 I2C clock line (read)
this bit reflect the actual state of the SCL line
3 I2C data line (read)
this bit reflect the actual state of the SDA line
4 enable I2C interface
=0 disable bits 0/1, forcing both SCL and SDA to be tri-stated
15-5 reserved (unused)
20-16 mirrors of bits 4-0
(these bits are on the data bus' byte lane 2 to make them accessible
via I/O port 00E2h)
Notes: see file I2C.LST for details of the I2C device registers accessible
through this interface (VPX3220A for Stealth64 Video 2001TV)
when the feature connector is disabled on the Stealth64 Video, these
bits are connected to the monitor's DDC data and clock lines
the official documentation erroneously lists the mirrors in bits 12-8
instead of 20-16
SeeAlso: #M0073,PORT 00E2h,#P0677
Code: Select all
the access method for communicating with an I2C device is
implementation-dependent; for example, recent S3 chipsets supporting
the "Scenic Highway" Local Peripheral Bus access the I2C bus via
bit-banging of memory-mapped I/O register FF20h
(see MEM A000h:FF00h"S3"). On the Zoran ZR36057 used by the
Miro DC-30, the I2C bus is accessed by bit-banging memory-mapped
register 17 (at offset 0x44). On the Cirrus Logic GD7556, extended
sequencer register 8 is used (see #P0677).
Also am I going about this the correct way? Or is there possibly a different way to access the I2C bus for every video card? (meh... now that I think of it, this would probably just *happen* to be it)
Or is it something different entirely if my purpose is to use DDC1/DDC2B/DDC2B+/etc and get the EDID?
My OS is 64-bit so I can't use VBE in protected mode (by doing a virtual 8086 monitor).
Thanks in advance.