How to zap pram from SheepShaver preferences pane?

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

How to zap pram from SheepShaver preferences pane?

Post by emendelson »

I'm working on a custom build of SheepShaver and I would like it to have an option on the Preferences panel to zap the PRAM. This would work this way: it would delete the ~/.sheepshaver_nvram file and then set a flag that tells SheepShaver NOT to write a new PRAM file when it exits.

There's a function named ZapPRAM already in the code, but it doesn't seem to do anything. I think I've managed to create a function named DeleteXPRAM that works like LoadXPRAM, but removes the file instead of reading it, but I haven't been able to test whether it works because I don't know enough.

Has anyone already worked on this problem? The old GTK prefs file deleted the PRAM file before launching SheepShaver, but the built-in prefs are only available after SheepShaver starts, so it needs to do something more complicated.

If anyone has any insights, I'll be grateful.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: How to zap pram from SheepShaver preferences pane?

Post by Ronald P. Regensburg »

emendelson wrote:but I haven't been able to test whether it works because I don't know enough.
Can't you check this while viewing the home folder with hidden files visible? You can see the nvram file disappear and/or re-appear in the home folder window.

(BTW: In latest couple of macOS versions you can toggle visibility of hidden files in the frontmost Finder window with command-shift-. (command-shift-dot).)
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: How to zap pram from SheepShaver preferences pane?

Post by emendelson »

Ronald P. Regensburg wrote:
emendelson wrote:but I haven't been able to test whether it works because I don't know enough.
Can't you check this while viewing the home folder with hidden files visible? You can see the nvram file disappear and/or re-appear in the home folder window.

(BTW: In latest couple of macOS versions you can toggle visibility of hidden files in the frontmost Finder window with command-shift-. (command-shift-dot).)
Apologies for being unclear: I meant only that I wasn't able to figure out exactly how to run that routine. As you say, it's easy to figure out whether the file has been deleted or not!
Post Reply