From: notaz Date: Mon, 19 Dec 2011 21:32:49 +0000 (+0200) Subject: gpu_neon: make use of unai's lineskip mode X-Git-Tag: r12~17 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89c0de4234815e0fa9e8399b940ecec6c89a062b;p=pcsx_rearmed.git gpu_neon: make use of unai's lineskip mode --- diff --git a/frontend/menu.c b/frontend/menu.c index 31425066..d3e16a42 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -283,6 +283,7 @@ static const struct { CE_INTVAL_V(frameskip, 3), CE_INTVAL_P(gpu_peops.iUseDither), CE_INTVAL_P(gpu_peops.dwActFixes), + CE_INTVAL_P(gpu_unai.lineskip), CE_INTVAL_P(gpu_unai.abe_hack), CE_INTVAL_P(gpu_unai.no_light), CE_INTVAL_P(gpu_unai.no_blend), @@ -1191,6 +1192,7 @@ static int menu_loop_gfx_options(int id, int keys) static menu_entry e_menu_plugin_gpu_unai[] = { + mee_onoff ("Skip every 2nd line", 0, pl_rearmed_cbs.gpu_unai.lineskip, 1), mee_onoff ("Abe's Odyssey hack", 0, pl_rearmed_cbs.gpu_unai.abe_hack, 1), mee_onoff ("Disable lighting", 0, pl_rearmed_cbs.gpu_unai.no_light, 1), mee_onoff ("Disable blending", 0, pl_rearmed_cbs.gpu_unai.no_blend, 1), diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h index 0ec55a2f..2806056f 100644 --- a/frontend/plugin_lib.h +++ b/frontend/plugin_lib.h @@ -59,6 +59,7 @@ struct rearmed_cbs { struct { int abe_hack; int no_light, no_blend; + int lineskip; } gpu_unai; }; diff --git a/plugins/gpu_neon/unai_if.cpp b/plugins/gpu_neon/unai_if.cpp index 67e045d1..4e3e7f91 100644 --- a/plugins/gpu_neon/unai_if.cpp +++ b/plugins/gpu_neon/unai_if.cpp @@ -39,10 +39,10 @@ #define FRAME_HEIGHT 512 #define FRAME_OFFSET(x,y) (((y)<<10)+(x)) -static bool isSkip = false; /* skip frame (info coming from GPU) */ -static int linesInterlace = 0; /* internal lines interlace */ - +#define isSkip 0 /* skip frame (info coming from GPU) */ #define alt_fps 0 +static int linesInterlace; /* internal lines interlace */ +static int force_interlace; static bool light = true; /* lighting */ static bool blend = true; /* blending */ @@ -165,9 +165,13 @@ extern const unsigned char cmd_lengths[256]; void do_cmd_list(unsigned int *list, int list_len) { unsigned int cmd, len; - unsigned int *list_end = list + list_len; + linesInterlace = force_interlace; +#ifndef __ARM_ARCH_7A__ /* XXX */ + linesInterlace |= gpu.status.interlace; +#endif + for (; list < list_end; list += 1 + len) { cmd = *list >> 24; @@ -274,6 +278,7 @@ void renderer_flush_queues(void) void renderer_set_config(const struct rearmed_cbs *cbs) { + force_interlace = cbs->gpu_unai.lineskip; enableAbbeyHack = cbs->gpu_unai.abe_hack; light = !cbs->gpu_unai.no_light; blend = !cbs->gpu_unai.no_blend; diff --git a/plugins/gpu_unai/gpu_command.h b/plugins/gpu_unai/gpu_command.h index a5b61b67..d380daec 100644 --- a/plugins/gpu_unai/gpu_command.h +++ b/plugins/gpu_unai/gpu_command.h @@ -373,7 +373,9 @@ void gpuSendPacketFunction(const int PRIM) break; case 0xA0: // sys ->vid gpuLoadImage(); // prim handles updateLace && skip +#ifndef isSkip // not a define if (alt_fps) isSkip=false; +#endif DO_LOG(("gpuLoadImage(0x%x)\n",PRIM)); break; case 0xC0: // vid -> sys