bigmessowires
Well-known member
Continuing the discussion from https://68kmla.org/bb/index.php?threads/mac-to-vga-monitor-adapter-struggles.45423/ - I'm building a Mac-to-VGA monitor adapter that works similarly to other video adapters, but with an added feature: it can also decompose a composite sync signal into separate hsync and vsync signals. Because some monitors don't support composite sync or sync on green, and some Mac computers and video cards only output composite sync or sync on green, there's an incompatibility that often leads to questions like "why can't I get any image from my Mac IIci built-in video?" This adapter can bridge that incompatibility gap for older Mac hardware that lacks separate sync outputs, including:
Along the way I discovered that composite sync signals are not all the same. The Mac IIci, Mac IIsi, and Macintosh Monochrome card all have a csync signal that's hsync xnor vsync. This is fairly straightforward to decode. But the Toby video card has a more complex composite sync signal with changing timing and extra pulses that looks more akin to an NTSC or PAL video signal. I haven't yet examined the SuperMac composite sync to see which one it resembles.
The Macintosh monitor port doesn't have any power pin, and that's a problem. Most Mac-to-VGA adapters are just a passive switch matrix and don't need any power, but an LM1881 chip or a microcontroller need to be powered from somewhere. While an external power connection is a possibility, I've ruled it out on grounds of convenience and aesthetics. Instead, the adapter will be phantom-powered by leeching power from the video signals themselves. This isn't the best practice, but if the supply current is only a few milliamps then it should be OK. It means the adapter can be simply plugged in and used like any other Mac-to-VGA dongle.
My latest plan is to continue with the microcontroller-based design, which allows for several interesting possibilities, but also creates some difficulty due to differences between the pixel clock and the microcontroller clock. When the microcontroller program continuously polls the composite sync signal, there's a variable delay between when csync changes happen and when the changes are detected, due to the phase relationship of the clocks. This creates unwanted jitter in the extracted hsync and vsync signals, producing graphical artifacts. My new idea is to keep the microcontroller but add a monostable multivibrator (a one-shot) to generate the actual hsync and vsync signals with a consistent amount of delay. It remains to be seen how well this will work, and whether it can be done while keeping the power draw low enough for phantom powering.
I'm also planning to make some simplifications to the DIP switch design that some people may disagree with. Whenever I use an adapter like this one, I always need to dig up the instructions to remember which DIP switch settings to use for the desired video resolution and sync signals. It's a pain, and it's silly because 95 percent of the time I want 640x480 with separate hsync and vsync. The other five percent I want 832x624 or 1024x768 with separate sync. I never want the other video modes or options, so why do I need a DIP switch array with 1024 switch permutations when I only actually need 3 or 4? My hope is to make this adapter auto-configuring as much as possible, with the full list of switch permutations small enough that it can be printed on the back of the adapter.
- Mac IIci built-in video
- Mac IIsi built-in video
- Apple "Toby" or “Macintosh II Video Card” 8201098-C
- Macintosh II Monochrome Video Card 661-0518
- SuperMac ColorCard SE/30 and Spectrum SE/30
Along the way I discovered that composite sync signals are not all the same. The Mac IIci, Mac IIsi, and Macintosh Monochrome card all have a csync signal that's hsync xnor vsync. This is fairly straightforward to decode. But the Toby video card has a more complex composite sync signal with changing timing and extra pulses that looks more akin to an NTSC or PAL video signal. I haven't yet examined the SuperMac composite sync to see which one it resembles.
The Macintosh monitor port doesn't have any power pin, and that's a problem. Most Mac-to-VGA adapters are just a passive switch matrix and don't need any power, but an LM1881 chip or a microcontroller need to be powered from somewhere. While an external power connection is a possibility, I've ruled it out on grounds of convenience and aesthetics. Instead, the adapter will be phantom-powered by leeching power from the video signals themselves. This isn't the best practice, but if the supply current is only a few milliamps then it should be OK. It means the adapter can be simply plugged in and used like any other Mac-to-VGA dongle.
My latest plan is to continue with the microcontroller-based design, which allows for several interesting possibilities, but also creates some difficulty due to differences between the pixel clock and the microcontroller clock. When the microcontroller program continuously polls the composite sync signal, there's a variable delay between when csync changes happen and when the changes are detected, due to the phase relationship of the clocks. This creates unwanted jitter in the extracted hsync and vsync signals, producing graphical artifacts. My new idea is to keep the microcontroller but add a monostable multivibrator (a one-shot) to generate the actual hsync and vsync signals with a consistent amount of delay. It remains to be seen how well this will work, and whether it can be done while keeping the power draw low enough for phantom powering.
I'm also planning to make some simplifications to the DIP switch design that some people may disagree with. Whenever I use an adapter like this one, I always need to dig up the instructions to remember which DIP switch settings to use for the desired video resolution and sync signals. It's a pain, and it's silly because 95 percent of the time I want 640x480 with separate hsync and vsync. The other five percent I want 832x624 or 1024x768 with separate sync. I never want the other video modes or options, so why do I need a DIP switch array with 1024 switch permutations when I only actually need 3 or 4? My hope is to make this adapter auto-configuring as much as possible, with the full list of switch permutations small enough that it can be printed on the back of the adapter.