• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Mac-to-VGA monitor adapter struggles

bigmessowires

Well-known member
After more testing, I think the voltage divider R4/R5 is making things worse rather than better. The intent was to reduce the Mac's composite sync output to a voltage similar to a composite video signal - about 1 Vp-p. But when combined with capacitor C1, I think it forms an unintentional RC filter on the signal, and in my tests the output signals looked worse with the voltage divider than without it. So I've removed it. Maybe it would work if I added a transistor emitter follow circuit between the voltage divider and the C1 capacitor to isolate them, but... screw it. It's working well when 5V CSYNC is connected directly to the C1 cap, and other designers using the LM1881 are doing the same thing, so I'll stick with the simple approach.

I've also removed the 180 ohm series resistor on the VSYNC output. My testing was all done without a resistor there, so I'll keep it that way.

What are the chances I can get this fabricated and built in the next seven days?

sync-magician.png
 

bigmessowires

Well-known member
One last tweak, I had to move the VGA connector about 0.05 inch to make sure it will actually fit next to the DIP switch. For some of the diodes, the +/- indicators in the placement software disagree with the cathode line shown on the diode package. Hopefully somebody will figure it out.

It's already the weekend in China, and I don't think these are going to make it in time. Maybe I can postpone Mactoberfest for a few days. :)

1c5863609f2f4c7d883c7c41efd53d93.png
 

Phipli

Well-known member
One last tweak, I had to move the VGA connector about 0.05 inch to make sure it will actually fit next to the DIP switch. For some of the diodes, the +/- indicators in the placement software disagree with the cathode line shown on the diode package. Hopefully somebody will figure it out.

It's already the weekend in China, and I don't think these are going to make it in time. Maybe I can postpone Mactoberfest for a few days. :)

View attachment 63202
Do I remember they can get things to you in 3 working days if you pay for fast turnaround and express shipping? I'm cheap, so I always select all of the cheapest options.

Sure you don't want to put a bit of a gap to the dip switches in case of manufacturing tolerances?
 

Phipli

Well-known member
Just checked. They do 24h build, and fastest delivery is 3 to 5 days, so theoretically, they are saying 6 days.
 

bigmessowires

Well-known member
Sure you don't want to put a bit of a gap to the dip switches in case of manufacturing tolerances?
Those few green pixels between the blue and red are the gap! In the first rev they were touching or even slightly overlapping. In case of failure, I'll introduce the parts to a belt sander and shave them down.
 

Phipli

Well-known member
Those few green pixels between the blue and red are the gap! In the first rev they were touching or even slightly overlapping. In case of failure, I'll introduce the parts to a belt sander and shave them down.
That's fair, I've done similar in the past.
 

bigmessowires

Well-known member
I have to admit the VG900b is frustrating me to a crazy degree, even though it's not really important. I spent more time looking at it again this morning, looking at all the signals in analog mode to confirm there are no problems with voltages or glitches, and I still got nowhere. This is going to be my white whale that keeps me up at night. I'm thinking about redefining the Tetris Max high score prize system so that this monitor is no longer included, and I can hang on to it longer for more experiments. I really don't want to spend more time on it, but it's stuck in my brain and won't go away. Maybe once Mactoberfest is passed, I can return to it with a clear head and no time pressure and try some of those VG900b experiments we discussed earlier. It might simply be that it can't accept 640x480 @ 67Hz but my intuition is that's not the problem.
 

Phipli

Well-known member
I have to admit the VG900b is frustrating me to a crazy degree, even though it's not really important. I spent more time looking at it again this morning, looking at all the signals in analog mode to confirm there are no problems with voltages or glitches, and I still got nowhere. This is going to be my white whale that keeps me up at night. I'm thinking about redefining the Tetris Max high score prize system so that this monitor is no longer included, and I can hang on to it longer for more experiments. I really don't want to spend more time on it, but it's stuck in my brain and won't go away. Maybe once Mactoberfest is passed, I can return to it with a clear head and no time pressure and try some of those VG900b experiments we discussed earlier. It might simply be that it can't accept 640x480 @ 67Hz but my intuition is that's not the problem.
I can break out a few of my monitors and verify what works on a IIci. I have some Dells that are extremely common office surplus - 17" 4:3 1280*1024 sort of thing I think.

You'll absolutely be able to find some cheap and local, say on Facebook marketplace or eBay or Craigslist?

Want me to do some testing tomorrow?
 

dougg3

Well-known member
From the sidelines I'm also very curious what the verdict ends up being with the VG900b!

BTW, I double checked your schematic and I am pretty sure you have the diodes for switches 8 and 9 oriented correctly. It looks great!
 

bigmessowires

Well-known member
With the VG900b I also tried using the LM1881's BURST output as HSYNC. This signal is supposed to be asserted during the back porch and color burst part of a regular composite video signal. It has the same frequency and polarity as HSYNC, but the pulses are a little wider than they should be, and the timing relative to the start of the video data is wrong. I didn't think it would work very well, but I thought it might do... something.

I found that the burst signal looked OK when it wasn't connected to anything, but after connecting it to the VG900b's HSYNC input, the "highs" of the burst signal were only about 0.8 volts. I checked and rechecked this a few times to be sure. The datasheet doesn't specify a maximum output current for this signal, but the only example it gives shows an output current of just 40 microamps. I would guess the burst output isn't able to source and meaningful amount of current. From these numbers I conclude that the monitor's HSYNC input is not really "high impedance" but is something like a few kiloohms to ground. I wonder if that's different from the other monitors in my stable. For comparison, the LM1881 VSYNC output is 5V when unloaded and 3.6V when connected to the VG900b.

When I have time, I'll try buffering the burst signal with something like a 74HC244 and using that as the HSYNC. I still think this idea has promise, but the LM1881 doesn't have enough juice to do it directly.

Fundamentally I'm wondering if this is a sync problem at all, or a problem with the particular combination of screen resolution and horizontal and vertical frequencies. I've been more-or-less assuming it's a sync problem. I need to brainstorm an easy way to create a known-good 640x480@67Hz video signal with separate known-good HSYNC and VSYNC to test this, that would help me narrow down the problem. I wonder how later Macintosh models behave when connected to a 13" RGB monitor. They must output CSYNC but perhaps they also output VSYNC and HSYNC as well?
 

dougg3

Well-known member
Ooh, that's a great idea! You can use a different Mac to potentially gain more knowledge on the VG900b compatibility. Here are a few quick tests with my LC 475 and the monitor I've been testing with my IIci. Note that I have to power the LC 475 off and back on quickly after the startup chime in order to get video output, because I don't have a battery installed.
  • Switches 1,4 -- no video. So the LC 475 doesn't output sync on green.
  • Switches 1,4,5 -- video works. So the LC 475 outputs CSYNC (no surprise there, since that's what the 13" RGB monitor expects) and my monitor supports composite sync on HSYNC.
  • Switches 1,4,6,7 -- video works. So the LC 475 definitely outputs VSYNC and HSYNC in the 13" RGB mode.
    • This is not a surprise, but just for completeness: "1,4,6" and "1,4,7" don't result in working video. So both VSYNC and HSYNC are needed. I already knew this was the case, but wanted to test for sanity's sake.
I also did these exact same tests on my Performa 630 and got the exact same results. The monitor says the refresh rate is 67 Hz, by the way.

These 3 tests conclusively confirm that the 475 and 630 output CSYNC, VSYNC, and HSYNC with the 13" RGB mode. It would be fascinating to find out if the VG900b works with one of your other machines with switches 1,4,6,7 on.
 

bigmessowires

Well-known member
Thanks for testing that! I have both a 475 and a 630, so I'll definitely try this. If the 475 works on the VG900b then I'll know the problem with my circuit is something goofy about HYSNC or VSYNC, and it should be fixable in theory. If the 475 doesn't work on the VG900b, then I'll know the monitor can't handle that resolution and refresh rate and there's nothing I can do about it. I'm actually hoping for the second result because it will mean there's nothing more for me to do. But I'm betting on the first result.
 

NJRoadfan

Well-known member
640x480@67Hz seems to be the fallback resolution of newer multisync Macs and even third party PCI video cards after a PRAM reset. Looking at my framegrabber's input, my ATI XClaimVR 128 with its VGA port will briefly output it on boot before it detects the advertised DDC mode and switches to bog standard 60Hz.
 

bigmessowires

Well-known member
Test results! I rewired my DB-15 and HD-15 breakouts for testing, removing the LM1881 entirely. Wired the sense pins to request 640x480 13" RGB mode.

IIci, only RGB connected, 2001FP: works
IIci, only RGB connected, VG900b: no image
LC475, only RGB connected, 2001FP: no image
LC475, only RGB connected, VG900b: no image

This confirms that the IIci outputs SOG and the 2001FP can use it, and LC475 doesn't output SOG.

LC475, RGB+HV connected, 2001FP: works
LC475, RGB+HV connected, VG900b: works

For the last test, I also used my logic analyzer to confirm the LC475 was putting out 67 Hz 640x480 video and not 60 Hz. The VG900b's information pop-up screen confirmed this too.

IMG_3722.jpg

This proves that the VG900b's problem is not with the refresh rate, but the sync. Most likely it can't accept CSYNC as a substitute for HSYNC.

Or less likely, maybe it's unhappy that the VYSNC provided by the LM1881 differs in duration from the Mac's VSYNC, and the relative timing of HSYNC to VSYNC pulses is also a bit different. The Mac's VSYNC pulse lasts for three lines but the LM1881's lasts for 10 lines. The Mac has the rising and falling edges of VSYNC both nearly coincident with falling edges of HSYNC, with VSYNC edges lagging the HSYNC edge by 100 ns. I never measured the timing relationship when using the LM1881, but from eyeballing my previous captures, VSYNC's falling edge is roughly aligned with a CSYNC edge but VSYNC's rising edge is not.
 

Phipli

Well-known member
This proves that the VG900b's problem is not with the refresh rate, but the sync. Most likely it can't accept CSYNC as a substitute for HSYNC.
Can you possibly test this by using switches... 147? 13", Just Comp Sync??

Or am I muddled.
 

bigmessowires

Well-known member
Can you possibly test this by using switches... 147? 13", Just Comp Sync??

I think these tests already prove it's "something wrong with the hsync and vsync signals". But I don't think we can say for certain exactly what's wrong.

Here's one more test will add a bit more information: LC475 and VG900b with RGB connected, plus Mac VSYNC connected to VGA VSYNC, and Mac CSYNC connected to VGA HSYNC. This simulates what I've been trying to do with the LM1881, providing a VSYNC with CSYNC, but with "better" signals than the LM1881 can provide and that have the normal duration on VSYNC and normal timing relationship VSYNC-to-HSYNC.

This test failed - no image. So I think we can say with fairly high certainty that the problem isn't with VSYNC pulse duration or timing relationships, but is that VG900b can't accept CSYNC as an HSYNC substitute. That was our best guess all along, so no huge surprise, but it's nice to have that more-or-less confirmed.
 

Nixontheknight

Well-known member
Test results! I rewired my DB-15 and HD-15 breakouts for testing, removing the LM1881 entirely. Wired the sense pins to request 640x480 13" RGB mode.

IIci, only RGB connected, 2001FP: works
IIci, only RGB connected, VG900b: no image
LC475, only RGB connected, 2001FP: no image
LC475, only RGB connected, VG900b: no image

This confirms that the IIci outputs SOG and the 2001FP can use it, and LC475 doesn't output SOG.

LC475, RGB+HV connected, 2001FP: works
LC475, RGB+HV connected, VG900b: works

For the last test, I also used my logic analyzer to confirm the LC475 was putting out 67 Hz 640x480 video and not 60 Hz. The VG900b's information pop-up screen confirmed this too.

View attachment 63252

This proves that the VG900b's problem is not with the refresh rate, but the sync. Most likely it can't accept CSYNC as a substitute for HSYNC.

Or less likely, maybe it's unhappy that the VYSNC provided by the LM1881 differs in duration from the Mac's VSYNC, and the relative timing of HSYNC to VSYNC pulses is also a bit different. The Mac's VSYNC pulse lasts for three lines but the LM1881's lasts for 10 lines. The Mac has the rising and falling edges of VSYNC both nearly coincident with falling edges of HSYNC, with VSYNC edges lagging the HSYNC edge by 100 ns. I never measured the timing relationship when using the LM1881, but from eyeballing my previous captures, VSYNC's falling edge is roughly aligned with a CSYNC edge but VSYNC's rising edge is not.
does anyone know if the LC III outputs Sync on green?
 

bigmessowires

Well-known member
I don't know about sync on green, but I can tell you the LCIII works with the fussy VG900b we've been discussing here.

I just bought another LCD, a Dell E151fpp. That brings my total count of monitors purchased in the past two weeks up to five! I should start a compatibility testing lab. My plan is that the E151fpp won't work with the IIci for the same reason the VG900b won't. If I'm wrong and it does work - great, now I have a small form factor 4:3 monitor that I can use. If it doesn't work - also great, now I have a test case I can continue to experiment with for LM1881 and similar sync-splitting gadgets, after the VG900b and the other CRTs are gone next weekend.
 

dougg3

Well-known member
Nice detective work! It sure seems like something with the sync signals has to be the culprit at this point. That's what I'd bet on...

Off-the-wall thought with no actual logic behind it: do you think the voltage levels on the R/G/B pins could potentially cause any problems? My gut is telling me no, but I thought I'd mention it anyway since it's another difference. I noticed in my scope traces on the RGB pins, the IIci seems to be outputting around 0.7 to 2.5 volts for the actual color data, with the sync info between 0 to 0.7 volts.

My understanding is VGA expects 0 to 0.7V for the RGB signals so that's higher than the "nominal" voltage but quick Googling seems to indicate that monitors are usually pretty forgiving with the voltage levels.

My 475 (in the 67 Hz mode) seems to be outputting about 0 to 1.5V for the RGB data. The sync signals are 0 to 5V as expected. Ahhh, but I think there's expected 75 ohm termination on the monitor side as well, right? If I put 75 ohms of resistance between the red and red return pins for example, I do get about 0 to 0.7V from my 475 on the red pin, matching the expected VGA signal levels perfectly.

If there was a problem with the RGB signal levels, it would show up as weird color issues rather than "no signal detected at all" like you're seeing...right?
 
Top