Closed joevt closed 1 month ago
Did you ever find an answer to your questions?
Yes, I did. The built-in video port of a Macintosh G3 Beige Desktop does support DDC. I figured it out by playing with a real computer.
It seems strange that some of the codes have ext_sense_code = 0xff. Is that intentional?
Well, the guest software I analyzed so far performs dynamic polling only for standard codes 6 and 7. Setting the extended code for all other standard codes to 0xFF
looked okay for me so yes, that's intentional.
We could change them to reflect the behavior of the circuitry but doing so wouldn't probably be a huge gain - the code will work the same way.
I agree on the objection that the value combination 0x06FF
isn't electrically possible and should be removed.
The program responsible for transmitting the extended codes only picks the lower 6 bits. Therefore, there is no big difference whether we put 0x7FF
or 0x73F
into the table.
To summarize the above, I'm open to the idea of using the extended monitor codes that precisely reflect the behavior of the underlying circuitry. I'm also fine with the current solution because it's more readable (0xFF
is quickly identified as a placeholder) plus it works for all video drivers I tested so far.
In my view, it's much more important to have a good human-readable documentation on Apple monitor identification in one place. For the time being, everything we know about it is scattered across various blog posts while the original article Technical Note HW 30 seems to have disappeared.
Could you take on this task?
HW_30 is at https://developer.apple.com/library/archive/technotes/hw/hw_30.html You can search for old documents at https://developer.apple.com/library/archive/navigation/ There's stuff Apple put on Developer CDs that aren't on the website... For example, there's sample graphics and SCSI ndrv driver code.
For example, there's sample graphics and SCSI ndrv driver code.
Which CD is that? Side question: it looks like there is some old Apple sample code for native video drivers. I'm specially interested in particular gamma tables like Page white gamma
, Macintosh standard gamma
etc. I saw a couple of drivers from different manufacturers (ATI, IXMICRO) containing the same gamma code so I think it comes from Apple...
I think PCI Driver Development Kit from "Dev.CD Jan 96 SDK1" or "Dev.CD Jul 97 SDK1". The folder name is "GDX 950717" (GDX "Graphics Driver for External Use", Version 1.0.1, July 17, 1995)
The code does mention multiple gamma tables in a file called GraphicsCoreStatus.c:
They all have an ID, text name, and hex data, and a function that defines what display each is applicable to. The applicable list might be different in actual drivers. I have mostly decompiled (disassembled and manually converted to C) the driver for the "control" video output (as used by Power Mac 8600 and some other Power Macs). That driver mentions displays with DDC while the Apple sample code does not.
The gamma table is applied to a CLUT.
I think PCI Driver Development Kit from "Dev.CD Jan 96 SDK1"
Got that CD. Many thanks!
I hoped to find the precise equations for the gamma correction tables there. Unfortunately, the source contains raw tables without any explanation how the values were calculated.
I have mostly decompiled (disassembled and manually converted to C) the driver for the "control" video output (as used by Power Mac 8600 and some other Power Macs).
Could you share it with me? I disassembled and commented Mac OS drivers for two ATI video cards. You can have it if you want...
I guess you could plot the data and try some curve fitting methods. First, you need to know what kind of curves can be used for gamma tables. The wikipedia gamma correction article says it's a power function Vout = A Vin^gamma https://en.wikipedia.org/wiki/Gamma_correction but the table format could be using any kind of curve...
Do you have an account at macrumors.com?
Sense Lines information has been corrected and expanded. If there's any remaining issues with a specific graphics controller in DPPC, then they can be addressed separately.
EDID from sense lines is a separate issue that needs further development and testing. Currently, only the ATI graphics controllers in DPPC could possibly do something with EDID since Apple graphics controllers support only specific timings. However, some Apple graphics controllers may have code to read the EDID to get the display name or maximum resolution.
I was doing some research on DingusPPC and found this: https://68kmla.org/bb/index.php?threads/monitor-identification-over-the-built-in-video-port-on-beige-g3.38344/ Did you ever find an answer to your questions?
I looked for related source code and found this: https://github.com/dingusdev/dingusppc/blob/fff597075dcba6febb59f4a6cd18e49be7dab675/devices/video/displayid.cpp#L34 It seems strange that some of the codes have
ext_sense_code
=0xff
. Is that intentional?ext_sense_code
can only be 6 bits so they shouldn't be more than0x3f
. And I think0x3f
is only possible in theNotConnected
case.Apple has a list of sense code values in
IOMacOSVideo.h
There's a list of raw sense codes (eg.kRSCZero
) and extended sense codes (eg.kESCZero21Inch
). Besides defining extended sense codes for raw sense code 7 and 6, there's also some extended sense codes defined for raw sense code 3 (a couple of Radius displays).Combining your list with Apple's, I get this:
The strange values are
0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF
They probably should be0x0000, 0x0114, 0x0221, 0x0335, 0x040A, 0x051E, 0x062B, 0x73F
There's 512 different circuits you can make with the 3 sense lines:
(ground/floating)^3 x (wire/left-diode/right-diode/nothing)^3 = 2^3 x 4^3 = 512
. Only 45 unique results can be read from them. Raw sense codes 0, 1, 2, 4 have only 1 possible extended sense code each. Raw sense codes 3, 5, 6 can have 4 possible extended sense codes each. Raw sense code 7 has 29 possible extended sense codes.I wrote a Think Pascal project in Nov 1996 to show the possibilities:![MonitorSenseLines](https://user-images.githubusercontent.com/950609/167287742-18a5fba2-8614-45aa-8e18-46668ec4d090.png)