From: "Saved by Internet Explorer 11"
Subject: LPTScope software
Date: Mon, 4 Jul 2016 10:12:23 -0700
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0000_01D1D5DC.8EF81740"
X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01D1D5DC.8EF81740
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Content-Location: file://C:\Users\R&D 1\Documents\Research\Software\LPTScope software.htm
LPTscope is a MFC program written in VC++6.0. The =
program=20
reads directly from I/O adress 888 which is LPT1 data port on most PCs. =
If you=20
use Win95/98/ME everything is ok about direct reading from the LPT1. =
But with=20
WinNT/2k/XP (NT based) things are a little complicated. I/O ports are =
protected=20
from direct access. You can read this=20
article for detailed info. To work under NT based OS, LPTScope =
uses PortTalk =
driver for=20
direct access to LPT1 port under WinNT based OSes. Craig Peacock did a =
nice job=20
with that. But, the driver intermediator reduces the speed =
performance of=20
the oscilloscope a lot. For best performance use Win95/98/ME. Somebody =
could=20
make a change in the code of PortTalk driver to do a block reading, not =
just=20
byte by byte reading. I don't have time enough for that. The init part =
of the=20
program (CMainFrame::OnShowWindow) detects Win version and if this is =
NT based=20
Windows then PortTalk is automatically installed and started. If you =
want to=20
uninstall the PortTalk driver just delete the file=20
\WinNT\system32\drivers\porttalk.sys and registry key:=20
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PortTalk]. To=20
uninstall the LPTscope program, just delete the LPTscope.exe =
file. The init=20
part of the LPTscope also measures the PC speed. This is achieved by a =
simple=20
times-of-loops counting in a given period. This information gives us =
the max=20
sample rate possible on the given machine. LPTscope reads the =
samples at the=20
maximum speed all the time. By changing the time base we don't make any =
difference on the reading speed of the samples. The efect of changing =
the time=20
base is implemented at display-time only: not all the samples are shown =
in the=20
case of lower time base than the max one.
The principle of the =
how the=20
program works is quite simple: A separate thread (ReadThread()) reads a =
block=20
of MAX_SAMPLES samples from LPT1 and after that it sends a notification =
to the=20
view to display this freshly readen block of data. The user can change =
time and=20
Y base on the view side, click and move to measure precisely the signal =
with=20
the mouse, change trigger properties etc.
The program is tested =
on=20
Win98,Me,2K and XP. I hope you will find it useful. Drop me a =
note if=20
you find a bug or after making some meaningful change to the code. Read =
the=20
agreement if you intend to have any other use than a personal=20
one.
TODO: =B7 Detection of =
the=20
available LPT ports. =B7 Optimize the PortTalk driver for our =
specific use.=20
This could be useful and faster when running on=20
WinNT.
How=20
to talk with a LPT (and any other) port from within NT based =
Windows: PortTalk =
driver - my=20
favorite http://egor.spb.ru/doc/BookCD/DrDobbs/articles/1996/9605/9605a/9=
605a.htm http://64.113.35.210/tviclpt.ht=
m - a=20
serious commercial solution =20
=20
=20
=20
=20
------=_NextPart_000_0000_01D1D5DC.8EF81740
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/R&D%201/Documents/Research/Software/LPTScope%20software_files/serv.gif
R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
------=_NextPart_000_0000_01D1D5DC.8EF81740
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/Users/R%26D%201/Documents/Research/Software/LPTScope software_files/pu5geo.js
=0A=
var PUisIE_NAV4 =3D false;=0A=
if (parseFloat(navigator.appVersion) >=3D 4) {=0A=
PUisIE_NAV4 =3D true;=0A=
}=0A=
=0A=
var PUwinWidth=3D'740';=0A=
var PUwinHeight=3D'300';=0A=
=0A=
var PUtimes =3D 1; /* number of times to show ad. if > times, then =
redirect thru */=0A=
var PUtheDomain =3D ".geocities.com";=0A=
var PUexpiresIn =3D 4/24; /* days between shows of the ad */=0A=
=0A=
function PUsetCook(t,expIn) {=0A=
var cook;=0A=
var PUexDate;=0A=
PUexDate =3D new Date;=0A=
PUexDate.setTime(PUexDate.getTime() + expIn*24*60*60*1000);=0A=
cook =3D "PU=3Dt=3D"+t+"; expires=3D" + PUexDate.toGMTString() +"; =
domain=3D"+PUtheDomain + "; path=3D/";=0A=
document.cookie =3D cook;=0A=
}=0A=
=0A=
var PU_NO_COOKIES =3D 2;=0A=
=0A=
function PUgetCook(x) {=0A=
var i,j,a,b,s,e,d,f;=0A=
a =3D document.cookie;=0A=
//if (a =3D=3D "") return PU_NO_COOKIES;=0A=
s =3D a.indexOf(x + "=3D");=0A=
if (s =3D=3D -1) return false;=0A=
s +=3D x.length+1;=0A=
e =3D a.indexOf(';',s);=0A=
if (e =3D=3D -1) e =3D a.length;=0A=
return a.substring(s,e);=0A=
}=0A=
=0A=
/* check cookies - if cookies are off or if user saw it X times, then we =
redirect thru */=0A=
=0A=
var PUd;=0A=
var PUb=3DPUgetCook("PU");=0A=
var PUoverTimes =3D 0;=0A=
=0A=
if (PUb =3D=3D PU_NO_COOKIES) {=0A=
PUoverTimes =3D 1;=0A=
} else {=0A=
if (PUb !=3D false) {=0A=
PUb =3D PUb.split('&');=0A=
for (PUi=3D0; PUi PUtimes) {=0A=
PUoverTimes =3D 1;=0A=
} else {=0A=
PUsetCook(PUd[1],PUexpiresIn);=0A=
}=0A=
} else {=0A=
PUsetCook(1,PUexpiresIn);=0A=
}=0A=
}=0A=
=0A=
function PUlaunchPU(){=0A=
var PUwin;=0A=
var addIt =3D PUisIE_NAV4 ? ',top=3D5000,left=3D5000' : '';=0A=
PUwin=3Dwindow.open('about:blank','PUwin', =
'width=3D'+PUwinWidth+',height=3D'+PUwinHeight+',location=3Dno,menubar=3D=
no,titlebar=3Dno,status=3Dno,toolbar=3Dno,scrollbars=3Dyes,resizable=3Dno=
'+addIt,true);=0A=
PUwin.blur();=0A=
return PUwin;=0A=
}=0A=
=0A=
if (PUoverTimes < 1) {=0A=
document.write('