RetroArch
Classes | Macros | Typedefs | Functions | Variables
psp1_gfx.h File Reference
#include <pspge.h>
#include "pspgu.h"
Include dependency graph for psp1_gfx.h:

Go to the source code of this file.

Classes

struct  GuSettings
 
struct  GuDisplayList
 
struct  GuContext
 
struct  GuDrawBuffer
 
struct  GuLightSettings
 

Macros

#define sendCommandi(cmd, argument)   *(gu_list->current++) = (cmd << 24) | (argument & 0xffffff)
 
#define sendCommandiStall(cmd, argument)
 
#define __sceGuCopyImage(psm, sx, sy, width, height, srcw, src, dx, dy, destw, dest)
 
#define __sceGuSync(mode, what)
 
#define __sceGuTexFlush()   sendCommandf(203,0.0f)
 
#define __sceGuTexImage(mipmap, width, height, tbw, tbp)
 
#define __sceGuCallList(list)
 
#define __sceGuFinish_GU_DIRECT()
 

Typedefs

typedef void(* GuCallback) (int)
 

Functions

void sendCommandf (int cmd, float argument)
 
void callbackSig (int id, void *arg)
 
void callbackFin (int id, void *arg)
 
void resetValues ()
 

Variables

unsigned int gu_current_frame
 
GuContext gu_contexts [3]
 
int ge_list_executed [2]
 
voidge_edram_address
 
GuSettings gu_settings
 
GuDisplayListgu_list
 
int gu_curr_context
 
int gu_init
 
int gu_display_on
 
int gu_call_mode
 
int gu_states
 
GuDrawBuffer gu_draw_buffer
 
unsigned int * gu_object_stack []
 
int gu_object_stack_depth
 
GuLightSettings light_settings [4]
 
static int tbpcmd_tbl [8] = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7 }
 
static int tbwcmd_tbl [8] = { 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf }
 
static int tsizecmd_tbl [8] = { 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf }
 

Macro Definition Documentation

◆ __sceGuCallList

#define __sceGuCallList (   list)
Value:
{ \
unsigned int list_addr = (unsigned int)list; \
if (gu_call_mode == 1) \
{ \
sendCommandi(14,(list_addr >> 16) | 0x110000); \
sendCommandi(12,list_addr & 0xffff); \
sendCommandiStall(0,0); \
} \
else \
{ \
sendCommandi(16,(list_addr >> 8) & 0xf0000); \
sendCommandiStall(10,list_addr & 0xffffff); \
} \
}
int gu_call_mode

◆ __sceGuCopyImage

#define __sceGuCopyImage (   psm,
  sx,
  sy,
  width,
  height,
  srcw,
  src,
  dx,
  dy,
  destw,
  dest 
)
Value:
sendCommandi(178,((unsigned int)(src)) & 0xffffff); \
sendCommandi(179,((((unsigned int)(src)) & 0xff000000) >> 8)|(srcw)); \
sendCommandi(235,((sy) << 10)|(sx)); \
sendCommandi(180,((unsigned int)(dest)) & 0xffffff); \
sendCommandi(181,((((unsigned int)(dest)) & 0xff000000) >> 8)| (destw)); \
sendCommandi(236,((dy) << 10) | (dx)); \
sendCommandi(238,(((height)-1) << 10)|((width)-1)); \
sendCommandi(234,((psm) ^ 0x03) ? 0 : 1)
#define sendCommandi(cmd, argument)
Definition: psp1_gfx.h:130
GLenum src
Definition: glext.h:6980
GLint GLint GLsizei width
Definition: glext.h:6293
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293

◆ __sceGuFinish_GU_DIRECT

#define __sceGuFinish_GU_DIRECT ( )
Value:
sendCommandi(15,0); \
sendCommandiStall(12,0); \
/* go to parent list */ \
gu_curr_context = gu_list->parent_context; \
#define sendCommandi(cmd, argument)
Definition: psp1_gfx.h:130
GuContext gu_contexts[3]
int parent_context
Definition: psp1_gfx.h:42
GuDisplayList * gu_list
GuDisplayList list
Definition: psp1_gfx.h:47
int gu_curr_context

◆ __sceGuSync

#define __sceGuSync (   mode,
  what 
)
Value:
switch (mode) \
{ \
case 0: return sceGeDrawSync(what); \
case 3: return sceGeListSync(ge_list_executed[0],what); \
case 4: return sceGeListSync(ge_list_executed[1],what); \
default: case 1: case 2: return 0; \
}
int ge_list_executed[2]
GLenum mode
Definition: glext.h:6857

◆ __sceGuTexFlush

#define __sceGuTexFlush ( )    sendCommandf(203,0.0f)

◆ __sceGuTexImage

#define __sceGuTexImage (   mipmap,
  width,
  height,
  tbw,
  tbp 
)
Value:
sendCommandi(tbpcmd_tbl[(mipmap)],((unsigned int)(tbp)) & 0xffffff); \
sendCommandi(tbwcmd_tbl[(mipmap)],((((unsigned int)(tbp)) >> 8) & 0x0f0000)|(tbw)); \
sendCommandi(tsizecmd_tbl[(mipmap)],(getExp(height) << 8)|(getExp((width)))); \
__sceGuTexFlush()
#define sendCommandi(cmd, argument)
Definition: psp1_gfx.h:130
static int tbwcmd_tbl[8]
Definition: psp1_gfx.h:127
static int tsizecmd_tbl[8]
Definition: psp1_gfx.h:128
static int tbpcmd_tbl[8]
Definition: psp1_gfx.h:126
GLint GLint GLsizei width
Definition: glext.h:6293
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293

◆ sendCommandi

#define sendCommandi (   cmd,
  argument 
)    *(gu_list->current++) = (cmd << 24) | (argument & 0xffffff)

◆ sendCommandiStall

#define sendCommandiStall (   cmd,
  argument 
)
Value:
{ \
sendCommandi(cmd,argument); \
sceGeListUpdateStallAddr(ge_list_executed[0],gu_list->current); \
}
int ge_list_executed[2]
unsigned int * current
Definition: psp1_gfx.h:41
ubyte cmd
Definition: wiiuse_internal.h:319
GuDisplayList * gu_list
Definition: query.c:71
int gu_object_stack_depth
int gu_curr_context

Typedef Documentation

◆ GuCallback

typedef void(* GuCallback) (int)

Function Documentation

◆ callbackFin()

void callbackFin ( int  id,
void arg 
)

◆ callbackSig()

void callbackSig ( int  id,
void arg 
)

◆ resetValues()

void resetValues ( )

◆ sendCommandf()

void sendCommandf ( int  cmd,
float  argument 
)

Variable Documentation

◆ ge_edram_address

void* ge_edram_address

◆ ge_list_executed

int ge_list_executed[2]

◆ gu_call_mode

int gu_call_mode

◆ gu_contexts

GuContext gu_contexts[3]

◆ gu_curr_context

int gu_curr_context

◆ gu_current_frame

unsigned int gu_current_frame

◆ gu_display_on

int gu_display_on

◆ gu_draw_buffer

GuDrawBuffer gu_draw_buffer

◆ gu_init

int gu_init

◆ gu_list

GuDisplayList* gu_list

◆ gu_object_stack

unsigned int* gu_object_stack[]

◆ gu_object_stack_depth

int gu_object_stack_depth

◆ gu_settings

GuSettings gu_settings

◆ gu_states

int gu_states

◆ light_settings

GuLightSettings light_settings[4]

◆ tbpcmd_tbl

int tbpcmd_tbl[8] = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7 }
static

◆ tbwcmd_tbl

int tbwcmd_tbl[8] = { 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf }
static

◆ tsizecmd_tbl

int tsizecmd_tbl[8] = { 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf }
static