Click here to Skip to main content
15,890,512 members
Articles / Desktop Programming / MFC

CAMEL - CPU Identifier Class

Rate me:
Please Sign up or sign in to vote.
4.93/5 (40 votes)
14 Jan 2003CPOL2 min read 293.9K   9.6K   96   73
A class to detect ALL the features of the CPU / CPUs in the local system. Now at version 1.2
<!------------------------------- STEP 2 ---------------------------><!-- Include download and sample image information. -->

 

Demo Screenshot 1   Demo Screenshot 2   Demo Screenshot 3

 

Introduction

Camel is a generic Windows® / Linux CPU detection class which can display details about the hardware installed within the computer. It can display items such as the CPU manufacturer, CPU model and name, clock speed and other hardware details.

What Do I Get With This?

Well a complete CPU identification and capabilities class. Also there is a complete Windows version detection algorithm included in the demo source. The demo (including pre-compiled binary) provides a replacement for WCPUID and similar applications and as the binary is < 150 kb, it is nice and small.

How Can I Use It?

1. E-Mail me for permission to use/include (always given). I just want to know what purpose it is being used for. It is provided completely for "Non-Commercial Usage."
2. Include the files in your C++ project.
3. Compile!
4. Play!

What About.... AKA: Specific In-depth Details

Supports Microsoft® Windows™ From:

Windows™ 95 / 95 OSR2 / 95 OSR2.5
Windows™ 98 / 98 SE
Windows™ Millennium
Windows™ NT 3.51
Windows™ NT 4.0 Workstation / Server [Including SP1 to SP6a]
Windows™ 2000 Workstation / Server / Advanced Server / Datacenter Server (Including SP1 to SP3)
Windows™ XP Personal / Professional [Including SP1]
Windows™ .NET Web Server / Standard Server / Enterprise Server

Supports Processors From:

Intel / AMD / Cyrix / Rise / UMC / IDT / Transmeta / NexGen / National Semiconductor

See Camel.txt for processor listings... E.g. Pentium III "Coppermine" or Athlon XP 1800+ (Thoroughbred Core).

Detects Hardware Features:

Processor hardware

Single Processors
Dual Processors
Multiple Processors
HyperThreading Technology
Serial Number [if enabled]
On-Chip APIC Hardware
Hard-Coded Chip Names
L1 Cache Size
L2 Cache Size
L3 Cache Size
CPU Clock Speed [of each processor]
Thermal Monitioring Support
ACPI Support
On-Chip PowerManagement [SpeedStep, etc.]

Multimedia Instruction Sets

MMX
MMX+
Streaming SIMD Extensions
Streaming SIMD Extensions [Floating Point]
Streaming SIMD Extensions [MMX]
Streaming SIMD Extensions 2
3DNow!
3DNow!+

General Instruction Sets

Floating Point Unit [FPU]
Time Stamp Counter [TSC]
Conditional Move [CMOV]
Memory Type Range Registers [MTRR]

Other notes:

The 2nd generation CPU speed test is "loosely" based on code from Pavlos Touboulidis. It is far enough removed to be no-longer copyright to him. I think. Anyway this is the obligatory mention.

Known Bugs And Problems:

CAM_00000001: Last Tree Node Fails To Display '+' Icon Properly.
CAM_00000002: CPU Speed Detection Results With +/- 10MHz Deviation. (FIXED: Version 1.2)
CAM_00000003: Fails To Detect APIC ID Properly With < Intel P4 Processors.

NOTE:

Some of the functionality is missing. Some of the menu items do not yet work nor some of the benchmarks. None of these missing features affect the CPU identification code! I apologize and will implement these in time. Or you can.....

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Researcher
Germany Germany
Iain Chesworth graduated from Heriot-Watt University in June of 2002 in Computer Science and Physics. He now works as a C++ programmer and plays with code in his spare time. He is also a keen cyclist and swimmer.

Comments and Discussions

 
GeneralWell done!! Pin
WREY9-Sep-02 8:12
WREY9-Sep-02 8:12 
Generalidentifiing celerons Pin
Anonymous8-Sep-02 17:50
Anonymous8-Sep-02 17:50 
GeneralRe: identifiing celerons Pin
Ryan Binns26-Dec-02 21:43
Ryan Binns26-Dec-02 21:43 
Questionconvert to activex com control? Pin
Anonymous8-Sep-02 7:22
Anonymous8-Sep-02 7:22 
AnswerRe: convert to activex com control? Pin
John Famiglietti20-Sep-02 5:59
John Famiglietti20-Sep-02 5:59 
GeneralNice job! Pin
Anonymous7-Sep-02 18:46
Anonymous7-Sep-02 18:46 
GeneralThere is a problem! Pin
Robert Buldoc7-Sep-02 12:36
Robert Buldoc7-Sep-02 12:36 
GeneralDetection Of 3DNow! and 3DNow!+ Pin
voodoopriestess7-Sep-02 23:39
voodoopriestess7-Sep-02 23:39 
Heya,

1st:
Were you running in Debug mode? I've noticed that in Debug mode; the VC++ Debugger can mangle the response (Confused | :confused: ) from the registers. Why? I have not idea yet but I'm working on it - Wink | ;) !

2nd:
CPUID function 8000 0001h helps determine the feature set of the processor. When we execute CPUID with 0x80000001 in the EAX register, the feature set of the processor is returned in the EDX register. The bits of EDX we are interested in, are the 31st and 30th bits; the 31st bit determines whether or not the processor supports 3DNow!, and the 30th bit determines if Enhanced 3DNow! instructions are available.

As far as I can tell in "bool __cdecl CPUInfo::RetrieveExtendedCPUFeatures ()":

__asm {
mov eax,0x80000001
CPUID_INSTRUCTION
mov CPUExtendedFeatures, edx
};

Features.ExtendedFeatures.Has3DNow = ((CPUExtendedFeatures & 0x80000000) != 0); // 3DNow Present --> Bit 31.
Features.ExtendedFeatures.Has3DNowPlus = ((CPUExtendedFeatures & 0x40000000) != 0); // 3DNow+ Present -- > Bit 30.

should do just that. When run on my Pentium 3 (EB Coppermine @ 733), both 3DNow! and 3DNow!+ are not available. It may just be that your P3 could be newer and thus support the instructions sets....

Looking everything over - I think that the first option is the most likely!

Iain


----

"I would be careful in separating your weirdness, a good quirky
quantum weirdness, from the disturbed weirdness of people who take
pleasure from PVC sheep with fruit repositories."
GeneralRe: Detection Of 3DNow! and 3DNow!+ Pin
rkiesler7-Dec-02 3:44
rkiesler7-Dec-02 3:44 
Generalcan solve it like that Pin
saierdia15-Jan-03 21:13
saierdia15-Jan-03 21:13 
GeneralRe: can solve it like that Pin
Robert Buldoc16-Jan-03 17:12
Robert Buldoc16-Jan-03 17:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.