PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
dma_registers.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# (c) 2005 Naomi Peori <naomi@peori.ca>
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
16
#ifndef __DMA_REGISTERS_H__
17
#define __DMA_REGISTERS_H__
18
19
#include <
tamtypes.h
>
20
22
#define DMA_REG_CTRL (volatile u32 *)0x1000E000
24
#define DMA_REG_STAT (volatile u32 *)0x1000E010
26
#define DMA_REG_PCR (volatile u32 *)0x1000E020
28
#define DMA_REG_SQWC (volatile u32 *)0x1000E030
30
#define DMA_REG_RBSR (volatile u32 *)0x1000E040
32
#define DMA_REG_RBOR (volatile u32 *)0x1000E050
34
#define DMA_REG_STADR (volatile u32 *)0x1000E060
36
#define DMA_REG_ENABLER (volatile u32 *)0x1000F520
38
#define DMA_REG_ENABLEW (volatile u32 *)0x1000F590
39
41
#define DMAE_DISABLE 0
42
#define DMAE_ENABLE 1
43
45
#define RELE_OFF 0
46
#define RELE_ON 1
47
49
#define MFD_OFF 0
50
#define MFD_RES 1
51
#define MFD_VIF 2
52
#define MFD_GIF 3
53
55
#define STS_UNSPEC 0
56
#define STS_SIF 1
57
#define STS_SPR 2
58
#define STS_IPU 3
59
61
#define STD_OFF 0
62
#define STD_VIF 1
63
#define STD_GIF 2
64
#define STD_SIF 3
65
67
#define RCYC_8 0
68
#define RCYC_16 1
69
#define RCYC_32 2
70
#define RCYC_64 3
71
#define RCYC_128 4
72
#define RCYC_256 5
73
74
#define DMA_SET_CTRL(DMAE,RELE,MFD,STS,STD,RCYC) \
75
(u32)(A & 0x00000001) << 0 | (u32)(RELE & 0x00000001) << 1 | \
76
(u32)(MFD & 0x00000003) << 2 | (u32)(STS & 0x00000003) << 4 | \
77
(u32)(STD & 0x00000003) << 6 | (u32)(RCYC & 0x00000007) << 8
78
79
#define DMA_SET_STAT(CIS,SIS,MEIS,BEIS,CIM,SIM,MEIM) \
80
(u32)((CIS) & 0x000003FF) << 0 | (u32)((SIS) & 0x00000001) << 13 | \
81
(u32)((MEIS) & 0x00000001) << 14 | (u32)((BEIS) & 0x00000001) << 15 | \
82
(u32)((CIM) & 0x000003FF) << 16 | (u32)((SIM) & 0x00000001) << 29 | \
83
(u32)((MEIM) & 0x00000001) << 30
84
85
#define DMA_SET_PCR(CPCOND,CDE,PCE) \
86
(u32)((CPCOND) & 0x000003FF) << 0 | (u32)((CDE) & 0x000003FF) << 16 | \
87
(u32)((PCE) & 0x00000001) << 31
88
89
#define DMA_SET_SQWC(SQWC,TQWC) \
90
(u32)((SQWC) & 0x000000FF) << 0 | (u32)((TQWC) & 0x000000FF) << 16
91
92
#define DMA_SET_RBOR(ADDR) (u32)((ADDR) & 0x00007FFF)
93
94
#define DMA_SET_RBSR(RMSK) (u32)((RMSK) & 0x00007FFF)
95
96
#define DMA_SET_STADR(ADDR) (u32)((ADDR) & 0x00007FFF)
97
98
#define DMA_SET_ENABLEW(A) (u32)((A) & 0x00000001) << 16
99
100
#define DMA_SET_ENABLER(A) (u32)((A) & 0x00000001) << 16
101
103
#define DMA_SET_CHCR(DIR,MODE,ASP,TTE,TIE,STR,TAG) \
104
(u32)((DIR) & 0x00000001) << 0 | (u32)((MODE) & 0x00000003) << 2 | \
105
(u32)((ASP) & 0x00000003) << 4 | (u32)((TTE ) & 0x00000001) << 6 | \
106
(u32)((TIE) & 0x00000001) << 7 | (u32)((STR ) & 0x00000001) << 8 | \
107
(u32)((TAG) & 0x0000FFFF) << 16
108
109
#define DMA_SET_MADR(ADDR,SPR) \
110
(u32)((ADDR) & 0x7FFFFFFF) << 0 | (u32)((SPR) & 0x00000001) << 31
111
112
#define DMA_SET_TADR(ADDR,SPR) \
113
(u32)((ADDR) & 0x7FFFFFFF) << 0 | (u32)((SPR) & 0x00000001) << 31
114
115
#define DMA_SET_ASR0(ADDR,SPR) \
116
(u32)((ADDR) & 0x7FFFFFFF) << 0 | (u32)((SPR) & 0x00000001) << 31
117
118
#define DMA_SET_ASR1(ADDR,SPR) \
119
(u32)((ADDR) & 0x7FFFFFFF) << 0 | (u32)((SPR) & 0x00000001) << 31
120
121
#define DMA_SET_SADR(ADDR) (u32)((ADDR) & 0x00003FFF)
122
123
#define DMA_SET_QWC(QWC) (u32)((QWC) & 0x0000FFFF)
124
125
#endif
/* __DMA_REGISTERS_H__ */
tamtypes.h
ee
dma
include
dma_registers.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8