PS2SDK
PS2 Homebrew Libraries
|
#include <tamtypes.h>
Go to the source code of this file.
Macros | |
#define | GS_INIT_RESET 0 |
#define | GS_INIT_DRAW_RESET 1 |
#define | GS_NONINTERLACED 0x00 |
#define | GS_INTERLACED 0x01 |
#define | GS_FFMD_FIELD 0x00 |
#define | GS_FFMD_FRAME 0x01 |
#define | GS_DISABLE 0 |
#define | GS_ENABLE 1 |
#define | GS_PIXMODE_32 0 |
#define | GS_PIXMODE_24 1 |
#define | GS_PIXMODE_16 2 |
#define | GS_PIXMODE_16S 10 |
#define | GS_CLUT_32 0 |
#define | GS_CLUT_16 2 |
#define | GS_CLUT_16S 10 |
#define | GS_TEX_32 0 |
#define | GS_TEX_24 1 |
#define | GS_TEX_16 2 |
#define | GS_TEX_16S 10 |
#define | GS_TEX_8 19 |
#define | GS_TEX_4 20 |
#define | GS_TEX_8H 27 |
#define | GS_TEX_4HL 36 |
#define | GS_TEX_4HH 44 |
#define | GS_ZBUFF_32 48 |
#define | GS_ZBUFF_24 49 |
#define | GS_ZBUFF_16 50 |
#define | GS_ZBUFF_16S 58 |
#define | GS_TEX_CALC 0 |
#define | GS_TEX_FIXED 1 |
#define | GS_TEX_MIPMAP_DEFINE 0 |
#define | GS_TEX_MIPMAP_AUTO 1 |
#define | gs_p_pmode 0x12000000 |
#define | gs_p_smode1 0x12000010 |
#define | gs_p_smode2 0x12000020 |
#define | gs_p_dispfb1 0x12000070 |
#define | gs_p_display1 0x12000080 |
#define | gs_p_dispfb2 0x12000090 |
#define | gs_p_display2 0x120000a0 |
#define | gs_p_extbuf 0x120000b0 |
#define | gs_p_extdata 0x120000c0 |
#define | gs_p_extwrite 0x120000d0 |
#define | gs_p_bgcolor 0x120000e0 |
#define | gs_p_csr 0x12001000 |
#define | gs_p_imr 0x12001010 |
#define | gs_p_busdir 0x12001040 |
#define | gs_p_siglblid 0x12001080 |
#define | gs_g_prim 0x00 |
#define | gs_g_rgbaq 0x01 |
#define | gs_g_st 0x02 |
#define | gs_g_uv 0x03 |
#define | gs_g_xyzf2 0x04 |
#define | gs_g_xyz2 0x05 |
#define | gs_g_tex0_1 0x06 |
#define | gs_g_tex0_2 0x07 |
#define | gs_g_clamp_1 0x08 |
#define | gs_g_clamp_2 0x09 |
#define | gs_g_fog 0x0a |
#define | gs_g_xyzf3 0x0c |
#define | gs_g_xyz3 0x0d |
#define | gs_g_tex1_1 0x14 |
#define | gs_g_tex1_2 0x15 |
#define | gs_g_tex2_1 0x16 |
#define | gs_g_tex2_2 0x17 |
#define | gs_g_xyoffset_1 0x18 |
#define | gs_g_xyoffset_2 0x19 |
#define | gs_g_prmodecont 0x1a |
#define | gs_g_prmode 0x1b |
#define | gs_g_texclut 0x1c |
#define | gs_g_scanmsk 0x22 |
#define | gs_g_miptbp1_1 0x34 |
#define | gs_g_miptbp1_2 0x35 |
#define | gs_g_miptbp2_1 0x36 |
#define | gs_g_miptbp2_2 0x37 |
#define | gs_g_texa 0x3b |
#define | gs_g_fogcol 0x3d |
#define | gs_g_texflush 0x3f |
#define | gs_g_scissor_1 0x40 |
#define | gs_g_scissor_2 0x41 |
#define | gs_g_alpha_1 0x42 |
#define | gs_g_alpha_2 0x43 |
#define | gs_g_dimx 0x44 |
#define | gs_g_dthe 0x45 |
#define | gs_g_colclamp 0x46 |
#define | gs_g_test_1 0x47 |
#define | gs_g_test_2 0x48 |
#define | gs_g_pabe 0x49 |
#define | gs_g_fba_1 0x4a |
#define | gs_g_fba_2 0x4b |
#define | gs_g_frame_1 0x4c |
#define | gs_g_frame_2 0x4d |
#define | gs_g_zbuf_1 0x4e |
#define | gs_g_zbuf_2 0x4f |
#define | gs_g_bitbltbuf 0x50 |
#define | gs_g_trxpos 0x51 |
#define | gs_g_trxreg 0x52 |
#define | gs_g_trxdir 0x53 |
#define | gs_g_hwreg 0x54 |
#define | gs_g_signal 0x60 |
#define | gs_g_finish 0x61 |
#define | gs_g_label 0x62 |
#define | gs_g_nop 0x7f |
#define | gif_rd_ad 0x0e |
#define | gif_rd_nop 0x0f |
#define | GS_SET_PMODE(enable_rc1, enable_rc2, mmod, amod, blend_style, blend_value) |
#define | GS_SET_SMODE1(rc, lc, t1248, slck, cmod, ex, prst, sint, xpck, pck2, spml, gcont, phs, pvs, pehs, pevs, clksel, nvck, slck2, vcksel, vhp) |
#define | GS_SET_SMODE2(interlace, field_frame, vesta_dpms) |
#define | GS_SET_DISPFB1(address, width, psm, x, y) |
#define | GS_SET_DISPFB2(address, width, psm, x, y) |
#define | GS_SET_DISPLAY1(display_x, display_y, magnify_h, magnify_v, display_w, display_h) |
#define | GS_SET_DISPLAY2(display_x, display_y, magnify_h, magnify_v, display_w, display_h) |
#define | GS_SET_EXTBUF(A, B, C, D, E, F, G, H) |
#define | GS_SET_EXTDATA(x, y, sample_r_h, sample_r_v, write_w, write_h) |
#define | GS_SET_EXTWRITE(write) |
#define | GS_SET_BGCOLOR(r, g, b) |
#define | GS_SET_CSR(signal_evnt, finish_evnt, hsync_intrupt, vsync_intrupt, write_terminate, flush, reset, nfield, current_field, fifo_status, gs_rev_number, gs_id) |
#define | GS_SET_IMR(signal_mask, finish_mask, hsync_mask, vsync_mask, write_mask, exhs_mask, exvs_mask) |
#define | GS_SET_BUSDIR(direction) |
#define | GS_SET_SIGLBLID(signal_id, label_id) |
#define | GS_SET_CSR_signal_evnt(val) GS_SET_CSR(val,0,0,0,0,0,0,0,0,0,0,0) |
#define | GS_SET_CSR_finish_evnt(val) GS_SET_CSR(0,val,0,0,0,0,0,0,0,0,0,0) |
#define | GS_SET_CSR_hsync_intrupt(val) GS_SET_CSR(0,0,val,0,0,0,0,0,0,0,0,0) |
#define | GS_SET_CSR_vsync_intrupt(val) GS_SET_CSR(0,0,0,val,0,0,0,0,0,0,0,0) |
#define | GS_SET_CSR_write_terminate(val) GS_SET_CSR(0,0,0,0,val,0,0,0,0,0,0,0) |
#define | GS_SET_CSR_flush(val) GS_SET_CSR(0,0,0,0,0,val,0,0,0,0,0,0) |
#define | GS_SET_CSR_reset(val) GS_SET_CSR(0,0,0,0,0,0,val,0,0,0,0,0) |
#define | GS_GET_CSR_signal_evnt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 0)) |
#define | GS_GET_CSR_finish_evnt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 1)) |
#define | GS_GET_CSR_hsync_intrupt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 2)) |
#define | GS_GET_CSR_vsync_intrupt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 3)) |
#define | GS_GET_CSR_write_terminate (*((vu64 *)(gs_p_csr)) & (0x00000001 << 4)) |
#define | GS_GET_CSR_write_nfield (*((vu64 *)(gs_p_csr)) & (0x00000001 << 12)) |
#define | GS_GET_CSR_current_field (*((vu64 *)(gs_p_csr)) & (0x00000001 << 13)) |
#define | GS_GET_CSR_fifo_status (*((vu64 *)(gs_p_csr)) & (0x00000003 << 14)) |
#define | GS_GET_CSR_gs_rev_number (*((vu64 *)(gs_p_csr)) & (0x000000FF << 16)) |
#define | GS_GET_CSR_gs_id (*((vu64 *)(gs_p_csr)) & (0x000000FF << 24)) |
#define | gs_setPRIM(p, _prim_type, _iip, _tme, _fge, _abe, _aa1, _fst, _ctxt, _fix) |
#define | gs_setRGBAQ(p, _r, _g, _b, _a, _q) |
#define | gs_setST(p, _s, _t) |
#define | gs_setUV(p, _u, _v) |
#define | gs_setXYZF2(p, _x, _y, _z, _f) |
#define | gs_setXYZF3(p, _x, _y, _z, _f) |
#define | gs_setXYZ2(p, _x, _y, _z) |
#define | gs_setXYZ3(p, _x, _y, _z) |
#define | gs_setTEX0_1(p, _tb_addr, _tb_width, _psm, _tex_width, _tex_height, _tex_cc, _tex_funtion, _cb_addr, _clut_pixmode, _clut_smode, _clut_offset, _clut_loadmode) |
#define | gs_setTEX0_2 gs_setTEX0_1 |
#define | gs_setCLAMP_1(p, wms, wmt, minu, maxu, minv, maxv) |
#define | gs_setCLAMP_2 gs_setCLAMP_1 |
#define | gs_setFOG(p, _f) (p)->f = _f |
#define | gs_setTEX1_1(p, _lcm, _mxl, _mmag, _mmin, _mtba, _l, _k) |
#define | gs_setTEX1_2 gs_setTEX1_1 |
#define | gs_setTEX2_1(p, _psm, _cbp, _cpsm, _csm, _csa, _cld) |
#define | gs_setTEX2_2 gs_setTEX2_1 |
#define | gs_set_XYOFFSET_1(p, _offset_x, _offset_y) |
#define | gs_set_XYOFFSET_2 gs_set_XYOFFSET_1 |
#define | gs_set_PRMODECONT(p, _control) (p)->control = _control |
#define | gs_setPRMODE(p, _iip, _tme, _fge, _abe, _aa1, _fst, _ctxt, _fix) |
#define | gs_setTEXCLUT(p, _cbw, _cou, _cov) |
#define | gs_setSCANMSK(p, _msk) (p)->msk = _msk |
#define | gs_setMIPTBP1_1(p, _tbp1, _tbw1, _tbp2, _tbw2, _tbp3, _tbw3) |
#define | gs_setMIPTBP1_2 gs_setMIPTBP1_1 |
#define | gs_setMIPTBP2_1(p, _tbp4, _tbw4, _tbp5, _tbw5, _tbp6, _tbw6) |
#define | gs_setMIPTBP2_2 gs_setMIPTBP2_1 |
#define | gs_setTEXA(p, _alpha_0, _alpha_method, _alpha_1) |
#define | gs_setFOGCOLOR(p, _r, _g, _b) |
#define | gs_setTEXFLUSH(p) |
#define | gs_setSCISSOR_1(p, _clip_x0, _clip_x1, _clip_y0, _clip_y1) |
#define | gs_setSCISSOR_2 gs_setSCISSOR_1 |
#define | gs_setALPHA_1(p, _a, _b, _c, _d, _alpha) |
#define | gs_setALPHA_2 gs_setALPHA_1 |
#define | gs_setDIMX(p, _dimx00, _dimx01, _dimx02, _dimx03, _dimx10, _dimx11, _dimx12, _dimx13, _dimx20, _dimx21, _dimx22, _dimx23, _dimx30, _dimx31, _dimx32, _dimx33) |
#define | gs_setDTHE(p, _enable) (p)->enable = _enable |
#define | gs_setCOLCLAMP(p, _clamp) (p)->clamp = _clamp |
#define | gs_setTEST_1(p, _atest_enable, _atest_method, _atest_reference, _atest_fail_method, _datest_enable, _datest_mode, _ztest_enable, _ztest_method) |
#define | gs_setTEST_2 gs_setTEST_1 |
#define | gs_setPABE(p, _enable) (p)->enable = _enable |
#define | gs_setFBA(p, _alpha) (p)->alpha = _alpha |
#define | gs_setFRAME_1(p, _fb_addr, _fb_width, _psm, _draw_mask) |
#define | gs_setFRAME_2 gs_setFRAME_1 |
#define | gs_setZBUF_1(p, _fb_addr, _psm, _update_mask) |
#define | gs_setZBUF_2 gs_setZBUF_1 |
#define | gs_setBITBLTBUF(p, _src_addr, _src_width, _src_pixmode, _dest_addr, _dest_width, _dest_pixmode) |
#define | gs_setTRXPOS(p, _src_x, _src_y, _dest_x, _dest_y, _direction) |
#define | gs_setTRXREG(p, _trans_w, _trans_h) |
#define | gs_setTRXDIR(p, _trans_dir) (p)->trans_dir = _trans_dir |
#define | gs_setHWREG(p, _data) (p)->data = _data |
#define | gs_setSIGNAL(p, _signal_id, _update_mask) |
#define | gs_setFINISH(p) (p)->pad0 = 0 |
#define | gs_setLABEL(p, _label_id, _update_mask) |
#define | gs_setNOP(p) (p)->pad0 = 0 |
#define | gs_setR_PRIM(p, _prim_type, _iip, _tme, _fge, _abe, _aa1, _fst, _ctxt, _fix) |
#define | gs_setR_RGBAQ(p, _r, _g, _b, _a, _q) |
#define | gs_setR_ST(p, _s, _t) |
#define | gs_setR_UV(p, _u, _v) |
#define | gs_setR_XYZF2(p, _x, _y, _z, _f) |
#define | gs_setR_XYZF3(p, _x, _y, _z, _f) |
#define | gs_setR_XYZ2(p, _x, _y, _z) |
#define | gs_setR_XYZ3(p, _x, _y, _z) |
#define | gs_setR_TEX0_1(p, _fb_addr, _fb_width, _psm, _tex_width, _tex_height, _col_comp, _tex_cc, _clutb_addr, _clut_pixmode, _clut_smode, _clut_offset, _cld) |
#define | gs_setR_TEX0_2(p, _fb_addr, _fb_width, _psm, _tex_width, _tex_height, _col_comp, _tex_cc, _clutb_addr, _clut_pixmode, _clut_smode, _clut_offset, _cld) |
#define | gs_setR_CLAMP_1(p, wms, wmt, minu, maxu, minv, maxv) |
#define | gs_setR_CLAMP_2(p, wms, wmt, minu, maxu, minv, maxv) |
#define | gs_setR_FOG(p, _f) |
#define | gs_setR_TEX1_1(p, _lcm, _mxl, _mmag, _mmin, _mtba, _l, _k) |
#define | gs_setR_TEX1_2(p, _lcm, _mxl, _mmag, _mmin, _mtba, _l, _k) |
#define | gs_setR_TEX2_1(p, _psm, _cbp, _cpsm, _csm, _csa, _cld) |
#define | gs_setR_TEX2_2(p, _psm, _cbp, _cpsm, _csm, _csa, _cld) |
#define | gs_setR_XYOFFSET_1(p, _offset_x, _offset_y) |
#define | gs_setR_XYOFFSET_2(p, _offset_x, _offset_y) |
#define | gs_setR_PRMODECONT(p, _control) |
#define | gs_setR_PRMODE(p, _iip, _tme, _fge, _abe, _aa1, _fst, _ctxt, _fix) |
#define | gs_setR_TEXCLUT(p, _cbw, _cou, _cov) |
#define | gs_setR_SCANMSK(p, _msk) |
#define | gs_setR_MIPTBP1_1(p, _tbp1, _tbw1, _tbp2, _tbw2, _tbp3, _tbw3) |
#define | gs_setR_MIPTBP1_2(p, _tbp1, _tbw1, _tbp2, _tbw2, _tbp3, _tbw3) |
#define | gs_setR_MIPTBP2_1(p, _tbp4, _tbw4, _tbp5, _tbw5, _tbp6, _tbw6) |
#define | gs_setR_MIPTBP2_2(p, _tbp4, _tbw4, _tbp5, _tbw5, _tbp6, _tbw6) |
#define | gs_setR_TEXA(p, _ta0, _aem, _ta1) |
#define | gs_setR_FOGCOLOR(p, _r, _g, _b) |
#define | gs_setR_TEXFLUSH(p) (p)->reg = gs_g_texflush |
#define | gs_setR_SCISSOR_1(p, _clip_x0, _clip_x1, _clip_y0, _clip_y1) |
#define | gs_setR_SCISSOR_2(p, _clip_x0, _clip_x1, _clip_y0, _clip_y1) |
#define | gs_setR_ALPHA_1(p, _a, _b, _c, _d, _fix) |
#define | gs_setR_ALPHA_2(p, _a, _b, _c, _d, _fix) |
#define | gs_setR_DIMX(p, _dimx00, _dimx01, _dimx02, _dimx03, _dimx10, _dimx11, _dimx12, _dimx13, _dimx20, _dimx21, _dimx22, _dimx23, _dimx30, _dimx31, _dimx32, _dimx33) |
#define | gs_setR_DTHE(p, _enable) |
#define | gs_setR_COLCLAMP(p, _clamp) |
#define | gs_setR_TEST_1(p, _ATE, _ATST, _AREF, _AFAIL, _DATE, _DATM, _ZTE, _ZTST) |
#define | gs_setR_TEST_2(p, _ATE, _ATST, _AREF, _AFAIL, _DATE, _DATM, _ZTE, _ZTST) |
#define | gs_setR_PABE(p, _enable) |
#define | gs_setR_FBA_1(p, _alpha) |
#define | gs_setR_FBA_2(p, _alpha) |
#define | gs_setR_FRAME_1(p, _fb_addr, _fb_width, _psm, _draw_mask) |
#define | gs_setR_FRAME_2(p, _fb_addr, _fb_width, _psm, _draw_mask) |
#define | gs_setR_ZBUF_1(p, _fb_addr, _psm, _update_mask) |
#define | gs_setR_ZBUF_2(p, _fb_addr, _psm, _update_mask) |
#define | gs_setR_BITBLTBUF(p, _src_addr, _src_width, _src_pixmode, _dest_addr, _dest_width, _dest_pixmode) |
#define | gs_setR_TRXPOS(p, _src_x, _src_y, _dest_x, _dest_y, _direction) |
#define | gs_setR_TRXREG(p, _trans_w, _trans_h) |
#define | gs_setR_TRXDIR(p, _trans_dir) |
#define | gs_setR_HWREG(p, _data) |
#define | gs_setR_SIGNAL(p, _signal_id, _update_mask) |
#define | gs_setR_FINISH(p) (p)->reg = gs_g_finish |
#define | gs_setR_LABEL(p, _label_id, _update_mask) |
#define | gs_setR_NOP(p) |
#define | gs_setGIF_TAG(p, _nloop, _eop, _pre, _prim, _flg, _nreg, _reg) |
#define | CRTC_SETTINGS_DEFAULT1 CRTC_SETTINGS_EN1|CRTC_SETTINGS_BLENDVAL|CRTC_SETTINGS_OUTRC1|CRTC_SETTINGS_STYLERC1 |
#define | CRTC_SETTINGS_DEFAULT2 CRTC_SETTINGS_EN2|CRTC_SETTINGS_BLENDVAL|CRTC_SETTINGS_OUTRC1|CRTC_SETTINGS_STYLERC1 |
#define | CRTC_SETTINGS_EN1 ((u64)(1)<<0) |
#define | CRTC_SETTINGS_EN2 ((u64)(1)<<1) |
#define | CRTC_SETTINGS_ENBOTH CRTC_SETTINGS_EN1|CRTC_SETTINGS_EN2 |
#define | CRTC_SETTINGS_BLENDRC1 ((u64)(0)<<5) |
#define | CRTC_SETTINGS_BLENDVAL ((u64)(1)<<5) |
#define | CRTC_SETTINGS_OUTRC1 ((u64)(0)<<6) |
#define | CRTC_SETTINGS_OUTRC2 ((u64)(1)<<6) |
#define | CRTC_SETTINGS_STYLERC1 ((u64)(0)<<7) |
#define | CRTC_SETTINGS_STYLEBG ((u64)(1)<<7) |
#define | GS_PACKET_DATA_QWORD_MAX 32000 |
Enumerations | |
enum | GsVideoModes { GS_MODE_NTSC = 0x02 , GS_MODE_PAL , GS_MODE_DTV_480P = 0x50 } |
enum | GsPrimitiveTypes { GS_PRIM_POINT =0 , GS_PRIM_LINE , GS_PRIM_LINE_STRIP , GS_PRIM_TRI , GS_PRIM_TRI_STRIP , GS_PRIM_TRI_FAN , GS_PRIM_SPRITE } |
enum | GsATestMethods { GS_ALPHA_NEVER =0 , GS_ALPHA_ALWAYS , GS_ALPHA_LESS , GS_ALPHA_LEQUAL , GS_ALPHA_EQUAL , GS_ALPHA_GEQUAL , GS_ALPHA_GREATER , GS_ALPHA_NOTEQUAL } |
enum | GsATestFailedUpdateMethods { GS_ALPHA_NO_UPDATE =0 , GS_ALPHA_FB_ONLY , GS_ALPHA_ZB_ONLY , GS_ALPHA_RGB_ONLY } |
enum | GsZTestMethodTypes { GS_ZBUFF_NEVER =0 , GS_ZBUFF_ALWAYS , GS_ZBUFF_GEQUAL , GS_ZBUFF_GREATER } |
enum | GsTexMipmaps { GS_TEX_MIPMAP0 =0 , GS_TEX_MIPMAP1 , GS_TEX_MIPMAP2 , GS_TEX_MIPMAP3 , GS_TEX_MIPMAP4 , GS_TEX_MIPMAP5 , GS_TEX_MIPMAP6 } |
enum | GsTexFilterMethods { GS_TEX_NEAREST =0 , GS_TEX_LINEAR , GS_TEX_NEAREST_MIPMAP_NEAREST , GS_TEX_NEAREST_MIPMAP_LINEAR , GS_TEX_LINEAR_MIPMAP_NEAREST , GS_TEX_LINEAR_MIPMAP_LINEAR } |
enum | GsTexFunctions { GS_TEX_MODULATE =0 , GS_TEX_DECAL , GS_TEX_HIGHLIHGT1 , GS_TEX_HIGHLIHGT2 } |
enum | GsGifDataFormat { GS_GIF_PACKED =0 , GS_GIF_REGLIST , GS_GIF_IMAGE , GS_GIF_DISABLE } |
Functions | |
struct _GS_GIF_DMACHAIN_TAG | __attribute__ ((aligned(16))) |
int | GsSetXYOffset1 (u16 x, u16 y) |
int | GsSetXYOffset2 (u16 x, u16 y) |
int | GsSetScissor1 (u16 upper_x, u16 upper_y, u16 lower_x, u16 lower_y) |
int | GsSetScissor2 (u16 upper_x, u16 upper_y, u16 lower_x, u16 lower_y) |
int | GsSetFrame1 (u16 framebuffer_addr, u8 framebuffer_width, u8 psm, u32 draw_mask) |
int | GsSetFrame2 (u16 framebuffer_addr, u8 framebuffer_width, u8 psm, u32 draw_mask) |
int | GsTextureFlush (void) |
int | GsSetPixelTest1 (u8 enable_alpha_test, u8 alpha_test_method, u8 alpha_reference, u8 alpha_fail_method, u8 enable_dest_alpha_test, u8 dest_alpha_test_mode, u8 enable_zbuff_test, u8 alpha_zbuff_method) |
int | GsSetPixelTest2 (u8 enable_alpha_test, u8 alpha_test_method, u8 alpha_reference, u8 alpha_fail_method, u8 enable_dest_alpha_test, u8 dest_alpha_test_mode, u8 enable_zbuff_test, u8 alpha_zbuff_method) |
int | GsSelectTexure1 (u16 tex_addr, u8 addr_width, u8 tex_pixmode, u16 tex_width, u16 tex_height, u16 clut_addr, u8 clut_pixmode, u8 clut_storagemode, u8 clut_offset) |
int | GsSelectTexure2 (u16 tex_addr, u8 addr_width, u8 tex_pixmode, u16 tex_width, u16 tex_height, u16 clut_addr, u8 clut_pixmode, u8 clut_storagemode, u8 clut_offset) |
void | GsSetFogColor (u8 r, u8 g, u8 b) |
void | GsEnableColorClamp (u16 enable) |
GsGParam_t * | GsGetGParam (void) |
void | GsResetGraph (short int mode, short int interlace, short int omode, short int ffmode) |
void | GsResetPath (void) |
void | GsSetCRTCSettings (u64 settings, u8 alpha_value) |
void | GsSetDefaultDrawEnv (GS_DRAWENV *drawenv, u16 psm, u16 w, u16 h) |
void | GsSetDefaultDrawEnvAddress (GS_DRAWENV *drawenv, u16 vram_addr) |
void | GsSetDefaultDisplayEnv (GS_DISPENV *dispenv, u16 psm, u16 w, u16 h, u16 dx, u16 dy) |
void | GsSetDefaultDisplayEnvAddress (GS_DISPENV *dispenv, u16 vram_addr) |
void | GsSetDefaultZBufferEnv (GS_ZENV *zenv, u8 update_mask) |
void | GsSetDefaultZBufferEnvAddress (GS_ZENV *zenv, u16 vram_addr, u8 psm) |
void | GsPutDrawEnv1 (GS_DRAWENV *drawenv) |
void | GsPutDrawEnv2 (GS_DRAWENV *drawenv) |
void | GsPutDisplayEnv1 (GS_DISPENV *dispenv) |
void | GsPutDisplayEnv2 (GS_DISPENV *dispenv) |
void | GsPutZBufferEnv1 (GS_ZENV *zenv) |
void | GsPutZBufferEnv2 (GS_ZENV *zenv) |
void | GsClearDrawEnv1 (GS_DRAWENV *drawenv) |
void | GsClearDrawEnv2 (GS_DRAWENV *drawenv) |
QWORD * | GsGifPacketsAlloc (GS_PACKET_TABLE *table, u32 num_qwords) |
void | GsGifPacketsClear (GS_PACKET_TABLE *table) |
int | GsGifPacketsExecute (GS_PACKET_TABLE *table, u16 wait) |
int | GsLoadImage (const void *source_addr, GS_IMAGE *dest) |
void | GsOverridePrimAttributes (s8 override, s8 iip, s8 tme, s8 fge, s8 abe, s8 aa1, s8 fst, s8 ctxt, s8 fix) |
void | GsEnableDithering (u8 enable, int mode) |
void | GsEnableAlphaTransparency1 (u16 enable, u16 method, u8 alpha_ref, u16 fail_method) |
void | GsEnableAlphaTransparency2 (u16 enable, u16 method, u8 alpha_ref, u16 fail_method) |
void | GsEnableZbuffer1 (u16 enable, u16 test_method) |
void | GsEnableZbuffer2 (u16 enable, u16 test_method) |
void | GsEnableAlphaBlending1 (u16 enable) |
void | GsEnableAlphaBlending2 (u16 enable) |
void | GsDrawSync (int mode) |
void | GsHSync (int mode) |
void | GsVSync (int mode) |
int | GsVramAllocFrameBuffer (s16 w, s16 h, s16 psm) |
int | GsVramAllocTextureBuffer (s16 w, s16 h, s16 psm) |
void | GsVramFreeAllTextureBuffer (void) |
void | GsVramFreeAll (void) |
int | GsDbGetDrawBuffer (void) |
int | GsDbGetDisplayBuffer (void) |
void | GsDbSwapBuffer (void) |
Variables | |
typedef | __attribute__ |
u64 | qwc |
u64 | pad1 |
u64 | pce |
u64 | id |
u64 | irq |
u64 | addr |
u64 | spr |
u64 | pad2 |
GS library functions.
Definition in file libgs.h.
struct GsGParam_t |
struct GS_PMODE |
struct GS_SMODE1 |
struct GS_SMODE2 |
struct GS_DISPFB |
struct GS_DISPLAY |
struct GS_EXTBUF |
struct GS_EXTDATA |
Data Fields | ||
---|---|---|
u32 | x:12 |
X coord where image is written to |
u32 | y:11 |
Y coord where image is written to |
u32 | sample_r_h:4 |
Horizontal Smaple Rate(VK units) |
u32 | sample_r_v:2 |
Vertical Smaple Rate |
u32 | pad1:3 |
Pad with zeros |
u32 | write_w:12 |
Width of area to write |
u32 | write_h:11 |
Height of area to write |
u32 | pad2:9 |
Pad with zeros |
struct GS_EXTWRITE |
struct GS_BGCOLOR |
struct GS_CSR |
struct GS_IMR |
struct GS_BUSDIR |
struct GS_PRIM |
struct GS_UV |
struct GS_TEX0 |
struct GS_CLAMP |
struct GS_TEX1 |
struct GS_TEX2 |
struct GS_XYOFFSET |
struct GS_PRMODE |
struct GS_TEXCLUT |
struct GS_MIPTBP1 |
struct GS_MIPTBP2 |
struct GS_TEXA |
struct GS_FOGCOLOR |
struct GS_SCISSOR |
struct GS_ALPHA |
struct GS_DIMX |
struct GS_TEST |
struct GS_FRAME |
struct GS_ZBUF |
struct GS_BITBLTBUF |
struct GS_TRXPOS |
struct GS_TRXREG |
struct GS_R_PRIM |
struct GS_R_RGBAQ |
struct GS_R_ST |
struct GS_R_UV |
struct GS_R_XYZF |
struct GS_R_XYZ |
struct GS_R_TEX0 |
struct GS_R_CLAMP |
struct GS_R_FOG |
struct GS_R_TEX1 |
struct GS_R_TEX2 |
struct GS_R_XYOFFSET |
struct GS_R_PRMODECONT |
struct GS_R_PRMODE |
struct GS_R_TEXCLUT |
struct GS_R_SCANMSK |
struct GS_R_MIPTBP1 |
struct GS_R_MIPTBP2 |
struct GS_R_TEXA |
struct GS_R_FOGCOLOR |
struct GS_R_TEXFLUSH |
struct GS_R_SCISSOR |
struct GS_R_ALPHA |
struct GS_R_DIMX |
struct GS_R_DTHE |
struct GS_R_COLCLAMP |
struct GS_R_TEST |
struct GS_R_PABE |
struct GS_R_FBA |
struct GS_R_FRAME |
struct GS_R_ZBUF |
struct GS_R_BITBLTBUF |
struct GS_R_TRXPOS |
struct GS_R_TRXREG |
struct GS_R_TRXDIR |
struct GS_R_HWREG |
struct GS_R_SIGNAL |
struct GS_R_FINISH |
struct GS_R_LABEL |
struct GS_R_NOP |
struct _GS_GIF_DMACHAIN_TAG |
struct GS_GIF_TAG |
struct GS_ZENV |
struct GS_DRAWENV |
struct GS_DISPENV |
struct GS_POINT_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
primitive attributes |
GS_R_RGBAQ | rgbaq0 |
point Color |
GS_R_XYZ | xyz0 |
vertex coordinate |
struct GS_POINT |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
point color |
GS_R_XYZ | xyz0 |
Primative vertex coordinate |
struct GS_LINE_F1_P |
struct GS_LINE_F1 |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
line color |
GS_R_XYZ | xyz0 |
vertex coordinate |
GS_R_XYZ | xyz1 |
vertex coordinate |
struct GS_LINE_G1_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
primitive attributes |
GS_R_RGBAQ | rgbaq0 |
vertex 0 color |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_RGBAQ | rgbaq1 |
vertex 1 color |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
struct GS_LINE_G1 |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
vertex 0 color |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_RGBAQ | rgbaq1 |
vertex 1 color |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
struct GS_TRIANGLE_F3_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
primitive attributes |
GS_R_RGBAQ | rgbaq0 |
tringle color |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_F3 |
struct GS_TRIANGLE_FT3_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
primitive attributes |
GS_R_RGBAQ | rgbaq0 |
triangle color |
GS_R_UV | uv0 |
vertex 0 texture coordinate |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_UV | uv1 |
vertex 1 texture coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_UV | uv2 |
vertex 2 texture coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_FT3 |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
triangle color |
GS_R_UV | uv0 |
vertex 0 texture coordinate |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_UV | uv1 |
vertex 1 texture coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_UV | uv2 |
vertex 2 texture coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_FT3ST_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
primitive attributes |
GS_R_RGBAQ | rgbaq0 |
triangle color |
GS_R_ST | st0 |
vertex 0 texture coordinate |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_ST | st1 |
vertex 1 texture coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_ST | st2 |
vertex 2 texture coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_FT3ST |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
triangle color |
GS_R_ST | st0 |
vertex 0 texture coordinate |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_ST | st1 |
vertex 1 texture coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_ST | st2 |
vertex 2 texture coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_G3_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
primitive attributes |
GS_R_RGBAQ | rgbaq0 |
vertex 0 color |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_RGBAQ | rgbaq1 |
vertex 1 color |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_RGBAQ | rgbaq2 |
vertex 2 color |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_G3 |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
vertex 0 color |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_RGBAQ | rgbaq1 |
vertex 1 color |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_RGBAQ | rgbaq2 |
vertex 2 color |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_GT3ST_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
Primitive Attributes |
GS_R_RGBAQ | rgbaq0 |
Vertex 0 Color |
GS_R_ST | st0 |
vertex 0 texture coordinate |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_RGBAQ | rgbaq1 |
Vertex 1 Color |
GS_R_ST | st1 |
vertex 1 texture coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_RGBAQ | rgbaq2 |
Vertex 2 Color |
GS_R_ST | st2 |
vertex 2 texture coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_TRIANGLE_GT3ST |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
Vertex 0 Color |
GS_R_ST | st0 |
vertex 0 texture coordinate |
GS_R_XYZ | xyz0 |
vertex 0 coordinate |
GS_R_RGBAQ | rgbaq1 |
Vertex 1 Color |
GS_R_ST | st1 |
vertex 1 texture coordinate |
GS_R_XYZ | xyz1 |
vertex 1 coordinate |
GS_R_RGBAQ | rgbaq2 |
Vertex 2 Color |
GS_R_ST | st2 |
vertex 2 texture coordinate |
GS_R_XYZ | xyz2 |
vertex 2 coordinate |
struct GS_SPRITE_F4_P |
struct GS_SPRITE_F4 |
Data Fields | ||
---|---|---|
GS_R_RGBAQ | rgbaq0 |
Vertex 1 Color |
GS_R_XYZ | xyz0 |
vertex 1 coordinate(upper left) |
GS_R_XYZ | xyz1 |
vertex 2 coordinate(lower right) |
struct GS_SPRITE_FT4_P |
Data Fields | ||
---|---|---|
GS_R_PRIM | prim |
Primitive Attributes |
GS_R_RGBAQ | rgbaq0 |
sprite Color |
GS_R_UV | uv0 |
vertex 0 Texture Coordinate(upper left) |
GS_R_XYZ | xyz0 |
vertex 0 coordinate(upper left) |
GS_R_UV | uv1 |
vertex 1 Texture Coordinate(lower right) |
GS_R_XYZ | xyz1 |
vertex 1 coordinate(lower right) |
struct GS_SPRITE_FT4 |
struct GS_GIF_PACKET |
struct GS_PACKET_TABLE |
Data Fields | ||
---|---|---|
u32 | packet_count | |
u32 | packet_offset | |
u32 | qword_offset | |
GS_GIF_PACKET * | packets |
struct GS_IMAGE |
#define GS_INIT_DRAW_RESET 1 |
#define GS_FFMD_FIELD 0x00 |
#define GS_FFMD_FRAME 0x01 |
#define gs_p_smode1 0x12000010 |
#define gs_p_smode2 0x12000020 |
#define gs_p_dispfb1 0x12000070 |
#define gs_p_display1 0x12000080 |
#define gs_p_dispfb2 0x12000090 |
#define gs_p_display2 0x120000a0 |
#define gs_p_busdir 0x12001040 |
#define gs_g_prim 0x00 |
#define gs_g_xyzf2 0x04 |
#define gs_g_xyz2 0x05 |
#define gs_g_tex0_1 0x06 |
#define gs_g_tex0_2 0x07 |
#define gs_g_clamp_1 0x08 |
#define gs_g_clamp_2 0x09 |
#define gs_g_xyzf3 0x0c |
#define gs_g_tex2_1 0x16 |
#define gs_g_tex2_2 0x17 |
#define gs_g_xyoffset_1 0x18 |
#define gs_g_xyoffset_2 0x19 |
#define gs_g_prmodecont 0x1a |
#define gs_g_prmode 0x1b |
#define gs_g_scanmsk 0x22 |
#define gs_g_miptbp1_1 0x34 |
#define gs_g_miptbp1_2 0x35 |
#define gs_g_miptbp2_1 0x36 |
#define gs_g_miptbp2_2 0x37 |
#define gs_g_scissor_1 0x40 |
#define gs_g_scissor_2 0x41 |
#define gs_g_alpha_1 0x42 |
#define gs_g_alpha_2 0x43 |
#define gs_g_test_1 0x47 |
#define gs_g_test_2 0x48 |
#define gs_g_bitbltbuf 0x50 |
#define gs_g_trxreg 0x52 |
#define gs_g_nop 0x7f |
#define GS_SET_PMODE | ( | enable_rc1, | |
enable_rc2, | |||
mmod, | |||
amod, | |||
blend_style, | |||
blend_value | |||
) |
#define GS_SET_SMODE1 | ( | rc, | |
lc, | |||
t1248, | |||
slck, | |||
cmod, | |||
ex, | |||
prst, | |||
sint, | |||
xpck, | |||
pck2, | |||
spml, | |||
gcont, | |||
phs, | |||
pvs, | |||
pehs, | |||
pevs, | |||
clksel, | |||
nvck, | |||
slck2, | |||
vcksel, | |||
vhp | |||
) |
Set by SetGsCrt(). DO NOT SET MANUALLY!!
#define GS_SET_SMODE2 | ( | interlace, | |
field_frame, | |||
vesta_dpms | |||
) |
#define GS_SET_DISPFB1 | ( | address, | |
width, | |||
psm, | |||
x, | |||
y | |||
) |
#define GS_SET_DISPFB2 | ( | address, | |
width, | |||
psm, | |||
x, | |||
y | |||
) |
#define GS_SET_DISPLAY1 | ( | display_x, | |
display_y, | |||
magnify_h, | |||
magnify_v, | |||
display_w, | |||
display_h | |||
) |
#define GS_SET_DISPLAY2 | ( | display_x, | |
display_y, | |||
magnify_h, | |||
magnify_v, | |||
display_w, | |||
display_h | |||
) |
#define GS_SET_EXTBUF | ( | A, | |
B, | |||
C, | |||
D, | |||
E, | |||
F, | |||
G, | |||
H | |||
) |
#define GS_SET_EXTDATA | ( | x, | |
y, | |||
sample_r_h, | |||
sample_r_v, | |||
write_w, | |||
write_h | |||
) |
#define GS_SET_EXTWRITE | ( | write | ) |
#define GS_SET_BGCOLOR | ( | r, | |
g, | |||
b | |||
) |
#define GS_SET_CSR | ( | signal_evnt, | |
finish_evnt, | |||
hsync_intrupt, | |||
vsync_intrupt, | |||
write_terminate, | |||
flush, | |||
reset, | |||
nfield, | |||
current_field, | |||
fifo_status, | |||
gs_rev_number, | |||
gs_id | |||
) |
#define GS_SET_IMR | ( | signal_mask, | |
finish_mask, | |||
hsync_mask, | |||
vsync_mask, | |||
write_mask, | |||
exhs_mask, | |||
exvs_mask | |||
) |
#define GS_SET_BUSDIR | ( | direction | ) |
#define GS_SET_SIGLBLID | ( | signal_id, | |
label_id | |||
) |
#define GS_SET_CSR_signal_evnt | ( | val | ) | GS_SET_CSR(val,0,0,0,0,0,0,0,0,0,0,0) |
#define GS_SET_CSR_finish_evnt | ( | val | ) | GS_SET_CSR(0,val,0,0,0,0,0,0,0,0,0,0) |
#define GS_SET_CSR_hsync_intrupt | ( | val | ) | GS_SET_CSR(0,0,val,0,0,0,0,0,0,0,0,0) |
#define GS_SET_CSR_vsync_intrupt | ( | val | ) | GS_SET_CSR(0,0,0,val,0,0,0,0,0,0,0,0) |
#define GS_SET_CSR_write_terminate | ( | val | ) | GS_SET_CSR(0,0,0,0,val,0,0,0,0,0,0,0) |
#define GS_SET_CSR_flush | ( | val | ) | GS_SET_CSR(0,0,0,0,0,val,0,0,0,0,0,0) |
#define GS_SET_CSR_reset | ( | val | ) | GS_SET_CSR(0,0,0,0,0,0,val,0,0,0,0,0) |
#define GS_GET_CSR_signal_evnt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 0)) |
#define GS_GET_CSR_finish_evnt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 1)) |
#define GS_GET_CSR_hsync_intrupt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 2)) |
#define GS_GET_CSR_vsync_intrupt (*((vu64 *)(gs_p_csr)) & (0x00000001 << 3)) |
#define GS_GET_CSR_write_terminate (*((vu64 *)(gs_p_csr)) & (0x00000001 << 4)) |
#define GS_GET_CSR_write_nfield (*((vu64 *)(gs_p_csr)) & (0x00000001 << 12)) |
#define GS_GET_CSR_current_field (*((vu64 *)(gs_p_csr)) & (0x00000001 << 13)) |
#define GS_GET_CSR_fifo_status (*((vu64 *)(gs_p_csr)) & (0x00000003 << 14)) |
#define GS_GET_CSR_gs_rev_number (*((vu64 *)(gs_p_csr)) & (0x000000FF << 16)) |
#define GS_GET_CSR_gs_id (*((vu64 *)(gs_p_csr)) & (0x000000FF << 24)) |
#define gs_setPRIM | ( | p, | |
_prim_type, | |||
_iip, | |||
_tme, | |||
_fge, | |||
_abe, | |||
_aa1, | |||
_fst, | |||
_ctxt, | |||
_fix | |||
) |
#define gs_setRGBAQ | ( | p, | |
_r, | |||
_g, | |||
_b, | |||
_a, | |||
_q | |||
) |
#define gs_setST | ( | p, | |
_s, | |||
_t | |||
) |
#define gs_setUV | ( | p, | |
_u, | |||
_v | |||
) |
#define gs_setXYZF2 | ( | p, | |
_x, | |||
_y, | |||
_z, | |||
_f | |||
) |
#define gs_setXYZF3 | ( | p, | |
_x, | |||
_y, | |||
_z, | |||
_f | |||
) |
#define gs_setXYZ2 | ( | p, | |
_x, | |||
_y, | |||
_z | |||
) |
#define gs_setXYZ3 | ( | p, | |
_x, | |||
_y, | |||
_z | |||
) |
#define gs_setTEX0_1 | ( | p, | |
_tb_addr, | |||
_tb_width, | |||
_psm, | |||
_tex_width, | |||
_tex_height, | |||
_tex_cc, | |||
_tex_funtion, | |||
_cb_addr, | |||
_clut_pixmode, | |||
_clut_smode, | |||
_clut_offset, | |||
_clut_loadmode | |||
) |
#define gs_setCLAMP_1 | ( | p, | |
wms, | |||
wmt, | |||
minu, | |||
maxu, | |||
minv, | |||
maxv | |||
) |
#define gs_setTEX1_1 | ( | p, | |
_lcm, | |||
_mxl, | |||
_mmag, | |||
_mmin, | |||
_mtba, | |||
_l, | |||
_k | |||
) |
#define gs_setTEX2_1 | ( | p, | |
_psm, | |||
_cbp, | |||
_cpsm, | |||
_csm, | |||
_csa, | |||
_cld | |||
) |
#define gs_set_XYOFFSET_1 | ( | p, | |
_offset_x, | |||
_offset_y | |||
) |
#define gs_set_PRMODECONT | ( | p, | |
_control | |||
) | (p)->control = _control |
#define gs_setPRMODE | ( | p, | |
_iip, | |||
_tme, | |||
_fge, | |||
_abe, | |||
_aa1, | |||
_fst, | |||
_ctxt, | |||
_fix | |||
) |
#define gs_setTEXCLUT | ( | p, | |
_cbw, | |||
_cou, | |||
_cov | |||
) |
#define gs_setMIPTBP1_1 | ( | p, | |
_tbp1, | |||
_tbw1, | |||
_tbp2, | |||
_tbw2, | |||
_tbp3, | |||
_tbw3 | |||
) |
#define gs_setMIPTBP2_1 | ( | p, | |
_tbp4, | |||
_tbw4, | |||
_tbp5, | |||
_tbw5, | |||
_tbp6, | |||
_tbw6 | |||
) |
#define gs_setTEXA | ( | p, | |
_alpha_0, | |||
_alpha_method, | |||
_alpha_1 | |||
) |
#define gs_setFOGCOLOR | ( | p, | |
_r, | |||
_g, | |||
_b | |||
) |
#define gs_setSCISSOR_1 | ( | p, | |
_clip_x0, | |||
_clip_x1, | |||
_clip_y0, | |||
_clip_y1 | |||
) |
#define gs_setALPHA_1 | ( | p, | |
_a, | |||
_b, | |||
_c, | |||
_d, | |||
_alpha | |||
) |
#define gs_setDIMX | ( | p, | |
_dimx00, | |||
_dimx01, | |||
_dimx02, | |||
_dimx03, | |||
_dimx10, | |||
_dimx11, | |||
_dimx12, | |||
_dimx13, | |||
_dimx20, | |||
_dimx21, | |||
_dimx22, | |||
_dimx23, | |||
_dimx30, | |||
_dimx31, | |||
_dimx32, | |||
_dimx33 | |||
) |
#define gs_setTEST_1 | ( | p, | |
_atest_enable, | |||
_atest_method, | |||
_atest_reference, | |||
_atest_fail_method, | |||
_datest_enable, | |||
_datest_mode, | |||
_ztest_enable, | |||
_ztest_method | |||
) |
#define gs_setFRAME_1 | ( | p, | |
_fb_addr, | |||
_fb_width, | |||
_psm, | |||
_draw_mask | |||
) |
#define gs_setZBUF_1 | ( | p, | |
_fb_addr, | |||
_psm, | |||
_update_mask | |||
) |
#define gs_setBITBLTBUF | ( | p, | |
_src_addr, | |||
_src_width, | |||
_src_pixmode, | |||
_dest_addr, | |||
_dest_width, | |||
_dest_pixmode | |||
) |
#define gs_setTRXPOS | ( | p, | |
_src_x, | |||
_src_y, | |||
_dest_x, | |||
_dest_y, | |||
_direction | |||
) |
#define gs_setTRXREG | ( | p, | |
_trans_w, | |||
_trans_h | |||
) |
#define gs_setTRXDIR | ( | p, | |
_trans_dir | |||
) | (p)->trans_dir = _trans_dir |
#define gs_setSIGNAL | ( | p, | |
_signal_id, | |||
_update_mask | |||
) |
#define gs_setLABEL | ( | p, | |
_label_id, | |||
_update_mask | |||
) |
#define gs_setR_PRIM | ( | p, | |
_prim_type, | |||
_iip, | |||
_tme, | |||
_fge, | |||
_abe, | |||
_aa1, | |||
_fst, | |||
_ctxt, | |||
_fix | |||
) |
#define gs_setR_RGBAQ | ( | p, | |
_r, | |||
_g, | |||
_b, | |||
_a, | |||
_q | |||
) |
#define gs_setR_ST | ( | p, | |
_s, | |||
_t | |||
) |
#define gs_setR_UV | ( | p, | |
_u, | |||
_v | |||
) |
#define gs_setR_XYZF2 | ( | p, | |
_x, | |||
_y, | |||
_z, | |||
_f | |||
) |
#define gs_setR_XYZF3 | ( | p, | |
_x, | |||
_y, | |||
_z, | |||
_f | |||
) |
#define gs_setR_XYZ2 | ( | p, | |
_x, | |||
_y, | |||
_z | |||
) |
#define gs_setR_XYZ3 | ( | p, | |
_x, | |||
_y, | |||
_z | |||
) |
#define gs_setR_TEX0_1 | ( | p, | |
_fb_addr, | |||
_fb_width, | |||
_psm, | |||
_tex_width, | |||
_tex_height, | |||
_col_comp, | |||
_tex_cc, | |||
_clutb_addr, | |||
_clut_pixmode, | |||
_clut_smode, | |||
_clut_offset, | |||
_cld | |||
) |
#define gs_setR_TEX0_2 | ( | p, | |
_fb_addr, | |||
_fb_width, | |||
_psm, | |||
_tex_width, | |||
_tex_height, | |||
_col_comp, | |||
_tex_cc, | |||
_clutb_addr, | |||
_clut_pixmode, | |||
_clut_smode, | |||
_clut_offset, | |||
_cld | |||
) |
#define gs_setR_CLAMP_1 | ( | p, | |
wms, | |||
wmt, | |||
minu, | |||
maxu, | |||
minv, | |||
maxv | |||
) |
#define gs_setR_CLAMP_2 | ( | p, | |
wms, | |||
wmt, | |||
minu, | |||
maxu, | |||
minv, | |||
maxv | |||
) |
#define gs_setR_FOG | ( | p, | |
_f | |||
) |
#define gs_setR_TEX1_1 | ( | p, | |
_lcm, | |||
_mxl, | |||
_mmag, | |||
_mmin, | |||
_mtba, | |||
_l, | |||
_k | |||
) |
#define gs_setR_TEX1_2 | ( | p, | |
_lcm, | |||
_mxl, | |||
_mmag, | |||
_mmin, | |||
_mtba, | |||
_l, | |||
_k | |||
) |
#define gs_setR_TEX2_1 | ( | p, | |
_psm, | |||
_cbp, | |||
_cpsm, | |||
_csm, | |||
_csa, | |||
_cld | |||
) |
#define gs_setR_TEX2_2 | ( | p, | |
_psm, | |||
_cbp, | |||
_cpsm, | |||
_csm, | |||
_csa, | |||
_cld | |||
) |
#define gs_setR_XYOFFSET_1 | ( | p, | |
_offset_x, | |||
_offset_y | |||
) |
#define gs_setR_XYOFFSET_2 | ( | p, | |
_offset_x, | |||
_offset_y | |||
) |
#define gs_setR_PRMODECONT | ( | p, | |
_control | |||
) |
#define gs_setR_PRMODE | ( | p, | |
_iip, | |||
_tme, | |||
_fge, | |||
_abe, | |||
_aa1, | |||
_fst, | |||
_ctxt, | |||
_fix | |||
) |
#define gs_setR_TEXCLUT | ( | p, | |
_cbw, | |||
_cou, | |||
_cov | |||
) |
#define gs_setR_SCANMSK | ( | p, | |
_msk | |||
) |
#define gs_setR_MIPTBP1_1 | ( | p, | |
_tbp1, | |||
_tbw1, | |||
_tbp2, | |||
_tbw2, | |||
_tbp3, | |||
_tbw3 | |||
) |
#define gs_setR_MIPTBP1_2 | ( | p, | |
_tbp1, | |||
_tbw1, | |||
_tbp2, | |||
_tbw2, | |||
_tbp3, | |||
_tbw3 | |||
) |
#define gs_setR_MIPTBP2_1 | ( | p, | |
_tbp4, | |||
_tbw4, | |||
_tbp5, | |||
_tbw5, | |||
_tbp6, | |||
_tbw6 | |||
) |
#define gs_setR_MIPTBP2_2 | ( | p, | |
_tbp4, | |||
_tbw4, | |||
_tbp5, | |||
_tbw5, | |||
_tbp6, | |||
_tbw6 | |||
) |
#define gs_setR_TEXA | ( | p, | |
_ta0, | |||
_aem, | |||
_ta1 | |||
) |
#define gs_setR_FOGCOLOR | ( | p, | |
_r, | |||
_g, | |||
_b | |||
) |
#define gs_setR_TEXFLUSH | ( | p | ) | (p)->reg = gs_g_texflush |
#define gs_setR_SCISSOR_1 | ( | p, | |
_clip_x0, | |||
_clip_x1, | |||
_clip_y0, | |||
_clip_y1 | |||
) |
#define gs_setR_SCISSOR_2 | ( | p, | |
_clip_x0, | |||
_clip_x1, | |||
_clip_y0, | |||
_clip_y1 | |||
) |
#define gs_setR_ALPHA_1 | ( | p, | |
_a, | |||
_b, | |||
_c, | |||
_d, | |||
_fix | |||
) |
#define gs_setR_ALPHA_2 | ( | p, | |
_a, | |||
_b, | |||
_c, | |||
_d, | |||
_fix | |||
) |
#define gs_setR_DIMX | ( | p, | |
_dimx00, | |||
_dimx01, | |||
_dimx02, | |||
_dimx03, | |||
_dimx10, | |||
_dimx11, | |||
_dimx12, | |||
_dimx13, | |||
_dimx20, | |||
_dimx21, | |||
_dimx22, | |||
_dimx23, | |||
_dimx30, | |||
_dimx31, | |||
_dimx32, | |||
_dimx33 | |||
) |
#define gs_setR_DTHE | ( | p, | |
_enable | |||
) |
#define gs_setR_COLCLAMP | ( | p, | |
_clamp | |||
) |
#define gs_setR_TEST_1 | ( | p, | |
_ATE, | |||
_ATST, | |||
_AREF, | |||
_AFAIL, | |||
_DATE, | |||
_DATM, | |||
_ZTE, | |||
_ZTST | |||
) |
#define gs_setR_TEST_2 | ( | p, | |
_ATE, | |||
_ATST, | |||
_AREF, | |||
_AFAIL, | |||
_DATE, | |||
_DATM, | |||
_ZTE, | |||
_ZTST | |||
) |
#define gs_setR_PABE | ( | p, | |
_enable | |||
) |
#define gs_setR_FBA_1 | ( | p, | |
_alpha | |||
) |
#define gs_setR_FBA_2 | ( | p, | |
_alpha | |||
) |
#define gs_setR_FRAME_1 | ( | p, | |
_fb_addr, | |||
_fb_width, | |||
_psm, | |||
_draw_mask | |||
) |
#define gs_setR_FRAME_2 | ( | p, | |
_fb_addr, | |||
_fb_width, | |||
_psm, | |||
_draw_mask | |||
) |
#define gs_setR_ZBUF_1 | ( | p, | |
_fb_addr, | |||
_psm, | |||
_update_mask | |||
) |
#define gs_setR_ZBUF_2 | ( | p, | |
_fb_addr, | |||
_psm, | |||
_update_mask | |||
) |
#define gs_setR_BITBLTBUF | ( | p, | |
_src_addr, | |||
_src_width, | |||
_src_pixmode, | |||
_dest_addr, | |||
_dest_width, | |||
_dest_pixmode | |||
) |
#define gs_setR_TRXPOS | ( | p, | |
_src_x, | |||
_src_y, | |||
_dest_x, | |||
_dest_y, | |||
_direction | |||
) |
#define gs_setR_TRXREG | ( | p, | |
_trans_w, | |||
_trans_h | |||
) |
#define gs_setR_TRXDIR | ( | p, | |
_trans_dir | |||
) |
#define gs_setR_HWREG | ( | p, | |
_data | |||
) |
#define gs_setR_SIGNAL | ( | p, | |
_signal_id, | |||
_update_mask | |||
) |
#define gs_setR_LABEL | ( | p, | |
_label_id, | |||
_update_mask | |||
) |
#define gs_setR_NOP | ( | p | ) |
#define gs_setGIF_TAG | ( | p, | |
_nloop, | |||
_eop, | |||
_pre, | |||
_prim, | |||
_flg, | |||
_nreg, | |||
_reg | |||
) |
#define CRTC_SETTINGS_DEFAULT1 CRTC_SETTINGS_EN1|CRTC_SETTINGS_BLENDVAL|CRTC_SETTINGS_OUTRC1|CRTC_SETTINGS_STYLERC1 |
#define CRTC_SETTINGS_DEFAULT2 CRTC_SETTINGS_EN2|CRTC_SETTINGS_BLENDVAL|CRTC_SETTINGS_OUTRC1|CRTC_SETTINGS_STYLERC1 |
#define CRTC_SETTINGS_EN1 ((u64)(1)<<0) |
#define CRTC_SETTINGS_EN2 ((u64)(1)<<1) |
#define CRTC_SETTINGS_ENBOTH CRTC_SETTINGS_EN1|CRTC_SETTINGS_EN2 |
#define CRTC_SETTINGS_BLENDRC1 ((u64)(0)<<5) |
#define CRTC_SETTINGS_BLENDVAL ((u64)(1)<<5) |
#define CRTC_SETTINGS_OUTRC1 ((u64)(0)<<6) |
#define CRTC_SETTINGS_OUTRC2 ((u64)(1)<<6) |
#define CRTC_SETTINGS_STYLERC1 ((u64)(0)<<7) |
#define CRTC_SETTINGS_STYLEBG ((u64)(1)<<7) |
enum GsPrimitiveTypes |
enum GsATestMethods |
enum GsZTestMethodTypes |
enum GsTexMipmaps |
enum GsTexFilterMethods |
enum GsTexFunctions |
enum GsGifDataFormat |
struct _GS_GIF_DMACHAIN_TAG __attribute__ | ( | (aligned(16)) | ) |
SOURCE CHAIN TAG for DMA CHAIN MODE
int GsSetXYOffset1 | ( | u16 | x, |
u16 | y | ||
) |
Definition at line 36 of file lowlevel.c.
int GsSetXYOffset2 | ( | u16 | x, |
u16 | y | ||
) |
Definition at line 49 of file lowlevel.c.
int GsSetScissor1 | ( | u16 | upper_x, |
u16 | upper_y, | ||
u16 | lower_x, | ||
u16 | lower_y | ||
) |
Definition at line 62 of file lowlevel.c.
int GsSetScissor2 | ( | u16 | upper_x, |
u16 | upper_y, | ||
u16 | lower_x, | ||
u16 | lower_y | ||
) |
Definition at line 75 of file lowlevel.c.
int GsSetFrame1 | ( | u16 | framebuffer_addr, |
u8 | framebuffer_width, | ||
u8 | psm, | ||
u32 | draw_mask | ||
) |
Definition at line 88 of file lowlevel.c.
int GsSetFrame2 | ( | u16 | framebuffer_addr, |
u8 | framebuffer_width, | ||
u8 | psm, | ||
u32 | draw_mask | ||
) |
Definition at line 101 of file lowlevel.c.
int GsTextureFlush | ( | void | ) |
Definition at line 114 of file lowlevel.c.
int GsSetPixelTest1 | ( | u8 | enable_alpha_test, |
u8 | alpha_test_method, | ||
u8 | alpha_reference, | ||
u8 | alpha_fail_method, | ||
u8 | enable_dest_alpha_test, | ||
u8 | dest_alpha_test_mode, | ||
u8 | enable_zbuff_test, | ||
u8 | alpha_zbuff_method | ||
) |
Definition at line 127 of file lowlevel.c.
int GsSetPixelTest2 | ( | u8 | enable_alpha_test, |
u8 | alpha_test_method, | ||
u8 | alpha_reference, | ||
u8 | alpha_fail_method, | ||
u8 | enable_dest_alpha_test, | ||
u8 | dest_alpha_test_mode, | ||
u8 | enable_zbuff_test, | ||
u8 | alpha_zbuff_method | ||
) |
Definition at line 140 of file lowlevel.c.
int GsSelectTexure1 | ( | u16 | tex_addr, |
u8 | addr_width, | ||
u8 | tex_pixmode, | ||
u16 | tex_width, | ||
u16 | tex_height, | ||
u16 | clut_addr, | ||
u8 | clut_pixmode, | ||
u8 | clut_storagemode, | ||
u8 | clut_offset | ||
) |
Definition at line 153 of file lowlevel.c.
int GsSelectTexure2 | ( | u16 | tex_addr, |
u8 | addr_width, | ||
u8 | tex_pixmode, | ||
u16 | tex_width, | ||
u16 | tex_height, | ||
u16 | clut_addr, | ||
u8 | clut_pixmode, | ||
u8 | clut_storagemode, | ||
u8 | clut_offset | ||
) |
Definition at line 166 of file lowlevel.c.
void GsSetFogColor | ( | u8 | r, |
u8 | g, | ||
u8 | b | ||
) |
Definition at line 179 of file lowlevel.c.
void GsEnableColorClamp | ( | u16 | enable | ) |
Definition at line 190 of file lowlevel.c.
GsGParam_t * GsGetGParam | ( | void | ) |
void GsSetDefaultDrawEnv | ( | GS_DRAWENV * | drawenv, |
u16 | psm, | ||
u16 | w, | ||
u16 | h | ||
) |
void GsSetDefaultDrawEnvAddress | ( | GS_DRAWENV * | drawenv, |
u16 | vram_addr | ||
) |
void GsSetDefaultDisplayEnv | ( | GS_DISPENV * | dispenv, |
u16 | psm, | ||
u16 | w, | ||
u16 | h, | ||
u16 | dx, | ||
u16 | dy | ||
) |
void GsSetDefaultDisplayEnvAddress | ( | GS_DISPENV * | dispenv, |
u16 | vram_addr | ||
) |
void GsSetDefaultZBufferEnv | ( | GS_ZENV * | zenv, |
u8 | update_mask | ||
) |
void GsSetDefaultZBufferEnvAddress | ( | GS_ZENV * | zenv, |
u16 | vram_addr, | ||
u8 | psm | ||
) |
void GsPutDrawEnv1 | ( | GS_DRAWENV * | drawenv | ) |
void GsPutDrawEnv2 | ( | GS_DRAWENV * | drawenv | ) |
void GsPutDisplayEnv1 | ( | GS_DISPENV * | dispenv | ) |
void GsPutDisplayEnv2 | ( | GS_DISPENV * | dispenv | ) |
void GsClearDrawEnv1 | ( | GS_DRAWENV * | drawenv | ) |
clear draw buffer with GS_DRAWENV->bg_color color (contex 1)
Definition at line 184 of file draw.c.
References gif_rd_ad, GS_PRIM_SPRITE, and GsClearDrawEnv1().
Referenced by GsClearDrawEnv1().
void GsClearDrawEnv2 | ( | GS_DRAWENV * | drawenv | ) |
clear draw buffer with GS_DRAWENV->bg_color color (contex 2)
Definition at line 221 of file draw.c.
References gif_rd_ad, GS_PRIM_SPRITE, and GsClearDrawEnv2().
Referenced by GsClearDrawEnv2().
QWORD * GsGifPacketsAlloc | ( | GS_PACKET_TABLE * | table, |
u32 | num_qwords | ||
) |
void GsGifPacketsClear | ( | GS_PACKET_TABLE * | table | ) |
int GsGifPacketsExecute | ( | GS_PACKET_TABLE * | table, |
u16 | wait | ||
) |
int GsLoadImage | ( | const void * | source_addr, |
GS_IMAGE * | dest | ||
) |
void GsOverridePrimAttributes | ( | s8 | override, |
s8 | iip, | ||
s8 | tme, | ||
s8 | fge, | ||
s8 | abe, | ||
s8 | aa1, | ||
s8 | fst, | ||
s8 | ctxt, | ||
s8 | fix | ||
) |
Definition at line 23 of file primitives.c.
void GsEnableDithering | ( | u8 | enable, |
int | mode | ||
) |
Definition at line 46 of file primitives.c.
void GsEnableAlphaTransparency1 | ( | u16 | enable, |
u16 | method, | ||
u8 | alpha_ref, | ||
u16 | fail_method | ||
) |
Definition at line 74 of file primitives.c.
void GsEnableAlphaTransparency2 | ( | u16 | enable, |
u16 | method, | ||
u8 | alpha_ref, | ||
u16 | fail_method | ||
) |
Definition at line 96 of file primitives.c.
void GsEnableZbuffer1 | ( | u16 | enable, |
u16 | test_method | ||
) |
Definition at line 118 of file primitives.c.
void GsEnableZbuffer2 | ( | u16 | enable, |
u16 | test_method | ||
) |
Definition at line 128 of file primitives.c.
void GsEnableAlphaBlending1 | ( | u16 | enable | ) |
Definition at line 139 of file primitives.c.
void GsEnableAlphaBlending2 | ( | u16 | enable | ) |
Definition at line 162 of file primitives.c.
void GsVramFreeAllTextureBuffer | ( | void | ) |
free texture buffer without freeing frame buffer
Definition at line 206 of file texture.c.
References GsVramFreeAllTextureBuffer().
Referenced by GsVramFreeAllTextureBuffer().
int GsDbGetDrawBuffer | ( | void | ) |
Definition at line 20 of file DoubleBuff.c.
int GsDbGetDisplayBuffer | ( | void | ) |
Definition at line 25 of file DoubleBuff.c.
void GsDbSwapBuffer | ( | void | ) |
Definition at line 30 of file DoubleBuff.c.
static SifRpcServerData_t ps2mouse_server __attribute__ |
Stop the profiler. If the profiler is not running, this function does nothing.
filename | The name of the file to write the profiling data to. |
should_dump | If 1, the profiling data will be written to the file. If 0, the profiling data will be discarded. |
Initializes pg library
After calculating the text size, __gprof_init() allocates enough memory to allow fastest access to arc structures, and some more for sampling statistics. Note that this also installs a timer that runs at 1000 hert.
Writes gmon.out dump file and stops profiling Called from _libcglue_deinit() function; will dump out a gmon.out file at cwd with all collected information.
Internal C handler for _mcount()
frompc | pc address of caller |
selfpc | pc address of current function |
Called from mcount.S to make life a bit easier. __mcount is called right before a function starts. GCC generates a tiny stub at the very beginning of each compiled routine, which eventually brings the control to here.
file descriptor related mc command used by: mcInit, mcClose, mcSeek, mcRead, mcWrite, mcGetinfo, mcFormat, mcFlush, mcUnformat, mcChangeThreadPriority
rpc client data