Jump to content

Force32: keep 32-bit addressing on in the absence of a PRAM battery. Testing wanted!


Recommended Posts

  • 68kMLA Supporter

Here's an extension I knocked up quickly to make people's lives easier who have lots of RAM but no PRAM batteries.  It essentially emulates the 7.6 trick:

 

  • If you're booting and 32-bit addressing is enabled, it doesn't do anything, just displays its icon with a 'yes' on it.
  • If you're booting and 24-bit addressing is disabled, it displays its icon with a 'no' on it, enables 32-bit addressing then restarts.

 

Note that it doesn't do any actual safety checking; it's up to you to make sure that you are installing this on a machine that is actually capable of 32-bit addressing (and yes, at least for me it's been playing nicely with MODE32 on an SE/30).

 

Testers wanted!  There's a disc image attached to this post with the extension in.

 

Source code review is also wanted!  This is actually the first INIT I've written, so I wouldn't be surprised if something needed fixing.  @Crutch, if you have time, I'd especially like you to have a look?  Any other comments are also very welcome.

Force32.dsk

Link to post
Share on other sites

Neat! As I've got an SE/30 out at the moment with 20MB and no pram battery, I put your extension in there and it's done as you have described. Thanks for putting this together!

Edited by MJ313
Link to post
Share on other sites
  • 68kMLA Supporter
19 hours ago, Crutch said:

What a great idea!

 

It was @Bolle's idea, I just thought I'd have a go at building it :-)

 

19 hours ago, Crutch said:

I will check it out shortly

 

I just realised I totally failed to link to the source code.   Here it is:

 

https://github.com/cheesestraws/Force32

Link to post
Share on other sites
  • 68kMLA Supporter

That is pretty nifty.  Code looks solid and nice and simple as it should be!

 

One question, since you coded in C, any reason you didn’t call Restart() to reboot?  Not in ROM but I’d imagine your C environment includes it, as it’s a standard high level routine.  (Officially by the time of Inside Mac V one would use ShutDwnStart(), but that’s also not in ROM and maybe doesn’t work at INIT time, I haven’t tried.)

 

I didn’t know much about XPRAM (nice find on that approach) so did some Googling, your (indirect, via hard coding the trap number in asm) use of _ReadXPRAM isn’t one I was familiar with.  Apparently it’s listed in all the official trap number lists (including in the appendix of Inside Mac VI) but not documented anywhere that I could find.  I enjoyed finding this old Apple head “TrapsPrivate.h” which lists traps “not for use by developers”, including this one .... I wonder if we will find any other goodies in here?

 

http://toddp.com/classic/Software Install/Apple Source Code/System 7.1 Source/Internal/C/TrapsPrivate.h

Link to post
Share on other sites
  • 68kMLA Supporter
19 hours ago, Crutch said:

One question, since you coded in C, any reason you didn’t call Restart() to reboot?  Not in ROM but I’d imagine your C environment includes it, as it’s a standard high level routine.

 

Mostly because I'm pretty sure the version of CW I'm working with has universal headers, and I was lazy, and it was quicker to just copy the ASM routine out of Inside Macintosh II than try to work out where it was "officially".  Also since it wasn't documented in the revised IM I wasn't sure whether it would even be in there, so I took the easy way out.

 

19 hours ago, Crutch said:

I enjoyed finding this old Apple head “TrapsPrivate.h” which lists traps “not for use by developers”, including this one .... I wonder if we will find any other goodies in here?

 

Ooh, I haven't seen that one before.  Time to have a bit of a dig...

Link to post
Share on other sites
  • 68kMLA Supporter
Posted (edited)

I'll just leave this here:


IpuBMm3.gif

(apologies for the weird dithering... I mocked this up in Photoshop, but am more adept with AfterEffects, so the translation from actual 256 to H.264 MP4 back to Macintosh palette GIF is to blame :P. I'm going to be throwing together everything in a ResEdit file for cheesey in the next while here)
The static final frame, without the garbage dithering...
evgreAO.gif

Edited by jessenator
Link to post
Share on other sites

@jessenator  I like how yours animates.  If I was any good at that, I think I'd have the Cop Badge spin on mine, then maybe twinkle with a shine. :)

 

Edit:  The colors are messed up on mine.  I think it's color correcting.  Purple should be more vibrant.  Looks nicer in System 7.

 

Edited by olePigeon
Link to post
Share on other sites
  • 68kMLA Supporter

Tested on my SE/30 with Daystar 030 (the accelerator should not affect this, but its good to know it works with an accelerated Mac too).

 

The only thing I found is that, if you had VM on, and reboot with 32-bit addressing off, Force32 will turn 32-bit addressing on after an automatic restart, and then VM will be on but will require another restart to work. Cheesey explained why this is but I've already forgotten...

Link to post
Share on other sites
  • 68kMLA Supporter
22 hours ago, joshc said:

Cheesey explained why this is but I've already forgotten...

 

tl;dr is that I think the Memory control panel does something clever to turn on VM and 32-bit mode at the same time, and I really don't fancy wading deeply into that.  I'll look into it if it annoys enough people, but I'd prefer to give the old Apple MPW answer: "buy more RAM" ;-)

Link to post
Share on other sites
  • 68kMLA Supporter
21 hours ago, olePigeon said:

Be my guest.


Thanks!
 

R2Kb1qz.gif

 

Took a few liberties: darkened the text, punched up the crest with some warm tones, more gradation, made the 32's "wings" lighter than "32" itself.
(And I actually decided to just use the frame animation tool in Photoshop this time: it'll make export much simpler.)

px6oV8X.png

Link to post
Share on other sites

Me too!

 

Although this doesn't affect me directly (I don't use any of my machines enough to be bothered by 32-bit addressing resetting after powering off without a PRAM battery), but it's nevertheless a clever idea, and I really like it!

 

I especially like @olePigeon's fancy icon (and @jessenator's neat animation of it).  It's classy and fun.

 

Keep up the good work!

 

c

 

p.s., Rather than extending and complicating this extension, I wonder if a separate extension for enabling VM might be useful?  Perhaps with a little bit of glue so they don't conflict with one another?

Link to post
Share on other sites

I could of really used this back when I had a Mac Iivx with a missing PRAM battery as it had the full 72MB of RAM. but that Mac is gone and my quadra 660av is 32-bit only. I assume if I try it anyways, it will always report 32-bit mode?!

Link to post
Share on other sites
  • 68kMLA Supporter
On 3/18/2021 at 8:58 AM, maditgeek said:

I assume if I try it anyways, it will always report 32-bit mode?!

 

I actually don't know how always being in 32-bit mode is implemented in those machines.  It could do one of two things:

  • If those two bits are always set in the xPRAM, or are set very early in system boot it will always say 'yes'.  (I expect this is what's happening).
  • If those two bits are not always set but the system just ignores them, it will look like it's turning it on and act as if it is, but it won't actually do anything.

If that makes sense?

Link to post
Share on other sites
  • 3 weeks later...
  • 68kMLA Supporter

Just installed the version in the first message- works awesome!  Any concerns about forcing a restart when it does (from a file system or other corruption perspective)?  (i.e. it's not a clean shutdown/restart but a restart in the middle of booting?)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...