SYSTEM
Check CPU type
_gestaltCPU68000 = 1
_gestaltCPU68010 = 2
_gestaltCPU68020 = 3
_gestaltCPU68030 = 4
_gestaltCPU68040 = 5
_gestaltCPU601 = &101
_gestaltCPU603 = &103
_gestaltCPU604 = &104
For a regularly updated list of Mac model (not processor) gestalt values, see Apple Tech Q&A HW29.
I use the following to look for a PPC.
LOCAL FN SpeedControl 'Function to change delay time based upon processor
machType$=STR#(-16395,SYSTEM(_machType))
LONG IF machType$ = " Power Macintosh"
gslowSys = _False
XELSE
gslowSys = _True
END IF
END FN
Don't remember what I said there! Here's some code I found, that's a bit outdated, originally (10/31/96) from MorrDesign; if everyone who gets an "unknown Mac type" from running it would email me their results and "real" Mac type, I'll update the list.
gestaltResponse&=FN GESTALT(_gestaltMachineType)
PRINT "Machine Type (_gestaltMachineType) ";
SELECT gestaltResponse&
CASE 1
PRINT "Classic";
CASE 2
PRINT "XL";
CASE 3
PRINT "Macintosh 512K enhanced";
CASE 4
PRINT "Macintosh Plus";
CASE 5
PRINT "Macintosh SE";
CASE 6
PRINT "Macintosh II";
CASE 7
PRINT "Macintosh IIx";
CASE 8
PRINT "Macintosh IIcx";
CASE 9
PRINT "Macintosh SE/30";
CASE 10
PRINT "Macintosh Portable";
CASE 11
PRINT "Macintosh IIci";
CASE 13
PRINT "Macintosh IIfx";
CASE 17
PRINT "MacClassic";
CASE 18
PRINT "IIsi";
CASE 19
PRINT "Macintosh LC";
CASE 20
PRINT "Quadra 900";
CASE 21
PRINT "PowerBook 170";
CASE 22
PRINT "Quadra 700";
CASE 23
PRINT "Classic II";
CASE 24
PRINT "PowerBook 100";
CASE 25
PRINT "PowerBook 140";
CASE 26
PRINT "Quadra 950";
CASE 27
PRINT "LCIII";
CASE 29
PRINT "Power Book Duo 210";
CASE 30
PRINT "Centris 650";
CASE 32
PRINT "PowerBook Duo 230";
CASE 33
PRINT "PowerBook 180";
CASE 34
PRINT "PowerBook 160";
CASE 35
PRINT "Quadra 800";
CASE 37
PRINT "LCII";
CASE 39
PRINT "PowerBook Duo 250";
CASE 44
PRINT "IIvi";
CASE 45
PRINT "Performa 600";
CASE 48
PRINT "IIvx";
CASE 49
PRINT "Mac Color Classic";
CASE 50
PRINT "PowerBook 165c";
CASE 52
PRINT "Centris 610";
CASE 53
PRINT "Quadra 610";
CASE 54
PRINT "PowerBook 145";
CASE 55
PRINT "PowerMac 8100 / 100";
CASE 56
PRINT "LC520";
CASE 58
PRINT "PowerComputing PowerBase 200";
CASE 60
PRINT "Centris 660AV";
CASE 71
PRINT "PowerBook 180c";
CASE 77
PRINT "PowerBook Duo 270c";
CASE 78
PRINT "Quadra 840AV";
CASE 84
PRINT "PowerBook 165";
CASE 88
PRINT "Mac TV";
CASE 89
PRINT "LC 475";
CASE 92
PRINT "LC 575";
CASE 94
PRINT "Quadra 605";
CASE 65
PRINT "PowerMac 8100/80";
CASE 75
PRINT "PowerMac 6100/60";
CASE 112
PRINT "PowerMac 7100/66";
CASE 69
PRINT "PowerMac 8500/120";
CASE 67
PRINT "PowerMac 9500/120";
CASE 306
PRINT "Powerbook 3400c/240";
CASE 510
PRINT "PowerMac G3";
CASE ELSE
PRINT "unknown Macintosh";
END SELECT
PRINT gestaltResponse&
|