• 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.

System memory use between 24-bit and 32-bit addressing

Spidey01

Well-known member
When my Duo 230 boots up, I've noticed this reported in the About screen:

24-bit addressing => System 7.5.5 uses about 18~19 MB of RAM.
32-bit addressing =>System 7.5.5 uses about 2.5~2.6 MB of RAM.

This machine has 24 MB of memory between onboard and expansion module. So this makes a pretty significant difference. Given the dead PRAM battery, enough that I'll usually change the setting and reboot if I'm using it for a length of time. Beyond that I don't seem to have any issues running in either mode and looks like the Duo 230s had a 32-bit clean ROM. Doesn't seem like anything is missing, although it seems odd that 24-bit mode can claim that much RAM is being used by the system.

I'm curious, does anyone know if there's anywhere that explains this phenomenon in some detail?
 

Crutch

Well-known member
You probably have 24MB of RAM installed right? (Edit - I just noticed you said that! Yeah makes sense)

With 24 bit addressing you can only use 8MB of RAM. The About screen is just conveying this to you by showing the System eating up all the rest.
 

Spidey01

Well-known member
Now that would make sense.

Running the math, a 24-bit address space can’t naturally address 24MB. Everything I’ve come across seems to suggest that classic Macs tend to memory map hardware into a relatively flat memory model which would constrain it further. Doesn’t seem like Apple was heavily into bank switching or setting up separate address spaces like some of the micros I’ve seen.

Another is memory reported free in 24-bit mode would consume the 8 MB limit if ’hard’ system memory use was about the same as reported in 32-bit mode.

Thanks for helping me make sense of this!
 

cheesestraws

Well-known member
I think this is a bit of a UI fail, honestly: it'd have been nicer to show this more like virtual memory is shown, with a note saying essentially 'this memory is currently unavailable because 32-bit addressing, but it is detected and functioning'. Showing it as memory the system is using is a bit bewildering, frankly. Not surprised people get confused by it. I did first time I encountered it.
 

olePigeon

Well-known member
A nifty extension might be one that converts any memory over 8MBs into a RAM Disk while you're in 24-bit mode.
 

NJRoadfan

Well-known member
I think the Portable can address RAM up to 9MB. Remember the 24-bit limit is 16MB, just that the rest above 8MB is reserved for ROM mapping and I/O. A RAM disk would work similar to how EMS memory works on a PC. You would lose a bit of RAM to the page frame though. One might also need a MMU (68030 or newer) too.
 

cheesestraws

Well-known member
A nifty extension might be one that converts any memory over 8MBs into a RAM Disk while you're in 24-bit mode.

I think the problem here is that you'd have to have a machine that's capable of 32-bit addressing mode anyway to be able to pull this off, because you'd need to temporarily switch to 32-bit mode to address that memory (I actually looked into this while looking at using chunks of the I/O address space in an SE/30 as a RAM disc; per Cards and Drivers the approved way of doing it is to use _SwapMMUMode to temporarily go into 32-bit mode when you need to...)

That said, perhaps it could be used on machines like the SE/30 where the ROM isn't 32-bit clean but the hardware can be 32-bit. But if you're going to do that, why not just install MODE32 and run in 32-bit mode? It'd be fun, but the effort-benefit tradeoff probably isn't high enough for anyone to actually build it :(
 

Spidey01

Well-known member
I think this is a bit of a UI fail, honestly: it'd have been nicer to show this more like virtual memory is shown, with a note saying essentially 'this memory is currently unavailable because 32-bit addressing, but it is detected and functioning'. Showing it as memory the system is using is a bit bewildering, frankly. Not surprised people get confused by it. I did first time I encountered it.

I think some kind of marker would be nice and far more intuitive. But to be fair a /!\ icon or something would have alarmed customers and at the time compatibility was probably a bigger deal than progress.

IIRC, the tech note for the duo said Apple was only offering 4MB and 8MB modules for this system and most I’ve come across look like 4 onboard, 8 expansion for a total of 12MB. I only ended up with 24MB because I found a third party module for about $20~$25 on eBay and had no clue what was in the Duo itself.

A nifty extension might be one that converts any memory over 8MBs into a RAM Disk while you're in 24-bit mode.

What I really need to do is replace the PRAM battery. None of the software I’ve loaded seems to mind 32-bit mode but system 7.5.5 boots to 24-bit on the Duo. The memory limit is more bothersome than system clock being useless. But hey, at least the pair of coin-cells didn’t leak!
 
Top