}
// always need upscaling for H32, before mixing in 32X layer
PicoIn.opt |= POPT_EN_SOFTSCALE;
+ PicoIn.opt &= ~POPT_DIS_32C_BORDER;
if (use_32x_line_mode)
// we'll draw via FinalizeLine32xRGB555 (rare)
int gp2x_mode = 16;\r
int renderer = get_renderer();\r
\r
- PicoIn.opt &= ~POPT_ALT_RENDERER;\r
- emu_scan_begin = NULL;\r
- emu_scan_end = NULL;\r
+ PicoIn.opt &= ~(POPT_ALT_RENDERER|POPT_DIS_32C_BORDER|POPT_EN_SOFTSCALE);\r
+ if (currentConfig.scaling == EOPT_SCALE_SW) {\r
+ PicoIn.opt |= POPT_EN_SOFTSCALE;\r
+ PicoIn.filter = EOPT_FILTER_BILINEAR2;\r
+ } else if (currentConfig.scaling == EOPT_SCALE_HW)\r
+ // hw scaling, render without any padding\r
+ PicoIn.opt |= POPT_DIS_32C_BORDER;\r
\r
switch (renderer) {\r
case RT_16BIT:\r
gp2x_mode = 16;\r
}\r
\r
+ emu_scan_begin = NULL;\r
+ emu_scan_end = NULL;\r
+\r
if (currentConfig.EmuOpt & EOPT_WIZ_TEAR_FIX) {\r
if ((PicoIn.AHW & PAHW_32X) || renderer == RT_16BIT) {\r
emu_scan_begin = EmuScanBegin16_rot;\r
\r
Pico.m.dirtyPal = 1;\r
\r
- PicoIn.opt &= ~(POPT_DIS_32C_BORDER|POPT_EN_SOFTSCALE);\r
- if (currentConfig.scaling == EOPT_SCALE_SW) {\r
- PicoIn.opt |= POPT_EN_SOFTSCALE;\r
- PicoIn.filter = EOPT_FILTER_BILINEAR2;\r
- } else if (currentConfig.scaling == EOPT_SCALE_HW)\r
- // hw scaling, render without any padding\r
- PicoIn.opt |= POPT_DIS_32C_BORDER;\r
-\r
// palette converters for 8bit modes\r
make_local_pal = (PicoIn.AHW & PAHW_SMS) ? make_local_pal_sms : make_local_pal_md;\r
}\r
#else
#include <platform/common/upscale.h>
#endif
+#include <platform/common/emu.h>
#ifdef _3DS
#include "3ds/3ds_utils.h"
return ret;
}
+static void apply_renderer()
+{
+ PicoIn.opt &= ~(POPT_ALT_RENDERER|POPT_EN_SOFTSCALE);
+ PicoIn.opt |= POPT_DIS_32C_BORDER;
+ if (vout_format == PDF_NONE)
+ PicoIn.opt |= POPT_ALT_RENDERER;
+ PicoDrawSetOutFormat(vout_format, 0);
+ if (!vout_16bit && vout_format == PDF_8BIT)
+ PicoDrawSetOutBuf(Pico.est.Draw2FB, 328);
+}
+
void emu_video_mode_change(int start_line, int line_count, int start_col, int col_count)
{
struct retro_system_av_info av_info;
vm_current_col_count = col_count;
// 8bit renderes create a 328x256 CLUT image, while 16bit creates 320x240 RGB
- vout_16bit = vout_format == PDF_RGB555 || (PicoIn.AHW & PAHW_32X);
-
#if defined(RENDER_GSKIT_PS2)
// calculate the borders of the real image inside the picodrive image
vout_width = (vout_16bit ? VOUT_MAX_WIDTH : VOUT_8BIT_WIDTH);
void emu_32x_startup(void)
{
+ PicoIn.filter = EOPT_FILTER_SMOOTHER; // for H32 upscaling
PicoDrawSetOutFormat(vout_format, 0);
+ vout_16bit = 1;
+
if ((vm_current_start_line != -1) &&
(vm_current_line_count != -1) &&
(vm_current_start_col != -1) &&
PicoIn.sndOut = sndBuffer;
PsndRerate(0);
- PicoDrawSetOutFormat(vout_format, 0);
- if (vout_format == PDF_8BIT)
- PicoDrawSetOutBuf(Pico.est.Draw2FB, 328);
+ apply_renderer();
/* Setup retro memory maps */
set_memory_maps();
vout_format = PDF_8BIT;
else if (strcmp(var.value, "accurate") == 0)
vout_format = PDF_RGB555;
+ vout_16bit = vout_format == PDF_RGB555 || (PicoIn.AHW & PAHW_32X);
- PicoIn.opt &= ~POPT_ALT_RENDERER;
- if (vout_format == PDF_NONE)
- PicoIn.opt |= POPT_ALT_RENDERER;
- PicoDrawSetOutFormat(vout_format, 0);
- if (vout_format == PDF_8BIT)
- PicoDrawSetOutBuf(Pico.est.Draw2FB, 328);
+ apply_renderer();
}
var.value = NULL;
static void apply_renderer(void)\r
{\r
PicoIn.opt &= ~(POPT_ALT_RENDERER|POPT_EN_SOFTSCALE|POPT_DIS_32C_BORDER);\r
+ if (is_16bit_mode()) {\r
+ if (currentConfig.scaling == EOPT_SCALE_SW) {\r
+ PicoIn.opt |= POPT_EN_SOFTSCALE;\r
+ PicoIn.filter = currentConfig.filter;\r
+ } else if (currentConfig.scaling == EOPT_SCALE_HW)\r
+ // hw scaling, render without any padding\r
+ PicoIn.opt |= POPT_DIS_32C_BORDER;\r
+ } else\r
+ PicoIn.opt |= POPT_DIS_32C_BORDER;\r
\r
switch (get_renderer()) {\r
case RT_16BIT:\r
\r
if (PicoIn.AHW & PAHW_32X)\r
PicoDrawSetOutBuf(screen_buffer(g_screen_ptr), g_screen_ppitch * 2);\r
- if (is_16bit_mode()) {\r
- if (currentConfig.scaling == EOPT_SCALE_SW) {\r
- PicoIn.opt |= POPT_EN_SOFTSCALE;\r
- PicoIn.filter = currentConfig.filter;\r
- } else if (currentConfig.scaling == EOPT_SCALE_HW)\r
- // hw scaling, render without any padding\r
- PicoIn.opt |= POPT_DIS_32C_BORDER;\r
- } else\r
- PicoIn.opt |= POPT_DIS_32C_BORDER;\r
-\r
Pico.m.dirtyPal = 1;\r
}\r
\r
PicoDrawSetCallbacks(cb_vscaling_begin,cb_vscaling_nop);\r
break;\r
case EOPT_SCALE_SW:\r
- screen_y = (screen_h - 240)/2;\r
+ screen_y = (screen_h - 240)/2 + (out_h > 144);\r
// NTSC always has 224 visible lines, anything smaller has bars\r
if (out_h < 224 && out_h > 144)\r
screen_y += (224 - out_h)/2;\r