[Coco] TCP/IP Programming in Commodore BASIC

John Kent jekent at optusnet.com.au
Sat Nov 6 06:13:13 EDT 2010


You might like to check Adam Dunkel's web site:

http://www.sics.se/~adam/

He has uIP written for embedded 8 bit microcontrollers:

http://www.sics.se/~adam/uip/index.php/Main_Page

There is also LWIP which is written in C.

http://savannah.nongnu.org/projects/lwip/

I'm not sure what uIP is written in.

You might also check out the IP & Ethernet page on the Beyond Logic web site

http://www.beyondlogic.org/etherip/ip.htm


I'm using a Lantronix XPort AR card which has an x86 built into the 
ethernet socket and has 2 RS232 ports on it that can be telnetted to via 
a TCP-IP port as well as being able to serve web pages, flash file 
system and so on.

The XESS XSA-3S1000 / XST-3.0 FPGA board has an ethernet controller on 
it, although the FPGA CoCo hasn't been ported to the XESS board.
I don't think it would too hard to do so, but whether Gary (or I) have 
the time to do so is the question. The Digilent Spartan 3E500  starter 
board also has an Ethernet PHY, but you'd need to integrate a MAC in 
FPGA fabric which you can get from the opencores.org web site, and you's 
need a SDRAM controller for it. I don't think the XC3S500E is big enough 
for the CoCo design. I don't think the DE1 board has an ethernet 
interface on it, although it has two expansion ports. The DE2 / DE2-70 I 
think has an ethernet controller on it, although those boards are 
probably too expensive for the average hobbyist.

The advantage of the FPGA design is that the CPU runs much faster and 
would be better able to keep up with the ethernet MAC. My concern is if 
you want to implement it on an original CoCo running a 1MHz 6809 
wouldn't be fast enough to transfer packets for even a 10Mbps ethernet 
controller. The alternative might be to hook up a 6844 DMA controller to 
the CoCo some how  to transfer data from memory to the ethernet MAC and 
vice versa but you'd have to make a special board with the DMAC, if you 
can get hold of them, and the ethernet MAC.  I'm not sure what impact 
that would have on the CoCo timing or whether you'd have to hack your 
CoCo to interface such a board. Some (many ?) ethernet controllers have 
a packet buffer in them, so that might solve that problem.

Whatever ethernet MAC you used, you'd have to write an ethernet driver 
for it, under the appropriate operating system. I'm sure you could use 
an existing Linux ethernet driver and adapt that if you were so inclined.

John.

On 6/11/2010 6:00 PM, Aaron Wolfe wrote:
> I'd like to see an IP stack on the CoCo as well.  There has been
> discussion here about such a thing in the past.  Maybe it would be a
> good topic for the next coco conference.
>
> Ideally an IP stack would be accessible from both DECB and OS9.  I've
> looked at the cheap (<  $5) "TCP/IP on a chip" solutions that are
> available and thought that one of these would make it easier to add IP
> to the CoCo, since you would interface to an existing stack rather
> than creating your own.  These chips would buffer and decode the IP
> packets into data streams and also have the interface used to talk
> with ethernet or wireless networking hardware built in.  They would
> let the CoCo use it's resources at the application layer rather than
> dealing with the protocols.
>
> The last time I mentioned such a thing it wasn't a popular idea.  It
> was suggested that if we don't run the IP stack on the 6809, we
> shouldn't do it.   I'd be happy with that approach if we had a stack
> for the 6809, but as far as I know no one is working on one.
>
> Writing a stack isn't interesting to me, although using one is :)
> That's one reason why the IP services provided by DriveWire are
> implemented as regular serial channels on the CoCo side.. I just don't
> care too much how IP gets there so long as it's there.
>
> I think it would be valuable to have a real IP stack no matter how
> it's provided, and I'd be willing to help with an effort to implement
> any sort of IP solution for the CoCo.  I don't think there is much
> point in extending the IP functionality in DriveWire unless it's to be
> compatible with some other "real", coco native solution.
>
> my $0.02
> -Aaron

-- 
http://www.johnkent.com.au
http://members.optusnet.com.au/jekent




More information about the Coco mailing list