--- jzintv/files/patch-doc-tech-ivoice.c 1970-01-01 01:00:00.000000000 +0100 +++ jzintv/files/patch-doc-tech-ivoice.c 2009-03-22 12:54:45.073990938 +0100 @@ -0,0 +1,159 @@ +--- doc/tech/ivoice.c.orig 2009-03-22 12:49:14.330601764 +0100 ++++ doc/tech/ivoice.c 2009-03-22 12:54:15.050117512 +0100 +@@ -36,9 +36,9 @@ + //#define SINGLE_STEP + //#define DEBUG + #ifdef DEBUG +-#define dprintf(x) printf x ; fflush(stdout) ++#define dbprintf(x) printf x ; fflush(stdout) + #else +-#define dprintf(x) ++#define dbprintf(x) + #endif + + #undef HIGH_QUALITY +@@ -815,7 +815,7 @@ + data = ((d1 << 10) | d0) >> ivoice->fifo_bitp; + + #ifdef DEBUG_FIFO +- dprintf(("IV: RD_FIFO %.3X %d.%d %d\n", data & ((1 << len) - 1), ++ dbprintf(("IV: RD_FIFO %.3X %d.%d %d\n", data & ((1 << len) - 1), + ivoice->fifo_tail, ivoice->fifo_bitp, ivoice->fifo_head)); + #endif + +@@ -912,7 +912,7 @@ + repeat = 0; + ctrl_xfer = 0; + +- dprintf(("$%.4X.%.1X: OPCODE %d%d%d%d.%d%d\n", ++ dbprintf(("$%.4X.%.1X: OPCODE %d%d%d%d.%d%d\n", + (iv->pc >> 3) - 1, iv->pc & 7, + !!(opcode & 1), !!(opcode & 2), + !!(opcode & 4), !!(opcode & 8), +@@ -1036,7 +1036,7 @@ + /* ---------------------------------------------------------------- */ + if (ctrl_xfer) + { +- dprintf(("jumping to $%.4X.%.1X: ", iv->pc >> 3, iv->pc & 7)); ++ dbprintf(("jumping to $%.4X.%.1X: ", iv->pc >> 3, iv->pc & 7)); + + /* ------------------------------------------------------------ */ + /* Set our "FIFO Selected" flag based on whether we're going */ +@@ -1044,7 +1044,7 @@ + /* ------------------------------------------------------------ */ + iv->fifo_sel = iv->pc == FIFO_ADDR; + +- dprintf(("%s ", iv->fifo_sel ? "FIFO" : "ROM")); ++ dbprintf(("%s ", iv->fifo_sel ? "FIFO" : "ROM")); + + /* ------------------------------------------------------------ */ + /* Control transfers to the FIFO cause it to discard the */ +@@ -1052,14 +1052,14 @@ + /* ------------------------------------------------------------ */ + if (iv->fifo_sel && iv->fifo_bitp) + { +- dprintf(("bitp = %d -> Flush", iv->fifo_bitp)); ++ dbprintf(("bitp = %d -> Flush", iv->fifo_bitp)); + + /* Discard partially-read decle. */ + if (iv->fifo_tail < iv->fifo_head) iv->fifo_tail++; + iv->fifo_bitp = 0; + } + +- dprintf(("\n")); ++ dbprintf(("\n")); + + continue; + } +@@ -1080,7 +1080,7 @@ + #endif + + iv->filt.rpt = repeat + 1; +- dprintf(("repeat = %d\n", repeat)); ++ dbprintf(("repeat = %d\n", repeat)); + + i = (opcode << 3) | (iv->mode & 6); + idx0 = sp0256_df_idx[i++]; +@@ -1110,7 +1110,7 @@ + field = cr & CR_FIELD; + value = 0; + +- dprintf(("$%.4X.%.1X: len=%2d shf=%2d prm=%2d d=%d f=%d ", ++ dbprintf(("$%.4X.%.1X: len=%2d shf=%2d prm=%2d d=%d f=%d ", + iv->pc >> 3, iv->pc & 7, len, shf, prm, !!delta, !!field)); + /* ------------------------------------------------------------ */ + /* Clear any registers that were requested to be cleared. */ +@@ -1133,7 +1133,7 @@ + value = sp0256_getb(iv, len); + else + { +- dprintf((" (no update)\n")); ++ dbprintf((" (no update)\n")); + continue; + } + +@@ -1151,7 +1151,7 @@ + if (shf) + value <<= shf; + +- dprintf(("v=%.2X (%c%.2X) ", value & 0xFF, ++ dbprintf(("v=%.2X (%c%.2X) ", value & 0xFF, + value & 0x80 ? '-' : '+', + 0xFF & (value & 0x80 ? -value : value))); + +@@ -1160,12 +1160,12 @@ + /* ------------------------------------------------------------ */ + if (field) + { +- dprintf(("--field-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); ++ dbprintf(("--field-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); + + iv->filt.r[prm] &= ~(~0 << shf); /* Clear the old bits. */ + iv->filt.r[prm] |= value; /* Merge in the new bits. */ + +- dprintf(("%.2X\n", iv->filt.r[prm])); ++ dbprintf(("%.2X\n", iv->filt.r[prm])); + + continue; + } +@@ -1175,11 +1175,11 @@ + /* ------------------------------------------------------------ */ + if (delta) + { +- dprintf(("--delta-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); ++ dbprintf(("--delta-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); + + iv->filt.r[prm] += value; + +- dprintf(("%.2X\n", iv->filt.r[prm])); ++ dbprintf(("%.2X\n", iv->filt.r[prm])); + + continue; + } +@@ -1189,7 +1189,7 @@ + /* ------------------------------------------------------------ */ + + iv->filt.r[prm] = value; +- dprintf(("--value-> r[%2d] = %.2X\n", prm, iv->filt.r[prm])); ++ dbprintf(("--value-> r[%2d] = %.2X\n", prm, iv->filt.r[prm])); + } + + /* ---------------------------------------------------------------- */ +@@ -1526,7 +1526,7 @@ + /* ---------------------------------------------------------------- */ + if ((ivoice->fifo_head - ivoice->fifo_tail) >= 64) + { +- dprintf(("IV: Dropped FIFO write\n")); ++ dbprintf(("IV: Dropped FIFO write\n")); + return; + } + +@@ -1534,7 +1534,7 @@ + /* FIFO up the lower 10 bits of the data. */ + /* ---------------------------------------------------------------- */ + #ifdef DEBUG_FIFO +- dprintf(("IV: WR_FIFO %.3X %d.%d %d\n", data & 0x3FF, ++ dbprintf(("IV: WR_FIFO %.3X %d.%d %d\n", data & 0x3FF, + ivoice->fifo_tail, ivoice->fifo_bitp, ivoice->fifo_head)); + #endif + ivoice->fifo[ivoice->fifo_head++ & 63] = data & 0x3FF; --- jzintv/files/patch-src-gif-lzw_enc.c 1970-01-01 01:00:00.000000000 +0100 +++ jzintv/files/patch-src-gif-lzw_enc.c 2009-03-22 13:00:01.596209823 +0100 @@ -0,0 +1,293 @@ +--- src/gif/lzw_enc.c.orig 2009-03-22 12:58:44.562353006 +0100 ++++ src/gif/lzw_enc.c 2009-03-22 12:59:37.848069207 +0100 +@@ -14,9 +14,9 @@ + #include "config.h" + + #ifdef DEBUG +-# define dprintf(x) jzp_printf x ++# define dbprintf(x) jzp_printf x + #else +-# define dprintf(x) ++# define dbprintf(x) + #endif + + +@@ -46,7 +46,7 @@ + if (i_buf[i] > max_sym) + max_sym = i_buf[i]; + dict_stride = max_sym + 1; +- dprintf(("max_sym = %.2X\n", max_sym)); ++ dbprintf(("max_sym = %.2X\n", max_sym)); + + /* -------------------------------------------------------------------- */ + /* Compute and output the starting code-size. */ +@@ -54,7 +54,7 @@ + for (code_size = 2; code_size < 8; code_size++) + if ((1 << code_size) > max_sym) + break; +- dprintf(("code_size = %.2X\n", code_size)); ++ dbprintf(("code_size = %.2X\n", code_size)); + /* -------------------------------------------------------------------- */ + /* Allocate the dictionary. We store the tree in a 2-D array. One */ + /* dimension is the code number, and the other is the codes it chains */ +@@ -89,7 +89,7 @@ + /* -------------------------------------------------------------------- */ + while (i_ptr <= i_end && code != end_of_info) + { +- dprintf(("remaining: %10d\n", i_end - i_ptr)); ++ dbprintf(("remaining: %10d\n", i_end - i_ptr)); + + /* ---------------------------------------------------------------- */ + /* If dictionary's full, send a clear code and flush dictionary. */ +@@ -97,7 +97,7 @@ + /* ---------------------------------------------------------------- */ + if (next_new_code == 0x1000) + { +- dprintf(("CLEAR %.3X %d\n", clear_code, curr_size)); ++ dbprintf(("CLEAR %.3X %d\n", clear_code, curr_size)); + + curr_word |= clear_code << curr_bits; + curr_bits += curr_size; +@@ -106,7 +106,7 @@ + /* Handle packaging data into 256-byte records */ + if (o_ptr - last_len_byte == 256) + { +- dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", ++ dbprintf(("last_len_byte=%.8X o_ptr=%.8X\n", + last_len_byte, o_ptr)); + + *last_len_byte = 255; +@@ -125,7 +125,7 @@ + memset(dict, 0, 4096*sizeof(uint_16)*dict_stride); + } else + { +- dprintf(("new code: %.3X = %.3X + %.2X\n", next_new_code, ++ dbprintf(("new code: %.3X = %.3X + %.2X\n", next_new_code, + code, next_char)); + + dict[code*dict_stride + next_char] = next_new_code; +@@ -135,7 +135,7 @@ + } + + code = next_char; /* Previous concat becomes new initial code */ +- dprintf(("next code: %.2X %c\n", code, code == end_of_info ? '*':' ')); ++ dbprintf(("next code: %.2X %c\n", code, code == end_of_info ? '*':' ')); + + /* ---------------------------------------------------------------- */ + /* Keep concatenating as long as we stay in the dictionary. */ +@@ -143,7 +143,7 @@ + if (i_ptr == i_end) + { + next_char = end_of_info; +- dprintf(("--> next is EOI!\n")); ++ dbprintf(("--> next is EOI!\n")); + } else + { + next_code = -1; +@@ -151,7 +151,7 @@ + { + next_char = *i_ptr++; + next_code = dict[code*dict_stride + next_char]; +- dprintf(("--> code: %.3X + %.2X = %.3X\n", code, ++ dbprintf(("--> code: %.3X + %.2X = %.3X\n", code, + next_char, next_code)); + + if (next_code) +@@ -162,7 +162,7 @@ + + if (next_char == end_of_info) + { +- dprintf(("--> next is EOI! (b)\n")); ++ dbprintf(("--> next is EOI! (b)\n")); + } + } + +@@ -174,14 +174,14 @@ + /* ---------------------------------------------------------------- */ + curr_word |= code << curr_bits; + curr_bits += curr_size; +- dprintf(("SEND %.4X %d curr: %.8X %2d\n", code, curr_size, ++ dbprintf(("SEND %.4X %d curr: %.8X %2d\n", code, curr_size, + curr_word, curr_bits)); + while (curr_bits > 8) + { + /* Handle packaging data into 256-byte records */ + if (o_ptr - last_len_byte == 256) + { +- dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, ++ dbprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, + o_ptr)); + *last_len_byte = 255; + last_len_byte = o_ptr++; +@@ -203,7 +203,7 @@ + /* Handle packaging data into 256-byte records */ + if (o_ptr - last_len_byte == 256) + { +- dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); ++ dbprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); + *last_len_byte = 255; + last_len_byte = o_ptr++; + } +@@ -223,7 +223,7 @@ + *last_len_byte = o_ptr - last_len_byte - 1; + *o_ptr++ = 0; + +- dprintf(("encoded %d bytes\n", o_ptr - o_buf)); ++ dbprintf(("encoded %d bytes\n", o_ptr - o_buf)); + + return o_ptr - o_buf; + +@@ -232,11 +232,11 @@ + } + + //#define DEBUG +-#undef dprintf ++#undef dbprintf + #ifdef DEBUG +-# define dprintf(x) jzp_printf x ++# define dbprintf(x) jzp_printf x + #else +-# define dprintf(x) ++# define dbprintf(x) + #endif + + int lzw_encode2(const uint_8 *i_buf, const uint_8 *i_buf_alt, +@@ -270,7 +270,7 @@ + } + + dict_stride = max_sym + 1; +- dprintf(("max_sym = %.2X\n", max_sym)); ++ dbprintf(("max_sym = %.2X\n", max_sym)); + + /* -------------------------------------------------------------------- */ + /* Compute and output the starting code-size. */ +@@ -278,7 +278,7 @@ + for (code_size = 2; code_size < 8; code_size++) + if ((1 << code_size) > max_sym) + break; +- dprintf(("code_size = %.2X\n", code_size)); ++ dbprintf(("code_size = %.2X\n", code_size)); + /* -------------------------------------------------------------------- */ + /* Allocate the dictionary. We store the tree in a 2-D array. One */ + /* dimension is the code number, and the other is the codes it chains */ +@@ -312,7 +312,7 @@ + /* -------------------------------------------------------------------- */ + while (i_idx <= i_len && code != end_of_info) + { +- dprintf(("remaining: %10d\n", i_len - i_idx)); ++ dbprintf(("remaining: %10d\n", i_len - i_idx)); + + /* ---------------------------------------------------------------- */ + /* If dictionary's full, send a clear code and flush dictionary. */ +@@ -320,7 +320,7 @@ + /* ---------------------------------------------------------------- */ + if (next_new_code == 0x1000) + { +- dprintf(("CLEAR %.3X %d\n", clear_code, curr_size)); ++ dbprintf(("CLEAR %.3X %d\n", clear_code, curr_size)); + + curr_word |= clear_code << curr_bits; + curr_bits += curr_size; +@@ -329,7 +329,7 @@ + /* Handle packaging data into 256-byte records */ + if (o_ptr - last_len_byte == 256) + { +- dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", ++ dbprintf(("last_len_byte=%.8X o_ptr=%.8X\n", + last_len_byte, o_ptr)); + + *last_len_byte = 255; +@@ -348,7 +348,7 @@ + memset(dict, 0, 4096*sizeof(uint_16)*dict_stride); + } else + { +- dprintf(("new code: %.3X = %.3X + %.2X\n", next_new_code, ++ dbprintf(("new code: %.3X = %.3X + %.2X\n", next_new_code, + code, next_char)); + + dict[code*dict_stride + next_char] = next_new_code; +@@ -358,7 +358,7 @@ + } + + code = next_char; /* Previous concat becomes new initial code */ +- dprintf(("next code: %.2X %c\n", code, code == end_of_info ? '*':' ')); ++ dbprintf(("next code: %.2X %c\n", code, code == end_of_info ? '*':' ')); + + /* ---------------------------------------------------------------- */ + /* Keep concatenating as long as we stay in the dictionary. */ +@@ -366,7 +366,7 @@ + if (i_idx == i_len) + { + next_char = end_of_info; +- dprintf(("--> next is EOI!\n")); ++ dbprintf(("--> next is EOI!\n")); + } else + { + next_code = -1; +@@ -378,19 +378,19 @@ + if ((tmp = dict[code*dict_stride + i_buf[i_idx]]) != 0) + { + next_code = tmp; +- dprintf(("--> code: %.3X + %.2X(a) = %.3X\n", code, ++ dbprintf(("--> code: %.3X + %.2X(a) = %.3X\n", code, + next_char, next_code)); + } else + if ((tmp = dict[code*dict_stride + i_buf_alt[i_idx]]) != 0) + { + next_char = i_buf_alt[i_idx]; + next_code = tmp; +- dprintf(("--> code: %.3X + %.2X(b) = %.3X\n", code, ++ dbprintf(("--> code: %.3X + %.2X(b) = %.3X\n", code, + next_char, next_code)); + } else + { + next_code = 0; +- dprintf(("--> code: %.3X + %.2X(c) = %.3X\n", code, ++ dbprintf(("--> code: %.3X + %.2X(c) = %.3X\n", code, + next_char, next_code)); + } + i_idx++; +@@ -403,7 +403,7 @@ + + if (next_char == end_of_info) + { +- dprintf(("--> next is EOI! (b)\n")); ++ dbprintf(("--> next is EOI! (b)\n")); + } + } + +@@ -415,14 +415,14 @@ + /* ---------------------------------------------------------------- */ + curr_word |= code << curr_bits; + curr_bits += curr_size; +- dprintf(("SEND %.4X %d curr: %.8X %2d\n", code, curr_size, ++ dbprintf(("SEND %.4X %d curr: %.8X %2d\n", code, curr_size, + curr_word, curr_bits)); + while (curr_bits > 8) + { + /* Handle packaging data into 256-byte records */ + if (o_ptr - last_len_byte == 256) + { +- dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, ++ dbprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, + o_ptr)); + *last_len_byte = 255; + last_len_byte = o_ptr++; +@@ -444,7 +444,7 @@ + /* Handle packaging data into 256-byte records */ + if (o_ptr - last_len_byte == 256) + { +- dprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); ++ dbprintf(("last_len_byte=%.8X o_ptr=%.8X\n", last_len_byte, o_ptr)); + *last_len_byte = 255; + last_len_byte = o_ptr++; + } +@@ -464,7 +464,7 @@ + *last_len_byte = o_ptr - last_len_byte - 1; + *o_ptr++ = 0; + +- dprintf(("encoded %d bytes\n", o_ptr - o_buf)); ++ dbprintf(("encoded %d bytes\n", o_ptr - o_buf)); + + return o_ptr - o_buf; + --- jzintv/files/patch-src-ivoice-ivoice.c 1970-01-01 01:00:00.000000000 +0100 +++ jzintv/files/patch-src-ivoice-ivoice.c 2009-03-22 12:57:39.713397622 +0100 @@ -0,0 +1,141 @@ +--- src/ivoice/ivoice.c.orig 2009-03-22 12:56:23.061988854 +0100 ++++ src/ivoice/ivoice.c 2009-03-22 12:56:56.670247445 +0100 +@@ -44,9 +44,9 @@ + + //#define DEBUG + #ifdef DEBUG +-#define dprintf(x) jzp_printf x ; jzp_flush() ++#define dbprintf(x) jzp_printf x ; jzp_flush() + #else +-#define dprintf(x) ++#define dbprintf(x) + #endif + + #undef HIGH_QUALITY +@@ -1086,7 +1086,7 @@ + + iv_smp_ckupd(iv, immed4*16 + opcode); + +- dprintf(("$%.4X.%.1X: OPCODE %d%d%d%d.%d%d\n", ++ dbprintf(("$%.4X.%.1X: OPCODE %d%d%d%d.%d%d\n", + (iv->pc >> 3) - 1, iv->pc & 7, + !!(opcode & 1), !!(opcode & 2), + !!(opcode & 4), !!(opcode & 8), +@@ -1211,7 +1211,7 @@ + /* ---------------------------------------------------------------- */ + if (ctrl_xfer) + { +- dprintf(("jumping to $%.4X.%.1X: ", iv->pc >> 3, iv->pc & 7)); ++ dbprintf(("jumping to $%.4X.%.1X: ", iv->pc >> 3, iv->pc & 7)); + + /* ------------------------------------------------------------ */ + /* Set our "FIFO Selected" flag based on whether we're going */ +@@ -1219,7 +1219,7 @@ + /* ------------------------------------------------------------ */ + iv->fifo_sel = iv->pc == FIFO_ADDR; + +- dprintf(("%s ", iv->fifo_sel ? "FIFO" : "ROM")); ++ dbprintf(("%s ", iv->fifo_sel ? "FIFO" : "ROM")); + + /* ------------------------------------------------------------ */ + /* Control transfers to the FIFO cause it to discard the */ +@@ -1227,14 +1227,14 @@ + /* ------------------------------------------------------------ */ + if (iv->fifo_sel && iv->fifo_bitp) + { +- dprintf(("bitp = %d -> Flush", iv->fifo_bitp)); ++ dbprintf(("bitp = %d -> Flush", iv->fifo_bitp)); + + /* Discard partially-read decle. */ + if (iv->fifo_tail < iv->fifo_head) iv->fifo_tail++; + iv->fifo_bitp = 0; + } + +- dprintf(("\n")); ++ dbprintf(("\n")); + + continue; + } +@@ -1255,7 +1255,7 @@ + #endif + + iv->filt.rpt = repeat + 1; +- dprintf(("repeat = %d\n", repeat)); ++ dbprintf(("repeat = %d\n", repeat)); + + i = (opcode << 3) | (iv->mode & 6); + idx0 = sp0256_df_idx[i++]; +@@ -1285,7 +1285,7 @@ + field = cr & CR_FIELD; + value = 0; + +- dprintf(("$%.4X.%.1X: len=%2d shf=%2d prm=%2d d=%d f=%d ", ++ dbprintf(("$%.4X.%.1X: len=%2d shf=%2d prm=%2d d=%d f=%d ", + iv->pc >> 3, iv->pc & 7, len, shf, prm, !!delta, !!field)); + /* ------------------------------------------------------------ */ + /* Clear any registers that were requested to be cleared. */ +@@ -1313,7 +1313,7 @@ + } + else + { +- dprintf((" (no update)\n")); ++ dbprintf((" (no update)\n")); + continue; + } + +@@ -1331,7 +1331,7 @@ + if (shf) + value <<= shf; + +- dprintf(("v=%.2X (%c%.2X) ", value & 0xFF, ++ dbprintf(("v=%.2X (%c%.2X) ", value & 0xFF, + value & 0x80 ? '-' : '+', + 0xFF & (value & 0x80 ? -value : value))); + +@@ -1342,12 +1342,12 @@ + /* ------------------------------------------------------------ */ + if (field) + { +- dprintf(("--field-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); ++ dbprintf(("--field-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); + + iv->filt.r[prm] &= ~(~0 << shf); /* Clear the old bits. */ + iv->filt.r[prm] |= value; /* Merge in the new bits. */ + +- dprintf(("%.2X\n", iv->filt.r[prm])); ++ dbprintf(("%.2X\n", iv->filt.r[prm])); + + continue; + } +@@ -1357,11 +1357,11 @@ + /* ------------------------------------------------------------ */ + if (delta) + { +- dprintf(("--delta-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); ++ dbprintf(("--delta-> r[%2d] = %.2X -> ", prm, iv->filt.r[prm])); + + iv->filt.r[prm] += value; + +- dprintf(("%.2X\n", iv->filt.r[prm])); ++ dbprintf(("%.2X\n", iv->filt.r[prm])); + + continue; + } +@@ -1370,7 +1370,7 @@ + /* Otherwise, just write the new value. */ + /* ------------------------------------------------------------ */ + iv->filt.r[prm] = value; +- dprintf(("--value-> r[%2d] = %.2X\n", prm, iv->filt.r[prm])); ++ dbprintf(("--value-> r[%2d] = %.2X\n", prm, iv->filt.r[prm])); + } + + /* ---------------------------------------------------------------- */ +@@ -1727,7 +1727,7 @@ + /* ---------------------------------------------------------------- */ + if ((ivoice->fifo_head - ivoice->fifo_tail) >= 64) + { +- dprintf(("IV: Dropped FIFO write\n")); ++ dbprintf(("IV: Dropped FIFO write\n")); + return; + } +