pl_rearmed_cbs.screen_centering_y = atoi(var.value);
}
+ var.value = NULL;
+ var.key = "pcsx_rearmed_show_overscan";
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ {
+ if (strcmp(var.value, "auto") == 0)
+ pl_rearmed_cbs.show_overscan = 1;
+ else if (strcmp(var.value, "hack") == 0)
+ pl_rearmed_cbs.show_overscan = 2;
+ else
+ pl_rearmed_cbs.show_overscan = 0;
+ }
+
#ifdef THREAD_RENDERING
var.key = "pcsx_rearmed_gpu_thread_rendering";
var.value = NULL;
},
"auto",
},
+ {
+ "pcsx_rearmed_show_overscan",
+ "(GPU) Show horizontal overscan",
+ NULL,
+ "The PSX can display graphics way into the horizontal borders, even if most screens would crop it. This option tries to display all such graphics. Note that this may result in unusual resolutions that your device might not handle well. The 'Hack' option is intended for the widescreen hacks.",
+ NULL,
+ "video",
+ {
+ { "disabled", NULL },
+ { "auto", "Auto" },
+ { "hack", "Hack" },
+ { NULL, NULL },
+ },
+ "disabled",
+ },
{
"pcsx_rearmed_screen_centering",
"(GPU) Screen centering",
MA_OPT_SCANLINES,
MA_OPT_SCANLINE_LEVEL,
MA_OPT_CENTERING,
+ MA_OPT_OVERSCAN,
} menu_id;
static int last_vout_w, last_vout_h, last_vout_bpp;
CE_INTVAL_P(screen_centering_type),
CE_INTVAL_P(screen_centering_x),
CE_INTVAL_P(screen_centering_y),
+ CE_INTVAL_P(show_overscan),
CE_INTVAL(spu_config.iUseReverb),
CE_INTVAL(spu_config.iXAPitch),
CE_INTVAL(spu_config.iUseInterpolation),
NULL };
static const char *men_dummy[] = { NULL };
static const char *men_centering[] = { "Auto", "Ingame", "Borderless", "Force", NULL };
+static const char *men_overscan[] = { "OFF", "Auto", "Hack", NULL };
static const char h_scaler[] = "int. 2x - scales w. or h. 2x if it fits on screen\n"
"int. 4:3 - uses integer if possible, else fractional";
static const char h_cscaler[] = "Displays the scaler layer, you can resize it\n"
static menu_entry e_menu_gfx_options[] =
{
mee_enum ("Screen centering", MA_OPT_CENTERING, pl_rearmed_cbs.screen_centering_type, men_centering),
+ mee_enum ("Show overscan", MA_OPT_OVERSCAN, pl_rearmed_cbs.show_overscan, men_overscan),
mee_enum_h ("Scaler", MA_OPT_VARSCALER, g_scaler, men_scaler, h_scaler),
mee_enum ("Video output mode", MA_OPT_VOUT_MODE, plat_target.vout_method, men_dummy),
mee_onoff ("Software Scaling", MA_OPT_SCALER2, soft_scaling, 1),
int screen_centering_type_default;
int screen_centering_x;
int screen_centering_y;
+ int show_overscan;
};
extern struct rearmed_cbs pl_rearmed_cbs;
x = (x + 1) & ~1; // blitter limitation
sw /= hdiv;
sw = (sw + 2) & ~3; // according to nocash
+
+ if (gpu.state.show_overscan == 2) // widescreen hack
+ sw = (sw + 63) & ~63;
+ if (gpu.state.show_overscan && sw >= hres)
+ x = 0, hres = sw;
switch (type) {
case C_INGAME:
break;
gpu.screen.w = sw;
gpu.screen.hres = hres;
gpu.state.dims_changed = 1;
- //printf("xx %d %d -> %2d, %d / %d\n",
- // gpu.screen.x1, gpu.screen.x2, x, sw, hres);
+ //printf("xx %d %d (%d) -> %2d, %d / %d\n", gpu.screen.x1,
+ // gpu.screen.x2, gpu.screen.x2 - gpu.screen.x1, x, sw, hres);
}
static noinline void update_height(void)
gpu.state.screen_centering_type_default = cbs->screen_centering_type_default;
if (gpu.state.screen_centering_type != cbs->screen_centering_type
|| gpu.state.screen_centering_x != cbs->screen_centering_x
- || gpu.state.screen_centering_y != cbs->screen_centering_y) {
+ || gpu.state.screen_centering_y != cbs->screen_centering_y
+ || gpu.state.show_overscan != cbs->show_overscan) {
gpu.state.screen_centering_type = cbs->screen_centering_type;
gpu.state.screen_centering_x = cbs->screen_centering_x;
gpu.state.screen_centering_y = cbs->screen_centering_y;
+ gpu.state.show_overscan = cbs->show_overscan;
update_width();
update_height();
}
uint32_t downscale_enable:1;
uint32_t downscale_active:1;
uint32_t dims_changed:1;
+ uint32_t show_overscan:2;
uint32_t *frame_count;
uint32_t *hcnt; /* hsync count */
struct {