Mac OS 9 Lives

Mac OS 9 Discussion => Development & Programming => Topic started by: IIO on May 13, 2020, 05:57:02 AM

Title: Gestalt
Post by: IIO on May 13, 2020, 05:57:02 AM
the information about the gestalt stuff in classic macos in the ADC pages is limited to a list of selectors.

http://mirror.informatimago.com/next/developer.apple.com/documentation/mac/OSUtilities/OSUtilities-11.html#HEADING11-10

i am looking for a brief overview about what the most "useful" output format would be.

when i receive the output and display it in decimal, hex, and binary it is easy to find out which format should be presented to the user and which not, when the query was "quicktime version" or "machine model" - because you know what kind of number you have to expect.

but what about all these enviromental selectors which seems to output a list of flags as single binary number? what does it mean when the "microprocessor model" of my computer is "1111111111" ?
Title: Re: Gestalt
Post by: Daniel on May 13, 2020, 07:08:56 AM
GestaltEqu.h looks very helpful for figuring out what is supposed to happen.
https://github.com/elliotnunn/BuildCubeE/blob/master/MPW-3.2.3/Interfaces/CIncludes/GestaltEqu.h (https://github.com/elliotnunn/BuildCubeE/blob/master/MPW-3.2.3/Interfaces/CIncludes/GestaltEqu.h)

I suggest printing out in OSType (4 ascii chars), hex, and binary when you don't know exactly what a selector is.  If it doesn't make sense by any of these, it's probably a pointer.

MacsBug somehow can get a list of all installed Gestalt selectors, which is apparently impossible otherwise.

A tool called TattleTech has a bunch of info on this kind of stuff. Maybe it's helpful.
https://www.emaculation.com/forum/viewtopic.php?t=8836 (https://www.emaculation.com/forum/viewtopic.php?t=8836)
Title: Re: Gestalt
Post by: IIO on May 13, 2020, 07:35:01 AM
thanks, that forum post has quite some info about some of the (possibly) more important things. i am aware that it would be a lot of stuff if it is complete - interesting that they also dont know where it comes from. :)

i still live inside max/msp, where my output from gestalt is limited to decimal (int32), which i can of course convert to hex and binary or to float - but not more.

in a way it is not very clever that i am beeimg confronted with ints here, where ASCII is what you would need to understand stuff.
Title: Re: Gestalt
Post by: IIO on May 13, 2020, 07:43:33 AM
Quote
MacsBug somehow can get a list of all installed Gestalt selectors, which is apparently impossible otherwise.

thats cool with me, i would just request all and if there is no answer, then fine.