From 1f318ef0a829e256d32c5f9b093cb1e681f5564c Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 27 Oct 2019 18:08:49 +0200 Subject: [PATCH] 4300b2 --- devices.cpp | 3 +++ newcpu.cpp | 2 +- newcpu_common.cpp | 7 ++++--- od-win32/rp.cpp | 10 ++++++++-- od-win32/rp.h | 1 + od-win32/win32.h | 6 +++--- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/devices.cpp b/devices.cpp index 5dc04dbd..a9e3a87c 100644 --- a/devices.cpp +++ b/devices.cpp @@ -217,6 +217,9 @@ void devices_reset(int hardreset) device_func_reset(); #ifdef AUTOCONFIG rtarea_reset(); +#endif +#ifdef RETROPLATFORM + rp_reset(); #endif uae_int_requested = 0; } diff --git a/newcpu.cpp b/newcpu.cpp index 13afd934..9da12a18 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -3390,7 +3390,7 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode) #endif if ((opcode & 0xF000) == 0xF000) { - // 68020 MMU or 020/030 FPU cpSAVE/cpRESTORE privilege check + // Missing MMU or FPU cpSAVE/cpRESTORE privilege check if (privileged_copro_instruction(opcode)) { Exception(8); } else { diff --git a/newcpu_common.cpp b/newcpu_common.cpp index ad1d1f0c..74499e3d 100644 --- a/newcpu_common.cpp +++ b/newcpu_common.cpp @@ -1618,9 +1618,10 @@ void ccr_68000_word_move_ae_normal(uae_s16 src) SET_NFLG(src < 0); } +// Change F-line to privilege violation if missing co-pro bool privileged_copro_instruction(uae_u16 opcode) { - if ((currprefs.cpu_model == 68020 || currprefs.cpu_model == 68030) && !regs.s) { + if (currprefs.cpu_model >= 68020 && !regs.s) { int reg = opcode & 7; int mode = (opcode >> 3) & 7; int id = (opcode >> 9) & 7; @@ -1628,13 +1629,13 @@ bool privileged_copro_instruction(uae_u16 opcode) if ((opcode & 0xf1c0) == 0xf100) { // cpSAVE if (mode == 2 || (mode >= 4 && mode <= 6) || (mode == 7 && (reg == 0 || reg == 1))) { - if (currprefs.cpu_model == 68020 || (currprefs.cpu_model == 68030 && id >= 2)) + if ((currprefs.cpu_model >= 68040 && id > 0) || currprefs.cpu_model < 68040) return true; } } else if ((opcode & 0xf1c0) == 0xf140) { // cpRESTORE if (mode == 2 || mode == 3 || (mode >= 5 && mode <= 6) || (mode == 7 && reg <= 3)) { - if (currprefs.cpu_model == 68020 || (currprefs.cpu_model == 68030 && id >= 2)) + if ((currprefs.cpu_model >= 68040 && id > 0) || currprefs.cpu_model < 68040) return true; } } diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index ffd1118d..82ea6331 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -1545,8 +1545,6 @@ HRESULT rp_init (void) } mousecapture = 0; - device_add_vsync_pre(rp_vsync); - return hr; } @@ -1789,6 +1787,7 @@ void rp_fixup_options (struct uae_prefs *p) set_config_changed (); write_log(_T("rp_fixup_options end\n")); + } static void rp_device_writeprotect (int dev, int num, bool writeprotected) @@ -2326,3 +2325,10 @@ int rp_isactive (void) { return initialized; } + +void rp_reset(void) +{ + if (!initialized) + return; + device_add_vsync_pre(rp_vsync); +} diff --git a/od-win32/rp.h b/od-win32/rp.h index 987976a9..45f2c6ed 100644 --- a/od-win32/rp.h +++ b/od-win32/rp.h @@ -22,6 +22,7 @@ extern void rp_keymap(TrapContext*, uaecptr, uae_u32); extern USHORT rp_rawbuttons(LPARAM lParam, USHORT usButtonFlags); extern bool rp_mouseevent(int x, int y, int buttons, int buttonmask); extern bool rp_ismouseevent(void); +extern void rp_reset(void); extern TCHAR *rp_param; extern int rp_rpescapekey; diff --git a/od-win32/win32.h b/od-win32/win32.h index 9e7f815f..7e3b5edf 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -17,15 +17,15 @@ #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 -#define LANG_DLL_FULL_VERSION_MATCH 0 +#define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("1") +#define WINUAEBETA _T("2") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2019, 10, 19) +#define WINUAEDATE MAKEBD(2019, 10, 27) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") -- 2.47.3