68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
Building a Mac SE/30 with soft power on
Posted by: amedeo_68k on 2022-08-28 23:31:35
Hi guys, I clearly remember when I have first seen the soft power on Macintosh II as it was today. I loved it.
Last day I was replacing the PSU on a Mac SE/30 ( my most loved compact Mac ), I have put in a Seasonic PSU, as already done by other people, then I was wondering…
it would be relatively easy to power on the PSU by the keyboard ADB poweron pw pin, then with a simple relay keep the PSU in on state, the trickiest part is powering the machine off.

We need:

- create an hardware that disconnects the PSU power on signal, may this can be a “NuBUS” card inside the already fantastic @Bolle powercache adapter, it already contains an ethernet board, may be it is possible to add such new device.
- patch the ROM to support the soft power off
- additional idea, as @Bolle board has Ethernet… wake on lan 🙃

What do you think?
Posted by: Phipli on 2022-08-29 02:34:38
Heh, weird coincidence - I was trying to think about what was needed to do this on an LC yesterday.

Power on wouldn't take too much. A replacement PSU that supports soft power, a connection to the trickle power and a little circuit linked to the soft power pin on the ADB ports...

Powering off is a challenge. I haven't thought of a way yet.

The SE/30 though has the ROM from the IIx and IIcx which support soft power. But that is just a pointless fact if there isn't a signal to pick up on the board.
Posted by: cheesestraws on 2022-08-29 02:58:43
Powering off is a challenge. I haven't thought of a way yet.

You'd have to have software support. Don't know how the ROM does it and don't have the energy to check at the moment, but I'm sure you could hook the shutdown manager somehow...
Posted by: Phipli on 2022-08-29 03:11:04
You'd have to have software support. Don't know how the ROM does it and don't have the energy to check at the moment, but I'm sure you could hook the shutdown manager somehow...
I wish there was spare GPIO on mac boards - couple of spare pins on a VIA or something. Perhaps there is. I've never looked.
Posted by: LaPorta on 2022-08-29 03:44:02
If you could find a way for my modern iMac to do this over USB, I'd pay you.
Posted by: cheesestraws on 2022-08-29 03:46:57
I wish there was spare GPIO on mac boards - couple of spare pins on a VIA or something. Perhaps there is. I've never looked.

Well, on the SE/30, as far as I can see, the POWEROFF line is still present on VIA2:

Screenshot 2022-08-29 at 11.33.16.png
The only place this seems to go is the PDS slot (!), per page 1:

Screenshot 2022-08-29 at 11.37.22.png

So, from a hardware point of view, not only could you hook up to this line out of the VIA, you could probably do so non-intrusively by means of a PDS card riser type affair.

What about software? The shutdown code looks at the Gestalt manager to find out whether the hardware has soft power features, so that's fairly easily patchable. If the Gestalt claims that soft shutdown is working, it calls _PowerOff, and as far as I can see, that should just twiddle the VIA line directly, even on the SE/30 (this is easy to test: call _PowerOff from a bit of code with an oscilloscope hooked up to that line and see if it does anything).

So it'd probably need a small INIT and a little bit of hardware to do power off, but nothing particularly complicated.
Posted by: Phipli on 2022-08-29 04:07:26
Well, on the SE/30, as far as I can see, the POWEROFF line is still present on VIA2:

The only place this seems to go is the PDS slot (!), per page 1:


So, from a hardware point of view, not only could you hook up to this line out of the VIA, you could probably do so non-intrusively by means of a PDS card riser type affair.

What about software? The shutdown code looks at the Gestalt manager to find out whether the hardware has soft power features, so that's fairly easily patchable. If the Gestalt claims that soft shutdown is working, it calls _PowerOff, and as far as I can see, that should just twiddle the VIA line directly, even on the SE/30 (this is easy to test: call _PowerOff from a bit of code with an oscilloscope hooked up to that line and see if it does anything).

So it'd probably need a small INIT and a little bit of hardware to do power off, but nothing particularly complicated.
You could test by using Wish I Were as a IIcx? Plus an LED on the PDS slot.
Posted by: Phipli on 2022-08-29 04:14:48
I guess everyone knows but, when soft power is broken on a machine, it shows the black "Now safe to switch off..." screen. Guess it triggers it after asserting power off.
Posted by: cheesestraws on 2022-08-29 04:14:51
That would be an interesting experiment!
Posted by: cheesestraws on 2022-08-29 04:15:24
I guess everyone knows but, when soft power is broken on a machine, it shows the black "Now safe to switch off..." screen. Guess it triggers it after asserting power off.

Yes, the _PowerOff trap falls through.
Posted by: Phipli on 2022-08-29 04:15:35
That would be an interesting experiment!
I'd try, but I don't have an SE/30 sadly.
Posted by: Phipli on 2022-08-29 04:23:09
If you could find a way for my modern iMac to do this over USB, I'd pay you.
I think power off is possible, doesn't it already work if you use a USB/ADB adapter? Power on would require more hardware hacking than you'd be willing to see on a machine - you'd probably have to hack into the power button.

I started work on an ADB adapter with an integrated relay to switch the power switch on an ATX case, but need to return to it and make version 2.

SlimSocial_1661772387154.jpg
Posted by: Phipli on 2022-08-29 04:55:25
Well, on the SE/30, as far as I can see, the POWEROFF line is still present on VIA2:

The only place this seems to go is the PDS slot (!), per page 1:


So, from a hardware point of view, not only could you hook up to this line out of the VIA, you could probably do so non-intrusively by means of a PDS card riser type affair.

What about software? The shutdown code looks at the Gestalt manager to find out whether the hardware has soft power features, so that's fairly easily patchable. If the Gestalt claims that soft shutdown is working, it calls _PowerOff, and as far as I can see, that should just twiddle the VIA line directly, even on the SE/30 (this is easy to test: call _PowerOff from a bit of code with an oscilloscope hooked up to that line and see if it does anything).

So it'd probably need a small INIT and a little bit of hardware to do power off, but nothing particularly complicated.
Excellent work by the way - I hadn't even dug out the schemes yet. In my defense, there was a cat sat on me.
Posted by: Bolle on 2022-08-29 05:20:01
this is easy to test: call _PowerOff from a bit of code with an oscilloscope hooked up to that line and see if it does anything
It doesn't toggle on the SE/30 when you select "Shutdown" from the menu at least... I did test that before.
Posted by: Phipli on 2022-08-29 05:32:16
It doesn't toggle on the SE/30 when you select "Shutdown" from the menu at least... I did test that before.
cheesestraws says it checks the gestalt, so using Wish I Were might fix this Bolle.
Posted by: ironborn65 on 2022-08-29 05:38:39
I think power off is possible, doesn't it already work if you use a USB/ADB adapter? Power on would require more hardware hacking than you'd be willing to see on a machine - you'd probably have to hack into the power button.

I started work on an ADB adapter with an integrated relay to switch the power switch on an ATX case, but need to return to it and make version 2.

View attachment 45689
It seems to be "only" a hardware solution to starts it up. From the software you should be able to turn it off.
If you trigger a second time the start button from the ADB you could abruptly turn it off: not very safe.
How to notify the software?
Posted by: Phipli on 2022-08-29 05:39:54
It seems to be "only" a hardware solution to starts it up. From the software you should be able to turn it off.
If you trigger a second time the start button from the ADB you could abruptly turn it off: not very safe.
How to notify the software?
On my machine it would put it to sleep, it doesn't cut the power unless you long press?

But regardless, the keyboard sends a keypress signal which displays the "are you sure you want to shutdown?". That even works on my linux laptop with an ADB adapter.
Posted by: cheesestraws on 2022-08-29 06:00:44
Someone who has time can see what this does to that line. That won't be me for a couple of weeks.
Posted by: amedeo_68k on 2022-08-29 07:32:28
Cool, I'm going to try this one as soon as possible
Posted by: Phipli on 2022-08-29 07:43:57
Cool, I'm going to try this one as soon as possible
To be clear, the aim here is to trigger a pin on the PDS connector and confirm that it is possible. There won't be any impact on the computer's ability to soft power without hardware mods.
1 >