Zelda.txt 730 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. CPU:
  2. ---------------------------------------------------------------------------------------
  3. void DSPSendCommands2(_pBuffer, _NumberOfMessages, _StartWork)
  4. {
  5. while (!DSP_Running_Check());
  6. OldInterrupts = OSDisableInterrupts();
  7. if (DSPCheckMailToDSP() != 0)
  8. {
  9. OSRestoreInterrupts();
  10. return -1;
  11. }
  12. DSPSendMailToDSP(_NumberOfMessages)
  13. DSPAssertInt()
  14. while (DSPCheckMailToDSP() != 0) {}
  15. if (_NumberOfMessages == 0)
  16. _NumberOfMessages = 1
  17. if (_StartWork != 0)
  18. {
  19. r28 = DSPStartWork(*_pBuffer, _StartWork)
  20. }
  21. _StartWork = 0
  22. while(Count != _NumberOfMessages)
  23. {
  24. DSPSendMailToDSP(Buffer[Count])
  25. while (DSPCheckMailToDSP() != 0) {}
  26. Count++
  27. }
  28. OSRestoreInterrupts(OldInterrupts)
  29. return r28;
  30. }