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

Quadra 630 does not support 24-bit memory addressing mode

David Cook

Well-known member
Low End Mac claims the Apple Macintosh Quadra 630 (including variants LC 630, Performa 630, Performa 580) supports both 24 and 32 bit memory addressing modes (https://lowendmac.com/1994/quadra-630/). Some other sites have suggested as much.

I have tried with a number of combinations:
OSs: Mac OS 7.1.2P w/enabler, OS 7.5.5
Memory: 4 MB, 8 MB, 12 MB, 196 MB (full)
CPUs: 68LC040, 68040 full
Disks: External SCSI, internal ATA
Boards: 820-0624-A dual SIMM 067C 32F2 ROM, 820-0548-B single SIMM 067C 32F2 ROM
Good PRAM battery with PRAM reset prior to attempts
No communication, LC PDS, or video input cards

With stock Mac OS 7.1.2P w/enabler and 7.5.5, the memory control does not display the choice for 24-bit/32-bit mode (see below). The choice is unavailable regardless of whether the Quadra 630 has 4 MB (no memory SIMM), 8 MB (onboard + 4 MB SIMM), or more memory installed.

Memory-Control-Panel-OS-7.1.2P.png

Substituting the Memory Control Panel from Macintosh OS 7.1 into OS 7.1.2P, the choice is displayed. Selecting 24-bit mode and restarting results in the computer still booting in 32-mode only, and the control panel shows the choice has automatically switched back to 32-bit.

Memory-Control-Panel-OS-7.1-24-bit-mode.png

Examining the code differences (Michael Hecht's ResCompare v2.6 is incredible) between the two versions of the Memory control panel shows the addition of a subroutine in 7.1.2/7.5.5 that does not exist in 7.1. This routine looks at the ROM version to determine whether to display the memory mode choice.

As you can see below, if the ROM's major version is 0x077D then no choice is offered. Also, if the ROM's major version is 0x067C and the high byte of the minor version is 0x32, then no choice is offered.

Memory-ROM-Version-Check.PNG
Aside: This is poor programming practice. There should be a flag/gestalt rather than relying on the ROM version. I guess they check for 'equals' not 'equals or greater than' because future ROMs might have 24-bit mode?

Looking at the list of ROM versions (http://mess.redump.net/mess/driver_info/mac_technical_notes/), we can see that all of the Power Macintosh computers, as well as the Quadra 660av/840av had ROM major version 077D. The Quadra 630 series, as well as the Performa/LC 580 series, have ROM version major 067C with minor versions of 32F1 and 32F2 respectively.

So, Apple's Memory Control panel specifically excludes these machines from being given a choice of switching to 24-bit addressing.

Modifying the 7.1.2P Memory control panel software (Anon83+$003D: 01->00) to exclude the ROM check simply results in the same outcome as substituting the Memory Control Panel from System 7.1. That is, you can make the 24-bit choice, reboot, and yet the machine is in 32-bit addressing.

Therefore, I conclude that the Quadra 630 is not 24-bit compatible. If anyone is able to get their Quadra/Performa/LC 630 series computer into 24-bit mode, I sure would appreciate being told how.
 

MacKilRoy

Well-known member
Just curious, are you testing the 7.1 control panel on System 7.1, or are you using a later System software version, but inserting the 7.1 control panel?
 

Byte Knight

Well-known member
I found this out the hard way when I bought a Quadra 630 thinking that it would be compatible with the IIe card. I was never able to figure out a workaround...
 

MacKilRoy

Well-known member
This is very interesting. I had long thought all 68k Macs were compatible with 24-bit memory addressing. Learn something new every day.

I wonder if this is a result of the logic board design from the 630 being used on the 6200 series with PowerPC processors. Perhaps Apple didn't slap a 603 PPC CPU on the 630's logic board, but in fact shoehorned a 68040 processor onto a PowerPC logic board. To me, that actually makes more sense now.

Here's a good page filled with info on the Apple IIe card, which requires 24-bit addressing. Note, the 630-series machines is absent from the compatibility list. More proof that it does not support 24-bit addressing, which is a requirement for the IIe card.

 

Crutch

Well-known member
Nice sleuthing @David Cook . I also assumed all 68k Macs could run in 24-bit mode.

Aside: This is poor programming practice. There should be a flag/gestalt rather than relying on the ROM version. I guess they check for 'equals' not 'equals or greater than' because future ROMs might have 24-bit mode?

Bad programming practice for you or me, maybe, but I think Apple gIves itself a pass in the system software! The requisite Gestalt selector may not have existed (after all, user code was never supposed to change the addressing mode setting so why allow it to check if doing so is possible?) and Apple probably assumed that whenever a new ROM version was introduced, that would mean a new Mac with an appropriate system software update to reflect whatever was necessary in this bit of the Memory cdev. After all, what kind of person copies the Memory cdev from one system install version to another? 😀
 

cheesestraws

Well-known member
This is some really good detective work :)

Aside: This is poor programming practice
Bad programming practice for you or me, maybe, but I think Apple gIves itself a pass in the system software!

I'm somewhere between you here, for what little my opinion is worth; had this been in the core of the system software, where no assumptions could be made, I'd agree. But the lack of good abstractions between the core and the periphery of the System is one of the reasons that the whole thing became so unwieldy later, and in microcosm demonstrates why it all became so difficult to maintain and iterate on.

That said, it's easy to relitigate this kind of thing in hindsight...
 

David Cook

Well-known member
Just curious, are you testing the 7.1 control panel on System 7.1, or are you using a later System software version, but inserting the 7.1 control panel?
I did that latter case (put 7.1 Memory in 7.1.2P system folder). As another test, I also ran the 7.1 control panel outside of the 7.1.2P System Folder, just to get it to clear the 0 and 2 PRAM bits at $8A. That's how it signals the switch to 24-bit mode.
 

David Cook

Well-known member
Apple agrees with you, only 32 bit is supported:

As an example, here’s the page for the Quadra 650, which does support both modes:

Yes! I saw that. The reason I didn't cite Apple was because that technical specification says there is only 1 RAM slot and the maximum memory is limited to 32 MB. In reality, the two RAM slot board shipped in later Quadra/Performa 63x cases and the maximum RAM is 196 MB. So, I hoped Apple was understating the 24-bit mode potential as well. : )
 

David Cook

Well-known member
I found this out the hard way when I bought a Quadra 630 thinking that it would be compatible with the IIe card. I was never able to figure out a workaround...

Tell it to me brother! That was exactly what I did. I put all this effort into trying to force 24-bit mode because I wanted to run the Apple IIe card. I even hacked the Apple IIe Startup software to skip the memory mode check -- it just crashes.
 

David Cook

Well-known member
Nice sleuthing @David Cook . I also assumed all 68k Macs could run in 24-bit mode.



Bad programming practice for you or me, maybe, but I think Apple gIves itself a pass in the system software! The requisite Gestalt selector may not have existed (after all, user code was never supposed to change the addressing mode setting so why allow it to check if doing so is possible?) and Apple probably assumed that whenever a new ROM version was introduced, that would mean a new Mac with an appropriate system software update to reflect whatever was necessary in this bit of the Memory cdev. After all, what kind of person copies the Memory cdev from one system install version to another? 😀

Indeed. Sadly, the perfect Gestalt did exist for this:

addr (System [6.0.4])
gestaltAddressingModeAttr
Returns information about the current addressing mode.

enum {
#define gestaltAddressingModeAttr 'addr' /* addressing mode attr. */
gestalt32BitAddressing = 0, /* started up with 32-bit addr. */
gestalt32BitSysZone = 1, /* system heap has 32-bit clean
block headers */
gestalt32BitCapable = 2}; /* machine is 32-bit capable */

They simply should have added gestalt24bitCapable=3. They could have done so in the ROM or System Enabler.
 

David Cook

Well-known member
is one of the reasons that the whole thing became so unwieldy later, and in microcosm demonstrates why it all became so difficult to maintain and iterate on.

That brings up another avenue I pursued. I looked through the leaked ROM source code. Lots of references to ending support for 24-bit mode. For example, there is a make file compiler directive of Supports24Bit that prevents the inclusion of some routines. However, the file header comments show there is a lot of back and forth on using that. One programmer adds the directive, another programmer removes the directive (it changes four times in one file alone). In the end, it appears they decided to leave at least some (all?) of the 24-bit code in (for compatability), but simply not honor the 24-bit mode bits in PRAM when initializing the Memory Manager.

Unfortunately for me, the leaked source is 4-6 months before the release of the Quadra 630. I have compiled certain portions of the source and compared it to the Quadra 630 ROM and there are significant changes.
 

David Cook

Well-known member
Ah, fair enough. Awesome detective work, sorry your IIe card won’t work as a result!

An LC III just arrived at my doorstep. I'll clean up some battery leakage, recap, add MMU, add VRAM, and boost to 33 MHz. And then..... we'll see what the Apple IIe Card can do!
 

Byte Knight

Well-known member
An LC III just arrived at my doorstep. I'll clean up some battery leakage, recap, add MMU, add VRAM, and boost to 33 MHz. And then..... we'll see what the Apple IIe Card can do!
That's what I did, then replaced the logic board with a Quadra 605 and upgraded to CPU to 40 MHz. One of the fastest IIe card-compatible Macs out there!
 

dan.dem

Well-known member
I remember our rule of thumb: If the internal hard disk is IDE the Mac requires 32-bit addressing. The av-Quadras using an internal SCSI-disk are the exception of the rule. This may have something to do with av-Macs considered professional class Macs, and the simpler IDE controller puts more stress on the CPU... if I get this right.
 

Tarantulas

Well-known member
Tell it to me brother! That was exactly what I did. I put all this effort into trying to force 24-bit mode because I wanted to run the Apple IIe card. I even hacked the Apple IIe Startup software to skip the memory mode check -- it just crashes.
How did you accomplish that?
 

David Cook

Well-known member
How did you accomplish that?

My usual process is to run an application and generate the offending alert. Then, break into Macsbug and scroll backwards in the code or the stack to see what code generated the alert box.

1661960113295.png

After I identify the likely code location, I open the application in ResEdit for deeper investigation and alteration. In this case, we see a 'gotcha' line of code at address 0057A (highlighted in yellow below). The constant value 'addr' is being pushed on the stack. That constant is used to determine addressing mode in Gestalt.

1661960314292.png

The code then jumps to a routine at CODE,1+$632A which contains a safe wrapper of the Gestalt function. Upon return, if there is an error code (non-zero), the application continues assuming it must be a 24-bit system. The gestalt selector 'addr' was introduced in System 6.0.4, which is the earliest system supporting the 32-bit clean ROM (Mac IIci) computer.

Assuming no error is returned by the Gestalt wrapper call, the code checks the least-significant bit of the 'addr' return value, which indicates whether the machine is in 32-bit mode. If the result is zero (BEQ), then the machine must be in 24-bit mode and the application jumps to address 0005A2 (green arrow above) and runs as normal.

1661960888697.png

If instead the machine is in 32-bit mode, then the application loads the constant #$2E (which is 46 decimal) and calls another subroutine. No surprise, STR# 128 index 46 is the error message to indicate 32-bit addressing must be turned off. That confirms we definitely have the right section of code.

By altering one of the previous branches or compares, we can cause the application to always believe the machine is in 24-bit mode and run anyway. Sadly, this is where I determined that the IIe software would eventually crash, suggesting the code is indeed not 32-bit clean.

There is a nefarious scenario where the programmers intentionally crash the application in later code. If we had just bypassed some copy protection, I would assume that I had not completely removed all of the checks. In this case, I believe Apple just didn't want to invest in updating the code (and maybe hardware?) to be 32-bit clean.

Let me know if you have any questions,

- David
 

Tarantulas

Well-known member
My usual process is to run an application and generate the offending alert. Then, break into Macsbug and scroll backwards in the code or the stack to see what code generated the alert box.

View attachment 45813

After I identify the likely code location, I open the application in ResEdit for deeper investigation and alteration. In this case, we see a 'gotcha' line of code at address 0057A (highlighted in yellow below). The constant value 'addr' is being pushed on the stack. That constant is used to determine addressing mode in Gestalt.

View attachment 45814

The code then jumps to a routine at CODE,1+$632A which contains a safe wrapper of the Gestalt function. Upon return, if there is an error code (non-zero), the application continues assuming it must be a 24-bit system. The gestalt selector 'addr' was introduced in System 6.0.4, which is the earliest system supporting the 32-bit clean ROM (Mac IIci) computer.

Assuming no error is returned by the Gestalt wrapper call, the code checks the least-significant bit of the 'addr' return value, which indicates whether the machine is in 32-bit mode. If the result is zero (BEQ), then the machine must be in 24-bit mode and the application jumps to address 0005A2 (green arrow above) and runs as normal.

View attachment 45815

If instead the machine is in 32-bit mode, then the application loads the constant #$2E (which is 46 decimal) and calls another subroutine. No surprise, STR# 128 index 46 is the error message to indicate 32-bit addressing must be turned off. That confirms we definitely have the right section of code.

By altering one of the previous branches or compares, we can cause the application to always believe the machine is in 24-bit mode and run anyway. Sadly, this is where I determined that the IIe software would eventually crash, suggesting the code is indeed not 32-bit clean.

There is a nefarious scenario where the programmers intentionally crash the application in later code. If we had just bypassed some copy protection, I would assume that I had not completely removed all of the checks. In this case, I believe Apple just didn't want to invest in updating the code (and maybe hardware?) to be 32-bit clean.

Let me know if you have any questions,

- David

What’s required to get the app 32bit clean?
 
Top