dsp_interface.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2009 Dolphin Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <gccore.h>
  6. // DSPCR bits
  7. #define DSPCR_DSPRESET 0x0800 // Reset DSP
  8. #define DSPCR_ARDMA 0x0200 // ARAM DMA in progress, if set
  9. #define DSPCR_DSPINTMSK 0x0100 // * interrupt mask (RW)
  10. #define DSPCR_DSPINT 0x0080 // * interrupt active (RWC)
  11. #define DSPCR_ARINTMSK 0x0040
  12. #define DSPCR_ARINT 0x0020
  13. #define DSPCR_AIINTMSK 0x0010
  14. #define DSPCR_AIINT 0x0008
  15. #define DSPCR_HALT 0x0004 // halt DSP
  16. #define DSPCR_PIINT 0x0002 // assert DSP PI interrupt
  17. #define DSPCR_RES 0x0001 // reset DSP
  18. class IDSP {
  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. };