• 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
OK, we're in business. I connected up all the grounds, and grounded pin 4 (sense 0) to request Mac 13" inch 640x480 mode. Plugged the adapter into my Macintosh IIci, and connected a logic analyzer to all three sync outputs. CSYNC shows the expected composite sync with a period of 15 ms (66.67 Hz), while HSYNC and VSYNC are high.

IMG_3713.jpg
csync.png
 

bigmessowires

Well-known member
Soldered some wires to the LM1881 PCB. I'm stealing 5V from the Mac's floppy port. Connected the LM1881 S.IN pin to Mac's CSYNC.

IMG_3715.jpg

But it doesn't behave as expected. S.OUT is identical to S.IN:

csync.png
 

NJRoadfan

Well-known member
I suspect this is why so many monitors advertised both "VGA" and "Mac II" compatibility. The reality is the monitor likely supported SoG and/or composite sync out of the box.
 

bigmessowires

Well-known member
On closer inspection, the signals are not quite the same. LM1881 output lags the csync input by about 100ns, and includes a very short low pulse before going high and low again, for each pulse on the csync input. This might be an artifact of using a logic analyzer here rather than an analog oscilloscope.

csync.png

That behavior is normal, the LM1881 outputs composite sync and vertical sync (pin 3) signals.

Ahh yes, this LM1881 module has S.OUT connected to pin 1 (composite sync out), and pin 3 (vertical sync out) isn't connected to any pad. That seems very strange, since extracting vertical sync is the whole point of this chip. I'll add another wire.
 

bigmessowires

Well-known member
VSYNC successfully extracted! But it lags the input VSYNC by a whole line, and extends several lines past the end of the input VSYNC. Maybe that's OK?

csync.png

Now I'll hook up these sync signals to a VGA adapter, connect one of my three VGA monitors that wouldn't work with the raw IIci video signal, and see what happens.
 

NJRoadfan

Well-known member
Most of those modules were designed to strictly output sync from a composite video signal. Usually they are embedded in a game console SCART cable to give true c-sync to devices that require it, such as video upscalers.
 

dougg3

Well-known member
VSYNC successfully extracted! But it lags the input VSYNC by a whole line, and extends several lines past the end of the input VSYNC. Maybe that's OK?

I would think that lag/extension is fine as long as the VGA monitor isn't too picky. The vertical back porch of the IIci's video output is 39 lines so there's plenty of room to extend the vsync pulse a little bit. It's basically turning the front porch into 4 lines instead of 3, the sync pulse into 10 lines instead of 3, and the back porch into 31 lines instead of 39. Here's the vertical timing diagram from the IIci dev note (note that there's a typo in the diagram -- it should say vertical synch pulse, not horizontal)

1696375007206.png
 

bigmessowires

Well-known member
Thanks, yeah it makes sense that the exact duration of those sync pulses isn't critical, so long as the period between them is correct.

Now we're finally getting to the interesting part. I connected the LM1881's VSYNC output to VGA VSYNC, and LM1881 CSYNC output to VGA HSYNC. This second connection isn't really correct - CSYNC is not HSYNC - but I've been told that many monitors will accept CSYNC on their HSYNC input as long as they also have a separate VSYNC signal. Thanks to the LM1881, now I have that missing VSYNC signal. Here's the finished adapter: it really is a big mess o' wires, and something so ugly that only a mother could love it.

IMG_3716.jpg

As you may recall, I have one monitor that's worked with my IIci's built-in video all along: a Dell 2001FP. And three monitors that do not work, no matter what settings I have tried on the VGA adapter: a Viewsonic VG900b LCD, Viewsonic 6 CRT, and E-Machines CRT.

As I sanity check, I tried the Dell first:

IMG_3718.jpg

It still worked, but ouch the video quality was lousy: all kinds of shimmering and noise in the image. Maybe it was a result of my messy nest of wires snaking everywhere? At least there was a usable image.

Next up, the Viewsonic VG900b LCD. This was the real test, since this monitor steadfastly refused to sync with my IIci video before. Would it work now?

IMG_3719.jpg

Whomp whomp, so sorry. No love from the VG900b, which still complained there was no video signal and then went to sleep. Disappointing. Maybe it doesn't like CSYNC as HSYNC, or maybe it doesn't like the CSYNC that's also still present on the RGB channels.

OK, how about this Viewsonic 6 CRT? It never worked with the IIci video before, but how about now?

IMG_3720.jpg

Success, it worked! The image quality was pretty good too. Still a little bit of shimmer, but much less than with the Dell 2001FP. I'm not sure why the difference, maybe something about digital versus analog video circuitry?

The final test was the E-Machines 16 inch CRT. This was the third member of the fussy trio that had refused to work with my IIci built-in video before:

IMG_3721.jpg

Huzzah! It also worked. Image quality was similar to the Viewsonic CRT: some shimmer, but not too bad.

That's a score of 2 out of 3 for this Mac-LM1881 adapter. Useful enough to deserve being made into a proper PCB kit, I think. The only thing I didn't test was powering the LM1881 with phantom power stolen from the Mac's HSYNC and VSYNC signals, which are always high in this configuration. I've taken this snarl of wires as far as it can reasonably go, so that test will need to wait for later. I'll probably design the PCB so that it's configurable whether to use stolen power or to connect a separate 5V voltage source.
 

Attachments

  • IMG_3720.jpg
    IMG_3720.jpg
    1.5 MB · Views: 1

bigmessowires

Well-known member
Most of those modules were designed to strictly output sync from a composite video signal. Usually they are embedded in a game console SCART cable to give true c-sync to devices that require it, such as video upscalers.

Ah, I get it now. Most people will be extracting composite sync from composite video, but I'm extracting composite sync + vsync from composite sync. So it makes sense the input and output composite sync look (mostly) the same.
 

NJRoadfan

Well-known member
I wonder if it is an issue of buffered-vs-non-buffered output? I know some Amigas have problems with this and need an adapter with buffers.


Note that while the Amiga outputs composite, horizontal, and vertical sync, only the composite sync is usable in genlock mode. Commodore's later revision of their official DB-23 to VGA adapter split the composite sync into H+V sync for this reason.
 

NJRoadfan

Well-known member
Also, your monitors may be picky about the 66Hz refresh rate. One way to rule that out is to try to find a composite sync output mode that is close to 60Hz or some other VESA timing.
 

bigmessowires

Well-known member
Now I'm curious if it's the "CSYNC as HSYNC" that is the problem or something deeper...

Since the extracted VSYNC lags the true VSYNC by one line, and extends past when the true VSYNC ends, it can't easily be used in a cancelling circuit to get a proper HSYNC from CSYNC. I think I'd need to invent my own solution for whatever the LM1881 is doing, and that's not easy. I could probably build a circuit to strip the sync signals from the RGB channels, but I doubt that's actually the source of the VG900b problem.

Also, your monitors may be picky about the 66Hz refresh rate. One way to rule that out is to try to find a composite sync output mode that is close to 60Hz or some other VESA timing.

12 inch 512x384 is a candidate, since it uses composite sync like 13 inch 640x480, but has a 60 Hz vertical refresh rate instead of 66.67 Hz. But that resolution hasn't worked on any monitor that I've tried, even the ones that support composite sync at 640x480.
 

bigmessowires

Well-known member
I need a name for this thing... ideas? Some permutation of the words Mac, VGA, sync, strip, -inator, big numbers, and an Australian marsupial. Mac Sync Koala-inator? MacVGA Ripper 5000? Sugar Glider Video-inator? Or just something boring like Mac to VGA Sync Separator Adapter?
 

bigmessowires

Well-known member
Or maybe "encabulator" should be part of the name? For the past few years I've actually been working on the crudely-conceived idea of a new device that would not only supply inverse reactive current for unilateral phase detractors, but would also automatically synchronize cardinal grammeters. The design of this BMOW Encabulator is nearly complete. Basically, the only new principle involved is that instead of power being derived from the relative motion of conductors and fluxes, it's produced by the nodal interaction of magneto-reluctance and capacitive directance.
 
Top