From 2a48ed7018d75692211bc0f0c63d9c3f6e70b8e6 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 14 May 2023 20:37:14 +0300 Subject: [PATCH] 5000b10 --- od-win32/cloanto/RetroPlatformIPC.h | 10 +++++----- od-win32/rp.cpp | 26 ++++++++++++++++++++++++-- od-win32/win32.h | 8 ++++---- od-win32/winuaechangelog.txt | 14 +++++++++++++- 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/od-win32/cloanto/RetroPlatformIPC.h b/od-win32/cloanto/RetroPlatformIPC.h index dd8afdcb..b216ce34 100644 --- a/od-win32/cloanto/RetroPlatformIPC.h +++ b/od-win32/cloanto/RetroPlatformIPC.h @@ -2,14 +2,14 @@ Name : RetroPlatformIPC.h Project : RetroPlatform Player Support : http://www.retroplatform.com - Legal : Copyright 2007-2022 Cloanto Corporation - All rights reserved. This + Legal : Copyright 2007-2023 Cloanto Corporation - All rights reserved. This : file is multi-licensed under the terms of the Mozilla Public License : version 2.0 as published by Mozilla Corporation and the GNU General : Public License, version 2 or later, as published by the Free : Software Foundation. Authors : os, m Created : 2007-08-27 13:55:49 - Updated : 2023-04-04 14:45:34 + Updated : 2023-05-11 10:31:21 Comment : RetroPlatform Player interprocess communication include file *****************************************************************************/ @@ -18,9 +18,9 @@ #include -#define RETROPLATFORM_API_VER "10.1" +#define RETROPLATFORM_API_VER "10.2" #define RETROPLATFORM_API_VER_MAJOR 10 -#define RETROPLATFORM_API_VER_MINOR 1 +#define RETROPLATFORM_API_VER_MINOR 2 #define RPIPC_HostWndClass "RetroPlatformHost%s" #define RPIPC_GuestWndClass "RetroPlatformGuest%d" @@ -219,7 +219,7 @@ typedef struct RPScreenMode #define RP_SCREENMODE_SCALING_SUBPIXEL 0x00100000 // use sub-pixel (non-integer) scaling in RP_SCREENMODE_SCALE_TARGET or RP_SCREENMODE_SCALE_MAX modes; if not set, up to four black bars may be added; if set, up to two black bars may be added #define RP_SCREENMODE_SCALING_STRETCH 0x00200000 // "stretch to fill" (do not preserve original ratio) in RP_SCREENMODE_SCALE_TARGET or RP_SCREENMODE_SCALE_MAX modes; if set, no black bars are added #define RP_SCREENMODE_PIXEL_ORIGINAL_RATIO 0x00400000 // use pixel original ratio (when not set, square pixel ratio or a multiple thereof is used, which grants optimal sharpness and avoids screen distortions) -#define RP_SCREENMODE_INTERPOLATION 0x00800000 // scale image using bilinear interpolation +#define RP_SCREENMODE_INTERPOLATION 0x00800000 // scale image using bilinear interpolation (introduced in RetroPlatform API 10.2) // Clip Flags (used only from host to guest, never from guest to host) #define RP_CLIPFLAGS_AUTOCLIP 0x00000001 // ignore all 4 Clip values (same as all values = -1) and use "smart" offset and size diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index 6da94507..2277c17d 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -75,6 +75,7 @@ static int hwndset_delay; static int sendmouseevents; static int mouseevent_x, mouseevent_y, mouseevent_buttons; static uae_u64 delayed_refresh; +static bool interpolation_v102; static int cando (void) { @@ -888,6 +889,12 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p, bool g } } +static bool interpolation_old(DWORD sm) +{ + return ((sm & (RP_SCREENMODE_PIXEL_ORIGINAL_RATIO | RP_SCREENMODE_SCALING_SUBPIXEL | RP_SCREENMODE_SCANLINES)) == 0 && + RP_SCREENMODE_DISPLAY(sm) == 0) ? 0 : 1; +} + static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) { struct AmigaMonitor *mon = &AMonitors[0]; @@ -1075,7 +1082,11 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) p->win32_rtgallowscaling = false; p->win32_rtgscaleaspectratio = keepaspect ? -1 : 0; - p->gf[GF_RTG].gfx_filter_bilinear = (sm->dwScreenMode & RP_SCREENMODE_INTERPOLATION) != 0; + if (interpolation_v102) { + p->gf[GF_RTG].gfx_filter_bilinear = (sm->dwScreenMode & RP_SCREENMODE_INTERPOLATION) != 0; + } else { + p->gf[GF_RTG].gfx_filter_bilinear = interpolation_old(sm->dwScreenMode); + } if (integerscale) { p->gf[GF_RTG].gfx_filter_autoscale = RTG_MODE_INTEGER_SCALE; @@ -1172,7 +1183,11 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) p->gf[0].gfx_filter_left_border = -1; p->gf[0].gfx_filter_top_border = -1; } - p->gf[0].gfx_filter_bilinear = (sm->dwScreenMode & RP_SCREENMODE_INTERPOLATION) != 0; + if (interpolation_v102) { + p->gf[0].gfx_filter_bilinear = (sm->dwScreenMode & RP_SCREENMODE_INTERPOLATION) != 0; + } else { + p->gf[0].gfx_filter_bilinear = interpolation_old(sm->dwScreenMode); + } } if (log_rp & 2) { @@ -1818,6 +1833,7 @@ void rp_fixup_options (struct uae_prefs *p) { struct monconfig *gm = &p->gfx_monitor[0]; struct RPScreenMode sm; + LRESULT lr; if (!initialized) return; @@ -1825,6 +1841,12 @@ void rp_fixup_options (struct uae_prefs *p) write_log (_T("rp_fixup_options(escapekey=%d,escapeholdtime=%d,screenmode=%d,inputmode=%d)\n"), rp_rpescapekey, rp_rpescapeholdtime, rp_screenmode, rp_inputmode); + if (RPSendMessage(RP_IPC_TO_HOST_HOSTAPIVERSION, 0, 0, NULL, 0, &guestinfo, &lr)) { + WORD major = LOWORD(lr); + WORD minor = HIWORD(lr); + interpolation_v102 = major > 10 || (major == 10 && minor >= 2); + } + sendmouseevents = 0; mouseevent_x = mouseevent_y = 0; mouseevent_buttons = 0; diff --git a/od-win32/win32.h b/od-win32/win32.h index ae8f9f87..b80c4139 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,23 +15,23 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEPUBLICBETA 1 +#define WINUAEPUBLICBETA 0 #define LANG_DLL 1 #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("9") +#define WINUAEBETA _T("") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2023, 5, 8) +#define WINUAEDATE MAKEBD(2023, 5, 14) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") #ifndef WINUAEEXTRA -#define WINUAEEXTRA _T("RC1") +#define WINUAEEXTRA _T("") #endif #ifndef WINUAEREV #define WINUAEREV _T("") diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 6d982701..9e89761b 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,7 +1,19 @@ +Beta 10: (RC2) + +- On the fly gameports panel autofire mode setting change (for example using uae-configuration or executing custom event) was not supported. +- Fixed memory double free in b9 calculator update. +- Debugger ? binary output grouped to 4*8 bits. +- Cached bitplane DMA cycle sequence could have used wrong odd/even line mode if programmed mode was enabled when PAL/NTSC bitplane was active. +- If active bitplane was "behind" left horizontal blank (usually only if mode is "weird"), bitplane had extra horizontal offset. +- Some re-recorder fixes but it still loses sync randomly. Not required to work in 5.0 (it has never worked) but I'll try to debug this before final 5.0. +- Automatic scaling missed one line at the bottom and in certain situations top had one empty line. (Probably side-effect of 4.9.x display emulation rewrite) +- RTC address space memwatch points didn't work correctly. +- Beta tag removed. + Beta 9: (RC1) -- Debugger calculator (also used by custom input events) >> and << shift operators added. Negative hex and binary value support (?-$xx now works as expected). Ternary operator support ("condition_formula ? formula_calculated_if_true : formula_calculated_if false"). String parameters and string comparisons supported. Can be useful in custom input events. (for example "gfx_resolution=[\'gfx_linemode\'=='double2'?'hires':'lores']") +- Debugger calculator (also used by custom input events) >> and << shift operators added. Negative hex and binary value support (?$-xx now works as expected). Ternary operator support ("condition_formula ? formula_calculated_if_true : formula_calculated_if false"). String parameters and string comparisons supported. Can be useful in custom input events. (for example "gfx_resolution=[\'gfx_linemode\'=='double2'?'hires':'lores']") - Serial port GUI now have separate options to enable handshake/status pin emulation (RTS/CTS/DTR/DTE/CD) and Ring Indicator. RI is off by default because it is shared with printer port SEL which broke parallel port joystick if serial port was also enabled after RI update. "RTS/CTS" renamed to more correct "Host RTS/CTS" (Host serial port hardware handles RTS/CTS automatically, Amiga side does not need to care) - Sound GUI panel slider flickering fixed when modifying (almost) any other sound configuration setting. - Added v2.01 ICD AdSCSI 2000 ROM (v32.1 icddisk.device). Renamed v2.x (v33.0) to v2.1 because now it is almost certain it is v2.1. -- 2.47.3