From the same person who still hasn't quite finished SEthernet, comes yet another Ethernet card for vintage computers!
Ethernet cards for Acorn systems are even harder to find than for vintage Macs. This project is an attempt to bring a modern, low-cost Ethernet card to Acorn Archimedes and Risc PC machines.
Early days yet! I have the driver functioning on a prototype version of the card, but there are enough issues that it'll need a redone board before I'm truly happy with it.
Meanwhile, someone else in the Acorn community who has access to a lot more hardware for testing, has announced his own open-source Ethernet podule. To be brutally honest, his design is probably the sensible path forward, and there probably isn't room for two very similar projects in such a small community, so this project's future is in question. However, I'm proud of what I accomplished, my design works well (in my opinion), and I think it's worth saving for posterity, so here it is.
The intent is for this card to be compatible with any RISC OS machine with 16- or 8-bit Podule slots, running RISC OS 3.10 or later. However, I only have access to an A3000, so testing on later OSes and other machines will be up to others!
See HARDWARE.md for a design overview.
Schematic in PDF format can be found at pcb/EtherENC-prototype/EtherENC-Prototype.pdf.
The EtherENC/ directory contains driver source, buildable with Acorn C/C++ version 5, which can be obtained from https://www.4corn.co.uk/articles/acornc5/, or included in RPCEMU's RISC OS 3.71 Easy-Start bundle.
If you are not used to RISC OS, the filenames and layout will look a little
weird. Instead of having extensions, .c and .h files live in separate
directories, and the comma-suffixes on various file names encode RISC OS file
types. Of particular interest, the ,ffb files are BBC Basic programs, however
these are stored in a binary format and their source is not easily viewable on
non-RISC OS systems. Accompanying text dumps of the program code are included
alongside, I will endeavour to keep these up to date.
MkROM is a BASIC program that builds the card's ROM image with the appropriate
headers and loadable driver module.
WriteROM can then be used to program or update the card's flash with the new
ROM image.
Note that this repository includes the RISC OS Open TCPIPLibs source as a submodule. Specifically, it uses the TCPIPLibs-5_01 tag, as this corresponds to the DCI 4.04 specification, without bringing in a bunch of changes that make old versions of Acorn C/C++ get confused.
After cloning this repo, run git submodule update --init to set up submodules
correctly.
-
Install Acorn C/C++ and run
!SetPathsinside the Acorn C/C++ directory. -
Run the
!Mkscript in the source directory (or runamufrom a TaskWindow or CLI).
- After building the EtherENC driver, run
WriteROMand follow the prompts.
These instructions assume that you are using the version of !Internet included
in the Universal !Boot distribution. If you are using something else, you should
probably be able to figure out how to adapt them to your setup!
-
Copy
AutoSense.EtherENCto!Boot.Resources.Configure.!InetSetup.AutoSense. -
(optional) Copy the built
EtherENCmodule to!Boot.Resources.System.Modules.Network. The driver module from the card ROM should be sufficient, but when testing it can be useful to softload the module instead. -
Restart RISC OS.
Configuring the card is more or less the same as any other network interface on
RISC OS, and is done by the !Boot.Resources.Configure.!InetSetup application:
-
Run
!Boot.Resources.Configure.!InetSetup, and click theInterneticon. -
Under
Interfaces, tick the box next toEtherENC, click the adjacentConfigure...button, and set your IP address and netmask. Unless you know what you're doing,Obtain IP addressshould be set toManually, andPrimary interfaceshould be ticked. -
Under
Routing, enter your default gateway. Unless you know what you're doing,Act as an IP routerandRun RouteDshould not be ticked. -
Under
Host names, ether your hostname domain, and DNS server(s). Ensure thatUse name servers alsois selected. -
Configure AUN and Access if necessary (doing so is beyond the scope of this document).
The system's CMOS memory is used to store hardware configuration options across
reboots. These options can be set and read using RISC OS' *Configure and
*Status commands.
*Configure EENCFlow <unit> Off|On - Enable or disable PAUSE-frame flow
control, which may help mitigate packet drops on heavily-loaded systems. Default
is Off. Flow control can only operate on full-duplex links.
*Configure EENCLink <unit> Auto | 10 Half|Full | 100 Half|Full - Configure
link mode. Auto (the default) causes link speed and duplex mode to be
autonegotiated with the link partner. Otherwise, a fixed speed and duplex
setting (one of 10 Half, 10 Full, 100 Half or 100 Full) can be set.
After installing the card, or moving it into another slot, it may be necessary to reconfigure the card in order to overwrite any leftover CMOS settings from previous residents of that slot. Defaults can be restored with:
*Configure EENCLink <unit> Auto
*Configure EENCFlow <unit> Off
Hardware (everything in the pcb and pld directories) is licensed under the
CERN Open Hardware License Version 2 - Strongly Reciprocal.
The driver (everything in the EtherENC directory) is licensed under the GNU
Public License Version 3, with the following exceptions:
-
EtherENC.s.iocopycontains code derived from the "Ether1" driver as published by Risc OS Online Ltd., under the Apache License, version 2.0. -
EtherENC.h.filterandEtherENC.c.filtercontain code derived from the "EtherY" driver as published by RISC OS Online Ltd., under the BSD License. -
EtherENC.h.syslogandEtherENC.s.syslogare included unmodified from the SysLog freeware application (https://compton.nu/software/riscos/syslog).
-
Finalise hardware design
-
Performance testing and driver optimisation
Names and IDs registered with ROOL (see https://www.riscosopen.org/content/allocate for info). If you fork EtherENC and make software-incompatible changes, please request your own allocations, as these are registered to me personally. However, if your EtherENC-derived hardware is fully compatible with the mainline EtherENC driver, you are welcome to use the same Podule IDs.
| Allocation Type | Allocation | Source locations |
|---|---|---|
| Ethernet Driver Suffix | ENC |
Everywhere |
| SWI Base | &5A9C0 | cmhg.ModuleHdr |
| Module Name | EtherENC |
cmhg.ModuleHdr |
| Commands | EENCInfo, EENCTest, EENCFlow, EENCLink |
cmhg.ModuleHdr, c.module |
| Error Block | &822800 | h.errors, MkROM |
| Podule Manufacturer ID | &72 | h.if_enc, MkROM |
| Podule Type ID | &14E (16 bit), &14F (8 bit) | h.if_enc, MkROM |