X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu%2Fpsx_gpu_parse.c;h=7fee2ebe94a38ec36c3ee728e53eb24b2c5d0540;hp=2099edf3ef653f7eb7bbf823dae839794767cf95;hb=cec398c037bc9c9ec9010dcbed04f2c3ae7d2c61;hpb=4be044baf017d654481aee4301325320c4c1c31c diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c b/plugins/gpu_neon/psx_gpu/psx_gpu_parse.c index 2099edf3..7fee2ebe 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); } @@ -546,7 +553,10 @@ void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size) u32 load_size = load_width * load_height; command_length += load_size / 2; - + + if(load_size & 1) + command_length++; + render_block_copy(psx_gpu, (u16 *)&(list_s16[6]), load_x, load_y, load_width, load_height, load_width); break;