Hacker News new | ask | show | jobs
by rhalkyard 937 days ago
I was a little bit tongue-in-cheek in saying that, but the RTL8019AS definitely does have its downsides - being a single-chip clone of the NE2000 ISA ethernet card means that it's got to be bug-for-bug compatible with the ancient DP8390 chipset that those cards used (or at least a subset thereof).

On the upside, that means that you can literally wire it up to the ISA bus with no glue logic, and basically any operating system that ever ran on a PC already has drivers for it. On the downside, the ISA bus is fairly tightly coupled to the x86 processor bus, which means additional glue logic is required to get it to talk to processors like the 68k. To contrast, the ENC624J600's host bus interface can be configured for x86 or 68k-like operation (in both 8 and 16 bit widths, or over SPI).

Incidentally, a lot of old Mac network cards also used the DP8390, but because they mapped their registers and buffer memory differently to the NE2000, the RTL8019AS's compatibility there is not much of a win.

The main 'glaring misfeature' is the fact that the DP8390 and its clones cannot recover from a receive-buffer overflow, you have to soft-reset the receive engine to restore operation, and doing so with a minimum of disruption seems to be tricky. The DP8390 datasheet describes this behavior as part of normal operation, but reading between the lines it's clearly a hardware bug that's being worked around. A lot of the NE2000 drivers I looked at also have a lot of unexplained dummy reads and no-ops around register accesses, which gives me the impression that there might be other quirks too - the RTL8019AS datasheet is extremely vague on the matter.

Additionally, the RT8019AS's buffer memory is only accessible indirectly through its registers, which is just plain annoying. In contrast the ENC624J600 exposes its buffer memory directly, behaving like a 32K SRAM with registers at the top of its address space.

FINALLY, the RTL8019AS does not have a factory-assigned MAC address - integrators are expected to provide their own, and some kind of persistent storage to hold it in. The ENC624J600 comes with a burned-in MAC under Microchip's own OUI, which for a project in this "low-volume but potentially building it for other people" realm, is a lot more convenient.

Having said all that, right now I'm getting mad at a glaring misfeature of the ENC624J600 - its lack of a hardware reset input. The only ways to reset it are by poking a register bit in software, or removing power, which means that if I warm-reboot the computer, I sometimes get a bunch of spurious interrupts from the NIC, causing the POST to fail and giving me a Sad Mac screen. To compound matters, the Mac OS does not seem to call the driver's Close entrypoint on shutdown, so I can't even use that as a chance to put the chip into a safe state.

I suspect I'm going to have to externally gate the interrupt line on reset until the driver gives some sign that it's alive and ready for interrupts.

1 comments

Linking NE2000 ISA network card to 68K computer, like for example Atari ST, doesnt have to be complicated :

https://sites.google.com/site/probehouse/how-to-network-an-a...

connection diagram https://github.com/EmmanuelKasper/ethernec/blob/master/ETHER...

I can confirm pcmcia ne2k work on the Amiga.