From 7d9d35b75a18e02357b8fb2ff07d82c218ddf417 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 18 Mar 2014 18:35:08 +0200 Subject: [PATCH] 2710b11 --- cfgfile.cpp | 646 ++++++++++-------- consolehook.cpp | 3 +- custom.cpp | 41 +- disk.cpp | 123 +++- drawing.cpp | 91 ++- filesys.cpp | 4 + gfxutil.cpp | 6 +- include/drawing.h | 4 +- include/options.h | 47 +- inputdevice.cpp | 7 + main.cpp | 19 +- od-win32/avioutput.h | 8 +- od-win32/dinput.cpp | 4 + od-win32/direct3d.cpp | 79 ++- od-win32/hardfile_win32.cpp | 3 +- od-win32/lib/prowizard.lib | Bin 1099036 -> 1099076 bytes od-win32/lib/prowizard_x64.lib | Bin 1327496 -> 1327496 bytes od-win32/resources/resource.h | 13 +- od-win32/resources/winuae.rc | 200 +++--- od-win32/rp.cpp | 73 +- od-win32/scaler_more.cpp | 4 +- od-win32/sysconfig.h | 3 + od-win32/win32.cpp | 8 +- od-win32/win32.h | 4 +- od-win32/win32_scaler.cpp | 72 +- od-win32/win32gfx.cpp | 114 ++-- od-win32/win32gui.cpp | 293 ++++---- od-win32/winuae_msvc11/winuae_msvc.vcxproj | 2 + .../winuae_msvc11/winuae_msvc.vcxproj.filters | 6 + od-win32/winuaechangelog.txt | 43 +- prowizard/misc/misc.c | 2 +- qemuvga/qemuuaeglue.h | 24 +- zfile.cpp | 16 +- 33 files changed, 1151 insertions(+), 811 deletions(-) diff --git a/cfgfile.cpp b/cfgfile.cpp index 051bbaed..e77d13bc 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -128,7 +128,12 @@ static const TCHAR *guimode1[] = { _T("no"), _T("yes"), _T("nowait"), 0 }; static const TCHAR *guimode2[] = { _T("false"), _T("true"), _T("nowait"), 0 }; static const TCHAR *guimode3[] = { _T("0"), _T("1"), _T("nowait"), 0 }; static const TCHAR *csmode[] = { _T("ocs"), _T("ecs_agnus"), _T("ecs_denise"), _T("ecs"), _T("aga"), 0 }; -static const TCHAR *linemode[] = { _T("none"), _T("none"), _T("double"), _T("scanlines"), _T("double2"), _T("scanlines2"), _T("double3"), _T("scanlines3"), 0 }; +static const TCHAR *linemode[] = { + _T("none"), + _T("double"), _T("scanlines"), _T("scanlines2p"), _T("scanlines3p"), + _T("double2"), _T("scanlines2"), _T("scanlines2p2"), _T("scanlines2p3"), + _T("double3"), _T("scanlines3"), _T("scanlines3p2"), _T("scanlines3p3"), + 0 }; static const TCHAR *speedmode[] = { _T("max"), _T("real"), 0 }; static const TCHAR *colormode1[] = { _T("8bit"), _T("15bit"), _T("16bit"), _T("8bit_dither"), _T("4bit_dither"), _T("32bit"), 0 }; static const TCHAR *colormode2[] = { _T("8"), _T("15"), _T("16"), _T("8d"), _T("4d"), _T("32"), 0 }; @@ -203,6 +208,7 @@ static const TCHAR *waitblits[] = { _T("disabled"), _T("automatic"), _T("noidleo static const TCHAR *autoext2[] = { _T("disabled"), _T("copy"), _T("replace"), 0 }; static const TCHAR *leds[] = { _T("power"), _T("df0"), _T("df1"), _T("df2"), _T("df3"), _T("hd"), _T("cd"), _T("fps"), _T("cpu"), _T("snd"), _T("md"), 0 }; static int leds_order[] = { 3, 6, 7, 8, 9, 4, 5, 2, 1, 0, 9 }; +static const TCHAR *lacer[] = { _T("off"), _T("i"), _T("p"), 0 }; static const TCHAR *obsolete[] = { _T("accuracy"), _T("gfx_opengl"), _T("gfx_32bit_blits"), _T("32bit_blits"), @@ -522,16 +528,24 @@ static size_t cfg_write (const void *b, struct zfile *z) #define UTF8NAME _T(".utf8") -static void cfg_dowrite (struct zfile *f, const TCHAR *option, const TCHAR *value, int d, int target) +static void cfg_dowrite (struct zfile *f, const TCHAR *option, const TCHAR *optionext, const TCHAR *value, int d, int target) { char lf = 10; - TCHAR tmp[CONFIG_BLEN]; + TCHAR tmp[CONFIG_BLEN], tmpext[CONFIG_BLEN]; + const TCHAR *optionp; char tmpa[CONFIG_BLEN]; char *tmp1, *tmp2; int utf8; if (value == NULL) return; + if (optionext) { + _tcscpy (tmpext, option); + _tcscat (tmpext, optionext); + optionp = tmpext; + } else { + optionp = option; + } utf8 = 0; tmp1 = ua (value); tmp2 = uutf8 (value); @@ -539,14 +553,14 @@ static void cfg_dowrite (struct zfile *f, const TCHAR *option, const TCHAR *valu utf8 = 1; if (target) - _stprintf (tmp, _T("%s.%s=%s"), TARGET_NAME, option, value); + _stprintf (tmp, _T("%s.%s=%s"), TARGET_NAME, optionp, value); else - _stprintf (tmp, _T("%s=%s"), option, value); + _stprintf (tmp, _T("%s=%s"), optionp, value); if (d && isdefault (tmp)) goto end; cfg_write (tmp, f); if (utf8 && !unicode_config) { - char *opt = ua (option); + char *opt = ua (optionp); if (target) { char *tna = ua (TARGET_NAME); sprintf (tmpa, "%s.%s.utf8=%s", tna, opt, tmp2); @@ -562,7 +576,10 @@ end: xfree (tmp2); xfree (tmp1); } - +static void cfg_dowrite (struct zfile *f, const TCHAR *option, const TCHAR *value, int d, int target) +{ + cfg_dowrite (f, option, NULL, value, d, target); +} void cfgfile_write_bool (struct zfile *f, const TCHAR *option, bool b) { cfg_dowrite (f, option, b ? _T("true") : _T("false"), 0, 0); @@ -571,6 +588,10 @@ void cfgfile_dwrite_bool (struct zfile *f, const TCHAR *option, bool b) { cfg_dowrite (f, option, b ? _T("true") : _T("false"), 1, 0); } +void cfgfile_dwrite_bool (struct zfile *f, const TCHAR *option, const TCHAR *optionext, bool b) +{ + cfg_dowrite (f, option, optionext, b ? _T("true") : _T("false"), 1, 0); +} void cfgfile_dwrite_bool (struct zfile *f, const TCHAR *option, int b) { cfgfile_dwrite_bool (f, option, b != 0); @@ -579,10 +600,18 @@ void cfgfile_write_str (struct zfile *f, const TCHAR *option, const TCHAR *value { cfg_dowrite (f, option, value, 0, 0); } +void cfgfile_write_str (struct zfile *f, const TCHAR *option, const TCHAR *optionext, const TCHAR *value) +{ + cfg_dowrite (f, option, optionext, value, 0, 0); +} void cfgfile_dwrite_str (struct zfile *f, const TCHAR *option, const TCHAR *value) { cfg_dowrite (f, option, value, 1, 0); } +void cfgfile_dwrite_str (struct zfile *f, const TCHAR *option, const TCHAR *optionext, const TCHAR *value) +{ + cfg_dowrite (f, option, optionext, value, 1, 0); +} void cfgfile_target_write_bool (struct zfile *f, const TCHAR *option, bool b) { @@ -601,6 +630,20 @@ void cfgfile_target_dwrite_str (struct zfile *f, const TCHAR *option, const TCHA cfg_dowrite (f, option, value, 1, 1); } +void cfgfile_write (struct zfile *f, const TCHAR *option, const TCHAR *optionext, const TCHAR *format,...) +{ + va_list parms; + TCHAR tmp[CONFIG_BLEN], tmp2[CONFIG_BLEN]; + + if (optionext) { + _tcscpy (tmp2, option); + _tcscat (tmp2, optionext); + } + va_start (parms, format); + _vsntprintf (tmp, CONFIG_BLEN, format, parms); + cfg_dowrite (f, optionext ? tmp2 : option, tmp, 0, 0); + va_end (parms); +} void cfgfile_write (struct zfile *f, const TCHAR *option, const TCHAR *format,...) { va_list parms; @@ -611,6 +654,20 @@ void cfgfile_write (struct zfile *f, const TCHAR *option, const TCHAR *format,.. cfg_dowrite (f, option, tmp, 0, 0); va_end (parms); } +void cfgfile_dwrite (struct zfile *f, const TCHAR *option, const TCHAR *optionext, const TCHAR *format,...) +{ + va_list parms; + TCHAR tmp[CONFIG_BLEN], tmp2[CONFIG_BLEN]; + + if (optionext) { + _tcscpy (tmp2, option); + _tcscat (tmp2, optionext); + } + va_start (parms, format); + _vsntprintf (tmp, CONFIG_BLEN, format, parms); + cfg_dowrite (f, optionext ? tmp2 : option, tmp, 1, 0); + va_end (parms); +} void cfgfile_dwrite (struct zfile *f, const TCHAR *option, const TCHAR *format,...) { va_list parms; @@ -1102,6 +1159,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_dwrite_bool (f, _T("magic_mouse"), p->input_magic_mouse); cfgfile_dwrite_str (f, _T("magic_mousecursor"), magiccursors[p->input_magic_mouse_cursor]); cfgfile_dwrite_str (f, _T("absolute_mouse"), abspointers[p->input_tablet]); + cfgfile_dwrite_bool (f, _T("tablet_library"), p->tablet_library); cfgfile_dwrite_bool (f, _T("clipboard_sharing"), p->clipboard_sharing); cfgfile_dwrite_bool (f, _T("native_code"), p->native_code); @@ -1137,7 +1195,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write_str (f, _T("gfx_resolution"), lorestype1[p->gfx_resolution]); cfgfile_write_str (f, _T("gfx_lores_mode"), loresmode[p->gfx_lores_mode]); cfgfile_write_bool (f, _T("gfx_flickerfixer"), p->gfx_scandoubler); - cfgfile_write_str (f, _T("gfx_linemode"), p->gfx_scanlines >= 2 ? linemode[4 + (p->gfx_scanlines - 2)] : linemode[p->gfx_vresolution * 2 + (p->gfx_scanlines ? 1 : 0)]); + cfgfile_write_str (f, _T("gfx_linemode"), p->gfx_vresolution > 0 ? linemode[p->gfx_iscanlines * 4 + p->gfx_pscanlines + 1] : linemode[0]); cfgfile_write_str (f, _T("gfx_fullscreen_amiga"), fullmodes[p->gfx_apmode[0].gfx_fullscreen]); cfgfile_write_str (f, _T("gfx_fullscreen_picasso"), fullmodes[p->gfx_apmode[1].gfx_fullscreen]); cfgfile_write_str (f, _T("gfx_center_horizontal"), centermode1[p->gfx_xcenter]); @@ -1149,86 +1207,75 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_dwrite (f, _T("gfx_horizontal_tweak"), _T("%d"), p->gfx_extrawidth); #ifdef GFXFILTER - for (int i = 0; i gfx_filtershader[i][0]) - cfgfile_write (f, _T("gfx_filter_pre"), _T("D3D:%s"), p->gfx_filtershader[i]); - if (p->gfx_filtermask[i][0]) - cfgfile_write_str (f, _T("gfx_filtermask_pre"), p->gfx_filtermask[i]); - } - for (int i = 0; i gfx_filtershader[i + MAX_FILTERSHADERS][0]) - cfgfile_write (f, _T("gfx_filter_post"), _T("D3D:%s"), p->gfx_filtershader[i + MAX_FILTERSHADERS]); - if (p->gfx_filtermask[i + MAX_FILTERSHADERS][0]) - cfgfile_write_str (f, _T("gfx_filtermask_post"), p->gfx_filtermask[i + MAX_FILTERSHADERS]); - } - cfgfile_dwrite_str (f, _T("gfx_filter_mask"), p->gfx_filtermask[2 * MAX_FILTERSHADERS]); - { - bool d3dfound = false; - if (p->gfx_filtershader[2 * MAX_FILTERSHADERS][0] && p->gfx_api) { - cfgfile_dwrite (f, _T("gfx_filter"), _T("D3D:%s"), p->gfx_filtershader[2 * MAX_FILTERSHADERS]); - d3dfound = true; + for (int j = 0; j < 2; j++) { + struct gfx_filterdata *gf = &p->gf[j]; + const TCHAR *ext = j == 0 ? NULL : _T("_rtg"); + for (int i = 0; i gfx_filtershader[i][0]) + cfgfile_write (f, _T("gfx_filter_pre"), ext, _T("D3D:%s"), gf->gfx_filtershader[i]); + if (gf->gfx_filtermask[i][0]) + cfgfile_write_str (f, _T("gfx_filtermask_pre"), ext, gf->gfx_filtermask[i]); } - if (!d3dfound) { - if (p->gfx_filter > 0) { - int i = 0; - struct uae_filter *uf; - while (uaefilters[i].name) { - uf = &uaefilters[i]; - if (uf->type == p->gfx_filter) { - cfgfile_dwrite_str (f, _T("gfx_filter"), uf->cfgname); + for (int i = 0; i gfx_filtershader[i + MAX_FILTERSHADERS][0]) + cfgfile_write (f, _T("gfx_filter_post"), ext, _T("D3D:%s"), gf->gfx_filtershader[i + MAX_FILTERSHADERS]); + if (gf->gfx_filtermask[i + MAX_FILTERSHADERS][0]) + cfgfile_write_str (f, _T("gfx_filtermask_post"), ext, gf->gfx_filtermask[i + MAX_FILTERSHADERS]); + } + cfgfile_dwrite_str (f, _T("gfx_filter_mask"), ext, gf->gfx_filtermask[2 * MAX_FILTERSHADERS]); + { + bool d3dfound = false; + if (gf->gfx_filtershader[2 * MAX_FILTERSHADERS][0] && p->gfx_api) { + cfgfile_dwrite (f, _T("gfx_filter"), ext, _T("D3D:%s"), gf->gfx_filtershader[2 * MAX_FILTERSHADERS]); + d3dfound = true; + } + if (!d3dfound) { + if (gf->gfx_filter > 0) { + int i = 0; + struct uae_filter *uf; + while (uaefilters[i].name) { + uf = &uaefilters[i]; + if (uf->type == gf->gfx_filter) { + cfgfile_dwrite_str (f, _T("gfx_filter"), ext, uf->cfgname); + } + i++; } - i++; + } else { + cfgfile_dwrite (f, _T("gfx_filter"), ext, _T("no")); } - } else { - cfgfile_dwrite (f, _T("gfx_filter"), _T("no")); } } + cfgfile_dwrite_str (f, _T("gfx_filter_mode"), ext, filtermode2[gf->gfx_filter_filtermode]); + cfgfile_dwrite (f, _T("gfx_filter_vert_zoomf"), ext, _T("%f"), gf->gfx_filter_vert_zoom); + cfgfile_dwrite (f, _T("gfx_filter_horiz_zoomf"), ext, _T("%f"), gf->gfx_filter_horiz_zoom); + cfgfile_dwrite (f, _T("gfx_filter_vert_zoom_multf"), ext, _T("%f"), gf->gfx_filter_vert_zoom_mult); + cfgfile_dwrite (f, _T("gfx_filter_horiz_zoom_multf"), ext, _T("%f"), gf->gfx_filter_horiz_zoom_mult); + cfgfile_dwrite (f, _T("gfx_filter_vert_offsetf"), ext, _T("%f"), gf->gfx_filter_vert_offset); + cfgfile_dwrite (f, _T("gfx_filter_horiz_offsetf"), ext, _T("%f"), gf->gfx_filter_horiz_offset); + cfgfile_dwrite (f, _T("gfx_filter_scanlines"), ext, _T("%d"), gf->gfx_filter_scanlines); + cfgfile_dwrite (f, _T("gfx_filter_scanlinelevel"), ext, _T("%d"), gf->gfx_filter_scanlinelevel); + cfgfile_dwrite (f, _T("gfx_filter_scanlineratio"), ext, _T("%d"), gf->gfx_filter_scanlineratio); + cfgfile_dwrite (f, _T("gfx_filter_luminance"), ext, _T("%d"), gf->gfx_filter_luminance); + cfgfile_dwrite (f, _T("gfx_filter_contrast"), ext, _T("%d"), gf->gfx_filter_contrast); + cfgfile_dwrite (f, _T("gfx_filter_saturation"), ext, _T("%d"), gf->gfx_filter_saturation); + cfgfile_dwrite (f, _T("gfx_filter_gamma"), ext, _T("%d"), gf->gfx_filter_gamma); + cfgfile_dwrite (f, _T("gfx_filter_blur"), ext, _T("%d"), gf->gfx_filter_blur); + cfgfile_dwrite (f, _T("gfx_filter_noise"), ext, _T("%d"), gf->gfx_filter_noise); + cfgfile_dwrite_bool (f, _T("gfx_filter_bilinear"), ext, gf->gfx_filter_bilinear != 0); + cfgfile_dwrite (f, _T("gfx_filter_keep_autoscale_aspect"), ext, _T("%d"), gf->gfx_filter_keep_autoscale_aspect); + cfgfile_dwrite_str (f, _T("gfx_filter_keep_aspect"), ext, aspects[gf->gfx_filter_keep_aspect]); + cfgfile_dwrite_str (f, _T("gfx_filter_autoscale"), ext, autoscale[gf->gfx_filter_autoscale]); + cfgfile_dwrite (f, _T("gfx_filter_aspect_ratio"), ext, _T("%d:%d"), + gf->gfx_filter_aspect >= 0 ? (gf->gfx_filter_aspect / ASPECTMULT) : -1, + gf->gfx_filter_aspect >= 0 ? (gf->gfx_filter_aspect & (ASPECTMULT - 1)) : -1); + if (gf->gfx_filteroverlay[0]) { + cfgfile_dwrite (f, _T("gfx_filter_overlay"), ext, _T("%s%s"), + gf->gfx_filteroverlay, _tcschr (gf->gfx_filteroverlay, ',') ? _T(",") : _T("")); + } } - cfgfile_dwrite_str (f, _T("gfx_filter_mode"), filtermode2[p->gfx_filter_filtermode]); - cfgfile_dwrite (f, _T("gfx_filter_vert_zoomf"), _T("%f"), p->gfx_filter_vert_zoom); - cfgfile_dwrite (f, _T("gfx_filter_horiz_zoomf"), _T("%f"), p->gfx_filter_horiz_zoom); - cfgfile_dwrite (f, _T("gfx_filter_vert_zoom_multf"), _T("%f"), p->gfx_filter_vert_zoom_mult); - cfgfile_dwrite (f, _T("gfx_filter_horiz_zoom_multf"), _T("%f"), p->gfx_filter_horiz_zoom_mult); - cfgfile_dwrite (f, _T("gfx_filter_vert_offsetf"), _T("%f"), p->gfx_filter_vert_offset); - cfgfile_dwrite (f, _T("gfx_filter_horiz_offsetf"), _T("%f"), p->gfx_filter_horiz_offset); - cfgfile_dwrite (f, _T("gfx_filter_scanlines"), _T("%d"), p->gfx_filter_scanlines); - cfgfile_dwrite (f, _T("gfx_filter_scanlinelevel"), _T("%d"), p->gfx_filter_scanlinelevel); - cfgfile_dwrite (f, _T("gfx_filter_scanlineratio"), _T("%d"), p->gfx_filter_scanlineratio); - cfgfile_dwrite (f, _T("gfx_filter_luminance"), _T("%d"), p->gfx_filter_luminance); - cfgfile_dwrite (f, _T("gfx_filter_contrast"), _T("%d"), p->gfx_filter_contrast); - cfgfile_dwrite (f, _T("gfx_filter_saturation"), _T("%d"), p->gfx_filter_saturation); - cfgfile_dwrite (f, _T("gfx_filter_gamma"), _T("%d"), p->gfx_filter_gamma); - cfgfile_dwrite (f, _T("gfx_filter_blur"), _T("%d"), p->gfx_filter_blur); - cfgfile_dwrite (f, _T("gfx_filter_noise"), _T("%d"), p->gfx_filter_noise); - cfgfile_dwrite_bool (f, _T("gfx_filter_bilinear"), p->gfx_filter_bilinear != 0); - cfgfile_dwrite (f, _T("gfx_filter_keep_autoscale_aspect"), _T("%d"), p->gfx_filter_keep_autoscale_aspect); - cfgfile_dwrite_str (f, _T("gfx_filter_keep_aspect"), aspects[p->gfx_filter_keep_aspect]); - cfgfile_dwrite_str (f, _T("gfx_filter_autoscale"), autoscale[p->gfx_filter_autoscale]); - cfgfile_dwrite (f, _T("gfx_filter_aspect_ratio"), _T("%d:%d"), - p->gfx_filter_aspect >= 0 ? (p->gfx_filter_aspect / ASPECTMULT) : -1, - p->gfx_filter_aspect >= 0 ? (p->gfx_filter_aspect & (ASPECTMULT - 1)) : -1); cfgfile_dwrite (f, _T("gfx_luminance"), _T("%d"), p->gfx_luminance); cfgfile_dwrite (f, _T("gfx_contrast"), _T("%d"), p->gfx_contrast); cfgfile_dwrite (f, _T("gfx_gamma"), _T("%d"), p->gfx_gamma); - if (p->gfx_filteroverlay[0]) { - cfgfile_dwrite (f, _T("gfx_filter_overlay"), _T("%s%s"), - p->gfx_filteroverlay, _tcschr (p->gfx_filteroverlay, ',') ? _T(",") : _T("")); - -#if 0 - cfgfile_dwrite (f, _T("gfx_filter_overlay"), _T("%s,%d%s:%d%s:%d%s:%d%s:%d%%"), - p->gfx_filteroverlay, - p->gfx_filteroverlay_pos.x >= -24000 ? p->gfx_filteroverlay_pos.x : -p->gfx_filteroverlay_pos.x - 30000, - p->gfx_filteroverlay_pos.x >= -24000 ? _T("") : _T("%"), - p->gfx_filteroverlay_pos.y >= -24000 ? p->gfx_filteroverlay_pos.y : -p->gfx_filteroverlay_pos.y - 30000, - p->gfx_filteroverlay_pos.y >= -24000 ? _T("") : _T("%"), - p->gfx_filteroverlay_pos.width >= -24000 ? p->gfx_filteroverlay_pos.width : -p->gfx_filteroverlay_pos.width - 30000, - p->gfx_filteroverlay_pos.width >= -24000 ? _T("") : _T("%"), - p->gfx_filteroverlay_pos.height >= -24000 ? p->gfx_filteroverlay_pos.height : -p->gfx_filteroverlay_pos.height - 30000, - p->gfx_filteroverlay_pos.height >= -24000 ? _T("") : _T("%"), - p->gfx_filteroverlay_overscan - ); -#endif - } cfgfile_dwrite (f, _T("gfx_center_horizontal_position"), _T("%d"), p->gfx_xcenter_pos); cfgfile_dwrite (f, _T("gfx_center_vertical_position"), _T("%d"), p->gfx_ycenter_pos); @@ -1491,22 +1538,47 @@ int cfgfile_doubleval (const TCHAR *option, const TCHAR *value, const TCHAR *nam return 1; } -int cfgfile_floatval (const TCHAR *option, const TCHAR *value, const TCHAR *name, float *location) +int cfgfile_floatval (const TCHAR *option, const TCHAR *value, const TCHAR *name, const TCHAR *nameext, float *location) { int base = 10; TCHAR *endptr; - if (name != NULL && _tcscmp (option, name) != 0) + if (name == NULL) return 0; + if (nameext) { + TCHAR tmp[MAX_DPATH]; + _tcscpy (tmp, name); + _tcscat (tmp, nameext); + if (_tcscmp (tmp, option) != 0) + return 0; + } else { + if (_tcscmp (option, name) != 0) + return 0; + } *location = (float)_tcstod (value, &endptr); return 1; } +int cfgfile_floatval (const TCHAR *option, const TCHAR *value, const TCHAR *name, float *location) +{ + return cfgfile_floatval (option, NULL, value, name, location); +} -int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, unsigned int *location, int scale) +int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, const TCHAR *nameext, unsigned int *location, int scale) { int base = 10; TCHAR *endptr; - if (name != NULL && _tcscmp (option, name) != 0) + TCHAR tmp[MAX_DPATH]; + + if (name == NULL) return 0; + if (nameext) { + _tcscpy (tmp, name); + _tcscat (tmp, nameext); + if (_tcscmp (tmp, option) != 0) + return 0; + } else { + if (_tcscmp (option, name) != 0) + return 0; + } /* I guess octal isn't popular enough to worry about here... */ if (value[0] == '0' && _totupper (value[1]) == 'X') value += 2, base = 16; @@ -1521,27 +1593,49 @@ int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, *location = 1; return 1; } - write_log (_T("Option '%s' requires a numeric argument but got '%s'\n"), option, value); + write_log (_T("Option '%s' requires a numeric argument but got '%s'\n"), nameext ? tmp : option, value); return -1; } return 1; } - +int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, unsigned int *location, int scale) +{ + return cfgfile_intval (option, value, name, NULL, location, scale); +} int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, int scale) { unsigned int v = 0; - int r = cfgfile_intval (option, value, name, &v, scale); + int r = cfgfile_intval (option, value, name, NULL, &v, scale); + if (!r) + return 0; + *location = (int)v; + return r; +} +int cfgfile_intval (const TCHAR *option, const TCHAR *value, const TCHAR *name, const TCHAR *nameext, int *location, int scale) +{ + unsigned int v = 0; + int r = cfgfile_intval (option, value, name, nameext, &v, scale); if (!r) return 0; *location = (int)v; return r; } -int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, const TCHAR *table[], int more) +int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, const TCHAR *nameext, int *location, const TCHAR *table[], int more) { int val; - if (name != NULL && _tcscmp (option, name) != 0) + TCHAR tmp[MAX_DPATH]; + if (name == NULL) return 0; + if (nameext) { + _tcscpy (tmp, name); + _tcscat (tmp, nameext); + if (_tcscmp (tmp, option) != 0) + return 0; + } else { + if (_tcscmp (option, name) != 0) + return 0; + } val = match_string (table, value); if (val == -1) { if (more) @@ -1551,13 +1645,17 @@ int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, } else if (!strcasecmp (value, _T("no")) || !strcasecmp (value, _T("false"))) { val = 0; } else { - write_log (_T("Unknown value ('%s') for option '%s'.\n"), value, option); + write_log (_T("Unknown value ('%s') for option '%s'.\n"), value, nameext ? tmp : option); return -1; } } *location = val; return 1; } +int cfgfile_strval (const TCHAR *option, const TCHAR *value, const TCHAR *name, int *location, const TCHAR *table[], int more) +{ + return cfgfile_strval (option, value, name, NULL, location, table, more); +} int cfgfile_strboolval (const TCHAR *option, const TCHAR *value, const TCHAR *name, bool *location, const TCHAR *table[], int more) { @@ -1576,6 +1674,23 @@ int cfgfile_string (const TCHAR *option, const TCHAR *value, const TCHAR *name, location[maxsz - 1] = '\0'; return 1; } +int cfgfile_string (const TCHAR *option, const TCHAR *value, const TCHAR *name, const TCHAR *nameext, TCHAR *location, int maxsz) +{ + if (nameext) { + TCHAR tmp[MAX_DPATH]; + _tcscpy (tmp, name); + _tcscat (tmp, nameext); + if (_tcscmp (tmp, option) != 0) + return 0; + } else { + if (_tcscmp (option, name) != 0) + return 0; + } + _tcsncpy (location, value, maxsz - 1); + location[maxsz - 1] = '\0'; + return 1; +} + int cfgfile_path (const TCHAR *option, const TCHAR *value, const TCHAR *name, TCHAR *location, int maxsz, struct multipath *mp) { @@ -1895,36 +2010,17 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_intval (option, value, _T("gfx_center_horizontal_size"), &p->gfx_xcenter_size, 1) || cfgfile_intval (option, value, _T("gfx_center_vertical_size"), &p->gfx_ycenter_size, 1) -#ifdef GFXFILTER - || cfgfile_floatval (option, value, _T("gfx_filter_vert_zoomf"), &p->gfx_filter_vert_zoom) - || cfgfile_floatval (option, value, _T("gfx_filter_horiz_zoomf"), &p->gfx_filter_horiz_zoom) - || cfgfile_floatval (option, value, _T("gfx_filter_vert_zoom_multf"), &p->gfx_filter_vert_zoom_mult) - || cfgfile_floatval (option, value, _T("gfx_filter_horiz_zoom_multf"), &p->gfx_filter_horiz_zoom_mult) - || cfgfile_floatval (option, value, _T("gfx_filter_vert_offsetf"), &p->gfx_filter_vert_offset) - || cfgfile_floatval (option, value, _T("gfx_filter_horiz_offsetf"), &p->gfx_filter_horiz_offset) - || cfgfile_intval (option, value, _T("gfx_filter_scanlines"), &p->gfx_filter_scanlines, 1) - || cfgfile_intval (option, value, _T("gfx_filter_scanlinelevel"), &p->gfx_filter_scanlinelevel, 1) - || cfgfile_intval (option, value, _T("gfx_filter_scanlineratio"), &p->gfx_filter_scanlineratio, 1) - || cfgfile_intval (option, value, _T("gfx_filter_luminance"), &p->gfx_filter_luminance, 1) - || cfgfile_intval (option, value, _T("gfx_filter_contrast"), &p->gfx_filter_contrast, 1) - || cfgfile_intval (option, value, _T("gfx_filter_saturation"), &p->gfx_filter_saturation, 1) - || cfgfile_intval (option, value, _T("gfx_filter_gamma"), &p->gfx_filter_gamma, 1) - || cfgfile_intval (option, value, _T("gfx_filter_blur"), &p->gfx_filter_blur, 1) - || cfgfile_intval (option, value, _T("gfx_filter_noise"), &p->gfx_filter_noise, 1) - || cfgfile_intval (option, value, _T("gfx_filter_bilinear"), &p->gfx_filter_bilinear, 1) - || cfgfile_intval (option, value, _T("gfx_luminance"), &p->gfx_luminance, 1) - || cfgfile_intval (option, value, _T("gfx_contrast"), &p->gfx_contrast, 1) - || cfgfile_intval (option, value, _T("gfx_gamma"), &p->gfx_gamma, 1) - || cfgfile_intval (option, value, _T("gfx_filter_keep_autoscale_aspect"), &p->gfx_filter_keep_autoscale_aspect, 1) - || cfgfile_intval (option, value, _T("gfx_horizontal_tweak"), &p->gfx_extrawidth, 1) - || cfgfile_string (option, value, _T("gfx_filter_mask"), p->gfx_filtermask[2 * MAX_FILTERSHADERS], sizeof p->gfx_filtermask[2 * MAX_FILTERSHADERS] / sizeof (TCHAR)) || cfgfile_intval (option, value, _T("filesys_max_size"), &p->filesys_limit, 1) || cfgfile_intval (option, value, _T("filesys_max_name_length"), &p->filesys_max_name, 1) || cfgfile_intval (option, value, _T("filesys_max_file_size"), &p->filesys_max_file_size, 1) + || cfgfile_intval (option, value, _T("gfx_luminance"), &p->gfx_luminance, 1) + || cfgfile_intval (option, value, _T("gfx_contrast"), &p->gfx_contrast, 1) + || cfgfile_intval (option, value, _T("gfx_gamma"), &p->gfx_gamma, 1) || cfgfile_floatval (option, value, _T("rtg_vert_zoom_multf"), &p->rtg_vert_zoom_mult) || cfgfile_floatval (option, value, _T("rtg_horiz_zoom_multf"), &p->rtg_horiz_zoom_mult) -#endif + || cfgfile_intval (option, value, _T("gfx_horizontal_tweak"), &p->gfx_extrawidth, 1) + || cfgfile_intval (option, value, _T("floppy0sound"), &p->floppyslots[0].dfxclick, 1) || cfgfile_intval (option, value, _T("floppy1sound"), &p->floppyslots[1].dfxclick, 1) || cfgfile_intval (option, value, _T("floppy2sound"), &p->floppyslots[2].dfxclick, 1) @@ -1962,6 +2058,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_yesno (option, value, _T("headless"), &p->headless) || cfgfile_yesno (option, value, _T("clipboard_sharing"), &p->clipboard_sharing) || cfgfile_yesno (option, value, _T("native_code"), &p->native_code) + || cfgfile_yesno (option, value, _T("tablet_library"), &p->tablet_library) || cfgfile_yesno (option, value, _T("bsdsocket_emu"), &p->socket_emu)) return 1; @@ -1988,13 +2085,40 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_strval (option, value, _T("gfx_color_mode"), &p->color_mode, colormode2, 0) || cfgfile_strval (option, value, _T("gfx_max_horizontal"), &p->gfx_max_horizontal, maxhoriz, 0) || cfgfile_strval (option, value, _T("gfx_max_vertical"), &p->gfx_max_vertical, maxvert, 0) - || cfgfile_strval (option, value, _T("gfx_filter_autoscale"), &p->gfx_filter_autoscale, autoscale, 0) || cfgfile_strval (option, value, _T("gfx_api"), &p->gfx_api, filterapi, 0) || cfgfile_strval (option, value, _T("magic_mousecursor"), &p->input_magic_mouse_cursor, magiccursors, 0) - || cfgfile_strval (option, value, _T("gfx_filter_keep_aspect"), &p->gfx_filter_keep_aspect, aspects, 0) || cfgfile_strval (option, value, _T("absolute_mouse"), &p->input_tablet, abspointers, 0)) return 1; +#ifdef GFXFILTER + for (int j = 0; j < 2; j++) { + struct gfx_filterdata *gf = &p->gf[j]; + const TCHAR *ext = j == 0 ? NULL : _T("_rtg"); + if (cfgfile_strval (option, value, _T("gfx_filter_autoscale"), ext, &gf->gfx_filter_autoscale, autoscale, 0) + || cfgfile_strval (option, value, _T("gfx_filter_keep_aspect"), ext, &gf->gfx_filter_keep_aspect, aspects, 0)) + return 1; + if (cfgfile_floatval (option, value, _T("gfx_filter_vert_zoomf"), ext, &gf->gfx_filter_vert_zoom) + || cfgfile_floatval (option, value, _T("gfx_filter_horiz_zoomf"), ext, &gf->gfx_filter_horiz_zoom) + || cfgfile_floatval (option, value, _T("gfx_filter_vert_zoom_multf"), ext, &gf->gfx_filter_vert_zoom_mult) + || cfgfile_floatval (option, value, _T("gfx_filter_horiz_zoom_multf"), ext, &gf->gfx_filter_horiz_zoom_mult) + || cfgfile_floatval (option, value, _T("gfx_filter_vert_offsetf"), ext, &gf->gfx_filter_vert_offset) + || cfgfile_floatval (option, value, _T("gfx_filter_horiz_offsetf"), ext, &gf->gfx_filter_horiz_offset) + || cfgfile_intval (option, value, _T("gfx_filter_scanlines"), ext, &gf->gfx_filter_scanlines, 1) + || cfgfile_intval (option, value, _T("gfx_filter_scanlinelevel"), ext, &gf->gfx_filter_scanlinelevel, 1) + || cfgfile_intval (option, value, _T("gfx_filter_scanlineratio"), ext, &gf->gfx_filter_scanlineratio, 1) + || cfgfile_intval (option, value, _T("gfx_filter_luminance"), ext, &gf->gfx_filter_luminance, 1) + || cfgfile_intval (option, value, _T("gfx_filter_contrast"), ext, &gf->gfx_filter_contrast, 1) + || cfgfile_intval (option, value, _T("gfx_filter_saturation"), ext, &gf->gfx_filter_saturation, 1) + || cfgfile_intval (option, value, _T("gfx_filter_gamma"), ext, &gf->gfx_filter_gamma, 1) + || cfgfile_intval (option, value, _T("gfx_filter_blur"), ext, &gf->gfx_filter_blur, 1) + || cfgfile_intval (option, value, _T("gfx_filter_noise"), ext, &gf->gfx_filter_noise, 1) + || cfgfile_intval (option, value, _T("gfx_filter_bilinear"), ext, &gf->gfx_filter_bilinear, 1) + || cfgfile_intval (option, value, _T("gfx_filter_keep_autoscale_aspect"), ext, &gf->gfx_filter_keep_autoscale_aspect, 1) + || cfgfile_string (option, value, _T("gfx_filter_mask"), ext, gf->gfx_filtermask[2 * MAX_FILTERSHADERS], sizeof gf->gfx_filtermask[2 * MAX_FILTERSHADERS] / sizeof (TCHAR))) + return 1; + } +#endif + if (_tcscmp (option, _T("gfx_width_windowed")) == 0) { if (!_tcscmp (value, _T("native"))) { p->gfx_size_win.width = 0; @@ -2075,13 +2199,13 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) if (_tcscmp (option, _T("gfx_linemode")) == 0) { int v; p->gfx_vresolution = VRES_DOUBLE; - p->gfx_scanlines = 0; + p->gfx_pscanlines = 0; + p->gfx_iscanlines = 0; if (cfgfile_strval (option, value, _T("gfx_linemode"), &v, linemode, 0)) { - if (v >= 4) { - p->gfx_scanlines = (v - 4) + 2; - } else { - p->gfx_scanlines = v & 1; - p->gfx_vresolution = v / 2; + if (v > 0) { + p->gfx_iscanlines = (v - 1) / 4; + p->gfx_pscanlines = (v - 1) % 4; + p->gfx_vresolution = 1; } } return 1; @@ -2165,159 +2289,135 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) } #ifdef GFXFILTER - if (_tcscmp (option, _T("gfx_filter_overlay")) == 0) { - TCHAR *s = _tcschr (value, ','); - p->gfx_filteroverlay_overscan = 0; - p->gfx_filteroverlay_pos.x = 0; - p->gfx_filteroverlay_pos.y = 0; - p->gfx_filteroverlay_pos.width = 0; - p->gfx_filteroverlay_pos.height = 0; - if (s) - *s = 0; - while (s) { - *s++ = 0; - p->gfx_filteroverlay_overscan = _tstol (s); - s = _tcschr (s, ':'); - if (!s) - break; -#if 0 - p->gfx_filteroverlay_pos.x = _tstol (s); - s = _tcschr (s, ','); - if (!s) - break; - if (s[-1] == '%') - p->gfx_filteroverlay_pos.x = -30000 - p->gfx_filteroverlay_pos.x; - *s++ = 0; - p->gfx_filteroverlay_pos.y = _tstol (s); - s = _tcschr (s, ','); - if (!s) - break; - if (s[-1] == '%') - p->gfx_filteroverlay_pos.y = -30000 - p->gfx_filteroverlay_pos.y; - *s++ = 0; - p->gfx_filteroverlay_pos.width = _tstol (s); - s = _tcschr (s, ','); - if (!s) - break; - if (s[-1] == '%') - p->gfx_filteroverlay_pos.width = -30000 - p->gfx_filteroverlay_pos.width; - *s++ = 0; - p->gfx_filteroverlay_pos.height = _tstol (s); - s = _tcschr (s, ','); - if (!s) + for (int j = 0; j < 2; j++) { + struct gfx_filterdata *gf = &p->gf[j]; + if ((j == 0 && _tcscmp (option, _T("gfx_filter_overlay")) == 0) || (j == 1 && _tcscmp (option, _T("gfx_filter_overlay_rtg")) == 0)) { + TCHAR *s = _tcschr (value, ','); + gf->gfx_filteroverlay_overscan = 0; + gf->gfx_filteroverlay_pos.x = 0; + gf->gfx_filteroverlay_pos.y = 0; + gf->gfx_filteroverlay_pos.width = 0; + gf->gfx_filteroverlay_pos.height = 0; + if (s) + *s = 0; + while (s) { + *s++ = 0; + gf->gfx_filteroverlay_overscan = _tstol (s); + s = _tcschr (s, ':'); + if (!s) + break; break; - if (s[-1] == '%') - p->gfx_filteroverlay_pos.height = -30000 - p->gfx_filteroverlay_pos.height; - *s++ = 0; - p->gfx_filteroverlay_overscan = _tstol (s); - TCHAR *s2 = _tcschr (s, ','); - if (s2) - *s2 = 0; -#endif - break; + } + _tcsncpy (gf->gfx_filteroverlay, value, sizeof gf->gfx_filteroverlay / sizeof (TCHAR) - 1); + gf->gfx_filteroverlay[sizeof gf->gfx_filteroverlay / sizeof (TCHAR) - 1] = 0; + return 1; } - _tcsncpy (p->gfx_filteroverlay, value, sizeof p->gfx_filteroverlay / sizeof (TCHAR) - 1); - p->gfx_filteroverlay[sizeof p->gfx_filteroverlay / sizeof (TCHAR) - 1] = 0; - return 1; - } - if (_tcscmp (option, _T("gfx_filtermask_pre")) == 0 || _tcscmp (option, _T("gfx_filtermask_post")) == 0) { - if (_tcscmp (option, _T("gfx_filtermask_pre")) == 0) { - for (int i = 0; i < MAX_FILTERSHADERS; i++) { - if (p->gfx_filtermask[i][0] == 0) { - _tcscpy (p->gfx_filtermask[i], value); - break; + if ((j == 0 && (_tcscmp (option, _T("gfx_filtermask_pre")) == 0 || _tcscmp (option, _T("gfx_filtermask_post")) == 0)) || + (j == 1 && (_tcscmp (option, _T("gfx_filtermask_pre_rtg")) == 0 || _tcscmp (option, _T("gfx_filtermask_post_rtg")) == 0))) { + if (_tcscmp (option, _T("gfx_filtermask_pre")) == 0 || _tcscmp (option, _T("gfx_filtermask_pre_rtg")) == 0) { + for (int i = 0; i < MAX_FILTERSHADERS; i++) { + if (gf->gfx_filtermask[i][0] == 0) { + _tcscpy (gf->gfx_filtermask[i], value); + break; + } } - } - } else { - for (int i = 0; i < MAX_FILTERSHADERS; i++) { - if (p->gfx_filtermask[i + MAX_FILTERSHADERS][0] == 0) { - _tcscpy (p->gfx_filtermask[i + MAX_FILTERSHADERS], value); - break; + } else { + for (int i = 0; i < MAX_FILTERSHADERS; i++) { + if (gf->gfx_filtermask[i + MAX_FILTERSHADERS][0] == 0) { + _tcscpy (gf->gfx_filtermask[i + MAX_FILTERSHADERS], value); + break; + } } } + return 1; } - return 1; - } - if (_tcscmp (option, _T("gfx_filter_pre")) == 0 || _tcscmp (option, _T("gfx_filter_post")) == 0) { - TCHAR *s = _tcschr (value, ':'); - if (s) { - *s++ = 0; - if (!_tcscmp (value, _T("D3D"))) { - p->gfx_api = 1; - if (_tcscmp (option, _T("gfx_filter_pre")) == 0) { - for (int i = 0; i < MAX_FILTERSHADERS; i++) { - if (p->gfx_filtershader[i][0] == 0) { - _tcscpy (p->gfx_filtershader[i], s); - break; + if ((j == 0 && (_tcscmp (option, _T("gfx_filter_pre")) == 0 || _tcscmp (option, _T("gfx_filter_post")) == 0)) || + (j == 1 && (_tcscmp (option, _T("gfx_filter_pre_rtg")) == 0 || _tcscmp (option, _T("gfx_filter_post_rtg")) == 0))) { + TCHAR *s = _tcschr (value, ':'); + if (s) { + *s++ = 0; + if (!_tcscmp (value, _T("D3D"))) { + p->gfx_api = 1; + if (_tcscmp (option, _T("gfx_filter_pre")) == 0) { + for (int i = 0; i < MAX_FILTERSHADERS; i++) { + if (gf->gfx_filtershader[i][0] == 0) { + _tcscpy (gf->gfx_filtershader[i], s); + break; + } } - } - } else { - for (int i = 0; i < MAX_FILTERSHADERS; i++) { - if (p->gfx_filtershader[i + MAX_FILTERSHADERS][0] == 0) { - _tcscpy (p->gfx_filtershader[i + MAX_FILTERSHADERS], s); - break; + } else { + for (int i = 0; i < MAX_FILTERSHADERS; i++) { + if (gf->gfx_filtershader[i + MAX_FILTERSHADERS][0] == 0) { + _tcscpy (gf->gfx_filtershader[i + MAX_FILTERSHADERS], s); + break; + } } } } } + return 1; } - return 1; - } - if (_tcscmp (option, _T("gfx_filter")) == 0) { - TCHAR *s = _tcschr (value, ':'); - p->gfx_filter = 0; - if (s) { - *s++ = 0; - if (!_tcscmp (value, _T("D3D"))) { - p->gfx_api = 1; - _tcscpy (p->gfx_filtershader[2 * MAX_FILTERSHADERS], s); - for (int i = 0; i < 2 * MAX_FILTERSHADERS; i++) { - if (!_tcsicmp (p->gfx_filtershader[i], s)) { - p->gfx_filtershader[i][0] = 0; - p->gfx_filtermask[i][0] = 0; + if ((j == 0 && _tcscmp (option, _T("gfx_filter")) == 0) || (j == 1 && _tcscmp (option, _T("gfx_filter_rtg")) == 0)) { + TCHAR *s = _tcschr (value, ':'); + gf->gfx_filter = 0; + if (s) { + *s++ = 0; + if (!_tcscmp (value, _T("D3D"))) { + p->gfx_api = 1; + _tcscpy (gf->gfx_filtershader[2 * MAX_FILTERSHADERS], s); + for (int i = 0; i < 2 * MAX_FILTERSHADERS; i++) { + if (!_tcsicmp (gf->gfx_filtershader[i], s)) { + gf->gfx_filtershader[i][0] = 0; + gf->gfx_filtermask[i][0] = 0; + } } } } - } - if (!_tcscmp (value, _T("direct3d"))) { - p->gfx_api = 1; // forwards compatibiity - } else { - int i = 0; - while(uaefilters[i].name) { - if (!_tcscmp (uaefilters[i].cfgname, value)) { - p->gfx_filter = uaefilters[i].type; - break; + if (!_tcscmp (value, _T("direct3d"))) { + p->gfx_api = 1; // forwards compatibiity + } else { + int i = 0; + while(uaefilters[i].name) { + if (!_tcscmp (uaefilters[i].cfgname, value)) { + gf->gfx_filter = uaefilters[i].type; + break; + } + i++; } - i++; } + return 1; + } + if (j == 0 && _tcscmp (option, _T("gfx_filter_mode")) == 0) { + cfgfile_strval (option, value, _T("gfx_filter_mode"), &gf->gfx_filter_filtermode, filtermode2, 0); + return 1; + } + if (j == 1 && _tcscmp (option, _T("gfx_filter_mode_rtg")) == 0) { + cfgfile_strval (option, value, _T("gfx_filter_mode_rtg"), &gf->gfx_filter_filtermode, filtermode2, 0); + return 1; } - return 1; - } - if (_tcscmp (option, _T("gfx_filter_mode")) == 0) { - cfgfile_strval (option, value, _T("gfx_filter_mode"), &p->gfx_filter_filtermode, filtermode2, 0); - return 1; - } - - if (cfgfile_string (option, value, _T("gfx_filter_aspect_ratio"), tmpbuf, sizeof tmpbuf / sizeof (TCHAR))) { - int v1, v2; - TCHAR *s; - p->gfx_filter_aspect = -1; - v1 = _tstol (tmpbuf); - s = _tcschr (tmpbuf, ':'); - if (s) { - v2 = _tstol (s + 1); - if (v1 < 0 || v2 < 0) - p->gfx_filter_aspect = -1; - else if (v1 == 0 || v2 == 0) - p->gfx_filter_aspect = 0; - else - p->gfx_filter_aspect = v1 * ASPECTMULT + v2; + if ((j == 0 && cfgfile_string (option, value, _T("gfx_filter_aspect_ratio"), tmpbuf, sizeof tmpbuf / sizeof (TCHAR))) || + (j == 1 && cfgfile_string (option, value, _T("gfx_filter_aspect_ratio_rtg"), tmpbuf, sizeof tmpbuf / sizeof (TCHAR)))) { + int v1, v2; + TCHAR *s; + + gf->gfx_filter_aspect = -1; + v1 = _tstol (tmpbuf); + s = _tcschr (tmpbuf, ':'); + if (s) { + v2 = _tstol (s + 1); + if (v1 < 0 || v2 < 0) + gf->gfx_filter_aspect = -1; + else if (v1 == 0 || v2 == 0) + gf->gfx_filter_aspect = 0; + else + gf->gfx_filter_aspect = v1 * ASPECTMULT + v2; + } + return 1; } - return 1; } #endif @@ -3400,7 +3500,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH || cfgfile_yesno (option, value, _T("comp_midopt"), &p->comp_midopt) || cfgfile_yesno (option, value, _T("comp_lowopt"), &p->comp_lowopt) || cfgfile_yesno (option, value, _T("rtg_nocustom"), &p->picasso96_nocustom) - || cfgfile_yesno (option, value, _T("floppy_write_protected"), &p->floppy_read_only) + || cfgfile_yesno (option, value, _T("floppy_write_protect"), &p->floppy_read_only) || cfgfile_yesno (option, value, _T("uae_hide_autoconfig"), &p->uae_hide_autoconfig) || cfgfile_yesno (option, value, _T("uaeserial"), &p->uaeserial)) return 1; @@ -4200,8 +4300,8 @@ static void parse_gfx_specs (struct uae_prefs *p, const TCHAR *spec) p->gfx_xcenter = _tcschr (x2, 'x') != 0 ? 1 : _tcschr (x2, 'X') != 0 ? 2 : 0; p->gfx_ycenter = _tcschr (x2, 'y') != 0 ? 1 : _tcschr (x2, 'Y') != 0 ? 2 : 0; p->gfx_vresolution = _tcschr (x2, 'd') != 0 ? VRES_DOUBLE : VRES_NONDOUBLE; - p->gfx_scanlines = _tcschr (x2, 'D') != 0; - if (p->gfx_scanlines) + p->gfx_pscanlines = _tcschr (x2, 'D') != 0; + if (p->gfx_pscanlines) p->gfx_vresolution = VRES_DOUBLE; p->gfx_apmode[0].gfx_fullscreen = _tcschr (x2, 'a') != 0; p->gfx_apmode[1].gfx_fullscreen = _tcschr (x2, 'p') != 0; @@ -4988,9 +5088,9 @@ void default_prefs (struct uae_prefs *p, int type) p->config_hardware_path[0] = 0; p->config_host_path[0] = 0; - p->gfx_scandoubler = 0; - p->start_gui = 1; - p->start_debugger = 0; + p->gfx_scandoubler = false; + p->start_gui = true; + p->start_debugger = false; p->all_lines = 0; /* Note to porters: please don't change any of these options! UAE is supposed @@ -5142,20 +5242,23 @@ void default_prefs (struct uae_prefs *p, int type) p->cs_resetwarning = 1; p->cs_ciatodbug = false; - p->gfx_filter = 0; - for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) { - p->gfx_filtershader[i][0] = 0; - p->gfx_filtermask[i][0] = 0; - } - p->gfx_filter_horiz_zoom_mult = 1.0; - p->gfx_filter_vert_zoom_mult = 1.0; - p->gfx_filter_bilinear = 0; - p->gfx_filter_filtermode = 0; - p->gfx_filter_scanlineratio = (1 << 4) | 1; - p->gfx_filter_keep_aspect = 0; - p->gfx_filter_autoscale = AUTOSCALE_STATIC_AUTO; - p->gfx_filter_keep_autoscale_aspect = false; - p->gfx_filteroverlay_overscan = 0; + for (int i = APMODE_NATIVE; i <= APMODE_RTG; i++) { + struct gfx_filterdata *f = &p->gf[i]; + f->gfx_filter = 0; + f->gfx_filter_scanlineratio = (1 << 4) | 1; + for (int j = 0; j <= 2 * MAX_FILTERSHADERS; j++) { + f->gfx_filtershader[i][0] = 0; + f->gfx_filtermask[i][0] = 0; + } + f->gfx_filter_horiz_zoom_mult = 1.0; + f->gfx_filter_vert_zoom_mult = 1.0; + f->gfx_filter_bilinear = 0; + f->gfx_filter_filtermode = 0; + f->gfx_filter_keep_aspect = 0; + f->gfx_filter_autoscale = AUTOSCALE_STATIC_AUTO; + f->gfx_filter_keep_autoscale_aspect = false; + f->gfx_filteroverlay_overscan = 0; + } p->rtg_horiz_zoom_mult = 1.0; p->rtg_vert_zoom_mult = 1.0; @@ -5245,6 +5348,7 @@ void default_prefs (struct uae_prefs *p, int type) #endif p->input_tablet = TABLET_OFF; + p->tablet_library = false; p->input_magic_mouse = 0; p->input_magic_mouse_cursor = 0; diff --git a/consolehook.cpp b/consolehook.cpp index bac111da..8fd32b5f 100644 --- a/consolehook.cpp +++ b/consolehook.cpp @@ -26,7 +26,8 @@ void consolehook_config (struct uae_prefs *p) p->produce_sound = 0; p->gfx_resolution = 0; p->gfx_vresolution = 0; - p->gfx_scanlines = 0; + p->gfx_iscanlines = 0; + p->gfx_pscanlines = 0; p->gfx_framerate = 10; p->immediate_blits = 1; p->collision_level = 0; diff --git a/custom.cpp b/custom.cpp index a55b665f..5a7ff3c4 100644 --- a/custom.cpp +++ b/custom.cpp @@ -3364,11 +3364,10 @@ static void finish_decisions (void) if (changed) { thisline_changed = 1; *dp = thisline_decision; -// if (vpos >= maxvpos) -// dp[1].plfleft = -2; - } else + } else { /* The only one that may differ: */ dp->ctable = thisline_decision.ctable; + } /* leave free space for possible extra color changes at the end of line */ next_color_change += (HBLANK_OFFSET + 1) / 2; @@ -3760,6 +3759,10 @@ void compute_framesync (void) gfxvidinfo.drawbuffer.outheight = gfxvidinfo.drawbuffer.height_allocated; memset (line_decisions, 0, sizeof line_decisions); + memset (line_drawinfo, 0, sizeof line_drawinfo); + for (int i = 0; i < sizeof (line_decisions) / sizeof *line_decisions; i++) { + line_decisions[i].plfleft = -1; + } compute_vsynctime (); @@ -3880,7 +3883,7 @@ void init_hz (bool fullinit) maxvpos_nom = maxvpos; maxvpos_display = maxvpos; equ_vblank_endline = -1; - doublescan = htotal <= 164 ? 1 : 0; + doublescan = htotal <= 164 && vtotal >= 350 ? 1 : 0; programmedmode = true; varsync_changed = true; vpos_count = maxvpos_nom; @@ -7600,20 +7603,28 @@ static void hsync_handler_post (bool onvsync) nextline_how = nln_normal; if (doflickerfix () && interlace_seen > 0) { lineno *= 2; - } else if ((doublescan <= 0 || interlace_seen > 0) && currprefs.gfx_vresolution && currprefs.gfx_scanlines >= 2) { + } else if (!interlace_seen && doublescan <= 0 && currprefs.gfx_vresolution && currprefs.gfx_pscanlines > 1) { + lineno *= 2; + if (timeframes & 1) { + lineno++; + nextline_how = currprefs.gfx_pscanlines == 3 ? nln_lower_black_always : nln_lower_black; + } else { + nextline_how = currprefs.gfx_pscanlines == 3 ? nln_upper_black_always : nln_upper_black; + } + } else if ((doublescan <= 0 || interlace_seen > 0) && currprefs.gfx_vresolution && currprefs.gfx_iscanlines) { lineno *= 2; - nextline_how = currprefs.gfx_vresolution > VRES_NONDOUBLE && (currprefs.gfx_scanlines & 1) == 0 ? nln_doubled : nln_nblack; if (interlace_seen) { if (!lof_current) { lineno++; - nextline_how = nln_lower_black; + nextline_how = currprefs.gfx_iscanlines == 2 ? nln_lower_black_always : nln_lower_black; } else { - nextline_how = nln_upper_black; + nextline_how = currprefs.gfx_iscanlines == 2 ? nln_upper_black_always : nln_upper_black; } + } else { + nextline_how = currprefs.gfx_vresolution > VRES_NONDOUBLE && currprefs.gfx_pscanlines == 1 ? nln_nblack : nln_doubled; } } else if (currprefs.gfx_vresolution && (doublescan <= 0 || interlace_seen > 0)) { lineno *= 2; - nextline_how = currprefs.gfx_vresolution > VRES_NONDOUBLE && currprefs.gfx_scanlines == 0 ? nln_doubled : nln_nblack; if (interlace_seen) { if (!lof_current) { lineno++; @@ -7621,6 +7632,8 @@ static void hsync_handler_post (bool onvsync) } else { nextline_how = nln_upper; } + } else { + nextline_how = currprefs.gfx_vresolution > VRES_NONDOUBLE && currprefs.gfx_pscanlines == 1 ? nln_nblack : nln_doubled; } } prev_lineno = next_lineno; @@ -9176,11 +9189,11 @@ void check_prefs_changed_custom (void) init_custom (); } #ifdef GFXFILTER - currprefs.gfx_filter_horiz_zoom = changed_prefs.gfx_filter_horiz_zoom; - currprefs.gfx_filter_vert_zoom = changed_prefs.gfx_filter_vert_zoom; - currprefs.gfx_filter_horiz_offset = changed_prefs.gfx_filter_horiz_offset; - currprefs.gfx_filter_vert_offset = changed_prefs.gfx_filter_vert_offset; - currprefs.gfx_filter_scanlines = changed_prefs.gfx_filter_scanlines; + currprefs.gf[0].gfx_filter_horiz_zoom = changed_prefs.gf[0].gfx_filter_horiz_zoom; + currprefs.gf[0].gfx_filter_vert_zoom = changed_prefs.gf[0].gfx_filter_vert_zoom; + currprefs.gf[0].gfx_filter_horiz_offset = changed_prefs.gf[0].gfx_filter_horiz_offset; + currprefs.gf[0].gfx_filter_vert_offset = changed_prefs.gf[0].gfx_filter_vert_offset; + currprefs.gf[0].gfx_filter_scanlines = changed_prefs.gf[0].gfx_filter_scanlines; #endif } diff --git a/disk.cpp b/disk.cpp index f3ef0660..12d9b105 100644 --- a/disk.cpp +++ b/disk.cpp @@ -43,6 +43,9 @@ int disk_debug_track = -1; #ifdef CAPS #include "caps/caps_win32.h" #endif +#ifdef SCP +#include "scp.h" +#endif #include "crc32.h" #include "inputrecord.h" #include "amax.h" @@ -148,7 +151,7 @@ typedef struct { #define DRIVE_ID_35HD 0xAAAAAAAA #define DRIVE_ID_525SD 0x55555555 /* 40 track 5.25 drive , kickstart does not recognize this */ -typedef enum { ADF_NONE = -1, ADF_NORMAL, ADF_EXT1, ADF_EXT2, ADF_FDI, ADF_IPF, ADF_CATWEASEL, ADF_PCDOS, ADF_KICK, ADF_SKICK } drive_filetype; +typedef enum { ADF_NONE = -1, ADF_NORMAL, ADF_EXT1, ADF_EXT2, ADF_FDI, ADF_IPF, ADF_SCP, ADF_CATWEASEL, ADF_PCDOS, ADF_KICK, ADF_SKICK } drive_filetype; typedef struct { struct zfile *diskfile; struct zfile *writediskfile; @@ -200,6 +203,8 @@ typedef struct { #else int catweasel; int amax; + int lastdataacesstrack; + int lastrev; #endif } drive; @@ -611,6 +616,11 @@ static void drive_image_free (drive *drv) case ADF_IPF: #ifdef CAPS caps_unloadimage (drv - floppy); +#endif + break; + case ADF_SCP: +#ifdef SCP + scp_close (drv - floppy); #endif break; case ADF_FDI: @@ -668,6 +678,7 @@ static void reset_drive (int num) drv->idbit = 0; drv->drive_id = 0; drv->drive_id_scnt = 0; + drv->lastdataacesstrack = -1; disabled &= ~(1 << num); if (currprefs.floppyslots[num].dfxtype < 0) disabled |= 1 << num; @@ -912,6 +923,10 @@ static bool diskfile_iswriteprotect (struct uae_prefs *p, const TCHAR *fname, in *needwritefile = 1; return wrprot2; } + if (strncmp ((uae_char*) buffer, "SCP", 3) == 0) { + *needwritefile = 1; + return wrprot2; + } if (strncmp ((uae_char*) buffer, "Formatted Disk Image file", 25) == 0) { *needwritefile = 1; return wrprot2; @@ -1020,6 +1035,17 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR drv->num_tracks = num_tracks; drv->filetype = ADF_IPF; #endif +#ifdef SCP + } else if (strncmp ((char*)buffer, "SCP", 3) == 0) { + drv->wrprot = true; + if (!scp_open (drv->diskfile, drv - floppy, &num_tracks)) { + zfile_fclose (drv->diskfile); + drv->diskfile = 0; + return 0; + } + drv->num_tracks = num_tracks; + drv->filetype = ADF_SCP; +#endif #ifdef FDI2RAW } else if (drv->fdi = fdi2raw_header (drv->diskfile)) { @@ -1704,6 +1730,8 @@ static void drive_fill_bigbuf (drive * drv, int force) { int tr = drv->cyl * 2 + side; trackid *ti = drv->trackdata + tr; + bool retrytrack; + int rev = -1; if ((!drv->diskfile && !drv->catweasel) || tr >= drv->num_tracks) { track_reset (drv); @@ -1723,6 +1751,9 @@ static void drive_fill_bigbuf (drive * drv, int force) drv->skipoffset = -1; drv->revolutions = 1; + retrytrack = drv->lastdataacesstrack == drv->cyl * 2 + side; + //write_log (_T("%d:%d %d\n"), drv->cyl, side, retrytrack); + if (drv->writediskfile && drv->writetrackdata[tr].bitlen > 0) { int i; trackid *wti = &drv->writetrackdata[tr]; @@ -1751,7 +1782,13 @@ static void drive_fill_bigbuf (drive * drv, int force) } else if (drv->filetype == ADF_IPF) { #ifdef CAPS - caps_loadtrack (drv->bigmfmbuf, drv->tracktiming, drv - floppy, tr, &drv->tracklen, &drv->multi_revolution, &drv->skipoffset); + caps_loadtrack (drv->bigmfmbuf, drv->tracktiming, drv - floppy, tr, &drv->tracklen, &drv->multi_revolution, &drv->skipoffset, &drv->lastrev, retrytrack); +#endif + + } else if (drv->filetype == ADF_SCP) { + +#ifdef SCP + scp_loadtrack (drv->bigmfmbuf, drv->tracktiming, drv - floppy, tr, &drv->tracklen, &drv->multi_revolution, &drv->skipoffset, &drv->lastrev, retrytrack); #endif } else if (drv->filetype == ADF_FDI) { @@ -2892,13 +2929,23 @@ static void disk_dmafinished (void) static void fetchnextrevolution (drive *drv) { drv->trackspeed = get_floppy_speed2 (drv); +#if 0 + if (1 || drv->mfmpos != 0) { + write_log (_T("REVOLUTION: %d %d/%d %d %d\n"), drv->trackspeed, drv->mfmpos, drv->tracklen, drv->floppybitcounter); + } +#endif if (!drv->multi_revolution) return; switch (drv->filetype) { case ADF_IPF: #ifdef CAPS - caps_loadrevolution (drv->bigmfmbuf, drv - floppy, drv->cyl * 2 + side, &drv->tracklen); + caps_loadrevolution (drv->bigmfmbuf, drv->tracktiming, drv - floppy, drv->cyl * 2 + side, &drv->tracklen, &drv->lastrev); +#endif + break; + case ADF_SCP: +#ifdef SCP + scp_loadrevolution (drv->bigmfmbuf, drv - floppy, drv->tracktiming, &drv->tracklen); #endif break; case ADF_FDI: @@ -2917,14 +2964,16 @@ void DISK_handler (uae_u32 data) event2_remevent (ev2_disk); DISK_update (disk_sync_cycle); - if (flag & (DISK_REVOLUTION << 0)) - fetchnextrevolution (&floppy[0]); - if (flag & (DISK_REVOLUTION << 1)) - fetchnextrevolution (&floppy[1]); - if (flag & (DISK_REVOLUTION << 2)) - fetchnextrevolution (&floppy[2]); - if (flag & (DISK_REVOLUTION << 3)) - fetchnextrevolution (&floppy[3]); + if (!dskdmaen) { + if (flag & (DISK_REVOLUTION << 0)) + fetchnextrevolution (&floppy[0]); + if (flag & (DISK_REVOLUTION << 1)) + fetchnextrevolution (&floppy[1]); + if (flag & (DISK_REVOLUTION << 2)) + fetchnextrevolution (&floppy[2]); + if (flag & (DISK_REVOLUTION << 3)) + fetchnextrevolution (&floppy[3]); + } if (flag & DISK_WORDSYNC) INTREQ (0x8000 | 0x1000); if (flag & DISK_INDEXSYNC) { @@ -3015,13 +3064,14 @@ static void updatetrackspeed (drive *drv, int mfmpos) { if (dskdmaen < DSKDMA_WRITE) { int t = drv->tracktiming[mfmpos / 8]; - drv->trackspeed = get_floppy_speed2 (drv) * t / 1000; - if (drv->trackspeed < 700 || drv->trackspeed > 3000) { + int ts = get_floppy_speed2 (drv) * t / 1000; + if (ts < 700 || ts > 3000) { static int warned; warned++; if (warned < 50) - write_log (_T("corrupted trackspeed value %d\n"), drv->trackspeed); - drv->trackspeed = 1000; + write_log (_T("corrupted trackspeed value %d %d (%d/%d)\n"), t, ts, mfmpos, drv->tracklen); + } else { + drv->trackspeed = ts; } } } @@ -3039,13 +3089,17 @@ static void disk_doupdate_predict (int startcycle) continue; if (selected & (1 << dr)) continue; + int mfmpos = drv->mfmpos; + if (drv->tracktiming[0]) + updatetrackspeed (drv, mfmpos); int diskevent_flag = 0; uae_u32 tword = word; - int countcycle = startcycle + (drv->floppybitcounter % drv->trackspeed); - int mfmpos = drv->mfmpos; + //int diff = drv->floppybitcounter % drv->trackspeed; + int countcycle = startcycle; // + (diff ? drv->trackspeed - diff : 0); while (countcycle < (maxhpos << 8)) { if (drv->tracktiming[0]) updatetrackspeed (drv, mfmpos); + countcycle += drv->trackspeed; if (dskdmaen != DSKDMA_WRITE || (dskdmaen == DSKDMA_WRITE && !dma_enable)) { tword <<= 1; if (!drive_empty (drv)) { @@ -3059,7 +3113,7 @@ static void disk_doupdate_predict (int startcycle) } mfmpos++; mfmpos %= drv->tracklen; - if (mfmpos == 0) + if (mfmpos == 0 && !dskdmaen) diskevent_flag |= DISK_REVOLUTION << (drv - floppy); if (mfmpos == drv->indexoffset) diskevent_flag |= DISK_INDEXSYNC; @@ -3077,7 +3131,6 @@ static void disk_doupdate_predict (int startcycle) } if (diskevent_flag) break; - countcycle += drv->trackspeed; } if (drv->tracktiming[0]) updatetrackspeed (drv, drv->mfmpos); @@ -3170,7 +3223,6 @@ static void disk_doupdate_read (drive * drv, int floppybits) mfmbuf[7] = 0x4444; */ while (floppybits >= drv->trackspeed) { - int oldmfmpos = drv->mfmpos; if (drv->tracktiming[0]) updatetrackspeed (drv, drv->mfmpos); word <<= 1; @@ -3181,6 +3233,10 @@ static void disk_doupdate_read (drive * drv, int floppybits) word |= getonebit (drv->bigmfmbuf, drv->mfmpos); } //write_log (_T("%08X bo=%d so=%d mfmpos=%d dma=%d\n"), (word & 0xffffff), bitoffset, syncoffset, drv->mfmpos, dma_enable); + if (doreaddma () < 0) { + word >>= 1; + return; + } drv->mfmpos++; drv->mfmpos %= drv->tracklen; if (drv->mfmpos == drv->indexoffset) { @@ -3193,9 +3249,10 @@ static void disk_doupdate_read (drive * drv, int floppybits) drv->mfmpos += disk_jitter; drv->mfmpos %= drv->tracklen; } - if (doreaddma () < 0) { - drv->mfmpos = oldmfmpos; - return; + if (drv->mfmpos == 0) { + fetchnextrevolution (drv); + if (drv->tracktiming[0]) + updatetrackspeed (drv, drv->mfmpos); } if ((bitoffset & 7) == 7) { dskbytr_val = word & 0xff; @@ -3242,13 +3299,13 @@ uae_u16 DSKBYTR (int hpos) v |= 0x2000; if (disk_debug_logging > 1) write_log (_T("DSKBYTR=%04X hpos=%d\n"), v, hpos); - if (disk_debug_mode & DISK_DEBUG_PIO) { - int dr; - for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) { - drive *drv = &floppy[dr]; - if (drv->motoroff) - continue; - if (!(selected & (1 << dr))) { + for (int dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) { + drive *drv = &floppy[dr]; + if (drv->motoroff) + continue; + if (!(selected & (1 << dr))) { + drv->lastdataacesstrack = drv->cyl * 2 + side; + if (disk_debug_mode & DISK_DEBUG_PIO) { if (disk_debug_track < 0 || disk_debug_track == 2 * drv->cyl + side) { disk_dma_debugmsg (); write_log (_T("DSKBYTR=%04X\n"), v); @@ -3274,6 +3331,10 @@ static void DISK_start (void) int tr = drv->cyl * 2 + side; trackid *ti = drv->trackdata + tr; + if (dskdmaen == DSKDMA_READ) { + drv->lastdataacesstrack = drv->cyl * 2 + side; + } + if (dskdmaen == DSKDMA_WRITE) { drv->tracklen = longwritemode ? FLOPPY_WRITE_MAXLEN : FLOPPY_WRITE_LEN * drv->ddhd * 8 * 2; drv->trackspeed = get_floppy_speed (); @@ -3993,6 +4054,7 @@ uae_u8 *restore_disk2 (int num,uae_u8 *src) if (m & 2) drv->tracktiming[j] = restore_u16 (); } + drv->revolutions = restore_u16 (); } return src; } @@ -4052,6 +4114,7 @@ uae_u8 *save_disk2 (int num, int *len, uae_u8 *dstptr) if (drv->tracktiming[0]) save_u16 (drv->tracktiming[j]); } + save_u16 (drv->revolutions); *len = dst - dstbak; return dstbak; diff --git a/drawing.cpp b/drawing.cpp index 3a6663ec..d02a34a7 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -85,7 +85,7 @@ static int linedbl, linedbld; int interlace_seen = 0; #define AUTO_LORES_FRAMES 10 static int can_use_lores = 0, frame_res, frame_res_lace; -static int resolution_count[RES_MAX + 1]; +static int resolution_count[RES_MAX + 1], lines_count; static bool center_reset; /* Lookup tables for dual playfields. The dblpf_*1 versions are for the case @@ -827,7 +827,7 @@ static void pfield_init_linetoscr (bool border) // Sprite hpos don't include DIW_DDF_OFFSET and can appear 1 lores pixel // before first bitplane pixel appears. // This means "bordersprite" condition is possible under OCS/ECS too. Argh! - if (dip_for_drawing->nr_sprites) { + if (dip_for_drawing->nr_sprites && !colors_for_drawing.borderblank) { /* bordersprite off or not supported: sprites are visible until diw_end */ if (playfield_end < linetoscr_diw_end && hblank_right_stop > playfield_end) { playfield_end = linetoscr_diw_end; @@ -841,7 +841,7 @@ static void pfield_init_linetoscr (bool border) } #ifdef AGA - if (dp_for_drawing->bordersprite_seen && dip_for_drawing->nr_sprites) { + if (dp_for_drawing->bordersprite_seen && !colors_for_drawing.borderblank && dip_for_drawing->nr_sprites) { int min = visible_right_border, max = visible_left_border, i; for (i = 0; i < dip_for_drawing->nr_sprites; i++) { int x; @@ -874,7 +874,7 @@ static void pfield_init_linetoscr (bool border) int first_x = sprite_first_x; int last_x = sprite_last_x; if (first_x < last_x) { - if (dp_for_drawing->bordersprite_seen) { + if (dp_for_drawing->bordersprite_seen && !colors_for_drawing.borderblank) { if (first_x > visible_left_border) first_x = visible_left_border; if (last_x < visible_right_border) @@ -1579,6 +1579,11 @@ static void pfield_do_linetoscr (int start, int stop, bool blank) // left or right AGA border sprite static void pfield_do_linetoscr_bordersprite_aga (int start, int stop, bool blank) { + if (blank) { + pfield_do_fill_line (start, stop, blank); + return; + } + if (res_shift == 0) { switch (gfxvidinfo.drawbuffer.pixbytes) { case 2: src_pixel = linetoscr_16_aga_spronly (LTPARMS); break; @@ -2354,7 +2359,10 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in dp_for_drawing = line_decisions + lineno; dip_for_drawing = curr_drawinfo + lineno; - resolution_count[dp_for_drawing->bplres]++; + if (dp_for_drawing->plfleft >= 0) { + lines_count++; + resolution_count[dp_for_drawing->bplres]++; + } switch (linestate[lineno]) { @@ -2398,8 +2406,10 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in break; } +#if 0 if (border && dp_for_drawing->plfleft < -1) - border = -1; // interlace mode missing odd line = blank + border = -1; // blank last "missing" line +#endif dh = dh_line; xlinebuffer = gfxvidinfo.drawbuffer.linemem; @@ -2440,7 +2450,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in if (dip_for_drawing->nr_sprites) { int i; #ifdef AGA - if (colors_for_drawing.bordersprite && dp_for_drawing->bordersprite_seen) + if (colors_for_drawing.bordersprite && dp_for_drawing->bordersprite_seen && !colors_for_drawing.borderblank) clear_bitplane_border_aga (); #endif @@ -2455,7 +2465,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in } #ifdef AGA - if (dip_for_drawing->nr_sprites && colors_for_drawing.bordersprite && dp_for_drawing->bordersprite_seen) + if (dip_for_drawing->nr_sprites && colors_for_drawing.bordersprite && !colors_for_drawing.borderblank && dp_for_drawing->bordersprite_seen) do_color_changes (pfield_do_linetoscr_bordersprite_aga, pfield_do_linetoscr, lineno); else #endif @@ -2475,7 +2485,6 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in if (dip_for_drawing->nr_sprites) pfield_erase_hborder_sprites (); - } else if (border > 0) { // border > 0: top or bottom border bool dosprites = false; @@ -2483,7 +2492,7 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in adjust_drawing_colors (dp_for_drawing->ctable, 0); #ifdef AGA /* this makes things complex.. */ - if (dp_for_drawing->bordersprite_seen && dip_for_drawing->nr_sprites) { + if (dp_for_drawing->bordersprite_seen && !colors_for_drawing.borderblank && dip_for_drawing->nr_sprites) { dosprites = true; pfield_expand_dp_bplcon (); pfield_init_linetoscr (true); @@ -2539,8 +2548,9 @@ static void pfield_draw_line (struct vidbuffer *vb, int lineno, int gfx_ypos, in } else { + // top or bottom blanking region int tmp = hposblank; - hposblank = colors_for_drawing.borderblank; + hposblank = 1; fill_line (); do_flush_line (vb, gfx_ypos); hposblank = tmp; @@ -2554,7 +2564,7 @@ static void center_image (void) int prev_y_adjust = thisframe_y_adjust; int w = gfxvidinfo.drawbuffer.inwidth; - if (currprefs.gfx_xcenter && !currprefs.gfx_filter_autoscale && max_diwstop > 0) { + if (currprefs.gfx_xcenter && !currprefs.gf[0].gfx_filter_autoscale && max_diwstop > 0) { if (max_diwstop - min_diwstart < w && currprefs.gfx_xcenter == 2) /* Try to center. */ @@ -2598,7 +2608,7 @@ static void center_image (void) visible_right_border = max_diwlastword; thisframe_y_adjust = minfirstline; - if (currprefs.gfx_ycenter && thisframe_first_drawn_line >= 0 && !currprefs.gfx_filter_autoscale) { + if (currprefs.gfx_ycenter && thisframe_first_drawn_line >= 0 && !currprefs.gf[0].gfx_filter_autoscale) { if (thisframe_last_drawn_line - thisframe_first_drawn_line < max_drawn_amiga_line && currprefs.gfx_ycenter == 2) thisframe_y_adjust = (thisframe_last_drawn_line - thisframe_first_drawn_line - max_drawn_amiga_line) / 2 + thisframe_first_drawn_line; @@ -2617,7 +2627,7 @@ static void center_image (void) /* Make sure the value makes sense */ if (thisframe_y_adjust + max_drawn_amiga_line > maxvpos + maxvpos / 2) - thisframe_y_adjust = maxvpos + maxvpos / 2 - max_drawn_amiga_line; + thisframe_y_adjust = maxvpos + maxvpos / 2 - max_drawn_amiga_line; if (thisframe_y_adjust < 0) thisframe_y_adjust = 0; @@ -2632,7 +2642,7 @@ static void center_image (void) gfxvidinfo.drawbuffer.xoffset = (DISPLAY_LEFT_SHIFT << RES_MAX) + (visible_left_border << (RES_MAX - currprefs.gfx_resolution)); gfxvidinfo.drawbuffer.yoffset = thisframe_y_adjust << VRES_MAX; - + center_reset = false; horizontal_changed = false; vertical_changed = false; @@ -2644,7 +2654,7 @@ static void init_drawing_frame (void) int i, maxline; static int frame_res_old; - if (currprefs.gfx_autoresolution) { + if (currprefs.gfx_autoresolution && lines_count > 0) { int frame_res_detected; int frame_res_lace_detected = frame_res_lace; @@ -2662,13 +2672,21 @@ static void init_drawing_frame (void) if (currprefs.gfx_autoresolution == 1) frame_res_detected = largest_res; - else if (largest_count * 100 / maxvpos >= currprefs.gfx_autoresolution) + else if (largest_count * 100 / lines_count >= currprefs.gfx_autoresolution) frame_res_detected = largest_count_res; else frame_res_detected = largest_count_res - 1; if (frame_res_detected < 0) frame_res_detected = 0; - +#if 0 + static int delay; + delay--; + if (delay < 0) { + delay = 50; + write_log (_T("%d %d, %d %d %d, %d %d, %d %d\n"), currprefs.gfx_autoresolution, lines_count, resolution_count[0], resolution_count[1], resolution_count[2], + largest_count, largest_count_res, frame_res_detected, frame_res_lace_detected); + } +#endif if (frame_res_detected >= 0 && frame_res_lace_detected >= 0) { if (frame_res_cnt > 0 && frame_res_old == frame_res_detected * 2 + frame_res_lace_detected) { frame_res_cnt--; @@ -2677,7 +2695,7 @@ static void init_drawing_frame (void) struct wh *dst = currprefs.gfx_apmode[0].gfx_fullscreen ? &changed_prefs.gfx_size_fs : &changed_prefs.gfx_size_win; while (m < 3 * 2) { struct wh *src = currprefs.gfx_apmode[0].gfx_fullscreen ? &currprefs.gfx_size_fs_xtra[m] : &currprefs.gfx_size_win_xtra[m]; - if ((src->width > 0 && src->height > 0) || (currprefs.gfx_api || currprefs.gfx_filter > 0)) { + if ((src->width > 0 && src->height > 0) || (currprefs.gfx_api || currprefs.gf[0].gfx_filter > 0)) { int nr = m >> 1; int nl = (m & 1) == 0 ? 0 : 1; int nr_o = nr; @@ -2732,6 +2750,7 @@ static void init_drawing_frame (void) } for (int i = 0; i <= RES_MAX; i++) resolution_count[i] = 0; + lines_count = 0; frame_res = -1; frame_res_lace = 0; @@ -2803,7 +2822,7 @@ void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8, int opaq) case 4: { int i; - if (1 || opaq || currprefs.gfx_filter == 0) { + if (1 || opaq || currprefs.gf[0].gfx_filter == 0) { uae_u32 *p = (uae_u32*)buf + x; *p = c8; } else { @@ -3144,7 +3163,7 @@ bool vsync_handle_check (void) void vsync_handle_redraw (int long_field, int lof_changed, uae_u16 bplcon0p, uae_u16 bplcon3p) { last_redraw_point++; - if (lof_changed || interlace_seen <= 0 || (currprefs.gfx_scanlines >= 2 && interlace_seen > 0) || last_redraw_point >= 2 || long_field || doublescan < 0) { + if (lof_changed || interlace_seen <= 0 || (currprefs.gfx_iscanlines && interlace_seen > 0) || last_redraw_point >= 2 || long_field || doublescan < 0) { last_redraw_point = 0; if (framecnt == 0) @@ -3228,25 +3247,23 @@ void hsync_record_line_state (int lineno, enum nln_how how, int changed) || state[1] == LINE_AS_PREVIOUS) state[1] = LINE_DECIDED; //LINE_BLACK; break; + case nln_lower_black_always: + state[1] = LINE_BLACK; + *state = LINE_DECIDED; + break; case nln_lower_black: - if (currprefs.gfx_scanlines >= 4) { - state[1] = LINE_BLACK; - *state = LINE_DECIDED; - } else { - changed += state[0] != LINE_DONE; - state[1] = LINE_DONE; - *state = changed ? LINE_DECIDED : LINE_DONE; - } + changed += state[0] != LINE_DONE; + state[1] = LINE_DONE; + *state = changed ? LINE_DECIDED : LINE_DONE; + break; + case nln_upper_black_always: + *state = LINE_DECIDED; + state[-1] = LINE_BLACK; break; case nln_upper_black: - if (currprefs.gfx_scanlines >= 4) { - *state = LINE_DECIDED; - state[-1] = LINE_BLACK; - } else { - changed += state[0] != LINE_DONE; - *state = changed ? LINE_DECIDED : LINE_DONE; - state[-1] = LINE_DONE; - } + changed += state[0] != LINE_DONE; + *state = changed ? LINE_DECIDED : LINE_DONE; + state[-1] = LINE_DONE; break; } } diff --git a/filesys.cpp b/filesys.cpp index 5d7e0749..f22298c4 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -57,6 +57,7 @@ #include "isofs_api.h" #include "scsi.h" #include "uaenative.h" +#include "tabletlibrary.h" #ifdef RETROPLATFORM #include "rp.h" #endif @@ -6316,6 +6317,9 @@ static uae_u32 REGPARAM2 filesys_diagentry (TrapContext *context) #ifdef UAESERIAL resaddr = uaeserialdev_startup (resaddr); #endif +#ifdef WITH_TABLETLIBRARY + resaddr = tabletlib_startup (resaddr); +#endif /* scan for Residents and return pointer to array of them */ residents = resaddr; diff --git a/gfxutil.cpp b/gfxutil.cpp index 204310fd..d4ad60b6 100644 --- a/gfxutil.cpp +++ b/gfxutil.cpp @@ -144,7 +144,7 @@ static void video_calc_gammatable (void) con = ((float)(currprefs.gfx_contrast + 1000)) / 1000.0f; gam = ((float)(1000 - currprefs.gfx_gamma)) / 1000.0f; - lf = 64 * currprefs.gfx_filter_blur / 1000; + lf = 64 * currprefs.gf[picasso_on].gfx_filter_blur / 1000; hf = 256 - lf * 2; for (i = 0; i < (256 * 3); i++) { @@ -163,7 +163,7 @@ static void video_calc_gammatable (void) static uae_u32 limit256 (double v) { - v = v * (double)(currprefs.gfx_filter_contrast + 1000) / 1000.0 + currprefs.gfx_filter_luminance / 10.0; + v = v * (double)(currprefs.gf[picasso_on].gfx_filter_contrast + 1000) / 1000.0 + currprefs.gf[picasso_on].gfx_filter_luminance / 10.0; if (v < 0) v = 0; if (v > 255) @@ -172,7 +172,7 @@ static uae_u32 limit256 (double v) } static uae_u32 limit256rb (double v) { - v *= (double)(currprefs.gfx_filter_saturation + 1000) / 1000.0; + v *= (double)(currprefs.gf[picasso_on].gfx_filter_saturation + 1000) / 1000.0; if (v < -128) v = -128; if (v > 127) diff --git a/include/drawing.h b/include/drawing.h index 7822fa3e..0666384a 100644 --- a/include/drawing.h +++ b/include/drawing.h @@ -266,7 +266,9 @@ enum nln_how { /* This line normal, next one black. */ nln_nblack, nln_upper_black, - nln_lower_black + nln_lower_black, + nln_upper_black_always, + nln_lower_black_always }; extern void hsync_record_line_state (int lineno, enum nln_how, int changed); diff --git a/include/options.h b/include/options.h index be4ca507..711075b3 100644 --- a/include/options.h +++ b/include/options.h @@ -245,6 +245,30 @@ struct apmode #define MAX_LUA_STATES 16 + +struct gfx_filterdata +{ + int gfx_filter; + TCHAR gfx_filtershader[2 * MAX_FILTERSHADERS + 1][MAX_DPATH]; + TCHAR gfx_filtermask[2 * MAX_FILTERSHADERS + 1][MAX_DPATH]; + TCHAR gfx_filteroverlay[MAX_DPATH]; + struct wh gfx_filteroverlay_pos; + int gfx_filteroverlay_overscan; + int gfx_filter_scanlines; + int gfx_filter_scanlineratio; + int gfx_filter_scanlinelevel; + float gfx_filter_horiz_zoom, gfx_filter_vert_zoom; + float gfx_filter_horiz_zoom_mult, gfx_filter_vert_zoom_mult; + float gfx_filter_horiz_offset, gfx_filter_vert_offset; + int gfx_filter_filtermode; + int gfx_filter_bilinear; + int gfx_filter_noise, gfx_filter_blur; + int gfx_filter_saturation, gfx_filter_luminance, gfx_filter_contrast, gfx_filter_gamma; + int gfx_filter_keep_aspect, gfx_filter_aspect; + int gfx_filter_autoscale; + int gfx_filter_keep_autoscale_aspect; +}; + struct uae_prefs { struct strlist *all_lines; @@ -328,7 +352,7 @@ struct uae_prefs { int gfx_resolution; int gfx_vresolution; int gfx_lores_mode; - int gfx_scanlines; + int gfx_pscanlines, gfx_iscanlines; int gfx_xcenter, gfx_ycenter; int gfx_xcenter_pos, gfx_ycenter_pos; int gfx_xcenter_size, gfx_ycenter_size; @@ -340,25 +364,7 @@ struct uae_prefs { int gfx_extrawidth; bool lightboost_strobo; - int gfx_filter; - TCHAR gfx_filtershader[2 * MAX_FILTERSHADERS + 1][MAX_DPATH]; - TCHAR gfx_filtermask[2 * MAX_FILTERSHADERS + 1][MAX_DPATH]; - TCHAR gfx_filteroverlay[MAX_DPATH]; - struct wh gfx_filteroverlay_pos; - int gfx_filteroverlay_overscan; - int gfx_filter_scanlines; - int gfx_filter_scanlineratio; - int gfx_filter_scanlinelevel; - float gfx_filter_horiz_zoom, gfx_filter_vert_zoom; - float gfx_filter_horiz_zoom_mult, gfx_filter_vert_zoom_mult; - float gfx_filter_horiz_offset, gfx_filter_vert_offset; - int gfx_filter_filtermode; - int gfx_filter_bilinear; - int gfx_filter_noise, gfx_filter_blur; - int gfx_filter_saturation, gfx_filter_luminance, gfx_filter_contrast, gfx_filter_gamma; - int gfx_filter_keep_aspect, gfx_filter_aspect; - int gfx_filter_autoscale; - int gfx_filter_keep_autoscale_aspect; + struct gfx_filterdata gf[2]; float rtg_horiz_zoom_mult; float rtg_vert_zoom_mult; @@ -590,6 +596,7 @@ struct uae_prefs { int input_autofire_linecnt; int input_mouse_speed; int input_tablet; + bool tablet_library; bool input_magic_mouse; int input_magic_mouse_cursor; int input_keyboard_type; diff --git a/inputdevice.cpp b/inputdevice.cpp index 27c05e52..90526668 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -54,6 +54,7 @@ #ifdef AVIOUTPUT #include "avioutput.h" #endif +#include "tabletlibrary.h" // 01 = host events // 02 = joystick @@ -1444,6 +1445,12 @@ static void inputdevice_mh_abs (int x, int y, uae_u32 buttonbits) p[MH_E] = 0xc0 | 1; p[MH_CNT]++; tablet_data = 1; + + if (inputdevice_is_tablet () <= 0) { + tabletlib_tablet_info (1000, 1000, 0, 0, 0, 0, 1000, 1000); + tabletlib_tablet (x, y, 0, 0, buttonbits, -1, 0, 0, 0); + } + } #if 0 diff --git a/main.cpp b/main.cpp index 3c7c70d1..a1ca44a3 100644 --- a/main.cpp +++ b/main.cpp @@ -57,6 +57,7 @@ #include "gfxboard.h" #include "luascript.h" #include "uaenative.h" +#include "tabletlibrary.h" #ifdef RETROPLATFORM #include "rp.h" #endif @@ -201,14 +202,13 @@ void fixup_prefs_dimensions (struct uae_prefs *prefs) if (ap->gfx_backbuffers >= 2) ap->gfx_vflip = -1; } - } - - if (prefs->gfx_filter == 0 && ((prefs->gfx_filter_autoscale && !prefs->gfx_api) || (prefs->gfx_apmode[0].gfx_vsyncmode))) { - prefs->gfx_filter = 1; - } - if (prefs->gfx_filter == 0 && prefs->monitoremu) { - error_log (_T("A2024 and Graffiti require at least null filter enabled.")); - prefs->gfx_filter = 1; + if (prefs->gf[i].gfx_filter == 0 && ((prefs->gf[i].gfx_filter_autoscale && !prefs->gfx_api) || (prefs->gfx_apmode[APMODE_NATIVE].gfx_vsyncmode))) { + prefs->gf[i].gfx_filter = 1; + } + if (i == 0 && prefs->gf[i].gfx_filter == 0 && prefs->monitoremu) { + error_log (_T("A2024 and Graffiti require at least null filter enabled.")); + prefs->gf[i].gfx_filter = 1; + } } } @@ -1009,6 +1009,9 @@ void virtualdevice_init (void) #ifdef WITH_UAENATIVE uaenative_install (); #endif +#ifdef WITH_TABLETLIBRARY + tabletlib_install (); +#endif } static int real_main2 (int argc, TCHAR **argv) diff --git a/od-win32/avioutput.h b/od-win32/avioutput.h index b4313ad5..e5deec37 100644 --- a/od-win32/avioutput.h +++ b/od-win32/avioutput.h @@ -21,10 +21,10 @@ extern TCHAR avioutput_filename_inuse[MAX_DPATH]; extern void AVIOutput_Toggle (int mode, bool immediate); extern void AVIOutput_WriteAudio (uae_u8 *sndbuffer, int sndbufsize); extern void AVIOutput_WriteVideo (void); -extern int AVIOutput_ChooseAudioCodec (HWND hwnd,TCHAR*,int); -extern int AVIOutput_GetAudioCodec (TCHAR*,int); -extern int AVIOutput_ChooseVideoCodec (HWND hwnd,TCHAR*,int); -extern int AVIOutput_GetVideoCodec (TCHAR*,int); +extern int AVIOutput_ChooseAudioCodec (HWND hwnd, TCHAR*, int); +extern int AVIOutput_GetAudioCodec (TCHAR*, int); +extern int AVIOutput_ChooseVideoCodec (HWND hwnd, TCHAR*, int); +extern int AVIOutput_GetVideoCodec (TCHAR*, int); extern void AVIOutput_Restart (void); extern void AVIOutput_End (void); extern void AVIOutput_Begin (void); diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index ae1a2e1c..0e03caf9 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -40,6 +40,7 @@ int tablet_log = 0; #include "dxwrap.h" #include "akiko.h" #include "clipboard.h" +#include "tabletlibrary.h" #include #include @@ -635,6 +636,8 @@ static void tablet_send (void) return; inputdevice_tablet (tablet_x, tablet_y, tablet_z, tablet_pressure, tablet_buttons, tablet_proximity, tablet_ax, tablet_ay, tablet_az); + tabletlib_tablet (tablet_x, tablet_y, tablet_z, tablet_pressure, tablet_buttons, tablet_proximity, + tablet_ax, tablet_ay, tablet_az); } void send_tablet_proximity (int inproxi) @@ -754,6 +757,7 @@ void *open_tablet (HWND hwnd) tablet_proximity = -1; tablet_x = -1; inputdevice_tablet_info (xmax, ymax, zmax, axmax, aymax, azmax, xres, yres); + tabletlib_tablet_info (xmax, ymax, zmax, axmax, aymax, azmax, xres, yres); initialized = 1; return WTOpen (hwnd, &lc, TRUE); #else diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index bed125e7..a6969ed9 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -43,6 +43,8 @@ int forcedframelatency = -1; static TCHAR *D3DHEAD = _T("-"); static int psEnabled, psActive, shaderon; +static struct gfx_filterdata *filterd3d; +static int filterd3didx; static bool showoverlay = true; @@ -1313,20 +1315,20 @@ static void createscanlines (int force) uae_u8 *sld, *p; int bpp; - if (osl1 == currprefs.gfx_filter_scanlines && osl3 == currprefs.gfx_filter_scanlinelevel && osl2 == currprefs.gfx_filter_scanlineratio && !force) + if (osl1 == filterd3d->gfx_filter_scanlines && osl3 == filterd3d->gfx_filter_scanlinelevel && osl2 == filterd3d->gfx_filter_scanlineratio && !force) return; bpp = t_depth < 32 ? 2 : 4; - osl1 = currprefs.gfx_filter_scanlines; - osl3 = currprefs.gfx_filter_scanlinelevel; - osl2 = currprefs.gfx_filter_scanlineratio; - sl4 = currprefs.gfx_filter_scanlines * 16 / 100; - sl42 = currprefs.gfx_filter_scanlinelevel * 16 / 100; + osl1 = filterd3d->gfx_filter_scanlines; + osl3 = filterd3d->gfx_filter_scanlinelevel; + osl2 = filterd3d->gfx_filter_scanlineratio; + sl4 = filterd3d->gfx_filter_scanlines * 16 / 100; + sl42 = filterd3d->gfx_filter_scanlinelevel * 16 / 100; if (sl4 > 15) sl4 = 15; if (sl42 > 15) sl42 = 15; - l1 = (currprefs.gfx_filter_scanlineratio >> 0) & 15; - l2 = (currprefs.gfx_filter_scanlineratio >> 4) & 15; + l1 = (filterd3d->gfx_filter_scanlineratio >> 0) & 15; + l2 = (filterd3d->gfx_filter_scanlineratio >> 4) & 15; if (l1 + l2 <= 0) return; @@ -2047,42 +2049,42 @@ static int restoredeviceobjects (void) break; } for (int i = 0; i < MAX_FILTERSHADERS; i++) { - if (currprefs.gfx_filtershader[i][0]) { + if (filterd3d->gfx_filtershader[i][0]) { struct shaderdata *s = allocshaderslot (SHADERTYPE_BEFORE); - if (!psEffect_LoadEffect (currprefs.gfx_filtershader[i], true, s, i)) { - currprefs.gfx_filtershader[i][0] = changed_prefs.gfx_filtershader[i][0] = 0; + if (!psEffect_LoadEffect (filterd3d->gfx_filtershader[i], true, s, i)) { + filterd3d->gfx_filtershader[i][0] = changed_prefs.gf[filterd3didx].gfx_filtershader[i][0] = 0; break; } } - if (currprefs.gfx_filtermask[i][0]) { + if (filterd3d->gfx_filtermask[i][0]) { struct shaderdata *s = allocshaderslot (SHADERTYPE_MASK_BEFORE); - createmasktexture (currprefs.gfx_filtermask[i], s); + createmasktexture (filterd3d->gfx_filtermask[i], s); } } - if (currprefs.gfx_filtershader[2 * MAX_FILTERSHADERS][0]) { + if (filterd3d->gfx_filtershader[2 * MAX_FILTERSHADERS][0]) { struct shaderdata *s = allocshaderslot (SHADERTYPE_MIDDLE); - if (!psEffect_LoadEffect (currprefs.gfx_filtershader[2 * MAX_FILTERSHADERS], true, s, 2 * MAX_FILTERSHADERS)) { - currprefs.gfx_filtershader[2 * MAX_FILTERSHADERS][0] = changed_prefs.gfx_filtershader[2 * MAX_FILTERSHADERS][0] = 0; + if (!psEffect_LoadEffect (filterd3d->gfx_filtershader[2 * MAX_FILTERSHADERS], true, s, 2 * MAX_FILTERSHADERS)) { + filterd3d->gfx_filtershader[2 * MAX_FILTERSHADERS][0] = changed_prefs.gf[filterd3didx].gfx_filtershader[2 * MAX_FILTERSHADERS][0] = 0; } } - if (currprefs.gfx_filtermask[2 * MAX_FILTERSHADERS][0]) { + if (filterd3d->gfx_filtermask[2 * MAX_FILTERSHADERS][0]) { struct shaderdata *s = allocshaderslot (SHADERTYPE_MASK_AFTER); - createmasktexture (currprefs.gfx_filtermask[2 * MAX_FILTERSHADERS], s); + createmasktexture (filterd3d->gfx_filtermask[2 * MAX_FILTERSHADERS], s); } for (int i = 0; i < MAX_FILTERSHADERS; i++) { - if (currprefs.gfx_filtershader[i + MAX_FILTERSHADERS][0]) { + if (filterd3d->gfx_filtershader[i + MAX_FILTERSHADERS][0]) { struct shaderdata *s = allocshaderslot (SHADERTYPE_AFTER); - if (!psEffect_LoadEffect (currprefs.gfx_filtershader[i + MAX_FILTERSHADERS], true, s, i + MAX_FILTERSHADERS)) { - currprefs.gfx_filtershader[i + MAX_FILTERSHADERS][0] = changed_prefs.gfx_filtershader[i + MAX_FILTERSHADERS][0] = 0; + if (!psEffect_LoadEffect (filterd3d->gfx_filtershader[i + MAX_FILTERSHADERS], true, s, i + MAX_FILTERSHADERS)) { + filterd3d->gfx_filtershader[i + MAX_FILTERSHADERS][0] = changed_prefs.gf[filterd3didx].gfx_filtershader[i + MAX_FILTERSHADERS][0] = 0; break; } } - if (currprefs.gfx_filtermask[i + MAX_FILTERSHADERS][0]) { + if (filterd3d->gfx_filtermask[i + MAX_FILTERSHADERS][0]) { struct shaderdata *s = allocshaderslot (SHADERTYPE_MASK_AFTER); - createmasktexture (currprefs.gfx_filtermask[i + MAX_FILTERSHADERS], s); + createmasktexture (filterd3d->gfx_filtermask[i + MAX_FILTERSHADERS], s); } } - if (currprefs.gfx_filter_scanlines > 0) { + if (filterd3d->gfx_filter_scanlines > 0) { createsltexture (); createscanlines (1); } @@ -2091,7 +2093,7 @@ static int restoredeviceobjects (void) if (wasshader && !shaderon) write_log (_T("Falling back to non-shader mode\n")); - createmask2texture (currprefs.gfx_filteroverlay); + createmask2texture (filterd3d->gfx_filteroverlay); createledtexture (); @@ -2229,6 +2231,9 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[APMODE_RTG] : &currprefs.gfx_apmode[APMODE_NATIVE]; D3DADAPTER_IDENTIFIER9 did; + filterd3didx = picasso_on; + filterd3d = &currprefs.gf[filterd3didx]; + D3D_free2 (); if (!currprefs.gfx_api) { _tcscpy (errmsg, _T("D3D: not enabled")); @@ -2483,11 +2488,11 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre required_sl_texture_w = w_w; required_sl_texture_h = w_h; - if (currprefs.gfx_filter_scanlines > 0 && (max_texture_w < w_w || max_texture_h < w_h)) { + if (filterd3d->gfx_filter_scanlines > 0 && (max_texture_w < w_w || max_texture_h < w_h)) { gui_message (_T("%s: %d * %d or bigger texture support required for scanlines (max is only %d * %d)\n"), D3DHEAD, _T("Scanlines disabled."), required_sl_texture_w, required_sl_texture_h, max_texture_w, max_texture_h); - changed_prefs.gfx_filter_scanlines = currprefs.gfx_filter_scanlines = 0; + changed_prefs.gf[filterd3didx].gfx_filter_scanlines = filterd3d->gfx_filter_scanlines = 0; } switch (depth) @@ -2933,7 +2938,7 @@ static void D3D_render2 (void) if (FAILED (hr = postEffect->SetTechnique (postTechniquePlain))) write_log (_T("%s: SetTechnique(postTechniquePlain) failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); } - hr = postEffect->SetInt (postFilterMode, currprefs.gfx_filter_bilinear ? D3DTEXF_LINEAR : D3DTEXF_POINT); + hr = postEffect->SetInt (postFilterMode, filterd3d->gfx_filter_bilinear ? D3DTEXF_LINEAR : D3DTEXF_POINT); if (FAILED (hr = postEffect->SetTexture (postSourceTextureHandle, srctex))) write_log (_T("%s: SetTexture(srctex) failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); @@ -2986,7 +2991,7 @@ static void D3D_render2 (void) hr = d3ddev->SetTransform (D3DTS_WORLD, &m_matWorld); hr = d3ddev->SetTexture (0, srctex); hr = d3ddev->DrawPrimitive (D3DPT_TRIANGLESTRIP, 0, 2); - int bl = currprefs.gfx_filter_bilinear ? D3DTEXF_LINEAR : D3DTEXF_POINT; + int bl = filterd3d->gfx_filter_bilinear ? D3DTEXF_LINEAR : D3DTEXF_POINT; hr = d3ddev->SetSamplerState (0, D3DSAMP_MINFILTER, bl); hr = d3ddev->SetSamplerState (0, D3DSAMP_MAGFILTER, bl); @@ -3047,20 +3052,20 @@ static void D3D_render2 (void) MatrixScaling (&t, w, h, 0); v.x = 0; - if (currprefs.gfx_filteroverlay_pos.x == -1) + if (filterd3d->gfx_filteroverlay_pos.x == -1) v.x = (window_w - (mask2texture_w * w)) / 2; - else if (currprefs.gfx_filteroverlay_pos.x > -24000) - v.x = currprefs.gfx_filteroverlay_pos.x; + else if (filterd3d->gfx_filteroverlay_pos.x > -24000) + v.x = filterd3d->gfx_filteroverlay_pos.x; else - v.x = (window_w - (mask2texture_w * w)) / 2 + (-currprefs.gfx_filteroverlay_pos.x - 30100) * window_w / 100.0; + v.x = (window_w - (mask2texture_w * w)) / 2 + (-filterd3d->gfx_filteroverlay_pos.x - 30100) * window_w / 100.0; v.y = 0; - if (currprefs.gfx_filteroverlay_pos.y == -1) + if (filterd3d->gfx_filteroverlay_pos.y == -1) v.y = (window_h - (mask2texture_h * h)) / 2; - else if (currprefs.gfx_filteroverlay_pos.y > -24000) - v.y = currprefs.gfx_filteroverlay_pos.y; + else if (filterd3d->gfx_filteroverlay_pos.y > -24000) + v.y = filterd3d->gfx_filteroverlay_pos.y; else - v.y = (window_h - (mask2texture_h * h)) / 2 + (-currprefs.gfx_filteroverlay_pos.y - 30100) * window_h / 100.0; + v.y = (window_h - (mask2texture_h * h)) / 2 + (-filterd3d->gfx_filteroverlay_pos.y - 30100) * window_h / 100.0; v.x /= w; v.y /= h; diff --git a/od-win32/hardfile_win32.cpp b/od-win32/hardfile_win32.cpp index 0f3ac7ba..07e4b4e9 100644 --- a/od-win32/hardfile_win32.cpp +++ b/od-win32/hardfile_win32.cpp @@ -583,7 +583,7 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL); DWORD err = GetLastError (); if (h == INVALID_HANDLE_VALUE && err == ERROR_FILE_NOT_FOUND) - goto end; + goto emptyreal; } } if (h != INVALID_HANDLE_VALUE) { @@ -693,6 +693,7 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) //fixdrive (hfd); } else { +emptyreal: hfd->flags = HFD_FLAGS_REALDRIVE; hfd->drive_empty = -1; hfd->emptyname = my_strdup (name); diff --git a/od-win32/lib/prowizard.lib b/od-win32/lib/prowizard.lib index d2c44a93955daff30bf07b17c0f45136b287a26a..75ee3faef9bcd6586d08bb6038cafcd2fdc2e50c 100644 GIT binary patch delta 11585 zcmai433$}h+Rn)&nMpFq45hTwQn~>xl%*>zdn*M+s8SX|6r~7NKxhj^{ws(Sl`D%t z5$Gq%l`32=f))hi13}poWKlq55l|KZ6$C-qE(-lma?+W$Gri37v?s~ryx+c@b7s+u z>@Q|ymxkNhwMoiIPH+2hjB8lc_1qZG+FrxdysG=PL%wLJR^7~d;Ff3JJNsS2_VD<= zYb*Ar>ZI%1vp@7C^;%3_a+FVA_2B%kCZD{{dI+BhGdGfxBm;+kN?P(H9T#jSXKXcq=Wiu$$3N>FZ16JAPf_9Ybm4KBGg#7b@L;J0LHAF@Ltwd^zf2PE zPsH#!jIGa~koZ<2R)+B(*uimwxM4#K?}lc^)iL9$yK!~fxN5&dc0*J=AB-(y`Bw$l z@FRV=C64|JKfycUL>wQ?PZHo-93KgN?~o>#8qZ(0R}&!=Iw$f>(U+p;t==CA6_>;& zSeD4&(nu?$dI{v?%qyf!{*90tSgRl7nUg1ka9m^48{j2XccZ62-&o;W1VLexH~}z^ z58&lU9phgjX^x*i%Lfaj86FzR53XT2PjYIzHqpi>Pst%VXSm0xIF9RLhSTywey>jA zaoo#%peR79-Pnj~?0Om`r>3>_!nsYj_nJc9I(sB`UBo}{B297i%79=@0l6RX?H%El z-5l3DSXox<<`}??vR}b+|*hwVzJi&ivBaKi##Xnp_OAXql zrnajk*1aqy*3zH&JSQATuuD*KTRZ}f{-3P_T;;W=;Pb1z3yQAtAH#2d@EW|mN$d!# zk2>sd`42u8R{X(F=Ocoka=X1V7XQgR{S%*vrPujxLF6YmBH6|TeNDBJ`#^S2E}Uv( z`Mt`@0;T~Hs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A+6UvF^zO9%U%{2",IDC_INPUTSWAP,324,303,70,14 END -IDD_FILTER DIALOGEX 0, 0, 396, 288 +IDD_FILTER DIALOGEX 0, 0, 396, 295 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN - GROUPBOX "Filter Settings",-1,1,1,393,146 - COMBOBOX IDC_FILTERMODE,9,15,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_FILTERFILTER,215,15,63,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Reset to defaults",IDC_FILTERDEFAULT,283,15,106,14 - COMBOBOX IDC_FILTEROVERLAYTYPE,9,36,118,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_FILTEROVERLAY,134,36,145,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_FILTERAUTOSCALE,284,36,104,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - RTEXT "Horiz. size:",-1,7,63,81,10,SS_CENTERIMAGE - COMBOBOX IDC_FILTERHZMULT,92,62,35,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,56,152,19 - EDITTEXT IDC_FILTERHZV,316,58,42,12,ES_CENTER | ES_READONLY - RTEXT "Vert. size:",-1,7,84,81,10,SS_CENTERIMAGE - COMBOBOX IDC_FILTERVZMULT,92,83,35,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,77,152,19 - EDITTEXT IDC_FILTERVZV,316,79,42,12,ES_CENTER | ES_READONLY - RTEXT "Horiz. position:",-1,5,105,81,10,SS_CENTERIMAGE - CONTROL "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,98,151,19 - EDITTEXT IDC_FILTERHOV,316,100,42,12,ES_CENTER | ES_READONLY - RTEXT "Vert. position:",-1,5,125,81,10,SS_CENTERIMAGE - CONTROL "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,119,151,19 - EDITTEXT IDC_FILTERVOV,316,121,42,12,ES_CENTER | ES_READONLY - GROUPBOX "Aspect Ratio Correction",-1,1,152,144,89 - COMBOBOX IDC_FILTERASPECT,14,169,99,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Filter Settings",-1,1,1,393,160 + COMBOBOX IDC_FILTERMODE,9,31,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTERSTACK,182,31,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTERFILTER,215,31,63,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Reset to defaults",IDC_FILTERDEFAULT,283,31,106,14 + COMBOBOX IDC_FILTEROVERLAYTYPE,9,52,118,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTEROVERLAY,134,52,145,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTERAUTOSCALE,284,52,104,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + RTEXT "Horiz. size:",-1,7,79,81,10,SS_CENTERIMAGE + COMBOBOX IDC_FILTERHZMULT,92,78,35,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + RTEXT "Vert. size:",-1,7,100,81,10,SS_CENTERIMAGE + COMBOBOX IDC_FILTERVZMULT,92,99,35,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + RTEXT "Horiz. position:",-1,5,121,81,10,SS_CENTERIMAGE + RTEXT "Vert. position:",-1,5,141,81,10,SS_CENTERIMAGE + CONTROL "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,72,152,19 + EDITTEXT IDC_FILTERHZV,316,74,42,12,ES_CENTER | ES_READONLY + CONTROL "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,93,152,19 + EDITTEXT IDC_FILTERVZV,316,95,42,12,ES_CENTER | ES_READONLY + CONTROL "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,114,151,19 + EDITTEXT IDC_FILTERHOV,316,116,42,12,ES_CENTER | ES_READONLY + CONTROL "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,147,135,151,19 + EDITTEXT IDC_FILTERVOV,316,137,42,12,ES_CENTER | ES_READONLY + GROUPBOX "Aspect Ratio Correction",-1,1,165,144,89 + COMBOBOX IDC_FILTERASPECT,14,182,99,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP CONTROL "Keep autoscale aspect",IDC_FILTERKEEPAUTOSCALEASPECT, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,189,126,11 - CONTROL "Keep aspect ratio",IDC_FILTERKEEPASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,204,126,11 - COMBOBOX IDC_FILTERASPECT2,14,220,99,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Extra Settings",-1,154,152,240,89 - COMBOBOX IDC_FILTERXTRA,177,172,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_FILTERSLR,327,172,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,195,141,19 - EDITTEXT IDC_FILTERXLV,327,197,41,12,ES_CENTER | ES_READONLY - GROUPBOX "Presets",-1,1,245,393,36 - COMBOBOX IDC_FILTERPRESETS,13,260,183,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Load",IDC_FILTERPRESETLOAD,205,259,55,14 - PUSHBUTTON "Save",IDC_FILTERPRESETSAVE,265,259,55,14 - PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,325,259,55,14 - COMBOBOX IDC_FILTERSTACK,182,15,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,202,126,11 + CONTROL "Keep aspect ratio",IDC_FILTERKEEPASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,217,126,11 + COMBOBOX IDC_FILTERASPECT2,14,233,99,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Extra Settings",-1,154,165,240,89 + COMBOBOX IDC_FILTERXTRA,177,185,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTERSLR,327,185,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CONTROL "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,208,141,19 + EDITTEXT IDC_FILTERXLV,327,210,41,12,ES_CENTER | ES_READONLY + GROUPBOX "Presets",-1,1,258,393,36 + COMBOBOX IDC_FILTERPRESETS,13,273,183,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Load",IDC_FILTERPRESETLOAD,205,272,55,14 + PUSHBUTTON "Save",IDC_FILTERPRESETSAVE,265,272,55,14 + PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,325,272,55,14 + COMBOBOX IDC_FILTER_NATIVERTG,284,12,104,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP END IDD_HARDDRIVE DIALOGEX 0, 0, 396, 109 @@ -832,6 +837,8 @@ FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN LTEXT "Hard drive:",IDC_STATIC,7,11,80,10 COMBOBOX IDC_HARDDRIVE,49,9,339,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_HDFINFO,5,29,385,12,ES_CENTER | ES_READONLY + EDITTEXT IDC_HDFINFO2,5,46,385,12,ES_CENTER | ES_READONLY DEFPUSHBUTTON "Create hard disk image file",IDC_HARDDRIVE_IMAGE,49,67,115,14 EDITTEXT IDC_PATH_NAME,183,67,97,15,ES_AUTOHSCROLL | NOT WS_VISIBLE RTEXT "HD Controller:",IDC_STATIC,12,90,65,10,SS_CENTERIMAGE @@ -839,8 +846,6 @@ BEGIN CONTROL "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,172,90,60,10 DEFPUSHBUTTON "Add hard drive",IDOK,236,87,73,14 PUSHBUTTON "Cancel",IDCANCEL,316,87,73,14 - EDITTEXT IDC_HDFINFO,5,29,385,12,ES_CENTER | ES_READONLY - EDITTEXT IDC_HDFINFO2,5,46,385,12,ES_CENTER | ES_READONLY END IDD_MISC2 DIALOGEX 0, 0, 396, 263 @@ -891,10 +896,10 @@ BEGIN PUSHBUTTON "Reset",IDC_RESETAMIGA,3,328,47,14 PUSHBUTTON "Quit",IDC_QUITEMU,55,328,47,14 PUSHBUTTON "Restart",IDC_RESTARTEMU,107,328,47,14,NOT WS_VISIBLE + PUSHBUTTON "Error log",IDC_ERRORLOG,322,328,47,14,NOT WS_VISIBLE DEFPUSHBUTTON "OK",IDOK,375,328,47,14 PUSHBUTTON "Cancel",IDCANCEL,427,328,47,14 PUSHBUTTON "Help",IDHELP,479,328,47,14,WS_DISABLED - PUSHBUTTON "Error log",IDC_ERRORLOG,322,328,47,14,NOT WS_VISIBLE END IDD_PATHS DIALOGEX 0, 0, 396, 303 @@ -961,20 +966,20 @@ BEGIN PUSHBUTTON "Select image file",IDC_DF0QQ,93,148,98,15 RTEXT "Write-protected",IDC_DF0WPTEXTQ,196,151,69,10,SS_CENTERIMAGE CONTROL "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,270,149,10,15 + PUSHBUTTON "?",IDC_INFO0Q,334,148,19,15 PUSHBUTTON "Eject",IDC_EJECT0Q,358,148,30,15 COMBOBOX IDC_DF0TEXTQ,9,167,379,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "Floppy drive DF1:",IDC_DF1QENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,186,77,15 PUSHBUTTON "Select image file",IDC_DF1QQ,93,186,98,15 RTEXT "Write-protected",IDC_DF1WPTEXTQ,195,189,69,10,SS_CENTERIMAGE + COMBOBOX IDC_CD0Q_TYPE,199,187,74,50,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,270,185,10,15 + PUSHBUTTON "?",IDC_INFO1Q,334,186,19,15 PUSHBUTTON "Eject",IDC_EJECT1Q,358,186,30,15 COMBOBOX IDC_DF1TEXTQ,9,204,379,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Set configuration",IDC_QUICKSTART_SETCONFIG,9,239,88,15,NOT WS_VISIBLE GROUPBOX "Mode",IDC_STATIC,250,231,144,28,BS_LEFT CONTROL "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,259,242,131,12 - COMBOBOX IDC_CD0Q_TYPE,199,187,74,50,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "?",IDC_INFO0Q,334,148,19,15 - PUSHBUTTON "?",IDC_INFO1Q,334,186,19,15 END IDD_FRONTEND DIALOGEX 0, 0, 420, 242 @@ -1067,6 +1072,7 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,67,212,10 CONTROL "Always scale in windowed mode",IDC_RTG_SCALE_ALLOW, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,80,212,10 + CONTROL "Always center",IDC_RTG_CENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,93,212,10 CONTROL "Hardware vertical blank interrupt",IDC_RTG_VBINTERRUPT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,106,157,10 CONTROL "Hardware sprite emulation",IDC_RTG_HWSPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,106,148,10 @@ -1086,6 +1092,9 @@ BEGIN CONTROL "Catweasel Z2 emulation [] Catweasel MK2 Zorro II card emulation. Physical Windows compatible Catweasel card and drivers required.",IDC_CATWEASEL, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,216,147,11 CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,229,147,11 + CONTROL "A590/A2091 WD33C93 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,242,147,11 + CONTROL "A4091 NCR53C710 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,255,151,11 + CONTROL "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,268,147,11 GROUPBOX "Network",IDC_STATIC,181,197,213,86 CONTROL "bsdsocket.library [] bsdsocket network library emulation.",IDC_SOCKETS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,216,187,11 @@ -1094,10 +1103,6 @@ BEGIN CONTROL "A2065 Z2 [] A2065 Ethernet Zorro II card emulation.",IDC_A2065, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,242,187,11 COMBOBOX IDC_NETDEVICE,202,257,178,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Always center",IDC_RTG_CENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,93,212,10 - CONTROL "A590/A2091 WD33C93 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,242,147,11 - CONTROL "A4091 NCR53C710 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,255,151,11 - CONTROL "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,268,147,11 END IDD_INPUTMAP DIALOGEX 0, 0, 421, 341 @@ -1109,13 +1114,13 @@ BEGIN CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,418,257 EDITTEXT IDC_INPUTMAPOUT,1,261,418,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED EDITTEXT IDC_INPUTMAPOUTM,1,277,418,29,ES_MULTILINE | ES_READONLY | WS_DISABLED - PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,86,324,80,14 + COMBOBOX IDC_INPUTMAPADD,2,309,345,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Add",IDC_INPUTMAP_CUSTOM,351,308,66,14 + PUSHBUTTON "Test",IDC_INPUTMAP_TEST,2,324,80,14 + PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,86,324,80,14 PUSHBUTTON "Delete",IDC_INPUTMAP_DELETE,170,324,80,14 PUSHBUTTON "Delete all",IDC_INPUTMAP_DELETEALL,254,324,80,14 - PUSHBUTTON "Test",IDC_INPUTMAP_TEST,2,324,80,14 PUSHBUTTON "Exit",IDC_INPUTMAP_EXIT,338,324,80,14 - COMBOBOX IDC_INPUTMAPADD,2,309,345,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP END IDD_INFOBOX DIALOGEX 0, 0, 420, 68 @@ -1158,15 +1163,15 @@ STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | CAPTION "Tape Drive Settings" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - DEFPUSHBUTTON "Add Tape Drive",IDOK,201,58,88,14 - PUSHBUTTON "Cancel",IDCANCEL,300,58,87,14 - RTEXT "HD Controller:",IDC_STATIC,35,61,65,10,SS_CENTERIMAGE - COMBOBOX IDC_HDF_CONTROLLER,115,59,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_PATH_NAME,52,15,334,15,ES_AUTOHSCROLL RTEXT "Path:",IDC_STATIC,4,18,43,10,SS_CENTERIMAGE + EDITTEXT IDC_PATH_NAME,52,15,334,15,ES_AUTOHSCROLL PUSHBUTTON "Select Directory",IDC_TAPE_SELECT_DIR,19,36,123,15 PUSHBUTTON "Select Archive or Plain File",IDC_TAPE_SELECT_FILE,160,36,123,15 CONTROL "Read/write",IDC_TAPE_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,313,39,67,10 + RTEXT "HD Controller:",IDC_STATIC,35,61,65,10,SS_CENTERIMAGE + COMBOBOX IDC_HDF_CONTROLLER,115,59,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "Add Tape Drive",IDOK,201,58,88,14 + PUSHBUTTON "Cancel",IDCANCEL,300,58,87,14 END IDD_DISKINFO DIALOGEX 0, 0, 491, 323 @@ -1175,8 +1180,8 @@ CAPTION "Disk image information" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,220,303,50,14 - EDITTEXT IDC_DISKINFOBOX,5,4,481,292,ES_MULTILINE | ES_READONLY | WS_VSCROLL PUSHBUTTON "Save bootblock",IDC_SAVEBOOTBLOCK,397,303,89,14,NOT WS_VISIBLE + EDITTEXT IDC_DISKINFOBOX,5,4,481,292,ES_MULTILINE | ES_READONLY | WS_VSCROLL END @@ -1420,6 +1425,7 @@ BEGIN IDD_FILTER, DIALOG BEGIN + BOTTOMMARGIN, 288 END IDD_HARDDRIVE, DIALOG diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index 38a9a958..53e3acd4 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -496,27 +496,27 @@ static void fixup_size (struct uae_prefs *prefs) write_log(_T("fixup_size(%d,%d)\n"), prefs->gfx_xcenter_size, prefs->gfx_ycenter_size); if (prefs->gfx_xcenter_size > 0) { int hres = prefs->gfx_resolution; - if (prefs->gfx_filter) { - if (prefs->gfx_filter_horiz_zoom_mult) - hres += prefs->gfx_filter_horiz_zoom_mult - 1; - hres += uaefilters[prefs->gfx_filter].intmul - 1; + if (prefs->gf[0].gfx_filter) { + if (prefs->gf[0].gfx_filter_horiz_zoom_mult) + hres += prefs->gf[0].gfx_filter_horiz_zoom_mult - 1; + hres += uaefilters[prefs->gf[0].gfx_filter].intmul - 1; } if (hres > max_horiz_dbl) hres = max_horiz_dbl; prefs->gfx_size_win.width = prefs->gfx_xcenter_size >> (RES_MAX - hres); - prefs->gfx_filter_autoscale = 0; + prefs->gf[0].gfx_filter_autoscale = 0; } if (prefs->gfx_ycenter_size > 0) { int vres = prefs->gfx_vresolution; - if (prefs->gfx_filter) { - if (prefs->gfx_filter_vert_zoom_mult) - vres += prefs->gfx_filter_vert_zoom_mult - 1; - vres += uaefilters[prefs->gfx_filter].intmul - 1; + if (prefs->gf[0].gfx_filter) { + if (prefs->gf[0].gfx_filter_vert_zoom_mult) + vres += prefs->gf[0].gfx_filter_vert_zoom_mult - 1; + vres += uaefilters[prefs->gf[0].gfx_filter].intmul - 1; } if (vres > max_vert_dbl) vres = max_vert_dbl; prefs->gfx_size_win.height = (prefs->gfx_ycenter_size * 2) >> (VRES_QUAD - vres); - prefs->gfx_filter_autoscale = 0; + prefs->gf[0].gfx_filter_autoscale = 0; } write_log(_T("-> %dx%d\n"), prefs->gfx_size_win.width, prefs->gfx_size_win.height); } @@ -604,8 +604,8 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p, bool g } write_log (_T("GET_RPSM: %d %d %d %d\n"), rx, ry, rw, rh); - hmult = p->gfx_filter_horiz_zoom_mult; - vmult = p->gfx_filter_vert_zoom_mult; + hmult = p->gf[0].gfx_filter_horiz_zoom_mult; + vmult = p->gf[0].gfx_filter_vert_zoom_mult; full = p->gfx_apmode[0].gfx_fullscreen; @@ -639,12 +639,12 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p, bool g sm->lClipHeight = p->gfx_ycenter_size <= 0 ? -1 : p->gfx_ycenter_size; } - if (p->gfx_filter_scanlines || p->gfx_scanlines) + if (p->gf[0].gfx_filter_scanlines || p->gfx_pscanlines) m |= RP_SCREENMODE_SCANLINES; if (p->gfx_xcenter_pos == 0 && p->gfx_ycenter_pos == 0) cf |= RP_CLIPFLAGS_NOCLIP; - else if (p->gfx_filter_autoscale == AUTOSCALE_RESIZE || p->gfx_filter_autoscale == AUTOSCALE_NORMAL) + else if (p->gf[0].gfx_filter_autoscale == AUTOSCALE_RESIZE || p->gf[0].gfx_filter_autoscale == AUTOSCALE_NORMAL) cf |= RP_CLIPFLAGS_AUTOCLIP; } if (full) { @@ -707,7 +707,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) else fs = 1; } - p->gfx_filter_autoscale = AUTOSCALE_CENTER; + p->gf[0].gfx_filter_autoscale = AUTOSCALE_CENTER; disp = getdisplay (p); if (log_rp & 2) { @@ -842,7 +842,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) hmult = vmult = 0; } else if (integerscale) { hmult = vmult = 1; - p->gfx_filter_autoscale = AUTOSCALE_INTEGER; + p->gf[0].gfx_filter_autoscale = AUTOSCALE_INTEGER; if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) { p->gfx_xcenter_pos = -1; p->gfx_ycenter_pos = -1; @@ -857,25 +857,25 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) } if (keepaspect) { - p->gfx_filter_aspect = -1; - p->gfx_filter_keep_aspect = 1; + p->gf[0].gfx_filter_aspect = -1; + p->gf[0].gfx_filter_keep_aspect = 1; } else { - p->gfx_filter_aspect = 0; - p->gfx_filter_keep_aspect = 0; + p->gf[0].gfx_filter_aspect = 0; + p->gf[0].gfx_filter_keep_aspect = 0; } if (!integerscale) { if (sm->dwClipFlags & RP_CLIPFLAGS_AUTOCLIP) { if (!forcesize) - p->gfx_filter_autoscale = AUTOSCALE_RESIZE; + p->gf[0].gfx_filter_autoscale = AUTOSCALE_RESIZE; else - p->gfx_filter_autoscale = AUTOSCALE_NORMAL; + p->gf[0].gfx_filter_autoscale = AUTOSCALE_NORMAL; p->gfx_xcenter_pos = -1; p->gfx_ycenter_pos = -1; p->gfx_xcenter_size = -1; p->gfx_ycenter_size = -1; } else if (sm->dwClipFlags & RP_CLIPFLAGS_NOCLIP) { - p->gfx_filter_autoscale = AUTOSCALE_STATIC_MAX; + p->gf[0].gfx_filter_autoscale = AUTOSCALE_STATIC_MAX; p->gfx_xcenter_pos = -1; p->gfx_ycenter_pos = -1; p->gfx_xcenter_size = -1; @@ -892,20 +892,21 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) p->gfx_ycenter_size = sm->lClipHeight; if ((p->gfx_xcenter_pos >= 0 && p->gfx_ycenter_pos >= 0) || (p->gfx_xcenter_size > 0 && p->gfx_ycenter_size > 0)) { - p->gfx_filter_autoscale = AUTOSCALE_MANUAL; + p->gf[0].gfx_filter_autoscale = AUTOSCALE_MANUAL; } } - p->gfx_filter_horiz_zoom_mult = hmult; - p->gfx_filter_vert_zoom_mult = vmult; + p->gf[0].gfx_filter_horiz_zoom_mult = hmult; + p->gf[0].gfx_filter_vert_zoom_mult = vmult; - p->gfx_filter_scanlines = 0; - p->gfx_scanlines = 0; + p->gf[0].gfx_filter_scanlines = 0; + p->gfx_iscanlines = 0; + p->gfx_pscanlines = 0; if (sm->dwScreenMode & RP_SCREENMODE_SCANLINES) { - p->gfx_scanlines = 1; - p->gfx_filter_scanlines = 8; - p->gfx_filter_scanlinelevel = 8; - p->gfx_filter_scanlineratio = (1 << 4) | 1; + p->gfx_pscanlines = 1; + p->gf[0].gfx_filter_scanlines = 8; + p->gf[0].gfx_filter_scanlinelevel = 8; + p->gf[0].gfx_filter_scanlineratio = (1 << 4) | 1; } } @@ -921,10 +922,10 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) write_log (_T("WW=%d WH=%d FW=%d FH=%d HM=%.1f VM=%.1f XP=%d YP=%d XS=%d YS=%d AS=%d AR=%d,%d\n"), p->gfx_size_win.width, p->gfx_size_win.height, p->gfx_size_fs.width, p->gfx_size_fs.height, - p->gfx_filter_horiz_zoom_mult, p->gfx_filter_vert_zoom_mult, + p->gf[0].gfx_filter_horiz_zoom_mult, p->gf[0].gfx_filter_vert_zoom_mult, p->gfx_xcenter_pos, p->gfx_ycenter_pos, p->gfx_xcenter_size, p->gfx_ycenter_size, - p->gfx_filter_autoscale, p->gfx_filter_aspect, p->gfx_filter_keep_aspect); + p->gf[0].gfx_filter_autoscale, p->gf[0].gfx_filter_aspect, p->gf[0].gfx_filter_keep_aspect); } } @@ -1347,11 +1348,11 @@ void rp_fixup_options (struct uae_prefs *p) sendenum (); changed_prefs.win32_borderless = currprefs.win32_borderless = 1; - rp_filter_default = rp_filter = currprefs.gfx_filter; + rp_filter_default = rp_filter = currprefs.gf[0].gfx_filter; if (rp_filter == 0) { rp_filter = UAE_FILTER_NULL; if (currprefs.gfx_api) - changed_prefs.gfx_filter = currprefs.gfx_filter = rp_filter; + changed_prefs.gf[0].gfx_filter = currprefs.gf[0].gfx_filter = rp_filter; } fixup_size (p); diff --git a/od-win32/scaler_more.cpp b/od-win32/scaler_more.cpp index 09b7fafe..28a70721 100644 --- a/od-win32/scaler_more.cpp +++ b/od-win32/scaler_more.cpp @@ -39,8 +39,8 @@ void PAL_init(void) xx2 = 5; xx3 = 7; } - pal_noise_mask = (1 << (currprefs.gfx_filter_noise * 7 / 100)) - 1; - scanlinelevel = 128 - currprefs.gfx_filter_scanlines * 128 / 100; + pal_noise_mask = (1 << (currprefs.gf[picasso_on].gfx_filter_noise * 7 / 100)) - 1; + scanlinelevel = 128 - currprefs.gf[picasso_on].gfx_filter_scanlines * 128 / 100; } #if 0 diff --git a/od-win32/sysconfig.h b/od-win32/sysconfig.h index 8a955ac0..9396ab1a 100644 --- a/od-win32/sysconfig.h +++ b/od-win32/sysconfig.h @@ -47,6 +47,7 @@ #define UAESERIAL /* uaeserial.device emulation */ #define FPUEMU /* FPU emulation */ #define FPU_UAE +#define USE_LONG_DOUBLE 0 #define MMUEMU /* Aranym 68040 MMU */ #define FULLMMU /* Aranym 68040 MMU */ #define CPUEMU_0 /* generic 680x0 emulation */ @@ -63,6 +64,7 @@ #define UAEGFX_INTERNAL /* built-in libs:picasso96/uaegfx.card */ #define BSDSOCKET /* bsdsocket.library emulation */ #define CAPS /* CAPS-image support */ +#define SCP /* SuperCardPro */ #define FDI2RAW /* FDI 1.0 and 2.x image support */ #define AVIOUTPUT /* Avioutput support */ #define PROWIZARD /* Pro-Wizard module ripper */ @@ -81,6 +83,7 @@ #define WITH_LUA /* lua scripting */ #define WITH_UAENATIVE #define WITH_SLIRP +#define WITH_TABLETLIBRARY #else diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 9cb7e5a6..2e1bfd65 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -1606,7 +1606,7 @@ static int canstretch (void) if (isfullscreen () != 0) return 0; if (!WIN32GFX_IsPicassoScreen ()) { - if (currprefs.gfx_filter_autoscale == AUTOSCALE_RESIZE) + if (currprefs.gf[APMODE_NATIVE].gfx_filter_autoscale == AUTOSCALE_RESIZE) return 0; return 1; } else { @@ -3102,8 +3102,10 @@ void target_default_options (struct uae_prefs *p, int type) p->win32_commandpathend[0] = 0; p->win32_statusbar = 1; p->gfx_api = os_vista ? 1 : 0; - if (p->gfx_filter == 0 && p->gfx_api) - p->gfx_filter = 1; + if (p->gf[APMODE_NATIVE].gfx_filter == 0 && p->gfx_api) + p->gf[APMODE_NATIVE].gfx_filter = 1; + if (p->gf[APMODE_RTG].gfx_filter == 0 && p->gfx_api) + p->gf[APMODE_RTG].gfx_filter = 1; WIN32GUI_LoadUIString (IDS_INPUT_CUSTOM, buf, sizeof buf / sizeof (TCHAR)); for (int i = 0; i < GAMEPORT_INPUT_SETTINGS; i++) _stprintf (p->input_config_name[i], buf, i + 1); diff --git a/od-win32/win32.h b/od-win32/win32.h index 9b19acaf..25c463c4 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,11 +19,11 @@ #define LANG_DLL 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("10") +#define WINUAEBETA _T("11") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2014, 3, 4) +#define WINUAEDATE MAKEBD(2014, 3, 18) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index 7820b6fc..f54073d0 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -149,12 +149,12 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height bool doautoaspect = false; float autoaspectratio; - float filter_horiz_zoom = currprefs.gfx_filter_horiz_zoom / 1000.0f; - float filter_vert_zoom = currprefs.gfx_filter_vert_zoom / 1000.0f; - float filter_horiz_zoom_mult = currprefs.gfx_filter_horiz_zoom_mult; - float filter_vert_zoom_mult = currprefs.gfx_filter_vert_zoom_mult; - float filter_horiz_offset = currprefs.gfx_filter_horiz_offset / 10000.0f; - float filter_vert_offset = currprefs.gfx_filter_vert_offset / 10000.0f; + float filter_horiz_zoom = currprefs.gf[picasso_on].gfx_filter_horiz_zoom / 1000.0f; + float filter_vert_zoom = currprefs.gf[picasso_on].gfx_filter_vert_zoom / 1000.0f; + float filter_horiz_zoom_mult = currprefs.gf[picasso_on].gfx_filter_horiz_zoom_mult; + float filter_vert_zoom_mult = currprefs.gf[picasso_on].gfx_filter_vert_zoom_mult; + float filter_horiz_offset = currprefs.gf[picasso_on].gfx_filter_horiz_offset / 10000.0f; + float filter_vert_offset = currprefs.gf[picasso_on].gfx_filter_vert_offset / 10000.0f; store_custom_limits (-1, -1, -1, -1); @@ -175,8 +175,8 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height aws = aw * scale; ahs = ah * scale; //write_log (_T("%d %d %d\n"), dst_width, temp_width, aws); - extraw = -aws * (filter_horiz_zoom - currprefs.gfx_filteroverlay_overscan * 10) / 2.0f; - extrah = -ahs * (filter_vert_zoom - currprefs.gfx_filteroverlay_overscan * 10) / 2.0f; + extraw = -aws * (filter_horiz_zoom - currprefs.gf[picasso_on].gfx_filteroverlay_overscan * 10) / 2.0f; + extrah = -ahs * (filter_vert_zoom - currprefs.gf[picasso_on].gfx_filteroverlay_overscan * 10) / 2.0f; extraw2 = 0; if (getscalerect (&mrmx, &mrmy, &mrsx, &mrsy)) { @@ -201,9 +201,9 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height float ymult = filter_vert_zoom_mult; srcratio = 4.0f / 3.0f; - if (currprefs.gfx_filter_aspect > 0) { - dstratio = (currprefs.gfx_filter_aspect / ASPECTMULT) * 1.0f / (currprefs.gfx_filter_aspect & (ASPECTMULT - 1)); - } else if (currprefs.gfx_filter_aspect < 0) { + if (currprefs.gf[picasso_on].gfx_filter_aspect > 0) { + dstratio = (currprefs.gf[picasso_on].gfx_filter_aspect / ASPECTMULT) * 1.0f / (currprefs.gf[picasso_on].gfx_filter_aspect & (ASPECTMULT - 1)); + } else if (currprefs.gf[picasso_on].gfx_filter_aspect < 0) { if (isfullscreen () && deskw > 0 && deskh > 0) dstratio = 1.0f * deskw / deskh; else @@ -212,7 +212,7 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height dstratio = srcratio; } - int scalemode = currprefs.gfx_filter_autoscale; + int scalemode = currprefs.gf[picasso_on].gfx_filter_autoscale; if (!specialmode && scalemode == AUTOSCALE_STATIC_AUTO) { if (currprefs.gfx_apmode[0].gfx_fullscreen) { @@ -271,8 +271,8 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height bool ok = true; if (currprefs.gfx_xcenter_pos >= 0 || currprefs.gfx_ycenter_pos >= 0) { - changed_prefs.gfx_filter_horiz_offset = currprefs.gfx_filter_horiz_offset = 0.0; - changed_prefs.gfx_filter_vert_offset = currprefs.gfx_filter_vert_offset = 0.0; + changed_prefs.gf[picasso_on].gfx_filter_horiz_offset = currprefs.gf[picasso_on].gfx_filter_horiz_offset = 0.0; + changed_prefs.gf[picasso_on].gfx_filter_vert_offset = currprefs.gf[picasso_on].gfx_filter_vert_offset = 0.0; filter_horiz_offset = 0.0; filter_vert_offset = 0.0; get_custom_topedge (&cx, &cy, false); @@ -320,8 +320,8 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height } else if (scalemode == AUTOSCALE_MANUAL) { - changed_prefs.gfx_filter_horiz_offset = currprefs.gfx_filter_horiz_offset = 0.0; - changed_prefs.gfx_filter_vert_offset = currprefs.gfx_filter_vert_offset = 0.0; + changed_prefs.gf[picasso_on].gfx_filter_horiz_offset = currprefs.gf[picasso_on].gfx_filter_horiz_offset = 0.0; + changed_prefs.gf[picasso_on].gfx_filter_vert_offset = currprefs.gf[picasso_on].gfx_filter_vert_offset = 0.0; filter_horiz_offset = 0.0; filter_vert_offset = 0.0; @@ -359,7 +359,7 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height } autoaspectratio = 0; - if (currprefs.gfx_filter_keep_autoscale_aspect && cw > 0 && ch > 0 && crealh > 0 && (scalemode == AUTOSCALE_NORMAL || scalemode == AUTOSCALE_INTEGER_AUTOSCALE || scalemode == AUTOSCALE_MANUAL)) { + if (currprefs.gf[picasso_on].gfx_filter_keep_autoscale_aspect && cw > 0 && ch > 0 && crealh > 0 && (scalemode == AUTOSCALE_NORMAL || scalemode == AUTOSCALE_INTEGER_AUTOSCALE || scalemode == AUTOSCALE_MANUAL)) { float cw2 = cw; float ch2 = ch; int res = currprefs.gfx_resolution - currprefs.gfx_vresolution; @@ -398,7 +398,7 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height OffsetRect (zr, cx * scale - (dst_width - ww) / 2, cy * scale - (dst_height - hh) / 2); goto cont; - } else if (scalemode == AUTOSCALE_RESIZE && isfullscreen () == 0 && !currprefs.gfx_filteroverlay[0]) { + } else if (scalemode == AUTOSCALE_RESIZE && isfullscreen () == 0 && !currprefs.gf[picasso_on].gfx_filteroverlay[0]) { static int lastresize = 0; static int lastdelay = 1; @@ -439,8 +439,8 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height lastresize = AUTORESIZE_FRAME_DELAY; lastdelay = 0; } - float scalex = currprefs.gfx_filter_horiz_zoom_mult > 0 ? currprefs.gfx_filter_horiz_zoom_mult : 1.0f; - float scaley = currprefs.gfx_filter_vert_zoom_mult > 0 ? currprefs.gfx_filter_horiz_zoom_mult : 1.0f; + float scalex = currprefs.gf[picasso_on].gfx_filter_horiz_zoom_mult > 0 ? currprefs.gf[picasso_on].gfx_filter_horiz_zoom_mult : 1.0f; + float scaley = currprefs.gf[picasso_on].gfx_filter_vert_zoom_mult > 0 ? currprefs.gf[picasso_on].gfx_filter_horiz_zoom_mult : 1.0f; SetRect (sr, 0, 0, cw * scale * scalex, ch * scale * scaley); dr->left = (temp_width - aws) /2; dr->top = (temp_height - ahs) / 2; @@ -488,19 +488,19 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height xmult = 1.0; ymult = 1.0; - if (currprefs.gfx_filter_keep_aspect || currprefs.gfx_filter_aspect != 0) { + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect || currprefs.gf[picasso_on].gfx_filter_aspect != 0) { - if (currprefs.gfx_filter_keep_aspect) { + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect) { if (currprefs.ntscmode) { dstratio = dstratio * 1.21f; - if (currprefs.gfx_filter_keep_aspect == 2 && ispal ()) + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 2 && ispal ()) dstratio = dstratio * 0.93f; - else if (currprefs.gfx_filter_keep_aspect == 1 && !ispal ()) + else if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 1 && !ispal ()) dstratio = dstratio * 0.98f; } else { - if (currprefs.gfx_filter_keep_aspect == 2 && ispal ()) + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 2 && ispal ()) dstratio = dstratio * 0.95f; - else if (currprefs.gfx_filter_keep_aspect == 1 && !ispal ()) + else if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 1 && !ispal ()) dstratio = dstratio * 0.95f; } } @@ -550,7 +550,7 @@ cont: sizeoffset (dr, zr, extraw, extrah); - if (currprefs.gfx_filter_keep_aspect) { + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect) { float xm, ym, m; xm = aws / dst_width; @@ -568,14 +568,14 @@ cont: } if (currprefs.ntscmode) { - if (currprefs.gfx_filter_keep_aspect == 2 && ispal ()) + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 2 && ispal ()) dstratio = dstratio * 0.93f; - else if (currprefs.gfx_filter_keep_aspect == 1 && !ispal ()) + else if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 1 && !ispal ()) dstratio = dstratio * 0.98f; } else { - if (currprefs.gfx_filter_keep_aspect == 2 && ispal ()) + if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 2 && ispal ()) dstratio = dstratio * 0.95f; - else if (currprefs.gfx_filter_keep_aspect == 1 && !ispal ()) + else if (currprefs.gf[picasso_on].gfx_filter_keep_aspect == 1 && !ispal ()) dstratio = dstratio * 0.95f; } @@ -760,7 +760,7 @@ bool S2X_init (int dw, int dh, int dd) if (WIN32GFX_IsPicassoScreen ()) return true; - if (!currprefs.gfx_filter || !usedfilter) { + if (!currprefs.gf[picasso_on].gfx_filter || !usedfilter) { usedfilter = &uaefilters[0]; scale = 1; } else { @@ -769,7 +769,7 @@ bool S2X_init (int dw, int dh, int dd) if ((amiga_depth2 == 16 && !(flags & UAE_FILTER_MODE_16)) || (amiga_depth2 == 32 && !(flags & UAE_FILTER_MODE_32))) { usedfilter = &uaefilters[0]; scale = 1; - changed_prefs.gfx_filter = usedfilter->type; + changed_prefs.gf[picasso_on].gfx_filter = usedfilter->type; } } #if 0 @@ -789,7 +789,7 @@ bool S2X_init (int dw, int dh, int dd) amiga_depth = vb->pixbytes * 8; if (d3d) { - int m = currprefs.gfx_filter_filtermode + 1; + int m = currprefs.gf[picasso_on].gfx_filter_filtermode + 1; if (m < scale) m = scale; temp_width = dst_width * m; @@ -991,9 +991,9 @@ void S2X_render (void) } - if (ok == 0 && currprefs.gfx_filter) { + if (ok == 0 && currprefs.gf[picasso_on].gfx_filter) { usedfilter = &uaefilters[0]; - changed_prefs.gfx_filter = usedfilter->type; + changed_prefs.gf[picasso_on].gfx_filter = usedfilter->type; } end: diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 819c83e8..80aecdd1 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -1743,28 +1743,32 @@ int check_prefs_changed_gfx (void) c |= currprefs.gfx_api != changed_prefs.gfx_api ? (1|8|32) : 0; c |= currprefs.lightboost_strobo != changed_prefs.lightboost_strobo ? (2|16) : 0; - for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) { - c |= _tcscmp (currprefs.gfx_filtershader[i], changed_prefs.gfx_filtershader[i]) ? (2|8) : 0; - c |= _tcscmp (currprefs.gfx_filtermask[i], changed_prefs.gfx_filtermask[i]) ? (2|8) : 0; - } - - c |= currprefs.gfx_filter != changed_prefs.gfx_filter ? (2|8) : 0; - c |= _tcscmp (currprefs.gfx_filteroverlay, changed_prefs.gfx_filteroverlay) ? (2|8) : 0; - c |= currprefs.gfx_filter_filtermode != changed_prefs.gfx_filter_filtermode ? (2|8) : 0; - c |= currprefs.gfx_filter_bilinear != changed_prefs.gfx_filter_bilinear ? (2|8) : 0; - c |= currprefs.gfx_filter_horiz_zoom_mult != changed_prefs.gfx_filter_horiz_zoom_mult ? (1) : 0; - c |= currprefs.gfx_filter_vert_zoom_mult != changed_prefs.gfx_filter_vert_zoom_mult ? (1) : 0; - c |= currprefs.gfx_filter_noise != changed_prefs.gfx_filter_noise ? (1) : 0; - c |= currprefs.gfx_filter_blur != changed_prefs.gfx_filter_blur ? (1) : 0; - c |= currprefs.gfx_filter_scanlines != changed_prefs.gfx_filter_scanlines ? (1|8) : 0; - c |= currprefs.gfx_filter_scanlinelevel != changed_prefs.gfx_filter_scanlinelevel ? (1|8) : 0; - c |= currprefs.gfx_filter_scanlineratio != changed_prefs.gfx_filter_scanlineratio ? (1|8) : 0; - c |= currprefs.gfx_filter_aspect != changed_prefs.gfx_filter_aspect ? (1) : 0; - c |= currprefs.gfx_filter_luminance != changed_prefs.gfx_filter_luminance ? (1) : 0; - c |= currprefs.gfx_filter_contrast != changed_prefs.gfx_filter_contrast ? (1) : 0; - c |= currprefs.gfx_filter_saturation != changed_prefs.gfx_filter_saturation ? (1) : 0; - c |= currprefs.gfx_filter_gamma != changed_prefs.gfx_filter_gamma ? (1) : 0; - //c |= currprefs.gfx_filter_ != changed_prefs.gfx_filter_ ? (1|8) : 0; + for (int j = 0; j < 2; j++) { + struct gfx_filterdata *gf = &currprefs.gf[j]; + struct gfx_filterdata *gfc = &changed_prefs.gf[j]; + for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) { + c |= _tcscmp (gf->gfx_filtershader[i], gfc->gfx_filtershader[i]) ? (2|8) : 0; + c |= _tcscmp (gf->gfx_filtermask[i], gfc->gfx_filtermask[i]) ? (2|8) : 0; + } + + c |= gf->gfx_filter != gfc->gfx_filter ? (2|8) : 0; + c |= _tcscmp (gf->gfx_filteroverlay, gfc->gfx_filteroverlay) ? (2|8) : 0; + c |= gf->gfx_filter_filtermode != gfc->gfx_filter_filtermode ? (2|8) : 0; + c |= gf->gfx_filter_bilinear != gfc->gfx_filter_bilinear ? (2|8) : 0; + c |= gf->gfx_filter_horiz_zoom_mult != gfc->gfx_filter_horiz_zoom_mult ? (1) : 0; + c |= gf->gfx_filter_vert_zoom_mult != gfc->gfx_filter_vert_zoom_mult ? (1) : 0; + c |= gf->gfx_filter_noise != gfc->gfx_filter_noise ? (1) : 0; + c |= gf->gfx_filter_blur != gfc->gfx_filter_blur ? (1) : 0; + c |= gf->gfx_filter_scanlines != gfc->gfx_filter_scanlines ? (1|8) : 0; + c |= gf->gfx_filter_scanlinelevel != gfc->gfx_filter_scanlinelevel ? (1|8) : 0; + c |= gf->gfx_filter_scanlineratio != gfc->gfx_filter_scanlineratio ? (1|8) : 0; + c |= gf->gfx_filter_aspect != gfc->gfx_filter_aspect ? (1) : 0; + c |= gf->gfx_filter_luminance != gfc->gfx_filter_luminance ? (1) : 0; + c |= gf->gfx_filter_contrast != gfc->gfx_filter_contrast ? (1) : 0; + c |= gf->gfx_filter_saturation != gfc->gfx_filter_saturation ? (1) : 0; + c |= gf->gfx_filter_gamma != gfc->gfx_filter_gamma ? (1) : 0; + //c |= gf->gfx_filter_ != gfc->gfx_filter_ ? (1|8) : 0; + } c |= currprefs.rtg_horiz_zoom_mult != changed_prefs.rtg_horiz_zoom_mult ? (1) : 0; c |= currprefs.rtg_vert_zoom_mult != changed_prefs.rtg_vert_zoom_mult ? (1) : 0; @@ -1777,7 +1781,8 @@ int check_prefs_changed_gfx (void) c |= currprefs.gfx_vresolution != changed_prefs.gfx_vresolution ? (128) : 0; c |= currprefs.gfx_autoresolution_minh != changed_prefs.gfx_autoresolution_minh ? (128) : 0; c |= currprefs.gfx_autoresolution_minv != changed_prefs.gfx_autoresolution_minv ? (128) : 0; - c |= currprefs.gfx_scanlines != changed_prefs.gfx_scanlines ? (2 | 8) : 0; + c |= currprefs.gfx_iscanlines != changed_prefs.gfx_iscanlines ? (2 | 8) : 0; + c |= currprefs.gfx_pscanlines != changed_prefs.gfx_pscanlines ? (2 | 8) : 0; c |= currprefs.monitoremu != changed_prefs.monitoremu ? (2 | 8) : 0; c |= currprefs.gfx_lores_mode != changed_prefs.gfx_lores_mode ? (2 | 8) : 0; @@ -1837,28 +1842,32 @@ int check_prefs_changed_gfx (void) display_change_requested = 0; } - for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) { - _tcscpy (currprefs.gfx_filtershader[i], changed_prefs.gfx_filtershader[i]); - _tcscpy (currprefs.gfx_filtermask[i], changed_prefs.gfx_filtermask[i]); + for (int j = 0; j < 2; j++) { + struct gfx_filterdata *gf = &currprefs.gf[j]; + struct gfx_filterdata *gfc = &changed_prefs.gf[j]; + for (int i = 0; i <= 2 * MAX_FILTERSHADERS; i++) { + _tcscpy (gf->gfx_filtershader[i], gfc->gfx_filtershader[i]); + _tcscpy (gf->gfx_filtermask[i], gfc->gfx_filtermask[i]); + } + gf->gfx_filter = gfc->gfx_filter; + gf->gfx_filter_scanlines = gfc->gfx_filter_scanlines; + gf->gfx_filter_scanlinelevel = gfc->gfx_filter_scanlinelevel; + gf->gfx_filter_scanlineratio = gfc->gfx_filter_scanlineratio; + _tcscpy (gf->gfx_filteroverlay, gfc->gfx_filteroverlay); + gf->gfx_filter_filtermode = gfc->gfx_filter_filtermode; + gf->gfx_filter_bilinear = gfc->gfx_filter_bilinear; + gf->gfx_filter_horiz_zoom_mult = gfc->gfx_filter_horiz_zoom_mult; + gf->gfx_filter_vert_zoom_mult = gfc->gfx_filter_vert_zoom_mult; + gf->gfx_filter_noise = gfc->gfx_filter_noise; + gf->gfx_filter_blur = gfc->gfx_filter_blur; + gf->gfx_filter_aspect = gfc->gfx_filter_aspect; + gf->gfx_filter_luminance = gfc->gfx_filter_luminance; + gf->gfx_filter_contrast = gfc->gfx_filter_contrast; + gf->gfx_filter_saturation = gfc->gfx_filter_saturation; + gf->gfx_filter_gamma = gfc->gfx_filter_gamma; + gf->gfx_filter_autoscale = gfc->gfx_filter_autoscale; + //gf->gfx_filter_ = gfc->gfx_filter_; } - currprefs.gfx_filter = changed_prefs.gfx_filter; - _tcscpy (currprefs.gfx_filteroverlay, changed_prefs.gfx_filteroverlay); - currprefs.gfx_filter_filtermode = changed_prefs.gfx_filter_filtermode; - currprefs.gfx_filter_bilinear = changed_prefs.gfx_filter_bilinear; - currprefs.gfx_filter_horiz_zoom_mult = changed_prefs.gfx_filter_horiz_zoom_mult; - currprefs.gfx_filter_vert_zoom_mult = changed_prefs.gfx_filter_vert_zoom_mult; - currprefs.gfx_filter_noise = changed_prefs.gfx_filter_noise; - currprefs.gfx_filter_blur = changed_prefs.gfx_filter_blur; - currprefs.gfx_filter_scanlines = changed_prefs.gfx_filter_scanlines; - currprefs.gfx_filter_scanlinelevel = changed_prefs.gfx_filter_scanlinelevel; - currprefs.gfx_filter_scanlineratio = changed_prefs.gfx_filter_scanlineratio; - currprefs.gfx_filter_aspect = changed_prefs.gfx_filter_aspect; - currprefs.gfx_filter_luminance = changed_prefs.gfx_filter_luminance; - currprefs.gfx_filter_contrast = changed_prefs.gfx_filter_contrast; - currprefs.gfx_filter_saturation = changed_prefs.gfx_filter_saturation; - currprefs.gfx_filter_gamma = changed_prefs.gfx_filter_gamma; - currprefs.gfx_filter_autoscale = changed_prefs.gfx_filter_autoscale; - //currprefs.gfx_filter_ = changed_prefs.gfx_filter_; currprefs.rtg_horiz_zoom_mult = changed_prefs.rtg_horiz_zoom_mult; currprefs.rtg_vert_zoom_mult = changed_prefs.rtg_vert_zoom_mult; @@ -1871,7 +1880,8 @@ int check_prefs_changed_gfx (void) currprefs.gfx_vresolution = changed_prefs.gfx_vresolution; currprefs.gfx_autoresolution_minh = changed_prefs.gfx_autoresolution_minh; currprefs.gfx_autoresolution_minv = changed_prefs.gfx_autoresolution_minv; - currprefs.gfx_scanlines = changed_prefs.gfx_scanlines; + currprefs.gfx_iscanlines = changed_prefs.gfx_iscanlines; + currprefs.gfx_pscanlines = changed_prefs.gfx_pscanlines; currprefs.monitoremu = changed_prefs.monitoremu; currprefs.gfx_lores_mode = changed_prefs.gfx_lores_mode; @@ -1977,7 +1987,7 @@ int check_prefs_changed_gfx (void) return 1; } - if (currprefs.gfx_filter_autoscale != changed_prefs.gfx_filter_autoscale || + if (currprefs.gf[0].gfx_filter_autoscale != changed_prefs.gf[0].gfx_filter_autoscale || currprefs.gfx_xcenter_pos != changed_prefs.gfx_xcenter_pos || currprefs.gfx_ycenter_pos != changed_prefs.gfx_ycenter_pos || currprefs.gfx_xcenter_size != changed_prefs.gfx_xcenter_size || @@ -1991,7 +2001,7 @@ int check_prefs_changed_gfx (void) currprefs.gfx_ycenter_size = changed_prefs.gfx_ycenter_size; currprefs.gfx_xcenter = changed_prefs.gfx_xcenter; currprefs.gfx_ycenter = changed_prefs.gfx_ycenter; - currprefs.gfx_filter_autoscale = changed_prefs.gfx_filter_autoscale; + currprefs.gf[0].gfx_filter_autoscale = changed_prefs.gf[0].gfx_filter_autoscale; get_custom_limits (NULL, NULL, NULL, NULL, NULL); fixup_prefs_dimensions (&changed_prefs); @@ -2500,10 +2510,10 @@ static void gfxmode_reset (void) { #ifdef GFXFILTER usedfilter = 0; - if (currprefs.gfx_filter > 0) { + if (currprefs.gf[picasso_on].gfx_filter > 0) { int i = 0; while (uaefilters[i].name) { - if (uaefilters[i].type == currprefs.gfx_filter) { + if (uaefilters[i].type == currprefs.gf[picasso_on].gfx_filter) { usedfilter = &uaefilters[i]; break; } @@ -4176,7 +4186,7 @@ static BOOL doInit (void) if (!screen_is_picasso) { - if (currprefs.gfx_api == 0 && currprefs.gfx_filter == 0) { + if (currprefs.gfx_api == 0 && currprefs.gf[0].gfx_filter == 0) { allocsoftbuffer (_T("draw"), &gfxvidinfo.drawbuffer, currentmode->flags, currentmode->native_width, currentmode->native_height, currentmode->current_depth); } else { @@ -4197,12 +4207,12 @@ static BOOL doInit (void) S2X_free (); oldtex_w = oldtex_h = -1; if (currentmode->flags & DM_D3D) { - const TCHAR *err = D3D_init (hAmigaWnd, currentmode->native_width, currentmode->native_height, currentmode->current_depth, ¤tmode->freq, screen_is_picasso ? 1 : currprefs.gfx_filter_filtermode + 1); + const TCHAR *err = D3D_init (hAmigaWnd, currentmode->native_width, currentmode->native_height, currentmode->current_depth, ¤tmode->freq, screen_is_picasso ? 1 : currprefs.gf[picasso_on].gfx_filter_filtermode + 1); if (err) { D3D_free (true); gui_message (err); changed_prefs.gfx_api = currprefs.gfx_api = 0; - changed_prefs.gfx_filter = currprefs.gfx_filter = 0; + changed_prefs.gf[picasso_on].gfx_filter = currprefs.gf[picasso_on].gfx_filter = 0; currentmode->current_depth = currentmode->native_depth; gfxmode_reset (); DirectDraw_Start (); diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index a0aefa2a..10a16b98 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -99,7 +99,7 @@ #define ARCHIVE_STRING _T("*.zip;*.7z;*.rar;*.lha;*.lzh;*.lzx") -#define DISK_FORMAT_STRING _T("(*.adf;*.adz;*.gz;*.dms;*.fdi;*.ipf;*.exe)\0*.adf;*.adz;*.gz;*.dms;*.fdi;*.ipf;*.exe;*.ima;*.wrp;*.dsq;*.st;") ARCHIVE_STRING _T("\0") +#define DISK_FORMAT_STRING _T("(*.adf;*.adz;*.gz;*.dms;*.ipf;*.scp;*.fdi;*.exe)\0*.adf;*.adz;*.gz;*.dms;*.ipf;*.scp;*.fdi;*.exe;*.ima;*.wrp;*.dsq;*.st;*.raw;") ARCHIVE_STRING _T("\0") #define ROM_FORMAT_STRING _T("(*.rom;*.roz)\0*.rom;*.roz;") ARCHIVE_STRING _T("\0") #define USS_FORMAT_STRING_RESTORE _T("(*.uss)\0*.uss;*.gz;") ARCHIVE_STRING _T("\0") #define USS_FORMAT_STRING_SAVE _T("(*.uss)\0*.uss\0") @@ -5955,6 +5955,8 @@ static void enable_for_displaydlg (HWND hDlg) ew (hDlg, IDC_LM_NORMAL, !workprefs.gfx_autoresolution); ew (hDlg, IDC_LM_DOUBLED, !workprefs.gfx_autoresolution); ew (hDlg, IDC_LM_SCANLINES, !workprefs.gfx_autoresolution); + ew (hDlg, IDC_LM_PDOUBLED2, !workprefs.gfx_autoresolution); + ew (hDlg, IDC_LM_PDOUBLED3, !workprefs.gfx_autoresolution); ew (hDlg, IDC_LM_INORMAL, !workprefs.gfx_autoresolution && !isdouble); ew (hDlg, IDC_LM_IDOUBLED, !workprefs.gfx_autoresolution && isdouble); @@ -6355,8 +6357,8 @@ static void values_to_displaydlg (HWND hDlg) v = workprefs.cpu_cycle_exact ? 1 : workprefs.gfx_framerate; SendDlgItemMessage (hDlg, IDC_FRAMERATE, TBM_SETPOS, TRUE, (int)v); - CheckRadioButton (hDlg, IDC_LM_NORMAL, IDC_LM_SCANLINES, IDC_LM_NORMAL + (workprefs.gfx_vresolution ? 1 : 0) + ((workprefs.gfx_scanlines & 1) ? 1 : 0)); - CheckRadioButton (hDlg, IDC_LM_INORMAL, IDC_LM_IDOUBLED3, IDC_LM_INORMAL + (workprefs.gfx_scanlines >= 2 ? workprefs.gfx_scanlines / 2 + 1: (workprefs.gfx_vresolution ? 1 : 0))); + CheckRadioButton (hDlg, IDC_LM_NORMAL, IDC_LM_PDOUBLED3, IDC_LM_NORMAL + (workprefs.gfx_vresolution ? 1 : 0) + workprefs.gfx_pscanlines); + CheckRadioButton (hDlg, IDC_LM_INORMAL, IDC_LM_IDOUBLED3, IDC_LM_INORMAL + (workprefs.gfx_iscanlines ? workprefs.gfx_iscanlines + 1 : (workprefs.gfx_vresolution ? 1 : 0))); SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE, CB_RESETCONTENT, 0, 0); SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_RESETCONTENT, 0, 0); @@ -6563,21 +6565,27 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l workprefs.gfx_blackerthanblack = ischecked (hDlg, IDC_BLACKER_THAN_BLACK); int vres = workprefs.gfx_vresolution; - int vscan = workprefs.gfx_scanlines; + int viscan = workprefs.gfx_iscanlines; + int vpscan = workprefs.gfx_pscanlines; - workprefs.gfx_vresolution = (ischecked (hDlg, IDC_LM_DOUBLED) || ischecked (hDlg, IDC_LM_SCANLINES)) ? VRES_DOUBLE : VRES_NONDOUBLE; - workprefs.gfx_scanlines = 0; + workprefs.gfx_vresolution = (ischecked (hDlg, IDC_LM_DOUBLED) || ischecked (hDlg, IDC_LM_SCANLINES) || ischecked (hDlg, IDC_LM_PDOUBLED2) || ischecked (hDlg, IDC_LM_PDOUBLED3)) ? VRES_DOUBLE : VRES_NONDOUBLE; + workprefs.gfx_iscanlines = 0; + workprefs.gfx_pscanlines = 0; if (workprefs.gfx_vresolution >= VRES_DOUBLE) { if (ischecked (hDlg, IDC_LM_IDOUBLED2)) - workprefs.gfx_scanlines = 2; + workprefs.gfx_iscanlines = 1; if (ischecked (hDlg, IDC_LM_IDOUBLED3)) - workprefs.gfx_scanlines = 4; + workprefs.gfx_iscanlines = 2; + if (ischecked (hDlg, IDC_LM_SCANLINES)) + workprefs.gfx_pscanlines = 1; + if (ischecked (hDlg, IDC_LM_PDOUBLED2)) + workprefs.gfx_pscanlines = 2; + if (ischecked (hDlg, IDC_LM_PDOUBLED3)) + workprefs.gfx_pscanlines = 3; } - workprefs.gfx_scanlines |= ischecked (hDlg, IDC_LM_SCANLINES) ? 1 : 0; - - if (vres != workprefs.gfx_vresolution || vscan != workprefs.gfx_scanlines) { - CheckRadioButton (hDlg, IDC_LM_NORMAL, IDC_LM_SCANLINES, IDC_LM_NORMAL + (workprefs.gfx_vresolution ? 1 : 0) + ((workprefs.gfx_scanlines & 1) ? 1 : 0)); - CheckRadioButton (hDlg, IDC_LM_INORMAL, IDC_LM_IDOUBLED3, IDC_LM_INORMAL + (workprefs.gfx_scanlines >= 2 ? workprefs.gfx_scanlines / 2 + 1: (workprefs.gfx_vresolution ? 1 : 0))); + if (vres != workprefs.gfx_vresolution || viscan != workprefs.gfx_iscanlines || vpscan != workprefs.gfx_pscanlines) { + CheckRadioButton (hDlg, IDC_LM_NORMAL, IDC_LM_PDOUBLED3, IDC_LM_NORMAL + (workprefs.gfx_vresolution ? 1 : 0) + workprefs.gfx_pscanlines); + CheckRadioButton (hDlg, IDC_LM_INORMAL, IDC_LM_IDOUBLED3, IDC_LM_INORMAL + (workprefs.gfx_iscanlines ? workprefs.gfx_iscanlines + 1: (workprefs.gfx_vresolution ? 1 : 0))); } workprefs.gfx_apmode[0].gfx_backbuffers = SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_GETCURSEL, 0, 0); @@ -11892,6 +11900,7 @@ static void enable_for_gameportsdlg (HWND hDlg) { int v = full_property_sheet; ew (hDlg, IDC_PORT_TABLET_FULL, v && is_tablet () && workprefs.input_tablet > 0); + //ew (hDlg, IDC_PORT_TABLET_LIBRARY, v && is_tablet () && workprefs.input_tablet > 0); ew (hDlg, IDC_PORT_TABLET_CURSOR, v && workprefs.input_tablet > 0); ew (hDlg, IDC_PORT_TABLET, v); } @@ -11954,6 +11963,7 @@ static void updatejoyport (HWND hDlg, int changedport) SendDlgItemMessage (hDlg, IDC_PORT_TABLET_CURSOR, CB_SETCURSEL, workprefs.input_magic_mouse_cursor, 0); CheckDlgButton (hDlg, IDC_PORT_TABLET, workprefs.input_tablet > 0); CheckDlgButton (hDlg, IDC_PORT_TABLET_FULL, workprefs.input_tablet == TABLET_REAL); + CheckDlgButton (hDlg, IDC_PORT_TABLET_LIBRARY, workprefs.tablet_library); if (joyxprevious[0] < 0) joyxprevious[0] = inputdevice_get_device_total (IDTYPE_JOYSTICK) + 1; @@ -12032,6 +12042,7 @@ static void values_from_gameportsdlg (HWND hDlg, int d, int changedport) if (ischecked (hDlg, IDC_PORT_TABLET_FULL)) workprefs.input_tablet = TABLET_REAL; } + workprefs.tablet_library = ischecked (hDlg, IDC_PORT_TABLET_LIBRARY); return; } @@ -14118,10 +14129,11 @@ static INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM static int scanlineratios[] = { 1,1,1,2,1,3, 2,1,2,2,2,3, 3,1,3,2,3,3, 0,0 }; static int scanlineindexes[100]; static int filterpreset_selected = -1, filterpreset_builtin = -1; +static int filter_nativertg; static void enable_for_hw3ddlg (HWND hDlg) { - int v = workprefs.gfx_filter ? TRUE : FALSE; + int v = workprefs.gf[filter_nativertg].gfx_filter ? TRUE : FALSE; int vv = FALSE, vv2 = FALSE, vv3 = FALSE; int as = FALSE; struct uae_filter *uf; @@ -14131,7 +14143,7 @@ static void enable_for_hw3ddlg (HWND hDlg) uf = &uaefilters[0]; i = 0; while (uaefilters[i].name) { - if (workprefs.gfx_filter == uaefilters[i].type) { + if (workprefs.gf[filter_nativertg].gfx_filter == uaefilters[i].type) { uf = &uaefilters[i]; isfilter = 1; break; @@ -14145,6 +14157,9 @@ static void enable_for_hw3ddlg (HWND hDlg) if (workprefs.gfx_api) v = vv = vv2 = vv3 = TRUE; + if (filter_nativertg) + v = FALSE; + ew (hDlg, IDC_FILTERHZ, v); ew (hDlg, IDC_FILTERVZ, v); ew (hDlg, IDC_FILTERHZMULT, v && !as); @@ -14155,13 +14170,12 @@ static void enable_for_hw3ddlg (HWND hDlg) ew (hDlg, IDC_FILTERXL, vv2); ew (hDlg, IDC_FILTERXLV, vv2); ew (hDlg, IDC_FILTERXTRA, vv2); - ew (hDlg, IDC_FILTERDEFAULT, v); ew (hDlg, IDC_FILTERFILTER, workprefs.gfx_api); ew (hDlg, IDC_FILTERSTACK, workprefs.gfx_api); ew (hDlg, IDC_FILTERKEEPASPECT, v); ew (hDlg, IDC_FILTERASPECT, v); - ew (hDlg, IDC_FILTERASPECT2, v && workprefs.gfx_filter_keep_aspect); - ew (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, (workprefs.gfx_filter_autoscale == AUTOSCALE_NORMAL || workprefs.gfx_filter_autoscale == AUTOSCALE_INTEGER_AUTOSCALE)); + ew (hDlg, IDC_FILTERASPECT2, v && workprefs.gf[filter_nativertg].gfx_filter_keep_aspect); + ew (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, (workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_NORMAL || workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_INTEGER_AUTOSCALE)); ew (hDlg, IDC_FILTEROVERLAY, workprefs.gfx_api); ew (hDlg, IDC_FILTEROVERLAYTYPE, workprefs.gfx_api); @@ -14175,8 +14189,8 @@ static TCHAR *filtermultnames[] = { }; static float filtermults[] = { 0, 0.25f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.0f, 3.5f, 4.0f, 6.0f, 8.0f }; struct filterxtra { - TCHAR *label; - int *varw, *varc; + const TCHAR *label; + int *varw[2], *varc[2]; int min, max, step; }; static struct filterxtra *filter_extra[4], *filter_selected; @@ -14184,20 +14198,20 @@ static int filter_selected_num; static struct filterxtra filter_pal_extra[] = { - _T("Brightness"), &workprefs.gfx_filter_luminance, &currprefs.gfx_filter_luminance, -1000, 1000, 10, - _T("Contrast"), &workprefs.gfx_filter_contrast, &currprefs.gfx_filter_contrast, -1000, 1000, 10, - _T("Saturation"), &workprefs.gfx_filter_saturation, &currprefs.gfx_filter_saturation, -1000, 1000, 10, - _T("Gamma"), &workprefs.gfx_gamma, &currprefs.gfx_gamma, -1000, 1000, 10, - _T("Scanlines"), &workprefs.gfx_filter_scanlines, &currprefs.gfx_filter_scanlines, 0, 100, 1, - _T("Blurriness"), &workprefs.gfx_filter_blur, &currprefs.gfx_filter_blur,0, 2000, 10, - _T("Noise"), &workprefs.gfx_filter_noise, &currprefs.gfx_filter_noise,0, 100, 10, + _T("Brightness"), &workprefs.gf[0].gfx_filter_luminance, NULL, &currprefs.gf[0].gfx_filter_luminance, NULL, -1000, 1000, 10, + _T("Contrast"), &workprefs.gf[0].gfx_filter_contrast, NULL, &currprefs.gf[0].gfx_filter_contrast, NULL, -1000, 1000, 10, + _T("Saturation"), &workprefs.gf[0].gfx_filter_saturation, NULL, &currprefs.gf[0].gfx_filter_saturation, NULL, -1000, 1000, 10, + _T("Gamma"), &workprefs.gfx_gamma, NULL, &currprefs.gfx_gamma, NULL, -1000, 1000, 10, + _T("Scanlines"), &workprefs.gf[0].gfx_filter_scanlines, NULL, &currprefs.gf[0].gfx_filter_scanlines, NULL, 0, 100, 1, + _T("Blurriness"), &workprefs.gf[0].gfx_filter_blur, NULL, &currprefs.gf[0].gfx_filter_blur, NULL, 0, 2000, 10, + _T("Noise"), &workprefs.gf[0].gfx_filter_noise, NULL, &currprefs.gf[0].gfx_filter_noise, NULL, 0, 100, 10, NULL }; static struct filterxtra filter_3d_extra[] = { - _T("Point/Bilinear"), &workprefs.gfx_filter_bilinear, &currprefs.gfx_filter_bilinear, 0, 1, 1, - _T("Scanline opacity"), &workprefs.gfx_filter_scanlines, &currprefs.gfx_filter_scanlines, 0, 100, 10, - _T("Scanline level"), &workprefs.gfx_filter_scanlinelevel, &currprefs.gfx_filter_scanlinelevel, 0, 100, 10, + _T("Point/Bilinear"), &workprefs.gf[0].gfx_filter_bilinear, &workprefs.gf[1].gfx_filter_bilinear, &currprefs.gf[0].gfx_filter_bilinear, &currprefs.gf[1].gfx_filter_bilinear, 0, 1, 1, + _T("Scanline opacity"), &workprefs.gf[0].gfx_filter_scanlines, &workprefs.gf[1].gfx_filter_scanlines, &currprefs.gf[0].gfx_filter_scanlines, &currprefs.gf[1].gfx_filter_scanlines, 0, 100, 10, + _T("Scanline level"), &workprefs.gf[0].gfx_filter_scanlinelevel, &workprefs.gf[1].gfx_filter_scanlinelevel, &currprefs.gf[0].gfx_filter_scanlinelevel, &currprefs.gf[1].gfx_filter_scanlinelevel, 0, 100, 10, NULL }; static int dummy_in, dummy_out; @@ -14216,31 +14230,31 @@ static int filtertypes[] = { -1 }; static void *filtervars[] = { - &workprefs.gfx_filter, &workprefs.gfx_filter_filtermode, - &workprefs.gfx_filter_vert_zoom, &workprefs.gfx_filter_horiz_zoom, - &workprefs.gfx_filter_vert_zoom_mult, &workprefs.gfx_filter_horiz_zoom_mult, - &workprefs.gfx_filter_vert_offset, &workprefs.gfx_filter_horiz_offset, - &workprefs.gfx_filter_scanlines, &workprefs.gfx_filter_scanlinelevel, &workprefs.gfx_filter_scanlineratio, - &workprefs.gfx_resolution, &workprefs.gfx_vresolution, &workprefs.gfx_scanlines, + &workprefs.gf[0].gfx_filter, &workprefs.gf[0].gfx_filter_filtermode, + &workprefs.gf[0].gfx_filter_vert_zoom, &workprefs.gf[0].gfx_filter_horiz_zoom, + &workprefs.gf[0].gfx_filter_vert_zoom_mult, &workprefs.gf[0].gfx_filter_horiz_zoom_mult, + &workprefs.gf[0].gfx_filter_vert_offset, &workprefs.gf[0].gfx_filter_horiz_offset, + &workprefs.gf[0].gfx_filter_scanlines, &workprefs.gf[0].gfx_filter_scanlinelevel, &workprefs.gf[0].gfx_filter_scanlineratio, + &workprefs.gfx_resolution, &workprefs.gfx_vresolution, &workprefs.gfx_iscanlines, &workprefs.gfx_xcenter, &workprefs.gfx_ycenter, - &workprefs.gfx_filter_luminance, &workprefs.gfx_filter_contrast, &workprefs.gfx_filter_saturation, - &workprefs.gfx_filter_gamma, &workprefs.gfx_filter_blur, &workprefs.gfx_filter_noise, - &workprefs.gfx_filter_keep_aspect, &workprefs.gfx_filter_aspect, - &workprefs.gfx_filter_autoscale, &workprefs.gfx_filter_bilinear, + &workprefs.gf[0].gfx_filter_luminance, &workprefs.gf[0].gfx_filter_contrast, &workprefs.gf[0].gfx_filter_saturation, + &workprefs.gf[0].gfx_filter_gamma, &workprefs.gf[0].gfx_filter_blur, &workprefs.gf[0].gfx_filter_noise, + &workprefs.gf[0].gfx_filter_keep_aspect, &workprefs.gf[0].gfx_filter_aspect, + &workprefs.gf[0].gfx_filter_autoscale, &workprefs.gf[0].gfx_filter_bilinear, NULL }; static void *filtervars2[] = { - NULL, &currprefs.gfx_filter_filtermode, - &currprefs.gfx_filter_vert_zoom, &currprefs.gfx_filter_horiz_zoom, - &currprefs.gfx_filter_vert_zoom_mult, &currprefs.gfx_filter_horiz_zoom_mult, - &currprefs.gfx_filter_vert_offset, &currprefs.gfx_filter_horiz_offset, - &currprefs.gfx_filter_scanlines, &currprefs.gfx_filter_scanlinelevel, &currprefs.gfx_filter_scanlineratio, - &currprefs.gfx_resolution, &currprefs.gfx_vresolution, &currprefs.gfx_scanlines, + NULL, &currprefs.gf[0].gfx_filter_filtermode, + &currprefs.gf[0].gfx_filter_vert_zoom, &currprefs.gf[0].gfx_filter_horiz_zoom, + &currprefs.gf[0].gfx_filter_vert_zoom_mult, &currprefs.gf[0].gfx_filter_horiz_zoom_mult, + &currprefs.gf[0].gfx_filter_vert_offset, &currprefs.gf[0].gfx_filter_horiz_offset, + &currprefs.gf[0].gfx_filter_scanlines, &currprefs.gf[0].gfx_filter_scanlinelevel, &currprefs.gf[0].gfx_filter_scanlineratio, + &currprefs.gfx_resolution, &currprefs.gfx_vresolution, &currprefs.gfx_iscanlines, &currprefs.gfx_xcenter, &currprefs.gfx_ycenter, - &currprefs.gfx_filter_luminance, &currprefs.gfx_filter_contrast, &currprefs.gfx_filter_saturation, - &currprefs.gfx_filter_gamma, &currprefs.gfx_filter_blur, &currprefs.gfx_filter_noise, - &currprefs.gfx_filter_keep_aspect, &currprefs.gfx_filter_aspect, - &currprefs.gfx_filter_autoscale, &currprefs.gfx_filter_bilinear, + &currprefs.gf[0].gfx_filter_luminance, &currprefs.gf[0].gfx_filter_contrast, &currprefs.gf[0].gfx_filter_saturation, + &currprefs.gf[0].gfx_filter_gamma, &currprefs.gf[0].gfx_filter_blur, &currprefs.gf[0].gfx_filter_noise, + &currprefs.gf[0].gfx_filter_keep_aspect, &currprefs.gf[0].gfx_filter_aspect, + &currprefs.gf[0].gfx_filter_autoscale, &currprefs.gf[0].gfx_filter_bilinear, NULL }; @@ -14298,8 +14312,8 @@ static void setfiltermult2 (HWND hDlg, int id, float val) static void setfiltermult (HWND hDlg) { - setfiltermult2 (hDlg, IDC_FILTERHZMULT, workprefs.gfx_filter_horiz_zoom_mult); - setfiltermult2 (hDlg, IDC_FILTERVZMULT, workprefs.gfx_filter_vert_zoom_mult); + setfiltermult2 (hDlg, IDC_FILTERHZMULT, workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom_mult); + setfiltermult2 (hDlg, IDC_FILTERVZMULT, workprefs.gf[filter_nativertg].gfx_filter_vert_zoom_mult); } static void values_to_hw3ddlg (HWND hDlg) @@ -14311,15 +14325,15 @@ static void values_to_hw3ddlg (HWND hDlg) UAEREG *fkey; SendDlgItemMessage (hDlg, IDC_FILTERASPECT, CB_SETCURSEL, - (workprefs.gfx_filter_aspect == 0) ? 0 : - (workprefs.gfx_filter_aspect < 0) ? 1 : - getaspectratioindex (workprefs.gfx_filter_aspect) + 2, 0); + (workprefs.gf[filter_nativertg].gfx_filter_aspect == 0) ? 0 : + (workprefs.gf[filter_nativertg].gfx_filter_aspect < 0) ? 1 : + getaspectratioindex (workprefs.gf[filter_nativertg].gfx_filter_aspect) + 2, 0); - CheckDlgButton (hDlg, IDC_FILTERKEEPASPECT, workprefs.gfx_filter_keep_aspect); - CheckDlgButton (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, workprefs.gfx_filter_keep_autoscale_aspect != 0); + CheckDlgButton (hDlg, IDC_FILTERKEEPASPECT, workprefs.gf[filter_nativertg].gfx_filter_keep_aspect); + CheckDlgButton (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT, workprefs.gf[filter_nativertg].gfx_filter_keep_autoscale_aspect != 0); SendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_SETCURSEL, - workprefs.gfx_filter_keep_aspect, 0); + workprefs.gf[filter_nativertg].gfx_filter_keep_aspect, 0); SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_RESETCONTENT, 0, 0L); WIN32GUI_LoadUIString (IDS_AUTOSCALE_DISABLED, txt, sizeof (txt) / sizeof (TCHAR)); @@ -14342,16 +14356,16 @@ static void values_to_hw3ddlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt); WIN32GUI_LoadUIString (IDS_AUTOSCALE_INTEGER_AUTOSCALE, txt, sizeof (txt) / sizeof (TCHAR)); SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt); - SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_SETCURSEL, workprefs.gfx_filter_autoscale, 0); + SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_autoscale, 0); SendDlgItemMessage (hDlg, IDC_FILTERSTACK, CB_RESETCONTENT, 0, 0); for (i = -MAX_FILTERSHADERS; i < MAX_FILTERSHADERS; i++) { j = i < 0 ? i : i + 1; if (i == 0) { - _stprintf (tmp, _T("%d%s"), 0, workprefs.gfx_filtershader[2 * MAX_FILTERSHADERS][0] ? _T(" *") : _T("")); + _stprintf (tmp, _T("%d%s"), 0, workprefs.gf[filter_nativertg].gfx_filtershader[2 * MAX_FILTERSHADERS][0] ? _T(" *") : _T("")); SendDlgItemMessage (hDlg, IDC_FILTERSTACK, CB_ADDSTRING, 0, (LPARAM)tmp); } - _stprintf (tmp, _T("%d%s"), j, workprefs.gfx_filtershader[i + 4][0] ? _T(" *") : _T("")); + _stprintf (tmp, _T("%d%s"), j, workprefs.gf[filter_nativertg].gfx_filtershader[i + 4][0] ? _T(" *") : _T("")); SendDlgItemMessage (hDlg, IDC_FILTERSTACK, CB_ADDSTRING, 0, (LPARAM)tmp); } @@ -14362,8 +14376,8 @@ static void values_to_hw3ddlg (HWND hDlg) i++; SendDlgItemMessage (hDlg, IDC_FILTERSTACK, CB_SETCURSEL, i, 0); - int range1 = workprefs.gfx_filter_autoscale == AUTOSCALE_MANUAL ? -1 : -9999; - int range2 = workprefs.gfx_filter_autoscale == AUTOSCALE_MANUAL ? 1800 : 9999; + int range1 = workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL ? -1 : -9999; + int range2 = workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL ? 1800 : 9999; SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (range1, range2)); SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPAGESIZE, 0, 1); @@ -14375,6 +14389,9 @@ static void values_to_hw3ddlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_FILTERVO, TBM_SETPAGESIZE, 0, 1); SendDlgItemMessage (hDlg, IDC_FILTEROVERLAY, CB_RESETCONTENT, 0, 0L); + + SendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_SETCURSEL, filter_nativertg, 0); + SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_RESETCONTENT, 0, 0L); WIN32GUI_LoadUIString (IDS_NONE, tmp, MAX_DPATH); SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp); @@ -14382,8 +14399,12 @@ static void values_to_hw3ddlg (HWND hDlg) fltnum = 0; i = 0; j = 1; while (uaefilters[i].name) { + if (filter_nativertg && uaefilters[i].type > 1) { + i++; + continue; + } SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)uaefilters[i].name); - if (uaefilters[i].type == workprefs.gfx_filter) { + if (uaefilters[i].type == workprefs.gf[filter_nativertg].gfx_filter) { uf = &uaefilters[i]; fltnum = j; } @@ -14404,7 +14425,7 @@ static void values_to_hw3ddlg (HWND hDlg) _stprintf (tmp2, _T("D3D: %s"), wfd.cFileName); tmp2[_tcslen (tmp2) - 3] = 0; SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp2); - if (workprefs.gfx_api && !_tcscmp (workprefs.gfx_filtershader[filterstackpos], wfd.cFileName)) { + if (workprefs.gfx_api && !_tcscmp (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], wfd.cFileName)) { fltnum = j; gotit = true; } @@ -14416,7 +14437,7 @@ static void values_to_hw3ddlg (HWND hDlg) } } for (int i = 1; i < 2 * MAX_FILTERSHADERS; i++) { - if (workprefs.gfx_filtershader[i][0] && !gotit) + if (workprefs.gf[filter_nativertg].gfx_filtershader[i][0] && !gotit) fltnum = UAE_FILTER_NULL; } } @@ -14439,7 +14460,7 @@ static void values_to_hw3ddlg (HWND hDlg) !_tcsicmp (ext, _T(".bmp")))) { SendDlgItemMessage (hDlg, IDC_FILTEROVERLAY, CB_ADDSTRING, 0, (LPARAM)wfd.cFileName); - if (!_tcsicmp (wfd.cFileName, overlaytype == 0 ? workprefs.gfx_filteroverlay : workprefs.gfx_filtermask[filterstackpos])) + if (!_tcsicmp (wfd.cFileName, overlaytype == 0 ? workprefs.gf[filter_nativertg].gfx_filteroverlay : workprefs.gf[filter_nativertg].gfx_filtermask[filterstackpos])) SendDlgItemMessage (hDlg, IDC_FILTEROVERLAY, CB_SETCURSEL, j, 0); j++; @@ -14508,12 +14529,14 @@ static void values_to_hw3ddlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_FILTERXTRA, CB_SETCURSEL, filter_selected_num, 0); SendDlgItemMessage (hDlg, IDC_FILTERXL, TBM_SETRANGE, TRUE, MAKELONG (filter_selected->min, filter_selected->max)); SendDlgItemMessage (hDlg, IDC_FILTERXL, TBM_SETPAGESIZE, 0, filter_selected->step); - SendDlgItemMessage (hDlg, IDC_FILTERXL, TBM_SETPOS, TRUE, *(filter_selected->varw)); - SetDlgItemInt (hDlg, IDC_FILTERXLV, *(filter_selected->varw), TRUE); + if (filter_selected->varw[filter_nativertg]) { + SendDlgItemMessage (hDlg, IDC_FILTERXL, TBM_SETPOS, TRUE, *(filter_selected->varw[filter_nativertg])); + SetDlgItemInt (hDlg, IDC_FILTERXLV, *(filter_selected->varw[filter_nativertg]), TRUE); + } } - if (workprefs.gfx_filter_filtermode >= filtermodenum) - workprefs.gfx_filter_filtermode = 0; - SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_SETCURSEL, workprefs.gfx_filter_filtermode, 0); + if (workprefs.gf[filter_nativertg].gfx_filter_filtermode >= filtermodenum) + workprefs.gf[filter_nativertg].gfx_filter_filtermode = 0; + SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_SETCURSEL, workprefs.gf[filter_nativertg].gfx_filter_filtermode, 0); setfiltermult (hDlg); SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_RESETCONTENT, 0, 0L); @@ -14521,7 +14544,7 @@ static void values_to_hw3ddlg (HWND hDlg) while (scanlineratios[i * 2]) { int sl = scanlineratios[i * 2] * 16 + scanlineratios[i * 2 + 1]; _stprintf (txt, _T("%d:%d"), scanlineratios[i * 2], scanlineratios[i * 2 + 1]); - if (workprefs.gfx_filter_scanlineratio == sl) + if (workprefs.gf[filter_nativertg].gfx_filter_scanlineratio == sl) j = i; SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_ADDSTRING, 0, (LPARAM)txt); scanlineindexes[i] = sl; @@ -14556,16 +14579,16 @@ static void values_to_hw3ddlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_SETCURSEL, filterpreset_selected, 0); float ho, vo, hz, vz; - if (workprefs.gfx_filter_autoscale == AUTOSCALE_MANUAL) { + if (workprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL) { hz = workprefs.gfx_xcenter_size; vz = workprefs.gfx_ycenter_size; ho = workprefs.gfx_xcenter_pos; vo = workprefs.gfx_ycenter_pos; } else { - hz = workprefs.gfx_filter_horiz_zoom; - vz = workprefs.gfx_filter_vert_zoom; - ho = workprefs.gfx_filter_horiz_offset; - vo = workprefs.gfx_filter_vert_offset; + hz = workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom; + vz = workprefs.gf[filter_nativertg].gfx_filter_vert_zoom; + ho = workprefs.gf[filter_nativertg].gfx_filter_horiz_offset; + vo = workprefs.gf[filter_nativertg].gfx_filter_vert_offset; } SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, (int)hz); @@ -14697,41 +14720,41 @@ static void filter_handle (HWND hDlg) LRESULT item = SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_GETCURSEL, 0, 0L); if (item != CB_ERR) { TCHAR tmp[MAX_DPATH], oldsh[MAX_DPATH]; - int of = workprefs.gfx_filter; - int off = workprefs.gfx_filter_filtermode; + int of = workprefs.gf[filter_nativertg].gfx_filter; + int off = workprefs.gf[filter_nativertg].gfx_filter_filtermode; tmp[0] = 0; - _tcscpy (oldsh, workprefs.gfx_filtershader[filterstackpos]); + _tcscpy (oldsh, workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos]); SendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_GETLBTEXT, (WPARAM)item, (LPARAM)tmp); - workprefs.gfx_filtershader[filterstackpos][0] = 0; - workprefs.gfx_filter = 0; - workprefs.gfx_filter_filtermode = 0; + workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos][0] = 0; + workprefs.gf[filter_nativertg].gfx_filter = 0; + workprefs.gf[filter_nativertg].gfx_filter_filtermode = 0; if (workprefs.gfx_api) { LRESULT item2 = SendDlgItemMessage (hDlg, IDC_FILTERFILTER, CB_GETCURSEL, 0, 0L); if (item2 != CB_ERR) - workprefs.gfx_filter_filtermode = (int)item2; + workprefs.gf[filter_nativertg].gfx_filter_filtermode = (int)item2; } if (item > 0) { if (item > UAE_FILTER_LAST) { - _stprintf (workprefs.gfx_filtershader[filterstackpos], _T("%s.fx"), tmp + 5); + _stprintf (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], _T("%s.fx"), tmp + 5); } else { item--; - workprefs.gfx_filter = uaefilters[item].type; + workprefs.gf[filter_nativertg].gfx_filter = uaefilters[item].type; } - if (of != workprefs.gfx_filter || off != workprefs.gfx_filter_filtermode) { + if (of != workprefs.gf[filter_nativertg].gfx_filter || off != workprefs.gf[filter_nativertg].gfx_filter_filtermode) { values_to_hw3ddlg (hDlg); hw3d_changed = 1; } } for (int i = 1; i < MAX_FILTERSHADERS; i++) { - if (workprefs.gfx_filtershader[i][0]) - workprefs.gfx_filter = UAE_FILTER_NULL; + if (workprefs.gf[filter_nativertg].gfx_filtershader[i][0]) + workprefs.gf[filter_nativertg].gfx_filter = UAE_FILTER_NULL; } - if (workprefs.gfx_filter == 0 && !workprefs.gfx_api) - workprefs.gfx_filter_autoscale = 0; + if (workprefs.gf[filter_nativertg].gfx_filter == 0 && !workprefs.gfx_api) + workprefs.gf[filter_nativertg].gfx_filter_autoscale = 0; } int overlaytype = SendDlgItemMessage (hDlg, IDC_FILTEROVERLAYTYPE, CB_GETCURSEL, 0, 0L); - TCHAR *filterptr = overlaytype == 0 ? workprefs.gfx_filteroverlay : workprefs.gfx_filtermask[filterstackpos]; + TCHAR *filterptr = overlaytype == 0 ? workprefs.gf[filter_nativertg].gfx_filteroverlay : workprefs.gf[filter_nativertg].gfx_filtermask[filterstackpos]; item = SendDlgItemMessage (hDlg, IDC_FILTEROVERLAY, CB_GETCURSEL, 0, 0L); if (item != CB_ERR) { TCHAR tmp[MAX_DPATH]; @@ -14775,6 +14798,10 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("VGA")); SendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_ADDSTRING, 0, (LPARAM)_T("TV")); + SendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_RESETCONTENT, 0, 0L); + SendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_ADDSTRING, 0, (LPARAM)_T("Native")); + SendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_ADDSTRING, 0, (LPARAM)_T("RTG")); + SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_RESETCONTENT, 0, 0L); SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_RESETCONTENT, 0, 0L); for (i = 0; filtermultnames[i]; i++) { @@ -14788,7 +14815,7 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM WIN32GUI_LoadUIString (IDS_FILTEROVERLAYTYPE_MASKS, tmp, sizeof tmp / sizeof (TCHAR)); SendDlgItemMessage (hDlg, IDC_FILTEROVERLAYTYPE, CB_ADDSTRING, 0, (LPARAM)tmp); if (filteroverlaypos < 0) { - if (!workprefs.gfx_filteroverlay[0]) + if (!workprefs.gf[filter_nativertg].gfx_filteroverlay[0]) filteroverlaypos = 1; else filteroverlaypos = 0; @@ -14812,12 +14839,12 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM switch (wParam) { case IDC_FILTERDEFAULT: - currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = 0; - currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = 0; - currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = 0; - currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = 0; - currprefs.gfx_filter_horiz_zoom_mult = workprefs.gfx_filter_horiz_zoom_mult = 1.0; - currprefs.gfx_filter_vert_zoom_mult = workprefs.gfx_filter_vert_zoom_mult = 1.0; + currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom = workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom = 0; + currprefs.gf[filter_nativertg].gfx_filter_vert_zoom = workprefs.gf[filter_nativertg].gfx_filter_vert_zoom = 0; + currprefs.gf[filter_nativertg].gfx_filter_horiz_offset = workprefs.gf[filter_nativertg].gfx_filter_horiz_offset = 0; + currprefs.gf[filter_nativertg].gfx_filter_vert_offset = workprefs.gf[filter_nativertg].gfx_filter_vert_offset = 0; + currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom_mult = workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom_mult = 1.0; + currprefs.gf[filter_nativertg].gfx_filter_vert_zoom_mult = workprefs.gf[filter_nativertg].gfx_filter_vert_zoom_mult = 1.0; values_to_hw3ddlg (hDlg); updatedisplayarea (); break; @@ -14831,16 +14858,16 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM case IDC_FILTERKEEPASPECT: { if (ischecked (hDlg, IDC_FILTERKEEPASPECT)) - currprefs.gfx_filter_keep_aspect = workprefs.gfx_filter_keep_aspect = 1; + currprefs.gf[filter_nativertg].gfx_filter_keep_aspect = workprefs.gf[filter_nativertg].gfx_filter_keep_aspect = 1; else - currprefs.gfx_filter_keep_aspect = workprefs.gfx_filter_keep_aspect = 0; + currprefs.gf[filter_nativertg].gfx_filter_keep_aspect = workprefs.gf[filter_nativertg].gfx_filter_keep_aspect = 0; enable_for_hw3ddlg (hDlg); values_to_hw3ddlg (hDlg); updatedisplayarea (); } case IDC_FILTERKEEPAUTOSCALEASPECT: { - workprefs.gfx_filter_keep_autoscale_aspect = currprefs.gfx_filter_keep_autoscale_aspect = ischecked (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT) ? 1 : 0; + workprefs.gf[filter_nativertg].gfx_filter_keep_autoscale_aspect = currprefs.gf[filter_nativertg].gfx_filter_keep_autoscale_aspect = ischecked (hDlg, IDC_FILTERKEEPAUTOSCALEASPECT) ? 1 : 0; enable_for_hw3ddlg (hDlg); values_to_hw3ddlg (hDlg); updatedisplayarea (); @@ -14850,6 +14877,14 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS) { switch (LOWORD (wParam)) { + case IDC_FILTER_NATIVERTG: + item = SendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_GETCURSEL, 0, 0L); + if (item != CB_ERR) { + filter_nativertg = item; + values_to_hw3ddlg (hDlg); + enable_for_hw3ddlg (hDlg); + } + break; case IDC_FILTERSTACK: item = SendDlgItemMessage (hDlg, IDC_FILTERSTACK, CB_GETCURSEL, 0, 0L); if (item != CB_ERR) { @@ -14866,9 +14901,9 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM case IDC_FILTERAUTOSCALE: item = SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_GETCURSEL, 0, 0L); if (item != CB_ERR) { - workprefs.gfx_filter_autoscale = item; - if (workprefs.gfx_filter_autoscale && workprefs.gfx_filter == 0 && !workprefs.gfx_api) - workprefs.gfx_filter = 1; // NULL + workprefs.gf[filter_nativertg].gfx_filter_autoscale = item; + if (workprefs.gf[filter_nativertg].gfx_filter_autoscale && workprefs.gf[filter_nativertg].gfx_filter == 0 && !workprefs.gfx_api) + workprefs.gf[filter_nativertg].gfx_filter = 1; // NULL values_to_hw3ddlg (hDlg); enable_for_hw3ddlg (hDlg); } @@ -14882,7 +14917,7 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM case IDC_FILTERSLR: item = SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_GETCURSEL, 0, 0L); if (item != CB_ERR) { - currprefs.gfx_filter_scanlineratio = workprefs.gfx_filter_scanlineratio = scanlineindexes[item]; + currprefs.gf[filter_nativertg].gfx_filter_scanlineratio = workprefs.gf[filter_nativertg].gfx_filter_scanlineratio = scanlineindexes[item]; updatedisplayarea (); } break; @@ -14900,11 +14935,11 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM values_to_hw3ddlg (hDlg); break; case IDC_FILTERHZMULT: - currprefs.gfx_filter_horiz_zoom_mult = workprefs.gfx_filter_horiz_zoom_mult = getfiltermult (hDlg, IDC_FILTERHZMULT); + currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom_mult = workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom_mult = getfiltermult (hDlg, IDC_FILTERHZMULT); updatedisplayarea (); break; case IDC_FILTERVZMULT: - currprefs.gfx_filter_vert_zoom_mult = workprefs.gfx_filter_vert_zoom_mult = getfiltermult (hDlg, IDC_FILTERVZMULT); + currprefs.gf[filter_nativertg].gfx_filter_vert_zoom_mult = workprefs.gf[filter_nativertg].gfx_filter_vert_zoom_mult = getfiltermult (hDlg, IDC_FILTERVZMULT); updatedisplayarea (); break; case IDC_FILTERASPECT: @@ -14919,7 +14954,7 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM else if (v >= 2) v2 = getaspectratio (v - 2); } - currprefs.gfx_filter_aspect = workprefs.gfx_filter_aspect = v2; + currprefs.gf[filter_nativertg].gfx_filter_aspect = workprefs.gf[filter_nativertg].gfx_filter_aspect = v2; updatedisplayarea (); } break; @@ -14927,7 +14962,7 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM { int v = SendDlgItemMessage (hDlg, IDC_FILTERASPECT2, CB_GETCURSEL, 0, 0L); if (v != CB_ERR) - currprefs.gfx_filter_keep_aspect = workprefs.gfx_filter_keep_aspect = v; + currprefs.gf[filter_nativertg].gfx_filter_keep_aspect = workprefs.gf[filter_nativertg].gfx_filter_keep_aspect = v; updatedisplayarea (); } break; @@ -14947,7 +14982,7 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM if (recursive) break; recursive++; - if (currprefs.gfx_filter_autoscale == AUTOSCALE_MANUAL) { + if (currprefs.gf[filter_nativertg].gfx_filter_autoscale == AUTOSCALE_MANUAL) { currprefs.gfx_xcenter_size = workprefs.gfx_xcenter_size = (int)SendMessage (hz, TBM_GETPOS, 0, 0); currprefs.gfx_ycenter_size = workprefs.gfx_ycenter_size = (int)SendMessage (vz, TBM_GETPOS, 0, 0); currprefs.gfx_xcenter_pos = workprefs.gfx_xcenter_pos = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0); @@ -14958,28 +14993,28 @@ static INT_PTR CALLBACK hw3dDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_ycenter_size, TRUE); } else { if (h == hz) { - currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = (int)SendMessage (hz, TBM_GETPOS, 0, 0); - if (workprefs.gfx_filter_keep_aspect) { - currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = currprefs.gfx_filter_horiz_zoom; - SendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_zoom); + currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom = workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom = (int)SendMessage (hz, TBM_GETPOS, 0, 0); + if (workprefs.gf[filter_nativertg].gfx_filter_keep_aspect) { + currprefs.gf[filter_nativertg].gfx_filter_vert_zoom = workprefs.gf[filter_nativertg].gfx_filter_vert_zoom = currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom; + SendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, workprefs.gf[filter_nativertg].gfx_filter_vert_zoom); } } else if (h == vz) { - currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = (int)SendMessage (vz, TBM_GETPOS, 0, 0); - if (workprefs.gfx_filter_keep_aspect) { - currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = currprefs.gfx_filter_vert_zoom; - SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom); + currprefs.gf[filter_nativertg].gfx_filter_vert_zoom = workprefs.gf[filter_nativertg].gfx_filter_vert_zoom = (int)SendMessage (vz, TBM_GETPOS, 0, 0); + if (workprefs.gf[filter_nativertg].gfx_filter_keep_aspect) { + currprefs.gf[filter_nativertg].gfx_filter_horiz_zoom = workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom = currprefs.gf[filter_nativertg].gfx_filter_vert_zoom; + SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom); } } - currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0); - currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0); - SetDlgItemInt (hDlg, IDC_FILTERHOV, (int)workprefs.gfx_filter_horiz_offset, TRUE); - SetDlgItemInt (hDlg, IDC_FILTERVOV, (int)workprefs.gfx_filter_vert_offset, TRUE); - SetDlgItemInt (hDlg, IDC_FILTERHZV, (int)workprefs.gfx_filter_horiz_zoom, TRUE); - SetDlgItemInt (hDlg, IDC_FILTERVZV, (int)workprefs.gfx_filter_vert_zoom, TRUE); + currprefs.gf[filter_nativertg].gfx_filter_horiz_offset = workprefs.gf[filter_nativertg].gfx_filter_horiz_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0); + currprefs.gf[filter_nativertg].gfx_filter_vert_offset = workprefs.gf[filter_nativertg].gfx_filter_vert_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0); + SetDlgItemInt (hDlg, IDC_FILTERHOV, (int)workprefs.gf[filter_nativertg].gfx_filter_horiz_offset, TRUE); + SetDlgItemInt (hDlg, IDC_FILTERVOV, (int)workprefs.gf[filter_nativertg].gfx_filter_vert_offset, TRUE); + SetDlgItemInt (hDlg, IDC_FILTERHZV, (int)workprefs.gf[filter_nativertg].gfx_filter_horiz_zoom, TRUE); + SetDlgItemInt (hDlg, IDC_FILTERVZV, (int)workprefs.gf[filter_nativertg].gfx_filter_vert_zoom, TRUE); } - if (filter_selected) { - int *pw = filter_selected->varw; - int *pc = filter_selected->varc; + if (filter_selected && filter_selected->varw[filter_nativertg]) { + int *pw = filter_selected->varw[filter_nativertg]; + int *pc = filter_selected->varc[filter_nativertg]; int v = (int)SendMessage (GetDlgItem(hDlg, IDC_FILTERXL), TBM_GETPOS, 0, 0); if (v < filter_selected->min) v = filter_selected->min; diff --git a/od-win32/winuae_msvc11/winuae_msvc.vcxproj b/od-win32/winuae_msvc11/winuae_msvc.vcxproj index fc63af25..f79baaab 100644 --- a/od-win32/winuae_msvc11/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc11/winuae_msvc.vcxproj @@ -803,6 +803,7 @@ + @@ -824,6 +825,7 @@ + diff --git a/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters index facaac5b..c9881f22 100644 --- a/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc11/winuae_msvc.vcxproj.filters @@ -637,6 +637,12 @@ common + + common + + + common + diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 1cd3737a..01fc342c 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,16 +1,45 @@ 1 -> 0 (-) : 0,1FE,1FE,1FE,.. 1 -> 1 (D) : 0,1FE,0,1FE,0,.. -1 -> 2 (C) : 0,1FE,70,1FE,70,.. (C-) -1 -> 9 (AD) : 0,1FE,0,74,0,74,.. (DA) -1 -> B (ACD) : 0,1FE,70,0,74,70,0,74,70,0,74,.. (ACD) -1 -> C (AB) : 0,1FE,72,74,70,72,74,70,72,.. (CBA) -1 -> D (ABD) : 0,1FE,72,74,70,72,74,70,72,.. (CBA) -1 -> E (ABC) : 0,1FE,70,70,70,70,.. (C) -1 -> F (ABCD): 0,1FE,70,70,74,70,70,70,74,70,70,70,74,.. (CCCA) +1 -> 2 (C) : 0,1FE,70,1FE,70,.. (C-) +1 -> 9 (AD) : 0,1FE,0,74,0,74,.. (DA) +1 -> B (ACD) : 0,1FE,70,0,74,70,0,74,70,0,74,.. (CDA) +1 -> C (AB) : 0,1FE,72,74,70,72,74,70,72,.. (CBA) +1 -> D (ABD) : 0,1FE,72,74,70,72,74,70,72,.. (CBA) +1 -> E (ABC) : 0,1FE,70,70,70,70,.. (C) +1 -> F (ABCD): 0,1FE,70,70,74,70,70,70,74,70,70,70,74,.. (CCCA) - restore only single input target to default. +Beta 10: + +- Programmed display mode positioning bug fixed, should fix remaining problems with clipped left or right edges. +- Switching between interlace PAL and interlace NTSC modes calculated wrong vertical line count. +- Some CPU emulation optimization, only modify linear memory address in getpc/setpc/incpc functions if mode + is not prefetch/ce/mmu. +- Added slirp inbound port configuration, config file slirp_redir=:::, + multiple entries supported, internal ip part is optional. +- Added simple slirp inbound port configuration, config file slirp_ports=port1,port2,.. (TCP ports only, + internal address is default 10.0.2.15, host port equals internal port) +- Added quick slirp inbound port selection to GUI, opens TCP ports 21, 22, 23 and 80. (Same as slirp_ports=21,22,23,80) +- Added missing slirp cleanup code from QEMU. +- 6888x Packed-Decimal Real negative k-factor values fully emulated (Previous confirmed, required by NeXTSTEP OS), + positive non-zero values not emulated yet which needs Fortran "E" scientific notation format string that C does + not directly support. +- First and last drawn scanlines were always detected incorrectly since few major versions ago, breaking vertical centering. +- Input device autoswitch by using analog directions now only work with X or Y axis, other directions may work + differently and can cause accidental switches. +- Force recalculation of horiz and vert centering (if enabled) when screen mode is detected (guessed) as changed. +- Toggle input events (warp mode, mute etc..) now also support setting to on or off state without toggling. + Input panel only, click on input event name to change mode +- Added audio/video recording input event, supports also new toggle/on/off modes. If recording is started using + input event (not from GUI), number is appended to filename and it is increased each time recording is started. + +SLiRP inbound ports note: all ports will be opened when network hardware is initialized, there is no way to know +when something actually starts listening for some port. This also means you won't get exactly same behavior as +"real" low level network emulation, mainly you won't ever get connection refused if port is open but not actually +listening on the Amiga side, connection opens and then closes immediately. + Beta 9: - NCR emulation didn't work with SCSI IDs 4-6. diff --git a/prowizard/misc/misc.c b/prowizard/misc/misc.c index e0bba0d4..f93e5278 100644 --- a/prowizard/misc/misc.c +++ b/prowizard/misc/misc.c @@ -511,6 +511,6 @@ void fillPTKtable (Uchar poss[37][2]) #ifndef _WIN64 int htonl(int v) { - return v; + return ((v >> 24) & 0x000000ff) | ((v >> 8) & 0x0000ff00) | ((v << 8) & 0x00ff0000) | ((v << 24) & 0xff000000); } #endif diff --git a/qemuvga/qemuuaeglue.h b/qemuvga/qemuuaeglue.h index 9e8b9eaa..52757a59 100644 --- a/qemuvga/qemuuaeglue.h +++ b/qemuvga/qemuuaeglue.h @@ -173,9 +173,14 @@ void portio_list_add(PortioList *piolist, void portio_list_del(PortioList *piolist); -typedef struct IORange IORange; typedef struct IORangeOps IORangeOps; +typedef struct IORange { + const IORangeOps *ops; + uint64_t base; + uint64_t len; +} IORange; + struct IORangeOps { void (*read)(IORange *iorange, uint64_t offset, unsigned width, uint64_t *data); @@ -184,11 +189,6 @@ struct IORangeOps { void (*destructor)(IORange *iorange); }; -typedef struct IORange { - const IORangeOps *ops; - uint64_t base; - uint64_t len; -} IORange; typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); @@ -220,14 +220,16 @@ void qemu_register_reset(QEMUResetHandler *func, void *opaque); #define CIRRUS_ID_CLGD5436 (0x2B<<2) #define CIRRUS_ID_CLGD5446 (0x2E<<2) -typedef void (*cirrus_bitblt_rop_t) (struct CirrusVGAState *s, - uint8_t * dst, const uint8_t * src, +typedef struct CirrusVGAState CirrusVGAState; + +typedef void (*cirrus_bitblt_rop_t) (CirrusVGAState *s, + uint8_t * dst, const uint8_t * src, int dstpitch, int srcpitch, int bltwidth, int bltheight); -typedef void (*cirrus_fill_t)(struct CirrusVGAState *s, +typedef void (*cirrus_fill_t)(CirrusVGAState *s, uint8_t *dst, int dst_pitch, int width, int height); -typedef struct CirrusVGAState { +struct CirrusVGAState { VGACommonState vga; MemoryRegion cirrus_vga_io; @@ -278,7 +280,7 @@ typedef struct CirrusVGAState { int device_id; int bustype; int valid_memory_config; -} CirrusVGAState; +}; void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci, MemoryRegion *system_memory, diff --git a/zfile.cpp b/zfile.cpp index 52a50738..8514957a 100644 --- a/zfile.cpp +++ b/zfile.cpp @@ -259,7 +259,7 @@ static bool checkwrite (struct zfile *zf, int *retcode) static uae_u8 exeheader[]={ 0x00,0x00,0x03,0xf3,0x00,0x00,0x00,0x00 }; -static TCHAR *diskimages[] = { _T("adf"), _T("adz"), _T("ipf"), _T("fdi"), _T("dms"), _T("wrp"), _T("dsq"), 0 }; +static TCHAR *diskimages[] = { _T("adf"), _T("adz"), _T("ipf"), _T("scp"), _T("fdi"), _T("dms"), _T("wrp"), _T("dsq"), 0 }; int zfile_gettype (struct zfile *z) { @@ -296,6 +296,16 @@ int zfile_gettype (struct zfile *z) zfile_fseek (z, -8, SEEK_CUR); if (!memcmp (buf, exeheader, sizeof (buf))) return ZFILE_DISKIMAGE; + if (!memcmp (buf, "CAPS", 4)) + return ZFILE_DISKIMAGE; + if (!memcmp (buf, "SCP", 3)) + return ZFILE_DISKIMAGE; + if (!memcmp (buf, "UAE--ADF", 8)) + return ZFILE_DISKIMAGE; + if (!memcmp (buf, "UAE-1ADF", 8)) + return ZFILE_DISKIMAGE; + if (!memcmp (buf, "Formatte", 89)) + return ZFILE_DISKIMAGE; if (!memcmp (buf, "RDSK", 4)) return ZFILE_HDFRDB; if (!memcmp (buf, "DOS", 3)) { @@ -900,7 +910,7 @@ static struct zfile *ipf (struct zfile *z, int index, int *retcode) for (i = 0; i < tracks; i++) { uae_u8 *buf, *p; int mrev, gapo; - caps_loadtrack (mfm, NULL, 0, i, &len, &mrev, &gapo); + caps_loadtrack (mfm, NULL, 0, i, &len, &mrev, &gapo, NULL, true); //write_log (_T("%d: %d %d %d\n"), i, mrev, gapo, len); len /= 8; buf = p = xmalloc (uae_u8, len); @@ -1267,7 +1277,7 @@ end: const TCHAR *uae_ignoreextensions[] = { _T(".gif"), _T(".jpg"), _T(".png"), _T(".xml"), _T(".pdf"), _T(".txt"), 0 }; const TCHAR *uae_diskimageextensions[] = -{ _T(".adf"), _T(".adz"), _T(".ipf"), _T(".fdi"), _T(".exe"), _T(".dms"), _T(".wrp"), _T(".dsq"), 0 }; +{ _T(".adf"), _T(".adz"), _T(".ipf"), _T(".scp"), _T(".fdi"), _T(".exe"), _T(".dms"), _T(".wrp"), _T(".dsq"), 0 }; int zfile_is_ignore_ext (const TCHAR *name) { -- 2.47.3