Announcement

After 5 years serving the vintage Apple enthusiast community, ThinkClassic has been marked for closure and is now in caretaker mode. Please see this thread for further information. Please direct any questions, comments and enquiries about the website, management and ownership to this thread.

You are not logged in.

#1 2015-01-25 05:24:18

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

USB video from Mac SE

The project I've been working on the last couple days has been interfacing a $15 ARM board with a Mac SE's PDS slot to capture writes to video memory.  The mcu then builds up a shadow copy of the video memory and sends it to an OSX host over USB.  The OSX host then displays the Mac SE's video memory in a window.  Here's a youtube video which is a screen capture on OSX:

Here's the wired up mess:
semess.jpg

Last edited by bbraun (2015-01-25 05:25:27)

Offline

#2 2015-01-25 06:16:30

ClassicHasClass
Member
From: Electron Alley
Registered: 2014-05-26
Posts: 1,118
Website

Re: USB video from Mac SE

Incredible. Did you have to write a kext or anything for the USB "driver"?


Machine room (updated for 2019!): http://www.floodgap.com/etc/machines.html

Offline

#3 2015-01-25 08:09:15

markyb
Member
From: Aurora, OH (330)
Registered: 2014-05-16
Posts: 185
Website

Re: USB video from Mac SE

That's awesome! Hows the speed with this? (I mean, can you use the OSX output directly? or is there any lag?)


http://markyb86.weebly.com for some packs of old macintosh wallpapers, desktop patterns, windows wallpapers, sound files, etc.

Offline

#4 2015-01-25 17:01:25

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: USB video from Mac SE

The discovery board presents its self as a USB CDC device (aka serial), so no drivers needed on the OSX side.  The app opens up the tty device to communicate, and away it goes.
The video was recorded at a lowly 10fps, although I'm working on speeding that up a bit.  It's pretty usable as it stands, for most things although higher fps is always nicer.

Offline

#5 2015-01-25 17:37:50

ScutBoy
Member
Registered: 2014-05-25
Posts: 159

Re: USB video from Mac SE

That's very cool!

Offline

#6 2015-01-26 10:11:08

volvo242gt
Member
From: Duvall, WA
Registered: 2014-05-22
Posts: 410
Website

Re: USB video from Mac SE

Nice.  Now you can have nine OS X windows open, all showing a game of snake going on...  lol

-J


modern: Mac Pro 2.8GHz 8-core 6GB/500G/DVD-RW, Mid-2010 A1286 MBP
PPC: G3/400
Pre-Mac: //e
other: iPhone 6s 128GB Space Gray

Offline

#7 2015-01-26 16:36:20

mcdermd
Member
From: Corvallis, OR
Registered: 2014-05-12
Posts: 1,022
Website

Re: USB video from Mac SE

lol


Daily Drivers: 27" iMac 2.8 GHz Quad-Core i7 (Late 2009), 21.5" iMac 2.7GHz Quad-Core i5 (Late 2013), 11" Macbook Air 1.6 GHz i5 (Mid-2011)
See the restored heroes here.

Offline

#8 2015-01-26 17:38:21

MinerAl
Member
From: The not-so-great plains
Registered: 2014-08-26
Posts: 73

Re: USB video from Mac SE

What kind of extension cord are you using for the LB<->AB there?

Also: Awesome!  Could you output to a Win PC as easily?

Last edited by MinerAl (2015-01-26 17:39:55)

Offline

#9 2015-01-26 18:47:23

mcdermd
Member
From: Corvallis, OR
Registered: 2014-05-12
Posts: 1,022
Website

Re: USB video from Mac SE

Looks like a normal ATX extension cable. That's what I use.


Daily Drivers: 27" iMac 2.8 GHz Quad-Core i7 (Late 2009), 21.5" iMac 2.7GHz Quad-Core i5 (Late 2013), 11" Macbook Air 1.6 GHz i5 (Mid-2011)
See the restored heroes here.

Offline

#10 2015-01-26 18:59:14

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: USB video from Mac SE

Yeah, it's just an ATX extension cable.  Part of it lines up with the SE connector and the other part just hangs off the edge and doesn't cause any trouble.  It's pretty convenient.

Since the USB interface is just a virtual com port, it could be made to work on windows or any other platform really.  It's just a Simple Matter of Programming(tm).  I should probably use SDL or some other cross platform toolkit for the UI I guess.

Offline

#11 2015-01-27 02:18:58

uniserver
Member
From: Sf, Mi
Registered: 2014-05-15
Posts: 956
Website

Re: USB video from Mac SE

pcb time?   awesome....   keyboard and mouse support would be sweet as well. :0)


#I Re-Cap √Mac √NeTX √Amiga Boards - A/B - PSU# (MacCaps.com)  Modern SCSI HD's - For Old Macs - Pre Cfg'd - 10k RPM! 73gb!! $50 + free shipping  -- Mac 128K Re-Ram kits (16 Chips) $35 + shipping, Floppy Issues?-> Bourns Filter Solution 128k - SE/30, $16 + shipping

Offline

#12 2015-01-27 17:18:20

Eudimorphodon
Member
Registered: 2014-09-02
Posts: 525

Re: USB video from Mac SE

Wow. So, are you using any circuitry external to the ARM board, or is this all literally just wires running between pins on the PDS slot to GPIO pins on the ARM board? I would not have thought that one of these ARM Cortex boards would be fast enough to keep up with an 8mhz bus using interrupts and software decoding.

(Also, are you having to do any level-shifting in this setup, or is the I/O on the board 5v tolerant?)

Are you planning to release the code associated with this? If this is really fast enough to real-time snoop an 8Mhz bus I could see a lot of potential for using the technique for various other retrocomputing uses... for instance, it seems like you could use it as a streaming data logger/logic analyzer for small 8 and 16 bit machines. (I skimmed through the thread and saw you were able to get about 10 FPS out of it so far; given the Mac's screen is about 22k that's over 200kps. That's about within spitting distance of being able to completely log all the bus activity of something like a 1mhz 6502...)


Flap Different.

Offline

#13 2015-01-27 18:05:39

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: USB video from Mac SE

No external circuitry, literally just wires between the two.  The ST part is 5V tolerant, so no level shifting going on.
The source is kinda available, although not in a very convenient form at the moment.  It's checked into my public svn repository, which has websvn, which is kinda ugly.  I need an IT intern/apprentice to manage such things for me!  smile
I still consider it to be in kind of a hacked up state at the moment, but if it gets to a reasonable stopping point, I'll bundle up the sources and make them available in a tarball or something.  Until then, they're at least viewable now, and if you're interested in messing with it, I'll gladly send the sources and do what I can to help get up to speed on the build environment and whatnot.

I think the reason I get away with the interrupt approach is I'm interrupting on writes.  Since the video circuitry is doing a read every 3rd memory access or so, the processor gets a break.  And since the 68000 takes 4 clock cycles to perform a memory access, it gives the interrupt handler some time to perform some calculations during the memory access, such as address decoding.
I think it would be possible to do something like a bus logger for something like a 6502.  I think you could get higher data rates streaming the bus operations over USB rather than trying to poll it in one big chunk, which is a change that's on my todo list for this project.  If nothing else, a bus logger could be set to trigger on some activity and buffer internally, then report back later, which is what a lot of the USB logic analyzers were doing until relatively recently.
I also have a bit of a writeup on it here

I've also been contemplating using this for bus level debugging on the SE, probably by doing the trigger & buffer approach.  Something like 'when someone accesses this memory range, record all accesses to that range for as long as memory is available'.  It could be useful for debugging or reverse engineering hardware.  It'd also be great to get some bus arbitration working so this thing can become a bus master and initiate memory writes.  But hey.  One step at a time.

Offline

#14 2015-01-27 23:09:45

Eudimorphodon
Member
Registered: 2014-09-02
Posts: 525

Re: USB video from Mac SE

If those boards are really just $15 I might have to buy one. Granted, it'll probably just end up in the drawer with my Propeller demo board as another thing I'll totally get around to play with when I have the time, but... it looks "interesting", to say the least.

Here's a crazy idea for you if you really want to see how synchronous-ly you can get that thing to work: the specs for that board says it has 192KB of RAM, and that of course is *more* than enough to "emulate" a small 8-bit computer. Grab yourself a 6502, the parts to generate a 1Mhz clock, and a Commodore PET 2001 ROM image. Your challenge will be to refine your bus following code sufficiently that you can emulate the RAM, ROM, and VRAM of one of the simplest computers ever made with your ARM board. Bonus would be to implement the display-over-USB with keyboard input from the host. wink

(The "easy" part is the PET can boot to a BASIC prompt with basically no other peripherals working; you'd have to partially emulate a 6520 and fire a 60hz interrupt to get it to take "keyboard" input. VRAM is just a 1k block of RAM that resolves directly into text characters so it should be easy to push that over USB for display. A minimal PET would need about 19k of memory for the "emulated" parts, IE, 14k of ROM, 1k of VRAM, and 4k of user memory.)

Of course, you could cheat on the "clock" part and use one of the PIO pins to clock the CPU, but that would be cheating. No stopping the CPU and making it wait, you have to be its slave or it dies!


Flap Different.

Offline

#15 2015-01-28 05:07:03

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: USB video from Mac SE

Heh, nice idea, but I think I've got my hands full at the moment!  smile

Offline

#16 2015-01-29 05:14:14

bigmessowires
Member
Registered: 2014-05-15
Posts: 183

Re: USB video from Mac SE

bbraun wrote:

I've also been contemplating using this for bus level debugging on the SE, probably by doing the trigger & buffer approach.  Something like 'when someone accesses this memory range, record all accesses to that range for as long as memory is available'.  It could be useful for debugging or reverse engineering hardware.

That sounds like a logic analyzer. If you haven't seen it, check out this cheap open-source LA: http://www.seeedstudio.com/depot/preord … l?cPath=75

There's a cross-platform open-source software client for it that also supports a few other LA boards. I think it supports something called the SUMP protocol. If you can figure out how to make your ARM board output SUMP data over USB, you could probably get all the visualization and triggering stuff in the client working for free.

Offline

#17 2015-07-10 00:43:05

bbraun
Member
Registered: 2014-05-29
Posts: 1,064
Website

Re: USB video from Mac SE

I haven't touched this project in a while, but it's still sitting on my desk, reminding me every day that I should do something with it.  But it looks like someone posted it on hackaday

Offline

Board footer

About ThinkClassic

ThinkClassic specialises in the use, maintenance, repair, restoration and modification of vintage computers and peripherals.