AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) C++ C++ 2 Delphi, Core2duo/quad Reading
Thema durchsuchen
Ansicht
Themen-Optionen

C++ 2 Delphi, Core2duo/quad Reading

Ein Thema von Razor · begonnen am 27. Aug 2007 · letzter Beitrag vom 7. Mai 2008
Antwort Antwort
Seite 2 von 2     12   
Razor
(Gast)

n/a Beiträge
 
#11

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 28. Aug 2007, 13:05
Ahh i provided core2duo/core2quad cpu usage and nobody was thankfull,i see people begging for codes to be translated and people just do it?Explain that?

Why you think i am posting in this forum at all?So other users can benefit from this also!




I only need MSR Access code i figured the cpuid and other stuff by myself

EDIT: i found this code on newsgroups

Delphi-Quellcode:
type
{ hier können eigene, bessere Namen definiert werden } 
  TMachineStateRegisterRange = (Bit0 = 0, Bit63 = 63);
  TMachineStateRegister = set of TMachineStateRegisterRange;


function getMsr(whichone: Integer): TMachineStateRegister;
var
  res: TMachineStateRegister;
begin
  asm
    mov ecx, whichone
    rdmsr
    lea esi, res
    mov [esi], ax
    mov [esi+4], dx
  end;
  getMsr := res;
end;


var
  msr: TMachineStateRegister;
  i: TMachineStateRegisterRange;


begin
  msr := getMsr(0);
  for i := Low(TMachineStateRegisterRange) to
           High(TMachineStateRegisterRange) do
    if i in msr then
      WriteLn('Bit ', Ord(i), ' ist gesetzt.');
end.

Found this also

Delphi-Quellcode:
    function ReadMSR(msr_num: DWord; var msr: tmsr): boolean;
    function WriteMSR(msr_num: DWord; const msr: tmsr): boolean;
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#12

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 28. Aug 2007, 13:51
As I stated many times before: you can not read out any MSR register with the RDMSR instruction in your ring 3 application. As said before: you will get a EPrivilegeInstruction exception. Try this code on your system - and not only just paste it here and hoping to find someone who glues your pieces to an working application...
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#13

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 28. Aug 2007, 13:58
Alright wrong thinking yes...


As i have seen in other code C code the athor of it said to me that hi and lo are dwords

So...

Delphi-Quellcode:
Var
hi,lo:DWORD;
But the address is 0x19C,so we have to read MSR for 100 TjMAX and 85 Tjmax





i have this function in another driver i found,can this read this thing as we want to?

Delphi-Quellcode:
function ReadMSR(msr_num: DWord; var msr: tmsr): boolean;

ReadMSR(lo,0x19C):=true; //i doubt this is the way and thats why i ask if it is
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#14

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 9. Nov 2007, 16:05
If someone has core 2 duo contact me i need betatesters...
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#15

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 12. Nov 2007, 20:07
Hi!


As i said i read msr register this way
Delphi-Quellcode:
var
  Form1: TForm1;
    isLoadDr: boolean;
   C0:string;
   HiPart, LowPart:tmsr;
implementation

{$R *.dfm}

//Remember 2 registers $19C and $EE.
//19C is for DTS checking.
//EE is for Tjunction EE.
//Low > EAX
//Hi > EDX

procedure tform1.RDMSR;
var
 GetInstance:tomcdrv;
begin
GetInstance.Create();
   getInstance.IMSRIORef.ReadMSR($19C,lowPart);
    
  //
    //getInstance.IMSRIORef.ReadMSR($EE,HiPart);


end;

procedure tform1.intelC2D;
begin

  if msr.lowPart=0 then
   RichEdit1.Lines.add('No Digital Thermal Sensor Detected!');


end;

Now here comes the conclusion the read msr is the same for EAX.When i tested this on my computer Celeron D cpu, i got read EAX 0
but when i tested on C2D i got the EAX 0.Here i stoped beceouse i dont know how to go on....
$EE is for determening Tjunction value and $19C is for detecting DTS-Digital thermal sensor value 0-no other value yes.
Forumula is Core temp=Tdata-Tjunction


So help is needed in order to finish this project..



Offtopicoes anybody know where can i get nforce specs/datasheets?
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#16

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 5. Mai 2008, 09:33
Forget everything i said till now.

-I have to start at the begining and thats making a x32/x64 driver.What would be the most suitable enviroment to make it since delphi i don't think can make them.

-Driver signing for x64 vista.

-I have new computer with q6600 so testing is no problem.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#17

Re: C++ 2 Delphi, Core2duo/quad Reading

  Alt 7. Mai 2008, 14:01
Can some post a working example without the driver i have been working on this for 2 weeks no results..
I only found these by my own research..

//Remember 2 registers $19C and $EE.
//19C is for DTS checking.
//EE is for Tjunction EE.
//Low > EAX
//Hi > EDX

  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz