• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Force32: persistent 32-bit addressing without a PRAM battery (updates thread)

cheesestraws

Well-known member
It's time to resurrect the Force32 thread!

Force32 is a system extension that makes your Mac always run in 32-bit addressing mode, even without a PRAM battery. It works by, at startup, checking whether 32-bit addressing is turned on in the xPRAM; if it is turned off, it turns it on then restarts. This is essentially the same technique that System 7.6 uses.

Note that this won't magically enable 32-bit addressing on non-32bit clean machines: you still need MODE32 for that. This just keeps the flag in the PRAM turned on.

Attached below is a build of version 1.1: if anyone wants to try it out who isn't me I'd appreciate it. This version adds the following new things over version 1.0:
  • Quietly bails out instead of rebooting on 68000 machines (this feature requested by @superjer2000). This saves a pointless reboot on those machines because they can't do 32-bit addressing at all anyway.
  • Is now an 'scri' file instead of an 'INIT' file. This means it loads before most other extensions automatically, no need to muck about with the name any more. You can use ResEdit or Drop•Attribute or something like that to turn it back into an INIT (you only need to change the file type) if you want more control over where it loads, but most people want it to load first, to speed up the boot process.
  • Selfishly, I've revamped the way I store the source and build it so I (or you!) can now build it straight out of a git working copy, no need to muck about with SIT files for things with resource forks. This should make it a lot easier to work on in future if I can think of any more features.
This does not include the network-interface saving that several people have requested. I think I've worked out a neat way to do that, but it needs a bit of thought and it will likely be a separate extension.

As always, the source code is at https://github.com/cheesestraws/Force32
 

Attachments

  • Force32-1.1.sit
    3 KB · Views: 14
Last edited:

Crutch

Well-known member
Nice and tidy!

Curious, does CW glue up Gestalt so you can call it without the Gestalt Manager? It probably does. Otherwise you will of course crash under early versions of System 6. (THINK and MPW both provide glue to SysEnvirons for the relevant subset of selectors IIRC. It might even be in the universal headers somehow, I am curious now.)
 

cheesestraws

Well-known member
I was just thinking that yesterday: I think it does. Perhaps I should more gracefully bail out if I'm running before 7, as it's not like twiddling the 32-bit bit will do anything pre-system 7 (will it?)
 

tjjq44

Well-known member
Hi, I've been using PRAM auto restore for a while now, it's a great utility to avoid keeping a battery inside my macs! The only drawback is that I have to reboot once manually every time I want to use my mac since 32 bits addressing, mouse speed and other things need to be set before system loads.

That's where your great utility came to my mind, it has the ability to automatically reboot the mac whenever 32 bits addressing is not set. But it doesn't really checks for effective 32 bits addressing, it only checks the pram value... So if I load PRAM auto restore first, Force32 thinks 32 bits addressing is enabled and doesn't reboot automatically the mac, if I load PRAM auto restore after Force32, the mac reboots itself in 32 bits mode but all my other parameters aren't set until I make a last reboot manually...

Is it possible for you to modify Force32 to make a real check instead of a simple PRAM check? (Idea: in "about the finder" there is only 8M of RAM usable in 24 bits mode even if 32 bits addressing is already set in PRAM but not from start)

PS: I currently use system 7.1.1 mainly on a LC475.
 
Last edited:

Phipli

Well-known member
Hmmm, you're right, that's a good idea. Let me have a think about how that should work.
Is there a toolbox function you can check the availability of? Or the address of something in the memory map - does the stack or heap or something I forget work backwards from the top of memory in a way that is globally clear regardless of if you only have 8MB?

Do you get a useful error if you read a byte several gig into the address space 🤣
 

tjjq44

Well-known member
Hi, I thought of a different way to make the ideal init (for me) but except old Basic computers and Casio calculators my programming skills are close to absolute zero :(

see here
 
Top