• 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

Phipli

Well-known member
That pin is the actual CSYNC pin, controlled by UE9. It also goes to pin 3 of the DB-15 connector through a series resistor. I don't interpret the 478 datasheet the same way you do though. It's saying that twiddling pin 5 on and off is how you insert sync info into the RGB analog outputs. Not that it automatically gets sync info added when you tie it high.
Yes, I re-read it.

I agree - UE9 is driving pin 5 and CSYNC, the result of which is that there will be sync data on RG&B.

I'd thought it was a switch, not actually the sync input.

The IIci Dev note is incomplete or wrong, depending on how you want to see it.
 

Phipli

Well-known member
Yay, we're on the same page! All that's needed is a few scope traces to confirm. I like the choice "incomplete". :)
Sorry about that - I'd never write a document like that without mentioning the sync on the colour channels - its weird. It matters, so it should be in there. I expected that era of documentation to be more complete.

I'm curious why @bigmessowires's monitors don't work with 2367 on the adapter though.

I wonder if the CSync trace is broken. @bigmessowires : is Pin 5 on UA7 connected to pin 3 on the video port through a 180R?

20230924_180758.jpg
 

dougg3

Well-known member
Sorry about that - I'd never write a document like that without mentioning the sync on the colour channels - its weird. It matters, so it should be in there. I expected that era of documentation to be more complete.

All good, and I totally agree. It does matter and they should have mentioned it.

I'm curious why @bigmessowires's monitors don't work with 2367 on the adapter though.

Guessing you meant 1467 here? I honestly lost track of that part of the issue -- so forgive me if I'm being too pedantic here -- but I would think of 2367 as being an incomplete attempt at picking portrait mode (it would also need 4 in order to ground ID.1 and ID.2 that were selected by switches 2 and 3).

Assuming we're still talking about the 640x480 mode, my guess is the monitors in question don't support sync on green and they require separate syncs. I'm intrigued by the idea of an adapter that actually has the capability to split csync into separate vsync and hsync though. I feel like that should work.

I know that monitor user manuals are often incomplete about their support of this stuff, but it is interesting to point out that the user manual for @bigmessowires 's ViewSonic VG900b does claim to support a refresh rate in the 66.67 Hz range, but makes no mention of sync-on-green under the sync specs:

1695576736580.png


...whereas other ViewSonic monitors like the VX900 (sorry, couldn't find a non-spammy link, but Google for it) specifically go out of their way to point out support for sync on green and composite sync:

1695576811887.png

And yeah, I know that often monitors support more than they claim to support...but it's interesting in ViewSonic's case because they went out of their way to mention it on the specs of other models. Although as we've learned from Apple's notes, who knows what to trust? :)
 

Phipli

Well-known member
Guessing you meant 1467 here?
Exactly that :ROFLMAO: Number blind.
I'm intrigued by the idea of an adapter that actually has the capability to split csync into separate vsync and hsync though. I feel like that should work.
This is what these adapters are for. It's why we tell all the new starters to get ten switch adapters. It feels like CSync is broken on his IIci, or toasted in the adapter.
whereas other ViewSonic monitors like the VX900
Mine is a VX715, but I've never had too much trouble with IIci video elsewhere. I can drag out a Dell when I'm feeling less lazy. They're more picky than my ViewSonic.
Although as we've learned from Apple's notes, who knows what to trust?
Your own eyes mainly!
 

NJRoadfan

Well-known member
It seems that 640x480@67Hz is the "default" output even on later Macs. I hooked up my battery-less Beige G3 with an ATI XClaimVR 128 (with HDI-15 VGA output) to a DVI2PCIe capture card. On cold boot, the machine briefly outputted 640x480@67Hz during POST. It switched to 60Hz when the gray screen appeared.
 

dougg3

Well-known member
This is what these adapters are for. It's why we tell all the new starters to get ten switch adapters. It feels like CSync is broken on his IIci, or toasted in the adapter.

I'm pretty confident at this point that the 10 switch adapters don't have any special sync splitting capability. My tracing with the multimeter just shows that the relevant switches (5-7) dumbly forward the signals from one pin to another. It's also consistent with how the modes are described in the user manual.

Your own eyes mainly!

You got that right!

Okay, so here I am with my first set of oscilloscope traces from the IIci. Note that I don't have a PRAM battery installed, so it booted up outputting a black and white signal. That's probably good for simplicity anyway.

I tied pins 4 and 14 of the DB-15 connector together, to ground ID.0 and request 640x480 mode. I set up my trigger on CSYNC with a long enough pulse detection width to catch the longer vertical sync portion of it.

Here is what pin 3 (CSYNC) looks like. Seems pretty reasonable. You can see the shorter HSYNC pulses and the longer VSYNC pulse combined with the HSYNC pulses during it. Pretty nicely matches the CSYNC diagram in Figure 5-2 in the IIci dev note.

DS1Z_QuickPrint39.png

Now let's add pin 2 (red video) into it as channel 2:

DS1Z_QuickPrint40.png

This confirms my suspicions. You can see some red video data on the left side, but the sync info is clearly also present in the lower voltage range. Now let's look at pin 5 (green) on channel 2 instead:

DS1Z_QuickPrint41.png

It's the same thing. Sync info is clearly available in the lower voltage range.

Spoiler alert: blue (pin 9) looks the same too. Won't even bother posting a picture. So the IIci not only outputs sync on green...it also outputs sync on red and sync on blue! Just like the 478 datasheet says it will do.

Now, what about the separate sync signals? The dev note already told us that the IIci doesn't output the separate sync signals in 640x480 mode. I'll check them anyway.

Now vsync (pin 12) is channel 2 below:

DS1Z_QuickPrint43.png

Nothing. Apple didn't lie! I even zoomed way out. The signal just isn't there at all.

Same with hsync (pin 15). It just stays high. No need to even share that picture.

So yeah. Unless you have an adapter that can split the combined sync signal out into separate H and V syncs on the VGA side, the IIci in 640x480 mode is only going to be compatible with monitors that support sync on green or can detect the composite sync if you forward that through.

The manual for the 10 pin adapter that BMOW shared even makes it clear that none of the combinations split DB-15 pin 3 into separate VGA pins. "Mode 1" only forwards DB-15 CSYNC to the VGA HSYNC. "Mode 2" shorts CSYNC and HSYNC together on the DB-15 side, and only outputs it to HSYNC on the VGA side. That's all consistent with the list I made in this post.

Whew, now I'm tired! I do still kind of want to run the same tests in portrait mode to confirm that the syncs are no longer present in the red/green/blue signals at that point.
 

dougg3

Well-known member
Okay, portrait mode (ID.1 and ID.2 grounded) also makes sense on the scope. CSYNC doesn't show up at all (as expected based on the IIci dev note), so I won't even bother posting a picture with it.

Here's VSYNC (pin 12) and HSYNC (pin 15) together, with vsync on top:

DS1Z_QuickPrint48.png

So yes, the portrait monitor mode indeed outputs the separate hsync/vsync signals and doesn't output csync. All stuff the IIci dev note already told us.

Now let's look at the R/G/B signals. Red and green both look like this (vsync is on top, the color signal is on bottom):

DS1Z_QuickPrint51.png

So basically nothing there. Blue looks like this:

DS1Z_QuickPrint52.png

Definitely no sync info on any of these signals, so that confirms that the CSYNC signal being fed into the RAMDAC is what adds the sync info to R/G/B.

This also matches up with the IIci devnote which says the portrait monitor only looks at the blue pin. Also explains why it appears blue in this mode when hooked up to a VGA monitor.

Portrait mode is more likely to work with VGA monitors on the IIci (assuming you set switches 23467) because it outputs separate H and V sync signals that VGA expects.
 

Phipli

Well-known member
@dougg3 my ViewSonic VX715 is apparently a harlot when it comes to sync signals, it will go with anything :

 

dougg3

Well-known member
@dougg3 my ViewSonic VX715 is apparently a harlot when it comes to sync signals, it will go with anything :


Nice! Yeah, that spec sheet explains why yours works and BMOW's doesn't.
 

bigmessowires

Well-known member
@dougg3 you are the man! Thanks for all that scope data and analysis to confirm what's happening. Am I reading your scope trace wrong, or is the magnitude of the sync signal on the color channels smaller than on the CSYNC pin?

So the Viewsonic VG900b just doesn't support composite sync or sync on green, both from its spec sheet and experimentally, so it can't be used with the IIci. And I must have bad luck because experimentally it seems like the Viewsonic 6 TX-14H30 CRT and the E-Machines ColorPage T16 II 1108DT16MR CRT that I purchased also don't support composite sync or sync on green. I've not been able to find spec sheets for those two, but the behavior matches the VG900b.

I have two other monitors that work OK with the IIci, so they must support composite sync or sync on green or both. They are a Dell 2001FP and a Sony SDM-S51.
 

dougg3

Well-known member
@dougg3 you are the man! Thanks for all that scope data and analysis to confirm what's happening. Am I reading your scope trace wrong, or is the magnitude of the sync signal on the color channels smaller than on the CSYNC pin?

Yeah, the sync signal on the color channels appears to get shrunk so it's just in the bottom 0.7 or 0.8 volts of the color channel signal, versus about 5V on the actual CSYNC pin. I'm guessing that's on purpose. I feel like I've read about this concept before, like those levels are "darker than black" or something like that. Does that ring a bell for anyone?

I just did something really sneaky with a programmable ROM SIMM. I looked through the RBV video driver code from the leaked SuperMario ROM source trying to figure out if there might be a software configuration register for whether the separate sync outputs are enabled. I wasn't able to find that, but I was able to find something kind of cool. Apple's driver code for the RBV actually detects mode 001 (15" B&W Portrait) and intentionally forces the red and green channels to black! So the portrait mode being "mono" with only the blue channel is purely controlled by software.

You can actually force the ROM to leave colors enabled in portrait mode, and it works! This allows you to have a 16 color portrait mode with separate syncs. Switch configuration 23467. You have to hack the ROM though. I tested with a hacked IIsi ROM that already has the ROM checksum disabled.

Change the single instance of:

Code:
00 2B 00 A0 00 1E

To:

Code:
00 2B 00 00 00 1E

This inhibits setting the monochrome flags when the video driver detects that it's the 15" B&W Portrait mode. It looks goofy as hell on a normal sized monitor, but it's color 640x870 and it should work on monitors that don't support sync on green or composite sync! Cool!

colorportrait.jpg
 
Last edited:

joevt

Well-known member
My 10 switch adapter (SABRE, looks exactly the same as BMOW's above) is similar. I spent a little bit of time tracing what the switches do.
I updated my post at https://tinkerdifferent.com/goto/post?id=21290 with this info. My first attempt at analyzing the 10 dip switch adapter was just to find any arrangement that could support all the sense code options listed in the adapter instructions with just 10 dip switches. I ignored the fact that the adapter instructions only use 9 dip switches. The 9 dip switch arrangement you detected supports all the sense code options listed in the adapter instructions.
 

bigmessowires

Well-known member
Have you confirmed that the E-Machines works with 640x480? A 16" screen, if it was a single resolution monitor, would probably be 832x624 only?

What resolution did it run at on the 6200?

Yes it works at 640x480 and 800x600 on the P460 and P6214CD. I don't remember if I tried 832x624 too. From what I've read, the max resolution for this monitor is 1024x768.

I just did something really sneaky with a programmable ROM SIMM.

Woah, that is wild! You are a ROM+video wizard! I'm thinking it must be possible to get 640x480 with separate H and V sync too, if only we knew what to look for in the ROM.

I don't have time for this, but I want to try hacking the IIci video output with a breadboard and an LM1881. It should be possible to rig up a circuit that uses the LM1881 to get vsync and csync and send them to the VGA monitor, which might be enough to get fussy LCDs working with the IIci's 640x480 mode. Just need an LM1881 and an HD-15 VGA connector or breakout PCB, I might even have one lying around somewhere. EDIT: yes I have a couple of bare VGA connectors, just need an LM1881.
 

dougg3

Well-known member
Woah, that is wild! You are a ROM+video wizard! I'm thinking it must be possible to get 640x480 with separate H and V sync too, if only we knew what to look for in the ROM.

Ha, thanks! I honestly don't see anything in the code that configures the sync outputs. I think the RBV chip may be deciding it internally based on what it sees on the ID pins.

It should be possible to rig up a circuit that uses the LM1881 to get vsync and csync and send them to the VGA monitor, which might be enough to get fussy LCDs working with the IIci's 640x480 mode

What about hsync though? Are you thinking csync could just get fed into the VGA hsync input and it's "good enough" combined with the vsync created by the sync separator chip? I guess it would be possible to recreate hsync from the LM1881's csync and vsync outputs too...

Also found the EL1883 after some Googling. Looks like it's an obsolete part but it has vsync and hsync outputs.
 

bigmessowires

Well-known member
Yes, based on what @NJRoadfan said earlier I'm hoping that csync will be usable by the monitor as hsync, as long as a separate vsync is also supplied. If not, I can try that additional circuit with the NAND and AND to get a true hsync output. But as mentioned earlier, the LM1881 chip needs to be powered, and there's no power supplied from the Mac's monitor port unless you try to draw vampire power from one of the signals.
 

bigmessowires

Well-known member
I wonder how much current we're talking about. From your scope research it looks like the HSYNC and VSYNC signals are normally a full 5V swing. If driving a 75 ohm impedance would that be 67 mA for each signal?! That's quite a lot, definitely seems beyond what you could expect from vampire power. I don't love the practice of drawing power from the ADB port for stuff like this - I'd rather use a USB cable as a separate power supply. But whatever works. Maybe you could draw power from the CSYNC output if it's already designed to handle higher current loads. Use a little rectifier circuit with a diode and capacitor?

OK, I've ordered a DA-15 breakout for the Mac side, HD-15 breakout for the VGA side, and an LM1881 breakout board. That should be enough to cobble together a prototype. I'm not sure I'll have enough time to try this before Mactoberfest though, and all my fussy monitors are due to be sold or given away there, so I'll need to hurry.
 

sfiera

Well-known member
Yeah, the sync signal on the color channels appears to get shrunk so it's just in the bottom 0.7 or 0.8 volts of the color channel signal, versus about 5V on the actual CSYNC pin. I'm guessing that's on purpose. I feel like I've read about this concept before, like those levels are "darker than black" or something like that. Does that ring a bell for anyone?
Just the tiniest bell. I think that comes from an older standard, RS-343, for mono CCTV.
 
Top