PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
vif_codes.h File Reference
#include <tamtypes.h>
+ Include dependency graph for vif_codes.h:

Go to the source code of this file.

Macros

#define VIF_CMD_NOP   0x00
 
#define VIF_CMD_STCYCL   0x01
 
#define VIF_CMD_OFFSET   0x02
 
#define VIF_CMD_BASE   0x03
 
#define VIF_CMD_ITOP   0x04
 
#define VIF_CMD_STMOD   0x05
 
#define VIF_CMD_MSKPATH3   0x06
 
#define VIF_CMD_MARK   0x07
 
#define VIF_CMD_FLUSHE   0x10
 
#define VIF_CMD_FLUSH   0x11
 
#define VIF_CMD_FLUSHA   0x13
 
#define VIF_CMD_MSCAL   0x14
 
#define VIF_CMD_MSCNT   0x17
 
#define VIF_CMD_MSCALF   0x15
 
#define VIF_CMD_STMASK   0x20
 
#define VIF_CMD_STROW   0x30
 
#define VIF_CMD_STCOL   0x31
 
#define VIF_CMD_MPG   0x4A
 
#define VIF_CMD_DIRECT   0x50
 
#define VIF_CMD_DIRECTHL   0x51
 
#define PACK_VIFTAG(Q, W0, W1, W2, W3)
 
#define VIF_CMD_UNPACK(M, VN, VL)
 
#define STCYCL_IMDT(CL, WL)    (u32)((CL)&0x000000FF) << 0 | (u32)((WL)&0x000000FF) << 8
 
#define OFFSET_IMDT(OFFSET)    (u32)((OFFSET)&0x000003FF)
 
#define BASE_IMDT(BASE)    (u32)((BASE)&0x000003FF)
 
#define ITOP_IMDT(ADDR)    (u32)((ADDR)&0x000003FF)
 
#define STMOD_IMDT(MODE)    (u32)((MODE)&0x00000003)
 
#define MSKPATH3_IMDT(MASK)    (u32)((MASK)&0x00000001) << 15
 
#define MARK_IMDT(MARK)    (u32)((MARK)&0x0000FFFF)
 
#define MSCAL_IMDT(EXECADDR)    (u32)((EXECADDR)&0x0000FFFF)
 
#define MSCALF_IMDT(EXECADDR)    (u32)((EXECADDR)&0x0000FFFF)
 
#define MPG_IMDT(LOADADDR)    (u32)((LOADADDR)&0x0000FFFF)
 
#define MPG_NUM(SIZE)    (u32)((SIZE)&0x000000FF) << 16
 
#define DIRECT_IMDT(SIZE)    (u32)((SIZE)&0x0000FFFF)
 
#define DIRECTHL_IMDT(EXECADDR)    (u32)((EXECADDR)&0x0000FFFF)
 
#define UNPACK_IMDT(ADDR, USN, FLG)
 
#define UNPACK_NUM(SIZE)    (u32)((SIZE)&0x000000FF) << 16
 
#define VIF_CODE(IMDT, NUM, CMD, IRQ)
 

Detailed Description

VIF codes.

Definition in file vif_codes.h.

Macro Definition Documentation

◆ VIF_CMD_NOP

#define VIF_CMD_NOP   0x00

No Operation

Definition at line 12 of file vif_codes.h.

◆ VIF_CMD_STCYCL

#define VIF_CMD_STCYCL   0x01

Sets CYCLE register

Definition at line 14 of file vif_codes.h.

◆ VIF_CMD_OFFSET

#define VIF_CMD_OFFSET   0x02

Sets OFFSET register (VIF1)

Definition at line 16 of file vif_codes.h.

◆ VIF_CMD_BASE

#define VIF_CMD_BASE   0x03

Sets BASE register (VIF1)

Definition at line 18 of file vif_codes.h.

◆ VIF_CMD_ITOP

#define VIF_CMD_ITOP   0x04

Sets ITOPS register

Definition at line 20 of file vif_codes.h.

◆ VIF_CMD_STMOD

#define VIF_CMD_STMOD   0x05

Sets MODE register

Definition at line 22 of file vif_codes.h.

◆ VIF_CMD_MSKPATH3

#define VIF_CMD_MSKPATH3   0x06

Mask GIF transfer (VIF1)

Definition at line 24 of file vif_codes.h.

◆ VIF_CMD_MARK

#define VIF_CMD_MARK   0x07

Sets Mark register

Definition at line 26 of file vif_codes.h.

◆ VIF_CMD_FLUSHE

#define VIF_CMD_FLUSHE   0x10

Wait for end of microprogram

Definition at line 28 of file vif_codes.h.

◆ VIF_CMD_FLUSH

#define VIF_CMD_FLUSH   0x11

Wait for end of microprogram & Path 1/2 GIF xfer (VIF1)

Definition at line 30 of file vif_codes.h.

◆ VIF_CMD_FLUSHA

#define VIF_CMD_FLUSHA   0x13

Wait for end of microprogram & all Path GIF xfer (VIF1)

Definition at line 32 of file vif_codes.h.

◆ VIF_CMD_MSCAL

#define VIF_CMD_MSCAL   0x14

Activate microprogram

Definition at line 34 of file vif_codes.h.

◆ VIF_CMD_MSCNT

#define VIF_CMD_MSCNT   0x17

Execute microrprogram continuously

Definition at line 36 of file vif_codes.h.

◆ VIF_CMD_MSCALF

#define VIF_CMD_MSCALF   0x15

Activate microprogram (VIF1)

Definition at line 38 of file vif_codes.h.

◆ VIF_CMD_STMASK

#define VIF_CMD_STMASK   0x20

Sets MASK register

Definition at line 40 of file vif_codes.h.

◆ VIF_CMD_STROW

#define VIF_CMD_STROW   0x30

Sets ROW register

Definition at line 42 of file vif_codes.h.

◆ VIF_CMD_STCOL

#define VIF_CMD_STCOL   0x31

Sets COL register

Definition at line 44 of file vif_codes.h.

◆ VIF_CMD_MPG

#define VIF_CMD_MPG   0x4A

Load microprogram

Definition at line 46 of file vif_codes.h.

◆ VIF_CMD_DIRECT

#define VIF_CMD_DIRECT   0x50

Transfer data to GIF (VIF1)

Definition at line 48 of file vif_codes.h.

◆ VIF_CMD_DIRECTHL

#define VIF_CMD_DIRECTHL   0x51

Transfer data to GIF but stall for Path 3 IMAGE mode (VIF1)

Definition at line 50 of file vif_codes.h.

◆ PACK_VIFTAG

#define PACK_VIFTAG (   Q,
  W0,
  W1,
  W2,
  W3 
)
Value:
Q->sw[0] = (u32)(W0), \
Q->sw[1] = (u32)(W1), \
Q->sw[2] = (u32)(W2), \
Q->sw[3] = (u32)(W3)

Definition at line 53 of file vif_codes.h.

◆ VIF_CMD_UNPACK

#define VIF_CMD_UNPACK (   M,
  VN,
  VL 
)
Value:
(u32)((VL)&0x00000003) << 0 | (u32)((VN)&0x00000003) << 2 | \
(u32)((M)&0x00000001) << 4 | (u32)((3) & 0x00000003) << 5

Transfers data to the VU Mem

Definition at line 60 of file vif_codes.h.

◆ STCYCL_IMDT

#define STCYCL_IMDT (   CL,
  WL 
)     (u32)((CL)&0x000000FF) << 0 | (u32)((WL)&0x000000FF) << 8

Definition at line 64 of file vif_codes.h.

◆ OFFSET_IMDT

#define OFFSET_IMDT (   OFFSET)     (u32)((OFFSET)&0x000003FF)

Definition at line 67 of file vif_codes.h.

◆ BASE_IMDT

#define BASE_IMDT (   BASE)     (u32)((BASE)&0x000003FF)

Definition at line 70 of file vif_codes.h.

◆ ITOP_IMDT

#define ITOP_IMDT (   ADDR)     (u32)((ADDR)&0x000003FF)

Definition at line 73 of file vif_codes.h.

◆ STMOD_IMDT

#define STMOD_IMDT (   MODE)     (u32)((MODE)&0x00000003)

Definition at line 76 of file vif_codes.h.

◆ MSKPATH3_IMDT

#define MSKPATH3_IMDT (   MASK)     (u32)((MASK)&0x00000001) << 15

Definition at line 79 of file vif_codes.h.

◆ MARK_IMDT

#define MARK_IMDT (   MARK)     (u32)((MARK)&0x0000FFFF)

Definition at line 82 of file vif_codes.h.

◆ MSCAL_IMDT

#define MSCAL_IMDT (   EXECADDR)     (u32)((EXECADDR)&0x0000FFFF)

Definition at line 85 of file vif_codes.h.

◆ MSCALF_IMDT

#define MSCALF_IMDT (   EXECADDR)     (u32)((EXECADDR)&0x0000FFFF)

Definition at line 88 of file vif_codes.h.

◆ MPG_IMDT

#define MPG_IMDT (   LOADADDR)     (u32)((LOADADDR)&0x0000FFFF)

Definition at line 91 of file vif_codes.h.

◆ MPG_NUM

#define MPG_NUM (   SIZE)     (u32)((SIZE)&0x000000FF) << 16

Definition at line 94 of file vif_codes.h.

◆ DIRECT_IMDT

#define DIRECT_IMDT (   SIZE)     (u32)((SIZE)&0x0000FFFF)

Definition at line 97 of file vif_codes.h.

◆ DIRECTHL_IMDT

#define DIRECTHL_IMDT (   EXECADDR)     (u32)((EXECADDR)&0x0000FFFF)

Definition at line 100 of file vif_codes.h.

◆ UNPACK_IMDT

#define UNPACK_IMDT (   ADDR,
  USN,
  FLG 
)
Value:
(u32)((ADDR)&0x000003FF) << 0 | (u32)((USN)&0x00000001) << 14 | \
(u32)((FLG)&0x00000001) << 15

Definition at line 103 of file vif_codes.h.

◆ UNPACK_NUM

#define UNPACK_NUM (   SIZE)     (u32)((SIZE)&0x000000FF) << 16

Definition at line 107 of file vif_codes.h.

◆ VIF_CODE

#define VIF_CODE (   IMDT,
  NUM,
  CMD,
  IRQ 
)
Value:
(u32)((IMDT)&0x0000FFFF) << 0 | (u32)((NUM)&0x000000FF) << 16 | \
(u32)((CMD)&0x000000FF) << 24 | (u32)((IRQ)&0x00000001) << 31

Definition at line 110 of file vif_codes.h.