removed ym2612 debug stuff
[picodrive.git] / Pico / sound / ym2612.c
index 294d621..41defb9 100644 (file)
@@ -1907,8 +1907,6 @@ typedef struct
 } ym_save_addon2;\r
 \r
 \r
-//static YM2612 check_ym;\r
-\r
 void YM2612PicoStateSave2(int tat, int tbt)\r
 {\r
        ym_save_addon_slot ss;\r
@@ -1935,7 +1933,7 @@ void YM2612PicoStateSave2(int tat, int tbt)
        refresh_fc_eg_chan( &ym2612.CH[5] );\r
 \r
        memset(&sa, 0, sizeof(sa));\r
-//memcpy(&check_ym, &ym2612, sizeof(ym2612));\r
+       memset(&sa2, 0, sizeof(sa2));\r
 \r
        // chans 1,2,3\r
        ptr = &ym2612.REGS[0x0b8];\r
@@ -2028,7 +2026,6 @@ int YM2612PicoStateLoad2(int *tat, int *tbt)
                        ym2612.CH[c].SLOT[s].volume = ss.volume;\r
                        ym2612.CH[c].SLOT[s].key = (sa.keyon_field & (1 << (c*4 + s))) ? 1 : 0;\r
                        ym2612.CH[c].SLOT[s].ksr = (UINT8)-1;\r
-//ym2612.CH[c].SLOT[s].Incr = check_ym.CH[c].SLOT[s].Incr;\r
                        ptr += 6;\r
                }\r
                ym2612.CH[c].SLOT[SLOT1].Incr=-1;\r
@@ -2049,7 +2046,6 @@ int YM2612PicoStateLoad2(int *tat, int *tbt)
                        ym2612.CH[c].SLOT[s].volume = ss.volume;\r
                        ym2612.CH[c].SLOT[s].key = (sa.keyon_field & (1 << (c*4 + s))) ? 1 : 0;\r
                        ym2612.CH[c].SLOT[s].ksr = (UINT8)-1;\r
-//ym2612.CH[c].SLOT[s].Incr = check_ym.CH[c].SLOT[s].Incr;\r
                        ptr += 6;\r
                }\r
                ym2612.CH[c].SLOT[SLOT1].Incr=-1;\r
@@ -2068,64 +2064,6 @@ int YM2612PicoStateLoad2(int *tat, int *tbt)
                ym2612.OPN.SL3.fc[c] = fn_table[fn*2]>>(7-blk);\r
        }\r
 \r
-#if 0\r
-       refresh_fc_eg_chan( &ym2612.CH[0] );\r
-       refresh_fc_eg_chan( &ym2612.CH[1] );\r
-       if( (ym2612.OPN.ST.mode & 0xc0) )\r
-       {\r
-               /* 3SLOT MODE */\r
-               if( ym2612.CH[2].SLOT[SLOT1].Incr==-1)\r
-               {\r
-                       refresh_fc_eg_slot(&ym2612.CH[2].SLOT[SLOT1], ym2612.OPN.SL3.fc[1], ym2612.OPN.SL3.kcode[1] );\r
-                       refresh_fc_eg_slot(&ym2612.CH[2].SLOT[SLOT2], ym2612.OPN.SL3.fc[2], ym2612.OPN.SL3.kcode[2] );\r
-                       refresh_fc_eg_slot(&ym2612.CH[2].SLOT[SLOT3], ym2612.OPN.SL3.fc[0], ym2612.OPN.SL3.kcode[0] );\r
-                       refresh_fc_eg_slot(&ym2612.CH[2].SLOT[SLOT4], ym2612.CH[2].fc , ym2612.CH[2].kcode );\r
-               }\r
-       } else refresh_fc_eg_chan( &ym2612.CH[2] );\r
-       refresh_fc_eg_chan( &ym2612.CH[3] );\r
-       refresh_fc_eg_chan( &ym2612.CH[4] );\r
-       refresh_fc_eg_chan( &ym2612.CH[5] );\r
-\r
-       for (c = 0; c < 6; c++)\r
-       {\r
-               for (s = 0; s < 4; s++)\r
-               {\r
-                       int i;\r
-                       unsigned char *chk = ((unsigned char *) &check_ym.CH[c].SLOT[s]);\r
-                       unsigned char *res = ((unsigned char *) &ym2612.CH[c].SLOT[s]);\r
-\r
-                       for (i = 0; i < sizeof(check_ym.CH[0].SLOT[0]); i++)\r
-                       {\r
-                               if (i != 0x0c && chk[i] != res[i])\r
-                                       printf("ch[%i].slot[%i].%03x: %02x vs %02x\n", c, s, i, chk[i], res[i]);\r
-                       }\r
-               }\r
-\r
-               {\r
-                       int i;\r
-                       unsigned char *chk = ((unsigned char *) &check_ym.CH[c].ALGO);\r
-                       unsigned char *res = ((unsigned char *) &ym2612.CH[c].ALGO);\r
-\r
-                       for (i = 0; i < 8*4; i++)\r
-                       {\r
-                               if ((i < 4 || i > 0x0b) && chk[i] != res[i])\r
-                                       printf("ch[%i].%03x: %02x vs %02x\n", c, i, chk[i], res[i]);\r
-                       }\r
-               }\r
-       }\r
-\r
-       for (c = 0; c < sizeof(ym2612.OPN); c++)\r
-       {\r
-               unsigned char *chk = ((unsigned char *) &check_ym.OPN);\r
-               unsigned char *res = ((unsigned char *) &ym2612.OPN);\r
-\r
-               if (chk[c] != res[c])\r
-               {\r
-                       printf("OPN: %03x: %02x vs %02x\n", c, chk[c], res[c]);\r
-               }\r
-       }\r
-#endif\r
-\r
        return 0;\r
 }\r
 \r