Jump to content
Sign in to follow this  
BadGoldEagle

Mac Plus external Video Mod: TTL to VGA?

Recommended Posts

Larry Pina describes in Macintosh Repair & Upgrade Secrets  (page 168) a way to duplicate the internal Mac display but his "card"'s output is TTL. I wonder how hard could it be to convert that type of TTL to VGA... I know TTL is digital and that VGA is analog, so it ain't going to be easy.

 

But some people argue that some monitors with a 9 pin VGA input work perfectly with 9 pin TLL cards... So I'm confused. 

 

Any help appreciated.

 

 

NB: I might get hold of a Mac Plus ED and that thing (if I get it) is going to be heavily modded (internal HDD and external video)

Share this post


Link to post
Share on other sites

The horizontal scan rate is lower then what a VGA monitor would normally take (22.25khz vs. 31.5khz for VGA), so take that into consideration first. You may not even need the TTL adapter mentioned in the book if the Mac's video output is similar to analog RGB video levels (1Vpp). Looks like Larry is assuming one is using a CGA or EGA monitor that was common at the time and required TTL input.

Share this post


Link to post
Share on other sites

I don't think the Mac's video output is anything like RGB. And TTL seems really troublesome.

After googling "external video mod macintosh plus 68kmla", I found this thread (which I couldn't find using the site's search feature which btw never really worked for me otherwise I wouldn't have posted this but here we are...)

 

This is what I needed all along! I don't need TTL, Composite is WAY easier!  |)

auser1.jpg

auser2.jpg

 

And that IIGS monitor would look neat next to the Plus! Great!

 

Two things are bothering me ATM:

1/ The line rate is too high. Is there any device out there which would allow me to change this on the go? I'm planning to add a projector, and not all of them will work @22KHz... Some do I guess, since Apple's own adapter (also composite) apparently worked on some projectors:

 

 

Bill Ferenandez said
It was composite video with a BNC output jack. As I recall it could be connected directly to the video input of any video projector or video monitor that could handle a wide range of video scanning rates, but ran at the Macintosh horizontal and vertical scanning rates which is different than standard TV, so it couldn't drive a standard TV set directly.

 

2/ I can't read that capacitor's rating (sorry for blurry image)

post-2677-0-25853500-1496269091.png

Charlieman has the February 1988 issue of Apple User, so he'll have to help me on that one if we can't work it out...

 

 

Next I need to learn PCB design and get a copy of EaglePCB. Nice project!

Share this post


Link to post
Share on other sites

As I vaguely recall the sync signals that come off the Mac's motherboard are not full according-to-Hoyle TTL H/Vsync signals; there's some components missing from the analog board relative to a "normal" monitor so the signal from the motherboard is a lower-level direct drive signal. (If you dig around the forums I'm sure you'll find a post where this was discussed with links, a bit busy to dig them up myself.) Not much was needed to convert it into a full hsync/vsync, I'm pretty sure it consisted of just a couple triggers and maybe an inverter, but that (plus the sync rate itself) the bigger barrier to a VGA conversion than the *level* of a TTL video signal itself. All you need for that is a resistor. (And possibly an inverter.)

 

Standard VGA monitors actually use TTL-compatible sync signals (same as earlier PC monitor standards like MDA/CGA/EGA), not some more exotic composite/ECL/whatever layout, which was a factor in it being so trivial for monitor manufacturers "back in the day" to make their "Multisync" monitors (IE, the old monitors with 9-pin DIN plugs on the monitor that will go to VGA with a 9-to-15 pin cable) compatible with *both* VGA and TTL video standards. Many/most of these monitors were pretty clever about figuring out what sort of signal was being feed to them and would dynamically adjust both their sync rates *and* whether they interpreted the video signal as analog or TTL. But a *standard* VGA monitor lacks this backwards compatibility; most monitors made after the early-mid 90's are just going to drool (or flash "input signal out of range" on the screen) when fed the 22khz hsync from a Mac motherboard fitted with a TTL sync adapter whether or not you use a simple resistor setup to act as a "1 bit DAC" for the video signal.

 

(IE, even monitors that say "Multisync" put the sync rate floor at VGA's 31.5khz in addition to dropping TTL video input level compatibility. )

 

So, in the end, I guess the short answer is *if* you build one of those TTL sync adapters (which were intended to tweaked MDA mono monitors) and hook up to an oooold TTL-compatible Multisync like an NEC Multisync II or 3D (which actually has a 15 pin cable on it but can accept a reverse adapter to go to 9-pin TTL cards) then, yes, it should work on your Mac motherboard. But with a "modern" (or even quite old) VGA monitor? No.

 

PRE-EMPTIVE-EDIT: (from reading the update that came in while I was banging on this.) So, roughly speaking, that schematic in the linked article essentially *is* a "TTL sync converter", IE, that's what the 74LS221's are doing. (Also, my *guess* ignorantly looking at the stuff upstream is it's using one of the NOR gates in the '266 to both "mute" the video output when it's in the overscreen area and to invert it, but take that with a grain of salt because I'm sort of an idiot.)

 

Just note if you build this I suspect the chances of you getting it to work with any random monitor you have lying around are close to nil. Maybe *getting* it to work will just take one or two trivial component changes, but unless you use exactly the monitor mentioned in the article you're going to be on your own figuring out how to hack it.

 

(A few years ago I tried building a composite adapter to use with a Commodore PET, which runs its internal monitor at an even 16khz, only a few hundred Hz from according-to-Hoyle NTSC, and I was never able to get a stable picture on the surveillance monitor I was trying to make it happen with. I'm sure for someone smarter with teh analog than I am it would have been a trivial fix, but just noting that there's a *far* larger gulf between normal Composite and the Mac's output than that was.)

Share this post


Link to post
Share on other sites

Looks like the complicated circuit in the Homemade Mac article is just combining the sync signals into the video signal and altering the timing to make it close to NTSC spec, something you don't have to do with a proper monitor. The monitor pictured is not the AppleColor RGB typically found with the IIgs, but a paper white monochrome version that was available but rarely purchased. It has a composite jack on the back of it like Apple's earlier green screens.

Edited by NJRoadfan

Share this post


Link to post
Share on other sites

Looks like the complicated circuit in the Homemade Mac article is just combining the sync signals into the video signal, something you don't have to do with a proper monitor.

 

Well, as it says in the text, it's also massaging the pulse width to something a normal monitor likes (IE, to deal with that issue of the raw output from the Mac being a cruder "direct drive signal") and, it looks like at least, inverting the video drive. Of course, once you have "normal" sync signals and acceptable video level/polarity you can just smoosh them all together with resistors, like detailed here if composite is genuinely what you want. (Note that the same FAQ also has an example "TTL to Analog level converter" circuit in it.)

 

I know there was a link floating around the forum to a guy who devised a way to drive the Mac's monitor from a VGA card under DOS (IE, the opposite of what's wanted here), I'm pretty sure I recall that link had some good notes about how the Mac's video signal differs from a proper TTL output. Honestly I think getting a "proper" TTL output would be more useful than really off-spec composite if you're looking for something you could then try to interface with a scan converter. (The schematic in the article could probably be trivial dumbed down to that.)

 

Some of those "CGA/Arcade board" scan converters that are so cheap on eBay have input sync ranges that come *close* to the Mac's scan ranges, I wonder if one of them could be convinced to do the needful. But it would be *really* handy to have a proper digital multisync monitor lying around to test your TTL conversion on before moving to that step.

Share this post


Link to post
Share on other sites

I don't think the Mac's video output is anything like RGB. And TTL seems really troublesome.

 

... forgot to comment on this earlier. I'd wager the reason the old literature on TTL monitor conversions calls them "troublesome" is because the monitors targeted for those conversions were MDA monitors, which have an 18.4khz hsync and 50hz vsync. Running them at Mac sync rates is therefore almost as much of an "overclock" as it is for an NTSC monitor.

 

In other words, it's just sort of a non-trivial problem. The only remotely common consumer video standard that ran at close to the same sync rates was EGA, and EGA monitors were terribly expensive for most of their market life and, of course, rare as hen's teeth now. (VGA is actually cheaper to make monitors for and the cards are of almost identical complexity, so as soon as it became an established standard EGA was doomed.)

Share this post


Link to post
Share on other sites

Thanks guys for everything. This is interesting stuff! 

 

Basically I'd like to hook it up to a projector (but I'd also like to hook it up to a monitor like the monochrome IIGS CRT). Theoretically any projector with a compatible horizontal scan rate should be good, right? Does Vsync matter at all? I know this question is pretty stupid, but what's the difference between Hsync and the refresh rate itself? (apparently refresh rate = Vertical sync?)

 

from Wikipedia:

 

The refresh rate can be calculated from the horizontal scan rate by dividing the scanning frequency by the number of horizontal lines multiplied by 1.05 (since about 5% of the time it takes to scan the screen is spent moving the electron beam back to the top[citation needed]). For instance, a monitor with a horizontal scanning frequency of 96 kHz at a resolution of 1280 × 1024 results in a refresh rate of 96,000 ÷ (1024 × 1.05) ≈ 89 Hz (rounded down).

So for a 22KHz Hsync signal, the refresh rate should be around 22,000 ÷ (384 x 1.05) ≈ 54.56 Hz.

Is that correct, or am I completely wrong?

Share this post


Link to post
Share on other sites

 

Next I need to learn PCB design and get a copy of EaglePCB. Nice project!

Try KiCad, it works very well, and is what I use. It's also Free and Open Source software too. If you ever want to make multilayer boards (more than 2 layers), you will need to pay for an expensive license to Eagle. Eagle is a fine program, I just fine KiCad better.

 

P.S. KiCad will be doing all the heavy lifting for the ProtoCache1 project from jt.

Edited by Themk

Share this post


Link to post
Share on other sites
from Wikipedia:

So for a 22KHz Hsync signal, the refresh rate should be around 22,000 ÷ (384 x 1.05) ≈ 54.56 Hz.

Is that correct, or am I completely wrong?

 

The vertical resolution of a compact Mac isn't 384 pixels, it's 342. Divide the 22.25khz hsync by that and you'll end up with about 65, but the stated vsync for the Mac CRT is 60.15hz, which gives you about 370 lines; that makes for a reasonable 28 lines for the front/back porch (IE, overscan/borders and time for the beam return.) As used with most computers NTSC frequency monitors have *much* bigger porches, with only 200 active lines per the 262.5 in a non-interlaced frame.

 

(Honestly I'm pretty skeptical of that claim that 5% of the time is used to move the beam back up to the top; in fact, I'm willing to bet a shiny nickel on it and the person is just confusing the overscan/blanking periods with the actual beam return time. If I'm reading this NTSC timing diagram right it's active for about three Hsync periods, which is less than 1%.)

 

 

Theoretically any projector with a compatible horizontal scan rate should be good, right?

 

Well, if we put aside the issues with finding that projector with compatible scan rates... yes? I mean, the issue you might run into is if you had (theoretically), say, a projector that had a 22khz hsync rate that was built to do something weird like display non-interlaced PAL resolution video at 70hz instead of its normal 50hz (not saying such a thing exists, but we're spitballing here) your attempt to run it at higher resolution at a lower refresh could make it difficult to size the resulting picture. (The default vsize controls on this hypothetical monitor would result in vertically stretched frames, and there might not be enough adjustment to push it down to an acceptable height. Again, here, I'm assuming analog equipment. If you're dealing with equipment smart enough to put a jaded eye to what you're feeding it there's a really good chance it'll just sound an "out of range" alarm bell and refuse to comply.)

 

To use a real-life example, the *first night* I installed Linux, on a cruddy 486 with a brain-dead SVGA card and an NEC Multisync GS monochrome monitor, I started playing with "xvidtune" to see if I could squeeze a higher screen resolution out of what I had available to me as X11, even way back then, was basically useless at 640x480. (The Multisync GS officially topped out at VGA's 31.5khz hsync but was very forgiving of "weird" video modes so I thought it was worth a shot.) When pushed to the "standard" base 800x600@56hz SVGA mode the monitor *would* lock onto it, but the flyback actually made an ominous noise and it was impossible to get the display sized onto the screen. An hour or so of experimentation off that base resulted in a custom 800x600 @51hz modeline that took the hsync back down into the normal VGA ballpark, and I was *just able* to squeeze it onto the screen with extreme adjustment of the knobs...

 

But note that the resulting mode didn't work *at all* on a normal fixed-frequency 640x480 VGA color monitor in spite of being technically within hsync specs, at least. So your mileage will very much vary.

Share this post


Link to post
Share on other sites

I've looked into doing a video-out converter for compact Macs, with an approach similar to what you've described above to convert the existing video signals. Scan rates, voltage levels... it's complicated. I was excited to try it anyway, and spent some time pondering the design details, but never built a prototype.

 

After looking at what bbraun did with his SE video capture project, I believe his approach is superior. It side-steps the entire issue of video signal conversion, and doesn't use the Mac's existing video signal at all. It snoops on the CPU address and data bus and looks for writes to the region of RAM where the framebuffer is stored, so it can know what the framebuffer looks like at all times.

 

With that information, you can fairly easily build a new video generator that outputs VGA, DVI, HDMI, or whatever you want. Bbraun's version transmits the framebuffer information over USB to another computer, where's the Mac SE's framebuffer is displayed in a window. It works pretty well: see http://synack.net/~bbraun/sevideo/ and https://mac68k.info/forums/thread.jspa?threadID=276&start=15&tstart=15

 

He used a Mac SE, whose PDS slot makes it fairly easy to snoop on the CPU bus. But you should be able to follow the same approach on a Plus, by attaching a Killy clip to the CPU, or remounting the CPU in a custom-made socket that provides a breakout of the address pins.

 

video: https://mac68k.info/forums/servlet/JiveServlet/download/2-276-1796-289/WP_20150324_004.mp4

Edited by bigmessowires

Share this post


Link to post
Share on other sites

I'm sure I've speculated about this before, but I sort of wonder if it might be possible to use a fast MCU like a Parallax Propeller to make a simple "scan doubler". My thought here would be to program the propeller to output a bastardized "1024x684" video mode with exactly twice the hsync of the Mac (IE, about 44khz, which is a little less than the 48khz of a standard 1024x768@60hz VESA mode), and assign 128 bytes (yes, that's all you need) to act as a 2-line "framebuffer". Sync up the output from the propeller to the Mac using the Vsync signal, and when the first line of data comes in from the Mac's output read 64 bytes worth (512 one-bit pixels) of data from the active area into the first line of your "framebuffer" and sit on it for *two* line's worth for scan time of the higher-res display. Then from that point at the same time for each line of pixels that comes in from the Mac you use the stored data to display the previous line twice. (IE, double-scan it.) Bit-banging inputs and outputs like this is exactly what the Propeller is good at, but I suspect just about any MCU that's fast enough to software-generate a VGA screen (which is many these days) could handle it.

 

Anyway. You'd still have an oddball video mode, so a "strict" VESA-modes-only LCD display won't like it, but it should work on most older monitors, given that it'd be well above the 31.5khz hsync floor.

Share this post


Link to post
Share on other sites

Damn I always get that resolution wrong. I know it's 512x342 but I keep making the same mistake. Dunno why... Maybe because of this and the fact that the LC's standard resolution is 512x384?? Anyway...

 

I got the Plus ED a couple of weeks ago. Been trying to bring it back to life for the past two weeks. I know it can be fixed. Will order some new caps for its analog board (I get a vertical line on the screen, have already replaced R1 and resoldered L1, didn't make any difference so I guess C1 is shot. BTW, I noticed C1 ins't a radial cap as it should have been, but it's an axial one that's been hacked to work in a radial slot... that's odd but my unit isn't the only one with that type of setup)

 

I really want to use this machine with a projector. That'd be really neat. 

Gorgonops, that link is super useful. Now I know what I need to look for. And if it doesn't work, well damn at least I tried.  ;)

 

 

HSYNC-Frequency
22.25kHz, 45µs period, 18.45µs low
59% PWM duty cycle

VSYNC-Frequency (Refresh rate)
60.15Hz, 16700µs period, 180µs low
99% PWM duty cycle
 

DATA
15.6672MHz, 512 pixels in roughly 32.8µs
Signal has to be high while no pixels are sent

Share this post


Link to post
Share on other sites

Okay. Maybe I don't really understand what you're saying but Hsync and Vsync shouldn't be a problem at all with multi sync projectors, right?

22.15kHz is pretty close to EGA specs too, so perhaps an EGA compatible projector will detect the Mac's video signal?

 

I found this online:

post-2677-0-31416300-1497360836_thumb.png

 

This projector has some nice features: Sync on Composite, Autosense ("Automatically syncs with any computer signal"), and correct me if I'm wrong but if they say in the "Video Signal Compatibility" section that it supports Y/Cb/Cr component video, shouldn't it work with any resolution? (I often hook my Apple II to my TV and it works most of the time. Sometimes I have to restart the computer and/or the TV but still... It's totally usable. So the TV/Monitor can adapt to any resolution in that mode?)

And of course it has a wide range of Vertical and Horizontal scan rates.

 

One thing is bothering me ATM... and I'm sure this is one of the stupidest questions you've ever heard... but what standard does the Mac's video signal use? Is it NTSC, is it PAL, is it neither of those things?

 

Video standards aside, shouldn't this projector work with the Mac to composite adapter?

Share this post


Link to post
Share on other sites

Okay. Maybe I don't really understand what you're saying but Hsync and Vsync shouldn't be a problem at all with multi sync projectors, right?

22.15kHz is pretty close to EGA specs too, so perhaps an EGA compatible projector will detect the Mac's video signal?

 

The problem you're very likely to run into with any "Multisync" monitor made in the last 20 years (blow that window up to 30 years and you'll probably be in business) is the "floor" frequency at which they'll try to sync is VGA's 31khz Hsync; even *if* the monitor also supports VGA/PAL's 15khz Hysnc on composite/SVideo ports that will be a "special case".

 

But, hey, the specs for your projector say it supports Hsync from 15 to 100khz, so there's always a chance.

 

 

One thing is bothering me ATM... and I'm sure this is one of the stupidest questions you've ever heard... but what standard does the Mac's video signal use? Is it NTSC, is it PAL, is it neither of those things?

 

It is neither of those things, not even close. It's an arbitrary hsync scan rate and pixel clock combination that Apple cooked up in the process of compromising between monitor costs, the speeds the electronics in the Mac could support, etc. They never intended it to be used with an external monitor so there was no thought given to it being compatible with any existing monitor format.

 

 

 

Video standards aside, shouldn't this projector work with the Mac to composite adapter?

 

It totally depends on whether the projector in question is willing to:

 

A: Actually sync at a frequency *between* 15.5khz and 31.4khz, instead of supporting "TV" and "VGA and up" in two separate blocks, AND:

 

B: Accept an oddball frequency on the composite connector. Even if it will multisync over its full range on the RGB port that doesn't necessarily mean it will on the composite input connector. (The composite port might, for instance, have NTSC and PAL color decoding circuitry that essentially locks the input to near-broadcast frequencies.)

 

If both of those things are true, sure, you have a chance. But, again, as I stressed above, that "composite adapter" *only* does the job of taking the Mac's nonstandard direct-drive signals and mixing them into something that's "electrically" the same as a composite TV signal. Frequency-wise it is *not*, so the device you hook it too either has to be *very* forgiving/flexible or will have to be modified to accept it. (As was done to the Apple monitor mentioned in the conversion article.)

Share this post


Link to post
Share on other sites

Ok got it this time. Thanks!

I'll try to get in touch with NEC's tech support, I hope they'll be able to answer those questions. That projector isn't that old (circa 2005), and I didn't really search extensively. This is literally the first one that popped up when I googled 'multi sync projector', so there must be some other models out there.

 

Edit: But if it isn't NTSC or PAL, can the projector still hook up to the signal??

 

Edit 2: I am chatting with NEC's technical support as i'm writing this.

 

Edit 3: This model doesn't support that resolution, it seems to jump from 15.63 -> 31.47. Nothing in the twenties. They told me to check with their sales team. Will do that then!

Edited by BadGoldEagle

Share this post


Link to post
Share on other sites

I think you're right Gorgonops, there's no such thing as a 22.15kHz projector.

 

So it seems there's only one option left (before I move on to another method), a scan converter like this one. This is the really expensive model, and I've seen the same one elsewhere around $120. I've sent them the specs, and they said they're gonna ask their engineering team if that'll work or not.

Share this post


Link to post
Share on other sites

NEC's older projectors tended to work with 15khz RGB input. If that model has been tested for 15khz compatibility, its likely it'll sync with a 22.15khz signal too. Many arcade PCBs and the Sharp X68000 computer outputted 24khz (also close to EGA 640x350 mode), so its worth checking compatibility lists for those too. Many video scalers will support it as well (not that Startech things, you need something that handles RGB input).

Share this post


Link to post
Share on other sites

I know there was a link floating around the forum to a guy who devised a way to drive the Mac's monitor from a VGA card under DOS (IE, the opposite of what's wanted here), I'm pretty sure I recall that link had some good notes about how the Mac's video signal differs from a proper TTL output.

 

That would be eviltim's MPXPlayer II

Share this post


Link to post
Share on other sites

Sorry for the lack of content for the past few weeks on this thread. It ain't dead yet!

I just totally forgot about it...

 

Yesterday I was thinking about Arcade machines, and it appears some use EGA. Now I wish I had read your post before that NJRoadfan... That's a great suggestion! I had a look online and there are quite a few EGA to VGA converters out there for vintage game cabinets.

 

For example:

http://www.ebay.com/itm/Arcade-Game-RGB-CGA-EGA-YUV-to-VGA-HD-Video-Converter-Board-HD9800-GBS8200-NEW-/162215306112?var=&hash=item25c4c92380:m:mszTVMEHjmnZoebaMOzUmXA

http://gonbes.gmc.globalmarket.com/products/details/ega-to-vga-converter-479349.html

 

According to the spec sheet (which is never wrong for cheap chinese products), it supports CGA/EGA 14.5kHz - 16.5kHz 23.5kHz - 25.5kHz 30.5kHz - 32.5kHz.

NOT 22.15 but still quite close (Δ=6%). I wonder that would work...

It would support the X68000 though!

 

From what I've read online, video scalers only convert the resolution, not the scan rate, right?

Share this post


Link to post
Share on other sites

They convert the scan rate. The GBS-82xx converters tend to have poor video quality and have a nasty habit of needlessly applying de-interlacing to progressive scan signals. I wouldn't be surprised if it worked with a Mac's video output though, just don't expect pixel perfect quality.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×