dsp_interface.h 1008 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2009 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <gccore.h>
  5. // DSPCR bits
  6. #define DSPCR_DSPRESET 0x0800 // Reset DSP
  7. #define DSPCR_ARDMA 0x0200 // ARAM DMA in progress, if set
  8. #define DSPCR_DSPINTMSK 0x0100 // * interrupt mask (RW)
  9. #define DSPCR_DSPINT 0x0080 // * interrupt active (RWC)
  10. #define DSPCR_ARINTMSK 0x0040
  11. #define DSPCR_ARINT 0x0020
  12. #define DSPCR_AIINTMSK 0x0010
  13. #define DSPCR_AIINT 0x0008
  14. #define DSPCR_HALT 0x0004 // halt DSP
  15. #define DSPCR_PIINT 0x0002 // assert DSP PI interrupt
  16. #define DSPCR_RES 0x0001 // reset DSP
  17. class IDSP
  18. {
  19. public:
  20. virtual ~IDSP() {}
  21. virtual void Init() = 0;
  22. virtual void Reset() = 0;
  23. virtual u32 CheckMailTo() = 0;
  24. virtual void SendMailTo(u32 mail) = 0;
  25. // Yeah, yeah, having a method here makes this not a pure interface - but
  26. // the implementation does nothing but calling the virtual methods above.
  27. void SendTask(void* addr, u16 iram_addr, u16 len, u16 start);
  28. };