• 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 Feature Request

Crutch

Well-known member
Right exactly. It’d just be the typical INIT thing as if you were patching a trap and needed to keep the patch around.
  • One approach would be to compile the shutdown proc into a separate CODE resource, set the System Heap bit on it (so it’s automatically loaded into the system heap), call GetResource then DetachResource on it, HLock it, dereference it, and pass that pointer to ShutDwnInstall.
  • The other (which is probably easier since the Force32 code is probably small) is just keep your whole INIT around in the system heap by calling RecoverHandle then DetachResource on it. This awesome MacTech article talks about the relevant details including how to access your INIT file post-startup so you can access/save settings in the data fork and not worry about preference files: http://preserve.mactech.com/articles/mactech/Vol.05/05.10/INITinC/index.html
It shouldn’t fight with anything, you’re just allocating a block in the system heap. By the way the above-linked article is, I think, the best article MacTech ever published. Absolutely packed with everything you need to know about writing INITs.
 

cheesestraws

Well-known member
This awesome MacTech article talks about the relevant details...

That's the article I was trying to remember where I'd seen. Thankyou!

Also this seems an appropriate point in general to say thanks for all the help—your ambient presence and your replies to me and other people have all been really useful in helping me get back into programming for the classic Mac, and at a deeper and better level than I did when I was a teenager and trying to do it :).
 

Crutch

Well-known member
Why thank you! And I should add that I’ve very much enjoyed your contributions to the forums also - making it a more engaging and intersting place. I consider myself very fortunate to be able to engage in fun discussions on Mac Toolbox programming 30something years after I first became obsessed with it as a kid, and have this terrific community to thank for that.
 

Aeroform

Well-known member
Hi @cheesestraws Any update re: Force32+Net? It seems like exactly the last thing I'd need to run completely battery less. Let me know if there's anything I can do to help make it happen.
 

cheesestraws

Well-known member
Any update re: Force32+Net?

Hello! I don't have an update on this yet—I haven't really had the time or energy, unfortunately, nor still do I have a really clear idea of how to go about it (although having written a couple more extensions in the last couple of months, I'm feeling a bit more equipped to do so). What you can do is exactly what you have done, remind me that it would be useful to people, because writing useful software is much easier to motivate myself to do than writing useless software. :)

If you have time, writing up how you would like it to work from a user's perspective would also be kind of helpful (its own control panel? explicit saving or automatic? etc), as that will obviously go into working out how to implement it.
 

Aeroform

Well-known member
Completely understand. I’m fairly good at nagging with two small kids at home so can contribute on that point :)

In terms of user feedback, I feel like most users would be tech savvy, and just needs it to work. As a bare minimal, either a couple of pre compiled versions or a simple pref/settings file with manual editing would do. It seems like a mostly set it and forget it kind of thing. Me myself would be more than happy with a “Force32&Ethernet” 😄.

The next step up from my perspective would be a control panel or standalone app with a few simple choices and a save / active button.

The dream scenario would be a full PRAM “reset” utillity, covering all settings and reapplying at boot/reboot. Here I picture an auto-state save at shutdown or perhaps a manual “master” save based on current setting would be easy from a UX perspective.

I believe in the KISS principle, as well as lazy coding as long as it works 😂
 
Top