-diff -Nur xilprg-0.5/makefile xilprg-new/makefile
+diff -Nur xilprg-0.5/makefile xilprg-patched/makefile
--- xilprg-0.5/makefile 2006-08-23 07:41:20.000000000 +0200
-+++ xilprg-new/makefile 2007-04-07 17:09:16.000000000 +0200
++++ xilprg-patched/makefile 2007-09-04 20:59:03.000000000 +0200
@@ -40,6 +40,7 @@
$(SRC_DIR)/prgfile.cpp \\r
$(SRC_DIR)/chip.cpp \\r
$(SRC_DIR)/cable.cpp \\r
$(SRC_DIR)/digilent.cpp \\r
$(SRC_DIR)/xilinx.cpp\r
-diff -Nur xilprg-0.5/src/cable.cpp xilprg-new/src/cable.cpp
+diff -Nur xilprg-0.5/src/cable.cpp xilprg-patched/src/cable.cpp
--- xilprg-0.5/src/cable.cpp 2006-08-23 07:38:34.000000000 +0200
-+++ xilprg-new/src/cable.cpp 2007-04-07 17:20:55.000000000 +0200
++++ xilprg-patched/src/cable.cpp 2007-09-04 20:59:03.000000000 +0200
@@ -49,6 +49,7 @@
#include "chip.h"\r
#include "cmdline.h"\r
{\r
msgf(STR_INVALID_CABLE_DEF);\r
return NULL;\r
-diff -Nur xilprg-0.5/src/onbusb.cpp xilprg-new/src/onbusb.cpp
+diff -Nur xilprg-0.5/src/onbusb.cpp xilprg-patched/src/onbusb.cpp
--- xilprg-0.5/src/onbusb.cpp 1970-01-01 01:00:00.000000000 +0100
-+++ xilprg-new/src/onbusb.cpp 2007-09-04 21:39:30.000000000 +0200
-@@ -0,0 +1,119 @@
++++ xilprg-patched/src/onbusb.cpp 2007-09-04 22:12:47.000000000 +0200
+@@ -0,0 +1,124 @@
+/*\r
+ * onboard usb\r
+ *\r
+\r
+int onbusb::get_tdo()\r
+{\r
++int i;
+ /* send get tdo command */\r
-+ data=GET_TDO;\r
-+ usb_bulk_write(handle,0x01,&data,1,0);\r
-+\r
++ //data=GET_TDO;\r
++ //usb_bulk_write(handle,0x01,&data,1,0);\r
+ /* receive tdo */\r
++ // dirty! 1 dummy read is enough. my guess:
++ // - either we have to wait that time for correct state at tdi
++ // - or/and it's due to the EP1INBUF=1 (buf size?) todo: ez-usb doc!
++ // - initial wrong states don't harm
++ for(i=0;i<1;i++) usb_bulk_read(handle,0x81,&data,1,1);
+ usb_bulk_read(handle,0x81,&data,1,0);\r
+ return data & 0x01 ? 1 : 0;\r
+}\r
-diff -Nur xilprg-0.5/src/onbusb.h xilprg-new/src/onbusb.h
+diff -Nur xilprg-0.5/src/onbusb.h xilprg-patched/src/onbusb.h
--- xilprg-0.5/src/onbusb.h 1970-01-01 01:00:00.000000000 +0100
-+++ xilprg-new/src/onbusb.h 2007-09-04 21:17:18.000000000 +0200
++++ xilprg-patched/src/onbusb.h 2007-09-04 20:59:03.000000000 +0200
@@ -0,0 +1,43 @@
+/*\r
+ * onboard usb\r
+};\r
+\r
+#endif\r
-diff -Nur xilprg-0.5/src/strtable.cpp xilprg-new/src/strtable.cpp
+diff -Nur xilprg-0.5/src/strtable.cpp xilprg-patched/src/strtable.cpp
--- xilprg-0.5/src/strtable.cpp 2006-08-23 07:38:34.000000000 +0200
-+++ xilprg-new/src/strtable.cpp 2007-04-07 16:56:25.000000000 +0200
++++ xilprg-patched/src/strtable.cpp 2007-09-04 20:59:03.000000000 +0200
@@ -137,7 +137,7 @@
//STR_CMD_CABLE\r
"cable\0" \r