PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
dma_tags.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_TAGS_H__
17
#define __DMA_TAGS_H__
18
19
#include <
tamtypes.h
>
20
28
#define DMA_TAG_CNTS 0x00
30
#define DMA_TAG_REFE 0x00
32
#define DMA_TAG_CNT 0x01
34
#define DMA_TAG_NEXT 0x02
36
#define DMA_TAG_REF 0x03
38
#define DMA_TAG_REFS 0x04
40
#define DMA_TAG_CALL 0x05
42
#define DMA_TAG_RET 0x06
44
#define DMA_TAG_END 0x07
45
46
#define DMATAG(QWC,PCE,ID,IRQ,ADDR,SPR) \
47
(u64)((QWC) & 0x0000FFFF) << 0 | (u64)((PCE) & 0x00000003) << 26 | \
48
(u64)((ID) & 0x00000007) << 28 | (u64)((IRQ) & 0x00000001) << 31 | \
49
(u64)((ADDR) & 0x7FFFFFFF) << 32 | (u64)((SPR) & 0x00000001) << 63
50
51
#define PACK_DMATAG(Q,D0,W2,W3) \
52
Q->dw[0] = (u64)(D0), \
53
Q->sw[2] = (u32)(W2), \
54
Q->sw[3] = (u32)(W3)
55
57
#define DMATAG_CNT(Q,QWC,SPR,W2,W3) \
58
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_CNT,0,0,SPR), \
59
Q->sw[2] = (u32)(W2), \
60
Q->sw[3] = (u32)(W3)
61
63
#define DMATAG_CNTS(Q,QWC,SPR,W2,W3) \
64
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_CNTS,0,0,SPR), \
65
Q->sw[2] = (u32)(W2), \
66
Q->sw[3] = (u32)(W3)
67
69
#define DMATAG_NEXT(Q,QWC,ADDR,SPR,W2,W3), \
70
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_NEXT,0,ADDR,SPR), \
71
Q->sw[2] = (u32)(W2), \
72
Q->sw[3] = (u32)(W3)
73
75
#define DMATAG_END(Q,QWC,SPR,W2,W3) \
76
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_END,0,0,SPR), \
77
Q->sw[2] = (u32)(W2), \
78
Q->sw[3] = (u32)(W3)
79
81
#define DMATAG_CALL(Q,QWC,ADDR,SPR,W2,W3) \
82
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_CALL,0,ADDR,SPR), \
83
Q->sw[2] = (u32)(W2), \
84
Q->sw[3] = (u32)(W3)
85
87
#define DMATAG_RET(Q,QWC,SPR,W2,W3) \
88
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_RET,0,0,SPR), \
89
Q->sw[2] = (u32)(W2), \
90
Q->sw[3] = (u32)(W3)
91
93
#define DMATAG_REF(Q,QWC,ADDR,SPR,W2,W3) \
94
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_REF,0,ADDR,SPR), \
95
Q->sw[2] = (u32)(W2), \
96
Q->sw[3] = (u32)(W3)
97
99
#define DMATAG_REFS(Q,QWC,ADDR,SPR,W2,W3) \
100
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_REFS,0,ADDR,SPR), \
101
Q->sw[2] = (u32)(W2), \
102
Q->sw[3] = (u32)(W3)
103
105
#define DMATAG_REFE(Q,QWC,ADDR,SPR,W2,W3) \
106
Q->dw[0] = DMATAG(qwc, 0, DMA_TAG_REFE, 0, addr, spr), \
107
Q->sw[2] = (u32)(W2), \
108
Q->sw[3] = (u32)(W3)
109
110
#endif
/* __DMA_TAGS_H__ */
tamtypes.h
ee
dma
include
dma_tags.h
Generated on Thu Nov 14 2024 05:25:24 for PS2SDK by
1.9.8