Skip to main content
Home▸ Forums▸ 68kMLA▸ SE/30 soft power — #5
Post #5 by bbraun
Source Forum68kMLA
CategoryNetworking
Post DateThu, 16 Feb 2012 - 05:33
Original URLhttps://68kmla.org/bb/threads/se-30-soft-power.24655/
Post
I tested it, and by changing that value on my IIx, the IIx no longer soft powers off. It comes up with the screen to turn the power off or restart. To me, that says the Finder is not toggling the VIA when that gestalt says no softpoweroff is available.

I apologize for the hackiness of this, but it was just a quick test. This is a minor change from the SYSVInit from this thread. This INIT overrides the gestaltHardwareAttr gestalt selector and returns a hard coded value. The gestaltHardwareAttr returns a bitmask of machine capabilities, so the hard coded value will not work for all machines. The value I'm returning is the IIx's value, which should be the same as the SE/30's, except with softpower added.

So, if you're running on an SE/30, just copy the SYSVInit into your extensions and reboot.

If you happen to run it on something other than an SE/30, and you don't want to rebuild the project in CodeWarrior, here's an alternate path to finding the proper gestalt value for your machine and updating the INIT:

The ANSI Console app in the "sysv check" folder will print out the current value, first in decimal, then hex. The second value is what's interesting. Then open the SYSVInit (again, sorry about the naming, this is just a hack on a previous hack...) in resedit, and open the GSLT resource, and look for the value 0008 089B. That's the hardwareAttr gestalt value for the IIx, and the 0008 is the bit enabling softpower. So modify that 32bit value (0008089B) to be whatever your machine's hardwareAttr gestalt is from the "sysv check" app, with a bitwise and of 00080000. Hopefully that made sense. If not, run the ANSI Console app and tell me what it says, then I can make a new INIT for you.

I'm not entirely sure how the machine determines whether the softpower bit should be set, although I suspect early in the boot process it is based off the machine type, which as you've said is based off wired pins of one of the VIAs. If this INIT works for you, and you think it's OK to require the INIT for your soft power off to work, then all is good. If not, I guess we need to dig a little deeper to figure out how this value is set, and whether you could make a hardware change, perhaps reconfiguring your VIA pins to pretend to be a IIx...