• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

Force32 Feature Request

superjer2000

Well-known member
@cheesestraws - Force32 is awesome and saves a fair bit of time fiddling around with PRAM-battery-less Macs.

I know the Github page indicates that the extension doesn't check for 32-bit addressing capability but it would be awesome if if would check the gestalt ID and not do it's magic if it's on any of the 68000 Macs -

I was using the same external boot drive today on my SE that I normally use with my SE/30 and Force32 restarted the SE. I am assuming that it would keep restarting since it wouldn't be able to activate 32 bit addressing?

Again, not sure if this is an easy change or not but I thought I'd submit this feature request and see what happens!
 

cheesestraws

Well-known member
Good idea!

I was using the same external boot drive today on my SE that I normally use with my SE/30 and Force32 restarted the SE. I am assuming that it would keep restarting since it wouldn't be able to activate 32 bit addressing?

I actually don't know what it would do—I haven't tried it. It should just set that bit in the PRAM and when it restarts check it again. But what I don't know is whether the earlier macs have that bit of the PRAM. If they don't, then it will continually fail and reboot—if they do, it will act as if it's doing something but it just won't. Did you let it reboot? What happened?

it would be awesome if if would check the gestalt ID and not do it's magic if it's on any of the 68000 Macs

Yeah, this is a good idea. My impression is that a CPU check would be enough, just checking for the 68000—do you agree, or am I missing something?
 

ArmorAlley

Well-known member
@cheesestraws If you accepting ideas for features, how much work would it be have a simple text file with the various parameters that are stored in PRAM, so that these could be read into PRAM on startup? For example, I'd like to retain the AppleTalk settings so that servers could be automatically loaded rather than having to connect manually each time.
It would be a great thing is I can remove as PRAM batteries as I can.
 

Crutch

Well-known member
@ArmorAlley for that, you can use the existing cdev “Pram Auto Restore”: https://macgui.com/downloads/?file_id=23225

It works great. It can’t, however, restore your 32-bit setting … because the Mac needs to already be in 32-bit-mode, or not, by the time INITs start loading. That’s the brilliance of @cheesestraws ’s little tool (which I also really like and use). But for restoring anything else you want to keep in PRAM, you can use Pram Auto Restore linked above.
 

ArmorAlley

Well-known member
@ArmorAlley for that, you can use the existing cdev “Pram Auto Restore”: https://macgui.com/downloads/?file_id=23225

It works great. It can’t, however, restore your 32-bit setting … because the Mac needs to already be in 32-bit-mode, or not, by the time INITs start loading. That’s the brilliance of @cheesestraws ’s little tool (which I also really like and use). But for restoring anything else you want to keep in PRAM, you can use Pram Auto Restore linked above.
Thanks for this @Crutch I'll try this out.
 

cheesestraws

Well-known member
But for restoring anything else you want to keep in PRAM, you can use Pram Auto Restore linked above.

The problem is that PRAM Auto-Restore also doesn't work for network interfaces, because by the time the INIT runs, the OS has already initialised network interfaces, and it doesn't re-read the PRAM. So I have been considering a Force32-alike that also allows setting network interfaces, but at that point things start getting a bit hairy...

simple text file with the various parameters that are stored in PRAM, so that these could be read into PRAM on startup

I've thought about this, and you're not the first person to ask about it, as I'm sure you're not surprised to hear.

Doing it out of a preferences file is a recipe for pain: there's no accepted schema for mapping from a setting name to a pram bit, or vice versa. So one would have to write ones own, which would be long and tricky. A better option would be to follow the example of things like PRAM auto-restore and PRAM Guard, and just allow the user to save a "gold master" PRAM, which the INIT will then load at start time.

There's a slight gotcha, though, which is this: how does the software know whether it's already done its job or not?

For PRAM auto-restore and PRAM Guard, they don't need to bother. They don't restart after they've applied the PRAM update, they just carry on. So they never have to check their own work.

Force32, on the other hand, restarts the OS after it does its work, then it is loaded off disc again. So it needs to be able to check whether it should do its job and restart or just carry on, and with arbitrary PRAM patches, it would be trivial for it to end up in a reboot loop that would need preference editing to get out of.

On top of that, there are model-specific differences you then have to deal with, whether you have xPRAM or not, and whether it's even safe to load the stored PRAM image on another machine. So it renders the use case like @superjer2000 's impossible, because you're loading wholesale a whole PRAM image onto a machine it may not be suitable for.

So I think that a whole-PRAM restorer that does the restart trick would be useful, but Force32 is probably not that tool. Arbitrary settings also sound painful. I've been tempted to just add "force ethernet on too" ("Force32AndEthernet"?) as a conditional compilation and/or preference, just to keep it all simple. Would that do what you needed?
 

Crutch

Well-known member
The problem is that PRAM Auto-Restore also doesn't work for network interfaces, because by the time the INIT runs, the OS has already initialised network interfaces, and it doesn't re-read the PRAM. So I have been considering a Force32-alike that also allows setting network interfaces, but at that point things start getting a bit hairy...

Really? That is surprising - thanks for correcting me - but I am really surprised.

There has got to be a way to force a re-initialization of the network interfaces, surely? I have never looked into such a thing but I would bet a few dollars (or GBP!) that it’s possible …. It feels categorically less disruptive to the OS than changing the size of the memory map.
 

cheesestraws

Well-known member
Really? That is surprising - thanks for correcting me - but I am really surprised.

I was surprised too, so much so that I tried it on several machines to make sure I wasn't being an idiot (or at least to make it noticeably statistically less likely that I was being an idiot): but yes, the network stack is initialised before any INITs load, so just changing the PRAM under the network stack won't do anything at all useful, alas.

I have never looked into such a thing but I would bet a few dollars (or GBP!) that it’s possible

Oh, I'm sure it's totally possible: I just don't know how to do it. And apparently nor did the authors of any of the PRAM Auto-Restore / PRAM Guard etc (or it just didn't occur to them). If you find out how, I would love to hear about it!
 

superjer2000

Well-known member
Good idea!



I actually don't know what it would do—I haven't tried it. It should just set that bit in the PRAM and when it restarts check it again. But what I don't know is whether the earlier macs have that bit of the PRAM. If they don't, then it will continually fail and reboot—if they do, it will act as if it's doing something but it just won't. Did you let it reboot? What happened?



Yeah, this is a good idea. My impression is that a CPU check would be enough, just checking for the 68000—do you agree, or am I missing something?

Good question on whether or not it would keep restarting! I actually pulled the extension out before I could try it again so I don't know what would have happened if I left it in.

Fully agree that a CPU check would be good enough. I would think that anything that's on a 68000 could be safe to turn off. Not sure about a Mac II without a PMMU but those are probably pretty rare cases.
 

cheesestraws

Well-known member
@superjer2000 Can you give this version a try for me? This just checks whether we're an 020 or above, and if not it just displays a little "crossed out mac" subicon to show you're running it on an unsupported machine. I've checked it on emulators but can't check it on real hardware at the moment. If this works for you I'll update it on github.

Sorry for the .sit.zip, I think the new forum filetype whitelist might benefit from some tweaking...
 

Attachments

  • F32-000fix.sit.zip
    34.2 KB · Views: 10

cheesestraws

Well-known member
No hurry at all :). @PowerMac_G4 was kind enough to test it for me on a Classic so I'm reasonably sure the code is working, but I'd appreciate a trial on an SE in your use case as well.

(Also, if it's alright with you, when I start the new Force32 thread I'm going to link to this one for future feature requests, in the interests of keeping it the other thread readable in case I release more versions...)
 

superjer2000

Well-known member
No hurry at all :). @PowerMac_G4 was kind enough to test it for me on a Classic so I'm reasonably sure the code is working, but I'd appreciate a trial on an SE in your use case as well.

(Also, if it's alright with you, when I start the new Force32 thread I'm going to link to this one for future feature requests, in the interests of keeping it the other thread readable in case I release more versions...)
Works great! Thank you!! Please use this thread as you see fit.

Since requesting that update went really well and was turned around so quickly, my next feature request for Force32 would be to add on a web browser and a mail client that supports encryption. Please let me know when those features are added and I'll test!!
 

LaPorta

Well-known member
@cheesestraws If you accepting ideas for features, how much work would it be have a simple text file with the various parameters that are stored in PRAM, so that these could be read into PRAM on startup? For example, I'd like to retain the AppleTalk settings so that servers could be automatically loaded rather than having to connect manually each time.
It would be a great thing is I can remove as PRAM batteries as I can.
Are you running System 7 or higher? Shouldn't that be an option the first time you connect to them?
 

cheesestraws

Well-known member
Shouldn't that be an option the first time you connect to them?

The list of servers is stored on disc but what network interface to use is stored in PRAM, so it'll default to LocalTalk if you don't have a PRAM battery installed, which means all your startup connections will fail. Which is a right pain.
 

ArmorAlley

Well-known member
Are you running System 7 or higher? Shouldn't that be an option the first time you connect to them?
The SE & the IIfx have both System 6 & 7 (and the IIfx has 8.1 as well). If I can take out the one or two PRAM batteries and have it connect automatically to the network, that would be perfect. Ideally, both the SE & the IIfx will be System 6 machines without PRAM batteries. It doesn't seem possible at the moment.
 

LaPorta

Well-known member
Well, I just learned something. I don’t run my machines without PRAM batteries, so I never knew this!
 

cheesestraws

Well-known member
OK, here's an idea. What do people think of this as an idea for how to persist network interfaces:

  • There's a hypothetical version of Force32 called Force32+Net or something.
  • This version comes with a small application that copies the current network interface settings into a preferences file (because @Scott Squires won't let me write a self-modifying INIT, booooooo). People who have one can put this in the "Shutdown Items" folder; the rest of us will have to run it manually.
  • If that preferences file exists and needs applying at boot-time it will also be applied before the reboot.
I think this will do what @ArmorAlley needs? The network interface settings in the xPRAM don't actually seem to be documented anywhere that I can find so at least this way you get to use the Network control panel to fiddle with your settings...
 

Crutch

Well-known member
@cheesestraws funny. Yeah I’ve been looking for docs on the network interface settings in XPRAM also without success.

By the way you can I think call ShutDwnInstall at INIT time to add a shutdown procedure to copy the network settings to a little file so you don’t have to rely on a separate mini utility, right?
 

cheesestraws

Well-known member
By the way you can I think call ShutDwnInstall at INIT time to add a shutdown procedure to copy the network settings to a little file so you don’t have to rely on a separate mini utility, right?

I haven't actually done that before! Since Force32 isn't resident once its done its job, presumably I'd have to copy the shutdown routine into the system heap or something so it would be available at shutdown-time?

I kind of like Force32 not being resident so that the likelihood of it fighting with anything else is minimised, but I agree this would be the most convenient option...
 
Top