[TI-H] Re: TI Networking.
[Prev][Next][Index][Thread]
[TI-H] Re: TI Networking.
On Tue, 01 May 2001 21:11:45 +0200 Olle Hedman <oh@hem.passagen.se>
writes:
>
> been thinking thinking that maybe the master-slave model could be
> quite
> good with the calc. Either I2C or a master-slave system based on i2c
> but
> useing the standard ti cable protocol.
The standard protocol only works with 2 calculators on the line.
ZTetris uses the standard protocol in a master-slave configuration.
Packets are one byte long.
> Then you can use the calcs own send-system too and only have to
> write
> bytes, and it would lift off some work on the processor. (one of the
> best
> advances)
The built in system, at least on the z80 calcs, is completely done within
the processor. The only work it saves is the programmers'.
Other methods could potentially perform network operations in an
interrupt routine, freeing the game from having to wait for the operation
to complete.
> In a multiplayergame it is easy to let player1 be master, player 2
> have id2
> and player 3 have id3 and so on.
> A packet format could be like this:
> on each packet you have a startbyte telling a packet starts, and
> then
> bytestuff (escape) all occurances of this byte in the packet. then a
Why? You already know where the packet starts, the first byte sent is
the beginning of the packet.
>
> byte-wide address, and then a data counter, and the data and then a
> checksum.
> like this:
> 8bits 8bits 8bits 8 - 2048 bits (1-256 bytes) 16
> bits.
> 01111110|xxxxxxxx|yyyyyyyy|-------------- data
> --------------|zzzzzzzzzzzzzzzz|
> Start adress length
> checksum
>
> You could have 7 bits of adress and a read/write-bit there too.. I
> think
> 128 adresses is quite enough.
What kind of game are we talking about here?
You'd have to have a VERY complicated game to require packets of that
size.
Small fixed-size packets would probably be better, say 8 bytes including
address.
Having a read/write bit is probably redundant, it already needs to know
WHAT is being read/written, you can encode the read/write bit with that.
Also, checksums aren't very useful, unless they're correcting. There
probably isn't time in a game to resend the packet, especially if it's
this large.
-josh
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
Follow-Ups: