CarbonSoft cxCPU 2.0
Beta 2.1 Freeware Release
Build 2.039 (23-June-1998)
Note: This interim release fixes the bug which prevented redetection at execution time.
Introduction
CarbonSoft cxCPU is a non-visual component for Borland Delphi 3 which identifies the processor in the host system.
This component was originally available for Delphi 1.0 since 16-bit Windows didn't provide any simple means to detect
processors above 486 class. With the advent of Windows® 95 and NT came API functions which determine the host CPU
class.
Unfortunately (or fortunately, depending on your point of view) Intel is no longer the only vendor in the race.
There's a whole range of Intel Pentium® processors out there, MMXs, OverDrives, P2s, and the odd Pro thrown in for good
measure, and that's before we consider other vendors such as AMD, Cyrix, NexGen, and the like.
cxCPU 2.0 picks up where it's predecessor left off, by not only providing the processor class, but also the vendor (Intel,
AMD, etc), the model (P54C, K6, MediaGX, etc), whether it's an overdrive processor, whether it supports MMX, and the processor speed.
About this beta
Oops - it seems I was totally unprepared for the volume of feedback when I released the first beta version. After working through
all of your feedback this almost feels like a new release rather than a second beta. Hopefully the majority of problems
have now been resolved.
As with the previous release, this beta is freeware and may be used freely in both commercial and non-commercial products.
But please remember that this component is very much a work in progress and I cannot accept responsibility for
any bad things arising from it's use. If you do decide to use it in an application you distribute please let me know so
I can feel good about myself, and let you know of any issues or problems which may arise in the future.
In short, please use this component freely and let me know the results. The final release will be freeware so I'm not
in a position to bribe you with a registered version but I'm sure you'd like a fully tested version as much as me!
This beta currently supports Delphi 3, the release version will support Delphi 2, 3.x, 4, and C++ Builder. If you have any
of these and a processor other than an Intel Pentium (P54C) let me know and, depending on demand, I'll make the relevant versions
for you to try.
If anyone would be interested in a DLL or OCX version (can't imagine why) let me know.
Changes in this Release
Redeveloped startup mechanism to improve stability
Redeveloped detection routines to improve flexibility
Implemented fallback Cyrix detection (thanks to Brian Slack)
Implemented Pentium II (Model 5) detection
Increased reliability of CPU speed detection (thanks to Thuyoshi Yoneda)
Exposed internal properties to allow user replacement of detection routines
Added design-time processor benchmarking
Fixed minor issues
Contacting the Author
For more information about cxCPU, to report bugs, or to request a version for another development platform please send mail to
cxcxpu_beta@carbonsoft.demon.co.uk
For anything else (not related to this component) send mail to:
kev@carbonsoft.demon.co.uk
The latest version of this component can always be found at:
www.carbonsoft.demon.co.uk/delphi/
Supported Processors
cxCPU 2.0 should detect the following processors:
Intel Corporation
General: (no model detection)
- 80386, early 80486 Class processors
Specific:
- 80486SL, 80486DX2, 80486DX4, 80486DX4 OverDrive
- Pentium P5
- Pentium P54C
- Pentium OverDrive
- Pentium 486 OverDrive
- Pentium MMX
- Pentium MMX OverDrive
- Pentium Pro
- Pentium II
Advanced Micro Devices
General: (no model detection)
- 486DX2, 486DX4, 5x86 processors
Specific:
- K5 (Models 0-3)
- K6 MMX
Cyrix Corporation
Specific:
- Cx5x86
- MediaGX
- Cx6x86
- GXm
- 6x86MX
NexGen Inc
Specific:
- Nx586
United Microelectronics Corporation
Specific:
- U5D (486DX)
- U5S (486SX)
IDT/CentaurHauls
Specific:
- IDT C6 WinChip
Note: If you're currently using a processor that's not listed above please contact me so I can add support for it.
Installing cxCPU
- Copy files CXCPU2.DCR and CXCPU2.DCU into a directory, where your components reside, for instance
"C:\Program Files\Borland\Delphi 3\Lib"
- From the Delphi menu select "Component | Install Component..."
- Click Button "Browse..." beside "Unit file name" and select the path and filename of CXCPU2.DCU.
- Back on the Install Components screen select an existing package in "Package file name" and press "OK" button.
- Confirm the rebuild dialog. Delphi compiles and adds cxCPU to the component library. When installation is complete, the
component can be found on the "System" palette tab.
If you have any difficulty installing the components refer to the Delphi 3 Help system.
Please note that this beta release of cxCPU 2.0 does not include online help.
Using cxCPU 2.0
Using cxCPU 2.0 is very straightforward, just drop the component on your form and read the required properties straight away, so
to find the processor manufacturer you would use code like:
lblVendor.Caption := cxCPU1.Vendor;
Note: The name of the benchmark function has changed in this release to cx_BenchCPU. The
previous call (cxiBenchCPU) is maintained in this release for compatibility. This will be removed in
the next release.
As with the previous release you must run the cx_BenchCPU procedure before reading the Speed property, e.g.:
cxCPU1.cx_BenchCPU;
lblSpeed.Caption := IntToStr(cxCPU1.Speed) + 'MHz';
Please note that the cxiBenchCPU procedure involves a one second delay while the component benchmarks your CPU.
Properties
cxCPU 2.0 is a descendent of TComponent and as well as the default properties
Name and Tag supports
the following properties:
About...
Displays the component about box and contact information.
Count (Integer)
Displays the number of processors in the host system.
CPU (String)
Displays the processor model (e.g. Pentium (P54C), K5 (Model 2), etc).
cxCPUInfo *New*
These properties are new in this release and expose the information gathered by cxCPU when it
attempts to identify a processor.
cpuFamily (LongInt)
Displays the host processor family value
cpuModel (LongInt)
Displays the host processor model value
cpuStepping (LongInt)
Displays the host processor stepping level value
cpuType (LongInt)
Displays the host processor type value
RawSpeed (Comp)
Displays the raw processor speed (before normalisation)
Supports_CPUID (Boolean)
Displays whether the host processor supports the CPUID instruction. (If this value is FALSE then cxCPU will use the Windows
API to determine the processor details).
VendorID (String)
Displays the processor vendor identification signature (e.g. GenuineIntel,
AuthenticAMD, etc).
FullName (String)
Displays a formatted combination of the processor vendor and model, (e.g. Intel Pentium MMX).
MMX (Boolean)
Displays TRUE if the host processor supports the MultiMedia eXtensions, FALSE is it does not.
OverDrive (Boolean)
Displays TRUE if the host processor is an Intel OverDrive processor, FALSE if is not.
Speed (Integer)
Displays the frequency of the host processor. Note: defaults to 0 - run
cx_BenchCPU for the actual speed.
Vendor (String)
Displays the processor vendor (e.g. Intel Corporation,
Advanced Micro Devices, etc).
Plans for the next release
Support for Intel Celeron processor
Support for AMD K6®-2;
Implement standard feature set detection
And anything else anyone would care to suggest (within reason!)
Distribution
This package is released as FREEWARE. This means that it is FREE, but it is NOT public domain software.
Kev French and CarbonSoft retain full copyright in all the source files.
You may freely use this component in your own programs. You may freely redistribute this package, on the conditions;
- that the whole package is redistributed, AND,
- that NO alteration is made to the package, or to any of the files in it, AND,
- that no charge (other than charges for disk duplication and handling, in any case, not exceeding $5.00 (US) or equivalent)
be made for any redistribution.
Bulletin boards and CD-ROM producers make freely distribute this package, subject to the above conditions.
Disclaimer
WE DO NOT WARRANTEE ANYTHING CONCERNING ANY OF THE SOURCES OR FILES WHICH MAKE UP THIS PACKAGE. WE ACCEPT NO RESPONSIBILITY FOR
ANY LOSS OR DAMAGE OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, LOSSES OF A PHYSICAL, MENTAL, SOCIAL, FINANCIAL, MARITAL, OR
OF WHATEVER NATURE, RESULTING FROM THE USE, OR THE PURPORTED USE, OF THIS PACKAGE OR ANY OF THE FILES IN THE PACKAGE, FOR ANY
PURPOSE WHATSOEVER.
YOU USE THIS PACKAGE ENTIRELY AT YOUR OWN RISK, AND YOU SUPPLY IT TO YOUR CUSTOMERS, FRIENDS, FAMILY, ACQUAINTANCES, OR ENEMIES,
ENTIRELY AT YOUR OWN RISK.
IF THESE TERMS ARE NOT ACCEPTABLE TO YOU, THEN PLEASE DELETE ALL THE FILES FROM YOUR DISKS IMMEDIATELY AND PERMANENTLY.
In the above statement, "WE" refers to Kev French and CarbonSoft
Credits
cxCPU has been developed with the help of the following documents:
Intel Processor Identification and the CPUID Instruction (#241618-007)
AMD Processor Recognition (#20734)
Cyrix CPU Software Identification (no part number)
Identification of x86 CPUs with CPUID support