Builder of a DMA packet of GIF data, with DMA tags, GIF tags, and optional VIF DIRECT codes.
More...
#include <dmapacket.h>
|
| void | OpenDmaTag () |
| | Close the DMA tag being filled and open a new one at the cursor.
|
| void | CloseDmaTag (int nId, unsigned int nAddress, int nQwc) |
| | Close the DMA tag being filled.
|
| void | CloseGifTag (int bEop, int nLoops) |
| | Close the GIF tag being filled.
|
| void | OpenGifTag (int nFlg, int nRegs, unsigned long long nRegList, int nPrim) |
| | Close the GIF tag being filled and open a new one at the cursor.
|
| void | Init (DmaQuadword *pBase, int nChannel, int bVif) |
| | Set the buffer and the channel, and empty the packet.
|
| void | Reset () |
| | Empty the packet.
|
| void | Wait () |
| | Wait for the channel to stop.
|
| unsigned int | Close (Mode eMode, unsigned int nAddress) |
| | Close the packet and program the channel's registers for it.
|
| void | Send (Mode eMode, unsigned int nAddress) |
| | Close the packet and start the transfer.
|
| DmaQuadword * | GetBase () const |
| void | SetBase (DmaQuadword *pBase) |
| DmaQuadword * | GetCursor () const |
| void | SetCursor (DmaQuadword *pCursor) |
| void | Advance (int nQuadwords=1) |
| | Move the cursor past quadwords written in place.
|
| DmaQuadword * | GetGifTag () const |
|
| static DmaPacket & | shared () |
| | Report the instance at the start of the scratchpad.
|
Builder of a DMA packet of GIF data, with DMA tags, GIF tags, and optional VIF DIRECT codes.
The class has no virtual and no RTTI, and its name is inferred. The renderer keeps its one instance at the start of the scratchpad and fills the two halves after it in turn.
◆ Mode
How Close() ends the packet and how the channel transfers it.
| Enumerator |
|---|
| kModeNormal | One block of quadwords from the base.
|
| kModeChain | A chain of DMA tags from the base.
|
| kModeChainTagged | A chain of DMA tags, with each tag transferred as well.
|
◆ shared()
Report the instance at the start of the scratchpad.
- Returns
- The packet.
◆ OpenDmaTag()
| void DmaPacket::OpenDmaTag |
( |
| ) |
|
Close the DMA tag being filled and open a new one at the cursor.
- Ghidra address:
- NTSC-U/C: 0x00211fb0
- Ghidra address:
- PAL: 0x0021adc8
◆ CloseDmaTag()
| void DmaPacket::CloseDmaTag |
( |
int | nId, |
|
|
unsigned int | nAddress, |
|
|
int | nQwc ) |
Close the DMA tag being filled.
The open GIF tag is closed first with its end-of-packet bit.
- Parameters
-
| nId | The tag ID. |
| nAddress | The tag's address field. |
| nQwc | The quadwords the tag covers, or 0 for those written since it was opened. |
- Ghidra address:
- NTSC-U/C: 0x00211ff0
- Ghidra address:
- PAL: 0x0021ae08
◆ CloseGifTag()
| void DmaPacket::CloseGifTag |
( |
int | bEop, |
|
|
int | nLoops ) |
Close the GIF tag being filled.
The loop count comes from the quadwords written since the tag was opened unless one is given. An open VIF DIRECT code grows by the tag's quadwords.
- Parameters
-
| bEop | Whether the tag ends the GIF packet, which also ends the VIF DIRECT code. |
| nLoops | The loop count, or 0 to count the quadwords written. |
- Ghidra address:
- NTSC-U/C: 0x002120a0
- Ghidra address:
- PAL: 0x0021aeb8
◆ OpenGifTag()
| void DmaPacket::OpenGifTag |
( |
int | nFlg, |
|
|
int | nRegs, |
|
|
unsigned long long | nRegList, |
|
|
int | nPrim ) |
Close the GIF tag being filled and open a new one at the cursor.
A packet sent through VIF opens a VIF DIRECT code first when none is open.
- Parameters
-
| nFlg | The data format of the tag. |
| nRegs | The number of register descriptors. |
| nRegList | The register descriptors. |
| nPrim | The PRIM value, or 0 for none. |
- Ghidra address:
- NTSC-U/C: 0x002121b0
- Ghidra address:
- PAL: 0x0021afc8
◆ Init()
| void DmaPacket::Init |
( |
DmaQuadword * | pBase, |
|
|
int | nChannel, |
|
|
int | bVif ) |
Set the buffer and the channel, and empty the packet.
- Parameters
-
| pBase | The buffer. |
| nChannel | The DMA channel. |
| bVif | Whether the channel is a VIF channel. |
- Ghidra address:
- NTSC-U/C: 0x002122a8
- Ghidra address:
- PAL: 0x0021b0c0
◆ Reset()
| void DmaPacket::Reset |
( |
| ) |
|
Empty the packet.
- Ghidra address:
- NTSC-U/C: 0x002122d0
- Ghidra address:
- PAL: 0x0021b0e8
◆ Wait()
Wait for the channel to stop.
- Ghidra address:
- NTSC-U/C: 0x002122e8
- Ghidra address:
- PAL: 0x0021b100
◆ Close()
| unsigned int DmaPacket::Close |
( |
Mode | eMode, |
|
|
unsigned int | nAddress ) |
Close the packet and program the channel's registers for it.
- Parameters
-
| eMode | How the packet is ended and sent. |
| nAddress | The main memory address of a scratchpad transfer, or 0. |
- Returns
- The CHCR value that starts the transfer.
- Ghidra address:
- NTSC-U/C: 0x00212328
- Ghidra address:
- PAL: 0x0021b140
◆ Send()
| void DmaPacket::Send |
( |
Mode | eMode, |
|
|
unsigned int | nAddress ) |
Close the packet and start the transfer.
- Parameters
-
| eMode | How the packet is ended and sent. |
| nAddress | The main memory address of a scratchpad transfer, or 0. |
- Ghidra address:
- NTSC-U/C: 0x00212500
- Ghidra address:
- PAL: 0x0021b318
◆ GetBase()
- Returns
- The first quadword of the packet.
◆ SetBase()
- Parameters
-
| pBase | The first quadword of the packet. |
◆ GetCursor()
- Returns
- The next quadword to write.
◆ SetCursor()
- Parameters
-
| pCursor | The next quadword to write. |
◆ Advance()
| void DmaPacket::Advance |
( |
int | nQuadwords = 1 | ) |
|
|
inline |
Move the cursor past quadwords written in place.
- Parameters
-
| nQuadwords | The number of quadwords. |
◆ GetGifTag()
- Returns
- The GIF tag being filled, or null.
The documentation for this class was generated from the following file: