Home Network Ethernet Project am Romport MagicNet installieren
 

24.3 Ethernet Project ASCI port


Atari Computer über den Romport oder ASCI Port mit einem LAN verbinden



Sie möchten ihren Atari ST/TT/Falcon compatible an ein Ethernet anschliessen?
So geht es:

- besorgen sie sich Thomas Redelbergers "EtherNe" Paket (http://home.nexgo.de/thomas.redelberger/prj/atari/download/etherne.zip) und nehmen sie sich eine Woche frei um alles zu lesen und zu verstehen ;-)


- bauen sie den EtherNEC Hardware-Adapter, wie im Paket beschrieben

- besorgen sie sich eine moderne NE2000 kompatible PC-Netzwerkkarte für den ISA-Bus (PCI geht nicht!)

- installieren sie entweder MagiCNet oder STing oder MINTNet IP-Netzwerk-Software

Lyndon Amsdon z.B. baut die EtherNEC Hardware (bindon@madasafish).


öbrigens:
Das ganze geht natürlich mit allen Ataris die einen einen Standard ROM-Port (=Cartridge Port). Für den Atari ACSI-Bus gibt gibt es auch noch eine weitere Lösung. (ebenfalls im EtherNE Paket beschrieben).

Lyndon hat auf seiner Web-Site das EtherNEC Interface (ROM-Port):
Lyndon Amsdon
Email: bindon@madasafish.com
ICQ: UIN-120425214 Nick-stimpy
Website: http://hardware.atari.org

Unter der URL <http://home.nexgo.de/thomas.redelberger/prj/atari> sind noch zwei andere Freeware-Projekte für den Atari zu finden:

- TRLPR ein Druck-Client (unter STing) mit dem man über das Netzwerk an einem Unix/Linux-Server drucken kann


- TRPROF ein "Profiler" mit dem man Programm-Lauszeiten messen und ein Programm gezielt optimieren kann

Autor: Dr. Thomas Redelberger
E-mail: redetho@gmx.de
Fax: +49 6023 999410
Ethernet Hardware



You want to link your Atari (Mega) ST/TT/STE/Falcon to an ethernet network and are looking for hardware and software? Here is another solution!



ETHERnet with NE2000 hardware

Prerequisites:

- An Atari ST/TT/Falcon compatible machine with either Cartridge Port (ROM port) or ACSI-port

- STing or MagiCNet or MINTNet networking software

- A standard NE2000 or NE1000 network card for the ISA bus as is used with PCs


This package contains a set of hardware circuit schematics and driver software including source code. *Both* can be used under the GNU Public License. Please do read file COPYING.TXT.

I want to encourage people to build the adapter hardware and also sell it to others. The complete documentation however shall be Open Source under GNU GPL.
If somebody comes up with a CAD version of the hardware circuit schematics, I require it be published also under GNU public license in order to make it even easier for people to build the adapter. That documentation shall become part of future versions of the ETHERNE package.

Please see file ETHERNE.TXT for a description of the software, how to select hardware and software installation. File HARDWARE.TXT contains functional descriptions of the hardware solutions.

Copyright 2001, 2002 Dr. Thomas Redelberger
EtherNEC hardware schematics and layouts are copyright 2002 Lyndon Amsdon



General

Both the EtherNEA and EtherNEC interfaces generate the signals for a standard PC 8-bit ISA bus connector. Although the NE2000 cards are 16-bit cards they work also in an 8-bit slot. This is documented in some of the original NE2000 design papers. It was meant in those days a "new" NE2000 card to work in the original PC which had an 8bit only bus (we have come a long way). Thus do not worry that the small 16bit extension edge connector of a NE2000 (clone) card will be free floating. Please note that the interfaces only provide for the signals necessary to run a NE2000. They do not provide a generally usable ISA slot.



EtherNEC hardware

EtherNEC is an adapter from the Atari Cartridge Port (ROM port, CP) to a 8-bit ISA bus.

Hardware circuit description (see directory ETHERNEC for schematics)

As there is no reset line on the CP, a resistor and a capacitor are used to reset the NE card on power up.

Reading from the NE card is done by a read cycle on the CP at address /ROM4 + 512*ISA address as the ISA address lines A0-A4 are connected to CP A9-A13. /ROM4 going low will start the ISA read cycle, enable the ISA bus buffers of the NE card and start decoding of the ISA IO address by the NE card. /ROM4 going high ends the cycle and the processor latches the data.

Because the CP is read only writing to the NE card must be done with the trick to read from addresses that stand for the data. Dummy reads at /ROM3 base address + data*2 + ISA address*512 effect this. You might wonder why everything appears to be shifted up one bit. There is no CP "A0" address line. There are the signals /UDS and /LDS instead typical for the 68000 family. The original design which generated an "A0" worked on an ST and an STE but did not on a Falcon.

The falling edge of /ROM3 enables the CP address lines A1-A8 onto the data bus and starts the ISA write cycle. The rising edge will end the ISA write cycle and the NE latches the data. The processor will also see and just read this same data but that is harmless. Elmar Hilgart reported that the bus buffer IC shall be an TTL F-type to keep up with the fast cycles on the Falcon. Lyndon chose the '245 over an '244 to keep the board layout simple.

To reduce physical stress on the CP and allow for the NE card to stand upwards or lay flat, Lyndon designed an adapter from the 2mm CP to 2.54 mm connectors for 40pin standard ribbon cable (please see the layouts in folder ETHERNEC) to attach the EtherNEC adapter. This cable should be as short as possible as the processor bus runs on it unbuffered! (15cm max.)

Power +5V for the EtherNEC adapter and the NE card is taken from +5V at the CP. +12V do no seem to be necessary unless you want to run "thick ethernet" cable.



EtherNEA hardware

EtherNEA is an adapter from the Atari ACSI bus to a 8-bit ISA bus.

Hardware circuit description (see directory ETHERNEA for schematics)

The interface circuit is directly connected to the ACSI port. It does not provide any buffering. Thus the cable to the ACSI shall be as short as possible (50cm max). If another device is hooked to the ACSI bus please connect the interface to the ACSI output of that device.

The ISA port is hardwired to work at an IO address of 0x300. When writing to the ACSI bus and ACSI-A1 was set Low the '02 NOR gate output gets HI and the '373 latches the ACSI port address in the upper three bits and the lower 5 bits to be used as the lowest 5 bits of the ISA IO address. The '138 decodes the ACSI-port address. The jumpers J1, J2, J3 allow to set the ACSI port address of the interface. Note that J3 selects the ACSI port address from either 0 to 3 or 4 to 7. J1 and J2 must be set consistently to choose from 0,1,2,3 or 4,5,6,7 depending on J3.

In the prototyping phase it turned out that reads and writes to the ACSI port are too fast for the read and write cycles of some of the NE2000 cards I was testing. These were all old multi chip cards. As there is no capability to prolong the read or write cycles for single byte reads or writes on the ACSI bus, quite an unusual hardware solution was employed. A1 low will also set the two d-flip-flops '74 to a known initial state (no ISA read or write). The first write to the ACSI port will initiate an ISA write and the second ACSI write will terminate the ISA write. Similar procedure is done for reads.

A new NE2000 clone with a single Realtek 8019AS chip turned out to run directly from the outputs of the '138. With jumpers J4 and J5 you can choose between this fast mode (/IOR, /IOW coming from the '138) or slow mode described above. Note that you must select the appropriate driver to fit the hardware jumper setting: ENEAF.STX or ENEAF.MIF for fast mode and ENEAS.STX or ENEAS.MIF for slow mode.

The third NOR gate '02 is used to invert the ACSI  RESET to the RESET signal needed on the ISA bus.

The forth '02 is simply used to generate a logical Hi signal to connect to inputs that require a constant logical Hi level. This is safer than connecting the inputs to +5 Volt in case of accidental short circuits on the board or during testing measurements (a short circuit of an output to +5 Volt is usually lethal to that IC).

I built the interface prototype in wire wrap technique. As the interface is simple, a one-sided printed circuit board layout should be possible. Please note that if you develop such a printed cicuit board layout for this interface you must also publish it under the public under the GNU public license and send it to me so that I can include it into this package.

A NE2000 compatible card requires +5 Volts power supply. +12 Volts supply only seems to be needed if you use "thick ethernet" which is seldom used today. Rather most people today use twisted pair and some still use koax cable.

The interface needs +5 Volts. As my Atari ST is housed in a tower cabinet I connected the hardware to a power connector of the standard power supply forseen for a harddisk.




Abbildung 1 - Der Ethernet Adapter






Abbildung 2 - Der ISA-Adapter





Introduction

EtherNE is a package of hardware schematics and software drivers and source code to enable an Atari ST or compatible machine to connect to ethernet.

When designing this ethernet solution for the Atari ST I had the following objectives:

- no need to open the Atari thus use of an external port of the Atari
- use of readily available standard ethernet hardware
- as simple as possible interface hardware
- as fast and compact driver software as possible
- support of STing and MagicNet IP stacks. The drivers work under
MINTNet but that has not been well tested yet.

To start from well stablished hardware I chose standard NE2000 compatible cards with ISA bus interface (PCI cards are not supported) as a basis of the hardware solution. To interface the NE card to the ST EtherNE contains two types of interface hardware solutions:

ACSI-ISA interface (below called EtherNEA)
- hardware design by me
- hardware is e.g. available from Elmar Hilgart elmar.hilgart@asamnet.de, http://www.asamnet.de/ hilgarte
- This is suitable for all machines with ACSI bus, e.g. (Mega) ST, TT

Cartridge Port (ROM port)-ISA interface (below called EtherNEC)
- hardware design by Lyndon Amsdon and me
- hardware is available from Lyndon Amsdon bindon@madasafish.com, http://hardware.atari.org
- This is suitable for all machines with Cartridge Port bus, e.g. (Mega) ST, TT, (Mega) STE, Falcon.


Software wise EtherNE supports various IP networking stacks:
STinG (version 1.26 tested)
MagicNet (version from Oct. 2001 tested)
MintNet; this has only been tested recently for EtherNEC



Choosing a hardware solution

Q: Should I use EtherNEA hardware or EtherNEC hardware?

A: For the Falcon only the EtherNEC cartridge port interface is applicable. If your machine has both an ACSI port and a Cartridge Port and you have a harddisk at the ACSI port you might want to use EtherNEC because this will be faster than having EtherNEA to share the bandwidth with the harddisk. Speedwise there is no big difference, EtherNEC seems to be a bit faster for reads from the NE card and a bit slower for writes to the NE card. A future DMA enabled version of EtherNEA may be much faster however (some day). Note that the Cartridge Port +5V feeds the NE2000 card as well. Thus you do not need an extra power supply for EtherNEC whereas you need one for EtherNEA. The EtherNEC hardware is simpler. Hence most often EtherNEA may only be considered if the CP must be used for something else (e.g. dongle).


Q: What NE2000 (clone) card shall use?

A: This package works only with ISA cards. Go for new single chip cards (I tested e.g. a card with Realtek 8019 chip). They support faster read and write cycles than the old NE1000 and NE2000 (clone) cards with jumpers and are cheap.

These new cards are all PC "plug and play" without jumpers. For use with either EtherNEA or EtherNEC they need upfront one time configuration in a PC. You need to set them to IO address 0x300 and choose the cable type (BNC or twisted pair) by using the DOS configuration utility supplied by the manucaturer of the card. With EtherNEC only these new cards will work reliably.


I tested the following ISA ethernet cards with the EtherNEA interface:

- Lantech EN2000: fairly new NE2000 clone using the Realtek RTL 8019AS chip. Originally I had encountered problems with this card until I found out that only 8KByte buffer RAM where available in 8-bit bus mode although it has 16KByte. This turned out to be true for all 16 bit cards. This might be due to compatibility to the old NE1000 (8bit cards) that had only 8KB RAM. Advantage of this card - and probably all cards with this chip and possibly all new single chip cards - is its speed. It supports fast ISA bus cycle with no wait states.

- E2000-1: old NE2000 clone with Winbond W89C90 chip This card works OK.

- NE-2: old NE2000 clone with UMC UM9090 chip This card works OK.

- NE1: this is in a very old NE1000 clone card with Winbond W89C90 chip. The NE1000 is the 8-bit predecessor of the NE2000. I augmented the buffer RAM on the card to 16Kbyte and it worked quite well.

All old cards above I tested require slow ISA bus cycles and request ISA bus wait states. Hence if you got an old NE2000 or NE1000 clone and you really want to use it then you have to go for EtherNEA as only it has an "slow mode" option to support these. Old cards do not work reliably with EtherNEC because it is too fast for them and the hardware currently has no slow mode option.

The driver software automatically detects if a card is NE1000 or NE2000 compatible and does appropriate setup automatically. It assumes the NE1000 card has been upgraded to 16KByte of buffer RAM however.



Choosing an IP networking software stack

All combinations of interface hardware and IP stacks are covered. Drivers in this package include:

ENEAF.STX
STing version for fast EtherNEA fast ACSI interface

ENEAS.STX
STing version for slow EtherNEA ACSI interface

ENEC.STX
STing version for EtherNEC cartridge port interface

ENEAF.MIF
MagicNet version for fast EtherNEA ACSI interface

ENEAS.MIF
MagicNet version for slow EtherNEA ACSI interface

ENEC.MIF
MagicNet version for EtherNEC cartridge port interface

The MagiCNet versions also serve under MINTNet but require renaming the extension to XIF.

Thus you can choose the stack that better fits your application requirements.




Abbildung 3 - Schaltung ISA-Adapter






Abbildung 4 - ISA-Adapter Belegung





Driver software installation:

Setup STing or MagiCNet as advised in the documentation. Copy the STX driver to the Sting directory or MIF driver to the gemsys\magic\extension directory then reboot.

Please note that the drivers ENEA?.STX and ENEA?.MIF can only handle an EtherNEA interface hardware set to ACSI port 3 fixed. The ACSI port address is hardwired for optimum driver speed. If you really require a driver to support another ACSI port address please contact me.

The driver software source code is available in directory SRC. Please see the file SRC\ARCHITEC.TXT for details on the innards of the drivers. Please note that I publish all this code under the GNU public license. See file COPYING.TXT. Any additions or changes by you must also published under this license and brought to my attention.



Set-up under STiNG

Just copy the appropriate ENE*.STX to the STING directory where SERIAL.STX and other STiNG drivers are located. Then reboot.

You must use STNGPORT.CPX to setup the ETHERNEA.STX driver. Even though there is no hardware base address to be configured as with other ethernet hardware, you still need to set the interfaces IP address and netmask. Note that you can read the NE card's MAC address as it is extracted by ENE*.STX from the card hardware and displayed by STNGPORT.CPX but you can not change it.

Further you need to add a line to STiNG's ROUTE.TAB for example:

192.168.1.0             255.255.255.0           EtherNet        0.0.0.0

Pleas note you need to spell "EtherNet" exactly like this.

Performance of the driver depends on STiNG's port polling frequency. By default this is set to 50 milliseconds by the entry

THREADING = 50

in the file DEFAULT.CFG. On my 8 MHz ST I experimented and changed this to read 10 to get optimum FTP performance. On a faster machine this may be unnecessary.

I did not do any other changes to DEFAULT.CFG shipped with STiNG 1.26.



Set-up under MagiCNet

Follow Vassilis Papathanassiou's instructions to set up MagiCNet and copy the ENE*.MIF to GEMSYS\MAGIC\XTENSION where also SOCKET.DEV lives. Then reboot. You shall see the message of the EtherNE driver also indicating the device created (usually en0) plus the MAC address of the NE2000 card (six bytes separated by colons). Check with ifconfig.ttp that the interface en0 is there and is up.



Set-up under MINTNet

Setup MINTNet as described in the MINTNet documentation. Copy the ENE*.MIF driver to the appropriate directory and rename the extension to XIF. Then reboot. You shall see the message of the EtherNE driver also indicating the device created (usually en0) plus the MAC address of the NE2000 card (six bytes separated by colons). Check with ifconfig.ttp that the interface en0 is there and is up.



Features and Limitations

- No interrupt operation

- No use of ACSI-DMA by EtherNEA

- Only 8KByte buffer RAM. Thus only 4 full size Ethernet packets can be buffered on receive. Exception: NE1000 cards with 16KByte RAM are supported.

- Only one ethernet packet made ready to send at a time thus no back to back transmits.



Driver performance

The driver software has been carefully optimized for speed. In particular packet data is directly transferred from the NE2000 card packet buffer RAM to the STiNG or MagicNet datagram buffers. Further "double buffering" in RAM is avoided.

EtherNEA performs about 50Kbyte/sec ftp up or download from/to RAM disk to/from a Linux server using AFTP 1.41 on an Atari ST with 8MHz. As I have my SCSI harddisk connected to a SCSI interface also hooked to the ACSI bus, speed is about half of this when doing ftp to/from harddisk. This is roughly true both for MagiCNet and STing. The ping performance of MagicNet however is drastically better than STing both in terms of throughput (reaction to 100HZ pings) and smaller round-trip time.

Measurements by Lyndon Amsdon using EtherNEC on a 25MHz Falcon indicate 150Kbyte/s download and 100KByte/s on upload using AFTP 1.44. Lyndon and me observed issues with later versions of AFTP. We both had also issues with the latest version of GAPFTP. Preliminary measurements by Lyndon seem to indicate lower performance under MINTNet.

I obtained stable up- and down-load from PC to ST by running Vassili's FTP server on the ST and WS-FTP (client) on the PC both under STing and MagicNet.



OS compatibility

I tested this ethernet solution with both plain TOS 1.04 (STing) and Magic 5.3 (STing and MagiCNet).


Hardware compatibility

I have tested both EtherNEA and EtherNEC with an original Atari 260ST (albeit with 4MB RAM). A ACSI-SCSI interface with my SCSI harddisk was also hooked to the ASCI port. For EtherNEA please note that in case of other hardware devices using the ACSI port -like harddisks- their driver software MUST do proper locking to ensure mutually exclusive use of the ACSI bus using the system variable "flock". Otherwise loss or corruption of data may occur! If in doubt do a harddisk backup *first*.

Lyndon tested EtherNEC both with an STE and a Falcon.

Things for the future

More testing under MINTNet (volunteers welcome).

Helping to improve perfomance; could the difference of 400KB/s gross and 100KB/s net be reduced?

Similar hardware adapters for the Mega ST bus and the VME bus that are present in some ST compatible machines seem possible. If somebody came up with hardware solutions I would consider adding drivers for those.

I am contemplating to add DMA mode to EtherNEA (this gross rate of 1.5 MByte/s is tempting).

I have been asked by several people: an adapter for the SCSI bus would be very complex both in terms of hardware and software. I would be surprised if somebody came up with a solution.

At all german PC retailers I know of ISA NE2000 cards are still available although the ISA bus is not any more present in all new PCs. As NE2000 cards will longer available for the PCI bus I would appreciate information about PCI to see if was reasonable to build an adapter.




Abbildung 5 - EtherNec Interface / Falcon Tower Einbau



Bild (c) Bernd Maedicke



Disclaimer

This package is provided to you as is. I do not guarantee any features nor do I take any responsibility for any damage or loss you may suffer when using this hardware and/or software. I advise you should backup your harddisk before using EtherNEA and if your harddisk is connected to the ACSI port.



Contact Information

Suggestions, bug reports, flames to

Dr. Thomas Redelberger
EMail: redetho@gmx.de
FAX: +49 6023 999410

Copyright 2001, 2002 Dr. Thomas Redelberger

Ethernet Hardware



Ethernet-Adapter von EH-Systems unter Multi-TOS?

Ich habe den Adapter von EH-Systems unter MiNT (1.15.10) zum laufen bekommen. Am besten ist es Du liest Dir mal MiNT-NET für Dummies durch. Hab ich auch gemacht und konnte damit recht einfach das ganze zum fliegen bekommen.

Guckst Du hier:
<http://atari.st-katharina-apotheke.de>

Vielleicht wäre auch Cripple-MiNT was für Dich, ist eine minimal MiNT Installation, die sich aber um Netzwerkfähigkeit erweitern läßt und auf einem normalen TOS filesystem funktioniert.



Leidige ROUTE.TAB f¦r STinG

Immer wiederkehrendes Thema: Die ROUTE.TAB f¦r STinG. Ohne sie geht nichts. Immer wieder erklèrt, aufgezeigt, erklèrt und trotzdem falsch. Daher hier mal ein neuer Versuch einer Erklèrung der ROUTE.TAB:

Eine korrekte ROUTE.TAB hat so auszusehen:

Network IP              Subnet Mask     Port Name       Gateway
192.168.1.0             255.255.255.0   EtherNec        0.0.0.0
0.0.0.0                 0.0.0.0                 EtherNec        192.168.1.10


Erklèrung:

0.0.0.0 steht f¦r alles
Network IP ist die IP Adresse des eigenen lokalen Netzwerk (LAN)
Subnet Mask ist die Subnetzmaske ihres Netzwerks
Port Name ist das Interface mit dem der Rechner mit dem Netz verbunden wird
Gateway ist die IP-Adresse eines Routers oder eines Rechners der den Zugang zum Internet bereit stellt

Mit

192.168.1.0Ê 255.255.255.0Ê EtherNetÊ 192.168.1.10

kann das Interface zwar in seinem lokalen Netz auf die Rechner untereinander zugreifen, aber in das Internet (WAN) kommt es damit nicht. Daran èndert auch eine andere Nameserveradresse in der Datei DEFAULT.CFG nichts.

Man kann auch einfach nur folgendes in die ROUTE.TAB eingeben:

0.0.0.0Ê 0.0.0.0Ê EtherNecÊ 192.168.1.10

Das setzt die Default Route in STinG. Damit gehen alle Zugriffe ¦ber EtherNec automatisch an die Adresse 192.168.1.10, also den im LAN vorhandenen Router. Der Router verteilt dann alle Pakete entweder an andere Rechner im lokalen Netz, oder geht in das Internet.


Noch mal genauer:

192.168.1.0Ê 255.255.255.0Ê EtherNetÊ 192.168.1.10

richtet ja nur eine Route f¦r das Netz 192.158.1.0 mit der Netzmaske 255.255.255.0 ein und gibt an daf¦r an die Adresse 192.168.1.10 als Router zu nutzen. Das macht so noch nicht viel Sinn.
Erst ein:

0.0.0.0Ê 0.0.0.0Ê EtherNecÊ 192.168.1.10

richtet dann die Default Route ein, da 0.0.0.0, wie oben schon beschrieben, f¦r alles steht.






Copyright © Robert Schaffner (doit@doitarchive.de)
Letzte Aktualisierung am 23. Mai 2004
Home Network Ethernet Project am Romport MagicNet installieren