PATHADC Home > Documentation > Hardware > iBook 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. Developers should look for the features they need, rather than reading the box flag and then making assumptions about the computer's features.

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-usable string in the array of C strings in the compatible field. For the iBook, the model property value is PowerBook2,1.

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-2000 Apple Computer, Inc. – (Last Updated 15 Feb 00)

Up Previous Next