Checksum Calculator Copyright (C) Moose O'Malley,
------------------- October 1996.
Checksum Calculator for Windows 3.1, 3.11, 95, NT.
Developed using 16-bit and 32-bit Delphi.
(For more details on the 16-bit and 32-bit versions
see "16 Bit and 32 Bit versions" below).
Checksum Calculator is useful for :
- calculating checksums for various files, to ensure
copying / transmission occurs correctly.
- calculating, comparing, and checking checksums for Arcade Game
ROMs and the ROMS and EPROMS in various computer equipment.
- calculating, comparing, and checking critical set-up files on
a PC to determine if anyone or anything (such as a virus) has
changed or tampered with these files.
If you are using Windows 3.x, then please use the 16 bit version
of Checksum Calculator (CHECKSUM.EXE), otherwise, if you are
using Windows 95 / NT, please use the 32-bit version of
Checksum Calculator (CHECKSUM.EXE in the \32bit\ directory in
the ZIP file), which has Long File Name support, and support
for multi-gigabyte File Lists.
Checksum Calculator works in 2 modes :
- Multi-File Mode :
- Command Line Mode : (by popular demand !!)
These are discussed fully below.
For those who are interested, Checksum Calculator is a complex
program and the current version consists of over 5,700 lines
of PASCAL code - including code comments.
Multi-File Mode :
-----------------
In this mode, you can select single files, groups of files,
whole directories, and ALL files in a directory and all
its sub-directories to generate Checksums on in a single run.
You can also exclude all files with a certain extension,
or exclude all files in directories you specify.
These file / directory lists can be saved in PROFILE files
for future use, or command line running (see below).
You can also choose the type of Checksum to be calculated.
- 4 HEX Digit byte addition checksums.
- Full HEX byte addition checksums.
- Cyclic Redundancy Count Checksums.
Refer to the CHECKSUM.HLP file for full details on what
these checksums are.
Results of the Checksum calculation can be stored in
special .SAV files, and/or compared against other
saved checksum results.
A special Checksum Comparison report can be generated to
show any mismatches against these previous checksum runs.
See "Files Generated by Checksum Calculator" below for
further information.
Command Line Mode : (Registered Users Only) (by popular demand !!)
-------------------
At the moment, the command line parameters are :
/pro:profile_name.pro (Mandatory)
The Profile contains the list of files / dirs you
want to generate Checksums on.
/cmp:other_results_file.sav (Mandatory)
The file containing a pre-calculated list of Checksum
Results against which the newly calculated Checksums
will be compared.
/savchk:checksum_results_file.sav (Optional)
Where the results of the newly calculated checksum
results are saved.
If this parameter is not supplied, the checksum
results will NOT be saved.
You can specify the same file as the /cmp: parameter
but, this would mean that all checksums match every time.
/savcmp:compare_file.cmp (Mandatory)
Where the results of the checksum comparison are saved.
If the checksums of all files match perfectly,
then this file will not exist - unless the
"/writeallmatch" flag (see below) is used.
/chk:check_sum_algorithm_name (Optional)
The options here are :
4dig 4 HEX Digit byte addition checksums.
full Full HEX byte addition checksums.
crc Cyclic Redundancy Count Checksums.
If the user doesn't specify a Checksum algorithm to use,
then whatever was they used last-time is used again.
/autoclose:nn (Optional)
If this paremeter is supplied by the user, then Checksum
Calculator will automatically shutdown even if there
are mismatches in the calculated checksums.
You can also specify a number of seconds that Checksum will keep
the Comparison file open for before closing / exiting.
e.g. /autoclose will shut the window down immediately.
/autoclose:0 will shut the window down immediately.
/autoclose:3 will keep the window open for 3 seconds.
If this parameter isn't on the command line, then
Checksum Calculator will show a window to the user with
all mismatches (if any), and wait for the user to click OK.
/writeallmatch (Optional)
Normally if all compared Checksums match perfectly, no
Checksum Comparison Results Save File is produced, in fact
Checksum Calculator goes out of its way to ensure none
even exists. (See the "/savcmp:" parameter above).
However, if this /writeallmatch command line param is
used, then the "All Files / Dirs Match perfectly" is
written to file.
/ignorenewfiles (Optional)
This parameter specifies that all new files are excluded
from the checksum comparison results. This means that
only files whose checksums mismatch will be listed.
If this parameter is not supplied, it is assumed that
new files should be listed on the results screen
(i.e. NOT ingored), regardless of what the
"Ignore New Files in Checksum Comparison Results"
on what the Settings / Options screen is set to.
Examples of Command Line use :
CHECKSUM.EXE /pro:c:\11\delphi\11.pro /cmp:c:\11\delphi\11.sav /savchk:c:\11\delphi\11_new.sav /savcmp:c:\11\delphi\11.cmp /ignorenewfiles /autoclose /chk:crc /writeallmatch
A command line could be setup / run from a DOS Batch file
(provided Windows is loaded), the DOS command prompt (provided
Windows is loaded), from the Icon Properties (Windows 3.1),
or from the Shortcut Properties (Windows 95).
The order of these parameters on the command line does
not matter.
Validation / verification of the parameters is performed
by Checksum Calculator.
If a Profile is supplied only, then load it, and calculate checksums.
If a Profile and a Comparison File are supplied only, then load
the profile, calculate checksums and compare checksum results.
If a Profile, a Comparison File, and a Checksum Comparison
Results Save File are supplied, then load the profile,
calculate checksums, and compare checksum results, and save them.
The "Autoclose" has no effect unless all a Profile, a
Comparison File, and a Checksum Comparison Results Save File
are all supplied !
Files Generated by Checksum Calculator : { Multi-File Mode ONLY ! }
----------------------------------------
Profiles (.PRO)
These files are simply a user-defined list of files and directories
which the user wishes to calculate checksums for.
These profiles enable you to use the same list of files / directories
in a future checksum run.
For example, a single profile could contain :
c:\autoexec.bat
c:\config.sys
c:\network\config\*.* { All files in dir }
c:\windows\*.ini { all INI files in dir }
etc
Checksum Result Files (.SAV)
These files contain the file name, file path, and checksum for
each and every file in the user's (above) Profile.
Checksum Comparison Files (.CMP)
These files contain the results of comparing the checksum
results for a group of files with a previous run on the
same files. i.e. the results of comparing 2 .SAV files.
16 Bit and 32 Bit versions :
----------------------------
Apart from Long File names (which are wonderful !), the 32-bit
version is much faster, and also introduces larger file lists.
But, hang on a second, what the hell does that mean ?
Well, for the 16-bit version, there is a 64 KB file list
size limit (2 to the power of 16 is 65,536 bytes). So the
total size of the list that contains all path + file name
details for all files to be processed cannot exceed 64 KB.
So, if the average path + file name length for your files
is 20 characters, then you can only process around 3,200
files. I have run the 16-bit version with over 6,000 files
in various directories. Not a bad limit !
But, for the 32-bit version, this list size limit is extended
to 1.5 GB ! But, we also have long file names, so the average
file name + path length may be 40 charcters. Even so, the
number of files limit is extended to over 40 million files !!
This is a limit most users will not easily reach !!
Speed Comparisons - 16 / 32 and CRC / Checksum :
------------------------------------------------
32 Bit 16 Bit
CRC's 1500 KB/Sec 650 KB/Sec
Byte Add Checksum 1250 KB/Sec 655 KB/Sec
The above results are based on repeated benchmarks of 502 Files,
totalling 160 MB on my Pentium 100, 16 MB RAM, Windows 95 PC.
So, the 32 bit version is more than twice as fast as the 16 bit
version, and, because I have optimised calculations so much,
CRC calculations are now faster than simple Byte Addition
Checksums in the 32 bit version.
Running both 16 Bit and 32 Bit versions :
-----------------------------------------
If you are intending to use both 16 bit and 32 bit versions
of Checksum Calculator (which you may choose to do if
you are using both Windows 3.1 and Windows 95 / NT machines)
then it is important that you keep seperate Profiles and
Checksum Results Files for each version.
In the 32 bit version, all file names are long, and the
16 bit version will have serious trouble with these -
as Checksum Calculator cannot construct a short file name
from a long one.
Also, in the 16 bit version, all file names are short, and
the 32 bit version will have serious trouble with these,
as Checksum Calculator cannot construct a long file name
from a short one.
So, it is best to keep the Profiles, Checksum Results Files,
etc well and truly seperate for the 16 and 32 bit versions.
e.g. For the 16 bit version you might gave a profile
called "chklst.pro" and for the 32 bit version, you
might have a profile called "chklst32.pro" or (even
better) "check_list_32.pro".
Checksums and CRCs :
--------------------
If you would like further information on CRCs and Checksums
please refer to the CHECKSUM.HLP file for full details.
The Future :
-------------
Future changes to this program may include :
- Drag and Drop Files / Directories from File Manager (Win 3.x) or
Windows Explorer (Win 95) into Checksum Calculator's main window.
- Add in support for Motorola 'S' format & Intel Hex
format files. (Does anyone need this ?)
- Background calculation of Checksums, multi-threaded execution,
and other changes to enhance the speed of calculation of checksums.
- Add in a "Construct Command Line" button, so you choose the
Profiles, Checksum Save Files, etc, etc with a mouse and it
builds the required command line for you and displays it in
a Window so you can copy & paste it for use.
- Add in an "Exclude File Spec" button, so that you can exclude all
files that satisfy back*.doc or some other wildcarded file spec.
- Add in other CRC / Checksum algorithms. e.g. CRC 32.
- Add in functionality to enable the user to change the File
Read Buffer size, as different sizes work better on different
machines with different CPUs, RAM sizes, disk subsystems, etc.
- Anything else ? Email me and let me know !!
Special Thanks to :
-------------------
I would especially like to thank the following people :
- Jim Knight of FORD Motor Co USA, who gave me loads of
support and ideas, and kept pushing me through all
those all night programming sessions to keep improving
this program. Jim's influence was high for versions
v2.0, v2.1, v2.2, and v2.3.
Sharware Information :
----------------------
This is NOT free software.
This product is shareware.
This means that you can try out the software for evaluation
purposes without charge for a period of 21 days to enable you
to decide whether to purchase / register it.
If you use this software after the 21 day evaluation period
a registration fee is required. See the Registration Form
in the file register.txt.
Unregistered use of this software after the 21-day evaluation
period is in violation of U.S. and international copyright laws.
If you do not purchase / register the software after the 21 day
trial period, then you must delete it from your system.
In order to encourage me to develop this software and keep
developing other software, I encourage you to do the right
thing and register the software.
I could have easily have made the programs nag you to Register,
or expire after 21 days of use, but I do not like this approach.
From April 97 on, however, some of the new functionality being
added to my programs will be available for Registered users only.
I tried to avoid doing this, but now I have been forced to do
this to try and encourage some Registrations.
I live in the hope that if people use the programs, then they
will register them.
Registered users will receive FREE upgrades of the program for
the life of the program. i.e. as long as I keep improving the
program, registered users will get this new / additional
functionality for FREE.
To Register, please complete the Registration Form in
the file register.txt.
Ammendment History :
--------------------
Vers Date Description
1.1 01-Oct-96 First Public Release.
(449 lines of code)
1.2 09-Jan-97 Enable Double Click on FileName box to select file,
and add a File Select button. Add in "Calculating ..."
messages for big files. Add in "Copy to Clipboard"
button - to copy filename + EPROM Checksum.
1.3 27-Jan-97 Add in Registration functionality.
(1,473 lines of code)
2.0 03-Jun-97 Massive changes for this release.
Save settings automatically on Windows 95 shutdown
(Registered Users only).
Start Minimised if set in Shortcut / settings
(Registered Users only).
Improve application startup - size and position
form before user sees it.
Add in support for "Multi-File Mode", which enables
the user to define lists of single files, groups of files,
and whole directories to generate Checksums on in a single run.
These file / directory lists can be saved in PROFILE files
for future use.
Results of the Checksum calculation can be stored in
special .SAV files, and/or compared against other
saved checksum results.
A special Checksum Comparison report can be generated to
show any mismatches against these previous checksum runs.
Add in Menu items for viewing my Shareware Catalog,
the Readme file, and the Registration Form.
Many changes / enhancements.
2.1 10-Jun-97 Add in a Command Line mode to enable automated
calculation of checksums and comparisons of
checksum results. (Registered Users only).
Fix the Checksumming of zero length files.
Added a Drive selector to the "Add Directory"
dialog.
Disable all buttons and protect File / Dir list
while checksums are calculating.
Display filenames while building file lists and
calculating checksums.
Add in code to elegantly handly the situation if
a file is alread open / in use when checksumming.
Implement a "Settings" screen to enable
"File in Use" messages to be displayed or not,
and to choose the Checksum type.
2.2 23-Jun-97 TEST RELEASE ONLY !
Massive changes for this release !!
Add in "Exclude ALL Files with Extension"
functionality. (Registered Users only).
Add in and "Exclude Directory" functionality.
(Registered Users only).
Add in a 32-bit version of CheckSum Calculator
for Windows 95 / NT which supports Long File
Names and bigger file lists.
Fix a problem with the 32 bit version which was
causing "Adress FFFFFFFF" errors when run in
command line mode. (This was actually caused
by a bug in DeleteFile in Delphi).
Fix the code that removed leading zeroes from
checksums when the checksum was 0. (This was
causing Address FFFFFFFF errors as well).
Add in command line options to enable selection
of the Checksum algorithm to be used, and to
automatically close the program even if all file
checksums do not match. (Registered Users only).
Fix a bug in the 16 bit version where "c:\\*.*"
was added to the list instead of "c:\*.*",
if you added the root directory to the profile.
Add in a nice WinHelp format Glossary of Terms.
Add in the ability to use CRC Checksums (via
the settings screen and command line).
(Registered Users only).
Add in "Add Dir and All Sub-Directories" button.
(Registered Users only).
Make the Cancel button on Add Files / Directories
buttons work correctly.
Rewrite code that relied on BIVBX11.DLL
BIGAUGE.VBX so that these are no longer needed.
This reduced ZIP file size by nearly 40 KB.
2.3 26-Jun-97 Fix a bug in the 32 bit version where file lists
were being truncated at 39 KB - this is another
bug in Delphi v2 so change over to Listboxes
instead of Memo fields - which are faster anyway.
Sort the files, Exclusions, etc in the main
window to make them easier to find.
Remove a file called '..' that was appearing for
"Directory and All Sub Directory" runs.
Disable the TABs (Single File, Multi File, and
Settings) in the main window while calculating
checksums - so that the user cannot change
checksum algorithms, etc half way through.
Make some changes to enable the 16-bit version to
process slightly more files. i.e. bigger lists.
Fix an error in Command Line mode where saving
of checksum comparison results was not occuring.
Fix bug in CRC calculation where the calculation
was exiting before End-of-File.
Display time taken, KB of files processed, and
KB/Sec information on Checksum Results screen.
Display File yyy of nnn while calculating checksums.
Set optimum File Read Buffer size to 8 KB.
Make sure user is prompted to save changed
profiles on exit - for *any* changes.
In the Main Screen, users can now click on
items in the Profile to delete them.
Add in a "Special Thanks To" section to this file.
Add in a "16 Bit and 32 Bit versions" section
to this file.
(5,790 lines of code)
2.4 27-Jun-97 Change the way the Command Line params work
to make them a bit more logical.
If a Profile is supplied only, then load it,
and calculate checksums.
If a Profile and a Comparison File are supplied
only, then load the profile, calculate checksums
and compare checksum results.
If a Profile, a Comparison File, and a Checksum
comparison Results Save File are supplied,
then load the profile, calculate checksums, and
compare checksum results, and save them.
Remove old "Single File Mode" - it was redundant -
"Multi-File Mode" is so powerful and easy to use.
Don't allow the user to abort checksum calculations
or Exit the program during checksum calculations.
Prompt the user to save Profile changes if they
attempt to exit the program using Window's Close
via the window icon or the application system menu.
Add in "Copy to Clipboard" buttons on all screens.
(Registered Users only).
Prompt user to save an old profile before loading
a new profile. Add in suitable prompts and
messages for list resetting, calculating checksums
on empty profiles, etc.
Display suitable messages when supplied files
in the command line parameters don't exist.
On the Checksum Profile (Main Window), you can
click on individual lines in the main window to
remove them from the profile.
Make sure that the Checksum Comparison Results
Save File does not exist after a run and that
the comparison results are not saved if all files
match percectly in command line running.
Full formal testing against a detailed written
testplan was conducted for this release !
(6,315 lines of code)
2.5 28-Jun-97 If the user presses "Reset List" and cancels
then make sure that the 'unsaved' status of
a changed profile is still intact.
Add in a "Running both 16 Bit and 32 Bit
versions" section to this file.
Fixed a bizare error in the 16 bit version,
where GPF's and OhHide / OnShow errors were
popping up when running command line mode.
I traced the code for hours, and could find no
cause for the errors, but when I changed the read
buffer from 8 KB to 4 KB, all errors went away !!
When I changed the buffer back to 8 KB the errors
occured again - very repeatable ! VERY Bizare !!
I must confess to having no idea why this error
was occuring or why a 4 KB buffer fixed it.
But, the errors are not occuring now.
Remove unused performance profiling code and
checking / degugging code for CRC calculations.
Pull a few teeth out of the "Add Directory" and
"Add Dir and All Sub-Dirs" buttons so that it allows
you to add parents of already entered dirs.
Extend the "/autoclose" command line parameter so
that you can also specify a number of seconds
to hold the comparison window open for before
closing / exiting Checksum Calculator.
Implement a new command line parameter "/writeallmatch",
which will write out "All Files Match perfectly" to the
comparison save file if all checksums match perfectly.
(Normally, nothing is written if all match perfectly).
(5,862 lines of code)
2.6 03-July-97 Rename the command line parameter "/sav" to
"/savcmp". This parameter points to where the
results of the checksum comparison are saved.
Add in a new command line parameter "/savchk"
which indicates where the results of the newly
calculated checksum results are saved.
Add in a new command line parameter
"/ignorenewfiles" and a new Settings screen option
"Ignore New Files in Checksum Comparison Results"
which both enable users to ignore new files
on the Checksum Comparison Results screen.
Label command line parameters are "Optional"
or "Mandatory" in the above documentation.
(5,926 lines of code and comments)
2.7 09-July-97 Fix bug in 16-bit version where files in
exluded directories could still be checksummed.
Full formal testing against a detailed written
testplan was completed successfully for this
release !
2.8 11-Jan-98 Fix a long standing but very elusive problem
to do with "DateEncode" errors which occured
on some machines under some conditions.
Once I could replicate the error, it was
reasonably straight forward to get a workaround
for what was another bug in Delphi.
(6,080 lines of code.)
If this program was not downloaded from my Home Page, then
it is most likely an old version. The latest version of this
program is available from my Home page and its mirrors.
Moose
-----------------------------------------------------------------
EMail : [email protected]
Home Page : http://www.rocknet.net.au/~moose/
Mirrors : See above Home Page.
-----------------------------------------------------------------