       --------------------------------------------------------
       "cnet.device" PCMCIA ethernet card driver for A600/A1200
       --------------------------------------------------------
            pre-v1.2 by Bruce Abbott <bhabbott@inhb.co.nz>
        v1.2 - v1.8 by Harry "Piru" Sintonen <sintonen@iki.fi>


Introduction:

  This is an PCMCIA (aka PC Card) ethernet card SANA2 driver for
  Amiga 600 and Amiga 1200 computers. Most NE2000 compatible cards
  are supported (I hope).


Requirements:

  - A compatible PCMCIA ethernet card (see the compatibility list).

  - An Amiga 1200 or Amiga 600. A1200's need a hardware mod (see
    A1200mod.txt).

  - Network software. Tested with Genesis 1.0.6 and MiamiDx 1.0c.

  - A network, obviously. :-)


Usage:

  Four different versions of cnet.device are provided:

  - cnet.device.000     - 68000 version, for stock A600s.
  - cnet.device         - 68020 version, for 68020+ CPUs.
  - cnet.device.turboio - 68020 version with DMA speedup hack, for
                          68020+ CPUs.
  - cnet.device.debug   - 68020 version with debug output to debug
                          terminal enabled, use sashimi to capture.

  The 68000 version is intended to be used with unexpanded A600. The
  68020 version is for machines with 68020 or better CPU.

  The `turboio' version has a special speedup hack implemented (tech:
  it uses longword access to 16-bit hardware register) that in most
  cases give better performance than the regular 68020 version.
  However some beta testers reported that the regular version is faster.
  Do your own benchmarking to figure out which one is faster for you.
  If you don't care that much about the speed (the speed difference is
  quite minor anyway) then just pick the regular version.

  If cnet.device fail to work properly `cnet.device.debug' probably can
  help. It includes full line debug information and has extensive debug
  output to debugging terminal. The output can be captured with sashimi.
  Such sashimi log is recommended when reporting device bugs.


  Simply copy the preferred version of "cnet.device" to where you want
  it (usually "DEVS:networks/cnet.device") and set up your network
  software for an ethernet driver. For AmiTCP 3.0 this would involve
  editing the "interfaces" file and adding a line like
  "cnet dev = devs:networks/cnet.device". Then you would start it up
  with "ifconfig cnet0 192.168.0.1".

  With Genesis and Miami(Dx) setup is really easy, use provided
  installation "wizard" to set up the network. Choose SANA2 type for
  device driver, then choose `DEVS:networks/cnet.device', unit 0.


About Netax1200:

  Netax1200 card somes with its own driver called `netax.device'. This
  basically is old cnet.device, so Netax1200 users can use cnet.device
  instead.


Performance:

  My network consists of an A1200 603e+/240MHz/060/50MHz connected via
  coax cable to a P120 laptop. Software on the Amiga is AmigaOS 3.5 +
  Genesis 1.0.6 and on the laptop Debian 2.2. The amiga has Apollo RE450CT
  pcmcia card and the laptop has 3com EtherLink III pcmcia card. FTP
  download from laptop have reached 786Kbytes/Sec. On overclocked 060
  systems speeds of >819Kbytes/Sec have been reported.

  <flame>
  Note that Miami and MiamiDx are a lot slower than AmiTCP/IP based
  (Genesis) systems! Nothing can be done to help here, complaints to
  Mr Kruse of nordicglobal <kruse@nordicglobal.com>. And NO I will NOT
  make MNI driver for Miami(Dx) because for some lame excuse MNI devkit
  is kept private! (aargh)

  My advice is: use the better protocol stack, Genesis.
  </flame>


Limitations:

  A1200s require an internal modification to the CreditCardReset line
  to ensure correct card initialisation. If you haven't done this mod,
  you may need to wait until after powering up your A1200 before plugging
  the card in. If the 'Link' LED stays on but you are using coax cable,
  this indicates that the card is NOT working properly. Also, sometimes
  the card can appear to be OK but still doesn't work correctly.

  If you don't think you can manage the hack, contact your local amiga
  dealer for plug'n'play PCMCIA-reset-fix -circuit.

  NOTE: This hardware mod is not necessarily needed, you can use
  <aminet:util/boot/CardReset.lha> or
  <aminet:util/boot/BK_CardReset.lha> instead.
  Alternatively you can use CardPatch, which should improve card.resource
  even more:
  <aminet:util/boot/CardPatch.lha>.


Surf Squirrel Problems:

  The Surf Squirrel SCSI/Serial adapter is not a proper PCMCIA card, and
  has no attribute memory. Unfortunately, its driver takes over the PCMCIA
  port and prevents other drivers from owning their cards. This will happen
  whenever squirrelscsi.device is opened, even if the Surf Squirrel card is
  never plugged in!


Card_info Diagnostic Tool:

  The `card_info' program can be used to identify a PCMCIA card, and
  will display a summary of its attributes. It also produces a binary
  dump of the attribute and I/O memory, which can be analysed for more
  detailed information. `card_info' is quite useful as it can be used to
  find out if the card and the hardware mod work. *However*, just the fact
  that the network card is detected by card_info doesn't yet guarantee it
  would work with cnet.device!


Example Network Files:

  Because many people seem to have trouble setting up an Ethernet network,
  I have included a copy of my own network configuration and startup script
  files, which you can use as a template for your own installation. Please
  change the username etc. to suit. (These files are by Bruce Abbott
  <bhabbott@inhb.co.nz>, nowadays quite obsolete since both major Amiga
  TCP/IP stacks have installation "wizard")


Building:

  src directory contains the full source code for cnet.device. You need
  standard make, phxass, phxlnk and os-includes to compile. Everything
  needed excluding os-includes are available on aminet. os-includes are
  available on devcd2.1 for example. After installing make, phxass and
  phxlnk within standard path do the following to compile:

  > cd src
  > assign os-include: ADCD_2.1:NDK/NDK_3.5/Include/include_i/
  > make

  This results four cnet.device binaries to src directory.


Legal Mush:

  Original note by Bruce Abbott <bhabbott@inhb.co.nz>:

  <quote>

  To encourage further development in PC-CARD devices for the Amiga, I am
  placing the source code for this project into the Public Domain. You
  can freely use or abuse it as you wish. I have also included some other
  authors' code for reference purposes, please respect their copyrights.

  Please note that this driver is not a finished product, and is almost
  certain to harbour a few bugs. Thus I will not be held responsible for
  any loss or injury that you may incur while using it.

  I cannot guarantee compatibility with your system. All I can say is it
  works for me.

  </quote>

  Special thanks go to Bruce Abbott for making cnet.device public domain.
  This `legal mush' quote still applies, although I tried to remove as
  many bugs as I could. cnet.device v1.2 - v1.8 are still public domain
  and full source code is included. Enjoy!

  - Harry "Piru" Sintonen, 27th Oct 2002.
