Preface
=======

   PortDiag  and  its  documentation is Copyright (c) Short Software, Prague,
Czech Republic.

   This  archive  can be freely redistributed as long as all of its files are
included   in  their  original  form  without  any  additions,  deletions  or
modifications  (excluding addition of other README-style files and icons) and
no  more  than  a nominal fee is charged for its distribution.  All copyright
notices  in  the  programs  and  accompanying documentation files must remain
intact.   It's especially forbidden to add various '.displayme' files and BBS
advertisements.  This style of distribution is generally known as FREEWARE.

   Special permission is given to Fred Fish to distribute this program on his
"Fish Disks".

   This  software  is  provided  "AS IS" without warranty of any kind, either
expressed or implied.  The author is not responsible for any damage caused by
it.


Description
===========

   PortDiag  is generally used for low-level hardware watching and modifying.
It  has  support  for  all the bits of the four CIA ports, digital and analog
parts of the game ports, serial port TXD and RXD signals and selective system
allocation of this hardware.

   PortDiag executable is not PURE and thus _cannot_ be made resident.


Requirements
============

   PortDiag executable requires Kickstart version 37 (2.04) or higher and the
ss.library  V5.0  or  higher  (from package SSLib*.lha).  The Special Support
Library is Copyright (c) Martin Mares, MJSoft System Software.


Usage
=====

   PortDiag  can be run from the CLI or the Workbench.  The only one existing
argument can be specified as parameter from the command line or as a tooltype
from the Workbench.

   Argument template:  "OMIT_ANY_OF_ALL_THOSE_ANNOYING_WARNING_MESSAGES
=FORCE/S"

   You will know what this option does after you run this sw ;-).


Graphical user interface description
====================================

  The  main  (and the only) window is divided to nine parts:  four CIA ports,
two game ports, "Start potgo" gadget, serial bits and allocation.

Four CIA ports
--------------

  The  first  digit says the bit position in the CIA hardware register.  It's
followed  by  the  descriptive  signal name (suffixed by '/' for the negative
signals).   The  third column (physical port pin description) has a character
code  saying  which  connector  it is related to and the number of the pin on
that connector.  Character codes:
	D  = Disk drive
	GA = Game port 1
	GB = Game port 2
	P  = Parallel port
	S  = Serial Port

  The  first  of  the two control buttons controls DATA (up{0} - 0, down{1} -
1),  the second one controls bit direction (up{I} - input, down{O} - output).
Changing of the DATA signal in the input mode is not possible.

  The  "Default"  button  in  the bottom sets the values of all the direction
bits of this port to their startup values.  It doesn't set their data values,
only the directions!

  Note:  If you have some of the output signals connected to ground / +5, the
DATA bit displays the state of the external signal not depending on what does
the processor want to be there.  So to minimize the possible damage, PortDiag
checks the port after each write and if it reports still the same value, it's
set back to the external one.

Two game ports
--------------

  The  first  two  counters ("X" and "Y") display the mouse position counters
(JOYxDAT  registers).   Right  to them are lights labeled as (R)ight, (D)own,
(L)eft,  and  (U)p  which have meaning only if a joystick is connected to the
game  port.   These buttons are decoded from the counters and they are only a
different representation of the counter values.

  The  third  and  fourth  counter  ("A"  and  "B") displays the pot counters
(JOYxPOT  registers).   They  are  used  for the right ("B") and middle ("A")
mouse  buttons  and  for  the coordinates on analog joysticks.  You can start
these counters by the "Start potgo" button (see below).

  The  six buttons in the bottom right corner are grouped horizontally to two
triples.   In  each triple, the first (leftmost) button controls the data bit
of  output ({0}/{1}), the second one displays the data bit of input ({0}/{1})
and the third (rightmost) is the direction ({I}/{O}) select.

  Don't   forget   that   the   "gameport.device"   (at   least  under  usual
circumstances) periodically resets the first Game Port so you can't change it
manually.

"Start potgo" gadget
--------------------

  This  button  dumps  capacitors and starts the "A" and "B" counters on both
game ports (see above).

Serial bits
-----------

  This  sub-window displays the state of the input-only RXD signal and allows
setting  of  TXD  signal.  TXD is controlled by manipulating the serial break
(ADKCON->UARTBRK)  so  you  can't  see level transitions during normal serial
transmission.

Allocation
----------

  These  four buttons ("Serial", "Parallel", "Disk" and "Game Ports") prevent
other  tasks  from  using  the  corresponding  ports.   It's always better to
allocate the part of the hardware which you are going to play with, otherwise
some other task using this port may be confused by you.


Supplied icons
==============

  There are several alternative icons from Pavouk named "PortDiagX.info" in this
package.  You may cHoose one of them and replace the "PortDiag.info".

Final words
===========

  Before  sending  any  questions,  please read the hardware manual (at least
twice).  If it doesn't solve your problem, read it once again.

  BUGS: Terribly written, sorry.

  Thanks to MJSoft for support and the ss.library.
  Thanks  to  Pavouk for the idea, icons and images (flames about similiarity
of '1' - 'I' and '0' - 'O' send to pavouk@k332.feld.cvut.cz).

  Send all comments and bug reports to short@k332.feld.cvut.cz.

