PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
dma_tags.h File Reference
#include <tamtypes.h>
+ Include dependency graph for dma_tags.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DMA_TAG_CNTS   0x00
 
#define DMA_TAG_REFE   0x00
 
#define DMA_TAG_CNT   0x01
 
#define DMA_TAG_NEXT   0x02
 
#define DMA_TAG_REF   0x03
 
#define DMA_TAG_REFS   0x04
 
#define DMA_TAG_CALL   0x05
 
#define DMA_TAG_RET   0x06
 
#define DMA_TAG_END   0x07
 
#define DMATAG(QWC, PCE, ID, IRQ, ADDR, SPR)
 
#define PACK_DMATAG(Q, D0, W2, W3)
 
#define DMATAG_CNT(Q, QWC, SPR, W2, W3)
 
#define DMATAG_CNTS(Q, QWC, SPR, W2, W3)
 
#define DMATAG_NEXT(Q, QWC, ADDR, SPR, W2, W3)
 
#define DMATAG_END(Q, QWC, SPR, W2, W3)
 
#define DMATAG_CALL(Q, QWC, ADDR, SPR, W2, W3)
 
#define DMATAG_RET(Q, QWC, SPR, W2, W3)
 
#define DMATAG_REF(Q, QWC, ADDR, SPR, W2, W3)
 
#define DMATAG_REFS(Q, QWC, ADDR, SPR, W2, W3)
 
#define DMATAG_REFE(Q, QWC, ADDR, SPR, W2, W3)
 

Detailed Description

DMA tags

Definition in file dma_tags.h.

Macro Definition Documentation

◆ DMA_TAG_CNTS

#define DMA_TAG_CNTS   0x00

T = location of qwords D = next dmatag to be read QWC = quadword count for dmatag T=QWC D=QWC+1 MADR => STADR

Definition at line 28 of file dma_tags.h.

◆ DMA_TAG_REFE

#define DMA_TAG_REFE   0x00

T=ADDR then END

Definition at line 30 of file dma_tags.h.

◆ DMA_TAG_CNT

#define DMA_TAG_CNT   0x01

T=QWC D=QWC+1

Definition at line 32 of file dma_tags.h.

◆ DMA_TAG_NEXT

#define DMA_TAG_NEXT   0x02

T=QWC D=ADDR

Definition at line 34 of file dma_tags.h.

◆ DMA_TAG_REF

#define DMA_TAG_REF   0x03

D=D+1 T=ADDR

Definition at line 36 of file dma_tags.h.

◆ DMA_TAG_REFS

#define DMA_TAG_REFS   0x04

.. + stall ctrl

Definition at line 38 of file dma_tags.h.

◆ DMA_TAG_CALL

#define DMA_TAG_CALL   0x05

T=QWC D=ADDR QWC+1 => ASR0

Definition at line 40 of file dma_tags.h.

◆ DMA_TAG_RET

#define DMA_TAG_RET   0x06

T=QWC (ASR0 => D) if !ASR0 then END

Definition at line 42 of file dma_tags.h.

◆ DMA_TAG_END

#define DMA_TAG_END   0x07

T=QWC then END

Definition at line 44 of file dma_tags.h.

◆ DMATAG

#define DMATAG (   QWC,
  PCE,
  ID,
  IRQ,
  ADDR,
  SPR 
)
Value:
(u64)((QWC) & 0x0000FFFF) << 0 | (u64)((PCE) & 0x00000003) << 26 | \
(u64)((ID) & 0x00000007) << 28 | (u64)((IRQ) & 0x00000001) << 31 | \
(u64)((ADDR) & 0x7FFFFFFF) << 32 | (u64)((SPR) & 0x00000001) << 63

Definition at line 46 of file dma_tags.h.

◆ PACK_DMATAG

#define PACK_DMATAG (   Q,
  D0,
  W2,
  W3 
)
Value:
Q->dw[0] = (u64)(D0), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)

Definition at line 51 of file dma_tags.h.

◆ DMATAG_CNT

#define DMATAG_CNT (   Q,
  QWC,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_CNT,0,0,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_CNT
Definition dma_tags.h:32

Insert before qword block, and add dmatag after qword block to continue

Definition at line 57 of file dma_tags.h.

◆ DMATAG_CNTS

#define DMATAG_CNTS (   Q,
  QWC,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_CNTS,0,0,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_CNTS
Definition dma_tags.h:28

Insert before qword block, and add dmatag after qword block to continue

Definition at line 63 of file dma_tags.h.

◆ DMATAG_NEXT

#define DMATAG_NEXT (   Q,
  QWC,
  ADDR,
  SPR,
  W2,
  W3 
)
Value:
, \
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_NEXT,0,ADDR,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_NEXT
Definition dma_tags.h:34

Insert before qword block, and add dmatag at addr to continue

Definition at line 69 of file dma_tags.h.

◆ DMATAG_END

#define DMATAG_END (   Q,
  QWC,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_END,0,0,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_END
Definition dma_tags.h:44

Insert before final qword block, or by itself to end transfer

Definition at line 75 of file dma_tags.h.

◆ DMATAG_CALL

#define DMATAG_CALL (   Q,
  QWC,
  ADDR,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_CALL,0,ADDR,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_CALL
Definition dma_tags.h:40

Insert before qword block, and add dmatag at qword after qwc to be saved (up to 2)

Definition at line 81 of file dma_tags.h.

◆ DMATAG_RET

#define DMATAG_RET (   Q,
  QWC,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_RET,0,0,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_RET
Definition dma_tags.h:42

Insert before qword block, and continues with saved dmatag

Definition at line 87 of file dma_tags.h.

◆ DMATAG_REF

#define DMATAG_REF (   Q,
  QWC,
  ADDR,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_REF,0,ADDR,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_REF
Definition dma_tags.h:36

Insert anywhere, qwc at addr is sent, reads next qword to continue

Definition at line 93 of file dma_tags.h.

◆ DMATAG_REFS

#define DMATAG_REFS (   Q,
  QWC,
  ADDR,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(QWC,0,DMA_TAG_REFS,0,ADDR,SPR), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_REFS
Definition dma_tags.h:38

Insert anywhere, qwc at addr is sent, reads next qword to continue

Definition at line 99 of file dma_tags.h.

◆ DMATAG_REFE

#define DMATAG_REFE (   Q,
  QWC,
  ADDR,
  SPR,
  W2,
  W3 
)
Value:
Q->dw[0] = DMATAG(qwc, 0, DMA_TAG_REFE, 0, addr, spr), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)
#define DMA_TAG_REFE
Definition dma_tags.h:30

Insert anywhere, qwc at addr is sent, then ends transfer

Definition at line 105 of file dma_tags.h.