• 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.

Raspberry Pi+Classic CRT

cjtmacclassic

Well-known member
This may sound like a vague question, but is there any way to use the composite output of a Raspberry Pi with a Macintosh Classic's CRT? I know the Classic uses TTL its display, so a custom analog board is going to be necessary. Is there any previous example of something like this being done?

PS- Getting Back into the hobby now, and oh how I've missed it :cool:

 

Gorgonops

Moderator
Staff member
I'd say the most practical route, if you're happy with the sort of clarity you're going to get from composite, would be to look for a composite 9" monochrome monitor (like a surveillance unit) to steal either the analog board or the entire guts from. (If said monitor has a tube with a short enough neck and is otherwise dimensionally compatible I'd say "all the guts" to avoid trying to figure out how to change the yokes, etc.) Picture quality will of course leave much to be desired. The other option (that involves staying CRT) is to swap the guts with a 9" Monochrome VGA monitor. A Raspberry Pi doesn't do VGA natively and I *seriously* doubt one of those HDMI->VGA dongles is going to know how to handle a mono monitor correctly so that's not really very optimal either, although you might be able to work around it in software. What are you intending to use the system for? If it's just for an MP3 player or something composite should be fine, but it'll suck if you want it to do computer things.

Hacking the stock monitor to handle either NTSC or VGA frequencies and make it do grayscale is a pretty serious effort. Here is one of the very few projects I've seen that use the original guts, and it depends on custom hardware hacking to both the analog board and an ancient VGA card with a digital feature connector.

 

cjtmacclassic

Well-known member
Whoa! That's an impressive mod!

Way out of my ability, though. I try to keep my mods reversible, and that looks pretty darn permanent. I guess I'll start hunting for a monitor, then.

My plan for this was fairy similar-a Macintosh Pi Music system with a few extra features provided by my aging and fairly useless B.O.E./BASIC Stamp board. The monitor isn't a problem though, plus like you said, it will look better for that sort of thing.

Thank you!

Edit: While we're on the topic or at least close to it, can any members with previous experience recommend a suitable display? I've got some good results here but some hands-on knowledge would be helpful.

 

Bunsen

Admin-Witchfinder-General
Using the original CRT/AB is doable:

viewtopic.php?f=29&t=16768

Page 5 is where he details the USB video driver he made. Code and schematic available.

NB: though in this hack he makes his own through-hole mounting adapter for the SMT ARM, there are plenty of cheap, readymade sticks with similar processors on them for easy soldering.

 

Bunsen

Admin-Witchfinder-General
Hmmmm so...

Given that eviltim has shown us how to force a TTL monitor to display analog levels, by hijacking the gain pot:

modify.png.160c700e0166996080cd634a113e5fb9.png


... and given that many of these cheap ARM sticks have at least one analog and/or PWM output pin, mayyyyybe with a bit of tweaking of sprite's GPU, you could get greyscale.

[does math]

512 x 342 x 60Hz = 10506240 = just over 10MHz (plus some over for blanking intervals &c)

Getting that kind of speed out of the DAC/PWM on a cheap micro is unlikely, though possibly worth investigating - remembering of course, that it also multiplies your data handling requirements by whatever bit depth you choose (ie, 8 bit greyscale = 8 times as much data)

You could, in theory, use digital pins and an R2R ladder - ie, each pin addresses one bit of your greyscale level, in parallel.

I wonder ... the R-Pi has GPIO pins itself.

/chinscratching and hmmm

 

Gorgonops

Moderator
Staff member
Oh. If we're talking about going full-up DIY then there certainly are some other options. (I was sort of assuming we were looking for an off-the-shelf, or mostly so, solution.) I'd forgotten about the home-built "USB Video Card", that would certainly do the job.

But... Just thinking out loud/commenting on his design, he says he only managed to get about "four frames per second" raw data transit throughput from a 72Mhz ARM SoC over USB, which is only about 90kBytes a second, because the CPU is so contended between video updates and managing the external DRAM chip. I've seen a couple threads on the Parallax Propeller forums about using the Prop as an SPI slave where by using assembly they've claimed speeds on the order of 2.4Mbits/sec, which would of course divide down to something around 300kBytes/sec. That's still not super but it in theory pushes the uncompressed framerate up to close to 12-15 FPS. To go even faster you *might* be able to use something like a 74HC595 shift register to offload a little work at the cost of additional I/O pins on the Prop. A quick Google shows that Linux for the Pi has an SPI driver built in already that can clock up to *62 Mhz*. If with the aid of the shift register you could push the Prop up to around 5-6Mhz you could hit 30 FPS, which would be essentially realtime uncompressed.

Anyway, the Prop has 32k of RAM built in, more than enough for the 21k framebuffer, and it *should* be relatively trivial to modify the VGA driver to output to a single bit B&W TTL display like the Mac's. (It should be able to handle that with a single core, leaving you lots of cores to spread the load of handling the serial interface and shoving bytes into the framebuffer over.) The Prop's available in a traditional hacker-friendly 40 pin DIP package, so... it's a thought, anyway. The idea would essentially be to set up the Prop to drive the Mac's monitor on one side and behave roughly like the controllers for those SPI-interfaced LCD modules that are a dime a dozen on the other. To drive it, well, there are Linux drivers for those SPI LCDs, you should be able to pirate the code for your device.

But, eh. Then you have to develop it all over again. It looks like using the Prop isn't much cheaper than the ARM. A naked 40 pin DIP Propeller is about $7, while it looks like you can get that ARM CPU on a breakout board for around $12. You will have to add the RAM chip as well, of course. The Propeller needs a $1.50 EEPROM for code storage, plus the shift register if you wanted to try that. Whee.

 

Bunsen

Admin-Witchfinder-General
he only managed to get about "four frames per second"
Oh maan :( Somehow I missed that little detail. That's um, adequate, for a server, I guess ... Ain't gonna be playing Crysis on it though.

Your Prop/R-Pi musings, on the other hand, are intriguing, and I wish to subscribe to your newsletter.

 

galaga

Member
and i thought 10mhz was to high :<

Dot clock = 15.6672 MHz

Dot = 63.83 ns

Full line = 49.93 µs

Line rate = 22.25 kHz

Full frame = 16.626 ms

Frame rate = 60.15 Hz

if it was me i would use the analog video as 640x480 fine (but i would want to turn off the color carrier and just have luminance if possible)

http://home.earthlink.net/~gamba2/images/plus_analog.PDF

i think removing the u2 buffer and making R27 bigger say 1k or a pot, "page 1"

and add a lm1881 to do the hoz and vert pluse's

 

Bunsen

Admin-Witchfinder-General
You really think that would be all that is necessary to get 640x480? Because this am relevant to my interests.

 
Top