From 4020735b26154832948ef2622501b5eb7cb29a56 Mon Sep 17 00:00:00 2001 From: oddMLan Date: Sat, 16 May 2020 06:34:54 -0700 Subject: [PATCH 1/2] Add "Note: 8 MB is forced for Unknown ROMs" to Defaults tab Closes #1747 --- Source/Project64-core/Multilanguage.h | 1 + .../Multilanguage/LanguageClass.cpp | 1 + .../Settings/SettingsPage-Defaults.cpp | 1 + Source/Project64/UserInterface/UIResources.rc | 32 ++++++++++--------- Source/Project64/UserInterface/resource.h | 3 +- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index f831b31a7..deec950d0 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -335,6 +335,7 @@ enum LanguageStringID ROM_OVER_CLOCK_MODIFIER = 5400, ROM_UNALIGNED_DMA = 5410, ROM_RANDOMIZE_SIPI_INTERRUPTS = 5420, + ROM_MEM_SIZE_NOTE = 5430, //Core Styles CORE_INTERPTER = 540, diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index 55af24d1a..29d6c67b5 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -301,6 +301,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ROM_OVER_CLOCK_MODIFIER, "Overclock modifier:"); DEF_STR(ROM_UNALIGNED_DMA, "Unaligned DMA"); DEF_STR(ROM_RANDOMIZE_SIPI_INTERRUPTS, "Randomize SI/PI interrupts"); + DEF_STR(ROM_MEM_SIZE_NOTE, "Note: 8 MB is forced for Unknown ROMs."); //Core Styles DEF_STR(CORE_INTERPTER, "Interpreter"); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp index 71959a8bc..7dcc11c9b 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp @@ -20,6 +20,7 @@ CDefaultsOptionsPage::CDefaultsOptionsPage(HWND hParent, const RECT & rcDispay) UpdatePageSettings(); SetDlgItemText(IDC_MEMORY_SIZE_TEXT, wGS(ROM_MEM_SIZE).c_str()); + SetDlgItemText(IDC_MEMORY_SIZE_NOTE, wGS(ROM_MEM_SIZE_NOTE).c_str()); SetDlgItemText(IDC_HLE_GFX, wGS(PLUG_HLE_GFX).c_str()); SetDlgItemText(IDC_USE_TLB, wGS(ROM_USE_TLB).c_str()); SetDlgItemText(IDC_VIREFESH_TEXT, wGS(ROM_VIREFRESH).c_str()); diff --git a/Source/Project64/UserInterface/UIResources.rc b/Source/Project64/UserInterface/UIResources.rc index d2720f52d..f26988619 100644 --- a/Source/Project64/UserInterface/UIResources.rc +++ b/Source/Project64/UserInterface/UIResources.rc @@ -228,7 +228,8 @@ BEGIN CONTROL "Delay DP Interrupt",IDC_DELAY_DP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,143,91,10 CONTROL "Delay SI Interrupt",IDC_DELAY_SI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,143,91,10 CONTROL "RSP Audio Signal",IDC_AUDIO_SIGNAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,154,91,10 - CONTROL "Randomize SI/PI interrupts",IDC_RANDOMIZE_SIPI_INTERRUPTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,154,107,10 + CONTROL "Randomize SI/PI interrupts",IDC_RANDOMIZE_SIPI_INTERRUPTS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,154,107,10 CONTROL "Unaligned DMA",IDC_UNALIGNED_DMA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,165,91,10 END @@ -1259,21 +1260,22 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN LTEXT "Memory Size:",IDC_MEMORY_SIZE_TEXT,6,8,91,10 COMBOBOX IDC_RDRAM_SIZE,102,6,109,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Use High Level GFX",IDC_HLE_GFX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,92,91,10 - CONTROL "Use TLB",IDC_USE_TLB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,68,91,10 - LTEXT "Vi Refresh Rate:",IDC_VIREFESH_TEXT,6,37,91,10 - EDITTEXT IDC_VIREFRESH,102,35,109,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "AI Count Per Byte:",IDC_COUNTPERBYTE_TEXT,6,51,91,10 - EDITTEXT IDC_COUNTPERBYTE,102,50,109,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Counter Factor:",IDC_COUNTFACT_TEXT,6,21,91,10 - COMBOBOX IDC_COUNTFACT,102,20,109,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "32 Bit Engine",IDC_ROM_32BIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,68,91,10 - CONTROL "Fixed Audio Timing",IDC_ROM_FIXEDAUDIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,80,91,10 - CONTROL "Sync using Audio",IDC_SYNC_AUDIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,80,91,10 + CONTROL "Use High Level GFX",IDC_HLE_GFX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,106,91,10 + CONTROL "Use TLB",IDC_USE_TLB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,82,91,10 + LTEXT "Vi Refresh Rate:",IDC_VIREFESH_TEXT,6,51,91,10 + EDITTEXT IDC_VIREFRESH,102,49,109,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "AI Count Per Byte:",IDC_COUNTPERBYTE_TEXT,6,65,91,10 + EDITTEXT IDC_COUNTPERBYTE,102,64,109,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Counter Factor:",IDC_COUNTFACT_TEXT,6,35,91,10 + COMBOBOX IDC_COUNTFACT,102,34,109,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "32 Bit Engine",IDC_ROM_32BIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,82,91,10 + CONTROL "Fixed Audio Timing",IDC_ROM_FIXEDAUDIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,94,91,10 + CONTROL "Sync using Audio",IDC_SYNC_AUDIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,94,91,10 CONTROL "Randomize SI/PI interrupts",IDC_RANDOMIZE_SIPI_INTERRUPTS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,92,107,10 - CONTROL "Unaligned DMA",IDC_UNALIGNED_DMA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,104,91,10 - CONTROL "Protect Memory",IDC_PROTECT_MEMORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,104,91,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,106,107,10 + CONTROL "Unaligned DMA",IDC_UNALIGNED_DMA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,118,91,10 + CONTROL "Protect Memory",IDC_PROTECT_MEMORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,118,91,10 + RTEXT "Note: 8 MB is forced for Unknown ROMs.",IDC_MEMORY_SIZE_NOTE,6,22,205,8 END IDD_Enhancement_Config DIALOGEX 0, 0, 206, 214 diff --git a/Source/Project64/UserInterface/resource.h b/Source/Project64/UserInterface/resource.h index 16f8d793f..0f67783ce 100644 --- a/Source/Project64/UserInterface/resource.h +++ b/Source/Project64/UserInterface/resource.h @@ -718,6 +718,7 @@ #define IDC_STATUSBAR 1572 #define IDC_CMB_JUMP 1573 #define IDC_COPYTABREGISTERS_BTN 1574 +#define IDC_MEMORY_SIZE_NOTE 1574 #define IDC_F0_LBL 1575 #define IDC_F1_LBL 1576 #define IDC_F2_LBL 1577 @@ -939,7 +940,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 219 #define _APS_NEXT_COMMAND_VALUE 40121 -#define _APS_NEXT_CONTROL_VALUE 1574 +#define _APS_NEXT_CONTROL_VALUE 1575 #define _APS_NEXT_SYMED_VALUE 102 #endif #endif From 2be276a7bcab28b415e2c6f701745fd8e1d4940e Mon Sep 17 00:00:00 2001 From: oddMLan Date: Sat, 16 May 2020 06:43:04 -0700 Subject: [PATCH 2/2] Tabs -> spaces --- Source/Project64-core/Multilanguage.h | 2 +- .../Multilanguage/LanguageClass.cpp | 2 +- .../Settings/SettingsPage-Defaults.cpp | 80 +++++++++---------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index deec950d0..ec52a0945 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -335,7 +335,7 @@ enum LanguageStringID ROM_OVER_CLOCK_MODIFIER = 5400, ROM_UNALIGNED_DMA = 5410, ROM_RANDOMIZE_SIPI_INTERRUPTS = 5420, - ROM_MEM_SIZE_NOTE = 5430, + ROM_MEM_SIZE_NOTE = 5430, //Core Styles CORE_INTERPTER = 540, diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index 29d6c67b5..096469b3c 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -301,7 +301,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ROM_OVER_CLOCK_MODIFIER, "Overclock modifier:"); DEF_STR(ROM_UNALIGNED_DMA, "Unaligned DMA"); DEF_STR(ROM_RANDOMIZE_SIPI_INTERRUPTS, "Randomize SI/PI interrupts"); - DEF_STR(ROM_MEM_SIZE_NOTE, "Note: 8 MB is forced for Unknown ROMs."); + DEF_STR(ROM_MEM_SIZE_NOTE, "Note: 8 MB is forced for Unknown ROMs."); //Core Styles DEF_STR(CORE_INTERPTER, "Interpreter"); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp index 7dcc11c9b..12636e3ee 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Defaults.cpp @@ -20,18 +20,18 @@ CDefaultsOptionsPage::CDefaultsOptionsPage(HWND hParent, const RECT & rcDispay) UpdatePageSettings(); SetDlgItemText(IDC_MEMORY_SIZE_TEXT, wGS(ROM_MEM_SIZE).c_str()); - SetDlgItemText(IDC_MEMORY_SIZE_NOTE, wGS(ROM_MEM_SIZE_NOTE).c_str()); - SetDlgItemText(IDC_HLE_GFX, wGS(PLUG_HLE_GFX).c_str()); - SetDlgItemText(IDC_USE_TLB, wGS(ROM_USE_TLB).c_str()); - SetDlgItemText(IDC_VIREFESH_TEXT, wGS(ROM_VIREFRESH).c_str()); - SetDlgItemText(IDC_COUNTPERBYTE_TEXT, wGS(ROM_COUNTPERBYTE).c_str()); - SetDlgItemText(IDC_COUNTFACT_TEXT, wGS(ROM_COUNTER_FACTOR).c_str()); - SetDlgItemText(IDC_ROM_32BIT, wGS(ROM_32BIT).c_str()); - SetDlgItemText(IDC_ROM_FIXEDAUDIO, wGS(ROM_FIXED_AUDIO).c_str()); - SetDlgItemText(IDC_SYNC_AUDIO, wGS(ROM_SYNC_AUDIO).c_str()); - SetDlgItemText(IDC_UNALIGNED_DMA, wGS(ROM_UNALIGNED_DMA).c_str()); - SetDlgItemText(IDC_RANDOMIZE_SIPI_INTERRUPTS, wGS(ROM_RANDOMIZE_SIPI_INTERRUPTS).c_str()); - SetDlgItemText(IDC_PROTECT_MEMORY, wGS(ADVANCE_SMM_PROTECT).c_str()); + SetDlgItemText(IDC_MEMORY_SIZE_NOTE, wGS(ROM_MEM_SIZE_NOTE).c_str()); + SetDlgItemText(IDC_HLE_GFX, wGS(PLUG_HLE_GFX).c_str()); + SetDlgItemText(IDC_USE_TLB, wGS(ROM_USE_TLB).c_str()); + SetDlgItemText(IDC_VIREFESH_TEXT, wGS(ROM_VIREFRESH).c_str()); + SetDlgItemText(IDC_COUNTPERBYTE_TEXT, wGS(ROM_COUNTPERBYTE).c_str()); + SetDlgItemText(IDC_COUNTFACT_TEXT, wGS(ROM_COUNTER_FACTOR).c_str()); + SetDlgItemText(IDC_ROM_32BIT, wGS(ROM_32BIT).c_str()); + SetDlgItemText(IDC_ROM_FIXEDAUDIO, wGS(ROM_FIXED_AUDIO).c_str()); + SetDlgItemText(IDC_SYNC_AUDIO, wGS(ROM_SYNC_AUDIO).c_str()); + SetDlgItemText(IDC_UNALIGNED_DMA, wGS(ROM_UNALIGNED_DMA).c_str()); + SetDlgItemText(IDC_RANDOMIZE_SIPI_INTERRUPTS, wGS(ROM_RANDOMIZE_SIPI_INTERRUPTS).c_str()); + SetDlgItemText(IDC_PROTECT_MEMORY, wGS(ADVANCE_SMM_PROTECT).c_str()); CModifiedComboBox * ComboBox; ComboBox = AddModComboBox(GetDlgItem(IDC_RDRAM_SIZE), Default_RDRamSize); @@ -42,37 +42,37 @@ CDefaultsOptionsPage::CDefaultsOptionsPage(HWND hParent, const RECT & rcDispay) ComboBox->AddItem(wGS(RDRAM_8MB).c_str(), 0x800000); } - ComboBox = AddModComboBox(GetDlgItem(IDC_COUNTFACT), Default_CounterFactor); - if (ComboBox) - { - ComboBox->SetTextField(GetDlgItem(IDC_COUNTFACT_TEXT)); - ComboBox->AddItem(wGS(NUMBER_1).c_str(), 1); - ComboBox->AddItem(wGS(NUMBER_2).c_str(), 2); - ComboBox->AddItem(wGS(NUMBER_3).c_str(), 3); - ComboBox->AddItem(wGS(NUMBER_4).c_str(), 4); - ComboBox->AddItem(wGS(NUMBER_5).c_str(), 5); - ComboBox->AddItem(wGS(NUMBER_6).c_str(), 6); - } + ComboBox = AddModComboBox(GetDlgItem(IDC_COUNTFACT), Default_CounterFactor); + if (ComboBox) + { + ComboBox->SetTextField(GetDlgItem(IDC_COUNTFACT_TEXT)); + ComboBox->AddItem(wGS(NUMBER_1).c_str(), 1); + ComboBox->AddItem(wGS(NUMBER_2).c_str(), 2); + ComboBox->AddItem(wGS(NUMBER_3).c_str(), 3); + ComboBox->AddItem(wGS(NUMBER_4).c_str(), 4); + ComboBox->AddItem(wGS(NUMBER_5).c_str(), 5); + ComboBox->AddItem(wGS(NUMBER_6).c_str(), 6); + } - CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_VIREFRESH), Default_ViRefreshRate, false); - TxtBox->SetTextField(GetDlgItem(IDC_VIREFESH_TEXT)); - TxtBox = AddModTextBox(GetDlgItem(IDC_COUNTPERBYTE), Default_AiCountPerBytes, false); - TxtBox->SetTextField(GetDlgItem(IDC_COUNTPERBYTE_TEXT)); + CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_VIREFRESH), Default_ViRefreshRate, false); + TxtBox->SetTextField(GetDlgItem(IDC_VIREFESH_TEXT)); + TxtBox = AddModTextBox(GetDlgItem(IDC_COUNTPERBYTE), Default_AiCountPerBytes, false); + TxtBox->SetTextField(GetDlgItem(IDC_COUNTPERBYTE_TEXT)); - AddModCheckBox(GetDlgItem(IDC_HLE_GFX), Default_UseHleGfx); - AddModCheckBox(GetDlgItem(IDC_USE_TLB), Default_UseTlb); - AddModCheckBox(GetDlgItem(IDC_ROM_32BIT), Default_32Bit); - AddModCheckBox(GetDlgItem(IDC_SYNC_AUDIO), Default_SyncViaAudio); - AddModCheckBox(GetDlgItem(IDC_ROM_FIXEDAUDIO), Default_FixedAudio); - AddModCheckBox(GetDlgItem(IDC_UNALIGNED_DMA), Default_UnalignedDMA); - AddModCheckBox(GetDlgItem(IDC_RANDOMIZE_SIPI_INTERRUPTS), Default_RandomizeSIPIInterrupts); - AddModCheckBox(GetDlgItem(IDC_PROTECT_MEMORY), Default_SMM_Protect_Memory); + AddModCheckBox(GetDlgItem(IDC_HLE_GFX), Default_UseHleGfx); + AddModCheckBox(GetDlgItem(IDC_USE_TLB), Default_UseTlb); + AddModCheckBox(GetDlgItem(IDC_ROM_32BIT), Default_32Bit); + AddModCheckBox(GetDlgItem(IDC_SYNC_AUDIO), Default_SyncViaAudio); + AddModCheckBox(GetDlgItem(IDC_ROM_FIXEDAUDIO), Default_FixedAudio); + AddModCheckBox(GetDlgItem(IDC_UNALIGNED_DMA), Default_UnalignedDMA); + AddModCheckBox(GetDlgItem(IDC_RANDOMIZE_SIPI_INTERRUPTS), Default_RandomizeSIPIInterrupts); + AddModCheckBox(GetDlgItem(IDC_PROTECT_MEMORY), Default_SMM_Protect_Memory); - if (!g_Settings->LoadBool(Setting_SyncViaAudioEnabled)) - { - GetDlgItem(IDC_SYNC_AUDIO).EnableWindow(false); - } - UpdatePageSettings(); + if (!g_Settings->LoadBool(Setting_SyncViaAudioEnabled)) + { + GetDlgItem(IDC_SYNC_AUDIO).EnableWindow(false); + } + UpdatePageSettings(); } void CDefaultsOptionsPage::HidePage()