|
PS2SDK
PS2 Homebrew Libraries
|
Successor of packet_t. Main goal of this library is to create simple API for packet management. Library is splitted into several parts: More...
Collaboration diagram for Packet2 library:Modules | |
| Chain | |
| Chain mode related functions of libpacket2. | |
| Types | |
| Structures and enums used in libpacket2. | |
| Utils | |
| Useful functions and examples for libpacket2. | |
| VIF | |
| VIF related functions of libpacket2. | |
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! |
| 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! |
| 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::next, 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.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
#include <ee/packet2/include/packet2.h>
Fill to align to 96bits
Definition at line 164 of file packet2.h.
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.
Referenced by packet2_vif_pad128().
| void packet2_print | ( | packet2_t * | packet2, |
| u32 | qw_count | ||
| ) |
| void packet2_print_qw_count | ( | packet2_t * | packet2 | ) |
#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, 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().
|
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.