A more comprehensible schematic of joystick/network I/O

1    I    FWD -> DATA  IN
2    I    BACK -> CLOCK IN
3    I    LEFT -> READY IN
4    I    RIGHT     -> x
5        +5V       -> x
6    I/O    TRG 1 -> DATA  OUT
7    I/O    TRG 2 -> CLOCK OUT
8    O    OUT -> READY OUT
9     GND       -> GND

     D.IN C.IN R.IN
       |   |   |
       v   v   v
   \-----------------------/
    \  1   2   3   4   5  /
     \                   /
      \  6   7   8   9  /
       \---------------/
  |   |   |   \
  v   v   v    \
     D.OUT C.OUT R.OUT GND



   +------------DATA---------------------------------- --  -    - -- ------+
    | +----------CLOCK--------------------------------- --  -    - -- ----+
|
    | | +--------READY--------------------------------- --  -    - -- --+ |
|
    | | |                                                               | |
|
    | | |  +-----READY------+  +-----READY------+  +------- -  ETC  - --+ |
|
    | | |  | +---CLOCK----+ |  | +---CLOCK----+ |  | +----- -  ETC  - ----+
|
    | | |  | | +-DATA---+ | |  | | +-DATA---+ | |  | | +--- -
 ETC  - ------+
    | | |  | | |        | | |  | | |        | | |  | | |
  +-I-I-O--I-O-O-+    +-I-I-O--I-O-O-+    +-I-I-O--I-O-O-+
  | 1 2 8  3 6 7 |    | 1 2 8  3 6 7 |    | 1 2 8  3 6 7 |
  |     MSX A    |    |     MSX B    |    |     MSX C    |
  |              |    |              |    |              |
  +--------------+    +--------------+    +--------------+

Hi all!
First of all, I think this is the best idea of all I've seen. It's the
cheapest and simpelest design yet. And the simpler the design, the less can
go wrong! There's no need for any hardware except for some cable and plugs.
It's (technically) unlimited in design and it's also very feasable to make
some software for this.

I say we should vote this as the standard and start coming up with some
sort of protocol! My idea is the following:

o When a computer wants to send, it starts it's CLOCK and waits for the
  receiving side to set the READY signal
o Sending starts with 1 start bit (high signal)
o Followed by data and odd parity
o Sender waits for a drop of the READY signal for 1 clock cycle as an ACK
o If it doesn't drop withing X cycles after sending the last bit a resend
  is in order (step 2)
o If there is more data to send, return to step 2
o All data sent, stop CLOCK signal
o Receiver drops READY signal
----------------------------------------------------------------------------
-
More schematically:
S == sender
R == receiver
step 1:
S: !DATA, CLOCK   [SYN] CLOCK keeps going
R: READY   [TSR] stays high
step 2:
S: 1, 8bit data, odd parity [TRX] transmit data
R: !READY, READY                [ACK]   within X cycles, drop only 1 cycle
step 3:
S: !CLOCK   [FIN] stop CLOCK
R: !READY   [FIN] stop READY

Step 1: connection buildup
Step 2: keeps looping until all data is sent
Step 3: connection breakdown

Sender:
- Sender *must* wait for READY of receiver (it's not a token ring for
  nothing :) )
- When a drop in READY [ACK] is not received withing X cycles of sending
  the last data/parity bit, then start resend
- Whenever READY drops, restart handshake and resend last sent byte

Receiver:
- If data is not received for X cycles, don't drop READY [ACK] and wait
  for resend
- If odd parity is off, don't drop READY [ACK] and wait for resend
- Whenever CLOCK drops, drop READY and discard last byte

Hypothetically speaking:
If we connect 10 MSXes it would take 9 * (4[SYN] + 10[TRX] + 2[ACK]) == 144
cycles minimal(!) to transfer 1 byte round the network. And this is *very*
positive thinking... A more realistic estimate would lie around
9 * (10 + 10 + 5) = 225 cycles

My question: How fast can you send data/switch signals with this joystick
      port?

I'm hoping I have been of any help to anyone.


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to