At 07:22 PM 10/10/98 +0000, you wrote:

>It's about the exact time(s) of sampling the bit values of the main 
>(RxD/TxD) signal. In asynchronous communications, this is based upon 
>a fixed time for a single bit, determined by the baudrate.

That's synchronous communication. In asynchronous communication, there is
no baudrate.

>That always gives an odd number of samples. If it's 0, 0, 0: must be 
>zero. If it's 0,0,1: probably zero (same as 0,1,0 or 1,0,0). If it's 
>1,1,0: probably 1 (same as 1,0,1 or 0,1,1). If it's 1,1,1: must be 
>one.

I doubt this will actually improve performance. Taking three samples and
looking at their results may make the communication slower than decreasing
the baudrate to a level that is equally noise-insensitive.
Don't forget that programming an MSX is not the same as designing a UART.
The Z80 is quite slow compared to the times the signal needs to propagate
through the cable.

>In any application, I would STRONGLY suggest (call it almost 
>obligated, if you want to make a 'solid' piece of software) using 
>some DECENT type of error-detection mechanism, so that you can 
>re-transfer a data block, if it fails the error checking. For 
>instance a 32-bit CRC (Cyclic Redundancy Check), not something like 
>"adding all bytes, modulo 2^16" for a 16-bit checksum.

32 bit CRC? Are you planning to send megabytes through the JoyNet cable?
I transferred 16K blocks a couple of times, not a single error.
I will run more extensive test, but if the error rate remains zero, I won't
include any error checking. If errors do occur, but are very rare, a simple
error detection algorithm will suffice.
For the game I'm making, I'll probably send packets of about 2 bytes. So if
I include a 32 bit CRC, I might just as well send the message 3 times. And
sending 3 times means you don't only have error detection but also error
correction (using a majority vote).

>When tranferring large amounts of data over cables, there's BOUND to 
>be some errors. If you don't have any error-detection mechanism, or a 
>too simple one, there might well be hundreds of bits be modified, if 
>10s or 100s of MB.'s were transferred.

What makes you so sure a 32 bit CRC is good? It might be far too little, it
might be way too much.
To decide which error detection algorithm is sufficient, you will have to
do calculations. First, you need an estimate of how many errors a JoyNet
cable generates (per hour). Then, you decide how often it is allowed to
fail. You can't get 'never', but you can make the chance as low (non-zero)
as you want, however the cost increases (longer CRCs etc). Finally, you
estimate how much data you'll send. Which these 3 numbers you can calculate
how much error detection you need.

>And if it's for transferring data (for instance MSX -> PC), some 
>extra overhead is really a don't care, if you got 50 MB's to 
>transfer, who cares whether that takes 20, or 22 hours or so?

If you want to transfer that amount of data, there are more efficient ways:
- take your MSX harddisk and connect it directly to a PC
- use a ZIP disk
Ofcourse, these options are not as low-budget as the JoyNet, but if your
backups take a day, it might just be worth it to invest some money in
proper hardware.

>If that time DOES matter (for instance on real-time networkgame 
>applications) then you MIGHT forget it, as long as it wouldn't have 
>too great an impact (for games, this might even introduce a nice 
>'random' element!).

For most games, errors in the transmissions will make the computers "out of
sync". For example, one computer might think that player 1 is game over,
but another computer thinks he isn't. Not such a nice random element...

>And you can include all of these things in a set of standard-routines 
>that go with any JoyNet application, and might be updated any time. 

I will release my routines when they are finished. But routines that are
good for a network game might not be good routines for a file transfer
program.

>And hey, you'll have to put together some of these standard-routines 
>at some time, how are you gonna call this a standard otherwise?

The idea is that all computers will run the same piece of software.
The JoyNet standard only tells you how to build the cable.

Bye,
                Maarten



****
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