Graphics Engine

From PSP Developer wiki
(Redirected from Graphics)
Jump to navigation Jump to search

Graphics Engine (GE) is the nomenclature for PSP's Graphics Processing Unit (GPU).

PSP Graphics Core 1[edit | edit source]

Specifications[edit | edit source]

  • 1–166 MHz (set at 111 MHz by default) @ 1.2 V
  • 256-bit Bus at 5.3 Gbit/s
  • 3D Curved Surface + 3D Polygon
  • Compressed Texture
  • Hardware Clipping, Morphing, Bone(8)
  • Hardware Tessellator
  • Bezier, B-Spline(NURBS)
  • ex 4x4, 16x16, 64x64 sub-division

PSP Graphics Core 2[edit | edit source]

Specifications[edit | edit source]

  • 'Rendering Engine' + 'Surface Engine'
  • 256bit Bus, 1-166 MHz @ 1.2V
  • VRAM :2MB(eDRAM)
  • Bus Bandwidth :5.3GB/sec
  • Pixel Fill Rate :664 M pixels/sec
  • max 33 M polygon /sec(T&L)
  • 24bit Full Color:RGBA

GE Commands List[edit | edit source]

GE Commands seems to work in similar way as PS3 "Methods", but with simpler encoding. Single command is 32 bits wide and split into upper 8 bits of Command ID and 24 bits of data (not always full 24 bits are used). PSP hardware manuals refer to command ID as "address" which imply this are actual GE hardware registers. Non listed commands are unknown, and their behavior is not defined.

Command Address Description
CMD_NOP 00h No operation
CMD_VADR 01h Set vertex data starting address
CMD_IADR 02h Set index data starting address
CMD_PRIM 04h Draw primitive
CMD_BEZIER 05h Draw Bezier surface
CMD_SPLINE 06h Draw spline surface
CMD_BBOX 07h Set bounding box
CMD_JUMP 08h Jump
CMD_BJUMP 09h Conditional jump (jump if BBOX is outside of drawing region)
CMD_CALL 0Ah List call
CMD_RET 0Bh List return
CMD_END 0Ch End reading
CMD_SIGNAL 0Eh Signal interrupt
CMD_FINISH 0Fh Finish drawing
CMD_BASE 10h Set address base, used as upper 8 bits for JUMP, BJUMP, CALL, VADR, and IADR
CMD_VTYPE 12h Set vertex type
CMD_OFFSET 13h Set offset address
CMD_ORIGIN 14h Set origin address (set OFFSET to address where this command is executed)
CMD_REGION1 15h Set drawing region
CMD_REGION2 16h
CMD_LTE 17h Lighting enable
CMD_LE0 18h Light 0 enable
CMD_LE1 19h Light 1 enable
CMD_LE2 1Ah Light 2 enable
CMD_LE3 1Bh Light 3 enable
CMD_CLE 1Ch Clipping enable
CMD_BCE 1Dh Culling enable
CMD_TME 1Eh Texture enable
CMD_FGE 1Fh Fog enable
CMD_DTE 20h Dither enable
CMD_ABE 21h Alpha blending enable
CMD_ATE 22h Alpha test enable
CMD_ZTE 23h Depth test enable
CMD_STE 24h Stencil test enable
CMD_AAE 25h Antialiasing enable
CMD_PCE 26h Patch culling enable
CMD_CTE 27h Color test enable
CMD_LOE 28h Logical operation enable
CMD_BONEN 2Ah Set bone matrix number
CMD_BONED 2Bh Set bone matrix data
CMD_WEIGHT0 2Ch Set vertex weight
CMD_WEIGHT1 2Dh Set vertex weight
CMD_WEIGHT2 2Eh Set vertex weight
CMD_WEIGHT3 2Fh Set vertex weight
CMD_WEIGHT4 30h Set vertex weight
CMD_WEIGHT5 31h Set vertex weight
CMD_WEIGHT6 32h Set vertex weight
CMD_WEIGHT7 33h Set vertex weight
CMD_DIVIDE 36h Set patch division count
CMD_PPM 37h Set patch primitive
CMD_PFACE 38h Patch Face
CMD_WORLDN 3Ah Set world matrix number
CMD_WORLDD 3Bh Set world matrix data
CMD_VIEWN 3Ch Set view matrix number
CMD_VIEWD 3Dh Set view matrix data
CMD_PROJN 3Eh Set perspective matrix number
CMD_PROJD 3Fh Set perspective matrix data
CMD_TGENN 40h Set texture generation matrix number
CMD_TGEND 41h Set texture generation matrix data
CMD_SX 42h Set viewport
CMD_SY 43h Set viewport
CMD_SZ 44h Set viewport
CMD_TX 45h Set viewport
CMD_TY 46h Set viewport
CMD_TZ 47h Set viewport
CMD_SU 48h Set texture scale
CMD_SV 49h Set texture scale
CMD_TU 4Ah Set texture offset
CMD_TV 4Bh Set texture offset
CMD_OFFSETX 4Ch Set screen offset
CMD_OFFSETY 4Dh Set screen offset
CMD_SHADE 50h Set shading mode
CMD_NREV 51h Normal reverse
CMD_MATERIAL 53h Material
CMD_MEC 54h Set model color
CMD_MAC 55h Set model color
CMD_MDC 56h Set model color
CMD_MSC 57h Set model color
CMD_MAA 58h Set model color alpha
CMD_MK 5Bh Set model specular
CMD_AC 5Ch Set ambient light color
CMD_AA 5Dh Set ambient light color alpha
CMD_LMODE 5Eh Set light mode
CMD_LTYPE0 5Fh Set light type for light source 0
CMD_LTYPE1 60h Set light type for light source 1
CMD_LTYPE2 61h Set light type for light source 2
CMD_LTYPE3 62h Set light type for light source 3
CMD_LX0 63h Set light vector X for light source 0
CMD_LY0 64h Set light vector Y for light source 0
CMD_LZ0 65h Set light vector Z for light source 0
CMD_LX1 66h Set light vector X for light source 1
CMD_LY1 67h Set light vector Y for light source 1
CMD_LZ1 68h Set light vector Z for light source 1
CMD_LX2 69h Set light vector X for light source 2
CMD_LY2 6Ah Set light vector Y for light source 2
CMD_LZ2 6Bh Set light vector Z for light source 2
CMD_LX3 6Ch Set light vector X for light source 3
CMD_LY3 6Dh Set light vector Y for light source 3
CMD_LZ3 6Eh Set light vector Z for light source 3
CMD_LDX0 6Fh Set light direction X for light source 0
CMD_LDY0 70h Set light direction Y for light source 0
CMD_LDZ0 71h Set light direction Z for light source 0
CMD_LDX1 72h Set light direction X for light source 1
CMD_LDY1 73h Set light direction Y for light source 1
CMD_LDZ1 74h Set light direction Z for light source 1
CMD_LDX2 75h Set light direction X for light source 2
CMD_LDY2 76h Set light direction Y for light source 2
CMD_LDZ2 77h Set light direction Z for light source 2
CMD_LDX3 78h Set light direction X for light source 3
CMD_LDY3 79h Set light direction Y for light source 3
CMD_LDZ3 7Ah Set light direction Z for light source 3
CMD_LKA0 7Bh Set light distance attenuation factor A for light source 0
CMD_LKB0 7Ch Set light distance attenuation factor B for light source 0
CMD_LKC0 7Dh Set light distance attenuation factor C for light source 0
CMD_LKA1 7Eh Set light distance attenuation factor A for light source 1
CMD_LKB1 7Fh Set light distance attenuation factor B for light source 1
CMD_LKC1 80h Set light distance attenuation factor C for light source 1
CMD_LKA2 81h Set light distance attenuation factor A for light source 2
CMD_LKB2 82h Set light distance attenuation factor B for light source 2
CMD_LKC2 83h Set light distance attenuation factor C for light source 2
CMD_LKA3 84h Set light distance attenuation factor A for light source 3
CMD_LKB3 85h Set light distance attenuation factor B for light source 3
CMD_LKC3 86h Set light distance attenuation factor C for light source 3
CMD_LKS0 87h Set light convergence factor for light source 0
CMD_LKS1 88h Set light convergence factor for light source 1
CMD_LKS2 89h Set light convergence factor for light source 2
CMD_LKS3 8Ah Set light convergence factor for light source 3
CMD_LKO0 8Bh Set light cut-off dot product coefficient for light source 0
CMD_LKO1 8Ch Set light cut-off dot product coefficient for light source 1
CMD_LKO2 8Dh Set light cut-off dot product coefficient for light source 2
CMD_LKO3 8Eh Set light cut-off dot product coefficient for light source 3
CMD_LAC0 8Fh Set light color ambient for light source 0
CMD_LDC0 90h Set light color diffuse for light source 0
CMD_LSC0 91h Set light color specular for light source 0
CMD_LAC1 92h Set light color ambient for light source 1
CMD_LDC1 93h Set light color diffuse for light source 1
CMD_LSC1 94h Set light color specular for light source 1
CMD_LAC2 95h Set light color ambient for light source 2
CMD_LDC2 96h Set light color diffuse for light source 2
CMD_LSC2 97h Set light color specular for light source 2
CMD_LAC3 98h Set light color ambient for light source 3
CMD_LDC3 99h Set light color diffuse for light source 3
CMD_LSC3 9Ah Set light color specular for light source 3
CMD_CULL 9Bh Culling surface
CMD_FBP 9Ch Set frame buffer base pointer
CMD_FBW 9Dh Set frame buffer base width (bits 16-23 used as upper 8 bits for FBP)
CMD_ZBP 9Eh Set depth buffer base pointer
CMD_ZBW 9Fh Set depth buffer base width (bits 16-23 used as upper 8 bits for ZBP)
CMD_TBP0 A0h Set texture buffer 0 base pointer
CMD_TBP1 A1h Set texture buffer 1 base pointer
CMD_TBP2 A2h Set texture buffer 2 base pointer
CMD_TBP3 A3h Set texture buffer 3 base pointer
CMD_TBP4 A4h Set texture buffer 4 base pointer
CMD_TBP5 A5h Set texture buffer 5 base pointer
CMD_TBP6 A6h Set texture buffer 6 base pointer
CMD_TBP7 A7h Set texture buffer 7 base pointer
CMD_TBW0 A8h Set texture buffer 0 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW1 A9h Set texture buffer 1 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW2 AAh Set texture buffer 2 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW3 ABh Set texture buffer 3 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW4 ACh Set texture buffer 4 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW5 ADh Set texture buffer 5 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW6 AEh Set texture buffer 6 width (bits 16-23 used as upper 8 bits for TBP)
CMD_TBW7 AFh Set texture buffer 7 width (bits 16-23 used as upper 8 bits for TBP)
CMD_CBP B0h Set CLUT buffer base pointer
CMD_CBW B1h Set upper 8 bits of CLUT buffer base pointer
CMD_XBP1 B2h Set transfer buffer pointer (source)
CMD_XBW1 B3h Set transfer buffer width (source) (bits 16-23 used as upper 8 bits for XBP)
CMD_XBP2 B4h Set transfer buffer (destination)
CMD_XBW2 B5h Set transfer buffer width (destination) (bits 16-23 used as upper 8 bits for XBP)
CMD_TSIZE0 B8h Set texture size for texture buffer 0
CMD_TSIZE1 B9h Set texture size for texture buffer 1
CMD_TSIZE2 BAh Set texture size for texture buffer 2
CMD_TSIZE3 BBh Set texture size for texture buffer 3
CMD_TSIZE4 BCh Set texture size for texture buffer 4
CMD_TSIZE5 BDh Set texture size for texture buffer 5
CMD_TSIZE6 BEh Set texture size for texture buffer 6
CMD_TSIZE7 BFh Set texture size for texture buffer 7
CMD_TMAP C0h Set texture map mode
CMD_TSHADE C1h Set shade mapping
CMD_TMODE C2h Set texture mode
CMD_TPF C3h Set texture pixel format
CMD_CLOAD C4h CLUT load
CMD_CLUT C5h Set CLUT
CMD_TFILTER C6h Set texture filter
CMD_TWRAP C7h Set texture wrap mode
CMD_TLEVEL C8h Set texture level mode
CMD_TFUNC C9h Set texture function
CMD_TEC CAh Set texture environment color
CMD_TFLUSH CBh Texture flush
CMD_TSYNC CCh Texture synchronization
CMD_FOG1 CDh Set fog parameter 1
CMD_FOG2 CEh Set fog parameter 2
CMD_FC CFh Set fog color
CMD_TSLOPE D0h Set texture slope
CMD_FPF D2h Set frame pixel format
CMD_CMODE D3h Set clear mode
CMD_SCISSOR1 D4h Set scissoring area (upper left)
CMD_SCISSOR2 D5h Set scissoring area (lower right)
CMD_MINZ D6h Set minimal depth range
CMD_MAXZ D7h Set maximal depth range
CMD_CTEST D8h Set color test parameter
CMD_CREF D9h Set color test reference
CMD_CMSK DAh Set color test mask
CMD_ATEST DBh Set alpha test parameters
CMD_STEST DCh Set stencil test parameters
CMD_SOP DDh Set stencil operation
CMD_ZTEST DEh Set depth test parameter
CMD_BLEND DFh Set alpha blending parameters
CMD_FIXA E0h Set fixed color A
CMD_FIXB E1h Set fixed color B
CMD_DITH1 E2h Set dither coefficients for matrix elements 00-03
CMD_DITH2 E3h Set dither coefficients for matrix elements 04-07
CMD_DITH3 E4h Set dither coefficients for matrix elements 08-11
CMD_DITH4 E5h Set dither coefficients for matrix elements 12-15
CMD_LOP E6h Set logical operation parameter
CMD_ZMSK E7h Depth mask
CMD_PMSK1 E8h Set plane mask
CMD_PMSK2 E9h Set plane mask alpha
CMD_XSTART EAh Inter-buffer transfer start
CMD_XPOS1 EBh Set source buffer transfer position
CMD_XPOS2 ECh Set destination buffer transfer position
CMD_XSIZE EEh Set transfer size

Useful Documentation[edit | edit source]

libGU provides an interface to the 2D and 3D hardware acceleration features found in the PSP’s Graphic Engine