ldc: Small fixes (includes, less warnings etc.)
[h316.git] / pc-tools / ldc / ldc.c
index 81fd9e1d1048e43358238d90ba52bb05adfb17db..26a469edea560b05f59596d72e2f9ee3fc92a46d 100644 (file)
@@ -6,6 +6,10 @@
 #include <sys/select.h>
 #include "hw_types.h"
 #include "hw_helpers.h"
+#include "tape.h"
+#include "process.h"
+#include "split.h"
+
 #define XON 0x11
 #define XOFF 0x13
 #define CHAR_START 0x81
@@ -16,8 +20,9 @@
 #define MAX_BLOCK_SIZE 500
 
 //#define DEBUG
-//#define DEBUG_CHECKSUM
-//#define DEBUG_STRUCTURE
+#define DEBUG_CHECKSUM
+#define DEBUG_STRUCTURE
+#define DEBUG_COMBINE
 //#define IGNORE_CHECKSUM
 #define HARDCORE_DEBUG
 /********************************************************/
@@ -173,10 +178,9 @@ void combine466 (unsigned char *raw, unsigned char *data)
     result->tape.low = r3;
 
 #ifdef DEBUG_COMBINE
-    msgf ("combine466 (data)     : %s%s%s", bin2str (r1, 4), bin2str (r2, 6),
-         bin2str (r3, 6));
-    msgf ("combine466 (rawmem)   : %s%s", bin2str (data[1], 8),
-         bin2str (data[0], 8));
+    msgf ("combine466 (data)     : %02x %02x %02x",r1,r2,r3, 6);
+//    msgf ("combine466 (rawmem)   : %s%s", bin2str (data[1], 8),
+//       bin2str (data[0], 8));
     msgf ("combine466 (structure): %s", bin2str (result->value, 16));
 #endif
 }