• 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

joshc

Well-known member
I thought the main reason for dead NuBus on a IIci is that the logic IC (UH1) directly below the slots and near a leaky cap tends to be to fault ?

1697442689205.png
 

Phipli

Well-known member
I thought the main reason for dead NuBus on a IIci is that the logic IC (UH1) directly below the slots and near a leaky cap tends to be to fault ?

View attachment 63581
I haven't seen a dead one, ours hadn't leaked too badly. So you're more likely right than me

I still wouldn't have bought the IIci with a cache card wedged in a NuBus slot :s
 

bigmessowires

Well-known member
Thanks. My IIci does appear to have likely damage to that chip and the logic board near the NuBus slot, which probably explains the dead slots. I'll start a new thread for that. Here comes the project within the project - fixing the NuBus slots so that I can continue the Mac-to-VGA video adapter testing and development. I picked the wrong time to give away all my other NuBus Macs.
 

bigmessowires

Well-known member
NuBus is repaired, and the Toby card (820-0198-C) is working. I found some very curious results:

The diode rectified voltage is 3.93V.

The Toby card puts out CSYNC on pin 3, and it's a TTL level signal swinging between 0 and 4.7V, but it's not the same as the IIci and IIsi CSYNC: the period around the vblank interval looks different. First the CSYNC pulses become twice as frequent as normal, then CSYNC goes low for the equivalent of 3 horizontal line periods, then more double-speed CSYNC pulses, then finally back to the normal pattern. I think this is an NTSC/PAL thing, something called serration pulses? The other Mac video signals that I've looked at don't have this. Here's a capture:

toby-csync.png

For comparison, here is the CSYNC signal from the Mac IIci, where the CSYNC pulses are always equally spaced and continue through the vblank interval:

csync-iici.png

The Toby card also outputs sync on green. Unlike the IIci/IIsi, it does not output sync on red or sync on blue too, only green. The double-speed serration pulses near the vblank interval are also in the sync on green signal.

toby-sog.png

On the HSYNC and VSYNC pins I would expect to see nothing from the Toby card: maybe tied high or low, or left floating. But the VSYNC output is actually a copy of the green video channel! Just like the green video, it has three levels and a swings between 0 and 1.29V, which I don't think is correct since VSYNC is supposed to be TTL levels. I confirmed that GREEN and VSYNC are directly connected on the Toby PCB. Here's a capture (VSYNC is incorrectly labeled as HSYNC here):

toby-hsync.png

Toby's HSYNC is not connected to anything, the pin is left floating.

On my Dell 2001FP, using sync on green (DIP switches 1 and 4 from a 10-switch VGA adapter) results in a good-looking stable image. In this configuration none of the stand-alone sync signals are connected, only the sense inputs and the RGB video signals, so it must be using sync on green.

The 2001FP using CSYNC (DIP switches 1,4,5 on) initially produced an image that looked shimmery and slightly unstable. But after re-running the monitor's auto-adjust, it looks as good as sync on green.

So... lots of interesting Toby stuff! It may be more difficult than I thought to get this working with my proposed sync-splitter adapter, because of those CSYNC serration pulses and then the lack of any pulses during the vblank interval. Self-powering will also be more difficult, since the adapter can only draw power from CSYNC on Toby, instead of all three CSYNC, HSYNC, and VSYNC on the IIci/IIsi.
 

bigmessowires

Well-known member
the VSYNC output is actually a copy of the green video channel!

I can't fathom what purpose this might have had. Since this was the very first DB-15 Mac video card and monitor, maybe it's not even correct to call this output VSYNC, it's just... whatever they chose to put on pin 12. Which was later used for VSYNC by other video cards and monitors.
 

Phipli

Well-known member
I can't fathom what purpose this might have had. Since this was the very first DB-15 Mac video card and monitor, maybe it's not even correct to call this output VSYNC, it's just... whatever they chose to put on pin 12. Which was later used for VSYNC by other video cards and monitors.
Worth reading from page 404 in the here :


Also, this for even more detail regarding the Toby.


Seems they called in vsync
Screenshot_20231016_215746_Drive.jpg
 

bigmessowires

Well-known member
Also, this for even more detail regarding the Toby.
This appears to be mostly about the Macintosh High-Resolution Video Display Card (630-4222 / 630-4230) with a couple of footnotes about the earlier Macintosh II Video Display Card (820-0198-xxx). For my purposes, I think an important change may have occurred between these two cards. The odd CSYNC signal that I'm seeing from my Toby card looks similar to the RS-170 monitor example in the book. What the book shows for the "high-resolution RGB monitor" example is essentially identical to the Mac IIci/IIsi output, but I'm not seeing that.

I believe RS-170 is the Apple IIgs video mode. It appears to be 640x240 with a 15.7 kHz horizontal refresh rate.

My 820-0198-C version of Toby has an output signal with the timing characteristics of Mac 13" RGB, but the CSYNC behavior of RS-170.
 

Phipli

Well-known member
This appears to be mostly about the Macintosh High-Resolution Video Display Card (630-4222 / 630-4230) with a couple of footnotes about the earlier Macintosh II Video Display Card (820-0198-xxx). For my purposes, I think an important change may have occurred between these two cards.
This version any better? It's from 87, the year the original was released.

 

NJRoadfan

Well-known member
RS-170a is broadcast compliant interlaced NTSC video timings. The Apple IIgs doesn't output RS-170a video (it intentionally lacks the half scanline to enable interlacing), although it does output composite sync on pin 3 of the DB-15.
 

bigmessowires

Well-known member
Bingo! That's the one.

serrations.png
This is a strange beast. My vague understanding of these serrations or equalizing pulses is that they're an NTSC/PAL thing, not something used in Mac/VGA video. It clearly wasn't needed for the Mac, since it was eliminated in later video cards that still work with the same monitors. Then there's this:

vsync-detail.png
That's not what I'm seeing on CSYNC. I get no positive going pulses on CSYNC during the vertical blanking interval, and this diagram doesn't show the serration pulses with twice the frequency of the normal CSYNC pulses.

output-pinout.png
This isn't quite right either. My card has pin 12 directly connected to pin 5 on the PCB.

There must have been multiple versions of this first Toby card (hardware or ROM versions) with slightly different CSYNC behaviors. I have only found one part number 820-0198-xxx (the last part varies) for the original Toby but multiple model numbers: M0201, M0211, maybe M5640

The Macintosh High-Resolution Video Display Card is functionally identical for most purposes, but may have some different sync behaviors when seen at this level. It is part number 630-4222 / 630-4230, model M0322 / M0324.
 

Phipli

Well-known member
Bingo! That's the one.

View attachment 63624
This is a strange beast. My vague understanding of these serrations or equalizing pulses is that they're an NTSC/PAL thing, not something used in Mac/VGA video. It clearly wasn't needed for the Mac, since it was eliminated in later video cards that still work with the same monitors. Then there's this:

View attachment 63625
That's not what I'm seeing on CSYNC. I get no positive going pulses on CSYNC during the vertical blanking interval, and this diagram doesn't show the serration pulses with twice the frequency of the normal CSYNC pulses.

View attachment 63626
This isn't quite right either. My card has pin 12 directly connected to pin 5 on the PCB.

There must have been multiple versions of this first Toby card (hardware or ROM versions) with slightly different CSYNC behaviors. I have only found one part number 820-0198-xxx (the last part varies) for the original Toby but multiple model numbers: M0201, M0211, maybe M5640

The Macintosh High-Resolution Video Display Card is functionally identical for most purposes, but may have some different sync behaviors when seen at this level. It is part number 630-4222 / 630-4230, model M0322 / M0324.
There is an intermediate edition too, but at 1990, I suspect the details you're looking at will match the 3rd edition.

 

NJRoadfan

Well-known member
Given that this was Apple's "first" video card design, maybe they just copied what RS-170a did for sync thinking it was needed. In a way, designing around roughly scan doubled NTSC timings and sync pulses makes sense. There weren't too many systems running at 30+khz scan rates prior to VGA in 1987 (not that Apple would know about that), so there was no "standard" to target. The closest thing IBM had was the Professional Graphics Controller in 1984, which also used composite sync. The Atari ST's monochrome mode ran at around 30khz as well. Everybody else was still running TTL RGB at 15.75khz (NTSC/CGA) or 23khz (EGA).
 

bigmessowires

Well-known member
I'm back at this, now using an ATTINY202 with its integrated CCL (programmable combinatorial logic) to replace the combination of an Arduino and an external NAND chip. The Mac's CSYNC signal is conditionally passed through to the HSYNC output, or the output is forced high, to make a correct-looking HSYNC. Because it's combinatorial logic, the falling edge of HSYNC has a consistent timing with the falling edge of CSYNC (about 10-20 ns gate delay) and there's no jitter.

On the Dell E151fp this works great.

On the VG900b... sigh. It sort of works, but the picture shimmers a little, and the whole picture blinks out every few seconds. I think the falling edge of HSYNC is as good as I can possibly make it, so the problem must be one of:

- Jitter on the rising edge of HSYNC, during the vblank period. Outside of vblank, the rising edge of HSYNC is the rising edge of CSYNC (combinatorial logic) so there's no jitter. I tried making the rising edge jitter during vblank intentionally worse, and it didn't seem to change the VG900b behavior, so I don't think this is the cause.

- Reflections on the HSYNC and VSYNC signals. I can see on the logic analyzer there are some reflections coming back. I tried adding series termination resistors with different values - 68 ohms, 180 ohms, 1K ohm - but the VG900b still blinks out every few seconds. Maybe this is the issue, but I'm not convinced.

- Jitter on the rising and falling edges of VSYNC. This could be it, but the magnitude of the jitter (about half a microsecond) is so small relative to the VSYNC period (15 ms) that I'm skeptical this could really be a problem.

- More jitter in HSYNC. With 1K series termination resistors, I noticed that there's still some small jitter (about +/- 20 ns) in the edges of HSYNC, even though the falling edge of HSYNC is directly generated from the falling edge of CSYNC with combinatorial logic, and the rising edge of HSYNC is also directly generated from the rising edge of CSYNC with combinatorial logic except during the vblank period. I'm not sure what's going on there...

There are a few things I can try next, but the path forward isn't obvious to me since I'm not sure what's making the VG900b unhappy at this point.
 

Phipli

Well-known member
Might be worth checking if the caps in the VG900b have gone dry. Sometimes in that situation stuff... Becomes overly fussy.

What year was it manufactured? Was it during the capacitor plague era in the early 2000s?
 

bigmessowires

Well-known member
I don't think it's the VG900b's fault (other than that it's very fussy about signals). I thought of new test that narrows down the possible causes: I used a hardware time on the microcontroller to generate a fake HSYNC signal, and count HSYNC periods in software to make a fake VSYNC signal. This isn't in phase with the Mac so the picture rolls, but at least it creates consistent HSYNC and VSYNC signals with no jitter.

IMG_3831.jpg

This worked (minus a rolling picture) and the image did not blink on and off. So that tells me it's not an electrical problem with reflections or signal termination or whatever, but some kind of timing problem. That's good, because I can probably fix that.

I then screwed around with the fake sync signals, changing things and trying to break it. After a while I reached a simple conclusion that I'm pretty sure is correct: the VG900b is triggering off rising edges in HSYNC, not falling edges. So all my work to get the falling edges lined up is pointless, and the problem is jitter on the rising edge of HSYNC during the vblank period.

I bet other monitors trigger off HSYNC's falling edge, so really I need to make them both consistent and aligned with CSYNC. That probably brings me back to using a one-shot to generate HSYNC pulses. This ATTINY has a one-shot mode in its hardware counter that I'll try to use, though it will still have 1 clock cycle of jitter (it was more like 5 cycles before). If that fails then I'll probably need to use an external one-shot chip, which means adding more parts and more passive components, but it should definitely (hopefully???) work.
 

360alaska

Well-known member
From what I remember, you must set it to:

MultiSync 14" 13"-16" 3,4,6,8 On

for Macintosh LC
 

Attachments

  • MonitorAdapter_MacPnP.pdf
    101.4 KB · Views: 6
Top