PATHADC Home > Documentation > Hardware > iMac Developer Note

Up Previous Next 

Computer Identification

All ROMs based on NewWorld share the same BoxFlag. The intent is for applications to use properties in the Open Firmware device tree rather than checking BoxFlag to find out the features of the machine. As with other computers that use ROM-in-RAM, a call to gestaltMachineType returns the value 406 ($196).

IMPORTANT

Programs such as control panels and installers that use Box Flag to verify that this is a valid CPU on which to execute need to be changed to verify the existence of the hardware they require. Rather than reading the box flag or the model string and then making assumptions about the computer's features, developers should look in the device tree created by Open Firmware for the features they need.

Asset management software that reports the kind of machine it is run on can obtain the value of the property at Devices:device-tree:compatible in the name registry. The model string is the first program-useable string in the array of C strings in the compatible field. For the new iMac family computers, the value of the first string in the compatible property is PowerMac2 .

The string obtained from the compatible property cannot be displayed to the computer user. If it is available, you can use the result from calling Gestalt ('mnam', &result) where result is a string pointer. This call returns a Pascal style string that can be displayed to the user.

Applications should not use either of these results to infer the presence of certain features; instead, applications should use Gestalt calls to test for the features they requires.


© 1999 Apple Computer, Inc. – (Last Updated 26 Oct 99)

Up Previous Next