PS2SDK
PS2 Homebrew Libraries
|
Modules | |
Chain | |
Types | |
Utils | |
VIF | |
Functions | |
packet2_t * | packet2_create (u16 qwords, enum Packet2Type type, enum Packet2Mode mode, u8 tte) |
packet2_t * | packet2_create_from (qword_t *base, qword_t *next, u16 qwords, enum Packet2Type type, enum Packet2Mode mode, u8 tte) |
void | packet2_free (packet2_t *packet2) |
void | packet2_reset (packet2_t *packet2, u8 clear_mem) |
static void | packet2_update (packet2_t *packet2, qword_t *qw) |
static void | packet2_advance_next (packet2_t *packet2, u32 i) |
static void | packet2_add_u128 (packet2_t *packet2, const u128 val) |
static void | packet2_add_s64 (packet2_t *packet2, const s64 val) |
static void | packet2_add_2x_s64 (packet2_t *packet2, const s64 v1, const s64 v2) |
static void | packet2_add_s128 (packet2_t *packet2, const s128 val) |
static void | packet2_add_u64 (packet2_t *packet2, const u64 val) |
static void | packet2_add_u32 (packet2_t *packet2, const u32 val) |
static void | packet2_add_s32 (packet2_t *packet2, const s32 val) |
static void | packet2_add_float (packet2_t *packet2, const float val) |
static void | packet2_add_data (packet2_t *packet2, void *t_data, u32 t_size) |
static void | packet2_pad96 (packet2_t *packet2, const u32 val) |
static void | packet2_pad128 (packet2_t *packet2, const u32 val) |
void | packet2_print (packet2_t *packet2, u32 qw_count) |
void | packet2_print_qw_count (packet2_t *packet2) |
void | packet2_add (packet2_t *a, packet2_t *b) |
static u32 | packet2_get_qw_count (packet2_t *packet2) |
static u8 | packet2_doesnt_have_even_number_of_quads (packet2_t *packet2) |
static u8 | packet2_is_dma_tag_opened (packet2_t *packet2) |
static u8 | packet2_is_vif_code_opened (packet2_t *packet2) |
Successor of packet_t. Main goal of this library is to create simple API for packet management. Library is splitted into several parts:
packet2_t * packet2_create | ( | u16 | qwords, |
enum Packet2Type | type, | ||
enum Packet2Mode | mode, | ||
u8 | tte | ||
) |
#include <ee/packet2/include/packet2.h>
Allocate new packet2.
qwords | Maximum data size in qwords (128bit). |
type | Memory mapping type. |
mode | Packet mode. Normal or chain. |
tte | Tag transfer enable. Used only for CHAIN mode! If >0 transfer tag is set during packet sending and add_dma_tag() (so also every open_tag()) will move buffer by DWORD, so remember to align memory! |
Definition at line 25 of file packet2.c.
References packet2_t::max_qwords_count, packet2_t::mode, packet2_t::next, P2_TYPE_UNCACHED, P2_TYPE_UNCACHED_ACCL, packet2_t::tag_opened_at, packet2_t::tte, packet2_t::type, and packet2_t::vif_code_opened_at.
packet2_t * packet2_create_from | ( | qword_t * | base, |
qword_t * | next, | ||
u16 | qwords, | ||
enum Packet2Type | type, | ||
enum Packet2Mode | mode, | ||
u8 | tte | ||
) |
#include <ee/packet2/include/packet2.h>
Create new packet2 with given data pointer.
base | Pointer to base (start of buffer). |
next | Pointer to next (current position of buffer). |
qwords | Maximum data size in qwords (128bit). |
type | Memory mapping type. |
mode | Packet mode. Normal or chain (so also vif/vu). |
tte | Tag transfer enable. Used only for CHAIN mode! If >0 transfer tag is set during packet sending and add_dma_tag() (so also every open_tag()) will move buffer by DWORD, so remember to align memory! |
Definition at line 60 of file packet2.c.
References packet2_t::max_qwords_count, packet2_t::mode, packet2_t::next, P2_TYPE_UNCACHED, P2_TYPE_UNCACHED_ACCL, packet2_t::tte, and packet2_t::type.
void packet2_free | ( | packet2_t * | packet2 | ) |
void packet2_reset | ( | packet2_t * | packet2, |
u8 | clear_mem | ||
) |
#include <ee/packet2/include/packet2.h>
Reset packet. Move next pointer back to base pointer, Make all "openedAt" vars to NULL Do memset on data if required.
packet2 | Pointer to packet. |
clear_mem | If >0, data is cleared via memset(). SLOW! |
Definition at line 88 of file packet2.c.
References packet2_t::max_qwords_count, packet2_t::next, packet2_t::tag_opened_at, and packet2_t::vif_code_opened_at.
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Update current position of packet buffer. Useful with drawlib functions.
Definition at line 89 of file packet2.h.
References packet2_t::next.
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Move "next" pointer forward.
Definition at line 96 of file packet2.h.
References packet2_t::next.
Referenced by packet2_add_float(), packet2_add_s32(), packet2_add_s64(), packet2_add_u32(), packet2_add_u64(), and packet2_chain_add_dma_tag().
|
inlinestatic |
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Definition at line 108 of file packet2.h.
References packet2_t::next, and packet2_advance_next().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Definition at line 127 of file packet2.h.
References packet2_t::next, and packet2_advance_next().
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Definition at line 134 of file packet2.h.
References packet2_t::next, and packet2_advance_next().
Referenced by packet2_pad128(), packet2_pad96(), packet2_vif_base(), packet2_vif_flush(), packet2_vif_flusha(), packet2_vif_flushe(), packet2_vif_itop(), packet2_vif_mark(), packet2_vif_mpg(), packet2_vif_mscal(), packet2_vif_mscalf(), packet2_vif_mscnt(), packet2_vif_mskpath3(), packet2_vif_nop(), packet2_vif_offset(), packet2_vif_open_direct(), packet2_vif_open_unpack(), packet2_vif_stcol(), packet2_vif_stcycl(), packet2_vif_stmask(), packet2_vif_stmod(), and packet2_vif_strow().
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Definition at line 141 of file packet2.h.
References packet2_t::next, and packet2_advance_next().
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Definition at line 148 of file packet2.h.
References packet2_t::next, and packet2_advance_next().
|
inlinestatic |
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Fill to align to 96bits
Definition at line 164 of file packet2.h.
References packet2_t::next, and packet2_add_u32().
Referenced by packet2_vif_pad96().
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Fill to align to 128bits
Definition at line 173 of file packet2.h.
References packet2_t::next, and packet2_add_u32().
Referenced by packet2_vif_pad128().
void packet2_print | ( | packet2_t * | packet2, |
u32 | qw_count | ||
) |
#include <ee/packet2/include/packet2.h>
Print data of packet.
packet2 | Pointer to packet. |
clear_mem | Count of qwords, type 0 for all. |
Definition at line 108 of file packet2.c.
References packet2_t::next.
void packet2_print_qw_count | ( | packet2_t * | packet2 | ) |
#include <ee/packet2/include/packet2.h>
Print amount of qwords of packet.
packet2 | Pointer to packet. |
Definition at line 127 of file packet2.c.
References packet2_get_qw_count().
#include <ee/packet2/include/packet2.h>
Copy data from b packet into a packet with memcpy()
Definition at line 101 of file packet2.c.
References packet2_t::max_qwords_count, packet2_t::next, and packet2_get_qw_count().
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Returns count of added qwords into packet.
Definition at line 200 of file packet2.h.
References packet2_t::next.
Referenced by packet2_add(), and packet2_print_qw_count().
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
True if packet doesnt have even number of quads.
Definition at line 203 of file packet2.h.
References packet2_t::next.
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
True if dma tag is opened.
Definition at line 206 of file packet2.h.
References packet2_t::tag_opened_at.
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
True if DIRECT/UNPACK is opened.
Definition at line 209 of file packet2.h.
References packet2_t::vif_code_opened_at.