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

util/cli/HowDif.lha

Mirror:Random
Showing:m68k-amigaosgeneric
No screenshot available
Short:File comparison/examination utility
Author:amigansoftware at gmail.com (James Jacobs)
Uploader:amigansoftware gmail com (James Jacobs)
Type:util/cli
Version:2.2
Requires:OS2.0+
Architecture:m68k-amigaos >= 2.0.0
Date:2008-09-06
Download:http://aminet.net/util/cli/HowDif.lha - View contents
Readme:http://aminet.net/util/cli/HowDif.readme
Downloads:310
This program performs byte-for-byte comparisons on files, and shows
its results as a colour-coded hex dump.
  The program knows 4 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 one filename instead of
two).

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.

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:

    1> HowDif <file1> [<file2>] [-v|VANILLA] [ASCII]
       [ARCADIA|ELEKTOR|INSTRUCTOR] [-r|RETURNS]

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

    1> HowDif nibble.bin supergob.bin -a -v ARCADIA

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

The primary file is whichever of the two files is smaller, or the
first file specified if their sizes are equal. The contents of the
primary file are shown.

The -v (VANILLA) option suppresses the emission of ANSI codes, resulting
in monochrome output. Otherwise, bytes which are different in each file
are shown in white (Amiga) or red (IBM-PC). Bytes which are the same in
both files are shown in black (Amiga) or green (IBM-PC).

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

(There are currently no known dumps or listings of Signetics Instructor 50
software, so this feature might not be very useful. If you have any such
dumps or listings, please contact us!)

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 relevant to the IBM-PC. 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.

Full SAS/C 6.58 source code is included.

URLs:  http://amigan.1emu.net/releases/
       http://amigan.classicgaming.gamespy.com/
EMail: amigansoftware at gmail.com

                                        Enjoy!
                                        James Jacobs and Ward Shrake

                                        3/9/08



Contents of util/cli/HowDif.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 9152   15600  58.7% -lh5- 5e62 Sep  2 22:52 HowDif/HowDif
[generic]                 2971   10350  28.7% -lh5- 61f5 Sep  2 22:52 HowDif/HowDif.readme
[generic]                 4919   18922  26.0% -lh5- 0e88 Sep  2 22:52 HowDif/source/howdif.c
[generic]                  152     231  65.8% -lh5- d197 Oct 14  2002 HowDif/source/scoptions
[generic]                  232     412  56.3% -lh5- a459 Sep  2 22:04 HowDif/source/ship.sasc
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         5 files   17426   45515  38.3%            Sep  6 01:37

Aminet © 1992-2008 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>