delay fix after RESET(DATA_OUT) and wait for DATA_IN
Brought to you by:
strik
Hello,
i have found a problem in the send_byte function, that in some cases it doesn't wait for DATA_IN(ACK) from Drive, btw. DATA_IN will not be resetted so fast:
--- opencbm-0.4.2a/sys/libiec/sendbyte.c 2006-03-09 18:31:35.000000000 +0100
+++ opencbm-0.4.2a-fix/sys/libiec/sendbyte.c 2013-04-23 23:38:36.000000000 +0200
@@ -83,10 +83,11 @@
cbmiec_release_irq(Pdx);
PERF_EVENT_VERBOSE(0x1059, 0);
- for(i=0; (i<libiec_global_timeouts.T_17_Times) && !(ack=CBMIEC_GET(PP_DATA_IN)); i++)
+ for(i=0; (i<libiec_global_timeouts.T_17_Times); i++)
{
PERF_EVENT_VERBOSE(0x105A, 0);
cbmiec_udelay(libiec_global_timeouts.T_17_SEND_FRAME_HANDSHAKE_T_F);
+ if (ack=CBMIEC_GET(PP_DATA_IN)) break;
}
PERF_EVENT_VERBOSE(0x105B, 0);
For linux i have allready fixed and testet it very well, but for windows i dont't have any programming experience, so i'm not able to build it new. Maybe you can build us a new windows version including this fix.
Many Thanks!
Regards
kbr
Hello,
I am not convinced that this is actually a fix to a bug, or if your transistors are just too slow.
Anyway, I will investigate on this. Can you also send me the Linux version of your patch?
Ok, let's name it an enhancement to use cheeper transistors, but at this time you have to wait at least 100µs for the BETWEEN BYTE TIME, so it doesn't hurt to wait at least 100µs after releasing DATA.
Here the linux fix:
Many thanks in advance!
kbr
Moved over to github: https://github.com/OpenCBM/OpenCBM/issues/50