Ethernet for PCjr {WizNet}

Hardware questions and modifications

Re: Ethernet for PCjr {WizNet}

Postby Shaos » Thu Feb 21, 2019 10:28 am

Actually W5100 chip can do IP raw and even MAC raw (but in socket 0 only):
https://www.wiznet.io/wp-content/uploads/wiznethome/Chip/W5100/Document/W5100_Datasheet_v1.2.7.pdf
So I guess it should be possible to write a standard packet driver or something like that...
Shaos
 
Posts: 85
Joined: Mon Dec 26, 2016 10:54 am
Location: Colorado, USA

Re: Ethernet for PCjr {WizNet}

Postby Brutman » Thu Feb 21, 2019 10:47 am

Prototyping is good, and it's also good that it can send raw packets. I'd be surprised if it could not.

I've not written a packet driver yet but I'm not too worried about that; there are plenty of old examples laying around. Having a packet driver will enable it to work with all of the existing TCP/IP software.
Brutman
Site Admin
 
Posts: 1030
Joined: Sat Jun 21, 2008 5:03 pm

Re: Ethernet for PCjr {WizNet}

Postby dpaden » Mon May 06, 2019 2:48 pm

I was thinking about this NIC in the modem slot again.

The ability to send and receive raw packets (packet driver) might not be the best idea. While it is excellent for usability with existing applications, I have been having a lot of issues with a parallel port NIC and said applications. I'm not sure the precise error, but it is either (1) timing of packet transmissions is too fast for the jr, or (2) the buffer is being overrun with intended network traffic (TCP asynchronously transfers, so if the buffer fills before we read it out, we may be losing data and hanging).

I was thinking it might be better to employ a packet filter offloaded onto the NIC to ease up processing done by the jr CPU. Hence, the IP functions of the Wiznet might be a good choice.

On the other hand, I was thinking about using a Raspberry Pi 0 W or a Raspberry Pi Compute Module 3 to handle all the packet transfers. That would need a driver to handle the incoming 8-bit data bus plus an application to bridge the 2. This may be similar to what is being done with the Pi Zero on the jrIDE module. Any thoughts on this alternate direction? Don't want to hijack this thread, can make a new forum post if conversation/interest picks up on it.
dpaden
 
Posts: 21
Joined: Fri Oct 12, 2018 7:08 am

Re: Ethernet for PCjr {WizNet}

Postby Brutman » Mon May 06, 2019 3:20 pm

A stock Jr running Ethernet through the parallel port can send and receive at 30Kb/sec . With standard sized MTU (1500) that's about 20 interrupts per second. Move up to a real Ethernet card and that number triples; I've measured a Western Digital 8003 series at 100KB/sec. That's over 60 interrupts per second. Not counting all of the other system activities going on. With a reasonable sized ring buffer in system memory and some buffering on the card the machine can generally keep up with most networks. But it's also easy to DoS it.

If you want to do something fun, do a conventional network device and let the machine send and receive the packets. But adding TCP checksum offloading would do a lot to speed things up. I don't think the packet spec directly supports that, but a little extra custom code to do the equivalent of an ioctl is possible and not too terrible to implement.

If you go the custom route all of the software breaks. Hardware without software just isn't useful ...
Brutman
Site Admin
 
Posts: 1030
Joined: Sat Jun 21, 2008 5:03 pm

Previous

Return to PCjr Hardware

Who is online

Users browsing this forum: No registered users and 1 guest