notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cdrom: change pause timing again
[pcsx_rearmed.git]
/
plugins
/
gpu_neon
/
psx_gpu
/
psx_gpu_parse.c
diff --git
a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
index
d401522
..
d81b707
100644
(file)
--- a/
plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
+++ b/
plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
@@
-1018,8
+1018,6
@@
void scale2x_tiles8(void *dst, const void *src, int w8, int h)
}
#endif
}
#endif
-static int disable_main_render;
-
// simple check for a case where no clipping is used
// - now handled by adjusting the viewport
static int check_enhanced_range(psx_gpu_struct *psx_gpu, int x, int y)
// simple check for a case where no clipping is used
// - now handled by adjusting the viewport
static int check_enhanced_range(psx_gpu_struct *psx_gpu, int x, int y)
@@
-1065,6
+1063,7
@@
static void patch_v(vertex_struct *vertex_ptrs, int count, int old, int new)
vertex_ptrs[i].v = new;
}
vertex_ptrs[i].v = new;
}
+// this sometimes does more harm than good, like in PE2
static void uv_hack(vertex_struct *vertex_ptrs, int vertex_count)
{
int i, u[4], v[4];
static void uv_hack(vertex_struct *vertex_ptrs, int vertex_count)
{
int i, u[4], v[4];
@@
-1103,7
+1102,7
@@
static void do_triangle_enhanced(psx_gpu_struct *psx_gpu,
if (!prepare_triangle(psx_gpu, vertexes, vertex_ptrs))
return;
if (!prepare_triangle(psx_gpu, vertexes, vertex_ptrs))
return;
- if (!
disable_main_render
)
+ if (!
psx_gpu->hack_disable_main
)
render_triangle_p(psx_gpu, vertex_ptrs, current_command);
if (!check_enhanced_range(psx_gpu, vertex_ptrs[0]->x, vertex_ptrs[2]->x))
render_triangle_p(psx_gpu, vertex_ptrs, current_command);
if (!check_enhanced_range(psx_gpu, vertex_ptrs[0]->x, vertex_ptrs[2]->x))
@@
-1322,7
+1321,8
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
get_vertex_data_xy_uv(2, 10);
get_vertex_data_xy_uv(3, 14);
get_vertex_data_xy_uv(2, 10);
get_vertex_data_xy_uv(3, 14);
- uv_hack(vertexes, 4);
+ if (psx_gpu->hack_texture_adj)
+ uv_hack(vertexes, 4);
do_quad_enhanced(psx_gpu, vertexes, current_command);
gput_sum(cpu_cycles_sum, cpu_cycles, gput_quad_base_t());
break;
do_quad_enhanced(psx_gpu, vertexes, current_command);
gput_sum(cpu_cycles_sum, cpu_cycles, gput_quad_base_t());
break;
@@
-1375,7
+1375,8
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
get_vertex_data_xy_uv_rgb(2, 12);
get_vertex_data_xy_uv_rgb(3, 18);
get_vertex_data_xy_uv_rgb(2, 12);
get_vertex_data_xy_uv_rgb(3, 18);
- uv_hack(vertexes, 4);
+ if (psx_gpu->hack_texture_adj)
+ uv_hack(vertexes, 4);
do_quad_enhanced(psx_gpu, vertexes, current_command);
gput_sum(cpu_cycles_sum, cpu_cycles, gput_quad_base_gt());
break;
do_quad_enhanced(psx_gpu, vertexes, current_command);
gput_sum(cpu_cycles_sum, cpu_cycles, gput_quad_base_gt());
break;
@@
-1516,10
+1517,13
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
- 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]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
+ }
break;
}
break;
}
@@
-1536,10
+1540,13
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
- 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]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
+ }
break;
}
break;
}
@@
-1551,10
+1558,10
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(1, 1));
if (check_enhanced_range(psx_gpu, x, x + 1))
if (check_enhanced_range(psx_gpu, x, x + 1))
- do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(1, 1));
+ do_sprite_enhanced(psx_gpu, x, y, 0, 0, 1, 1, list[0]);
break;
}
break;
}
@@
-1566,10
+1573,10
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
if (check_enhanced_range(psx_gpu, x, x + 8))
if (check_enhanced_range(psx_gpu, x, x + 8))
- do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
+ do_sprite_enhanced(psx_gpu, x, y, 0, 0, 8, 8, list[0]);
break;
}
break;
}
@@
-1585,10
+1592,10
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
if (check_enhanced_range(psx_gpu, x, x + 8))
if (check_enhanced_range(psx_gpu, x, x + 8))
- do_sprite_enhanced(psx_gpu, x, y, u, v, width, height, list[0]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
+ do_sprite_enhanced(psx_gpu, x, y, u, v, 8, 8, list[0]);
break;
}
break;
}
@@
-1600,10
+1607,10
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
if (check_enhanced_range(psx_gpu, x, x + 16))
if (check_enhanced_range(psx_gpu, x, x + 16))
- do_sprite_enhanced(psx_gpu, x, y, 0, 0, width, height, list[0]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
+ do_sprite_enhanced(psx_gpu, x, y, 0, 0, 16, 16, list[0]);
break;
}
break;
}
@@
-1619,10
+1626,10
@@
u32 gpu_parse_enhanced(psx_gpu_struct *psx_gpu, u32 *list, u32 size,
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]);
+ gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
if (check_enhanced_range(psx_gpu, x, x + 16))
if (check_enhanced_range(psx_gpu, x, x + 16))
- do_sprite_enhanced(psx_gpu, x, y, u, v, width, height, list[0]);
- gput_sum(cpu_cycles_sum, cpu_cycles, gput_sprite(width, height));
+ do_sprite_enhanced(psx_gpu, x, y, u, v, 16, 16, list[0]);
break;
}
break;
}