[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NadaNet (was Re: brad w. Re: Ethernet & Internet on Apple 2)



Roy wrote:

>What interests me about your project is that I was wanting to do a new 
>version of "Space War" (which has been done before of course) but which 
>would be done on two IIs, each being give over to one player, and the 
>comnunication being done on the game connector. That way head to head 
>games could be played, and I'd have a use for the 6-8 IIPluses storied 
>in my garage.

Sounds like a lot of fun!

Using NadaNet in a real-time game might pose issues, though,
without very careful planning.

NadaNet is based on polling, not interrupts, and there is no
hardware to buffer packets.  The result is that machine A can
only talk to machine B when machine B is waiting for a packet,
doing essentially nothing else while waiting.

This is fine when machines do work periodically, then return
to an "idle" state, polling for packets.  But if there is some
real-time task needing constant attention, polling is a problem.

The only way the polling solution could be compatible with the
real-time requirement is to have all the computation run in a
nearly constant period loop, with polling (for reception) and
arbitration (for sending) essentially synchronized.  This can
be done if the "receiving" loop is a bit faster than the "sending"
loop.  When both machines make the rendezvous, information
can be sent in both directions with little additional delay.  Then
both machines would proceed with their real-time (graphic update)
tasks for another iteration.

If there is the possibility of a wide divergence in the time spent
in the non-communicating portion of the loop, then a rendezvous
could be missed, and the "receiving" machine would poll longer
(depending on the timeout interval) waiting for the "sending"
machine's packet.

If a nearly-constant iteration period cannot be created, then
either interrupts or buffering may be needed to achieve smooth
operation.  On the other hand, smooth coordination argues for
a near-constant iteration period...

-michael

Check out parallel computing for 8-bit Apples on my
Home page:  http://members.aol.com/MJMahon/