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

How does a Mac know which one it is?

Trash80toHP_Mini

NIGHT STALKER
Gonna break it down:

I'm assuming the Mad ID information isn't stored in the ROM?

There are switches on Centris/Quadra 650 boards that tell the OD it's really a  Quadra 800 when installed in that chassis.

What's the general mechanism for model verification for the OS?

Is is sometimes a chipset poll done at startup from ROM encoded instructions?

If that's the case, can the loop be hacked to return a viable, but false ID to the OS?

Sounds like Inside Macintosh territory, so there's no clue to be found anywhere near here. :blink:

 

Gorgonops

Moderator
Staff member
If that's the case, can the loop be hacked to return a viable, but false ID to the OS?
Isn't that just what the "Wish I were..." extension does?

As to the rest of the questions, search me. The Apple KB articles that turn up basically handwave at a pile of "Gestalt ID selector" hooks documented in the Inside Macintosh books that apparently poke at various parts of the hardware that each return some sort of numeric that ultimately ends up all summed together into an answer, but what's poked and how the answer is interpreted it apparently pretty arbitrary. (One KB notes that, for instance, in System 7.0.something a Macintosh LC and LCII return the same Gestalt ID because the selectors called don't bother telling the difference between a 68020 and a 68030, but later versions do, therefore the Gestalt ID for the LCII changes.) I have a vague memory from some of the overclocking and Color Classic pages that in some cases changing the CPU speed or combining a logic board with a chassis it doesn't expect can cause the selectors to add up to numbers that don't have "official" machine types in the OS'es table, and usually that's bad.

Maybe try looking in the various model-specific "Developer Notes" and see if you find any reference to some sort of configuration register common between models that has sense lines terminating in places like case headers?

 

Scott Baret

Well-known member
Along that line, Performa generally register as their equivalent. I'm pretty sure a Performa 200 with 7.1 (not 7.1P) will register as a Classic II. (I do have a P200 and can test this sometime).

The 7.0 glitch is likely due to the fact the LCII was released after 7.0.1; therefore, there is no unique identifier for it until 7.1 itself (since there was no incremental update to accommodate the LCII).

I know there's also something in the enablers. I may be wrong on this, but I think it's the Quadra and Centris 660AV that have different enablers depending on their names. Apparently a Centris will register as a Quadra with the newer enabler.

 

ScutBoy

Well-known member
I was always impressed when you re-installed the OS on the Clamshell iBooks, the theme was the same color as the iBook - if you had the orange one the theme was orange, if you had the blue one the theme was blue, etc.

I never had the chance to swap a board to a different color machine and see what happened [:)] ]'>

 

Trash80toHP_Mini

NIGHT STALKER
I may need to get my SE/30 to wish it were a IIsi, IIci or even a IIfx so the PowerCache Accelerator could possibly utilize system resources differently than the OS might allow without that ID change. Bus mastering foibles of the stock SE/30's PDS appear to be the stumbling block that bars running the IIsi NuBus Adapter or any other bus mastering capable NuBus Chipset.

TI made (makes or has NOS?) a NuBus controller matched to the TI Nubus Mux Transceivers Apple used from about IIcx to DuoDock I, IIsi adapter inclusive. That Controller can be set up in slave only mode, which still allows for some very cool NuBus cards to inhabit the bucket  .  .  . if not my JackHammer. :-/

@ G: thanks for reminding me of I Wish I Were! An init/extension/whatever software hack would be the best possible solution I would think.

 
Last edited by a moderator:

Cory5412

Daring Pioneer of the Future
Staff member
To put a name on what Gorgonps was referring to, the ID number stored in the ROM is the gestalt ID. Each system as built knows what it is. 
 
It's to the level where the 6360, 6400, and 6500 have uniqe IDs. For exaple:
gestaltPerforma6400      = 58;     { Macintosh Performa 6400/180, 6400/200 }
gestaltPerforma6360      = 58;     { Macintosh Performa 6360/160 }

From http://www.emaculation.com/forum/viewtopic.php?f=1&t=8836(the 6500 isn't on that list but it had its own. The TAM almost certainly had its own.)

 

Cory5412

Daring Pioneer of the Future
Staff member
Actually nevermind, I see both of those say 58. There must have been some sort of sub-ID. perhaps the 6350 was 58.1 and the 6400 was 58.2 or something like that. Perhaps the ROM can read the CPU speed and go "ok well /160 is a 6360 and /180 is a 6400".

 

Cory5412

Daring Pioneer of the Future
Staff member
Wish I Were probably won't change how a machine's chipset actually handles physical resources. The main reason that tool exists is to install system 8.0 on powerful '030-based Macs that were suspected of being capable of 8.

 

Trash80toHP_Mini

NIGHT STALKER
Yep, wasn't it, or something like it also used to install OSX where it doesn't really belong?

I'm not expecting the SE/30 Proc/ChipSet to grow wings or anything. I'm hoping that the PowerCache CPU operations are flexible enough running the OS out of the toolbox of one of the more capable, compatible 32bit clean ROM SIMMs so that a NuBus Chipset on ITS processor bus (the PDS) on its adapter kluge might be handled more like NuBus is handled on the IIsi, sidestepping known issues on the stock SE/30 PDS.

Turning over, searching under every slimy, slippery rock I can find in Apple's fetid stream of planned incompatibility. :ph34r:

 
Last edited by a moderator:

Cory5412

Daring Pioneer of the Future
Staff member
OS X would have been done using some different tools, but it would be similar.

The problem with wish-i-were for what you want is that it's extremely temporary. It pretty much only does the trick for one boot cycle at a time. Your system has to be able to come up entirely for wish-i-were to do anything, and most of what wish-i-were was for was tricking OS 8 and certain application installers into running. Your OS8 install would have to be done from a booted system 7 environment.

Also, I found out I was wrong above: The gestalt ID isn't stored in the ROM of each individual Mac. Instead, there's a routine in the ROM that calculates the gestalt ID each startup based on the hardware that is discovered when the machine is booting up. This is probably also how, say, System Profiler knows the difference between a 6360 and a 6400. (And some other machines that share ID numbers.)

 

Trash80toHP_Mini

NIGHT STALKER
That jibes with what I'd been thinking. There almost has to be something on the order of an equivalency table for the sum of the parts to be identified as a specific model. dougg3 found the places to change sounds and the like. Something similar may need to be done to solve the NuBus Conundrum.

I may be overthinking it. Sometimes I wonder if the PowerCache even cares about the ID of the Mac in which it is installed? It might do its own polling of resources and upon discovery of a NuBus Chipset, just deal with it in its own very flexible fashion from within generic Slot Manager routines?

One can hope, we'll see what happens when I finally get my hands on an adapter for my 50MHz Universal PowerCache. In the meantime, this discussion is fascinating.

 

Scott Baret

Well-known member
OK, now I'm really curious about the older Performae. I know my 200 has the original logic board inside (not a transplant from a Classic II). I'd like to see what it registers as not only with About This Macintosh on a regular 7.1 install, but also on the diagnostic tools which give a model name.

Along that line, what if the Performa system software was running on my Classic II? Perhaps I should swap their hard drives to see what happens.

I'm also curious about the colors now...good observation on the iBooks, I've seen this happen with both the iBooks and iMacs. To prove there is something on the board for this, I tried a system restore on my Blueberry iBook with my Tangerine's CD. Sure enough, the new install had a blue desktop pattern.

Of course, this practice continues. A blue iPod shows up as being blue in iTunes, a rose gold iPhone shows up rose gold.

 

CC_333

Well-known member
I think I read somewhere recently that the installer determines which color a Mac (or iDevice) is by looking at the serial number (I guess color information is encoded in there somehow?)

If I think about it, this makes the most sense of any other theories I've heard, as it's totally plausible and probably relatively simple to implement (all the installer does is poke at the addres in ROM where the serial is stored and set desktop pictures and color themes accordingly). It would only work on those Macs whose serial is stored in ROM (I don't think any OldWorld PPCs or 68k's did this, but I know virtually all NewWorld Macs since at least the Slot Loading iMacs did).

Something else I noticed is that this only seems to happen with the supplied install or restore CDs; A standard, retail CD doesn't seem to do this. Or does it? I haven't tried in awhile... maybe I should?

c

 

EvilCapitalist

Well-known member
I was always impressed when you re-installed the OS on the Clamshell iBooks, the theme was the same color as the iBook - if you had the orange one the theme was orange, if you had the blue one the theme was blue, etc.

I never had the chance to swap a board to a different color machine and see what happened [ :) ]
I think I read somewhere recently that the installer determines which color a Mac (or iDevice) is by looking at the serial number (I guess color information is encoded in there somehow?)

If I think about it, this makes the most sense of any other theories I've heard, as it's totally plausible and probably relatively simple to implement (all the installer does is poke at the addres in ROM where the serial is stored and set desktop pictures and color themes accordingly). It would only work on those Macs whose serial is stored in ROM (I don't think any OldWorld PPCs or 68k's did this, but I know virtually all NewWorld Macs since at least the Slot Loading iMacs did).

Something else I noticed is that this only seems to happen with the supplied install or restore CDs; A standard, retail CD doesn't seem to do this. Or does it? I haven't tried in awhile... maybe I should?

c
Yup, that was the conclusion I came to when I was trying to figure out how the iMacs knew what color they were.  It also helped that I had a Ruby machine that always chose the graphite color set when I reinstalled the OS, as I later found out it had had its motherboard swapped out for one from a graphite (since they never made a 700MHz Ruby).  I've always used the restore disc set and upgraded from there so I'm not sure about whether it works with retail versions as well, though I would assume it does.

OK, now I'm really curious about the older Performae. I know my 200 has the original logic board inside (not a transplant from a Classic II). I'd like to see what it registers as not only with About This Macintosh on a regular 7.1 install, but also on the diagnostic tools which give a model name.
My Color Classic II has always shown up in diagnostics as a Performa 275 if I'm running US system software / 7.5.5.  If I switch back to US 7.1 it won't boot at all unless I use the enabler that came with the Japanese version of 7.1 and then it identifies as a Color Classic II...and the interface elements are all in Japanese despite it being a US install.  I don't have a copy of the CCII enabler that would have come on a European CCII so I can't try that to see what happens.

 

Trash80toHP_Mini

NIGHT STALKER
Can't be only in the ROM as I'm looking at it or an SE/30 would automagically change its ID when a Clean ROM SIMM is installed. TattleTech reads all kinds of system info that it can't be getting from ROM AFAIK.

 

nyef

Active member
Can't be only in the ROM as I'm looking at it or an SE/30 would automagically change its ID when a Clean ROM SIMM is installed. TattleTech reads all kinds of system info that it can't be getting from ROM AFAIK.
But you can pick out an SE/30 by its video card declaration ROM: That won't change when using a 32-bit clean ROM, and might remain even when there's a second video card in the expansion slot.

A lot can probably be determined simply by which address ranges trigger bus faults (thus, don't have associated hardware). Just off the top of my head, I'd expect that to easily distinguish a 128k/512k from a Plus (the SCSI controller). Picking out the Plus from the SE can probably be done by relying on the SE's tighter address decoding (though that's not guaranteed, given the expansion slot). Picking off a SWIM vs. IWM should be straightforward (there's a mode switch, which won't kick over on an IWM). A number of machines may have "built-in NuBus cards", such as the SE/30 video system, that are specific to that model.

If I were trying to devise my own function for this, I'd start with a breakdown of hardware (including embedded NuBus ROMs) per machine type, including address mappings, and go from there. If I were trying to figure out what System 7 (or whatever) uses, I'd either be looking to find and disassemble the actual routine that does the detection, trying various changes from "stock" hardware in an emulator to see what the effects are, or both.

 

Gorgonops

Moderator
Staff member
It certainly does answer a number of questions, yes. It even lets you in a few cases make direct guesses about how the physical wiring works.

(For instance, the map table for the VIA1 input ports assignments makes it clear that on the "Wombat" motherboard used in the Quadra/Centris 650/800 PA6 must be directly connected to that speaker connection header in the case that lets the 33mhz boards figure out what case they're in, because the rest of the ID bits match between the Q650 and 800. It might be an interesting exercise to plug a 20 or 25mhz Wombat into an 800 case and see what it claims the resulting machine is.)

 

Trash80toHP_Mini

NIGHT STALKER
THX, Bolle, that there is some hearty food for thought!

On a quick read it looks like an SE/30 might be hoodwinked into thinking it's a IIcx, the design upon which it was based. That would be most fortuitous.

The video driver for the SE/30 would be in its Video (declaration) ROM as opposed to the IIci and (likely) the IIsi having their onboard video drivers stored in system ROM as documented.

SE/30 video is a full blown, built in PDS video card when looked at in that light, which would explain why it drops off the face of the earth when the Video ROM is removed. Slot manager doesn't know the subsystem is even there in the Pulled DeclROM state.

Now we're getting somewhere  .  .  .  maybe. ::)

 
Top