psl1ght
A free SDK for Sony's PS3 console
Data Structures | Macros | Typedefs | Functions
gcm_sys.h File Reference

RSX low level management. More...

#include <ppu-types.h>

Go to the source code of this file.

Data Structures

struct  _gcmCtxData
 RSX Context data structure. More...
 
struct  _gcmCtrlRegister
 RSX control data structure. More...
 
struct  _gcmCfg
 RSX Configuration structure. More...
 
struct  _gcmSurface
 RSX target surface data structure. More...
 
struct  _gcmTexture
 RSX Texture data structure. More...
 
struct  _gcmTransferScale
 Specify scaled image blit geometry and format for rsxSetTransferScaleSurface(). More...
 
struct  _gcmTransferSurface
 Specify destination surface characteristics for rsxSetTransferScaleSurface(). More...
 
struct  _gcmTransferSwizzle
 
struct  _gcmTileInfo
 
struct  _gcmZcullInfo
 
struct  _gcmDisplayInfo
 Display information. More...
 
struct  _gcmOffsetTable
 
struct  _gcmCast
 
struct  _reportData
 
struct  _notifyData
 

Macros

#define GCM_TRUE   1
 true boolean value
 
#define GCM_FALSE   0
 false boolean value
 
#define GCM_FLIP_HSYNC   1
 flip on horizontal sync, accurate mode
 
#define GCM_FLIP_VSYNC   2
 flip on vertical sync
 
#define GCM_FLIP_HSYNC_AND_BREAK_EVERYTHING   3
 flip on horizontal sync, inaccurate mode
 
#define GCM_MAX_MRT_COUNT   4
 maximum count of multiple render targets
 
#define GCM_DMA_MEMORY_FRAME_BUFFER   (0xFEED0000)
 
#define GCM_DMA_MEMORY_HOST_BUFFER   (0xFEED0001)
 
#define GCM_CONTEXT_SURFACE2D   (0x313371C3)
 
#define GCM_CONTEXT_SWIZZLE2D   (0x31337A73)
 
#define GCM_TRANSFER_LOCAL_TO_LOCAL   0
 
#define GCM_TRANSFER_MAIN_TO_LOCAL   1
 
#define GCM_TRANSFER_LOCAL_TO_MAIN   2
 
#define GCM_TRANSFER_MAIN_TO_MAIN   3
 
#define GCM_TF_COLOR_R5G5B5   3
 
#define GCM_TF_COLOR_X8R8G8B8   5
 
#define GCM_TF_COLOR_A8R8G8B8   8
 
#define GCM_TF_ZETA_Z16   1
 16-bit depth buffer
 
#define GCM_TF_ZETA_Z24S8   2
 24-bit depth buffer and 8-bit stencil buffer.
 
#define GCM_TF_TYPE_LINEAR   1
 Render target is linear.
 
#define GCM_TF_TYPE_SWIZZLE   2
 Render target is swizzled.
 
#define GCM_LOCATION_RSX   0
 Memory buffer is located in RSX memory.
 
#define GCM_LOCATION_CELL   1
 Memory buffer is located in main memory.
 
#define GCM_TF_TARGET_NONE   0
 Do not use render target.
 
#define GCM_TF_TARGET_0   1
 Render target 0.
 
#define GCM_TF_TARGET_1   2
 Render target 1.
 
#define GCM_TF_TARGET_MRT1   0x13
 Render target 0 and 1.
 
#define GCM_TF_TARGET_MRT2   0x17
 Render target 0,1 and 2.
 
#define GCM_TF_TARGET_MRT3   0x1f
 Render target 0,1,2 and 3.
 
#define GCM_TF_CENTER_1   0
 Do not use multiple samples.
 
#define GCM_COLOR_MASK_B   0x00000001
 blue color component
 
#define GCM_COLOR_MASK_G   0x00000100
 green color component
 
#define GCM_COLOR_MASK_R   0x00010000
 red color component
 
#define GCM_COLOR_MASK_A   0x01000000
 alpha component
 
#define GCM_CLEAR_Z   0x01
 clear the Z buffer (depth buffer)
 
#define GCM_CLEAR_S   0x02
 clear the stencil buffer
 
#define GCM_CLEAR_R   0x10
 clear the red components
 
#define GCM_CLEAR_G   0x20
 clear the green components
 
#define GCM_CLEAR_B   0x40
 clear the blue components
 
#define GCM_CLEAR_A   0x80
 clear the alpha components
 
#define GCM_CLEAR_M   0xf3
 clear all RGBA components, Z buffer and stencil buffer
 
#define GCM_NEVER   0x0200
 depth test never passes.
 
#define GCM_LESS   0x0201
 depth test passes if the incoming depth value is less than the stored depth value.
 
#define GCM_EQUAL   0x0202
 depth test passes if the incoming depth value is equal to the stored depth value.
 
#define GCM_LEQUAL   0x0203
 depth test passes if the incoming depth value is less than or equal to the stored depth value.
 
#define GCM_GREATER   0x0204
 depth test passes if the incoming depth value is greater than the stored depth value.
 
#define GCM_NOTEQUAL   0x0205
 depth test passes if the incoming depth value is not equal to the stored depth value.
 
#define GCM_GEQUAL   0x0206
 depth test passes if the incoming depth value is greater than or equal to the stored depth value.
 
#define GCM_ALWAYS   0x0207
 depth test always passes.
 
#define GCM_CULL_FRONT   0x0404
 culling of front face
 
#define GCM_CULL_BACK   0x0405
 culling of back face
 
#define GCM_CULL_ALL   0x0408
 culling of front and back faces
 
#define GCM_FRONTFACE_CW   0x0900
 front face is to be drawn clock wise
 
#define GCM_FRONTFACE_CCW   0x0901
 front face is to be drawn counter clock wise
 
#define GCM_TYPE_POINTS   1
 render POINTS primitive
 
#define GCM_TYPE_LINES   2
 render LINES primitive
 
#define GCM_TYPE_LINE_LOOP   3
 render LINE_LOOP primitive
 
#define GCM_TYPE_LINE_STRIP   4
 render LINE_STRIP primitive
 
#define GCM_TYPE_TRIANGLES   5
 render TRIANGLES primitive
 
#define GCM_TYPE_TRIANGLE_STRIP   6
 render TRIANGLE_STRIP primitive
 
#define GCM_TYPE_TRIANGLE_FAN   7
 render TRIANGLE_FAN primitive
 
#define GCM_TYPE_QUADS   8
 render QUADS primitive
 
#define GCM_TYPE_QUAD_STRIP   9
 render QUAD_STRIP primitive
 
#define GCM_TYPE_POLYGON   10
 render POLYGON primitive
 
#define GCM_INVALIDATE_TEXTURE   1
 invalidate texture cache for fragment programs
 
#define GCM_INVALIDATE_VERTEX_TEXTURE   2
 invalidate texture cache for vertex programs
 
#define GCM_TEXTURE_DIMS_1D   1
 texture is 1D.
 
#define GCM_TEXTURE_DIMS_2D   2
 texture is 2D.
 
#define GCM_TEXTURE_DIMS_3D   3
 texture is 3D.
 
#define GCM_TEXTURE_FORMAT_SWZ   0x00
 
#define GCM_TEXTURE_FORMAT_LIN   0x20
 
#define GCM_TEXTURE_FORMAT_NRM   0x40
 
#define GCM_TEXTURE_FORMAT_L8   1
 
#define GCM_TEXTURE_FORMAT_A1R5G5B5   2
 
#define GCM_TEXTURE_FORMAT_A4R4G4B4   3
 
#define GCM_TEXTURE_FORMAT_R5G6B5   4
 
#define GCM_TEXTURE_FORMAT_A8R8G8B8   5
 
#define GCM_TEXTURE_FORMAT_DXT1   6
 
#define GCM_TEXTURE_FORMAT_DXT3   7
 
#define GCM_TEXTURE_FORMAT_DXT5   8
 
#define GCM_TEXTURE_FORMAT_A8L8   24
 
#define GCM_TEXTURE_REMAP_TYPE_B_SHIFT   14
 shift value for texture remapping type corresponding to the blue component
 
#define GCM_TEXTURE_REMAP_TYPE_G_SHIFT   12
 shift value for texture remapping type corresponding to the green component
 
#define GCM_TEXTURE_REMAP_TYPE_R_SHIFT   10
 shift value for texture remapping type corresponding to the red component
 
#define GCM_TEXTURE_REMAP_TYPE_A_SHIFT   8
 shift value for texture remapping type corresponding to the alpha component
 
#define GCM_TEXTURE_REMAP_COLOR_B_SHIFT   6
 shift value for texture remapping component color corresponding to the blue component
 
#define GCM_TEXTURE_REMAP_COLOR_G_SHIFT   4
 shift value for texture remapping component color corresponding to the green component
 
#define GCM_TEXTURE_REMAP_COLOR_R_SHIFT   2
 shift value for texture remapping component color corresponding to the red component
 
#define GCM_TEXTURE_REMAP_COLOR_A_SHIFT   0
 shift value for texture remapping component color corresponding to the alpha component
 
#define GCM_TEXTURE_REMAP_TYPE_ZERO   0
 remap component to all zero bits
 
#define GCM_TEXTURE_REMAP_TYPE_ONE   1
 remap component to all one bits
 
#define GCM_TEXTURE_REMAP_TYPE_REMAP   2
 remap component to specified component
 
#define GCM_TEXTURE_REMAP_COLOR_A   0
 remap component to alpha component
 
#define GCM_TEXTURE_REMAP_COLOR_R   1
 remap component to red component
 
#define GCM_TEXTURE_REMAP_COLOR_G   2
 remap component to green component
 
#define GCM_TEXTURE_REMAP_COLOR_B   3
 remap component to blue component
 
#define GCM_TEXTURE_MAX_ANISO_1   0
 x1 sample
 
#define GCM_TEXTURE_MAX_ANISO_2   1
 x2 sample
 
#define GCM_TEXTURE_MAX_ANISO_4   2
 x4 sample
 
#define GCM_TEXTURE_MAX_ANISO_6   3
 x6 sample
 
#define GCM_TEXTURE_MAX_ANISO_8   4
 x8 sample
 
#define GCM_TEXTURE_MAX_ANISO_10   5
 x10 sample
 
#define GCM_TEXTURE_MAX_ANISO_12   6
 x12 sample
 
#define GCM_TEXTURE_MAX_ANISO_16   7
 x16 sample
 
#define GCM_TEXTURE_NEAREST   1
 
#define GCM_TEXTURE_LINEAR   2
 
#define GCM_TEXTURE_NEAREST_MIPMAP_NEAREST   3
 
#define GCM_TEXTURE_LINEAR_MIPMAP_NEAREST   4
 
#define GCM_TEXTURE_NEAREST_MIPMAP_LINEAR   5
 
#define GCM_TEXTURE_LINEAR_MIPMAP_LINEAR   6
 
#define GCM_TEXTURE_CONVOLUTION_QUINCUNX   1
 
#define GCM_TEXTURE_CONVOLUTION_GAUSSIAN   2
 
#define GCM_TEXTURE_CONVOLUTION_QUINCUNX_ALT   3
 
#define GCM_TEXTURE_REPEAT   1
 
#define GCM_TEXTURE_MIRRORED_REPEAT   2
 
#define GCM_TEXTURE_CLAMP_TO_EDGE   3
 
#define GCM_TEXTURE_CLAMP_TO_BORDER   4
 
#define GCM_TEXTURE_CLAMP   5
 
#define GCM_TEXTURE_MIRROR_CLAMP_TO_EDGE   6
 
#define GCM_TEXTURE_MIRROR_CLAMP_TO_BORDER   7
 
#define GCM_TEXTURE_MIRROR_CLAMP   8
 
#define GCM_TEXTURE_ZFUNC_NEVER   0
 
#define GCM_TEXTURE_ZFUNC_LESS   1
 
#define GCM_TEXTURE_ZFUNC_EQUAL   2
 
#define GCM_TEXTURE_ZFUNC_LEQUAL   3
 
#define GCM_TEXTURE_ZFUNC_GREATER   4
 
#define GCM_TEXTURE_ZFUNC_NOTEQUAL   5
 
#define GCM_TEXTURE_ZFUNC_GEQUAL   6
 
#define GCM_TEXTURE_ZFUNC_ALWAYS   7
 
#define GCM_VERTEX_ATTRIB_POS   0
 
#define GCM_VERTEX_ATTRIB_WEIGHT   1
 
#define GCM_VERTEX_ATTRIB_NORMAL   2
 
#define GCM_VERTEX_ATTRIB_COLOR0   3
 
#define GCM_VERTEX_ATTRIB_COLOR1   4
 
#define GCM_VERTEX_ATTRIB_FOG   5
 
#define GCM_VERTEX_ATTRIB_COLOR_INDEX   6
 
#define GCM_VERTEX_ATTRIB_POINT_SIZE   6 /*alias*/
 
#define GCM_VERTEX_ATTRIB_EDGEFLAG   7
 
#define GCM_VERTEX_ATTRIB_TEX0   8
 
#define GCM_VERTEX_ATTRIB_TEX1   9
 
#define GCM_VERTEX_ATTRIB_TEX2   10
 
#define GCM_VERTEX_ATTRIB_TEX3   11
 
#define GCM_VERTEX_ATTRIB_TEX4   12
 
#define GCM_VERTEX_ATTRIB_TEX5   13
 
#define GCM_VERTEX_ATTRIB_TEX6   14
 
#define GCM_VERTEX_ATTRIB_TEX7   15
 
#define GCM_VERTEX_DATA_TYPE_F32   2
 
#define GCM_VERTEX_DATA_TYPE_U8   4
 
#define GCM_INDEX_TYPE_32B   0
 
#define GCM_INDEX_TYPE_16B   1
 
#define GCM_USER_CLIP_PLANE_DISABLE   0
 
#define GCM_USER_CLIP_PLANE_LT   1
 
#define GCM_USER_CLIP_PLANE_GE   2
 
#define GCM_SHADE_MODEL_FLAT   0x1D00
 Flat shading.
 
#define GCM_SHADE_MODEL_SMOOTH   0x1D01
 Smooth shading.
 
#define GCM_ZERO   0
 blend factors are zero
 
#define GCM_ONE   1
 blend factors are one
 
#define GCM_SRC_COLOR   0x0300
 blend factors are the source color components
 
#define GCM_ONE_MINUS_SRC_COLOR   0x0301
 blend factors are one minus source color components
 
#define GCM_SRC_ALPHA   0x0302
 blend factors are the source alpha component
 
#define GCM_ONE_MINUS_SRC_ALPHA   0x0303
 blend factors are one minus the source alpha component
 
#define GCM_DST_ALPHA   0x0304
 blend factors are the destination alpha component
 
#define GCM_ONE_MINUS_DST_ALPHA   0x0305
 blend factors are one minus the destination alpha component
 
#define GCM_DST_COLOR   0x0306
 blend factors are the destination color components
 
#define GCM_ONE_MINUS_DST_COLOR   0x0307
 blend factors are one minus the destination color components
 
#define GCM_SRC_ALPHA_SATURATE   0x0308
 blend factors are set to saturate the output
 
#define GCM_CONSTANT_COLOR   0x8001
 blend factors are the constant color components
 
#define GCM_ONE_MINUS_CONSTANT_COLOR   0x8002
 blend factors are one minus the constant color components
 
#define GCM_CONSTANT_ALPHA   0x8003
 blend factors are the constant color alpha component
 
#define GCM_ONE_MINUS_CONSTANT_ALPHA   0x8004
 blend factors are one minus the constant color alpha component
 
#define GCM_FUNC_ADD   0x8006
 use scaled source plus destination
 
#define GCM_MIN   0x8007
 use the minimum of source and destination color components
 
#define GCM_MAX   0x8008
 use the maximum of source and destination color components
 
#define GCM_FUNC_SUBTRACT   0x800a
 use scaled source minus destination
 
#define GCM_FUNC_REVERSE_SUBTRACT   0x800b
 use scaled destination minus source
 
#define GCM_FUNC_REVERSE_SUBTRACT_SIGNED   0xf005
 use scaled destination minus source (signed)
 
#define GCM_FUNC_ADD_SIGNED   0xf006
 use scaled source plus destination (signed)
 
#define GCM_FUNC_REVERSE_ADD_SIGNED   0xf007
 use scaled destination plus source (signed)
 
#define GCM_TRANSFER_SURFACE   0
 
#define GCM_TRANSFER_SWIZZLE   1
 
#define GCM_TRANSFER_CONVERSION_DITHER   0
 Convert pixel component values using dithering.
 
#define GCM_TRANSFER_CONVERSION_TRUNCATE   1
 Convert pixel component values by truncation (ie, ignore lower bits).
 
#define GCM_TRANSFER_CONVERSION_SUBTRACT_TRUNCATE   2
 Convert pixel component values by subtraction/truncation.
 
#define GCM_TRANSFER_SCALE_FORMAT_A1R5G5B5   1
 Pixel format is 1-bit alpha, 5-bit red, 5-bit green, 5-bit blue.
 
#define GCM_TRANSFER_SCALE_FORMAT_X1R5G5B5   2
 Pixel format is 1-bit unused, 5-bit red, 5-bit green, 5-bit blue.
 
#define GCM_TRANSFER_SCALE_FORMAT_A8R8G8B8   3
 Pixel format is 8-bit alpha, 8-bit red, 8-bit green, 8-bit blue.
 
#define GCM_TRANSFER_SCALE_FORMAT_X8R8G8B8   4
 Pixel format is 8-bit unused, 8-bit red, 8-bit green, 8-bit blue.
 
#define GCM_TRANSFER_SCALE_FORMAT_CR8YB8CB8YA8   5
 Pixel format is 8-bit red chrominance, 8-bit luminance, 8-bit blue chrominance, 8-bit alpha.
 
#define GCM_TRANSFER_SCALE_FORMAT_YB8CR8YA8CB8   6
 Pixel format is 8-bit luminance, 8-bit red chrominance, 8-bit alpha, 8-bit blue chrominance.
 
#define GCM_TRANSFER_SCALE_FORMAT_R5G6B5   7
 Pixel format is 5-bit red, 6-bit green, 5-bit blue.
 
#define GCM_TRANSFER_SCALE_FORMAT_Y8   8
 Pixel format is 8-bit grayscale.
 
#define GCM_TRANSFER_SCALE_FORMAT_AY8   9
 Pixel format is 8-bit alpha.
 
#define GCM_TRANSFER_SCALE_FORMAT_EYB8ECR8EYA8ECB8   0xa
 Pixel format is EYB8ECR8EYA8ECB8.
 
#define GCM_TRANSFER_SCALE_FORMAT_ECR8EYB8ECB8EYA8   0xb
 Pixel format is ECR8EYB8ECB8EYA8.
 
#define GCM_TRANSFER_SCALE_FORMAT_A8B8G8R8   0xc
 Pixel format is 8-bit alpha, 8-bit blue, 8-bit green, 8-bit red.
 
#define GCM_TRANSFER_SCALE_FORMAT_X8B8G8R8   0xd
 Pixel format is 8-bit unused, 8-bit blue, 8-bit green, 8-bit red.
 
#define GCM_TRANSFER_OPERATION_SRCCOPY_AND   0
 Copy source image, perform logical AND with destination.
 
#define GCM_TRANSFER_OPERATION_ROP_AND   1
 Perform ROP (raster operation), and logical AND with destination.
 
#define GCM_TRANSFER_OPERATION_BLEND_AND   2
 Perform blending, and logical AND with destination.
 
#define GCM_TRANSFER_OPERATION_SRCCOPY   3
 Copy source image.
 
#define GCM_TRANSFER_OPERATION_SRCCOPY_PREMULT   4
 Copy pre-multiplied source image.
 
#define GCM_TRANSFER_OPERATION_BLEND_PREMULT   5
 Blend pre-multiplied source image.
 
#define GCM_TRANSFER_ORIGIN_CENTER   1
 Origin is the center of the source image.
 
#define GCM_TRANSFER_ORIGIN_CORNER   2
 Origin is the topleft cornet of the source image.
 
#define GCM_TRANSFER_INTERPOLATOR_NEAREST   0
 Use point sampling interpolation.
 
#define GCM_TRANSFER_INTERPOLATOR_LINEAR   1
 Use point linear interpolation.
 
#define GCM_TRANSFER_SURFACE_FORMAT_R5G6B5   4
 Source surface pixel format is 5-bit red, 6-bit green, 5-bit blue.
 
#define GCM_TRANSFER_SURFACE_FORMAT_A8R8G8B8   0xa
 Source surface pixel format is 8-bit alpha, 8-bit red, 8-bit green, 8-bit blue.
 
#define GCM_TRANSFER_SURFACE_FORMAT_Y32   0xb
 Source surface pixel format is Y32.
 

Typedefs

typedef s32(* gcmContextCallback) (struct _gcmCtxData *context, u32 count)
 
typedef struct _gcmCtxData gcmContextData
 RSX Context data structure. More...
 
typedef struct _gcmCtrlRegister gcmControlRegister
 RSX control data structure. More...
 
typedef struct _gcmCfg gcmConfiguration
 RSX Configuration structure. More...
 
typedef struct _gcmSurface gcmSurface
 RSX target surface data structure. More...
 
typedef struct _gcmTexture gcmTexture
 RSX Texture data structure.
 
typedef struct _gcmTransferScale gcmTransferScale
 Specify scaled image blit geometry and format for rsxSetTransferScaleSurface().
 
typedef struct _gcmTransferSurface gcmTransferSurface
 Specify destination surface characteristics for rsxSetTransferScaleSurface().
 
typedef struct _gcmTransferSwizzle gcmTransferSwizzle
 
typedef struct _gcmTileInfo gcmTileInfo
 
typedef struct _gcmZcullInfo gcmZcullInfo
 
typedef struct _gcmDisplayInfo gcmDisplayInfo
 Display information.
 
typedef struct _gcmOffsetTable gcmOffsetTable
 
typedef struct _gcmCast gcmCast
 
typedef struct _reportData gcmReportData
 
typedef struct _notifyData gcmNotifyData
 

Functions

s32 gcmInitBody (gcmContextData *ATTRIBUTE_PRXPTR *ctx, const u32 cmdSize, const u32 ioSize, const void *ioAddress)
 Initialize the RSX context. More...
 
s32 gcmAddressToOffset (void *address, u32 *offset)
 Converts an effective address in RSX memory to an offset. More...
 
s32 gcmMapMainMemory (const void *address, const u32 size, u32 *offset)
 Maps a memory block in main memory for RSX to access it. More...
 
s32 gcmGetConfiguration (gcmConfiguration *config)
 Retrieves the RSX configuration. More...
 
s32 gcmIoOffsetToAddress (u32 offset, u32 *address)
 Converts an offset to an effective address in RSX memory. More...
 
s32 gcmSetDisplayBuffer (u32 bufferId, u32 offset, u32 pitch, u32 width, u32 height)
 Configures a display framebuffer. More...
 
void gcmSetFlipMode (s32 mode)
 Set flip mode. More...
 
void gcmResetFlipStatus ()
 Reset the flip status.
 
s32 gcmGetFlipStatus ()
 Gets the flip status. Once a flip occurred, querying for a subsequent flip requires the flip status to be reset using gcmResetFlipStatus. More...
 
s32 gcmSetFlip (gcmContextData *context, u32 bufferId)
 Enqueues a flip command into the command buffer. More...
 
void gcmSetWaitFlip (gcmContextData *context)
 Wait for a flip to be completed. More...
 
u32 * gcmGetLabelAddress (const u8 index)
 Get address of specified label. More...
 
s32 gcmInitSystemMode (const u64 mode)
 
gcmControlRegistergcmGetControlRegister ()
 
u32 gcmGetTiledPitchSize (const u32 size)
 
void gcmSetVBlankHandler (void(*handler)(const u32 head))
 
void gcmSetSecondVHandler (void(*handler)(const u32 head))
 
void gcmSetGraphicsHandler (void(*handler)(const u32 val))
 
void gcmSetFlipHandler (void(*handler)(const u32 head))
 
void gcmSetQueueHandler (void(*handler)(const u32 head))
 
void gcmSetUserHandler (void(*handler)(const u32 cause))
 
void gcmSetDebugOutputLevel (s32 level)
 
void gcmGetOffsetTable (gcmOffsetTable *table)
 
s32 gcmSortRemapEaIoAddress ()
 
s32 gcmMapEaIoAddress (const void *ea, const u32 io, const u32 size)
 
s32 gcmUnmapIoAddress (const u32 io)
 
s32 gcmUnmapEaIoAddress (const void *ea)
 
s32 gcmMapEaIoAddressWithFlags (const void *ea, const u32 io, const u32 size, u32 userflags)
 
s32 gcmMapLocalMemory (void **address, u32 *size)
 
u32 gcmGetMaxIoMapSize ()
 
s32 gcmReserveIoMapSize (const u32 size)
 
s32 gcmUnreserveIoMapSize (const u32 size)
 
s64 gcmGetLastFlipTime ()
 
s32 gcmSetFlipImmediate (const u8 id)
 
void gcmSetFlipStatus ()
 
void gcmSetSecondVFrequency (const u32 freq)
 
s32 gcmGetDisplayBufferByFlipIndex (const u32 qid)
 
u64 gcmGetVBlankCount ()
 
s64 gcmGetLastSecondVTime ()
 
u32 gcmGetCurrentField ()
 
void gcmSetVBlankFrequency (const u32 freq)
 
s32 gcmGetCurrentDisplayBufferId (u8 *id)
 
s32 gcmInitCursor ()
 
s32 gcmSetCursorEnable ()
 
s32 gcmSetCursorDisable ()
 
s32 gcmSetCursorImageOffset (const u32 offset)
 
s32 gcmSetCursorPosition (const s32 x, const s32 y)
 
s32 gcmUpdateCursor ()
 
void cellGcmSetCurrentBuffer (const uint32_t *addr, const size_t size)
 
void gcmSetDefaultCommandBuffer ()
 
s32 gcmSetDefaultCommandBufferAndSegmentWordSize (const u32 bufferSize, const u32 segmentSize)
 
u32 gcmGetDefaultCommandWordSize ()
 
u32 gcmGetDefaultSegmentWordSize ()
 
s32 gcmInitDefaultFifoMode (s32 mode)
 
s32 gcmSetDefaultFifoSize (const u32 bufferSize, const u32 segmentSize)
 
u64 gcmGetTimeStamp (const u32 index)
 
u32 gcmGetReport (const u32 type, const u32 index)
 
void gcmSetTile (const u8 index, const u8 location, const u32 offset, const u32 size, const u32 pitch, const u8 comp, const u16 base, const u8 bank)
 
void gcmSetInvalidateTile (const u8 index)
 
void gcmSetZcull (const u8 index, const u32 offset, const u32 width, const u32 height, const u32 cullStart, const u32 zFormat, const u32 aaFormat, const u32 zCullDir, const u32 zCullFormat, const u32 sFunc, const u32 sRef, const u32 sMask)
 
s32 gcmSetTileInfo (const u8 index, const u8 location, const u32 offset, const u32 size, const u32 pitch, const u8 comp, const u16 base, const u8 bank)
 
s32 gcmBindTile (const u8 index)
 
s32 gcmUnbindTile (const u8 index)
 
s32 gcmBindZcull (const u8 index, const u32 offset, const u32 width, const u32 height, const u32 cullStart, const u32 zFormat, const u32 aaFormat, const u32 zCullDir, const u32 zCullFormat, const u32 sFunc, const u32 sRef, const u32 sMask)
 
s32 gcmUnbindZcull (const u8 index)
 
gcmReportDatagcmGetReportDataAddress (const u32 index)
 
gcmReportDatagcmGetReportDataAddressLocation (const u32 index, const u32 location)
 
u64 gcmGetTimeStampLocation (const u32 index, const u32 location)
 
u32 gcmGetReportDataLocation (const u32 index, const u32 location)
 
gcmNotifyDatagcmGetNotifyDataAddress (const u32 index)
 
const gcmTileInfogcmGetTileInfo ()
 
const gcmZcullInfogcmGetZcullInfo ()
 
const gcmDisplayInfogcmGetDisplayInfo ()
 
s32 gcmDumpGraphicsError ()
 
void gcmSetUserCommand (void(*handler)(const u32 cause))
 
u32 gcmSetPrepareFlip (const u8 id)
 

Detailed Description

RSX low level management.

Typedef Documentation

◆ gcmConfiguration

typedef struct _gcmCfg gcmConfiguration

RSX Configuration structure.

This structure holds system informations of RSX.

◆ gcmContextData

typedef struct _gcmCtxData gcmContextData

RSX Context data structure.

This structure is used for managing and controlling the command buffer.

◆ gcmControlRegister

RSX control data structure.

This structure is used to control the command buffer.

◆ gcmSurface

typedef struct _gcmSurface gcmSurface

RSX target surface data structure.

This structure holds settings of the render target that is to be the render buffer. Set the buffer to use for rendering by passing this structure as the argument when calling rsxSetSurface.

Function Documentation

◆ gcmAddressToOffset()

s32 gcmAddressToOffset ( void *  address,
u32 *  offset 
)

Converts an effective address in RSX memory to an offset.

Parameters
addressThe effective address to be converted.
offsetA pointer to the returned offset value.
Returns
zero if no error occured, nonzero otherwise.

◆ gcmGetConfiguration()

s32 gcmGetConfiguration ( gcmConfiguration config)

Retrieves the RSX configuration.

Parameters
configA pointer to the configuration structure to be updated.
Returns
zero if no error occured, nonzero otherwise.

◆ gcmGetFlipStatus()

s32 gcmGetFlipStatus ( )

Gets the flip status. Once a flip occurred, querying for a subsequent flip requires the flip status to be reset using gcmResetFlipStatus.

Returns
zero if a flip occured, nonzero otherwise.

◆ gcmGetLabelAddress()

u32* gcmGetLabelAddress ( const u8  index)

Get address of specified label.

Parameters
indexThe label index whose address is to be obtained.
Returns
Pointer to the label address.

◆ gcmInitBody()

s32 gcmInitBody ( gcmContextData *ATTRIBUTE_PRXPTR *  ctx,
const u32  cmdSize,
const u32  ioSize,
const void *  ioAddress 
)

Initialize the RSX context.

Parameters
ctxPointer to where the effective address of the allocated context structure will be stored.
cmdSizeThe command buffer size.
ioSizeThe allocated IO buffer size.
ioAddressPointer to an allocated buffer of ioSize bytes.
Returns
zero if no error occured, nonzero otherwise.

◆ gcmIoOffsetToAddress()

s32 gcmIoOffsetToAddress ( u32  offset,
u32 *  address 
)

Converts an offset to an effective address in RSX memory.

Parameters
offsetThe offset to be converted.
addressA pointer to the returned effective address.
Returns
zero if no error occured, nonzero otherwise.

◆ gcmMapMainMemory()

s32 gcmMapMainMemory ( const void *  address,
const u32  size,
u32 *  offset 
)

Maps a memory block in main memory for RSX to access it.

Parameters
addressPointer to the block to be mapped.
sizeSize of the block in bytes.
offsetA pointer to the returned mapped offset value.
Returns
zero if no error occured, nonzero otherwise.

◆ gcmSetDisplayBuffer()

s32 gcmSetDisplayBuffer ( u32  bufferId,
u32  offset,
u32  pitch,
u32  width,
u32  height 
)

Configures a display framebuffer.

Parameters
bufferIdThe buffer id (0-7).
offsetThe offset of the allocated memory block (see rsxAddressToOffset).
pitchThe size of a buffer line in bytes.
widthThe buffer width in pixels.
heightThe buffer height in pixels.
Returns
zero if no error occured, nonzero otherwise.

◆ gcmSetFlip()

s32 gcmSetFlip ( gcmContextData context,
u32  bufferId 
)

Enqueues a flip command into the command buffer.

Parameters
contextPointer to the context object.
bufferIdFramebuffer id to flip to (as configured with gcmSetDisplayBuffer).
Returns
zero if no error occured, nonzero otherwise.

◆ gcmSetFlipMode()

void gcmSetFlipMode ( s32  mode)

Set flip mode.

Parameters
modeThe specified flip mode. Possible vales are:

◆ gcmSetWaitFlip()

void gcmSetWaitFlip ( gcmContextData context)

Wait for a flip to be completed.

Parameters
contextPointer to the context object.