PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
+ Collaboration diagram for Chain:

Macros

#define PACKET2_COUNT_QWC   1 << 16
 

Functions

static void packet2_chain_set_dma_tag (dma_tag_t *tag, u32 qwc, u32 pce, u32 id, u8 irq, const u128 *addr, u8 spr)
 
static void packet2_chain_add_dma_tag (packet2_t *packet2, u32 qwc, u32 pce, enum DmaTagType id, u8 irq, const u128 *addr, u8 spr)
 
static void packet2_chain_close_tag (packet2_t *packet2)
 
static void packet2_chain_open_cnt (packet2_t *packet2, u8 irq, u32 pce, u8 spr)
 
static void packet2_chain_open_end (packet2_t *packet2, u8 irq, u32 pce)
 
static void packet2_chain_ref (packet2_t *packet2, const void *ref_data, u32 qw_length, u8 irq, u8 spr, u32 pce)
 
static void packet2_chain_next (packet2_t *packet2, const dma_tag_t *next_tag, u8 irq, u8 spr, u32 pce)
 
static void packet2_chain_refs (packet2_t *packet2, const void *ref_data, u32 qw_length, u8 irq, u8 spr, u32 pce)
 
static void packet2_chain_refe (packet2_t *packet2, const void *ref_data, u32 qw_length, u8 irq, u8 spr, u32 pce)
 
static void packet2_chain_call (packet2_t *packet2, const void *next_tag, u8 irq, u8 spr, u32 pce)
 
static void packet2_chain_ret (packet2_t *packet2, u8 irq, u32 pce)
 

Detailed Description

Chain mode related functions of libpacket2.

Macro Definition Documentation

◆ PACKET2_COUNT_QWC

#define PACKET2_COUNT_QWC   1 << 16

#include <ee/packet2/include/packet2_chain.h>

Definition at line 26 of file packet2_chain.h.

Function Documentation

◆ packet2_chain_set_dma_tag()

static void packet2_chain_set_dma_tag ( dma_tag_t tag,
u32  qwc,
u32  pce,
u32  id,
u8  irq,
const u128 *  addr,
u8  spr 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Set dma tag. For more details, check description of dma_tag_t.

Parameters
tagPointer to DMA tag to set.
qwcQword count.
pcePriority Control Enable. 0 by default.
idTag ID.
irqInterrupt Request. False by default.
addrAddress.
sprMemory/SPR Selection. False by default.

Definition at line 48 of file packet2_chain.h.

References dma_tag_t::ADDR, dma_tag_t::ID, dma_tag_t::IRQ, dma_tag_t::PCE, dma_tag_t::QWC, and dma_tag_t::SPR.

Referenced by packet2_chain_add_dma_tag().

◆ packet2_chain_add_dma_tag()

static void packet2_chain_add_dma_tag ( packet2_t packet2,
u32  qwc,
u32  pce,
enum DmaTagType  id,
u8  irq,
const u128 *  addr,
u8  spr 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add dma tag. For more details, check description of dma_tag_t. Will move current buffer position by: DWORD if packet->tte == true, QWORD if packet->tte == false

Parameters
packet2Pointer to packet.
qwcQword count. If you want to use packet2_chain_close_tag(), and count qwords automatically, set value to PACKET2_COUNT_QWC.
pcePriority Control Enable. 0 by default.
idTag ID.
irqInterrupt Request. False by default.
addrAddress.
sprMemory/SPR Selection. False by default.

Definition at line 74 of file packet2_chain.h.

References packet2_t::next, packet2_advance_next(), packet2_chain_set_dma_tag(), packet2_t::tag_opened_at, and packet2_t::tte.

Referenced by packet2_chain_call(), packet2_chain_next(), packet2_chain_open_cnt(), packet2_chain_open_end(), packet2_chain_ref(), packet2_chain_refe(), packet2_chain_refs(), and packet2_chain_ret().

◆ packet2_chain_close_tag()

static void packet2_chain_close_tag ( packet2_t packet2)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Close dma tag. In reality, get back to pointer "tag_opened_at" and fix qwc value.

Parameters
packet2Pointer to packet.

Definition at line 100 of file packet2_chain.h.

References packet2_t::next, dma_tag_t::QWC, and packet2_t::tag_opened_at.

Referenced by packet2_utils_vu_add_continue_program(), packet2_utils_vu_add_double_buffer(), packet2_utils_vu_add_end_tag(), packet2_utils_vu_add_start_program(), and packet2_utils_vu_close_unpack().

◆ packet2_chain_open_cnt()

static void packet2_chain_open_cnt ( packet2_t packet2,
u8  irq,
u32  pce,
u8  spr 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add CNT tag.

Note
packet2_chain_close_tag() required. Qwords are counted automatically. For more details, check description of dma_tag_t.
Parameters
packet2Pointer to packet.
irqInterrupt Request. False by default.
pcePriority Control Enable. 0 by default.
sprMemory/SPR Selection. False by default.

Definition at line 122 of file packet2_chain.h.

References P2_DMA_TAG_CNT, and packet2_chain_add_dma_tag().

Referenced by packet2_utils_vu_add_continue_program(), packet2_utils_vu_add_double_buffer(), packet2_utils_vu_add_start_program(), and packet2_utils_vu_open_unpack().

◆ packet2_chain_open_end()

static void packet2_chain_open_end ( packet2_t packet2,
u8  irq,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add END tag.

Note
packet2_chain_close_tag() required. Qwords are counted automatically. For more details, check description of dma_tag_t.
Don't forget about close_tag()!
Parameters
packet2Pointer to packet.
irqInterrupt Request. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 137 of file packet2_chain.h.

References P2_DMA_TAG_END, and packet2_chain_add_dma_tag().

Referenced by packet2_utils_vu_add_end_tag().

◆ packet2_chain_ref()

static void packet2_chain_ref ( packet2_t packet2,
const void *  ref_data,
u32  qw_length,
u8  irq,
u8  spr,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add REF tag.

Note
Qwords are NOT counted automatically, so there is NO need to use packet2_chain_close_tag(); For more details, check description of dma_tag_t.
Parameters
packet2Pointer to packet.
ref_dataPointer to data.
qw_lengthSize of data in qwords.
irqInterrupt Request. False by default.
sprMemory/SPR Selection. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 154 of file packet2_chain.h.

References packet2_t::next, P2_DMA_TAG_REF, and packet2_chain_add_dma_tag().

Referenced by packet2_utils_vu_add_unpack_data(), and packet2_vif_add_micro_program().

◆ packet2_chain_next()

static void packet2_chain_next ( packet2_t packet2,
const dma_tag_t next_tag,
u8  irq,
u8  spr,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add NEXT tag.

Note
packet2_chain_close_tag() required. Qwords are counted automatically. For more details, check description of dma_tag_t.
Parameters
next_tagPointer to next tag.
irqInterrupt Request. False by default.
sprMemory/SPR Selection. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 170 of file packet2_chain.h.

References packet2_t::next, P2_DMA_TAG_NEXT, and packet2_chain_add_dma_tag().

◆ packet2_chain_refs()

static void packet2_chain_refs ( packet2_t packet2,
const void *  ref_data,
u32  qw_length,
u8  irq,
u8  spr,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add REFS tag.

Note
Qwords are NOT counted automatically, so there is NO need to use packet2_chain_close_tag(); For more details, check description of dma_tag_t.
Parameters
packet2Pointer to packet.
ref_dataPointer to data.
qw_lengthSize of data in qwords.
irqInterrupt Request. False by default.
sprMemory/SPR Selection. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 188 of file packet2_chain.h.

References packet2_t::next, P2_DMA_TAG_REFS, and packet2_chain_add_dma_tag().

◆ packet2_chain_refe()

static void packet2_chain_refe ( packet2_t packet2,
const void *  ref_data,
u32  qw_length,
u8  irq,
u8  spr,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add REFE tag.

Note
Qwords are NOT counted automatically, so there is NO need to use packet2_chain_close_tag(); For more details, check description of dma_tag_t.
Parameters
packet2Pointer to packet.
ref_dataPointer to data.
qw_lengthSize of data in qwords.
irqInterrupt Request. False by default.
sprMemory/SPR Selection. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 206 of file packet2_chain.h.

References packet2_t::next, P2_DMA_TAG_REFE, and packet2_chain_add_dma_tag().

◆ packet2_chain_call()

static void packet2_chain_call ( packet2_t packet2,
const void *  next_tag,
u8  irq,
u8  spr,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add CALL tag.

Note
packet2_chain_close_tag() required. Qwords are counted automatically. For more details, check description of dma_tag_t.
Parameters
packet2Pointer to packet.
next_tagPointer to next tag.
irqInterrupt Request. False by default.
sprMemory/SPR Selection. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 223 of file packet2_chain.h.

References packet2_t::next, P2_DMA_TAG_CALL, and packet2_chain_add_dma_tag().

◆ packet2_chain_ret()

static void packet2_chain_ret ( packet2_t packet2,
u8  irq,
u32  pce 
)
inlinestatic

#include <ee/packet2/include/packet2_chain.h>

Add RET tag.

Note
packet2_chain_close_tag() required. Qwords are counted automatically. For more details, check description of dma_tag_t.
Parameters
packet2Pointer to packet.
irqInterrupt Request. False by default.
pcePriority Control Enable. 0 by default.

Definition at line 238 of file packet2_chain.h.

References P2_DMA_TAG_RET, and packet2_chain_add_dma_tag().