PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
gif_tags.h File Reference
#include <tamtypes.h>
+ Include dependency graph for gif_tags.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GIF_BLOCK_SIZE   0x7FFF
 
#define GIF_PRE_DISABLE   0x00
 
#define GIF_PRE_ENABLE   0x01
 
#define GIF_PRIM_POINT   0x00
 
#define GIF_PRIM_LINE   0x01
 
#define GIF_PRIM_LINE_STRIP   0x02
 
#define GIF_PRIM_TRIANGLE   0x03
 
#define GIF_PRIM_TRIANGLE_STRIP   0x04
 
#define GIF_PRIM_TRIANGLE_FAN   0x05
 
#define GIF_PRIM_SPRITE   0x06
 
#define GIF_FLG_PACKED   0x00
 
#define GIF_FLG_REGLIST   0x01
 
#define GIF_FLG_IMAGE   0x02
 
#define GIF_REG_PRIM   0x00
 
#define GIF_REG_RGBAQ   0x01
 
#define GIF_REG_ST   0x02
 
#define GIF_REG_UV   0x03
 
#define GIF_REG_XYZF2   0x04
 
#define GIF_REG_XYZ2   0x05
 
#define GIF_REG_TEX0   0x06
 
#define GIF_REG_TEX0_1   0x06
 
#define GIF_REG_TEX0_2   0x07
 
#define GIF_REG_CLAMP   0x08
 
#define GIF_REG_CLAMP_1   0x08
 
#define GIF_REG_CLAMP_2   0x09
 
#define GIF_REG_FOG   0x0A
 
#define GIF_REG_XYZF3   0x0C
 
#define GIF_REG_XYZ3   0x0D
 
#define GIF_REG_AD   0x0E
 
#define GIF_REG_NOP   0x0F
 
#define PACK_GIFTAG(Q, D0, D1)
 
#define GIF_SET_TAG(NLOOP, EOP, PRE, PRIM, FLG, NREG)
 
#define GIF_SET_PRIM(PRIM, IIP, TME, FGE, ABE, AA1, FST, CTXT, FIX)
 
#define GIF_SET_RGBAQ(R, G, B, A, Q)
 
#define GIF_SET_ST(S, T)    (u64)((S)&0xFFFFFFFF) << 0 | (u64)((T)&0xFFFFFFFF) << 32
 
#define GIF_SET_UV(U, V)    (u64)((U)&0x00003FFF) << 0 | (u64)((V)&0x00003FFF) << 16
 
#define GIF_SET_XYZ(X, Y, Z)
 
#define GIF_SET_XYZF(X, Y, Z, F)
 
#define GIF_SET_TEX0(TBA, TBW, PSM, TW, TH, TCC, TFNCT, CBA, CPSM, CSM, CSA, CLD)
 
#define GIF_SET_CLAMP(WMS, WMT, MINU, MAXU, MINV, MAXV)
 
#define GIF_SET_FOG(FOG)   (u64)((FOG)&0x000000FF) << 56
 

Detailed Description

GIF Tags

Definition in file gif_tags.h.

Macro Definition Documentation

◆ GIF_BLOCK_SIZE

#define GIF_BLOCK_SIZE   0x7FFF

Not sure if this is correct...

Definition at line 12 of file gif_tags.h.

◆ GIF_PRE_DISABLE

#define GIF_PRE_DISABLE   0x00

Enable PRIM field output

Definition at line 15 of file gif_tags.h.

◆ GIF_PRE_ENABLE

#define GIF_PRE_ENABLE   0x01

Disable PRIM field output

Definition at line 17 of file gif_tags.h.

◆ GIF_PRIM_POINT

#define GIF_PRIM_POINT   0x00

Point primitive

Definition at line 20 of file gif_tags.h.

◆ GIF_PRIM_LINE

#define GIF_PRIM_LINE   0x01

Line primitive

Definition at line 22 of file gif_tags.h.

◆ GIF_PRIM_LINE_STRIP

#define GIF_PRIM_LINE_STRIP   0x02

Line strip primitive

Definition at line 24 of file gif_tags.h.

◆ GIF_PRIM_TRIANGLE

#define GIF_PRIM_TRIANGLE   0x03

Triangle primitive

Definition at line 26 of file gif_tags.h.

◆ GIF_PRIM_TRIANGLE_STRIP

#define GIF_PRIM_TRIANGLE_STRIP   0x04

Triangle strip primitive

Definition at line 28 of file gif_tags.h.

◆ GIF_PRIM_TRIANGLE_FAN

#define GIF_PRIM_TRIANGLE_FAN   0x05

Triangle fan primitive

Definition at line 30 of file gif_tags.h.

◆ GIF_PRIM_SPRITE

#define GIF_PRIM_SPRITE   0x06

Sprite primitive

Definition at line 32 of file gif_tags.h.

◆ GIF_FLG_PACKED

#define GIF_FLG_PACKED   0x00

Packed GIF packet

Definition at line 35 of file gif_tags.h.

◆ GIF_FLG_REGLIST

#define GIF_FLG_REGLIST   0x01

Reglist GIF packet

Definition at line 37 of file gif_tags.h.

◆ GIF_FLG_IMAGE

#define GIF_FLG_IMAGE   0x02

Image GIF packet

Definition at line 39 of file gif_tags.h.

◆ GIF_REG_PRIM

#define GIF_REG_PRIM   0x00

Drawing primitive setting.

Definition at line 42 of file gif_tags.h.

◆ GIF_REG_RGBAQ

#define GIF_REG_RGBAQ   0x01

Vertex color setting.

Definition at line 44 of file gif_tags.h.

◆ GIF_REG_ST

#define GIF_REG_ST   0x02

Specification of vertex texture coordinates.

Definition at line 46 of file gif_tags.h.

◆ GIF_REG_UV

#define GIF_REG_UV   0x03

Specification of vertex texture coordinates.

Definition at line 48 of file gif_tags.h.

◆ GIF_REG_XYZF2

#define GIF_REG_XYZF2   0x04

Setting for vertex coordinate values.

Definition at line 50 of file gif_tags.h.

◆ GIF_REG_XYZ2

#define GIF_REG_XYZ2   0x05

Setting for vertex coordinate values.

Definition at line 52 of file gif_tags.h.

◆ GIF_REG_TEX0

#define GIF_REG_TEX0   0x06

Texture information setting.

Definition at line 54 of file gif_tags.h.

◆ GIF_REG_TEX0_1

#define GIF_REG_TEX0_1   0x06

Texture information setting. (Context 1)

Definition at line 56 of file gif_tags.h.

◆ GIF_REG_TEX0_2

#define GIF_REG_TEX0_2   0x07

Texture information setting. (Context 2)

Definition at line 58 of file gif_tags.h.

◆ GIF_REG_CLAMP

#define GIF_REG_CLAMP   0x08

Texture wrap mode.

Definition at line 60 of file gif_tags.h.

◆ GIF_REG_CLAMP_1

#define GIF_REG_CLAMP_1   0x08

Texture wrap mode. (Context 1)

Definition at line 62 of file gif_tags.h.

◆ GIF_REG_CLAMP_2

#define GIF_REG_CLAMP_2   0x09

Texture wrap mode. (Context 2)

Definition at line 64 of file gif_tags.h.

◆ GIF_REG_FOG

#define GIF_REG_FOG   0x0A

Vertex fog value setting.

Definition at line 66 of file gif_tags.h.

◆ GIF_REG_XYZF3

#define GIF_REG_XYZF3   0x0C

Setting for vertex coordinate values. (Without Drawing Kick)

Definition at line 68 of file gif_tags.h.

◆ GIF_REG_XYZ3

#define GIF_REG_XYZ3   0x0D

Setting for vertex coordinate values. (Without Drawing Kick)

Definition at line 70 of file gif_tags.h.

◆ GIF_REG_AD

#define GIF_REG_AD   0x0E

GIFtag Address+Data

Definition at line 72 of file gif_tags.h.

◆ GIF_REG_NOP

#define GIF_REG_NOP   0x0F

GIFtag No Operation

Definition at line 74 of file gif_tags.h.

◆ PACK_GIFTAG

#define PACK_GIFTAG (   Q,
  D0,
  D1 
)
Value:
Q->dw[0] = (u64)(D0), \
Q->dw[1] = (u64)(D1)

Definition at line 76 of file gif_tags.h.

◆ GIF_SET_TAG

#define GIF_SET_TAG (   NLOOP,
  EOP,
  PRE,
  PRIM,
  FLG,
  NREG 
)
Value:
(u64)((NLOOP)&0x00007FFF) << 0 | (u64)((EOP)&0x00000001) << 15 | \
(u64)((PRE)&0x00000001) << 46 | (u64)((PRIM)&0x000007FF) << 47 | \
(u64)((FLG)&0x00000003) << 58 | (u64)((NREG)&0x0000000F) << 60

Definition at line 80 of file gif_tags.h.

◆ GIF_SET_PRIM

#define GIF_SET_PRIM (   PRIM,
  IIP,
  TME,
  FGE,
  ABE,
  AA1,
  FST,
  CTXT,
  FIX 
)
Value:
(u64)((PRIM)&0x00000007) << 0 | (u64)((IIP)&0x00000001) << 3 | \
(u64)((TME)&0x00000001) << 4 | (u64)((FGE)&0x00000001) << 5 | \
(u64)((ABE)&0x00000001) << 6 | (u64)((AA1)&0x00000001) << 7 | \
(u64)((FST)&0x00000001) << 8 | (u64)((CTXT)&0x00000001) << 9 | \
(u64)((FIX)&0x00000001) << 10

Definition at line 85 of file gif_tags.h.

◆ GIF_SET_RGBAQ

#define GIF_SET_RGBAQ (   R,
  G,
  B,
  A,
 
)
Value:
(u64)((R)&0x000000FF) << 0 | (u64)((G)&0x000000FF) << 8 | \
(u64)((B)&0x000000FF) << 16 | (u64)((A)&0x000000FF) << 24 | \
(u64)((Q)&0xFFFFFFFF) << 32

Definition at line 92 of file gif_tags.h.

◆ GIF_SET_ST

#define GIF_SET_ST (   S,
 
)     (u64)((S)&0xFFFFFFFF) << 0 | (u64)((T)&0xFFFFFFFF) << 32

Definition at line 97 of file gif_tags.h.

◆ GIF_SET_UV

#define GIF_SET_UV (   U,
 
)     (u64)((U)&0x00003FFF) << 0 | (u64)((V)&0x00003FFF) << 16

Definition at line 100 of file gif_tags.h.

◆ GIF_SET_XYZ

#define GIF_SET_XYZ (   X,
  Y,
 
)
Value:
(u64)((X)&0x0000FFFF) << 0 | (u64)((Y)&0x0000FFFF) << 16 | \
(u64)((Z)&0xFFFFFFFF) << 32

Definition at line 103 of file gif_tags.h.

◆ GIF_SET_XYZF

#define GIF_SET_XYZF (   X,
  Y,
  Z,
 
)
Value:
(u64)((X)&0x0000FFFF) << 0 | (u64)((Y)&0x0000FFFF) << 16 | \
(u64)((Z)&0x00FFFFFF) << 32 | (u64)((F)&0x000000FF) << 56

Definition at line 107 of file gif_tags.h.

◆ GIF_SET_TEX0

#define GIF_SET_TEX0 (   TBA,
  TBW,
  PSM,
  TW,
  TH,
  TCC,
  TFNCT,
  CBA,
  CPSM,
  CSM,
  CSA,
  CLD 
)
Value:
(u64)((TBA)&0x00003FFF) << 0 | (u64)((TBW)&0x0000003F) << 14 | \
(u64)((PSM)&0x0000003F) << 20 | (u64)((TW)&0x0000000F) << 26 | \
(u64)((TH)&0x0000000F) << 30 | (u64)((TCC)&0x00000001) << 34 | \
(u64)((TFNCT)&0x00000003) << 35 | (u64)((CBA)&0x00003FFF) << 37 | \
(u64)((CPSM)&0x0000000F) << 51 | (u64)((CSM)&0x00000001) << 55 | \
(u64)((CSA)&0x0000001F) << 56 | (u64)((CLD)&0x00000007) << 61

Definition at line 111 of file gif_tags.h.

◆ GIF_SET_CLAMP

#define GIF_SET_CLAMP (   WMS,
  WMT,
  MINU,
  MAXU,
  MINV,
  MAXV 
)
Value:
(u64)((WMS)&0x00000003) << 0 | (u64)((WMT)&0x00000003) << 2 | \
(u64)((MINU)&0x000003FF) << 4 | (u64)((MAXU)&0x000003FF) << 14 | \
(u64)((MINV)&0x000003FF) << 24 | (u64)((MAXV)&0x000003FF) << 34

Definition at line 119 of file gif_tags.h.

◆ GIF_SET_FOG

#define GIF_SET_FOG (   FOG)    (u64)((FOG)&0x000000FF) << 56

Definition at line 124 of file gif_tags.h.