New Wiimote/GCPad: Fix segfault prob in Linux.(thanks glennrics) Some minor changes...
[dolphin.git] / docs / DSP / Zelda.txt
blobb07590f4039f3201943923145e7e133ba12cbcac
1 CPU:
2 ---------------------------------------------------------------------------------------
4 void DSPSendCommands2(_pBuffer, _NumberOfMessages, _StartWork)
7         while (!DSP_Running_Check());
8         
9         OldInterrupts = OSDisableInterrupts();
11         if (DSPCheckMailToDSP() != 0)
12         {
13                 OSRestoreInterrupts();
14                 return -1;
15         }
17         DSPSendMailToDSP(_NumberOfMessages)
18         
19         DSPAssertInt()
21         while (DSPCheckMailToDSP() != 0) {}
23         if (_NumberOfMessages == 0)
24                 _NumberOfMessages = 1
27         if (_StartWork != 0)
28         {
29                 r28 = DSPStartWork(*_pBuffer, _StartWork)                               
30         }
31         _StartWork = 0
34         while(Count != _NumberOfMessages)
35         {
36                 DSPSendMailToDSP(Buffer[Count])
37                 while (DSPCheckMailToDSP() != 0) {}
38                 Count++
39         }
41         OSRestoreInterrupts(OldInterrupts)
43         return r28;