#endif
u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
#endif
u32 gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
- u32 current_command = 0, command_length, cpu_cycles = 0;
+ u32 current_command = 0, command_length;
+ u32 cpu_cycles_sum = 0, cpu_cycles = *cpu_cycles_last;
u32 color = list[0] & 0xFFFFFF;
do_fill(psx_gpu, x, y, width, height, color);
u32 color = list[0] & 0xFFFFFF;
do_fill(psx_gpu, x, y, width, height, color);
get_vertex_data_xy(2, 6);
render_triangle(psx_gpu, vertexes, current_command);
get_vertex_data_xy(2, 6);
render_triangle(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv(2, 10);
render_triangle(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv(2, 10);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
get_vertex_data_xy_rgb(2, 8);
render_triangle(psx_gpu, vertexes, current_command);
get_vertex_data_xy_rgb(2, 8);
render_triangle(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv_rgb(2, 12);
render_triangle(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv_rgb(2, 12);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
render_triangle(psx_gpu, vertexes, current_command);
render_triangle(psx_gpu, &(vertexes[1]), current_command);
vertexes[1].y = list_s16[5] + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, list[0], 0);
vertexes[1].y = list_s16[5] + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, list[0], 0);
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, list[0], 0);
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, list[0], 0);
vertexes[1].y = list_s16[7] + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, 0, 0);
vertexes[1].y = list_s16[7] + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, 0, 0);
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, 0, 0);
vertexes[1].y = (xy >> 16) + psx_gpu->offset_y;
render_line(psx_gpu, vertexes, current_command, 0, 0);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, uv & 0xFF, (uv >> 8) & 0xFF,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, uv & 0xFF, (uv >> 8) & 0xFF,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, uv & 0xFF, (uv >> 8) & 0xFF,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, uv & 0xFF, (uv >> 8) & 0xFF,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, uv & 0xFF, (uv >> 8) & 0xFF,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, uv & 0xFF, (uv >> 8) & 0xFF,
&width, &height, current_command, list[0]);
#endif
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
#endif
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
- u32 current_command = 0, command_length, cpu_cycles = 0;
+ u32 current_command = 0, command_length;
+ u32 cpu_cycles_sum = 0, cpu_cycles = *cpu_cycles_last;
get_vertex_data_xy(2, 6);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy(2, 6);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv(2, 10);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv(2, 10);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy(3, 8);
do_quad_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy(3, 8);
do_quad_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_rgb(2, 8);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_rgb(2, 8);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv_rgb(2, 12);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_uv_rgb(2, 12);
do_triangle_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_rgb(3, 12);
do_quad_enhanced(psx_gpu, vertexes, current_command);
get_vertex_data_xy_rgb(3, 12);
do_quad_enhanced(psx_gpu, vertexes, current_command);
render_line(psx_gpu, vertexes, current_command, list[0], 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, list[0], 1);
render_line(psx_gpu, vertexes, current_command, list[0], 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, list[0], 1);
render_line(psx_gpu, vertexes, current_command, list[0], 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, list[0], 1);
render_line(psx_gpu, vertexes, current_command, list[0], 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, list[0], 1);
render_line(psx_gpu, vertexes, current_command, 0, 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, 0, 1);
render_line(psx_gpu, vertexes, current_command, 0, 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, 0, 1);
render_line(psx_gpu, vertexes, current_command, 0, 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, 0, 1);
render_line(psx_gpu, vertexes, current_command, 0, 0);
if (enhancement_enable(psx_gpu))
render_line(psx_gpu, vertexes, current_command, 0, 1);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
- if (check_enhanced_range(psx_gpu, x, x + width))
+ if (check_enhanced_range(psx_gpu, x, x + width)) {
+ width = list_s16[4] & 0x3FF;
+ height = list_s16[5] & 0x1FF;
do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
render_sprite(psx_gpu, x, y, u, v,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, u, v,
&width, &height, current_command, list[0]);
- if (check_enhanced_range(psx_gpu, x, x + width))
+ if (check_enhanced_range(psx_gpu, x, x + width)) {
+ width = list_s16[6] & 0x3FF;
+ height = list_s16[7] & 0x1FF;
do_sprite_enhanced(psx_gpu, x, y, u, v, width, height, list[0]);
do_sprite_enhanced(psx_gpu, x, y, u, v, width, height, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
- do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
- cpu_cycles += gput_sprite(1, 1);
+ do_sprite_enhanced(psx_gpu, x, y, 0, 0, 1, 1, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
- do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
- cpu_cycles += gput_sprite(width, height);
+ do_sprite_enhanced(psx_gpu, x, y, 0, 0, 8, 8, list[0]);
render_sprite(psx_gpu, x, y, u, v,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, u, v,
&width, &height, current_command, list[0]);
- do_sprite_enhanced(psx_gpu, x, y, u, v, width, height, list[0]);
- cpu_cycles += gput_sprite(width, height);
+ do_sprite_enhanced(psx_gpu, x, y, u, v, 8, 8, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
render_sprite(psx_gpu, x, y, 0, 0, &width, &height,
current_command, list[0]);
- do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
- cpu_cycles += gput_sprite(width, height);
+ do_sprite_enhanced(psx_gpu, x, y, 0, 0, 16, 16, list[0]);
render_sprite(psx_gpu, x, y, u, v,
&width, &height, current_command, list[0]);
render_sprite(psx_gpu, x, y, u, v,
&width, &height, current_command, list[0]);
- do_sprite_enhanced(psx_gpu, x, y, u, v, width, height, list[0]);
- cpu_cycles += gput_sprite(width, height);
+ do_sprite_enhanced(psx_gpu, x, y, u, v, 16, 16, list[0]);