dspregs.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2010 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #define DSP_REG_AR0 0x00 // address registers
  5. #define DSP_REG_AR1 0x01
  6. #define DSP_REG_AR2 0x02
  7. #define DSP_REG_AR3 0x03
  8. #define DSP_REG_IX0 0x04 // indexing registers (actually, mostly used as increments)
  9. #define DSP_REG_IX1 0x05
  10. #define DSP_REG_IX2 0x06
  11. #define DSP_REG_IX3 0x07
  12. #define DSP_REG_WR0 \
  13. 0x08 // address wrapping registers. should be initialized to 0xFFFF if not used.
  14. #define DSP_REG_WR1 0x09
  15. #define DSP_REG_WR2 0x0a
  16. #define DSP_REG_WR3 0x0b
  17. #define DSP_REG_ST0 0x0c // stacks.
  18. #define DSP_REG_ST1 0x0d
  19. #define DSP_REG_ST2 0x0e
  20. #define DSP_REG_ST3 0x0f
  21. #define DSP_REG_CR 0x12 // Seems to be the top 8 bits of LRS/SRS.
  22. #define DSP_REG_SR 0x13
  23. #define DSP_REG_PRODL 0x14 // product.
  24. #define DSP_REG_PRODM 0x15
  25. #define DSP_REG_PRODH 0x16
  26. #define DSP_REG_PRODM2 0x17
  27. #define DSP_REG_AXL0 0x18
  28. #define DSP_REG_AXL1 0x19
  29. #define DSP_REG_AXH0 0x1a
  30. #define DSP_REG_AXH1 0x1b
  31. #define DSP_REG_ACC0 0x1c // accumulator (global)
  32. #define DSP_REG_ACC1 0x1d
  33. #define DSP_REG_ACL0 0x1c // Low accumulator
  34. #define DSP_REG_ACL1 0x1d
  35. #define DSP_REG_ACM0 0x1e // Mid accumulator
  36. #define DSP_REG_ACM1 0x1f
  37. #define DSP_REG_ACH0 0x10 // Sign extended 8 bit register 0
  38. #define DSP_REG_ACH1 0x11 // Sign extended 8 bit register 1