From c1a27013fafa0b617a196997db1b6bbb01fd961a Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 30 Apr 2016 16:53:25 +0300 Subject: [PATCH] Chipset extra fix. --- cfgfile.cpp | 5 +++-- main.cpp | 2 +- od-win32/win32gui.cpp | 21 +++++++++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/cfgfile.cpp b/cfgfile.cpp index 62226869..8d7674b5 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -6263,7 +6263,7 @@ void default_prefs (struct uae_prefs *p, bool reset, int type) p->clipboard_sharing = false; p->native_code = false; - p->cs_compatible = 1; + p->cs_compatible = CP_GENERIC; p->cs_rtc = 2; p->cs_df0idhw = 1; p->cs_a1000ram = 0; @@ -7220,6 +7220,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_ciatodbug = false; p->cs_z3autoconfig = false; p->cs_bytecustomwritebug = false; + p->cs_1mchipjumper = false; switch (p->cs_compatible) { @@ -7229,7 +7230,7 @@ int built_in_chipset_prefs (struct uae_prefs *p) p->cs_rtc = 2; p->cs_fatgaryrev = 0; p->cs_ide = -1; - p->cs_mbdmac = -1; + p->cs_mbdmac = 0; p->cs_ramseyrev = 0x0f; } else if (p->cpu_compatible) { // very A500-like diff --git a/main.cpp b/main.cpp index 36a8c9d4..db1ef0ec 100644 --- a/main.cpp +++ b/main.cpp @@ -618,7 +618,7 @@ void fixup_prefs (struct uae_prefs *p, bool userconfig) } if (p->parallel_postscript_emulation) p->parallel_postscript_detection = 1; - if (p->cs_compatible == 1) { + if (p->cs_compatible == CP_GENERIC) { p->cs_fatgaryrev = p->cs_ramseyrev = p->cs_mbdmac = -1; p->cs_ide = 0; if (p->cpu_model >= 68020) { diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 7e6e1b5b..eb6cc159 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -6389,7 +6389,6 @@ static void enable_for_chipsetdlg (HWND hDlg) CheckDlgButton (hDlg, IDC_BLITWAIT, FALSE); } ew (hDlg, IDC_BLITWAIT, workprefs.immediate_blits ? FALSE : TRUE); - ew (hDlg, IDC_CS_EXT, workprefs.cs_compatible ? TRUE : FALSE); ew(hDlg, IDC_GENLOCKMODE, workprefs.genlock ? TRUE : FALSE); ew(hDlg, IDC_GENLOCKMIX, workprefs.genlock ? TRUE : FALSE); } @@ -7372,6 +7371,8 @@ static void values_to_chipsetdlg (HWND hDlg) SendDlgItemMessage(hDlg, IDC_GENLOCKMIX, CB_SETCURSEL, workprefs.genlock_mix / 25, 0); } +static int cs_compatible = CP_GENERIC; + static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { BOOL success = FALSE; @@ -7437,6 +7438,7 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l nn = SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_GETCURSEL, 0, 0); if (nn != CB_ERR) { workprefs.cs_compatible = nn; + cs_compatible = nn; built_in_chipset_prefs (&workprefs); } nn = SendDlgItemMessage (hDlg, IDC_MONITOREMU, CB_GETCURSEL, 0, 0); @@ -7465,7 +7467,7 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR currentpage = CHIPSET_ID; SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_RESETCONTENT, 0, 0); - SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("")); + SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("Custom")); WIN32GUI_LoadUIString(IDS_GENERIC, buffer, sizeof buffer / sizeof (TCHAR)); SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)buffer); SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_ADDSTRING, 0, (LPARAM)_T("CDTV")); @@ -7564,7 +7566,7 @@ static void values_to_chipsetdlg2 (HWND hDlg) CheckRadioButton(hDlg, IDC_CS_RTC1, IDC_CS_RTC4, IDC_CS_RTC4); break; } - CheckDlgButton(hDlg, IDC_CS_COMPATIBLE, workprefs.cs_compatible); + CheckDlgButton(hDlg, IDC_CS_COMPATIBLE, workprefs.cs_compatible != 0); CheckDlgButton(hDlg, IDC_CS_RESETWARNING, workprefs.cs_resetwarning); CheckDlgButton(hDlg, IDC_CS_NOEHB, workprefs.cs_denisenoehb); CheckDlgButton(hDlg, IDC_CS_DIPAGNUS, workprefs.cs_dipagnus); @@ -7642,7 +7644,17 @@ static void values_from_chipsetdlg2 (HWND hDlg, UINT msg, WPARAM wParam, LPARAM TCHAR txt[32], *p; int v; - workprefs.cs_compatible = ischecked (hDlg, IDC_CS_COMPATIBLE); + if (workprefs.cs_compatible != ischecked(hDlg, IDC_CS_COMPATIBLE)) { + if (ischecked(hDlg, IDC_CS_COMPATIBLE)) { + if (!cs_compatible) + cs_compatible = CP_GENERIC; + workprefs.cs_compatible = cs_compatible; + } else { + workprefs.cs_compatible = 0; + } + built_in_chipset_prefs(&workprefs); + values_to_chipsetdlg2(hDlg); + } workprefs.cs_resetwarning = ischecked (hDlg, IDC_CS_RESETWARNING); workprefs.cs_ciatodbug = ischecked (hDlg, IDC_CS_CIATODBUG); workprefs.cs_denisenoehb = ischecked (hDlg, IDC_CS_NOEHB); @@ -7770,6 +7782,7 @@ static INT_PTR CALLBACK ChipsetDlgProc2 (HWND hDlg, UINT msg, WPARAM wParam, LPA case WM_INITDIALOG: pages[CHIPSET2_ID] = hDlg; currentpage = CHIPSET2_ID; + cs_compatible = workprefs.cs_compatible; case WM_USER: recursive++; values_to_chipsetdlg2 (hDlg); -- 2.47.3