106 for (j = 0; j < 4; j++)
122 u32 vif_added_bytes = 0;
151 t_frame->
width = 640;
165 t_texbuff->
width = 128;
270 VECTOR c_zbyszek_position;
314 for (i = 0; i < 8; i++)
316 c_zbyszek_position[0] = i * 40.0F;
317 for (j = 0; j < 8; j++)
319 c_zbyszek_position[1] = j * 40.0F;
320 draw_cube(c_zbyszek_position, t_texbuff);
350 int main(
int argc,
char **argv)
382 render(&frame, &z, &texbuff);
int dma_channel_wait(int channel, int timeout)
int dma_channel_initialize(int channel, void *handler, int flags)
void dma_channel_send_packet2(packet2_t *packet2, int channel, u8 flush_cache)
void dma_channel_fast_waits(int channel)
#define DRAW_STQ2_REGLIST
void set_lod_clut_prim_tex_buff(texbuffer_t *t_texbuff)
packet2_t * vif_packets[2]
void render(framebuffer_t *t_frame, zbuffer_t *t_z, texbuffer_t *t_texbuff)
packet2_t * curr_vif_packet
void vu1_upload_micro_program()
int main(int argc, char **argv)
void send_texture(texbuffer_t *texbuf)
packet2_t * zbyszek_packet
void init_drawing_environment(framebuffer_t *t_frame, zbuffer_t *t_z)
void draw_cube(VECTOR t_object_position, texbuffer_t *t_texbuff)
void calculate_cube(texbuffer_t *t_texbuff)
void init_gs(framebuffer_t *t_frame, zbuffer_t *t_z, texbuffer_t *t_texbuff)
void clear_screen(framebuffer_t *frame, zbuffer_t *z)
void vu1_set_double_buffer_settings()
qword_t * draw_setup_environment(qword_t *q, int context, framebuffer_t *frame, zbuffer_t *z)
qword_t * draw_texture_transfer(qword_t *q, void *src, int width, int height, int psm, int dest, int dest_width)
void draw_wait_finish(void)
qword_t * draw_finish(qword_t *q)
qword_t * draw_clear(qword_t *q, int context, float x, float y, float width, float height, int r, int g, int b)
qword_t * draw_texture_flush(qword_t *q)
unsigned char draw_log2(unsigned int x)
#define TEXTURE_FUNCTION_DECAL
#define TEXTURE_COMPONENTS_RGB
#define CLUT_STORAGE_MODE1
#define PRIM_SHADE_GOURAUD
qword_t * draw_primitive_xyoffset(qword_t *q, int context, float x, float y)
qword_t * draw_disable_tests(qword_t *q, int context, zbuffer_t *z)
qword_t * draw_enable_tests(qword_t *q, int context, zbuffer_t *z)
#define ZTEST_METHOD_GREATER_EQUAL
int graph_initialize(int fbp, int width, int height, int psm, int x, int y)
void graph_wait_vsync(void)
float graph_aspect_ratio(void)
#define GRAPH_ALIGN_BLOCK
int graph_vram_allocate(int width, int height, int psm, int alignment)
static void packet2_utils_gs_add_texbuff_clut(packet2_t *packet2, texbuffer_t *texbuff, clutbuffer_t *clut)
static void packet2_utils_vu_add_double_buffer(packet2_t *packet2, u16 base, u16 offset)
static void packet2_utils_gs_add_lod(packet2_t *packet2, lod_t *lod)
static void packet2_utils_gs_add_prim_giftag(packet2_t *packet2, prim_t *prim, u32 loops_count, u32 nreg, u8 nreg_count, u8 context)
static u32 packet2_utils_get_packet_size_for_program(u32 *start, u32 *end)
static void packet2_utils_vu_add_unpack_data(packet2_t *packet2, u32 t_dest_address, void *t_data, u32 t_size, u8 t_use_top)
static void packet2_utils_vu_add_start_program(packet2_t *packet2, u32 addr)
static void packet2_utils_vu_add_end_tag(packet2_t *packet2)
static void packet2_utils_gif_add_set(packet2_t *packet2, u32 loops_count)
void packet2_vif_add_micro_program(packet2_t *packet2, u32 dest, u32 *start, u32 *end)
void packet2_free(packet2_t *packet2)
void packet2_reset(packet2_t *packet2, u8 clear_mem)
static void packet2_add_u32(packet2_t *packet2, const u32 val)
static void packet2_add_s32(packet2_t *packet2, const s32 val)
packet2_t * packet2_create(u16 qwords, enum Packet2Type type, enum Packet2Mode mode, u8 tte)
static void packet2_update(packet2_t *packet2, qword_t *qw)
static u32 packet2_get_qw_count(packet2_t *packet2)
static void packet2_add_float(packet2_t *packet2, const float val)
void create_local_screen(MATRIX local_screen, MATRIX local_world, MATRIX world_view, MATRIX view_screen)
void create_local_world(MATRIX local_world, VECTOR translation, VECTOR rotation)
void create_world_view(MATRIX world_view, VECTOR translation, VECTOR rotation)
void create_view_screen(MATRIX view_screen, float aspect, float left, float right, float bottom, float top, float near, float far)
unsigned int storage_mode
unsigned char calculation
unsigned char antialiasing
unsigned char mapping_type