AminetAminet
Search:
84736 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/HowDif.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:File comparison/examination utility
Author: amigansoftware at gmail.com (James Jacobs)
Type:util/cli
Version:3.0
Architecture:m68k-amigaos
Distribution:Aminet
Date:2013-10-14
Download:util/cli/HowDif.lha - View contents
Readme:util/cli/HowDif.readme
Downloads:1571

This program performs byte-for-byte comparisons on two or three files, and
shows its results as a colour-coded hex dump.

The program knows four character sets:

    * ASCII
    * Emerson Arcadia 2001
    * Elektor TV Games Computer
    * Signetics Instructor 50

so is especially useful for comparing game dumps and hunting for easter
eggs for these systems, but the program is also useful for more general
purposes. It also can operate as a straight hex/ASCII/Arcadia/Elektor/
Instructor file dumping utility (if you pass it only one filename).

The files in this archive are used to compare binary files. The MS-DOS
"compare" utility only reports ten mismatches, then stops comparing.
It is used primarily when there is an assumption that the two files in
question are most likely identical.

We had a use for a program that assumed just the opposite; that the two
files were probably quite a bit dissimilar. We needed to know HOW MUCH
they differed and WHERE. So we wrote this program, which does just that.
Also, you can compare three files at a time if desired.

You use it from the command line. All output from the program goes to the
standard output (normally the console), and thus can be piped or
redirected as desired.

Usage is as follows:

    HowDif <file1> [<file2> [<file3>]] [-v|VANILLA] [-n|NOASCII]
    [ARCADIA|ELEKTOR|INSTRUCTOR] [-r|RETURNS]

where the arguments are the files you wish to compare. For example:

    HowDif nibble.bin supergob.bin -v ARCADIA

If only one filename is given, the program merely shows the file.

If two or three filenames are given, the program shows the first file,
and performs a comparison on the files. If the files are of uneven
lengths, the program uses the length of the shortest file as the amount
to show and compare.

The -v (VANILLA) option suppresses colour output. Otherwise, the following
colour coding is used (although you might get other colours on the Amiga
depending on your Palette Preferences):

                                      IBM-PC    Amiga
                                      ---------------
    Bytes are the same                Green     Black
    Bytes are partially mismatched    Yellow    Cyan
    Bytes are totally mismatched      Red       White

The ASCII option shows an ASCII representation of the data. Control
characters ($00-$1F and $80-$9F) are shown as '.'. Note that obviously you
will get different ASCII representations on the Amiga and IBM-PC, due to
the differing extended ASCII sets used.

The ELEKTOR option shows an Elektor TV Games Computer representation of
the data. The Elektor uses the character set shown below. Garbage
characters are shown as '·'.

    0/O     1     2/Z     3      4     5/S     6      7
    $00    $01    $02    $03    $04    $05    $06    $07
    ---    ---    ---    ---    ---    ---    ---    ---
    ###    ..#    ###    ###    #.#    ###    ###    ###
    #.#    .##    ..#    ..#    #.#    #..    #..    ..#
    #.#    ..#    ###    ###    #.#    ###    #..    ..#
    #.#    ..#    #..    ..#    ###    ..#    ###    ..#
    #.#    ..#    #..    ..#    ..#    ..#    #.#    ..#
    ###    ..#    ###    ###    ..#    ###    ###    ..#

     8      9      A      b      C      d      E      F
    $08    $09    $0A    $0B    $0C    $0D    $0E    $0F
    ---    ---    ---    ---    ---    ---    ---    ---
    ###    ###    ###    #..    ###    ..#    ###    ###
    #.#    #.#    #.#    #..    #..    ..#    #..    #..
    ###    ###    ###    ###    #..    ###    ###    ###
    #.#    ..#    #.#    #.#    #..    #.#    #..    #..
    #.#    ..#    #.#    #.#    #..    #.#    #..    #..
    ###    ###    #.#    ###    ###    ###    ###    #..

     G      L      I      n      P      r      =       +
    $10    $11    $12    $13    $14    $15    $16    $17
    ---    ---    ---    ---    ---    ---    ---    ---
    ###    #..    ###    ...    ###    ...    ...    ...
    #..    #..    .#.    ...    #.#    ...    ...    ...
    #..    #..    .#.    ###    ###    ###    ...    ...
    #..    #..    .#.    #.#    #..    #..    ###    ...
    #.#    #..    .#.    #.#    #..    #..    ...    ...
    ###    ###    ###    #.#    #..    #..    ###    ...

     +      -      :      x      ?      _      !      N
    $18    $19    $1A    $1B    $5F    $8A    $A2    $AA
    ---    ---    ---    ---    ---    ---    ---    ---
    .#.    ...    ...    ...    ###    ...    .#.    ...
    .#.    ...    .#.    #.#    ..#    ...    .#.    ###
    ###    ###    ...    .#.    ..#    ...    ...    #.#
    .#.    ...    .#.    #.#    ###    ...    .#.    #.#
    .#.    ...    ...    ...    #..    ...    ...    #.#
    ...    ...    ...    ...    #..    #.#    ...    #.#

     l      T      i      :      .
    $BB    $BC    $DF    $E6    $F7
    ---    ---    ---    ---    ---
    #..    ###    ..#    ##.    ...
    #..    ###    ...    ##.    ...
    #..    .#.    .##    ...    ...
    #..    .#.    ..#    ...    ...
    #..    .#.    ..#    ##.    ...
    #..    .#.    ..#    ##.    .#.

The INSTRUCTOR option shows a Signetics Instructor 50 representation of
the data. The Instructor uses the character set shown below. Garbage
characters are shown as '·'.

    ###    ..#    ###    ###    #.#    ###    ###    ###    ###    ###
    # #    . #    . #    . #    # #    # .    # .    . #    # #    # #
    #.#    ..#    ###    ###    ###    ###    ###    ..#    ###    ###
    # #    . #    # .    . #    . #    . #    # #    . #    # #    . #
    ###    ..#    ###    ###    ..#    ###    ###    ..#    ###    ###
    $00    $01    $02                  $05    $06    $07    $08    $09
   0 or O 1 or I   2                  5 or S 6 or G   7      8      9

    ###    #..    ###    ..#    ###    ###    ###    #..    #.#    ...
    # #    # .    # .    . #    # .    # .    # #    # .    # #    . .
    ###    ###    #..    ###    ###    ###    ###    #..    #.#    ###
    # #    # #    # .    # #    # .    # .    # .    # .    # #    # .
    #.#    ###    ###    ###    ###    #..    #..    ###    ###    #..
    $0A    $0B    $0C    $0D    $0E    $0F    $10    $11    $12    $13
     A      B      C      D      E      F      P      L      U      R

    #.#    ...    ...    ...    ..#    ...    ...    #.#    ###
    # #    . .    . .    . .    . #    . .    . .    # #    # #
    ###    ###    ###    ...    #.#    ###    ...    ###    #.#
    # #    # #    . .    . .    # #    . .    . .    . #    # #
    #.#    ###    ###    ...    ###    ...    ...    ###    #.#
    $14    $15    $16    $17    $18    $19    $1A    $1B    $1C
     H      O      =    space    J      -      ?      Y      N

The ARCADIA option shows an Emerson Arcadia 2001 representation of the
data. The Arcadia uses a 64-character set, shown below. Graphics
characters are represented by lowercase letters.

    $0123456789ABCDEF
     ----------------
$00:  /\#bc_efghijklm    $00          : space
$10: 0123456789ABCDEF    $01-$0F (/-m): graphics characters
$20: GHIJKLMNOPQRSTUV    $38-$3B (n-q): sprites 0-3
$30: WXYZ.,+$nopqrstu    $3C-$3F (r-u): user defined characters 0-3

$00 ( ): ........ $01 (/)  .......# $02 (\): #....... $03 (#): ########
         ........          ......#.          .#......          ########
         ........          .....#..          ..#.....          ########
         ........          ....#...          ...#....          ########
         ........          ...#....          ....#...          ########
         ........          ..#.....          .....#..          ########
         ........          .#......          ......#.          ########
         ........          #.......          .......#          ########

$04 (b): ######## $05 (c): ......## $06 (_): ........ $07 (e): ##......
         ########          ......##          ........          ##......
         ........          ......##          ........          ##......
         ........          ......##          ........          ##......
         ........          ......##          ........          ##......
         ........          ......##          ........          ##......
         ........          ......##          ########          ##......
         ........          ......##          ########          ##......

$08 (f): ######## $09 (g): ######## $0A (h): ##...... $0B (i): ......##
         ########          ########          ##......          ......##
         ......##          ##......          ##......          ......##
         ......##          ##......          ##......          ......##
         ......##          ##......          ##......          ......##
         ......##          ##......          ##......          ......##
         ......##          ##......          ########          ########
         ......##          ##......          ########          ########

$0C (j): .......# $0D (k): #....... $0E (l): ######## $0F (m): ########
         ......##          ##......          #######.          .#######
         .....###          ###.....          ######..          ..######
         ....####          ####....          #####...          ...#####
         ...#####          #####...          ####....          ....####
         ..######          ######..          ###.....          .....###
         .#######          #######.          ##......          ......##
         ########          ########          #.......          .......#

Note that the ARCADIA, ELEKTOR and INSTRUCTOR options are mutually
exclusive; you can specify none or one of them, but not two or three.

The -r (RETURNS) option is only for the IBM-PC version. Normally, HowDif
detects the situation where its output is exactly 80 characters wide, and
suppresses the emission of newlines (returns) in that case, to make the
output look better on a DOS-style console. If you specify RETURNS, it will
always emit newlines at the end of each line.

SAS/C 6.58 and Visual C 6.0 source code is included.

Changes since V2.2:
    * Support for comparing three files at a time.
    * Miscellaneous improvements and bug fixes.

James Jacobs and Ward Shrake
13 October 2013

END OF DOCUMENT-----------------------------------------------------------



Contents of util/cli/HowDif.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                 9346   16236  57.6% -lh5- 8c6e Oct 13 16:41 HowDif/HowDif
[unknown]                 3023   10524  28.7% -lh5- b2aa Oct 13 16:41 HowDif/HowDif.readme
[unknown]                 5477   23579  23.2% -lh5- f2d8 Oct 13 16:41 HowDif/source/howdif.c
[unknown]                  152     231  65.8% -lh5- d197 Oct 14  2002 HowDif/source/scoptions
[unknown]                  245     444  55.2% -lh5- b043 Oct 13 16:03 HowDif/source/ship.sasc
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total         5 files   18243   51014  35.8%            Oct 13 20:30
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>