SEAN! Mac OS
Game Development Community
View Sean Leslie’s profile on LinkedIn, the world's largest professional community. Sean has 2 jobs listed on their profile. See the complete profile on LinkedIn and discover Sean’s. Download macOS Catalina for an all‑new entertainment experience. Your music, TV shows, movies, podcasts, and audiobooks will transfer automatically to the Apple Music, Apple TV, Apple Podcasts, and Apple Books apps where you’ll still have access to your favorite iTunes features, including purchases, rentals, and imports.
by Sean OBrien· 07/31/2009 (1:17 pm) · 4 comments
The older versions of Torque used the antiquated Gestalt system calls to determine processor, memory, clock speed, etc. Now that Apple has deprecated the Gestalt calls, this resource updates the engine to use the currently supported method for retrieving that information from the Kernel.
This only applies to Mac applications of both Torque 3D and TGEA 1.8.x and since it only effects two files, it is a rather simple upgrade.
While this doesn't do anything for *you* specifically, it does replace the functions which the engine is using to determine the specs of the Mac it is running on: memory max/avail, processor family, type, core-type, number of cores, speed, etc. With this information, the engine can choose at runtime to execute different implementations of certain routines to maximize performance or to simply take advantage of more complex and/or special purpose hard-coded instructions of the chip. This type of 'on the fly' optimization is in addition to the build-time magic that the compiler optimizer routines perform.
For instance, the engine defaults to a 'Generic x86 Processor' if it can't determine what's what. However, properly ID'ing the processor in my MacBook as an Intel Core 2 Duo with a 'Penryn' core opens up the possibility of using the SSE, SSE2, SSE3, SSE3_ext, and SSE4_1 extended instruction sets; allows the engine to see that this processor actually has two independent, 2 GHZ, 64-bit capable cores for executing instructions; and let's it know that there are just under 2 GB of memory available.
Both Torque 3D and TGEA 1.8 users need to do this first part. Only TGEA users need to update the second file at the bottom, however.
Replace the entire 'Engine/source/platformMac/macCarbCPUInfo.cpp' file with this:
then for those using this with TGEA 1.8.x, change 'Engine/source/platform/platform.h' as follows:
(1) Comment out the following sections
(2) Insert the following code directly underneath the sections you just commented
That should be it. Compile and check your log at the very tippy-top to see the updated information.
This only applies to Mac applications of both Torque 3D and TGEA 1.8.x and since it only effects two files, it is a rather simple upgrade.
While this doesn't do anything for *you* specifically, it does replace the functions which the engine is using to determine the specs of the Mac it is running on: memory max/avail, processor family, type, core-type, number of cores, speed, etc. With this information, the engine can choose at runtime to execute different implementations of certain routines to maximize performance or to simply take advantage of more complex and/or special purpose hard-coded instructions of the chip. This type of 'on the fly' optimization is in addition to the build-time magic that the compiler optimizer routines perform.
For instance, the engine defaults to a 'Generic x86 Processor' if it can't determine what's what. However, properly ID'ing the processor in my MacBook as an Intel Core 2 Duo with a 'Penryn' core opens up the possibility of using the SSE, SSE2, SSE3, SSE3_ext, and SSE4_1 extended instruction sets; allows the engine to see that this processor actually has two independent, 2 GHZ, 64-bit capable cores for executing instructions; and let's it know that there are just under 2 GB of memory available.
Both Torque 3D and TGEA 1.8 users need to do this first part. Only TGEA users need to update the second file at the bottom, however.
Replace the entire 'Engine/source/platformMac/macCarbCPUInfo.cpp' file with this:
then for those using this with TGEA 1.8.x, change 'Engine/source/platform/platform.h' as follows:
(1) Comment out the following sections
(2) Insert the following code directly underneath the sections you just commented
That should be it. Compile and check your log at the very tippy-top to see the updated information.
About the author
07/31/2009 (5:38 pm)
@Great work Sean!Could you elaborate a bit on the benefits of this enhancement, for those of us ignorants? :)
08/01/2009 (8:57 am)
Hey, Novack. I realized that I was a bit skimpy on the description so I went and filled it out a bit more as I should have originally. There are really two audiences for this: the TGEA 1.8 crowd I originally wrote this for and the T3D folks who are already using this because my code got accepted into the official code base.
For TGEA, this is a 'ok, cool my computer is recognized now, neat-o' thing; for T3D on the other hand, this is the actual routine that is already being used, I'm simply trying to get a little feedback as the methods used (i.e. SYSCTLBYNAME and its various key values) are a little bit wonky in the values they return so I need to be sure we're asking for and getting the correct information.
Sean Mcaskie
Now, nobody should think that simply because this routine is in place and the information is correct, that Torque should suddenly run 2x faster! Instead it's purpose is two-fold: (1) The engine should be able to tell the specs of the machine because .... well why the heck not?, and (2) given that information, the Devs can make as many changes and tweaks to the internal routines as possible, which while it may not be much, it's probably better than nothing.Try it out! =)
Sean Mac Os X
08/01/2009 (11:28 am)
Excellent Sean, thank you very much! 09/12/2009 (3:59 am)
I'm using this with Torque 1.5, and I had to add CPU_Intel_Core and CPU_Intel_Core2 to the ProcessorType enum. Sean Mac Os Download
Sean Mack Esq
Post a blog
Add a resource
Start a Thread
Add a resource
Start a Thread
Sean Mac Osborne
All Products
3rd Party Addons
iTorque 2D
iTorque 3D
TGE
TGEA
Torque 2D
Torque 3D Pro
Torque X
3rd Party Addons
iTorque 2D
iTorque 3D
TGE
TGEA
Torque 2D
Torque 3D Pro
Torque X