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
psx_gpu: 2x sprite renderer
[pcsx_rearmed.git]
/
plugins
/
gpu_neon
/
psx_gpu
/
psx_gpu.c
diff --git
a/plugins/gpu_neon/psx_gpu/psx_gpu.c
b/plugins/gpu_neon/psx_gpu/psx_gpu.c
index
28ebcf5
..
9b5a64d
100644
(file)
--- a/
plugins/gpu_neon/psx_gpu/psx_gpu.c
+++ b/
plugins/gpu_neon/psx_gpu/psx_gpu.c
@@
-3118,14
+3118,6
@@
static void render_triangle_p(psx_gpu_struct *psx_gpu,
}
}
}
}
}
}
- if(psx_gpu->render_mode & RENDER_DOUBLE_MODE)
- {
- u32 i;
- for(i = 0; i < psx_gpu->num_spans; i++)
- {
- psx_gpu->span_edge_data[i].y *= 2;
- }
- }
u32 render_state = flags &
(RENDER_FLAGS_MODULATE_TEXELS | RENDER_FLAGS_BLEND |
u32 render_state = flags &
(RENDER_FLAGS_MODULATE_TEXELS | RENDER_FLAGS_BLEND |
@@
-4187,9
+4179,6
@@
do \
{ \
delta_y *= -1; \
\
{ \
delta_y *= -1; \
\
- if(delta_y >= 512) \
- return; \
- \
if(delta_x > delta_y) \
{ \
draw_line_span_horizontal(decrement, shading, blending, dithering, \
if(delta_x > delta_y) \
{ \
draw_line_span_horizontal(decrement, shading, blending, dithering, \
@@
-4203,9
+4192,6
@@
do \
} \
else \
{ \
} \
else \
{ \
- if(delta_y >= 512) \
- return; \
- \
if(delta_x > delta_y) \
{ \
draw_line_span_horizontal(increment, shading, blending, dithering, \
if(delta_x > delta_y) \
{ \
draw_line_span_horizontal(increment, shading, blending, dithering, \
@@
-4220,7
+4206,7
@@
do \
void render_line(psx_gpu_struct *psx_gpu, vertex_struct *vertexes, u32 flags,
void render_line(psx_gpu_struct *psx_gpu, vertex_struct *vertexes, u32 flags,
- u32 color)
+ u32 color
, int double_resolution
)
{
s32 color_r, color_g, color_b;
u32 triangle_winding = 0;
{
s32 color_r, color_g, color_b;
u32 triangle_winding = 0;
@@
-4272,9
+4258,19
@@
void render_line(psx_gpu_struct *psx_gpu, vertex_struct *vertexes, u32 flags,
delta_x = x_b - x_a;
delta_y = y_b - y_a;
delta_x = x_b - x_a;
delta_y = y_b - y_a;
- if(delta_x >= 1024)
+ if(delta_x >= 1024
|| delta_y >= 512 || delta_y <= -512
)
return;
return;
+ if(double_resolution)
+ {
+ x_a *= 2;
+ x_b *= 2;
+ y_a *= 2;
+ y_b *= 2;
+ delta_x *= 2;
+ delta_y *= 2;
+ }
+
flags &= ~RENDER_FLAGS_TEXTURE_MAP;
vram_ptr = psx_gpu->vram_out_ptr + (y_a * 1024) + x_a;
flags &= ~RENDER_FLAGS_TEXTURE_MAP;
vram_ptr = psx_gpu->vram_out_ptr + (y_a * 1024) + x_a;
@@
-4519,6
+4515,9
@@
void render_block_fill_enh(psx_gpu_struct *psx_gpu, u32 color, u32 x, u32 y,
if((width == 0) || (height == 0))
return;
if((width == 0) || (height == 0))
return;
+ if(width > 1024)
+ width = 1024;
+
u32 r = color & 0xFF;
u32 g = (color >> 8) & 0xFF;
u32 b = (color >> 16) & 0xFF;
u32 r = color & 0xFF;
u32 g = (color >> 8) & 0xFF;
u32 b = (color >> 16) & 0xFF;
@@
-4526,9
+4525,9
@@
void render_block_fill_enh(psx_gpu_struct *psx_gpu, u32 color, u32 x, u32 y,
psx_gpu->mask_msb;
u32 color_32bpp = color_16bpp | (color_16bpp << 16);
psx_gpu->mask_msb;
u32 color_32bpp = color_16bpp | (color_16bpp << 16);
- u32 *vram_ptr = (u32 *)(psx_gpu->vram_out_ptr + x + (y *
2048
));
+ u32 *vram_ptr = (u32 *)(psx_gpu->vram_out_ptr + x + (y *
1024
));
- u32 pitch =
2048
/ 2 - (width / 2);
+ u32 pitch =
1024
/ 2 - (width / 2);
u32 num_width;
while(height)
u32 num_width;
while(height)
@@
-4671,6
+4670,8
@@
void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram)
psx_gpu->dither_table[3] = dither_table_row(3, -1, 2, -2);
psx_gpu->primitive_type = PRIMITIVE_TYPE_UNKNOWN;
psx_gpu->dither_table[3] = dither_table_row(3, -1, 2, -2);
psx_gpu->primitive_type = PRIMITIVE_TYPE_UNKNOWN;
+
+ psx_gpu->enhancement_x_threshold = 256;
}
u64 get_us(void)
}
u64 get_us(void)