aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExophase2011-12-29 02:40:25 +0200
committernotaz2011-12-29 02:40:25 +0200
commitf9248bbfa31729f0d902db00269e50f2d03082ba (patch)
tree94c9fbbde0b4d18deb156929ac16eb60bf8ec3b3
parentc069dc1bff054b9e47ba7bdf9a2fc8344b90ea89 (diff)
downloadpcsx_rearmed-f9248bbfa31729f0d902db00269e50f2d03082ba.tar.gz
pcsx_rearmed-f9248bbfa31729f0d902db00269e50f2d03082ba.tar.bz2
pcsx_rearmed-f9248bbfa31729f0d902db00269e50f2d03082ba.zip
psx_gpu: fix lines
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu.c7
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu_main.c1
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu_parse.c13
3 files changed, 17 insertions, 4 deletions
diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c
index 49e8c8b..cc40748 100644
--- a/plugins/gpu_neon/psx_gpu/psx_gpu.c
+++ b/plugins/gpu_neon/psx_gpu/psx_gpu.c
@@ -2270,7 +2270,7 @@ void shade_blocks_unshaded_untextured_indirect(psx_gpu_struct *psx_gpu);
void shade_blocks_unshaded_untextured_direct(psx_gpu_struct *psx_gpu);
#ifndef NEON_BUILD
-
+
void shade_blocks_unshaded_untextured_indirect(psx_gpu_struct *psx_gpu)
{
}
@@ -4431,6 +4431,11 @@ void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram)
psx_gpu->mask_msb = 0;
+ psx_gpu->texture_window_x = 0;
+ psx_gpu->texture_window_y = 0;
+ psx_gpu->texture_mask_width = 0xFF;
+ psx_gpu->texture_mask_height = 0xFF;
+
memset(psx_gpu->vram_ptr, 0, sizeof(u16) * 1024 * 512);
initialize_reciprocal_table();
diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c
index 8624ff0..f1f7944 100644
--- a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c
+++ b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c
@@ -294,6 +294,7 @@ int main(int argc, char *argv[])
percent_of(sprites_8bpp, sprites), percent_of(sprites_16bpp, sprites),
percent_of(sprites_untextured, sprites));
}
+ printf(" %d lines\n", lines);
printf("\n");
printf(" %d mismatches\n\n\n", mismatches);
#endif
diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
index 2099edf..be69f44 100644
--- a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
+++ b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c
@@ -228,7 +228,7 @@ void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size)
get_vertex_data_xy(0, 2);
get_vertex_data_xy(1, 4);
get_vertex_data_xy(2, 6);
-
+
render_triangle(psx_gpu, vertexes, current_command);
break;
}
@@ -359,7 +359,8 @@ void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size)
while(1)
{
xy = *list_position;
- if(xy == 0x55555555)
+
+ if((xy & 0xF000F000) == 0x50005000)
break;
vertexes[0] = vertexes[1];
@@ -370,6 +371,9 @@ void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size)
list_position++;
num_vertexes++;
+ if(list_position > list_end)
+ break;
+
render_line(psx_gpu, vertexes, current_command, list[0]);
}
@@ -413,7 +417,7 @@ void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size)
while(1)
{
color = list_position[0];
- if(color == 0x55555555)
+ if((color & 0xF000F000) == 0x50005000)
break;
xy = list_position[1];
@@ -429,6 +433,9 @@ void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size)
list_position += 2;
num_vertexes++;
+ if(list_position > list_end)
+ break;
+
render_line(psx_gpu, vertexes, current_command, 0);
}