Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Development » Hardware Hacking

Thread: Reserved VIA pins as GPIO


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Pages: 1 - Last Post: Jan 24, 2013 10:58 PM Last Post By: bbraun
bbraun


Posts: 493
Registered: 7/25/12
Reserved VIA pins as GPIO
Posted: Dec 30, 2012 6:35 PM
Click to report abuse...   Click to reply to this thread Reply
Guide to the Macintosh Family Hardware marks VIA1, data register A pins 0-2 as "reserved" for the Macintosh II, IIx, and SE/30. At least on my IIx, these pins go to the diagnostic edge connector, and appear to be pulled up to +5V. They don't seem to go anywhere else, so driving them as outputs doesn't seem like it would hurt anything.

I've attached an LED (unfortunately a "flasher" or blinking LED) to the edge connector and whipped up a small control panel to control it: http://www.youtube.com/watch?v=FeIAH6y5WaQ

Here is the control panel software & code:
gpiocp 0.1.cpt.hqx

Here is a picture of the edge connector and pins:


And here is a picture of the actual VIAs. PA0 is pin 2 of VIA1:
dougg3

Posts: 190
Registered: 8/13/12
Re: Reserved VIA pins as GPIO
Posted: Dec 30, 2012 10:21 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Nice! My checks show that pin 7 on the IIci logic board's edge connector is connected to VIA1 pin 2, and your control panel correctly controls it. Just like on the IIx, it's pulled up to 5V with a 100k resistor.
Arbee

Posts: 61
Registered: 11/29/12
Re: Reserved VIA pins as GPIO
Posted: Jan 21, 2013 10:47 AM   in response to: dougg3 in response to: dougg3
Click to report abuse...   Click to reply to this thread Reply
If bit 0 of VIA A isn't 1 (ie, +5V) most II-and-later ROMs will bypass the normal startup code and attempt to boot over LocalTalk. As far as I've noticed bits 1/2 are ignored.
bbraun


Posts: 493
Registered: 7/25/12
Re: Reserved VIA pins as GPIO
Posted: Jan 21, 2013 12:43 PM   in response to: Arbee in response to: Arbee
Click to report abuse...   Click to reply to this thread Reply
That's interesting, I had heard that before, but hadn't looked into it. Do you have any details on that? The IIsi ROM has the netBOOT/ATBOOT driver in it, but that driver didn't exist prior to the IIsi ROM, and that driver relies on PRAM settings for the server to request, file, file checksum, etc. Those drivers have an ignore bit set in the resource map attribute, so the resource manager usually doesn't load them. It seems reasonable that keying off of something like a VIA input could enable it. I haven't come across anything in ROMs prior to the IIsi that indicate a localtalk booting ability. I haven't spent a tremendous amount of time with pre-IIsi ROMs, so it's entirely possible I missed something.
Arbee

Posts: 61
Registered: 11/29/12
Re: Reserved VIA pins as GPIO
Posted: Jan 21, 2013 2:07 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
I haven't investigated it in any detail (for my purposes it was more of a nuisance than a feature) but it probably wouldn't be hard to pick off where it makes that decision.
bbraun


Posts: 493
Registered: 7/25/12
Re: Reserved VIA pins as GPIO
Posted: Jan 24, 2013 9:08 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
dougg3, techfury90, and I were looking at this last night. It turns out it actually enables a diagnostic function on the modem port, which presumably is what the techstep devices and the factory used during burn-in testing. It's a mostly ASCII protocol too.
Arbee

Posts: 61
Registered: 11/29/12
Re: Reserved VIA pins as GPIO
Posted: Jan 24, 2013 9:45 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Ahh, interesting. Would be fascinating to figure out what the protocol is and what it can do.
bbraun


Posts: 493
Registered: 7/25/12
Re: Reserved VIA pins as GPIO
Posted: Jan 24, 2013 10:58 PM   in response to: Arbee in response to: Arbee
Click to report abuse...   Click to reply to this thread Reply
It's a work in progress, I've just kinda dumped what I know so far, but here's a wiki page:
https://mac68k.info/wiki/display/mac68k/Diagnostic+Mode

Since everyone with a forum account has a wiki account, and has edit privs, feel free to have at it if you find something I haven't put on there.

Point your RSS reader here for a feed of the latest messages in all forums