| Click here to select a new forum. |
| Read/Write PRAM and xPRAM |
Posted by: joevt on 2025-12-30 00:18:14 Some XPRAM notes at https://68kmla.org/bb/threads/skipping-the-startup-memory-test.50699/post-570896 |
Posted by: frontein1 on 2025-12-30 15:43:59 I honestly can't remember where I pulled this document from, so I cannot give credit to the source. I think I may have edited it anyway. But this has been really helpful for me.
Also PRAM Doctor really is a great tool. Not only can you view ALL PRAM/xPRAM settings, but you can also directly edit them in there. So in this case, get your PRAM setup like you want, then go into PRAM Doctor and capture the settings. |
Posted by: joevt on 2025-12-30 15:51:04
I honestly can't remember where I pulled this document from https://68kmla.org/bb/threads/read-write-pram-and-xpram.47196/post-578967 |
Posted by: David Cook on 2025-12-30 16:49:05
PRAM Doctor really is a great tool
Where can I find a copy of that? |
Posted by: frontein1 on 2025-12-30 18:50:15 PRAM Doctor is part of this combined download. You can mount this in an emulator like Basilisk then scrape out the program from there. There are three pages, and on each page you can hold down Command-Option to modify the values. Then you can "write" the value back to PRAM.
|
Posted by: frontein1 on 2025-12-30 19:02:06
What I also found out: "Pram Doctor" is not suitable. Maybe it's way too old. Sometimes the saved PRAM data contains strings from system menus or even displayed text. So I ditched that app for comparison etc. I have run into this issue with PRAM Doctor as well. Trying to remember the details, but it might have been on a PowerBook 540c perhaps? But generally for my other 030s and 040s it has worked pretty well. |
Posted by: David Cook on 2025-12-30 21:39:08 Thank you @frontein1 |
Posted by: Smallindividual on 2026-06-02 18:08:24
Hello folks!
I recently bought a PowerBook Wallstreet/PDQ. Of course the PRAM battery is dead. That's nothing too bad but since I'm a software guy I thought that it should be possible to save the (x)PRAM to disk on shutdown and restore it after reboot if a PRAM reset is detected (e.g. year < 2024 or year >= 2039). So the last volume settings, display brightness, region (Date & Time) and so on are restored.
I know there are some solutions to achieve my needs but... Where's the fun part when just using them? 😄 I really want to understand things how they were done back in the days.
Btw: "PRAM-Reader" (https://macintoshgarden.org/apps/pram-reader) doesn't work at all. Restoring the saved state leads to a black screen and a complete hang.
What I've found out:
- "Old" PRAM is 20bytes, "extended" PRAM is 236bytes (according to "Inside Macintosh, Parameter RAM Utilities", from 1994).
- Getting the pointer for the PRAM is done by using "GetSysPPtr".
- Changing values is done by changing them directly in memory.
- Saving is done by using "WriteParam".
The documentation seems to work with the first 20 bytes (reading and writing works). But the extended PRAM doesn't seem to be directly after these 20 bytes. Reading 256 bytes and then writing them back causes crashes, hangs and so on.
And here comes the tricky part: I want to do everything in REALbasic! (That's the language I'm most familiar with on Mac.)
I hope someone out there has some advice for me. 🙂
Thank you all!
Mike I'm having an issue where I can't boot Adelie on my PowerMac G4 because it can't read XPRAM to get the date and time I think |
| < 2 |