From 4c1791401d79699a09188a5ea8418bd23a0a4238 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 14 Jan 2023 16:02:09 +0200 Subject: [PATCH] 41010b4 --- cfgfile.cpp | 6 +-- od-win32/rp.cpp | 75 +++++++++++++++++++----------------- od-win32/win32.h | 4 +- od-win32/winuaechangelog.txt | 15 ++++++++ 4 files changed, 59 insertions(+), 41 deletions(-) diff --git a/cfgfile.cpp b/cfgfile.cpp index bbde3f8a..36002b00 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -2218,13 +2218,13 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) _stprintf (tmp1, _T("joyport%d"), i); cfgfile_write (f, tmp1, tmp2); _stprintf (tmp1, _T("joyport%dautofire"), i); - cfgfile_write (f, tmp1, joyaf[jp->autofire]); + cfgfile_write_strarr(f, tmp1, joyaf, jp->autofire); if (i < 2 && jp->mode > 0) { _stprintf (tmp1, _T("joyport%dmode"), i); - cfgfile_write (f, tmp1, joyportmodes[jp->mode]); + cfgfile_write_strarr(f, tmp1, joyportmodes, jp->mode); if (jp->submode > 0 && jp->mode == 8) { _stprintf(tmp1, _T("joyport%dsubmode"), i); - cfgfile_write(f, tmp1, joyportsubmodes_lightpen[jp->submode]); + cfgfile_write_strarr(f, tmp1, joyportsubmodes_lightpen, jp->submode); } } if (jp->idc.name[0]) { diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index b69e9353..0c371a3f 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -38,6 +38,8 @@ #include "debug.h" #include "devices.h" +#define RP_SCREENMODE_SCALE_MAX_X 128 + static int initialized; static RPGUESTINFO guestinfo; static int maxjports; @@ -717,24 +719,22 @@ static void fixup_size (struct uae_prefs *prefs) write_log(_T("-> %dx%d\n"), gm->gfx_size_win.width, gm->gfx_size_win.height); } -static int getmult (float mult, bool *half) +static float getmult(float mult) { - *half = false; - if (mult >= 3.5) - return 2; // 4x + if (mult >= 3.5f) + return (mult - 3.5f + 4.0f) / 2.0f; //2.0f; // 4x if (mult >= 2.5f) { - *half = true; - return 1; // 3x + return 1.5f; // 3x } if (mult >= 1.5f) - return 1; // 2x + return 1.0f; // 2x if (mult >= 0.8f) - return 0; // 1x + return 0.0f; // 1x if (mult >= 0.4f) - return -1; // 1/2x + return -1.0f; // 1/2x if (mult >= 0.1f) - return -2; // 1/4x - return 0; + return -2.0f; // 1/4x + return 0.0f; } static int shift (int val, int shift) @@ -778,12 +778,12 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p, bool g sm->lClipWidth = -1;//picasso96_state.Width; sm->lClipHeight = -1;//picasso96_state.Height; - if (hmult >= 3.5f || vmult >= 3.5f) - m |= RP_SCREENMODE_SCALE_4X; - else if (hmult >= 2.5f || vmult >= 2.5f) - m |= RP_SCREENMODE_SCALE_3X; - else if (hmult >= 1.5f || vmult >= 1.5f) - m |= RP_SCREENMODE_SCALE_2X; + for (int i = RP_SCREENMODE_SCALE_MAX_X; i >= RP_SCREENMODE_SCALE_2X; i--) { + if (hmult >= (float)i + 0.5) { + m |= i; + break; + } + } } else { @@ -810,17 +810,21 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p, bool g totalhdbl = hres; if (hres > max_horiz_dbl) hres = max_horiz_dbl; - hres += getmult (hmult, &half); + float hresm = getmult(hmult); + hres += (int)hresm; totalvdbl = vres; if (vres > max_vert_dbl) vres = max_vert_dbl; - vres += getmult (vmult, &half); + float vresm = getmult(vmult); + vres += (int)vresm; - if (hres == RES_SUPERHIRES) { - m = half ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_2X; + if (hres > RES_SUPERHIRES) { + m = (int)vresm + 1; + } else if (hres == RES_SUPERHIRES) { + m = vresm > 1.0f && vresm < 2.0f ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_2X; } else if (hres >= RES_SUPERHIRES + 1) { - m = half ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_4X; + m = vresm > 1.0f && vresm < 2.0f ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_4X; } else { m = RP_SCREENMODE_SCALE_1X; } @@ -887,6 +891,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) struct monconfig *gm = &p->gfx_monitor[mon->monitor_id]; struct monconfig *gmc = &currprefs.gfx_monitor[mon->monitor_id]; int smm = RP_SCREENMODE_SCALE (sm->dwScreenMode); + int smm_m = smm & 0x7f; int display = RP_SCREENMODE_DISPLAY (sm->dwScreenMode); int fs = 0; int hdbl = RES_HIRES, vdbl = VRES_DOUBLE; @@ -952,7 +957,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) // 2X hdbl = RES_SUPERHIRES; vdbl = VRES_QUAD; - } else if (smm == RP_SCREENMODE_SCALE_4X) { + } else if (smm_m >= RP_SCREENMODE_SCALE_4X) { // 4X hdbl = RES_SUPERHIRES + 1; vdbl = VRES_QUAD + 1; @@ -962,7 +967,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) vdbl = VRES_DOUBLE; } - if (smm > RP_SCREENMODE_SCALE_4X || smm == RP_SCREENMODE_SCALE_MAX) { + if (smm == RP_SCREENMODE_SCALE_MAX) { hdbl = max_horiz_dbl; vdbl = max_vert_dbl; } @@ -978,6 +983,12 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) vmult = (float)(1 << (vres - max_vert_dbl)); vres = max_vert_dbl; } + + if (smm_m > RP_SCREENMODE_SCALE_4X) { + float em = smm_m / 4.0f; + hmult *= em; + vmult *= em; + } } if (hres == RES_LORES && vres > VRES_NONDOUBLE) vres = VRES_NONDOUBLE; @@ -1030,12 +1041,8 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) int m = 1; if (fs < 2) { - if (smm == RP_SCREENMODE_SCALE_2X) { - m = 2; - } else if (smm == RP_SCREENMODE_SCALE_3X) { - m = 3; - } else if (smm == RP_SCREENMODE_SCALE_4X) { - m = 4; + if (smm_m >= RP_SCREENMODE_SCALE_2X) { + m = smm_m - RP_SCREENMODE_SCALE_2X + 2; } } p->rtg_horiz_zoom_mult = p->rtg_vert_zoom_mult = (float)m; @@ -1047,12 +1054,8 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) p->gf[1].gfx_filter_autoscale = 1; } else { p->gf[1].gfx_filter_autoscale = 0; - if (smm == RP_SCREENMODE_SCALE_2X) { - m = 2; - } else if (smm == RP_SCREENMODE_SCALE_3X) { - m = 3; - } else if (smm == RP_SCREENMODE_SCALE_4X) { - m = 4; + if (smm_m >= RP_SCREENMODE_SCALE_2X) { + m = smm_m - RP_SCREENMODE_SCALE_2X + 2; } } diff --git a/od-win32/win32.h b/od-win32/win32.h index 770853c8..74575133 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("3") +#define WINUAEBETA _T("4") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2023, 1, 7) +#define WINUAEDATE MAKEBD(2023, 1, 14) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 048aa260..e6471864 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,19 @@ +Beta 4: + +- Added continuous screenshot mode to GUI (Was previously available via input events). When ticked, screenshot is taken automatically every frame. +- Fixed video recording and continuous screenshot including extra blank frame when loading new statefile. (4.9.0) +- Fixed second frame appearing corrupted after loading statefile due to not re-initializing long/short frame internal variables at startup (only visible in video recording or screenshot). (4.9.0) +- If game controller was configured using Game Ports panel (Custom #x setting) and device didn't have any Input panel mappings, config file input device matching with currently installed input devices was not done. This meant if config was moved to other PC, device specific input config was not loaded correctly. Now it also matches devices using only USB VID and PID if better match is not found. (Full match -> Partial match -> VID+PID only if exists -> Device friendly name) +- If config file has input device that is not currently connected, saving the config file didn't save non-connected device's config data. Now it is saved (like it was supposed to already do) +- Game Ports panel custom settings were not corrected automatically if device indexes changed (new input devices connected or removed) +- If Game Ports custom setting has entries that don't map to any currently connected device, show unmapped events as "=?" instead of showing nothing. +- CALLM disassembly fixed. +- 68030 MMU state was partially reset when loading statefile. +- If fast CPU mode program writes to color registers (usually COLOR0 to create background color rainbows), skip write if previous write already happened in same chipset cycle. This could have overflowed buffer that stores state where and when color change should happen in rendering part of emulation. Fast CPU modes don't slow down CPU by emulating chipset or chip ram delays. +- Reduced size of sprite buffers (which was huge), buffer size was enough to have whole screen filled with sprites in max superhires/800 lines screen mode which can't happen. +- "uae-configuration statefile_save " can be used to create statefile (note that save happens when vblank starts next, it is not saved immediately but uae-configuration still returns immediately) + Beta 3: - Serial port RI (ring indicator) was inverted. If both printer and serial port was enabled, printer port SEL was pulled down even when RI was inactive. -- 2.47.3