17 #ifndef __PSP1_VIDEO_INL_H 18 #define __PSP1_VIDEO_INL_H 29 short signal_history[16];
126 static int tbpcmd_tbl[8] = { 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7 };
127 static int tbwcmd_tbl[8] = { 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf };
128 static int tsizecmd_tbl[8] = { 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf };
130 #define sendCommandi(cmd, argument) *(gu_list->current++) = (cmd << 24) | (argument & 0xffffff) 132 #define sendCommandiStall(cmd, argument) \ 134 sendCommandi(cmd,argument); \ 135 if (!gu_object_stack_depth && !gu_curr_context) \ 136 sceGeListUpdateStallAddr(ge_list_executed[0],gu_list->current); \ 139 #define __sceGuCopyImage(psm, sx, sy, width, height, srcw, src, dx, dy, destw, dest) \ 140 sendCommandi(178,((unsigned int)(src)) & 0xffffff); \ 141 sendCommandi(179,((((unsigned int)(src)) & 0xff000000) >> 8)|(srcw)); \ 142 sendCommandi(235,((sy) << 10)|(sx)); \ 143 sendCommandi(180,((unsigned int)(dest)) & 0xffffff); \ 144 sendCommandi(181,((((unsigned int)(dest)) & 0xff000000) >> 8)| (destw)); \ 145 sendCommandi(236,((dy) << 10) | (dx)); \ 146 sendCommandi(238,(((height)-1) << 10)|((width)-1)); \ 147 sendCommandi(234,((psm) ^ 0x03) ? 0 : 1) 149 #define __sceGuSync(mode, what) \ 152 case 0: return sceGeDrawSync(what); \ 153 case 3: return sceGeListSync(ge_list_executed[0],what); \ 154 case 4: return sceGeListSync(ge_list_executed[1],what); \ 155 default: case 1: case 2: return 0; \ 158 #define __sceGuTexFlush() sendCommandf(203,0.0f) 160 #define __sceGuTexImage(mipmap, width, height, tbw, tbp) \ 161 sendCommandi(tbpcmd_tbl[(mipmap)],((unsigned int)(tbp)) & 0xffffff); \ 162 sendCommandi(tbwcmd_tbl[(mipmap)],((((unsigned int)(tbp)) >> 8) & 0x0f0000)|(tbw)); \ 163 sendCommandi(tsizecmd_tbl[(mipmap)],(getExp(height) << 8)|(getExp((width)))); \ 166 #define __sceGuCallList(list) \ 168 unsigned int list_addr = (unsigned int)list; \ 169 if (gu_call_mode == 1) \ 171 sendCommandi(14,(list_addr >> 16) | 0x110000); \ 172 sendCommandi(12,list_addr & 0xffff); \ 173 sendCommandiStall(0,0); \ 177 sendCommandi(16,(list_addr >> 8) & 0xf0000); \ 178 sendCommandiStall(10,list_addr & 0xffffff); \ 182 #define __sceGuFinish_GU_DIRECT() \ 183 sendCommandi(15,0); \ 184 sendCommandiStall(12,0); \ 186 gu_curr_context = gu_list->parent_context; \ 187 gu_list = &gu_contexts[gu_curr_context].list unsigned char ydir
Definition: psp1_gfx.h:90
unsigned char specular
Definition: psp1_gfx.h:97
unsigned char ambient
Definition: psp1_gfx.h:95
void * disp_buffer
Definition: psp1_gfx.h:70
unsigned char xdir
Definition: psp1_gfx.h:89
unsigned int * current
Definition: psp1_gfx.h:41
int width
Definition: psp1_gfx.h:73
void * depth_buffer
Definition: psp1_gfx.h:71
unsigned char exponent
Definition: psp1_gfx.h:104
unsigned int gu_current_frame
void(* GuCallback)(int)
Definition: psp1_gfx.h:23
int ge_callback_id
Definition: psp1_gfx.h:32
GuLightSettings light_settings[4]
unsigned char diffuse
Definition: psp1_gfx.h:96
unsigned int * gu_object_stack[]
unsigned char zpos
Definition: psp1_gfx.h:88
GuSwapBuffersCallback swapBuffersCallback
Definition: psp1_gfx.h:34
int fragment_2x
Definition: psp1_gfx.h:54
static int tbwcmd_tbl[8]
Definition: psp1_gfx.h:127
int depth_offset
Definition: psp1_gfx.h:53
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
static int tsizecmd_tbl[8]
Definition: psp1_gfx.h:128
unsigned int clear_depth
Definition: psp1_gfx.h:61
int height
Definition: psp1_gfx.h:74
unsigned char xpos
Definition: psp1_gfx.h:83
GuCallback sig
Definition: psp1_gfx.h:27
unsigned char linear
Definition: psp1_gfx.h:102
static int tbpcmd_tbl[8]
Definition: psp1_gfx.h:126
int texture_proj_map_mode
Definition: psp1_gfx.h:56
int parent_context
Definition: psp1_gfx.h:42
ubyte cmd
Definition: wiiuse_internal.h:319
int signal_offset
Definition: psp1_gfx.h:30
unsigned char constant
Definition: psp1_gfx.h:98
unsigned char quadratic
Definition: psp1_gfx.h:103
GuCallback fin
Definition: psp1_gfx.h:28
unsigned char type
Definition: psp1_gfx.h:82
int far_plane
Definition: psp1_gfx.h:52
void callbackFin(int id, void *arg)
Definition: psp1_gfx.h:45
int depth_width
Definition: psp1_gfx.h:72
int pixel_size
Definition: psp1_gfx.h:67
GuDisplayList list
Definition: psp1_gfx.h:47
void callbackSig(int id, void *arg)
void * frame_buffer
Definition: psp1_gfx.h:69
unsigned int * start
Definition: psp1_gfx.h:40
int swapBuffersBehaviour
Definition: psp1_gfx.h:35
int scissor_enable
Definition: psp1_gfx.h:48
unsigned char zdir
Definition: psp1_gfx.h:91
GuDrawBuffer gu_draw_buffer
int gu_object_stack_depth
unsigned char ypos
Definition: psp1_gfx.h:84
int near_plane
Definition: psp1_gfx.h:51
Definition: psp1_gfx.h:77
Definition: psp1_gfx.h:38
int kernel_event_flag
Definition: psp1_gfx.h:31
unsigned int clear_color
Definition: psp1_gfx.h:59
int texture_map_mode
Definition: psp1_gfx.h:57
unsigned char enable
Definition: psp1_gfx.h:81
unsigned int clear_stencil
Definition: psp1_gfx.h:60
int texture_mode
Definition: psp1_gfx.h:62
int frame_width
Definition: psp1_gfx.h:68
unsigned char cutoff
Definition: psp1_gfx.h:105
Definition: psp1_gfx.h:65
int texture_function
Definition: psp1_gfx.h:55
Definition: psp1_gfx.h:25
void sendCommandf(int cmd, float argument)