HOME
What's New

CPU Cooler
Programs
Introduction
AmnHLT
CpuIdle
Rain 
VCool 2.0 
Waterfall Pro 
Current Tests 
Test Archives

UDMA Driver 
Tests 
Windows 95
Windows 98
Windows NT

Way 2 Cool 
Projects 
Compaq 1800T
1800T Temp Monitor
Celeron-A
Going for 504
More on 504
Cheap Sandwich
BX6r2 Diode Fix
Condensation
Lap that Slug
Celeron PPGA
Journey to 1080
Building an NT Box
Heat Pipe 1
Heat Pipe 2
Heat Pipe 2.2
gp_Temp
gp_Temp4
gp_Temp5

Heat Sinks 
Aavid
A&C Prototype Sink
Alpha P125
Alpha P521
CPU Cooler
FullWay
Tom's Sink
Water Cooler 1
Water Cooler 2
Water Cooler 3
Water Cooler 4
*
Water Cooler 6
Water Cooler 7

Way 2 Cool
Thermometer
Thermometer 2
K-6 heat sink
Case Cooling
Heat Sink Tester
More Case Cooling
Klamath heat sink
Q500A Cooling
My Server Temps
Temp Calculators
CKS400 Rack Case
Fan Controller
Cooling Links
Downloads Page

Tips and Trix
Dual Boot Win95 / 98
Dual Boot Linux/NT4
D-B Linux/Win2k
Hot Flash your BIOS

Family Stuff
Prom / St. John
Providenciales

Email Jim

Source Code for gp_Temp5 to MBM5 Interface

The original Shared Memory source code by Alex van Kaam may be found on http://mbm.livewiredev.com/  under the heading of MBM 5 Shared Memory and also in the Shared Memory section of the help files found in MBM5.  Alex's source code shows additional functions of the shared memory that I have not used in gp_Temp5.

This interface enables the write of the current temperature, highest temperature reached, lowest temperature reached, average temperature, and count of how many times the temperature has been read.
 
 

unit mbminit;

interface

uses
  Windows, StdCtrls, Controls, Grids, Classes, Forms, SysUtils;

type
  TBusType     = (btISA, btSMBus,btVIA686ABus, btDirectIO);
  TSMBType     = (smtSMBIntel, smtSMBAMD, smtSMBALi, smtSMBNForce, smtSMBSIS);
  TSensorType  = (stUnknown, stTemperature, stVoltage, stFan, stMhz, stPercentage);

  TSharedIndex = record
    iType : TSensorType;                          // type of sensor
    Count : integer;                              // number of sensor for that type
  end;

  TSharedSensor = record
    ssType    : TSensorType;                      // type of sensor
    ssName    : array [0..11] of AnsiChar;        // name of sensor
    sspadding1: array [0..2] of Char;             // padding of 3 byte
    ssCurrent : Double;                           // current value
    ssLow     : Double;                           // lowest readout
    ssHigh    : Double;                           // highest readout
    ssCount   : LongInt;                          // total number of readout
    sspadding2: array [0..3] of Char;             // padding of 4 byte
    ssTotal   : Extended;                         // total amout of all readouts
    sspadding3: array [0..5] of Char;             // padding of 6 byte
    ssAlarm1  : Double;                           // temp & fan: high alarm; voltage: % off;
    ssAlarm2  : Double;                           // temp: low alarm
  end;

  TSharedInfo = record
    siSMB_Base       : Word;                      // SMBus base address
    siSMB_Type       : TBusType;                  // SMBus/Isa bus used to access chip
    siSMB_Code       : TSMBType;                  // SMBus sub type, Intel, AMD or ALi
    siSMB_Addr       : Byte;                      // Address of sensor chip on SMBus
    siSMB_Name       : array [0..40] of AnsiChar; // Nice name for SMBus
    siISA_Base       : Word;                      // ISA base address of sensor chip on ISA
    siChipType       : Integer;                   // Chip nr, connects with Chipinfo.ini
    siVoltageSubType : Byte;                      // Subvoltage option selected
  end;

  TSharedData =  record
    sdVersion : Double;                           // version number (example: 51090)
    sdIndex   : array [0..9]   of TSharedIndex;   // Sensor index
    sdSensor  : array [0..99]  of TSharedSensor;  // sensor info
    sdInfo    : TSharedInfo;                      // misc. info
    sdStart   : array [0..40]  of AnsiChar;       // start time
    sdCurrent : array [0..40]  of AnsiChar;       // current time
    sdPath    : array [0..255] of AnsiChar;       // MBM path
  end;

  PSharedData   = ^TSharedData;

function WriteSharedData : Boolean;

  
var
  SharedIndex  : TSharedIndex;
  SharedSensor : TSharedSensor;
  SharedInfo   : TSharedInfo;
  SharedData   : PSharedData;
  Temperature       : array[1..10] of Double;     //ssCurent
  TempL             : array[1..10] of Real;       //ssLow
  TempH             : array[1..10] of Real;       //ssHigh
  TempA             : array[1..10] of Extended;   //ssTotal - Readouts
  TempC             : array[1..10] of LongInt;    //ssCount - # of Readouts

implementation
   // Just do something

function WriteSharedData : Boolean;
  var     myHandle : Integer;
          X : integer;

begin
  myHandle :=  OpenFileMapping(FILE_MAP_ALL_ACCESS, False, '$M$B$M$5$S$D$');
  if myHandle > 0 then begin
    SharedData := MapViewOfFile(myHandle, FILE_MAP_ALL_ACCESS, 0, 0, 0);
    with SharedData^ do begin
       for X:=3 to 6 do     // 4 sensors - MBM #s 4,5,6, & 7
       begin
          sdSensor[X].ssCurrent  := Temperature[X];
          sdSensor[X].ssLow      := TempL[X];
          sdSensor[X].ssHigh     := TempH[X];
          sdSensor[X].ssTotal    := round(TempA[X]);
          sdSensor[X].ssCount    := round(TempC[X]);
       end;
    end;
       UnMapViewOfFile(SharedData);
       Result := True;
  end else result := false;
     CloseHandle(myHandle);
end;

end.



 
 
 
gp_Temp
page 1
gp_Temp
page 2
gp_Temp
page 3
gp_Temp4
page 1
gp_Temp5
page 1
gp_Temp5
page 2
gp_Temp5
page 3