Author: pebender
Date: Tue Jun 23 09:09:27 2009
New Revision: 5028

Added:
     
trunk/gar-minimyth/script/emulators/jzintv/files/jzintv-1.0-beta3-debug_printf.patch

Log:
- Add patch missing from previous commit.



Added:  
trunk/gar-minimyth/script/emulators/jzintv/files/jzintv-1.0-beta3-debug_printf.patch
==============================================================================
--- (empty file)
+++  
trunk/gar-minimyth/script/emulators/jzintv/files/jzintv-1.0-beta3-debug_printf.patch
     
Tue Jun 23 09:09:27 2009
@@ -0,0 +1,648 @@
+diff -Naur jzintv-1.0-beta3-old/doc/tech/ivoice.c  
jzintv-1.0-beta3-new/doc/tech/ivoice.c
+--- jzintv-1.0-beta3-old/doc/tech/ivoice.c     2006-07-05 19:11:46.000000000  
-0700
++++ jzintv-1.0-beta3-new/doc/tech/ivoice.c     2009-06-23 08:54:24.000000000  
-0700
+@@ -36,9 +36,9 @@
+ //#define SINGLE_STEP
+ //#define DEBUG
+ #ifdef DEBUG
+-#define dprintf(x) printf x ; fflush(stdout)
++#define debug_printf(x) printf x ; fflush(stdout)
+ #else
+-#define dprintf(x)
++#define debug_printf(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),
++        debug_printf(("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",
++        debug_printf(("$%.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));
++            debug_printf(("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"));
++            debug_printf(("%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));
++                debug_printf(("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"));
++            debug_printf(("\n"));
+
+             continue;
+         }
+@@ -1080,7 +1080,7 @@
+         #endif
+
+         iv->filt.rpt = repeat + 1;
+-        dprintf(("repeat = %d\n", repeat));
++        debug_printf(("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 ",
++            debug_printf(("$%.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"));
++                debug_printf((" (no update)\n"));
+                 continue;
+             }
+
+@@ -1151,7 +1151,7 @@
+             if (shf)
+                 value <<= shf;
+
+-            dprintf(("v=%.2X (%c%.2X)  ", value & 0xFF,
++            debug_printf(("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]));
++                debug_printf(("--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]));
++                debug_printf(("%.2X\n", iv->filt.r[prm]));
+
+                 continue;
+             }
+@@ -1175,11 +1175,11 @@
+             /*  
------------------------------------------------------------ */
+             if (delta)
+             {
+-                dprintf(("--delta-> r[%2d] = %.2X -> ", prm,  
iv->filt.r[prm]));
++                debug_printf(("--delta-> r[%2d] = %.2X -> ", prm,  
iv->filt.r[prm]));
+
+                 iv->filt.r[prm] += value;
+
+-                dprintf(("%.2X\n", iv->filt.r[prm]));
++                debug_printf(("%.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]));
++            debug_printf(("--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"));
++            debug_printf(("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,
++        debug_printf(("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;
+diff -Naur jzintv-1.0-beta3-old/src/cp1600/emu_link.c  
jzintv-1.0-beta3-new/src/cp1600/emu_link.c
+--- jzintv-1.0-beta3-old/src/cp1600/emu_link.c 2006-07-05  
19:11:46.000000000 -0700
++++ jzintv-1.0-beta3-new/src/cp1600/emu_link.c 2009-06-23  
08:54:28.000000000 -0700
+@@ -103,18 +103,18 @@
+     if (cpu->r[0] != 0x4A5A)
+         return;
+
+-    //dprintf(("\nEMU-LINK %.4X %.4X %.4X\n", cpu->r[1], cpu->r[2],  
cpu->r[3]));
++    //debug_printf(("\nEMU-LINK %.4X %.4X %.4X\n", cpu->r[1], cpu->r[2],  
cpu->r[3]));
+     if (cpu->r[1] > emu_link_api_cnt ||
+         emu_link_api[cpu->r[1]] == NULL)
+     {
+-        //dprintf(("EMU-LINK Invalid API\n"));
++        //debug_printf(("EMU-LINK Invalid API\n"));
+         cpu->C = 1;
+         cpu->r[0] = 0xFFFF;
+         return;
+     }
+
+     cpu->r[0] = emu_link_api[cpu->r[1]](cpu, &fail);
+-    //dprintf(("EMU-LINK Result:  %.4X %d\n", cpu->r[0], fail));
++    //debug_printf(("EMU-LINK Result:  %.4X %d\n", cpu->r[0], fail));
+
+     cpu->C = fail != 0;
+     return;
+diff -Naur jzintv-1.0-beta3-old/src/gif/lzw_enc.c  
jzintv-1.0-beta3-new/src/gif/lzw_enc.c
+--- jzintv-1.0-beta3-old/src/gif/lzw_enc.c     2006-07-02 22:04:46.000000000  
-0700
++++ jzintv-1.0-beta3-new/src/gif/lzw_enc.c     2009-06-23 08:55:02.000000000  
-0700
+@@ -14,9 +14,9 @@
+ #include "config.h"
+
+ #ifdef DEBUG
+-# define dprintf(x) jzp_printf x
++# define debug_printf(x) jzp_printf x
+ #else
+-# define dprintf(x)
++# define debug_printf(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));
++    debug_printf(("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));
++    debug_printf(("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));
++        debug_printf(("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));
++            debug_printf(("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",
++                    debug_printf(("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,
++            debug_printf(("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 ? '*':' '));
++        debug_printf(("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"));
++            debug_printf(("--> 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,
++                debug_printf(("--> 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"));
++                debug_printf(("--> 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,
++        debug_printf(("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,
++                debug_printf(("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));
++            debug_printf(("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));
++    debug_printf(("encoded %d bytes\n", o_ptr - o_buf));
+
+     return o_ptr - o_buf;
+
+@@ -232,11 +232,11 @@
+ }
+
+ //#define DEBUG
+-#undef dprintf
++#undef debug_printf
+ #ifdef DEBUG
+-# define dprintf(x) jzp_printf x
++# define debug_printf(x) jzp_printf x
+ #else
+-# define dprintf(x)
++# define debug_printf(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));
++    debug_printf(("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));
++    debug_printf(("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));
++        debug_printf(("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));
++            debug_printf(("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",
++                    debug_printf(("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,
++            debug_printf(("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 ? '*':' '));
++        debug_printf(("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"));
++            debug_printf(("--> 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,
++                    debug_printf(("--> 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,
++                    debug_printf(("--> code: %.3X + %.2X(b) = %.3X\n",  
code,
+                              next_char, next_code));
+                 } else
+                 {
+                     next_code = 0;
+-                    dprintf(("--> code: %.3X + %.2X(c) = %.3X\n", code,
++                    debug_printf(("--> 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"));
++                debug_printf(("--> 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,
++        debug_printf(("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,
++                debug_printf(("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));
++            debug_printf(("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));
++    debug_printf(("encoded %d bytes\n", o_ptr - o_buf));
+
+     return o_ptr - o_buf;
+
+diff -Naur jzintv-1.0-beta3-old/src/ivoice/ivoice.c  
jzintv-1.0-beta3-new/src/ivoice/ivoice.c
+--- jzintv-1.0-beta3-old/src/ivoice/ivoice.c   2006-07-05 19:11:46.000000000  
-0700
++++ jzintv-1.0-beta3-new/src/ivoice/ivoice.c   2009-06-23 08:57:15.000000000  
-0700
+@@ -37,16 +37,16 @@
+
+ //#define DEBUG_FIFO
+ #ifdef DEBUG_FIFO
+-#define dfprintf(x) jzp_printf x ; jzp_flush()
++#define debug_fifo_printf(x) jzp_printf x ; jzp_flush()
+ #else
+-#define dfprintf(x)
++#define debug_fifo_printf(x)
+ #endif
+
+ //#define DEBUG
+ #ifdef DEBUG
+-#define dprintf(x) jzp_printf x ; jzp_flush()
++#define debug_printf(x) jzp_printf x ; jzp_flush()
+ #else
+-#define dprintf(x)
++#define debug_printf(x)
+ #endif
+
+ #undef HIGH_QUALITY
+@@ -980,7 +980,7 @@
+         data = ((d1 << 10) | d0) >> ivoice->fifo_bitp;
+
+ #ifdef DEBUG_FIFO
+-        dfprintf(("IV: RD_FIFO %.3X %d.%d %d\n", data & ((1 << len) - 1),
++        debug_fifo_printf(("IV: RD_FIFO %.3X %d.%d %d\n", data & ((1 <<  
len) - 1),
+                 ivoice->fifo_tail, ivoice->fifo_bitp, ivoice->fifo_head));
+ #endif
+
+@@ -1086,7 +1086,7 @@
+
+         iv_smp_ckupd(iv, immed4*16 + opcode);
+
+-        dprintf(("$%.4X.%.1X: OPCODE %d%d%d%d.%d%d\n",
++        debug_printf(("$%.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));
++            debug_printf(("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"));
++            debug_printf(("%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));
++                debug_printf(("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"));
++            debug_printf(("\n"));
+
+             continue;
+         }
+@@ -1255,7 +1255,7 @@
+         #endif
+
+         iv->filt.rpt = repeat + 1;
+-        dprintf(("repeat = %d\n", repeat));
++        debug_printf(("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 ",
++            debug_printf(("$%.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"));
++                debug_printf((" (no update)\n"));
+                 continue;
+             }
+
+@@ -1331,7 +1331,7 @@
+             if (shf)
+                 value <<= shf;
+
+-            dprintf(("v=%.2X (%c%.2X)  ", value & 0xFF,
++            debug_printf(("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]));
++                debug_printf(("--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]));
++                debug_printf(("%.2X\n", iv->filt.r[prm]));
+
+                 continue;
+             }
+@@ -1357,11 +1357,11 @@
+             /*  
------------------------------------------------------------ */
+             if (delta)
+             {
+-                dprintf(("--delta-> r[%2d] = %.2X -> ", prm,  
iv->filt.r[prm]));
++                debug_printf(("--delta-> r[%2d] = %.2X -> ", prm,  
iv->filt.r[prm]));
+
+                 iv->filt.r[prm] += value;
+
+-                dprintf(("%.2X\n", iv->filt.r[prm]));
++                debug_printf(("%.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]));
++            debug_printf(("--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"));
++            debug_printf(("IV: Dropped FIFO write\n"));
+             return;
+         }
+
+@@ -1735,7 +1735,7 @@
+         /*  FIFO up the lower 10 bits of the  
data.                          */
+         /*  
---------------------------------------------------------------- */
+ #ifdef DEBUG_FIFO
+-        dfprintf(("IV: WR_FIFO %.3X %d.%d %d\n", data & 0x3FF,
++        debug_fifo_printf(("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;

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to