memmap.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:3k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef __MEMMAP_H
  2. #define __MEMMAP_H
  3. //
  4. // GLOBAL mapping
  5. #define ROM_BASE_CACHED 0x88000000
  6. #define ROM_BASE_UNCACHED 0xa8000000
  7. #define SDRAM_BASE_CACHED 0x80000000
  8. #define SDRAM_BASE_UNCACHED 0xa0000000
  9. #define DATA_RAM_BASE           0xbfff0000
  10. #define ROM_BASE ROM_BASE_CACHED
  11. #define SDRAM_BASE SDRAM_BASE_CACHED
  12. /*
  13. ** anchors
  14. */
  15. #include "types.h"
  16. #include "regmap.h"
  17. #define MEM_SUPYA (regs0->supya)
  18. #define MEM_EVBYA (regs0->evbya)
  19. #define MEM_IOPYA (regs0->iopya)
  20. #ifdef DVD728
  21. // 728
  22. extern UINT16 dsp24ya, audya, pcmya;
  23. #define MEM_DSP24YA dsp24ya
  24. #define MEM_AUDYA audya
  25. #define MEM_PCMYA pcmya
  26. #define MEM_CDYA (regs0->cdwya)
  27. #define MEM_EVBYA_LIMIT (regs0->evbya_limit)
  28. #else
  29. // 720
  30. #define MEM_EABYA (regs0->eabya)
  31. #define MEM_DSP24YA     (regs0->dsp24ya)
  32. #define MEM_AUDYA       (regs0->audya)
  33. #define MEM_PCMYA       (regs0->pcmya)
  34. #define MEM_EVBYA2 (regs0->evbya2)
  35. #define MEM_CDYA (regs0->cdya)
  36. #endif
  37. /*
  38. ** starts
  39. */
  40. #define CBV_YS MEM_CDYA
  41. #define OBV_YS MEM_OSDYA
  42. #define SBV_YS MEM_SUPYA
  43. #define DSP24_YS MEM_DSP24YA
  44. #define PCM_YS MEM_PCMYA
  45. #define AWV_YS  MEM_AUDYA
  46. #ifdef DVD728
  47. #define VBV_YS MEM_EVBYA
  48. #else
  49. #define VBV_YS          0
  50. #define ABV_YS          MEM_EABYA
  51. #endif
  52. /*
  53. ** ends
  54. */
  55. //#define VBV_YE (MEM_EABYA)
  56. #define ABV_YE (MEM_CDYA)
  57. #define CBV_YE (MEM_CDYA+CBV_H)
  58. #define OBV_YE (MEM_SUPYA)
  59. #define SBV_YE (MEM_DSP24YA)
  60. //#define DSP24_YE (MEM_DSP16YA)
  61. #define IOP_YE (MEM_PCMYA)
  62. #define PCM_YE  (MEM_AUDYA)
  63. /*
  64. ** HEIGHT
  65. */
  66. #define VBV_H (VBV_YE - 0)
  67. #define ABV_H (ABV_YE - ABV_YS)
  68. #define SBV_H (SBV_YE - SBV_YS)
  69. #define CBV_H (regs0->cdwya_limit)
  70. #define OBV_H (OBV_YE - OBV_YS)
  71. #ifdef DVD728
  72. #undef VBV_H
  73. #define VBV_H (MEM_EVBYA_LIMIT)
  74. #endif
  75. #define get_cbv_ptr(x,y) ((BYTE *)(SDRAM_BASE+1024*(CBV_YS+(y))+(x)))
  76. #define get_dram_ptr()     ((BYTE *)(DATA_RAM_BASE))
  77. #define get_cbv_ptr_uc(x,y) ((BYTE *)(SDRAM_BASE_UNCACHED+1024*(CBV_YS+(y))+(x)))
  78. #define get_sbv_ptr(x,y) ((BYTE *)(SDRAM_BASE+1024*(SBV_YS+(y))+(x)))
  79. #define get_dsp_im_ptr(x,y) ((BYTE *)(SDRAM_BASE+1024*(DSP24_YS+(y))+(x)))
  80. #define get_dsp_aud_ptr(x,y) ((BYTE *)(SDRAM_BASE+1024*(AWV_YS+(y))+(x)))
  81. #define get_dsp_pcm_ptr(x,y) ((BYTE *)(SDRAM_BASE+1024*(PCM_YS+(y))+(x)))
  82. #define get_dsp_im_uptr(x,y) ((BYTE *)(SDRAM_BASE_UNCACHED+1024*(DSP24_YS+(y))+(x)))
  83. #define get_dsp_aud_uptr(x,y) ((BYTE *)(SDRAM_BASE_UNCACHED+1024*(AWV_YS+(y))+(x)))
  84. #define get_dsp_pcm_uptr(x,y) ((BYTE *)(SDRAM_BASE_UNCACHED+1024*(PCM_YS+(y))+(x)))
  85. #endif/*__MEMMAP_H*/