PS2SDK
PS2 Homebrew Libraries
|
Macros | |
#define | MAKE_VIF_CODE(_immediate, _num, _cmd, _irq) ((u32)(_immediate) | ((u32)(_num) << 16) | ((u32)(_cmd) << 24) | ((u32)(_irq) << 31)) |
Functions | |
static void | packet2_vif_open_unpack (packet2_t *packet2, enum UnpackMode mode, u32 vuAddr, u8 dblBuffered, u8 masked, u8 usigned, u8 irq) |
static void | packet2_vif_close_unpack_manual (packet2_t *packet2, u32 unpack_num) |
u32 | packet2_vif_close_unpack_auto (packet2_t *packet2, u32 wl, u32 cl) |
static void | packet2_vif_open_direct (packet2_t *packet2, u8 irq) |
static void | packet2_vif_close_direct_manual (packet2_t *packet2, u32 qwords) |
static void | packet2_vif_close_direct_auto (packet2_t *packet2) |
static void | packet2_vif_nop (packet2_t *packet2, u8 irq) |
static void | packet2_vif_pad96 (packet2_t *packet2) |
static void | packet2_vif_pad128 (packet2_t *packet2) |
static void | packet2_vif_mpg (packet2_t *packet2, u32 num, u32 addr, u8 irq) |
static void | packet2_vif_stcycl (packet2_t *packet2, u32 wl, u32 cl, u8 irq) |
static void | packet2_vif_offset (packet2_t *packet2, u32 offset, u8 irq) |
static void | packet2_vif_base (packet2_t *packet2, u32 base, u8 irq) |
static void | packet2_vif_flush (packet2_t *packet2, u8 irq) |
static void | packet2_vif_mscal (packet2_t *packet2, u32 addr, u8 irq) |
static void | packet2_vif_mscnt (packet2_t *packet2, u8 irq) |
static void | packet2_vif_itop (packet2_t *packet2, u32 itops, u8 irq) |
static void | packet2_vif_stmod (packet2_t *packet2, u32 mode, u8 irq) |
static void | packet2_vif_mskpath3 (packet2_t *packet2, u32 mask, u8 irq) |
static void | packet2_vif_mark (packet2_t *packet2, u32 value, u8 irq) |
static void | packet2_vif_flushe (packet2_t *packet2, u8 irq) |
static void | packet2_vif_flusha (packet2_t *packet2, u8 irq) |
static void | packet2_vif_mscalf (packet2_t *packet2, u32 addr, u8 irq) |
static void | packet2_vif_stmask (packet2_t *packet2, Mask mask, u8 irq) |
static void | packet2_vif_strow (packet2_t *packet2, const u32 *row_arr, u8 irq) |
static void | packet2_vif_stcol (packet2_t *packet2, const u32 *col_arr, u8 irq) |
void | packet2_vif_add_micro_program (packet2_t *packet2, u32 dest, u32 *start, u32 *end) |
VIF related functions of libpacket2.
#define MAKE_VIF_CODE | ( | _immediate, | |
_num, | |||
_cmd, | |||
_irq | |||
) | ((u32)(_immediate) | ((u32)(_num) << 16) | ((u32)(_cmd) << 24) | ((u32)(_irq) << 31)) |
#include <ee/packet2/include/packet2_vif.h>
Definition at line 26 of file packet2_vif.h.
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add UNPACK VIF opcode.
packet2 | Pointer to packet. |
mode | Unpack mode |
vuAddr | Memory address (divided by 16). |
dblBuffered | (VIF1 only) 1 - Adds VIF1_TOPS register to ADDR 0 - Does not use VIF1_TOPS register. |
masked | Is masked |
usigned | 1 - Unsigned - Decompress by padding 0 to the upper field 0 - Signed - Decompress by sign extension |
irq | Interrupt Request. False by default. |
Definition at line 50 of file packet2_vif.h.
References packet2_t::next, packet2_add_u32(), and packet2_t::vif_code_opened_at.
Referenced by packet2_utils_vu_add_unpack_data(), and packet2_utils_vu_open_unpack().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Close UNPACK manually. In reality, get back to pointer "vif_code_opened_at" and fix num value with qwords counted from last packet2_vif_open_unpack().
packet2 | Pointer to packet. |
unpack_num | Amount of data written to the VU Mem (qwords) or MicroMem (dwords). 256 is max value! |
Definition at line 68 of file packet2_vif.h.
References vif_code_t::cmd, packet2_t::next, vif_code_t::num, and packet2_t::vif_code_opened_at.
Referenced by packet2_utils_vu_add_unpack_data(), and packet2_vif_close_unpack_auto().
u32 packet2_vif_close_unpack_auto | ( | packet2_t * | packet2, |
u32 | wl, | ||
u32 | cl | ||
) |
#include <ee/packet2/include/packet2_vif.h>
Close UNPACK automatically. In reality, get back to pointer "vif_code_opened_at" and fix num value with qwords counted from last packet2_vif_open_unpack().
packet2 | Pointer to packet. |
wl | WL Value (look at STCYCL) |
cl | CL Value (look at STCYCL) |
Definition at line 34 of file packet2_vif.c.
References vif_code_t::cmd, packet2_t::next, packet2_vif_close_unpack_manual(), and packet2_t::vif_code_opened_at.
Referenced by packet2_utils_vu_close_unpack().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add DIRECT VIF opcode.
Definition at line 95 of file packet2_vif.h.
References packet2_t::next, P2_VIF_DIRECT, packet2_add_u32(), and packet2_t::vif_code_opened_at.
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Close DIRECT manually. In reality, get back to pointer "vif_code_opened_at" and fix immediate value with given value.
packet2 | Pointer to packet. |
qwords | Qwords count. |
Definition at line 109 of file packet2_vif.h.
References vif_code_t::immediate, packet2_t::next, and packet2_t::vif_code_opened_at.
Referenced by packet2_vif_close_direct_auto().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Close DIRECT automatically. In reality, get back to pointer "vif_code_opened_at" and fix immediate value with qwords counted from last packet2_vif_open_direct().
packet2 | Pointer to packet. |
Definition at line 123 of file packet2_vif.h.
References packet2_t::next, packet2_vif_close_direct_manual(), and packet2_t::vif_code_opened_at.
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add NOP VIF opcode.
packet2 | Pointer to packet. |
irq | Interrupt Request. False by default. |
Definition at line 135 of file packet2_vif.h.
References P2_VIF_NOP, and packet2_add_u32().
Referenced by packet2_utils_vu_add_end_tag(), and packet2_vif_add_micro_program().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Fill with NOP VIF opcode to align to 96bits
packet2 | Pointer to packet. |
Definition at line 144 of file packet2_vif.h.
References P2_VIF_NOP, and packet2_pad96().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Fill with NOP VIF opcode to align to 128bits
packet2 | Pointer to packet. |
Definition at line 153 of file packet2_vif.h.
References P2_VIF_NOP, and packet2_pad128().
Referenced by packet2_utils_vu_close_unpack().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MPG VIF opcode.
packet2 | Pointer to packet. |
num | Number of 64-bit data. |
addr | Address. |
irq | Interrupt Request. False by default. |
Definition at line 167 of file packet2_vif.h.
References P2_VIF_MPG, and packet2_add_u32().
Referenced by packet2_vif_add_micro_program().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add STCYCL VIF opcode.
packet2 | Pointer to packet. |
wl | WL field. |
cl | CL field. |
irq | Interrupt Request. False by default. |
Definition at line 181 of file packet2_vif.h.
References P2_VIF_STCYCL, and packet2_add_u32().
Referenced by packet2_utils_vu_add_unpack_data(), and packet2_utils_vu_open_unpack().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add OFFSET VIF opcode.
packet2 | Pointer to packet. |
offset | Offset. BASE+OFFSET will be the address of second buffer. |
irq | Interrupt Request. False by default. |
Definition at line 194 of file packet2_vif.h.
References P2_VIF_OFFSET, and packet2_add_u32().
Referenced by packet2_utils_vu_add_double_buffer().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add BASE VIF opcode.
packet2 | Pointer to packet. |
base | Base address of double buffer. |
irq | Interrupt Request. False by default. |
Definition at line 207 of file packet2_vif.h.
References P2_VIF_BASE, and packet2_add_u32().
Referenced by packet2_utils_vu_add_double_buffer().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add FLUSH VIF opcode.
packet2 | Pointer to packet. |
irq | Interrupt Request. False by default. |
Definition at line 219 of file packet2_vif.h.
References P2_VIF_FLUSH, and packet2_add_u32().
Referenced by packet2_utils_vu_add_continue_program(), and packet2_utils_vu_add_start_program().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MSCAL VIF opcode.
packet2 | Pointer to packet. |
addr | Starting address. |
irq | Interrupt Request. False by default. |
Definition at line 232 of file packet2_vif.h.
References P2_VIF_MSCAL, and packet2_add_u32().
Referenced by packet2_utils_vu_add_start_program().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MSCNT VIF opcode.
packet2 | Pointer to packet. |
irq | Interrupt Request. False by default. |
Definition at line 244 of file packet2_vif.h.
References P2_VIF_MSCNT, and packet2_add_u32().
Referenced by packet2_utils_vu_add_continue_program().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add ITOP VIF opcode.
packet2 | Pointer to packet. |
itops | Value for VU XITOP instruction. |
irq | Interrupt Request. False by default. |
Definition at line 257 of file packet2_vif.h.
References P2_VIF_ITOP, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MSKPATH3 VIF opcode.
packet2 | Pointer to packet. |
mode | Decompression mode. |
irq | Interrupt Request. False by default. |
Definition at line 270 of file packet2_vif.h.
References P2_VIF_STMOD, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MSKPATH3 VIF opcode.
packet2 | Pointer to packet. |
mask | Mask. |
irq | Interrupt Request. False by default. |
Definition at line 283 of file packet2_vif.h.
References P2_VIF_MSKPATH3, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MARK VIF opcode.
packet2 | Pointer to packet. |
value | Value. |
irq | Interrupt Request. False by default. |
Definition at line 296 of file packet2_vif.h.
References P2_VIF_MARK, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add FLUSHE VIF opcode.
packet2 | Pointer to packet. |
irq | Interrupt Request. False by default. |
Definition at line 308 of file packet2_vif.h.
References P2_VIF_FLUSHE, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add FLUSHA VIF opcode.
packet2 | Pointer to packet. |
irq | Interrupt Request. False by default. |
Definition at line 320 of file packet2_vif.h.
References P2_VIF_FLUSHA, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add MSCALF VIF opcode.
packet2 | Pointer to packet. |
addr | Address. |
irq | Interrupt Request. False by default. |
Definition at line 333 of file packet2_vif.h.
References P2_VIF_MSCALF, and packet2_add_u32().
#include <ee/packet2/include/packet2_vif.h>
Add STMASK VIF opcode.
packet2 | Pointer to packet. |
mask | Mask. |
irq | Interrupt Request. False by default. |
Definition at line 346 of file packet2_vif.h.
References P2_VIF_STMASK, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add STROW VIF opcode.
packet2 | Pointer to packet. |
row_arr | Row array. |
irq | Interrupt Request. False by default. |
Definition at line 360 of file packet2_vif.h.
References P2_VIF_STROW, and packet2_add_u32().
|
inlinestatic |
#include <ee/packet2/include/packet2_vif.h>
Add STCOL VIF opcode.
packet2 | Pointer to packet. |
col_arr | Column array. |
irq | Interrupt Request. False by default. |
Definition at line 377 of file packet2_vif.h.
References P2_VIF_STCOL, and packet2_add_u32().
void packet2_vif_add_micro_program | ( | packet2_t * | packet2, |
u32 | dest, | ||
u32 * | start, | ||
u32 * | end | ||
) |
#include <ee/packet2/include/packet2_vif.h>
Add VU micro program into packet2. Packet2 MODE for micro program upload: Chain
dest | VU destination address (divided by 16). |
start | Start address. |
end | End address. |
Definition at line 14 of file packet2_vif.c.
References count, packet2_chain_ref(), packet2_vif_mpg(), and packet2_vif_nop().