[Coco] Using DriveWire to write network software
Aaron Wolfe
aawolfe at gmail.com
Mon Mar 27 11:36:16 EDT 2017
Hi,
When I wrote the drivewire tcp stuff, it was really just a proof of
concept and not super well thought out. Shortly after that I learned
about chips like the wiznet series, and it seemed that someone would
be connecting something like that to a coco in the near future so we
didn't put much work into those things in DriveWire. We actually
wrote the client side stuff for os9 with the idea in mind that someday
they would be used with a "real" or alternative IP stack.
Would it make sense to revisit that idea? There are many more options
now than a few years ago, but the basic idea of "ip stack on a chip"
still seems like a nice solution for older hardware.
Even if there isn't a hardware solution at present, most if not all of
the functionality could be duplicated in a "drivewire-like" server and
driver shims on the coco side that did serial comms like dw rather
than the hardware SPI or other interface there would be in a chip
based solution.
Basically, rather than the essentially proprietary and not very well
designed DriveWire protocol, we could use some industry standard
chipset. I'd be willing to put in some time to make some example code
or a proof of concept server if people are interested. Or if somebody
wants to get an IP stack chip connected to a coco, it's not even
needed. For the FPGA side of things, I believe you have SPI already
on the altera boards so an adapter that used the same ip chip might be
simple to add, and the same software could work with both.
Here is one example, but there are lots. Some use a standard Hayes
sort of command set, that would be super simple to hack together as a
server out of things Drivewire already does.
https://www.sparkfun.com/datasheets/DevTools/Arduino/W5100_Datasheet_v1_1_6.pdf
-Aaron
On Sun, Mar 26, 2017 at 10:11 AM, Brett Gordon <beretta42 at gmail.com> wrote:
> Lee,
>
> I assume your doing bare-metal asm? Then first at the lowest layer, you'll
> need a copy of Darren's (most righteous) dw routines. They can be located
> in the os9, toolshed, and fuzix repos. Look for 'dwread.asm' and
> 'dwwrite.asm'.
>
> Next, I prefer to abstract these two routines into a "transaction" -
> combining them into a function/routine/proceedure to first send some bytes
> via dwwrite, and then read some bytes via dwread. All but one dw operation
> (disk read, iirc) can be formulated with this "transaction" layer.
>
> Then read up the tech specs on Aaron's site about vports.
>
> I'll send you some code via email for example, but basically sending bytes
> down these vports is dead simple, but reading bytes requires periodically
> polling to see if any vport channel has data, and reading the data.
>
> To acheive basic TCP, you send a simple ascii string to the vport, await
> the connect notice(also in text), then consider the channel a TCP pipe.
> "tcp connect some.server.com"
More information about the Coco
mailing list