Gestalt Selectors List

Reports

When someone reports some findings involving several selectors and/or a
report is too long to include with the selector entry above, that report
is listed here. They should be as short as possible with the maximum
amount of information.

Accelerated 68K Macintosh Computers

(by Des Courtney)

On 680x0 Macs running 7.1 or 7.5, the 'cput' selector can return some unusual or erronious results. On certain AV models, some Powerbook 500s, and on machines with accelerator boards, the result is always wrong.

For example, on my Mac LC with a Sonnet 50/25 '040 board 'proc' returns 68040 and 'cput' returns 68010, unless you use "older" headers that interpret the result as 68020... Applied Engineering's and MicroMac's boards are prone to this as well.

A work-around for programmers is to use the 'sysa' selector to determine whether to call 'proc' or 'cput'. But some development houses don't bother and just lean on 'cput'. Several applications refuse to run on the above mentioned models.

I wrote a small extenstion, named Gestalt Kaput, that overrides 'cput' to mirror 'proc' on 68k machines. You can obtain a copy by sending an email to Des Courtney (e-mail address removed).

Accessing the Gestalt Manager

(by Rene Ros)

Several applications can use additional code to expand their capabilities and using this they may be able to access the Gestalt Manager. The software listed below are additional code providing access to the Gestalt Manager.
Only a few locations are listed here, use the filename to search for other locations. And use the nearest mirror site of FTP sites.

CheckGestaltFor by Neil Shulman
     Hypercard external to access the Gestalt Manager.

     ftp://<info-mac.org mirror>/card/check-gestalt-for-xcmd.hqx

Gestalt Pro 1.1.2 by Rene G.A. Ros
     External for 4TH Dimension Relational Database application from
     ACI/ACI US.

     ftp://<info-mac.org mirror>/dev/a4d/ext/gestalt-pro-112.hqx

Gestalt XFCN 3.2.1 by Jeff Iverson
     Hypercard XFCN to query the Gestalt Manager.

     ftp://<info-mac.org mirror>/card/gestalt-321.hqx

GestaltExt by Andre Cavegn
     External for 4TH Dimension Relational Database application from
     ACI/ACI US.

     ftp://<info-mac.org mirror>/dev/a4d/ext/gestalt-ext.hqx

Get Gestalt (AppleScript addition) 1.2 by Mark Alldritt
     Provides access to the Gestalt Manager for AppleScript scripts.

     ftp://gaea.kgs.ukans.edu/applescript/osaxen/script-tools-131-as.hqx

Informant XFCN 1.0 by Jeff Iverson
     Hypercard XFCN to query the Gestalt Manager.

     ftp://<info-mac.org mirror>/card/information-10-xfcn-demo.hqx

Jon's Commands 1.8.1 (AppleScript addition) by Jon Pugh
     Provides access to the Gestalt Manager for AppleScript scripts with the
     machine environment command.

     ftp://<info-mac.org mirror>/card/jons-commands-*.hqx

AppleShare File & Print Server selector codes

(by Rene Ros)

The selectors are defined when the application has run. If it is still running (or wasn't properly quit) the response is one. When the application has properly quit the response is zero.

     admn AppleShare Admin
     asps AppleShare Print Server
     hgfd AppleShare File Server

(these three are undocumented)

AppleTalk

(by Rene Ros)

With the release of the System 7 Tuner product, AppleTalk will not be loaded at startup, if prior to the previous shutdown AppleTalk was turned off in the Chooser. Under this circumstance, the 'atkv' selector is not available. If the 'atkv' selector is not available under System 7, this is an indicator that AppleTalk cannot be turned on without doing so in the Chooser and rebooting the system. &AT02

Clock Chipped

(provided by Marc Schrier with additional information from Jeff Baudin and Mike Cohen and edited by Rene Ros)

Several Macintosh computers have been observed to return a different machine type value (using the gestaltMachineType selector) when the clock speed was changed. Mainly Power Macintosh computers behave like this. The following tables provide an overview of these values.

In addition to clock chipping a Macintosh, you can also:

===========================================================================
Machine Type values returned by clock-chipped M680x0 computers
===========================================================================
Model Name      CPU Speed (MHz)
                 20   25   33
---------------------------------------------------------------------------
LC III                27-  62
Q605%            93!  94-  95!
LC475%           86!  89-  90!
LC575            87!  91!  92-
---------------------------------------------------------------------------
- value returned when unmodified
! value not belonging to any known, released computer
% if you remove jumper J18 from a Q605 it becomes a LC475
---------------------------------------------------------------------------


===========================================================================
Machine Type values returned by clock-chipped PowerPC computers
===========================================================================
Model Name      CPU Speed (MHz)
                 60   66.6 75   80   82   90  100   110   112   120
---------------------------------------------------------------------------
PM 6100/60(AV)   75- 100       101!
PM 6100/66(AV)   75  100-      101!
PM 7100/66(AV)  111! 112-      113! 114!
PM 7100/80(AV)       112        47-
PM 8100/80(AV)   61!  64!       65-
PM 8100/100(AV)                 65             55-   40          12!
PM 8100/110(AV)                 65             55    40-         12!
Power100#                  65             55   55-         12!
---------------------------------------------------------------------------
- value returned when unmodified
! value not belonging to any known, released computer
# Macintosh clone by Power Computing
---------------------------------------------------------------------------


===========================================================================
Machine Type values returned by modifying the Wombat motherboard
===========================================================================
Architecture   Jumper   No Resistors   Resistor R151   Resistor R152
---------------------------------------------------------------------------
M68040         No        51!            30  C650        36  Q650
               Yes       59!            30  C650        35  Q800
PPC PDS Card   No       123  PM 800    120  PM C650    122  PM Q650
               Yes      N/A            120  PM C650    123  PM 800
---------------------------------------------------------------------------
! value not belonging to any known, released computer
---------------------------------------------------------------------------

For more info on clock-chipping (or otherwise modifying) Macintosh computers: http://socrates.berkeley.edu/~schrier/mhz.html

Copy protection using Gestalt

(by Rene Ros)

In D e v e l o p 17 Brigham Stevens suggests to use Gestalt and FindFolder as a way to implement copy protection in the most compatible way possible.
By determining several characteristics at installation from the Gestalt Mgr and the DirID of the System Folder with FindFolder you can check for this info later. When is has changed you can then ask for the serial number or a password again.

Environs & SysEnvirons

(by Rene Ros)

Using Macsbug it is very easy to determine that the SysEnvirons function uses the Gestalt Manager to fill the fields of the system environment record. So, when you install your own gestalt definitions by using the ReplaceGestalt function this will also change the information returned by SysEnvirons.
The older Environs function doesn't use the Gestalt Mgr and the code looks only at two values in ROM (the machine box flag and ROM version).

Executor Mac-emulator

(by Rene Ros)

Executor is a Macintosh Emulator for DOS machines, published by Abacus Research and Development, Inc. (1993/1994). The Gestalt Manager is also emulated and the version I have seen (on a 486DX) says it's a MacPlus with a 68LC040 processor with MMU. The 'sysv' selector returns 0x607 but it also lists a lot of selectors usually not installed by 6.0.7. Like the 'edtn' and 'stdf' selectors. For those it then simply returns zero. Strangely enough the 'tabl' selector is not installed, but this doesn't confuse the Gestalt! application!

Gestalt Apple Event

(by John W. Baxter)

The scriptable Finder, implemented by the Finder Scripting Extension, provides an Apple event to query the Gestalt Manager. This can be used from AppleScript using the 'computer' command. And using the PPC Toolbox this now also means you can query a remote computer, provided the Finder Scripting Extension is installed. The Finder Scripting Extension is installed with System 7.5 (which also includes Finder 7.1.4) but can also be used with Finder 7.1.3. The extension will later be rolled into the Finder.
The direct parameter for this event is a Gestalt selector code. If this is the only parameter, the result is the result of calling Gestalt with that code.

An optional second parameter can be included, in which case it is a 32 bit number against which the result of calling Gestalt with the given selector is tested. When this parameter is present, the event returns true if all bits set in the optional parameter are set in the result from Gestalt, and false otherwise. In AppleScript, when telling Finder:

computer "os  " has 3

returns true if the low-order two bits are set in the result from Gestalt. The equivalent event built "by hand" would be addressed to Finder (on the machine of interest) and would have the parameters

     key        value      type
     '----'     'os  '     typeType        (alternative:  "os  "  typeChar)
     'has '     3          typeLongInteger ('has ' is keyASPrepositionHas)

The event class would be kAEFinderSuite ('fndr'), and the event ID would be kAEGestalt ('gstl').

For more reading:

    D e v e l o p Magazine, Issue 20. "Scripting the Finder from your
          Application" by Greg Anderson, page 65.
    Finder Suite documentation available (starting in March 1995) on the
          Developer CD Series (Reference) as
          :Technical Documentation:Apple Events Registry & Suites:
           AE Suite Finder:Finder Suite

Gestalt Applications

(by Rene Ros)

Several specialized applications are available to display all installed Gestalt selectors. And several other applications heavily depend on the Gestalt Manager to show information on hardware and software.
Only a few locations are listed here, use the filename to search for other locations. And use the nearest mirror site of FTP sites.

AnGST 1.2 by Todd McDaniel
     Small and simple application which displays the result of a few pre-
     defined selectors.
     http://io.com/~scooter/AnGST1.2.sit.hqx
     Contact: Todd McDaniel

Apple System Profiler by Apple Computer Inc.
     The first released version (1.0, initially labeled 3.5?) works only
     with System 7.5.2 and 7.5.3 with these Macintosh models:
       Power Macintosh 61xx, 7100, 7200, 7500, 8100, 8500, 9500;
       Performa 5200, 5300, 6200, 63xx;
       PowerBook 190, 2300, 5300.
     Version 1.0.1 adds support for:
       Power Macintosh 5200, 5300, 5400, 7600
       Performa 6100

DisplayGestalt by Craig Marciniak
     Small application displays configuration using Gestalt Mgr, includes
     C-source.
     ftp://mac.archive.umich.edu/development/libraries/displaygestalt.cpt.hqx

Gestalt.Appl 2.7.8 by Jean-Pierre Curcio
     Displays responses from installed selectors and information about the
     returned responses.
     THIS IS THE 'OFFICIAL' GESTALT HUNTERS TOOL! Please send saved config
     files from Gestalt.Appl to the editor.

     http://www.rgaros.nl/gestalt/gestalt-appl.sit.hqx

     Contact: Jean-Pierre Curcio

Gestalt! 3.0 by Roland Mansson
     Displays responses from installed selectors.

     ftp://ftp.lu.se/pub/mac/util/gestalt300.cpt.hqx
     ftp://<info-mac.org mirror>/cfg/gestalt-300.hqx

     Contact: Roland Mansson

GestaltDA 0.4 by Carl C. Hewitt, Apple Computer Inc.
     Displays responses from installed selectors.
ftp://ftp.info.euro.apple.com/Apple.Support.Area/Developer_Services/Tool_Chest/OS_Utilities/GestaltDA_0.4.sit.hqx
     Contact: D e v e l o p

GestLab 3.0 by Jean-Pierre Curcio
     Displays responses from installed selectors and information about the
     returned responses. Also compares with internal database.
     THIS IS THE 'OFFICIAL' GESTALT HUNTERS TOOL! Please send saved config
     files from Gestalt.Appl to the editor.

     http://www.rgaros.nl/gestalt/gestlab.sit.hqx

     Contact: Jean-Pierre Curcio

Go Gestalt appl 1.8 by Paul Reznick
     Displays information obtained thru the Gestalt Mgr.

     -

     Contact: Paul Reznick

MacIDentify appl 2.3 by Matthias Kahlert
     Displays the machine names for the current and other machine IDs.

     http://www.donau.de/privhome/kahlert/software/mac_e.htm

     Contact: Matthias Kahlert

Tattle-Tech appl by Decision Makers Software, Inc.
     Uses Gestalt manager extensively to display all known information.

     ftp://ftp.decismkr.com/dms/tattletech2.55.sea.hqx

     Contact: John Mancino

TechTool appl 1.0.8 by Micromat Computer Systems
     Application to reset PRAM, rebuild DTDB and show Gestalt info.

     ftp://<info-mac.org mirror>/cfg/tech-tool-108.hqx

GestaltValue

(by Marco Piovanelli, additions by Rene Ros)

The first time you call NewGestaltValue, the library installs two non-relocatable blocks in the system heap and the 'gval' gestalt selector. One of the blocks is filled with code: it's actually a gestalt definition that implements GestaltValue's shared mechanism. The second block contains the selectors and values GestaltValue manages. The response returned by the 'gval' selector is a pointer to the second non-relocatable block in the system heap.

Dave Radcliffe wrote on 23 March 1993 regarding some information, about the GestalValue glue code, listed with version 1.4 of this list:
"The information on the _GestaltValue trap (0xABF2) is correct based on the
glue, but because of a mistake on my part, the glue should be checking for
0xABF1. A new version of the glue is being distributed on the developer CD
next month..."

The GestaltValue functions are part of System 7.5. and later. If you need to use the GestaltValue calls with your PowerPC native code on System 7.1.2 see the library Jim Luther publishes at: http://members.aol.com/JumpLong/index.html#GestaltValue

The GestaltValue library can be found at:
ftp://<info-mac.org mirror>/dev/gestalt-value-lib.hqx
ftp://ftp.info.euro.apple.com/Apple.Support.Area/Developer_Services/Tool_Chest/OS_Utilities/GestaltValue.sit.hqx

GestaltValue & CodeWarrior Problem

(by Francois Pottier)

The GestaltValue.o library is made up of several routines. The first time someone calls a routine from the library, the library installs itself into the System Heap and uses NSetTrapAddress to set up its own trap. Subsequent calls to the library will just map to a trap call. This allows the code to be loaded only once in memory, even if several INITs use GestaltValue.
What's the problem? In order to install itself into the System Heap, the GestaltValue code must compute how big it is; it does this by subtracting the address of the first routine from the address of a stub routine located after the last real routine. That's common practice. It assumes, however, that the linker will preserve the order of the routines.

But CodeWarrior's "Import MPW library" command does not preserve the order of the functions it finds inside the .o file. As a result, when you call NewGestaltValue for the first time, the library finds its own size to be negative. It asks the Memory Manager for a block of negative size and returns an error (memFullErr, I believe).

Note that this only happens if your software is the first to call GestaltValue since the machine started up. Also, it won't happen under System 7.5 because GestaltValue is part of 7.5. If your program requires 7.5, you probably don't need the GestaltValue.o glue at all.

Glue code

(by Rene Ros, based on THINK Reference 2.0)

These development/compiler software contain glue-code to handle a few selectors even when the Gestalt Manager is not available.

     THINK C      (5.0 and later)
     THINK Pascal (4.0 and later)
     MPW          (3.2 and later)

The following selectors can be handled by the glue-code, with all others an error (gestaltUndefSelectorErr) will be returned.

     gestaltAppleTalkVersion = 'atlk';
     gestaltFPUType          = 'fpu ';
     gestaltKeyboardType     = 'kbd ';
     gestaltLogicalRAMSize   = 'lram';
     gestaltMachineType      = 'mach';
     gestaltMMUType          = 'mmu ';
     gestaltPhysicalRAMSize  = 'ram ';
     gestaltProcessorType    = 'proc';
     gestaltQuickdrawVersion = 'qd  ';
     gestaltSystemVersion    = 'sysv';
     gestaltVersion          = 'vers';

Unless you are using direct calls, ofcourse.

INITGestalt standard

(by Rene Ros, based on INITGestalt proposal by Jeremy Roussak and Rene Ros)

IMPORTANT NOTE:
We, Jeremy Roussak and Rene Ros, will not work on new versions of this proposed standard. Apart from not having the time to work on it we found that it was not supported sufficiently by the programmers community.
Perhaps because it was not backwards compatible with existing software. Also, we are worried by the yet unknown impact of memory protection of future system versions on the way of 'memory sharing' used by INITGestalt.

The INITGestalt proposal tried to define a standard memory structure which describes the basic information about software. Using the Gestalt call other software obtains a pointer to the structure for software which uses the INITGestalt standard.

Mac OS 8 (Copland)

OBSOLETE
(by Rene Ros, based on Apple Technology World Tour '96 notes and other sources; Microkernel paragraph provided by Anonymous contributor)

Because of the limited implementation of separate address spaces for Copland or another future system version passing a pointer doesn't work between server and other applications. Since applications still share the same address space these are not affected. Hence passing pointers, and in fact using Gestalt functions at all, is discouraged for Copland and will break with Gershwin. With Copland the About This Macintosh will be enhanced to give more information about the configuration. To have the new microkernel, implemented by Copland, not depend on the system registry or Gestalt a system call is provided instead:

enum
{
    kSystemInformationVersion = 0
};

typedef struct SystemInformation
{
    ItemCount    numPhysicalRAMPages;
    ByteCount    pageSize;
    ByteCount    dataCacheBlockSize;
    UInt32       processorVersionNumber;
    UInt32       numCPUs;
    ProcessID    kernelProcessID;
};

OSStatus GetSystemInformation (PBVersion              theVersion,
                               SystemInformation *    theSystemInfo);

Undoubtely Gestalt itself will use this call to return the information too. For more reading: MicroKernel White Paper

MAC OS X


Carbon will fully support the Gestalt Manager. However, you should not use Gestalt functions to pass pointers to data among applications because each application will reside in its own protected memory space.
You should avoid using the NewGestalt function to add a selector code, which requires moving your selector function into the system heap. You should also avoid using the ReplaceGestalt function to replace an existing selector function, which also requires your replacement function to reside in the system heap. Note that you will not have access to the system heap in Mac OS X as you do in previous versions of the Mac OS.

The functions, structures, and constants of the Gestalt Manager appear in the Gestalt.h interface file (Gestalt.h replaces the older file GestaltEqu.h file) &AD36

NOTE:
For deja-vu reading, see 'Mac OS 8 (Copland)' report above.

Machine Names

(by Rene Ros et al.)

The STR# resource with ID -16395, inside the system file or enabler, contains a list of Macintosh machine names. The selector gestaltMachineType ('mach') returns a value which can be used as the index value with a GetIndString call to get the appropriate machine name. There are some exceptions to this and these are discussed in this report.

On Macintosh Performas (System 7.1), the Machine Name STR# resource will always return the string "Macintosh" (not "Macintosh Performa 450" or "Performa 450"). On all other Macintoshes, the string will return the correct name. (Mark Dawson)
[And] if you do a dirty install [of System 7.5 or later] (right on top of an existing, pre-7.5 System), your machine type and icon will be preserved. If you do a clean install, you'll get the generic name/icon in the Finder's "About This Macintosh..." dialog. (Tim Swihart)
This can be fixed by using the freeware Mac Identifier extension, located at ftp://ftp.fluxsoft.com/.
Or use the WhoAmI? application, which can be found at ftp://<info-mac.org mirror>/cfg/who-am-i-13.hqx. (Rene Ros)
Apple says that in the future ID's will be reused and the kMachineNameStrID will contain only the text ' Macintosh' (two spaces first) &AT01
This policy seems to have changed because the System 7.5 Update enabler installed by System 7.5 Update 1.0 either contains ' Macintosh', ' Macintosh PowerBook' or ' Power Macintosh' (all with two leading spaces). Perhaps the 'mach' selector in the future will be used to indicate the category only. Then we'll get another mechanism/selector to get the real machine type?
Rumour goes a new ROM is developed which allows clone makers to have their machines identified properly. (Rene Ros, with some info from John Mancino)

All system enablers have the machine name resource included to replace the one in the System file. In most cases this resource lists the same Macintosh names as the original one in System 7.1 and adds the names of the machines the enabler is intended for. But some only list the machines the enabler is used with. Therefore, if you want to display the name of a machine which isn't of the current machine type you can't rely on this resource anymore. (Rene Ros)

The Performa 600 was originally planned to ship as Macintosh IIvm but the name was changed because users thought 'vm' meant 'Virtual Memory'. MOST system enablers (i.e. 001, 040, 065 & 201) contain this original name.

The Machine Name resource in the MAE Enabler 1.0 contains the string "MAE 1.0" in these items: 19, 28, 130, 131 and 132.

The PowerPC Enabler 1.1 enabler contains a Machine Name resource which lists these names:

     items 1-66 contain the item number itself except:
           12 Power Macintosh 8100/120
           31 Paula's Desk Macintosh
           39 Workgroup Server 9150
           40 Power Macintosh 8100/110
           46 Power Macintosh 6100/66
           47 Power Macintosh 7100/80
           55 Power Macintosh 8100/100
           64 Power Macintosh 8100/60
           65 Power Macintosh 8100/80
           66 Power Macintosh 8100/100
     items 67-115 are empty except:
           75 Power Macintosh 6100/60
          100 Power Macintosh 6100/66
          101 Power Macintosh 6100/80
          111 Power Macintosh 7100/60
          112 Power Macintosh 7100/66
          113 Power Macintosh 7100/80
     items 116-123 contain the text "  Power Macintosh"

"Paula's Desk Macintosh" disappeared again with version 1.1.1 of the PowerPC enabler, it was replaced by the number '31' ! :-)
The duplicate names for some of the Power Macintosh models was resolved and it is now know that some values belong to a never to be released ROM version. See the gestaltMachineType entry for more detailed information.

The PowerBook 5300/190 Enabler now lists the full machine names again!(Eric-Paul Rebel)

The Gestalt.h file for ETO 20 states that all future machine type constant names take the following form:

gestalt<lineName><modelNumber> 

For the current lines the linename is one of the following:

         Macintosh LC               "MacLC"
         Macintosh Performa         "Performa"
         Macintosh PowerBook        "PowerBook"
         Macintosh PowerBook Duo    "PowerBookDuo"
         Power Macintosh            "PowerMac"
         Apple Workgroup Server     "AWS"

The modelnumber does not include the clockspeed not minor RAM and harddisk configuration differences reflected in the two rightmost digits of the modelnumber. Hence, both a Performa 6100 and Performa 6115 have the constant name: gestaltPerforma6100.
(Summarised by Rene Ros, based on Gestalt.h file provided by Marco Piovanelli; May 1996)

Macintosh Application Environment

(by Rene Ros, with thanks to Jos van Wezel for providing the workstation and installing the software.)

Using the MAE 1.0 demo version is quite stressful since it expires after eight hours! Copying files to a disk doesn't work also because all you are left with is an file with only the resource map and a few resources. All resources are maintained by MAE. But by using ResEdit it is possible to copy the resources itself one for one to a file on a floppy disk. Under MAE 1.0 these results were found on a SUN SPARCstation 5:

===========================================================================
Summary of Gestalt Selectors installed with MAE 1.0
===========================================================================
Selector      Response  Remark
---------------------------------------------------------------------------
a/ux          3.0.1
cput              5     MC68040
fpu               0     none
mach             19     which is the LC, but the MAE Enabler only has
                        'MAE 1.0' in the machine name STR# resource
mmu               0     none
proc              5     MC68040
rom            2048K
romv           1917
snd               0     no sound support, no system beeps to choose from
snhw           awac
cith              0     huh?
---------------------------------------------------------------------------

See also a note with the gestaltMachineType ('mach') selector entry.

Macintosh Compatibles

(by Rene Ros, contributions by Jean-Pierre Curcio, Kenneth Knotts and Marc Schrier. Also based on MacWEEK articles and GURU application by Newer Technologies: http://www.newertech.com/ )

So far the clone manufacturers have released computers which hardware is identical, though clockspeed may be different, to other computers released by Apple. This was part of the license agreement. The first compatibles with their own machine IDs are those from Motorola (9/96). This section contains a table of clone model names and the equivalent Apple ID number and constant name.

The Pioneer clone (codename Pioneer MPC-GX1 where MPC stands for Multimedia Personal Computer) was observed at CeBIT '95.

===========================================================================
Clone Machines
===========================================================================
Manufacturer       Model Name               Apple Hardware Model
                                            ID    Constant
---------------------------------------------------------------------------
Akia Corporation (http://www.akia.com/index2.html)
                   MicroBook
                    - Power603e/240         ???
                    - Power603e/240-133     ???
                    - Power604e/225-133     ???
                    - Power604e/225 ???     ???
                   PowerPC 604e225Hz        ???
APS Technologies (http://www.apstech.com/mpower.html)
                   M*Power 603e160          ???   gestaltPowerMac4400?
                   M*Power 603e200          ???   gestaltPowerMac4400?
                   M*Power 603e240          ???   gestaltPowerMac4400?
                   M*Power 604e200          ???   gestaltPowerMac4400?
Assistive Technologies (http://www.assistivetech.com/future.html)
                   ???
DayStar Digital (http://www.daystar.com/)
                   Genesis LT 400+           67 gestaltPowerMac9500
                   Genesis MP 300            67 gestaltPowerMac9500
                   Genesis MP 360+           67 gestaltPowerMac9500
                   Genesis MP 400+           67 gestaltPowerMac9500
                   Genesis MP 450            67 gestaltPowerMac9500
                   Genesis MP 528/132
                    - w/7500 Logic Board     69 gestaltPowerMac8500
                    - w/8500 Logic Board     69 gestaltPowerMac8500
                    - w/9500 Logic Board     69 gestaltPowerMac8500
                   Genesis MP 600            69 gestaltPowerMac8500
                   Genesis MP 720+           69 gestaltPowerMac8500
                   Genesis MP 800+           69 gestaltPowerMac8500
                   Genesis MP 900            69 gestaltPowerMac8500
Hard Disk Cafe
                   ???
Mactell, Inc. (http://www.mactell.com)
                   ???
Marathon Computer (http://www.marathoncomputer.com)
                   ???
Motorola Computer Group (http://www.mot.com/GSS/MCG/starmax/index.html)
                   Starmax 3000/160         ???
                   Starmax 3000/180         514   gestaltPowerMac4400?
                   Starmax 3000/200         ???
                   Starmax 3000/240         ???
                   Starmax 4000/160         ???
                   Starmax 4000/200         ???
                   Starmax 5000/225         514   gestaltPowerMac4400?
                   Starmax 5000/250         514   gestaltPowerMac4400?
                   Starmax 5000/275         514   gestaltPowerMac4400?
                   Starmax 5000/300         514   gestaltPowerMac4400?
                   Starmax 5500/200         ???
NUpowr             Power PC for PowerBooks 500's
                                            ???
Pioneer Electronics (http://www.pioneer.co.jp)
                   MPC-GX1                  100   gestaltPowerMac6100_66
PIOS (http://www.pios.de/uk/)
                   Keenya 603e/200          ???
                   Keenya 604e/200          ???
                   Maxxtrem 603e/200        ???
                   transAM 603e/200         ???
Power Computing (http://www.powercc.com)
                   Power 100                 55   gestaltPowerMac8100_100
                   Power 120                 12!  gestaltPowerMac8100_120
                   PowerBase 180            ???   Performa 6400?
                   PowerBase 200            ???   Performa 6400?
                   PowerBase 240            ???   Performa 6400?
                   PowerCenter 120          108   gestaltPowerMac7200 @ 120
                   PowerCenter 132          108   gestaltPowerMac7200 @ 132
                   PowerCenter 150          108   gestaltPowerMac7200 @ 150
                   PowerCenter 166          108   gestaltPowerMac7200 @ 166 ?
                   PowerCenter 180          108   gestaltPowerMac7200 @ 180
                   PowerCenter Pro 180      108   gestaltPowerMac7200 @ 200?
                   PowerCenter Pro 210      108   gestaltPowerMac7200 @ 210?
                   PowerCenter Pro 240      108   gestaltPowerMac7200 @ 240?
                   PowerCurve 120           108   gestaltPowerMac7200 @ 120
                   PowerTower 166           108   gestaltPowerMac7200 @ 166
                   PowerTower 180           108   gestaltPowerMac7200 @ 180
                   PowerTower 180e          108   gestaltPowerMac7200 @ 180 ?
                   PowerTower 200e          108   gestaltPowerMac7200 @ 200 ?
                   PowerTower Pro 180        67   gestaltPowerMac9500 ?
                   PowerTower Pro 200        67   gestaltPowerMac9500 ?
                   PowerTower Pro 225        67   gestaltPowerMac9500 ?
                   PowerTower Pro 225 MP     67   gestaltPowerMac9500 ?
                   PowerTower Pro 250        67   gestaltPowerMac9500
                   PowerWave 604/120         67   gestaltPowerMac9500
                   PowerWave 604/132         67   gestaltPowerMac9500
                   PowerWave 604/150         67   gestaltPowerMac9500
POWERtools (http://www.pwrtools.com)
                   Infinity 3160            ???
                   Infinity 3200            ???
                   Infinity 3240            ???
                   Infinity 4200            ???
                   X-Factor 1               ???
                   X-Factor 2               ???
Radius
                   81/110                    40   gestaltPowerMac8100_110
                   System 100               ???   gestaltPowerMac8100??? ?
Umax (http://www.supermac.com)
                   Apus 3000                 58   gestaltPerforma6400
                   Pulsar 225                67   gestaltPowerMac9500
                   SuperMac C500/140        ???
                   SuperMac C500/160        ???
                   SuperMac C500/180        ???
                   SuperMac C600/180        ???
                   SuperMac C600/200        ???
                   SuperMac C600/240        ???
                   SuperMac J700/150         67   gestaltPowerMac9500
                   SuperMac J700/180         67   gestaltPowerMac9500
                   SuperMac S900/150         67   gestaltPowerMac9500
                   SuperMac S900/180         67   gestaltPowerMac9500
                   SuperMac S900/200         67   gestaltPowerMac9500
                   SuperMac S900/225         67   gestaltPowerMac9500
                   SuperMac S900/233         67   gestaltPowerMac9500
                   SuperMac S900/250         67   gestaltPowerMac9500
                   SuperMac S900DP/180       67   gestaltPowerMac9500
                   SuperMac S900DP/200       67   gestaltPowerMac9500
                   SuperMac S900DP/250       67   gestaltPowerMac9500
Vertegri Research (http://www.vertegri.com)
                   QuickTower E2            ???
                   imediaEngine V3          ???
                   imediaEngine V5          ???
                   imediaEngine V7          ???
---------------------------------------------------------------------------
! value not belonging to any by Apple released computer
---------------------------------------------------------------------------

Manufacturer Identification

(by Rich Kubota, Apple Computer)

There are two selectors to identify the hardware and software manufacturer of the computer. These selectors, 'hrad' and 'srad' respectively, are at least available since system 7.5.3.

The selector 'hrad' is for hardware identification purposes. An Apple machine should identify itself as 'Appl'. An undefined selector error should be interpreted as 'Appl', anything else is a clone. For example, a Power Computing machine should return 'pcc '. An exception to this is licensee systems built using Apple motherboards: there's no way to identify them.

The selector 'srad' is for software identification purposes. It identifies software by who sold the software and is mainly for customer support use. Software sold with a licensee computer is always identified as sold by the licensee. But, if for example, a licensee customer goes out and buys a shrinkwrap version of the MacOS, then the software was purchased from Apple and will be supported by Apple.
Typical responses are 'Appl' for Apple and 'Lcns' for licensees, although in the latter case, licensees are allowed to customize it further with their own identifier.
The system software should set the selector, although that hasn't been done consistently because of some bugs. For newer machines, the selectors may be set by the "Mac OS Licensing Extension" which only ships on clone machines and is used to handle some licensing specific stuff. (Oct. 96)

Modern Memory Manager

(by John W. Baxter and Eric Schlegel)

The Universal Headers from Apple have a revised Memory Manager heap zone header and named constants, which provide a documented methode of detecting the Modern Memory Manager. It is as yet unknown whether the kNewDebugHeap flag set implies kNewStyleHeap set. The code here does not assume so...but some might wish to test each flag in its own function.

Boolean IsModernMemory (void) {

    THz myZone = GetZone ();

    return (myZone->heapType & (kNewStyleHeap | kNewDebugHeap)) != 0;
    }

If you use older headers, replace the return statement with this line:

    return (0 != ((*myZone).maxNRel & 0x0600));

The new headers have the heapType field as a Byte (followed by a Byte filler), together replacing the maxNRel short. The bits in it are defined by these masks:

enum {
/* masks for Zone->heapType field */
    k32BitHeap      = 1, /* valid in all Memory Managers */
    kNewStyleHeap   = 2, /* true if new Heap Manager is present */
    kNewDebugHeap   = 4  /* true if new Heap Manager is running in debug
                            mode on this heap */
};

PPC Libraries

(based on a posting by John Baxter in the comp.sys.mac.programmer Usenet newsgroup on Internet.)

Some of the Gestalt selector functions are smart enough to avoid crashing when the user removed the library file from the Extensions folder without restarting the machine. And some selector functions aren't that smart.
Safest is to preflight the first call you make into the library (for code or data) or include a preflight in your startup.

QuickTime

(by Michael Hecht, additions by Rene Ros)

If you install QuickTime under System 6, a major portion of the Alias Manager and FSSpec support is also added. But, QT doesn't implement the Gestalt selectors because the implementation is not complete. You must check for either Alias Mgr or QuickTime.

These are the limitations for the Alias Mgr installed by QuickTime:

And these are the FSSpec calls available with System 6 when QuickTime is installed:

See for more information Technical Note M.QT.MovieTB.Q&As (QT 510) and D e v e l o p 11 magazine on page 122.

RAM Doubler

(by anonymous contributor and Rene Ros)

RAM Doubler implements virtual memory in a different way than the normal Apple VM mechanism. It looks like this is done in corporation with Apple since a selector installed by RAM Doubler is 'vmem' which is all lower-case and thus reserved by Apple.
In addition the response from this selector is always (long)'RaM2' which is the creator type of RAM Doubler. It seems this selector is used to indicate which software is used to extend the capabilities of the Virtual Memory Manager.
RAM Doubler also installs the selector 'vmFn' which seems to be a pointer to a function to control RAMDoubler (1.0?) or to obtain information. It looks like registers are used to pass parameters to and from that function. D0 perhaps holds values 1 to 6 as input and perhaps A0 is used for the return value.

pascal OSErr VMExtensionControl? (UInt16 selector, UInt32 *result)
     Registers on entry   D0: selector code
     Registers on exit    A0: result code
                          D0: error code
     Result codes
       noErr                       0 No error
       invalidSelector?          206 Invalid selector value?
       ???

Values used as selector:
     enum {
     kVMControlType?        = 1,       /* type VM extension: RaM2 */
     kVMControlVersion?     = 2,       /* version VM extension as BCD */
     kVMControl???          = 3,       /* engine version as BCD?: 0x0313 */
     kVMControlMemSize?     = 4,       /* unknown: Get/SetMemorySize? */
     kVMControlMemSize?     = 5,       /* unknown: Get/SetMemorySize? */
     kVMControl???          = 6,       /* unknown */
     kVMContolMaxFunctions? = MAXINT}; /* returns number of valid
                                           selectors, or any other value
                                           outside the  current 1-6
                                           range */

Remember: all this is heresay!!!
Because of all this you can imagine RAM Doubler replaces/installs the following System Software selectors (and I think it does): lram, pgsz, ram , vm , vmbs.

Relabled Macintosh Models

(by Rene Ros and other contributing readers; Originally based on the Mac Models List by J.D. Sterling Babcock. Since Summer 1995 based on MacFacts and Apple Specs by Apple Computer Inc.)

The Performa models usually (there are some exceptions) return a machine ID# for the model they are based on. The table below lists several models which are simply relabled and the hardware model they are based on.

===========================================================================
Relabled Machines
===========================================================================
Relabled Model          Hardware Model               Note
Name                    Constant
---------------------------------------------------------------------------
Macintosh ED            gestaltMacPlus               sold in Netherlands?,
                                                     512K with Mac SE case
                                                     color
Macintosh LC III+       gestaltPerforma460           33 MHz LC III ?
Macintosh SE FDHD       gestaltMacSE
Performa 200            gestaltClassicII
Performa 250            gestaltMacColorClassic       sold in Australia and
                                                     Britain
Performa 275            gestaltMacColorClassicII?
Performa 400            gestaltMacLCII
Performa 405            gestaltMacLCII
Performa 410            gestaltMacLCII
Performa 430            gestaltMacLCII
Performa 450            gestaltMacLCIII
Performa 460                                         not relabeled, own ID
Performa 466            gestaltPerforma460
Performa 467            gestaltPerforma460
Performa 475            gestaltMacLC475
Performa 476            gestaltMacLC475
Performa 520            gestaltMacLC520
Performa 550            gestaltMacLC550
Performa 560            gestaltMacLC550
Performa 575            gestaltMacLC575
Performa 577            gestaltMacLC575
Performa 578            gestaltMacLC575
Performa 580            gestaltMacLC580
Performa 588            gestaltMacLC580
Performa 600                                         not relabeled, own ID
Performa 630            gestaltMac630
Performa 631            gestaltMac630
Performa 635            gestaltMac630
Performa 636            gestaltMac630
Performa 637            gestaltMac630
Performa 638            gestaltMac630
Performa 640            gestaltMac630
Performa 5200           gestaltPowerMac5200
Performa 5210           gestaltPowerMac5200
Performa 5215           gestaltPowerMac5200
Performa 5220           gestaltPowerMac5200
Performa 5260           gestaltPowerMac5200
Performa 5270           gestaltPowerMac5200
Performa 5280           gestaltPowerMac5200
Performa 5300           gestaltPowerMac5200
Performa 5320           gestaltPowerMac5200
Performa 5400           gestaltPowerMac5400
Performa 5410           gestaltPowerMac5400          only released in Japan?
Performa 5420           gestaltPowerMac5400          only released in Japan?
Performa 5430           gestaltPowerMac5400          outside the US
Performa 5440           gestaltPowerMac5400          outside the US
Performa 6110           gestaltPowerMac6100_60
Performa 6112           gestaltPowerMac6100_60
Performa 6115           gestaltPowerMac6100_60
Performa 6116           gestaltPowerMac6100_60
Performa 6117           gestaltPowerMac6100_60
Performa 6118           gestaltPowerMac6100_60
Performa 6200           gestaltPowerMac6200
Performa 6205           gestaltPowerMac6200
Performa 6210           gestaltPowerMac6200
Performa 6214           gestaltPowerMac6200
Performa 6216           gestaltPowerMac6200
Performa 6218           gestaltPowerMac6200
Performa 6220           gestaltPowerMac6200
Performa 6230           gestaltPowerMac6200
Performa 6260           gestaltPowerMac6200
Performa 6290           gestaltPowerMac6200
Performa 6300           gestaltPowerMac6200
Performa 6310           gestaltPowerMac6200
Performa 6320           gestaltPowerMac6200
Performa 6360           gestaltPerforma6400
Performa 6400                                        not relabeled, own ID
Performa 6410           gestaltPerforma6400
Performa 6420           gestaltPerforma6400
Power Macintosh 7220    gestaltPowerMac4400          Renamed for Asia/
                                                     Pacific area because:
                                                     'among the more
                                                     superstitious members
                                                     of Chinese
                                                     communities, the
                                                     number "44" is
                                                     believed to bring bad
                                                     luck and may even
                                                     carry connotations of
                                                     impending death'
Quadra 660AV            gestaltMacCentris660AV
Workgroup Server 60     gestaltMacCentris610
Workgroup Server 80     gestaltMacQuadra800
Workgroup Server 95     gestaltQuadra950
Workgroup Server 95+    gestaltQuadra950
Workgroup Server 6150   gestaltPowerMac6100_60
Workgroup Server 7250   gestaltPowerMac7200 @ 120 MHz
Workgroup Server 7350   gestaltPowerMac7300
Workgroup Server 8150   gestaltPowerMac8100_110
Workgroup Server 8550   gestaltPowerMac8500 @ 132 or 200 MHz
Workgroup Server 9150   gestaltPowerMac9150
Workgroup Server 9650   gestaltPowerMac9600
---------------------------------------------------------------------------