sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

port_sh.c (19506B)


      1 #if defined(VERSION_SH) || defined(VERSION_CN)
      2 // TODO: merge this with port_eu.c
      3 
      4 #include <ultra64.h>
      5 
      6 #include "data.h"
      7 #include "heap.h"
      8 #include "load.h"
      9 #include "synthesis.h"
     10 #include "internal.h"
     11 #include "seqplayer.h"
     12 
     13 #define EXTRA_BUFFERED_AI_SAMPLES_TARGET 0x80
     14 #define SAMPLES_TO_OVERPRODUCE 0x10
     15 
     16 extern s32 D_SH_80314FC8;
     17 extern struct SPTask *D_SH_80314FCC;
     18 extern u8 D_SH_80315098;
     19 extern u8 D_SH_8031509C;
     20 extern OSMesgQueue *D_SH_80350F68;
     21 
     22 void func_8031D690(s32 playerIndex, s32 numFrames);
     23 void seq_player_fade_to_zero_volume(s32 arg0, s32 numFrames);
     24 void func_802ad7ec(u32 arg0);
     25 
     26 struct SPTask *create_next_audio_frame_task(void) {
     27     u32 samplesRemainingInAI;
     28     s32 writtenCmds;
     29     s32 index;
     30     OSTask_t *task;
     31     s32 flags;
     32     s16 *currAiBuffer;
     33     s32 oldDmaCount;
     34     s32 sp38;
     35     s32 sp34;
     36     s32 writtenCmdsCopy;
     37 
     38     gAudioFrameCount++;
     39     if (gAudioFrameCount % gAudioBufferParameters.presetUnk4 != 0) {
     40         if ((gAudioFrameCount % gAudioBufferParameters.presetUnk4) + 1 == gAudioBufferParameters.presetUnk4) {
     41             return D_SH_80314FCC;
     42         }
     43         return NULL;
     44     }
     45     osSendMesg(D_SH_80350F38, (OSMesg) gAudioFrameCount, OS_MESG_NOBLOCK);
     46 
     47     gAudioTaskIndex ^= 1;
     48     gCurrAiBufferIndex++;
     49     gCurrAiBufferIndex %= NUMAIBUFFERS;
     50     index = (gCurrAiBufferIndex - 2 + NUMAIBUFFERS) % NUMAIBUFFERS;
     51     samplesRemainingInAI = osAiGetLength() / 4;
     52 
     53     if (gAudioLoadLockSH < 0x10U) {
     54         if (gAiBufferLengths[index] != 0) {
     55             osAiSetNextBuffer(gAiBuffers[index], gAiBufferLengths[index] * 4);
     56         }
     57     }
     58 
     59     oldDmaCount = gCurrAudioFrameDmaCount;
     60     if (oldDmaCount > AUDIO_FRAME_DMA_QUEUE_SIZE) {
     61     }
     62     gCurrAudioFrameDmaCount = 0;
     63 
     64     decrease_sample_dma_ttls();
     65     func_sh_802f41e4(gAudioResetStatus);
     66     if (osRecvMesg(D_SH_80350F88, (OSMesg *) &sp38, OS_MESG_NOBLOCK) != -1) {
     67         if (gAudioResetStatus == 0) {
     68             gAudioResetStatus = 5;
     69         }
     70         gAudioResetPresetIdToLoad = (u8) sp38;
     71     }
     72 
     73     if (gAudioResetStatus != 0) {
     74         if (audio_shut_down_and_reset_step() == 0) {
     75             if (gAudioResetStatus == 0) {
     76                 osSendMesg(D_SH_80350FA8, (OSMesg) (s32) gAudioResetPresetIdToLoad, OS_MESG_NOBLOCK);
     77             }
     78             D_SH_80314FCC = 0;
     79             return NULL;
     80         }
     81     }
     82     if (gAudioLoadLockSH >= 0x11U) {
     83         return NULL;
     84     }
     85     if (gAudioLoadLockSH != 0) {
     86         gAudioLoadLockSH++;
     87     }
     88 
     89     gAudioTask = &gAudioTasks[gAudioTaskIndex];
     90     gAudioCmd = (u64 *) gAudioCmdBuffers[gAudioTaskIndex];
     91     index = gCurrAiBufferIndex;
     92     currAiBuffer = gAiBuffers[index];
     93 
     94     gAiBufferLengths[index] = (s16) ((((gAudioBufferParameters.samplesPerFrameTarget - samplesRemainingInAI) +
     95          EXTRA_BUFFERED_AI_SAMPLES_TARGET) & ~0xf) + SAMPLES_TO_OVERPRODUCE);
     96     if (gAiBufferLengths[index] < gAudioBufferParameters.minAiBufferLength) {
     97         gAiBufferLengths[index] = gAudioBufferParameters.minAiBufferLength;
     98     }
     99     if (gAiBufferLengths[index] > gAudioBufferParameters.maxAiBufferLength) {
    100         gAiBufferLengths[index] = gAudioBufferParameters.maxAiBufferLength;
    101     }
    102 
    103     if (osRecvMesg(D_SH_80350F68, (OSMesg *) &sp34, 0) != -1) {
    104         do {
    105             func_802ad7ec(sp34);
    106         } while (osRecvMesg(D_SH_80350F68, (OSMesg *) &sp34, 0) != -1);
    107     }
    108 
    109     flags = 0;
    110     gAudioCmd = synthesis_execute(gAudioCmd, &writtenCmds, currAiBuffer, gAiBufferLengths[index]);
    111     gAudioRandom = (u32) (osGetCount() * (gAudioRandom + gAudioFrameCount));
    112     gAudioRandom = (u32) (gAiBuffers[index][gAudioFrameCount & 0xFF] + gAudioRandom);
    113 
    114     index = gAudioTaskIndex;
    115     gAudioTask->msgqueue = NULL;
    116     gAudioTask->msg = NULL;
    117 
    118     task = &gAudioTask->task.t;
    119     task->type = M_AUDTASK;
    120     task->flags = flags;
    121     task->ucode_boot = rspF3DBootStart;
    122     task->ucode_boot_size = (u8 *) rspF3DStart - (u8 *) rspF3DBootStart;
    123     task->ucode = rspAspMainStart;
    124     task->ucode_data = rspAspMainDataStart;
    125     task->ucode_size = 0x1000;
    126     task->ucode_data_size = (rspAspMainDataEnd - rspAspMainDataStart) * sizeof(u64);
    127     task->dram_stack = NULL;
    128     task->dram_stack_size = 0;
    129     task->output_buff = NULL;
    130     task->output_buff_size = NULL;
    131     task->data_ptr = gAudioCmdBuffers[index];
    132     task->data_size = writtenCmds * sizeof(u64);
    133     task->yield_data_ptr = NULL;
    134     task->yield_data_size = 0;
    135 
    136     writtenCmdsCopy = writtenCmds;
    137     if (D_SH_80314FC8 < writtenCmdsCopy) {
    138         D_SH_80314FC8 = writtenCmdsCopy;
    139     }
    140 
    141     if (gAudioBufferParameters.presetUnk4 == 1) {
    142         return gAudioTask;
    143     } else {
    144         D_SH_80314FCC = gAudioTask;
    145         return NULL;
    146     }
    147 }
    148 
    149 void eu_process_audio_cmd(struct EuAudioCmd *cmd) {
    150     s32 i;
    151     struct Note *note;
    152     struct NoteSubEu *sub;
    153 
    154     switch (cmd->u.s.op) {
    155         case 0x81:
    156             preload_sequence(cmd->u.s.arg2, 3);
    157             break;
    158 
    159         case 0x82:
    160         case 0x88:
    161             load_sequence(cmd->u.s.arg1, cmd->u.s.arg2, cmd->u.s.arg3);
    162             func_8031D690(cmd->u.s.arg1, cmd->u2.as_s32);
    163             break;
    164 
    165         case 0x83:
    166             if (gSequencePlayers[cmd->u.s.arg1].enabled != FALSE) {
    167                 if (cmd->u2.as_s32 == 0) {
    168                     sequence_player_disable(&gSequencePlayers[cmd->u.s.arg1]);
    169                 }
    170                 else {
    171                     seq_player_fade_to_zero_volume(cmd->u.s.arg1, cmd->u2.as_s32);
    172                 }
    173             }
    174             break;
    175 
    176         case 0x84:
    177             break;
    178 
    179         case 0xf0:
    180             gSoundMode = cmd->u2.as_s32;
    181             break;
    182 
    183         case 0xf1:
    184             for (i = 0; i < 4; i++) {
    185                 gSequencePlayers[i].muted = TRUE;
    186                 gSequencePlayers[i].recalculateVolume = TRUE;
    187             }
    188             break;
    189 
    190         case 0xf2:
    191             if (cmd->u2.as_s32 == 1) {
    192                 for (i = 0; i < gMaxSimultaneousNotes; i++) {
    193                     note = &gNotes[i];
    194                     sub = &note->noteSubEu;
    195                     if (note->noteSubEu.enabled && note->unkSH34 == 0) {
    196                         if ((note->parentLayer->seqChannel->muteBehavior & 8) != 0) {
    197                             sub->finished = TRUE;
    198                         }
    199                     }
    200                 }
    201             }
    202             for (i = 0; i < 4; i++) {
    203                 gSequencePlayers[i].muted = FALSE;
    204                 gSequencePlayers[i].recalculateVolume = TRUE;
    205             }
    206             break;
    207 
    208         case 0xf3:
    209             func_sh_802f3024(cmd->u.s.arg1, cmd->u.s.arg2, cmd->u.s.arg3);
    210             break;
    211 
    212         case 0xf4:
    213             func_sh_802f30f4(cmd->u.s.arg1, cmd->u.s.arg2, cmd->u.s.arg3, &gUnkQueue1);
    214             break;
    215 
    216         case 0xf5:
    217             func_sh_802f3158(cmd->u.s.arg1, cmd->u.s.arg2, cmd->u.s.arg3, &gUnkQueue1);
    218             break;
    219 
    220         case 0xf6:
    221             func_sh_802f3288(cmd->u.s.arg2);
    222             break;
    223     }
    224 }
    225 
    226 void seq_player_fade_to_zero_volume(s32 arg0, s32 fadeOutTime) {
    227     struct SequencePlayer *player;
    228 
    229     if (fadeOutTime == 0) {
    230         fadeOutTime = 1;
    231     }
    232     player = &gSequencePlayers[arg0];
    233     player->state = 2;
    234     player->fadeRemainingFrames = fadeOutTime;
    235     player->fadeVelocity = -(player->fadeVolume / (f32) fadeOutTime);
    236 }
    237 
    238 void func_8031D690(s32 playerIndex, s32 fadeInTime) {
    239     struct SequencePlayer *player;
    240 
    241     if (fadeInTime != 0) {
    242         player = &gSequencePlayers[playerIndex];
    243         player->state = 1;
    244         player->fadeTimerUnkEu = fadeInTime;
    245         player->fadeRemainingFrames = fadeInTime;
    246         player->fadeVolume = 0.0f;
    247         player->fadeVelocity = 0.0f;
    248     }
    249 }
    250 
    251 void port_eu_init_queues(void) {
    252     D_SH_80350F18 = 0;
    253     D_SH_80350F19 = 0;
    254     D_SH_80350F38 = &D_SH_80350F20;
    255     D_SH_80350F68 = &D_SH_80350F50;
    256     D_SH_80350F88 = &D_SH_80350F70;
    257     D_SH_80350FA8 = &D_SH_80350F90;
    258     osCreateMesgQueue(D_SH_80350F38, D_SH_80350F1C, 1);
    259     osCreateMesgQueue(D_SH_80350F68, D_SH_80350F40, 4);
    260     osCreateMesgQueue(D_SH_80350F88, D_SH_80350F6C, 1);
    261     osCreateMesgQueue(D_SH_80350FA8, D_SH_80350F8C, 1);
    262 }
    263 
    264 extern struct EuAudioCmd sAudioCmd[0x100];
    265 void func_802ad6f0(s32 arg0, s32 *arg1) {
    266     struct EuAudioCmd *cmd = &sAudioCmd[D_SH_80350F18 & 0xff];
    267     cmd->u.first = arg0;
    268     cmd->u2.as_u32 = *arg1;
    269     D_SH_80350F18++;
    270     if (D_SH_80350F18 == D_SH_80350F19) {
    271         D_SH_80350F18--;
    272     }
    273 }
    274 
    275 void func_802ad728(u32 arg0, f32 arg1) {
    276     func_802ad6f0(arg0, (s32 *) &arg1);
    277 }
    278 
    279 void func_802ad74c(u32 arg0, u32 arg1) {
    280     func_802ad6f0(arg0, (s32 *) &arg1);
    281 }
    282 
    283 void func_802ad770(u32 arg0, s8 arg1) {
    284     s32 sp1C = arg1 << 24;
    285     func_802ad6f0(arg0, &sp1C);
    286 }
    287 
    288 char shindouDebugPrint133[] = "AudioSend: %d -> %d (%d)\n";
    289 
    290 void func_sh_802F64C8(void) {
    291     static s32 D_SH_8031503C = 0;
    292     s32 mesg;
    293 
    294     if (((D_SH_80350F18 - D_SH_80350F19 + 0x100) & 0xff) > D_SH_8031503C) {
    295         D_SH_8031503C = (D_SH_80350F18 - D_SH_80350F19 + 0x100) & 0xff;
    296     }
    297     mesg = ((D_SH_80350F19 & 0xff) << 8) | (D_SH_80350F18 & 0xff);
    298     osSendMesg(D_SH_80350F68, (OSMesg)mesg, OS_MESG_NOBLOCK);
    299     D_SH_80350F19 = D_SH_80350F18;
    300 }
    301 
    302 void func_sh_802f6540(void) {
    303     D_SH_80350F19 = D_SH_80350F18;
    304 }
    305 
    306 void func_802ad7ec(u32 arg0) {
    307     struct EuAudioCmd *cmd;
    308     struct SequencePlayer *seqPlayer;
    309     struct SequenceChannel *chan;
    310     u8 end;
    311 
    312     UNUSED static char shindouDebugPrint134[] = "Continue Port\n";
    313     UNUSED static char shindouDebugPrint135[] = "%d -> %d\n";
    314     UNUSED static char shindouDebugPrint136[] = "Sync-Frame  Break. (Remain %d)\n";
    315     UNUSED static char shindouDebugPrint137[] = "Undefined Port Command %d\n";
    316 
    317     static u8 D_SH_80315098 = 0;
    318     static u8 D_SH_8031509C = 0;
    319 
    320     if (D_SH_8031509C == 0) {
    321         D_SH_80315098 = (arg0 >> 8) & 0xff;
    322     }
    323 
    324     end = arg0 & 0xff;
    325 
    326     for (;;) {
    327         if (D_SH_80315098 == end) {
    328             D_SH_8031509C = 0;
    329             break;
    330         }
    331         cmd = &sAudioCmd[D_SH_80315098 & 0xff];
    332         D_SH_80315098++;
    333         if (cmd->u.s.op == 0xf8) {
    334             D_SH_8031509C = 1;
    335             break;
    336         }
    337         else if ((cmd->u.s.op & 0xf0) == 0xf0) {
    338             eu_process_audio_cmd(cmd);
    339         }
    340         else if (cmd->u.s.arg1 < SEQUENCE_PLAYERS) {
    341             seqPlayer = &gSequencePlayers[cmd->u.s.arg1];
    342             if ((cmd->u.s.op & 0x80) != 0) {
    343                 eu_process_audio_cmd(cmd);
    344             }
    345             else if ((cmd->u.s.op & 0x40) != 0) {
    346                 switch (cmd->u.s.op) {
    347                     case 0x41:
    348                         if (seqPlayer->fadeVolumeScale != cmd->u2.as_f32) {
    349                             seqPlayer->fadeVolumeScale = cmd->u2.as_f32;
    350                             seqPlayer->recalculateVolume = TRUE;
    351                         }
    352                         break;
    353 
    354                     case 0x47:
    355                         seqPlayer->tempo = cmd->u2.as_s32 * TATUMS_PER_BEAT;
    356                         break;
    357 
    358                     case 0x49:
    359                         seqPlayer->tempoAdd = cmd->u2.as_s32 * TEMPO_SCALE;
    360                         break;
    361 
    362                     case 0x48:
    363                         seqPlayer->transposition = cmd->u2.as_s8;
    364                         break;
    365 
    366                     case 0x46:
    367                         seqPlayer->seqVariationEu[cmd->u.s.arg3] = cmd->u2.as_s8;
    368                         break;
    369                 }
    370             }
    371             else if (seqPlayer->enabled != FALSE && cmd->u.s.arg2 < 0x10) {
    372                 chan = seqPlayer->channels[cmd->u.s.arg2];
    373                 if (IS_SEQUENCE_CHANNEL_VALID(chan)) {
    374                     switch (cmd->u.s.op) {
    375                         case 1:
    376                             if (chan->volumeScale != cmd->u2.as_f32) {
    377                                 chan->volumeScale = cmd->u2.as_f32;
    378                                 chan->changes.as_bitfields.volume = TRUE;
    379                             }
    380                             break;
    381                         case 2:
    382                             if (chan->volume != cmd->u2.as_f32) {
    383                                 chan->volume = cmd->u2.as_f32;
    384                                 chan->changes.as_bitfields.volume = TRUE;
    385                             }
    386                             break;
    387                         case 3:
    388                             if (chan->newPan != cmd->u2.as_s8) {
    389                                 chan->newPan = cmd->u2.as_s8;
    390                                 chan->changes.as_bitfields.pan = TRUE;
    391                             }
    392                             break;
    393                         case 4:
    394                             if (chan->freqScale != cmd->u2.as_f32) {
    395                                 chan->freqScale = cmd->u2.as_f32;
    396                                 chan->changes.as_bitfields.freqScale = TRUE;
    397                             }
    398                             break;
    399                         case 5:
    400                             //! @bug u8 s8 comparison (but harmless)
    401                             if (chan->reverbVol != cmd->u2.as_s8) {
    402                                 chan->reverbVol = cmd->u2.as_s8;
    403                             }
    404                             break;
    405                         case 6:
    406                             if (cmd->u.s.arg3 < 8) {
    407                                 chan->soundScriptIO[cmd->u.s.arg3] = cmd->u2.as_s8;
    408                             }
    409                             break;
    410                         case 8:
    411                             chan->stopSomething2 = cmd->u2.as_s8;
    412                             break;
    413                         case 9:
    414                             chan->muteBehavior = cmd->u2.as_s8;
    415                     }
    416                 }
    417             }
    418         }
    419 
    420         cmd->u.s.op = 0;
    421     }
    422 }
    423 
    424 u32 func_sh_802f6878(s32 *arg0) {
    425     u32 sp1C;
    426 
    427     if (osRecvMesg(&gUnkQueue1, (OSMesg *) &sp1C, 0) == -1) {
    428         *arg0 = 0;
    429         return 0U;
    430     }
    431     *arg0 = (s32) (sp1C & 0xFFFFFF);
    432     return sp1C >> 0x18;
    433 }
    434 
    435 u8 *func_sh_802f68e0(u32 index, u32 *a1) {
    436     return func_sh_802f3220(index, a1);
    437 }
    438 
    439 s32 func_sh_802f6900(void) {
    440     s32 ret;
    441     s32 sp18;
    442 
    443     ret = osRecvMesg(D_SH_80350FA8, (OSMesg *) &sp18, 0);
    444 
    445     if (ret == -1) {
    446         return 0;
    447     }
    448     if (sp18 != gAudioResetPresetIdToLoad) {
    449         return 0;
    450     } else {
    451         return 1;
    452     }
    453 }
    454 
    455 // TODO: (Scrub C)
    456 void func_sh_802f6958(OSMesg mesg) {
    457     s32 a;
    458     OSMesg recvMesg;
    459 
    460     do {
    461         a = -1;
    462     } while (osRecvMesg(D_SH_80350FA8, &recvMesg, OS_MESG_NOBLOCK) != a);
    463     func_sh_802f6540();
    464     osSendMesg(D_SH_80350F88, mesg, OS_MESG_NOBLOCK);
    465 }
    466 
    467 void func_sh_802f69cc(void) {
    468     gAudioLoadLockSH = 1;
    469     func_sh_802f6958(0);
    470     gAudioResetStatus = 0;
    471 }
    472 
    473 s32 func_sh_802f6a08(s32 playerIndex, s32 channelIndex, s32 soundScriptIOIndex) {
    474     struct SequenceChannel *seqChannel;
    475     struct SequencePlayer *player;
    476 
    477     player = &gSequencePlayers[playerIndex];
    478     if (player->enabled) {
    479         seqChannel = player->channels[channelIndex];
    480         if (IS_SEQUENCE_CHANNEL_VALID(seqChannel)) {
    481             return seqChannel->soundScriptIO[soundScriptIOIndex];
    482         }
    483     }
    484     return -1;
    485 }
    486 
    487 s8 func_sh_802f6a6c(s32 playerIndex, s32 index) {
    488     return gSequencePlayers[playerIndex].seqVariationEu[index];
    489 }
    490 
    491 void port_eu_init(void) {
    492     port_eu_init_queues();
    493 }
    494 
    495 char shindouDebugPrint138[] = "specchg conjunction error (Msg:%d Cur:%d)\n";
    496 char shindouDebugPrint139[] = "Error : Queue is not empty ( %x ) \n";
    497 char shindouDebugPrint140[] = "Audio: setvol: volume minus %f\n";
    498 char shindouDebugPrint141[] = "Audio: setvol: volume overflow %f\n";
    499 char shindouDebugPrint142[] = "Audio: setpitch: pitch zero or minus %f\n";
    500 char shindouDebugPrint143[] = "----------------------Double-Error CH: %x %f\n";
    501 char shindouDebugPrint144[] = "----------------------Double-Error NT: %x\n";
    502 char shindouDebugPrint145[] = "CAUTION:SUB IS SEPARATED FROM GROUP\n";
    503 char shindouDebugPrint146[] = "CAUTION:PAUSE EMERGENCY\n";
    504 char shindouDebugPrint147[] = "Error:Wait Track disappear\n";
    505 char shindouDebugPrint148[] = "Audio: voiceman: No bank error %d\n";
    506 char shindouDebugPrint149[] = "Audio: voiceman: progNo. overflow %d,%d\n";
    507 char shindouDebugPrint150[] = "ptr2 %x\n";
    508 char shindouDebugPrint151[] = "Audio: voiceman: progNo. undefined %d,%d\n";
    509 char shindouDebugPrint152[] = "Audio: voiceman: No bank error %d\n";
    510 char shindouDebugPrint153[] = "Audio: voiceman: Percussion Overflow %d,%d\n";
    511 char shindouDebugPrint154[] = "Audio: voiceman: Percussion table pointer (bank %d) is irregular %x.\n";
    512 char shindouDebugPrint155[] = "Audio: voiceman: Percpointer NULL %d,%d\n";
    513 char shindouDebugPrint156[] = "--4 %x\n";
    514 char shindouDebugPrint157[] = "NoteOff Comes during wait release %x (note %x)\n";
    515 char shindouDebugPrint158[] = "Slow Release Batting\n";
    516 u8 euUnknownData_8030194c[4] = { 0x40, 0x20, 0x10, 0x08 };
    517 char shindouDebugPrint159[] = "Audio:Wavemem: Bad voiceno (%d)\n";
    518 char shindouDebugPrint160[] = "Audio: C-Alloc : Dealloc voice is NULL\n";
    519 char shindouDebugPrint161[] = "Alloc Error:Dim voice-Alloc %d";
    520 char shindouDebugPrint162[] = "Error:Same List Add\n";
    521 char shindouDebugPrint163[] = "Already Cut\n";
    522 char shindouDebugPrint164[] = "Audio: C-Alloc : lowerPrio is NULL\n";
    523 char shindouDebugPrint165[] = "Intterupt UseStop %d (Kill %d)\n";
    524 char shindouDebugPrint166[] = "Intterupt RelWait %d (Kill %d)\n";
    525 char shindouDebugPrint167[] = "Drop Voice (Prio %x)\n";
    526 s32 D_SH_803154CC = 0; // file boundary
    527 
    528 // effects.c
    529 char shindouDebugPrint168[] = "Audio:Envp: overflow  %f\n";
    530 s32 D_SH_803154EC = 0; // file boundary
    531 
    532 // seqplayer.c
    533 char shindouDebugPrint169[] = "Audio:Track:Warning: No Free Notetrack\n";
    534 char shindouDebugPrint170[] = "SUBTRACK DIM\n";
    535 char shindouDebugPrint171[] = "Audio:Track: Warning :SUBTRACK had been stolen by other Group.\n";
    536 char shindouDebugPrint172[] = "SEQID %d,BANKID %d\n";
    537 char shindouDebugPrint173[] = "ERR:SUBTRACK %d NOT ALLOCATED\n";
    538 char shindouDebugPrint174[] = "Stop Release\n";
    539 char shindouDebugPrint175[] = "Error:Same List Add\n";
    540 char shindouDebugPrint176[] = "Wait Time out!\n";
    541 char shindouDebugPrint177[] = "Macro Level Over Error!\n";
    542 char shindouDebugPrint178[] = "Macro Level Over Error!\n"; // Again
    543 char shindouDebugPrint179[] = "WARNING: NPRG: cannot change %d\n";
    544 char shindouDebugPrint180[] = "Audio:Track:NOTE:UNDEFINED NOTE COM. %x\n";
    545 char shindouDebugPrint181[] = "Error: Subtrack no prg.\n";
    546 char shindouDebugPrint182[] = "ERR %x\n";
    547 char shindouDebugPrint183[] = "Note OverFlow %d\n";
    548 char shindouDebugPrint184[] = "trs %d , %d, %d\n";
    549 char shindouDebugPrint185[] = "Audio: Note:Velocity Error %d\n";
    550 char shindouDebugPrint186[] = "Audio:Track :Call Macro Level Over Error!\n";
    551 char shindouDebugPrint187[] = "Audio:Track :Loops Macro Level Over Error!\n";
    552 char shindouDebugPrint188[] = "SUB:ERR:BANK %d NOT CACHED.\n";
    553 char shindouDebugPrint189[] = "SUB:ERR:BANK %d NOT CACHED.\n";
    554 char shindouDebugPrint190[] = "Audio:Track: CTBLCALL Macro Level Over Error!\n";
    555 char shindouDebugPrint191[] = "Set Noise %d\n";
    556 char shindouDebugPrint192[] = "[%2x] \n";
    557 char shindouDebugPrint193[] = "Err :Sub %x ,address %x:Undefined SubTrack Function %x";
    558 char shindouDebugPrint194[] = "VoiceLoad Error Bank:%d,Prog:%d\n";
    559 char shindouDebugPrint195[] = "Disappear Sequence or Bank %d\n";
    560 char shindouDebugPrint196[] = "[FIN] group.\n";
    561 char shindouDebugPrint197[] = "Macro Level Over Error!\n";
    562 char shindouDebugPrint198[] = "Macro Level Over Error!\n";
    563 char shindouDebugPrint199[] = "Group:Undefine upper C0h command (%x)\n";
    564 char shindouDebugPrint200[] = "Group:Undefined Command\n";
    565 
    566 #endif