Hi
It seems there is a small bug in communication code maybe ...
I have modified the drive code of TRANSLIB in OpenCBM while workinf on MEMCOPY.
My main drive Code is located at $500 (buffer 2) and Trans-Code is at $700.
Tis main drive Code is waiting for commands from PC:
- send byte
- send 2 byte
- send 256 bytes
- send test pattern
- ...
So Main Code waits for command and depending on command it sends bytes back using Trans Code at $700.
This working fine for S1.
This working fine for S2.
This doesn't work fine for PARALLEL.
Parallel Code has problems on changing direction of data flow.
You can send a megabyte of data without problems.
But always if direction was changed the first byte sent to PC is zero!
I was wondering about, D64COPY works fine with parallel trans Code.
I find out, parallel transport always send 2 bytes.
While sending 1 byte the second byte is ignored in this protocoll.
I also saw, sending 1 byte always works fine!
D64COPY does send 1 status byte followed by 256 data baytes.
So this is the reason why D64COPY works fine.
But sending 2 Bytes or 256 Bytes or 1024 bytes, always the first byte goes wrong after a change of direction.
I have made waitstates of 20ms on PC side.
But this makes no difference, first byte goes wrong, always.
best regards
Tommy