From bfb49fd93ad0d05404f78bf16fff6dd98cdcdad0 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:33:39 -0500 Subject: [PATCH 01/16] Update Logging.cpp Fix comments, fix some log typos, and add newline --- Source/Project64-core/Logging.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Project64-core/Logging.cpp b/Source/Project64-core/Logging.cpp index 71dac4fd5..bb4b5b8be 100644 --- a/Source/Project64-core/Logging.cpp +++ b/Source/Project64-core/Logging.cpp @@ -271,7 +271,7 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr) return; } g_MMU->LW_VAddr(VAddr, Value); - LogMessage("%08X: read word from Pif Ram at 0x%X (%08X)", PC, VAddr - 0xBFC007C0, Value); + LogMessage("%08X: read word from PIF RAM at 0x%X (%08X)", PC, VAddr - 0xBFC007C0, Value); return; } if (VAddr >= 0xB0000040 && ((VAddr - 0xB0000000) < g_Rom->GetRomSize())) @@ -288,12 +288,12 @@ void CLogging::Log_LW(uint32_t PC, uint32_t VAddr) g_MMU->LW_VAddr(VAddr, Value); switch (VAddr) { - case 0xB0000004: LogMessage("%08X: read from Rom Clock Rate (%08X)", PC, Value); break; - case 0xB0000008: LogMessage("%08X: read from Rom Boot address offset (%08X)", PC, Value); break; - case 0xB000000C: LogMessage("%08X: read from Rom Release offset (%08X)", PC, Value); break; - case 0xB0000010: LogMessage("%08X: read from Rom CRC1 (%08X)", PC, Value); break; - case 0xB0000014: LogMessage("%08X: read from Rom CRC2 (%08X)", PC, Value); break; - default: LogMessage("%08X: read from Rom header 0x%X (%08X)", PC, VAddr & 0xFF, Value); break; + case 0xB0000004: LogMessage("%08X: read from ROM clock rate (%08X)", PC, Value); break; + case 0xB0000008: LogMessage("%08X: read from ROM boot address offset (%08X)", PC, Value); break; + case 0xB000000C: LogMessage("%08X: read from ROM release offset (%08X)", PC, Value); break; + case 0xB0000010: LogMessage("%08X: read from ROM CRC1 (%08X)", PC, Value); break; + case 0xB0000014: LogMessage("%08X: read from ROM CRC2 (%08X)", PC, Value); break; + default: LogMessage("%08X: read from ROM header 0x%X (%08X)", PC, VAddr & 0xFF, Value); break; } return; } @@ -524,7 +524,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { if (LogPRDMAOperations()) { - LogMessage("%08X: A DMA transfer from the PIF ram has occured", PC); + LogMessage("%08X: A DMA transfer from the PIF RAM has occurred", PC); } if (!LogSerialInterface()) { @@ -536,7 +536,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { if (LogPRDMAOperations()) { - LogMessage("%08X: A DMA transfer to the PIF ram has occured", PC); + LogMessage("%08X: A DMA transfer to the PIF RAM has occurred", PC); } if (!LogSerialInterface()) { @@ -559,7 +559,7 @@ void CLogging::Log_SW(uint32_t PC, uint32_t VAddr, uint32_t Value) { return; } - LogMessage("%08X: Writing 0x%08X to Pif Ram at 0x%X", PC, Value, VAddr - 0xBFC007C0); + LogMessage("%08X: Writing 0x%08X to PIF RAM at 0x%X", PC, Value, VAddr - 0xBFC007C0); return; } if (!LogUnknown()) @@ -615,4 +615,4 @@ void CLogging::StopLog(void) delete m_hLogFile; m_hLogFile = NULL; } -} \ No newline at end of file +} From a40dac71dd510738bf002153acd67d9a8578b5e3 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:33:54 -0500 Subject: [PATCH 02/16] Update Logging.h Add newline --- Source/Project64-core/Logging.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Project64-core/Logging.h b/Source/Project64-core/Logging.h index 54236f6c7..8bf81fe1c 100644 --- a/Source/Project64-core/Logging.h +++ b/Source/Project64-core/Logging.h @@ -15,4 +15,4 @@ public: private: static CFile * m_hLogFile; -}; \ No newline at end of file +}; From 679b0d111e63c3809209e721cc0055101d201318 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:34:18 -0500 Subject: [PATCH 03/16] Update Multilanguage.h Fix comments --- Source/Project64-core/Multilanguage.h | 150 ++++++++++++-------------- 1 file changed, 70 insertions(+), 80 deletions(-) diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index 21c90a06c..50d9571c7 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -4,16 +4,15 @@ enum LanguageStringID { EMPTY_STRING = 0, - /********************************************************************************* - * Meta Information * - *********************************************************************************/ - //About DLL + // Meta Information + + // About DLL LANGUAGE_NAME = 1, LANGUAGE_AUTHOR = 2, LANGUAGE_VERSION = 3, LANGUAGE_DATE = 4, - //About DLL Dialog + // About DLL dialog INI_CURRENT_LANG = 5, INI_AUTHOR = 6, INI_VERSION = 7, @@ -23,12 +22,11 @@ enum LanguageStringID INI_CURRENT_CHT = 11, INI_CURRENT_RDX = 12, - //About INI title + // About INI title INI_TITLE = 20, - /********************************************************************************* - * Numbers * - *********************************************************************************/ + // Numbers + NUMBER_0 = 50, NUMBER_1 = 51, NUMBER_2 = 52, @@ -40,10 +38,9 @@ enum LanguageStringID NUMBER_8 = 58, NUMBER_9 = 59, - /********************************************************************************* - * Menu * - *********************************************************************************/ - //File Menu + // Menu + + // File menu MENU_FILE = 100, MENU_OPEN = 101, MENU_ROM_INFO = 102, @@ -56,7 +53,7 @@ enum LanguageStringID MENU_EXIT = 109, MENU_OPEN_COMBO = 110, - //System Menu + // System menu MENU_SYSTEM = 120, MENU_RESET = 121, MENU_PAUSE = 122, @@ -75,7 +72,7 @@ enum LanguageStringID MENU_SWAPDISK = 135, MENU_ENHANCEMENT = 136, - //Options Menu + // Options menu MENU_OPTIONS = 140, MENU_FULL_SCREEN = 141, MENU_ON_TOP = 142, @@ -86,20 +83,20 @@ enum LanguageStringID MENU_SHOW_CPU = 147, MENU_SETTINGS = 148, - //Debugger Menu + // Debugger menu MENU_DEBUGGER = 160, - //Language Menu + // Language menu MENU_LANGUAGE = 175, - //Help Menu + // Help menu MENU_HELP = 180, MENU_ABOUT_PJ64 = 182, MENU_WEBSITE = 184, MENU_SUPPORT_PROJECT64 = 185, MENU_DISCORD = 186, - //Current Save Slot menu + // Current save slot menu MENU_SLOT_DEFAULT = 190, MENU_SLOT_1 = 191, MENU_SLOT_2 = 192, @@ -113,7 +110,7 @@ enum LanguageStringID MENU_SLOT_10 = 200, MENU_SLOT_SAVE = 201, - //Pop up Menu + // Pop up menu POPUP_PLAY = 210, POPUP_INFO = 211, POPUP_SETTINGS = 212, @@ -122,7 +119,7 @@ enum LanguageStringID POPUP_PLAYDISK = 215, POPUP_ENHANCEMENTS = 216, - //selecting save slot + // Selecting save slot SAVE_SLOT_DEFAULT = 220, SAVE_SLOT_1 = 221, SAVE_SLOT_2 = 222, @@ -135,7 +132,7 @@ enum LanguageStringID SAVE_SLOT_9 = 229, SAVE_SLOT_10 = 230, - // Menu Descriptions (TODO: unused ? implement or remove) + // Menu descriptions (TODO: Unused? Implement or remove) MENUDES_OPEN = 250, MENUDES_ROM_INFO = 251, MENUDES_START = 252, @@ -174,10 +171,10 @@ enum LanguageStringID MENUDES_GAME_SETTINGS = 285, MENUDES_GAME_CHEATS = 286, - /********************************************************************************* - * Rom Browser * - *********************************************************************************/ - //Rom Browser Fields + + // ROM browser + + // ROM browser fields RB_FILENAME = 300, RB_INTERNALNAME = 301, RB_GOODNAME = 302, @@ -201,19 +198,18 @@ enum LanguageStringID RB_NAME = 321, - //Select Rom + // Select ROM SELECT_ROM_DIR = 320, - //Messages + // Messages RB_NOT_GOOD_FILE = 340, - /********************************************************************************* - * Options * - *********************************************************************************/ - //Options Title + // Options + + // Options title OPTIONS_TITLE = 400, - //Tabs + // Tabs TAB_PLUGIN = 401, TAB_DIRECTORY = 402, TAB_OPTIONS = 403, @@ -229,7 +225,7 @@ enum LanguageStringID TAB_DISKDRIVE = 413, TAB_DISKSETTINGS = 414, - //Plugin Dialog + // Plugin dialog PLUG_ABOUT = 420, PLUG_RSP = 421, PLUG_GFX = 422, @@ -239,7 +235,7 @@ enum LanguageStringID PLUG_HLE_AUDIO = 426, PLUG_DEFAULT = 427, - //Directory Dialog + // Directory dialog DIR_PLUGIN = 440, DIR_ROM = 441, DIR_AUTO_SAVE = 442, @@ -254,7 +250,7 @@ enum LanguageStringID DIR_TEXTURE = 451, DIR_SELECT_TEXTURE = 452, - //Options (general) Tab + // Options (general) tab OPTION_AUTO_SLEEP = 460, OPTION_AUTO_FULLSCREEN = 461, OPTION_BASIC_MODE = 462, @@ -273,7 +269,7 @@ enum LanguageStringID OPTION_SHOW_STATUS_BAR = 474, OPTION_EXIT_FULLSCREEN_ON_LOSE_FOCUS = 475, - //Rom Browser Tab + // ROM browser tab RB_MAX_ROMS = 480, RB_ROMS = 481, RB_MAX_DIRS = 482, @@ -289,7 +285,7 @@ enum LanguageStringID RB_REFRESH = 492, RB_FILEEXT = 493, - //Advanced Options + // Advanced options ADVANCE_INFO = 500, ADVANCE_DEFAULTS = 501, ADVANCE_CPU_STYLE = 502, @@ -306,7 +302,7 @@ enum LanguageStringID ADVANCE_SMM_PROTECT = 513, ADVANCE_SMM_TLB = 514, - //Rom Options + // ROM options ROM_CPU_STYLE = 520, ROM_VIREFRESH = 521, ROM_MEM_SIZE = 522, @@ -335,12 +331,12 @@ enum LanguageStringID ROM_DISK_SEEK_TIMING_TURBO = 5441, ROM_DISK_SEEK_TIMING_SLOW = 5442, - //Core Styles + // Core styles CORE_INTERPTER = 540, CORE_RECOMPILER = 541, CORE_SYNC = 542, - //Self Mod Methods + // Self-mod methods SMCM_NONE = 560, SMCM_CACHE = 561, SMCM_PROECTED = 562, @@ -349,35 +345,35 @@ enum LanguageStringID SMCM_CHECK_ADV = 565, SMCM_CACHE2 = 566, - //Function Lookup memthod + // Function lookup method FLM_PLOOKUP = 570, FLM_VLOOKUP = 571, FLM_CHANGEMEM = 572, - //RDRAM Size + // RDRAM size RDRAM_4MB = 580, RDRAM_8MB = 581, - //Advanced Block Linking + // Advanced block linking ABL_ON = 600, ABL_OFF = 601, - //Save Type + // Save type SAVE_FIRST_USED = 620, SAVE_4K_EEPROM = 621, SAVE_16K_EEPROM = 622, SAVE_SRAM = 623, SAVE_FLASHRAM = 624, - //Shell Integration Tab + // Shell integration tab SHELL_TEXT = 640, - //Rom Notes + // ROM notes NOTE_STATUS = 660, NOTE_CORE = 661, NOTE_PLUGIN = 662, - // Accelerator Selector + // Accelerator selector ACCEL_CPUSTATE_TITLE = 680, ACCEL_MENUITEM_TITLE = 681, ACCEL_CURRENTKEYS_TITLE = 682, @@ -392,7 +388,7 @@ enum LanguageStringID ACCEL_CPUSTATE_4 = 691, ACCEL_DETECTKEY = 692, - // Frame Rate Option + // Frame rate option STR_FR_VIS = 700, STR_FR_DLS = 701, STR_FR_PERCENT = 702, @@ -403,23 +399,22 @@ enum LanguageStringID STR_INSREASE_SPEED = 710, STR_DECREASE_SPEED = 711, - //Bottom page buttons + // Bottom page buttons BOTTOM_RESET_PAGE = 720, BOTTOM_RESET_ALL = 721, BOTTOM_APPLY = 722, BOTTOM_CLOSE = 723, - //Disk Save Type + // Disk save type DISKSAVE_SHADOW = 730, DISKSAVE_RAM = 731, - /********************************************************************************* - * ROM Information * - *********************************************************************************/ - //Rom Info Title Title + // ROM information + + // ROM info title INFO_TITLE = 800, - //Rom Info Text + // ROM info text INFO_ROM_NAME_TEXT = 801, INFO_FILE_NAME_TEXT = 802, INFO_LOCATION_TEXT = 803, @@ -432,17 +427,16 @@ enum LanguageStringID INFO_CIC_CHIP_TEXT = 810, INFO_MD5_TEXT = 811, - /********************************************************************************* - * Cheats * - *********************************************************************************/ - //Cheat List + // Cheats + + // Cheat list CHEAT_TITLE = 1000, CHEAT_LIST_FRAME = 1001, CHEAT_NOTES_FRAME = 1002, CHEAT_MARK_ALL = 1003, CHEAT_MARK_NONE = 1004, - //Add Cheat + // Add cheat CHEAT_ADDCHEAT_FRAME = 1005, CHEAT_ADDCHEAT_NAME = 1006, CHEAT_ADDCHEAT_CODE = 1007, @@ -451,13 +445,13 @@ enum LanguageStringID CHEAT_ADDCHEAT_NOTES = 1010, CHEAT_ADD_TO_DB = 1011, - //Code extension + // Code extension CHEAT_CODE_EXT_TITLE = 1012, CHEAT_CODE_EXT_TXT = 1013, CHEAT_OK = 1014, CHEAT_CANCEL = 1015, - //Digital Value + // Digital value CHEAT_QUANTITY_TITLE = 1016, CHEAT_CHOOSE_VALUE = 1017, CHEAT_VALUE = 1018, @@ -470,18 +464,18 @@ enum LanguageStringID CHEAT_ADDCHEAT_OPT = 1025, CHEAT_ADDCHEAT_OPTDES = 1026, - //Edit Cheat + // Edit cheat CHEAT_EDITCHEAT_WINDOW = 1027, CHEAT_EDITCHEAT_UPDATE = 1028, CHEAT_CHANGED_MSG = 1029, CHEAT_CHANGED_TITLE = 1030, - //Cheat Popup Menu + // Cheat popup menu CHEAT_ADDNEW = 1040, CHEAT_EDIT = 1041, CHEAT_DELETE = 1042, - // short cut editor + // Short cut editor STR_SHORTCUT_RESET_TITLE = 1100, STR_SHORTCUT_RESET_TEXT = 1101, STR_SHORTCUT_FILEMENU = 1102, @@ -489,9 +483,8 @@ enum LanguageStringID STR_SHORTCUT_OPTIONS = 1104, STR_SHORTCUT_SAVESLOT = 1105, - /********************************************************************************* - * Support Window * - *********************************************************************************/ + // Support window + MSG_SUPPORT_TITLE = 1200, MSG_SUPPORT_INFO = 1201, MSG_SUPPORT_ENTER_CODE = 1202, @@ -508,14 +501,12 @@ enum LanguageStringID MSG_SUPPORT_REQUESTCODE_SUCCESS = 1213, MSG_SUPPORT_REQUESTCODE_FAIL = 1214, - /********************************************************************************* - * Enhancements * - *********************************************************************************/ + // Enhancements + ENHANCEMENT_TITLE = 1300, - /********************************************************************************* - * Messages * - *********************************************************************************/ + // Messages + MSG_CPU_PAUSED = 2000, MSG_CPU_RESUMED = 2001, MSG_PERM_LOOP = 2002, @@ -582,9 +573,8 @@ enum LanguageStringID MSG_CHEAT_INVALID_MSG = 2063, MSG_CHEAT_INVALID_TITLE = 2064, - /********************************************************************************* - * Android * - *********************************************************************************/ + // Android + ANDROID_SETTINGS = 3000, ANDROID_FORUM = 3001, ANDROID_REPORT_BUG = 3002, @@ -610,7 +600,7 @@ enum LanguageStringID ANDROID_SUPPORT_PJ64 = 3022, ANDROID_REVIEW_PJ64 = 3023, - //In game menu + // In-game menu ANDROID_MENU_SETTINGS = 3100, ANDROID_MENU_SAVESTATE = 3101, ANDROID_MENU_LOADSTATE = 3102, @@ -626,7 +616,7 @@ enum LanguageStringID ANDROID_MENU_RESETFUNCTIONTIMES = 3112, ANDROID_MENU_DUMPFUNCTIONTIMES = 3113, - //Video plugin + // Video plugin ANDROID_VIDEO_NATIVE_RES = 3200, }; From 4458dc3375a73e1d1a7150ac5d859ea9bd290f6f Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:34:27 -0500 Subject: [PATCH 04/16] Update Notification.h Fix comments --- Source/Project64-core/Notification.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Project64-core/Notification.h b/Source/Project64-core/Notification.h index fd14bfb19..a3d828070 100644 --- a/Source/Project64-core/Notification.h +++ b/Source/Project64-core/Notification.h @@ -9,14 +9,14 @@ __interface CNotification { public: - //Error Messages + // Error messages virtual void DisplayError(const char * Message) const = 0; virtual void DisplayError(LanguageStringID StringID) const = 0; virtual void FatalError(const char * Message) const = 0; virtual void FatalError(LanguageStringID StringID) const = 0; - //User Feedback + // User feedback virtual void DisplayWarning(const char * Message) const = 0; virtual void DisplayWarning(LanguageStringID StringID) const = 0; @@ -24,7 +24,7 @@ public: virtual void DisplayMessage(int DisplayTime, LanguageStringID StringID) const = 0; virtual void DisplayMessage2(const char * Message) const = 0; - // Ask a Yes/No Question to the user, yes = true, no = false + // Ask a yes/no question to the user, yes = true, no = false virtual bool AskYesNoQuestion(const char * Question) const = 0; virtual void BreakPoint(const char * FileName, int32_t LineNumber) = 0; From 0a18fb5c1f6c53a834c9f1ef0892df3b9475afa1 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:34:35 -0500 Subject: [PATCH 05/16] Update Plugin.h Fix comments --- Source/Project64-core/Plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Project64-core/Plugin.h b/Source/Project64-core/Plugin.h index f27d35836..c737b6c55 100644 --- a/Source/Project64-core/Plugin.h +++ b/Source/Project64-core/Plugin.h @@ -1,9 +1,9 @@ #pragma once -//Plugin controller +// Plugin controller #include -//Base Plugin class, all plugin derive from this, handles core functions +// Base plugin class, all plugins derive from this and it handles core functions #include #include "Plugins/GFXPlugin.h" From 6aff37327aeb62a4147df36103c5347b45bcb147 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:34:50 -0500 Subject: [PATCH 06/16] Update Settings.cpp Fix comments --- Source/Project64-core/Settings.cpp | 56 +++++++++++++++--------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Source/Project64-core/Settings.cpp b/Source/Project64-core/Settings.cpp index 0c66ad9d5..c464c4095 100644 --- a/Source/Project64-core/Settings.cpp +++ b/Source/Project64-core/Settings.cpp @@ -72,13 +72,13 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) { WriteTrace(TraceAppInit, TraceDebug, "Start"); - //Command Settings + // Command settings AddHandler(Cmd_BaseDirectory, new CSettingTypeTempString(BaseDirectory)); AddHandler(Cmd_ShowHelp, new CSettingTypeTempBool(false)); AddHandler(Cmd_RomFile, new CSettingTypeTempString("")); AddHandler(Cmd_ComboDiskFile, new CSettingTypeTempString("")); - //Support Files + // Support files AddHandler(SupportFile_Settings, new CSettingTypeApplicationPath("Settings", "ConfigFile", SupportFile_SettingsDefault)); AddHandler(SupportFile_SettingsDefault, new CSettingTypeRelativePath("Config", "Project64.cfg")); AddHandler(SupportFile_RomDatabase, new CSettingTypeApplicationPath("Settings", "RomDatabase", SupportFile_RomDatabaseDefault)); @@ -100,7 +100,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(SupportFile_ExtInfo, new CSettingTypeApplicationPath("Settings", "ExtInfo", SupportFile_ExtInfoDefault)); AddHandler(SupportFile_ExtInfoDefault, new CSettingTypeRelativePath("Config", "Project64.rdx")); - //Settings location + // Settings location AddHandler(Setting_ApplicationName, new CSettingTypeTempString("")); AddHandler(Setting_UseFromRegistry, new CSettingTypeApplication("Settings", "Use Registry", (uint32_t)false)); AddHandler(Setting_RdbEditor, new CSettingTypeApplication("Settings", "Rdb Editor", false)); @@ -245,7 +245,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Game_RPCKey, new CSettingTypeTempString("")); AddHandler(Game_DiskSeekTiming, new CSettingTypeGame("DiskSeekTiming", Rdb_DiskSeekTiming)); - //User Interface + // User interface AddHandler(UserInterface_ShowCPUPer, new CSettingTypeApplication("Settings", "Display CPU Usage", (uint32_t)false)); AddHandler(UserInterface_DisplayFrameRate, new CSettingTypeApplication("Settings", "Display Frame Rate", (uint32_t)false)); AddHandler(UserInterface_FrameDisplayType, new CSettingTypeApplication("Settings", "Frame Rate Display Type", (uint32_t)FR_VIs)); @@ -347,7 +347,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Debugger_AppLogFlush, new CSettingTypeApplication("Logging", "Log Auto Flush", (uint32_t)false)); AddHandler(Debugger_RecordRecompilerAsm, new CSettingTypeApplication("Debugger", "Record Recompiler Asm", false)); - //Logging + // Logging AddHandler(Debugger_TraceMD5, new CSettingTypeApplication("Logging", "MD5", (uint32_t)g_ModuleLogLevel[TraceMD5])); AddHandler(Debugger_TraceThread, new CSettingTypeApplication("Logging", "Thread", (uint32_t)g_ModuleLogLevel[TraceThread])); AddHandler(Debugger_TracePath, new CSettingTypeApplication("Logging", "Path", (uint32_t)g_ModuleLogLevel[TracePath])); @@ -371,7 +371,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Debugger_TraceRomList, new CSettingTypeApplication("Logging", "Rom List", (uint32_t)g_ModuleLogLevel[TraceRomList])); AddHandler(Debugger_TraceExceptionHandler, new CSettingTypeApplication("Logging", "Exception Handler", (uint32_t)g_ModuleLogLevel[TraceExceptionHandler])); - //Plugin + // Plugin #ifdef _WIN32 AddHandler(Plugin_RSP_Current, new CSettingTypeApplication("Plugin", "RSP Dll", "RSP\\RSP 1.7.dll")); #ifdef _DEBUG @@ -400,7 +400,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory) AddHandler(Plugin_UseHleAudio, new CSettingTypeApplication("RSP", "HLE Audio Plugin", false)); AddHandler(Plugin_EnableAudio, new CSettingTypeApplication("Audio", "Enable Audio", true)); - //Logging + // Logging AddHandler(Logging_GenerateLog, new CSettingTypeApplication("Logging", "Generate Log Files", false)); AddHandler(Logging_LogRDRamRegisters, new CSettingTypeApplication("Logging", "Log RDRam Registers", false)); AddHandler(Logging_LogSPRegisters, new CSettingTypeApplication("Logging", "Log SP Registers", false)); @@ -698,7 +698,7 @@ bool CSettings::LoadBool(SettingID Type, bool & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return 0; } @@ -725,7 +725,7 @@ bool CSettings::LoadBoolIndex(SettingID Type, uint32_t index, bool & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return false; } @@ -752,7 +752,7 @@ bool CSettings::LoadDword(SettingID Type, uint32_t & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return false; } @@ -779,7 +779,7 @@ bool CSettings::LoadDwordIndex(SettingID Type, uint32_t index, uint32_t & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return 0; } @@ -806,7 +806,7 @@ bool CSettings::LoadStringVal(SettingID Type, std::string & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return 0; } @@ -826,7 +826,7 @@ bool CSettings::LoadStringVal(SettingID Type, char * Buffer, uint32_t BufferSize SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return 0; } @@ -861,7 +861,7 @@ bool CSettings::LoadStringIndex(SettingID Type, uint32_t index, std::string & Va SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return 0; } @@ -882,7 +882,7 @@ bool CSettings::LoadStringIndex(SettingID /*Type*/, uint32_t /*index*/, char * / return false; } -//Load the default value for the setting +// Load the default value for the setting bool CSettings::LoadDefaultBool(SettingID Type) { bool Value = false; @@ -895,7 +895,7 @@ void CSettings::LoadDefaultBool(SettingID Type, bool & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } else @@ -934,7 +934,7 @@ void CSettings::LoadDefaultDword(SettingID Type, uint32_t & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } else @@ -973,7 +973,7 @@ void CSettings::LoadDefaultString(SettingID Type, std::string & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } else @@ -1015,7 +1015,7 @@ void CSettings::SaveBool(SettingID Type, bool Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return; } @@ -1035,7 +1035,7 @@ void CSettings::SaveBoolIndex(SettingID Type, uint32_t index, bool Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return; } @@ -1055,7 +1055,7 @@ void CSettings::SaveDword(SettingID Type, uint32_t Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return; } @@ -1075,7 +1075,7 @@ void CSettings::SaveDwordIndex(SettingID Type, uint32_t index, uint32_t Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return; } @@ -1095,7 +1095,7 @@ void CSettings::SaveString(SettingID Type, const std::string & Value) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); return; } @@ -1115,7 +1115,7 @@ void CSettings::SaveString(SettingID Type, const char * Buffer) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } else if (FindInfo->second->IndexBasedSetting()) @@ -1134,7 +1134,7 @@ void CSettings::SaveStringIndex(SettingID Type, uint32_t index, const char * Buf SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } if (FindInfo->second->IndexBasedSetting()) @@ -1158,7 +1158,7 @@ void CSettings::DeleteSetting(SettingID Type) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } if (FindInfo->second->IndexBasedSetting()) @@ -1177,7 +1177,7 @@ void CSettings::DeleteSettingIndex(SettingID Type, uint32_t index) SETTING_HANDLER FindInfo = m_SettingInfo.find(Type); if (FindInfo == m_SettingInfo.end()) { - //if not found do nothing + // If not found do nothing UnknownSetting(Type); } if (FindInfo->second->IndexBasedSetting()) @@ -1285,7 +1285,7 @@ void CSettings::UnregisterChangeCB(SettingID Type, void * Data, SettingChangedFu { bool bRemoved = false; - //Find out the information for handling the setting type from the list + // Find out the information for handling the setting type from the list SETTING_CALLBACK::iterator Callback = m_Callback.find(Type); if (Callback != m_Callback.end()) { From df6768b5795defeb1a341530403685024176fcfa Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:35:01 -0500 Subject: [PATCH 07/16] Update Settings.h Fix comments --- Source/Project64-core/Settings.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Project64-core/Settings.h b/Source/Project64-core/Settings.h index 95d662deb..4195d300d 100644 --- a/Source/Project64-core/Settings.h +++ b/Source/Project64-core/Settings.h @@ -25,7 +25,7 @@ public: bool Initialize(const char * BaseDirectory, const char * AppName); - //return the values + // Return the values bool LoadBool(SettingID Type); bool LoadBool(SettingID Type, bool & Value); bool LoadBoolIndex(SettingID Type, uint32_t index); @@ -41,7 +41,7 @@ public: bool LoadStringIndex(SettingID Type, uint32_t index, std::string & Value); bool LoadStringIndex(SettingID Type, uint32_t index, char * Buffer, uint32_t BufferSize); - //Load the default value for the setting + // Load the default value for the setting bool LoadDefaultBool(SettingID Type); void LoadDefaultBool(SettingID Type, bool & Value); bool LoadDefaultBoolIndex(SettingID Type, uint32_t index); @@ -57,7 +57,7 @@ public: void LoadDefaultStringIndex(SettingID Type, uint32_t index, std::string & Value); void LoadDefaultStringIndex(SettingID Type, uint32_t index, char * Buffer, uint32_t BufferSize); - //Update the settings + // Update the settings void SaveBool(SettingID Type, bool Value); void SaveBoolIndex(SettingID Type, uint32_t index, bool Value); void SaveDword(SettingID Type, uint32_t Value); @@ -71,17 +71,17 @@ public: void DeleteSetting(SettingID Type); void DeleteSettingIndex(SettingID Type, uint32_t index); - //Register Notification of change + // Register notification of change void RegisterChangeCB(SettingID Type, void * Data, SettingChangedFunc Func); void UnregisterChangeCB(SettingID Type, void * Data, SettingChangedFunc Func); - // information about setting + // Information about setting SettingType GetSettingType(SettingID Type); bool IndexBasedSetting(SettingID Type); void SettingTypeChanged(SettingType Type); bool IsSettingSet(SettingID Type); - // static functions for plugins + // Static functions for plugins static uint32_t GetSetting(CSettings * _this, SettingID Type); static const char * GetSettingSz(CSettings * _this, SettingID Type, char * Buffer, uint32_t BufferSize); static void SetSetting(CSettings * _this, SettingID ID, uint32_t Value); @@ -93,7 +93,7 @@ public: static void sRegisterChangeCB(CSettings * _this, SettingID Type, void * Data, SettingChangedFunc Func); static void sUnregisterChangeCB(CSettings * _this, SettingID Type, void * Data, SettingChangedFunc Func); - //Notification + // Notification void NotifyCallBacks(SettingID Type); void AddHandler(SettingID TypeID, CSettingType * Handler); From 95e0fed45cd55e361f60009e4f7824ee2ed05f08 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:35:07 -0500 Subject: [PATCH 08/16] Update stdafx.cpp Add newline --- Source/Project64-core/stdafx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Project64-core/stdafx.cpp b/Source/Project64-core/stdafx.cpp index 1577c4e3b..fd4f341c7 100644 --- a/Source/Project64-core/stdafx.cpp +++ b/Source/Project64-core/stdafx.cpp @@ -1 +1 @@ -#include "stdafx.h" \ No newline at end of file +#include "stdafx.h" From 3d036a4aa81f25e50c8e462b7fa7ef4afaf2ad83 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:35:13 -0500 Subject: [PATCH 09/16] Update TraceModulesProject64.h Add newline --- Source/Project64-core/TraceModulesProject64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Project64-core/TraceModulesProject64.h b/Source/Project64-core/TraceModulesProject64.h index 7eaa2fa88..2ca362eb3 100644 --- a/Source/Project64-core/TraceModulesProject64.h +++ b/Source/Project64-core/TraceModulesProject64.h @@ -23,4 +23,4 @@ enum TraceModuleProject64 TraceRomList, TraceExceptionHandler, MaxTraceModuleProject64, -}; \ No newline at end of file +}; From c30f1c63971640efa31a1829edbb020113fab166 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:35:51 -0500 Subject: [PATCH 10/16] Update MemoryExceptionFilter.cpp Fix comments, fix some UI and log typos, add newline --- .../Project64-core/MemoryExceptionFilter.cpp | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Source/Project64-core/MemoryExceptionFilter.cpp b/Source/Project64-core/MemoryExceptionFilter.cpp index 73bf39245..edb2b624e 100644 --- a/Source/Project64-core/MemoryExceptionFilter.cpp +++ b/Source/Project64-core/MemoryExceptionFilter.cpp @@ -27,7 +27,7 @@ bool CMipsMemoryVM::FilterX86Exception(uint32_t MemAddress, X86_CONTEXT & contex if ((int32_t)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory adderess: %X", MemAddress); + WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory address: %X", MemAddress); if (HaveDebugger()) { g_Notify->BreakPoint(__FILE__, __LINE__); @@ -445,7 +445,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context { if ((int32_t)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory adderess: %X", MemAddress); + WriteTrace(TraceExceptionHandler, TraceError, "Invalid memory address: %X", MemAddress); DumpArmExceptionInfo(MemAddress, context); g_Notify->BreakPoint(__FILE__, __LINE__); return false; @@ -488,7 +488,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm2.opcode == 0xF84 && OpCode32->imm2.Opcode2 == 0) { - //42 f8 03 c0 str.w ip, [r2, r3] + // 42 f8 03 c0 str.w ip, [r2, r3] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -502,7 +502,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm12.opcode == 0xF8C) { - //c9 f8 00 b0 str.w r11, [r9] + // c9 f8 00 b0 str.w r11, [r9] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -516,7 +516,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm12.opcode == 0xF8D) { - //dc f8 70 70 ldr.w r7, [ip, #112] + // dc f8 70 70 ldr.w r7, [ip, #112] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->imm12.rt])) { if (ShowUnhandledMemory()) @@ -530,8 +530,8 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 0 && OpCode32->reg_cond_imm5.opcode2 == 0 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //17847001 strne r7, [r4, r1] - //e789300c str r3, [r9, ip] + // 17847001 strne r7, [r4, r1] + // e789300c str r3, [r9, ip] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -543,7 +543,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context return true; } - if (OpCode->Reg.opcode == 0x2A) //STRB + if (OpCode->Reg.opcode == 0x2A) // STRB { if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode->Reg.rt])) { @@ -558,7 +558,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 1 && OpCode32->reg_cond_imm5.opcode2 == 0 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //17c32001 strbne r2, [r3, r1] + // 17c32001 strbne r2, [r3, r1] if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -572,7 +572,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm8.opcode == 0 && OpCode32->reg_cond_imm8.opcode1 == 1 && OpCode32->reg_cond_imm8.opcode2 == 0 && OpCode32->reg_cond_imm8.opcode3 == 0xB) { - //11c020b0 strhne r2, [r0] + // 11c020b0 strhne r2, [r0] if (!g_MMU->SH_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm8.rt])) { if (ShowUnhandledMemory()) @@ -614,7 +614,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xC) { - //2e 60 str r6, [r5, #0] + // 2e 60 str r6, [r5, #0] if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -628,7 +628,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xD) { - //3F 68 ldr r7, [r7, #0] + // 3F 68 ldr r7, [r7, #0] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -642,7 +642,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode->Imm5.opcode == 0xE) { - //b8 70 strb r0, [r7, #2] + // b8 70 strb r0, [r7, #2] if (!g_MMU->SB_NonMemory(MemAddress, *ArmRegisters[OpCode->Imm5.rt])) { if (ShowUnhandledMemory()) @@ -656,7 +656,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond.opcode == 0 && OpCode32->reg_cond.opcode1 == 0 && OpCode32->reg_cond.opcode2 == 0 && OpCode32->reg_cond.opcode3 == 0xB) { - //118320b1 strhne r2, [r3, r1] + // 118320b1 strhne r2, [r3, r1] if (!g_MMU->SH_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond.rt])) { if (ShowUnhandledMemory()) @@ -670,7 +670,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm12.opcode == 2 && OpCode32->reg_cond_imm12.opcode1 == 0 && OpCode32->reg_cond_imm12.opcode2 == 0) { - //e48a1004 str r1, [sl], #4 + // e48a1004 str r1, [sl], #4 if (!g_MMU->SW_NonMemory(MemAddress, *ArmRegisters[OpCode32->reg_cond_imm12.rt])) { if (ShowUnhandledMemory()) @@ -684,7 +684,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->uint16.opcode == ArmLDRH_W) { - //f833 c001 ldrh.w ip, [r3, r1] + // f833 c001 ldrh.w ip, [r3, r1] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->uint16.rt], false)) { if (ShowUnhandledMemory()) @@ -698,7 +698,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->uint32.opcode == ArmLDRH_Reg && OpCode32->uint32.opcode2 == 0xB) { - //e19a20b2 ldrh r2, [sl, r2] + // e19a20b2 ldrh r2, [sl, r2] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->uint32.rt], false)) { if (ShowUnhandledMemory()) @@ -712,8 +712,8 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond.opcode == 0 && OpCode32->reg_cond.opcode1 == 0 && OpCode32->reg_cond.opcode2 == 1 && OpCode32->reg_cond.opcode3 == 0xB) { - //119330b1 ldrhne r3, [r3, r1] - //11d000b0 ldrhne r0, [r0] + // 119330b1 ldrhne r3, [r3, r1] + // 11d000b0 ldrhne r0, [r0] if (!g_MMU->LH_NonMemory(MemAddress, ArmRegisters[OpCode32->reg_cond.rt], false)) { if (ShowUnhandledMemory()) @@ -727,7 +727,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->reg_cond_imm5.opcode == 3 && OpCode32->reg_cond_imm5.opcode1 == 0 && OpCode32->reg_cond_imm5.opcode2 == 1 && OpCode32->reg_cond_imm5.opcode3 == 0) { - //1790a001 ldrne sl, [r0, r1] + // 1790a001 ldrne sl, [r0, r1] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->reg_cond_imm5.rt])) { if (ShowUnhandledMemory()) @@ -741,7 +741,7 @@ bool CMipsMemoryVM::FilterArmException(uint32_t MemAddress, mcontext_t & context if (OpCode32->imm2.opcode == 0xF85 && OpCode32->imm2.Opcode2 == 0) { - //52 f8 21 30 ldr.w r3, [r2, r1, lsl #2] + // 52 f8 21 30 ldr.w r3, [r2, r1, lsl #2] if (!g_MMU->LW_NonMemory(MemAddress, ArmRegisters[OpCode32->imm2.rt])) { if (ShowUnhandledMemory()) @@ -771,7 +771,7 @@ void CMipsMemoryVM::segv_handler(int signal, siginfo_t *siginfo, void *sigcontex { ucontext_t *ucontext = (ucontext_t*)sigcontext; - WriteTrace(TraceExceptionHandler, TraceNotice, "Segmentation Fault!"); + WriteTrace(TraceExceptionHandler, TraceNotice, "Segmentation fault!"); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_signo = %d", signal); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_errno = %d", siginfo->si_errno); WriteTrace(TraceExceptionHandler, TraceNotice, "info.si_code = %d", siginfo->si_code); @@ -818,8 +818,8 @@ void CMipsMemoryVM::segv_handler(int signal, siginfo_t *siginfo, void *sigcontex return; } #endif - WriteTrace(TraceExceptionHandler, TraceError, "Failed quiting now"); - exit(0); //can't return to main, it's where the segfault occured. + WriteTrace(TraceExceptionHandler, TraceError, "Failed! Quitting now..."); + exit(0); // Can't return to main, this is where the segmentation fault occurred } #else @@ -834,7 +834,7 @@ int32_t CMipsMemoryVM::MemoryFilter(uint32_t dwExptCode, void * lpExceptionPoint } } - //convert the pointer since we are not having win32 structures in headers + // Convert the pointer since we are not having win32 structures in headers LPEXCEPTION_POINTERS lpEP = (LPEXCEPTION_POINTERS)lpExceptionPointer; uint32_t MemAddress = (char *)lpEP->ExceptionRecord->ExceptionInformation[1] - (char *)g_MMU->Rdram(); @@ -859,4 +859,4 @@ int32_t CMipsMemoryVM::MemoryFilter(uint32_t dwExptCode, void * lpExceptionPoint return EXCEPTION_EXECUTE_HANDLER; #endif } -#endif \ No newline at end of file +#endif From 8942ae2b47f2f90e9bebaceb142460f3989525c0 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 02:43:33 -0500 Subject: [PATCH 11/16] Update RomList.cpp Fix comments, and fix some log and trace typos --- Source/Project64-core/RomList/RomList.cpp | 79 +++++++++++------------ 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/Source/Project64-core/RomList/RomList.cpp b/Source/Project64-core/RomList/RomList.cpp index 88f864407..d8884e4d5 100644 --- a/Source/Project64-core/RomList/RomList.cpp +++ b/Source/Project64-core/RomList/RomList.cpp @@ -93,7 +93,7 @@ void CRomList::RefreshRomList(void) { if (m_RefreshThread.isRunning()) { - WriteTrace(TraceRomList, TraceVerbose, "already refreshing, ignoring"); + WriteTrace(TraceRomList, TraceVerbose, "Already refreshing, ignoring"); return; } WriteTrace(TraceRomList, TraceDebug, "Starting thread"); @@ -105,11 +105,11 @@ void CRomList::RefreshRomList(void) void CRomList::RefreshRomListThread(void) { WriteTrace(TraceRomList, TraceVerbose, "Start"); - //delete cache + // Delete cache CPath(g_Settings->LoadStringVal(RomList_RomListCache)).Delete(); - WriteTrace(TraceRomList, TraceVerbose, "Cache Deleted"); + WriteTrace(TraceRomList, TraceVerbose, "Cache deleted"); - //clear all current items + // Clear all current items RomListReset(); m_RomInfo.clear(); @@ -134,7 +134,7 @@ void CRomList::AddRomToList(const char * RomLocation) } else { - WriteTrace(TraceRomList, TraceVerbose, "Failed to fill rom information, ignoring"); + WriteTrace(TraceRomList, TraceVerbose, "Failed to fill ROM information, ignoring"); } WriteTrace(TraceRomList, TraceVerbose, "Done"); } @@ -158,7 +158,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory) WriteTrace(TraceRomList, TraceVerbose, "Found: \"%s\" m_StopRefresh = %s", (const char *)SearchDir, m_StopRefresh ? "true" : "false"); if (m_StopRefresh) { - WriteTrace(TraceRomList, TraceVerbose, "stop refresh set, stopping"); + WriteTrace(TraceRomList, TraceVerbose, "Stop refresh set, stopping"); break; } @@ -262,7 +262,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory) WriteTrace(TraceUserInterface, TraceDebug, "11a %s", RomHeader.c_str()); int32_t CicChip = CN64Rom::GetCicChipID(RomData); - //save this info + // Save this info WriteTrace(TraceUserInterface, TraceDebug, "12"); m_ZipIniFile->SaveString(SectionName.c_str(), FileName.c_str(), RomHeader.c_str()); m_ZipIniFile->SaveNumber(SectionName.c_str(), stdstr_f("%s-Cic", FileName.c_str()).c_str(), CicChip); @@ -310,7 +310,7 @@ void CRomList::FillRomList(strlist & FileList, const char * Directory) } catch (...) { - WriteTrace(TraceUserInterface, TraceError, "exception processing %s", (LPCSTR)SearchDir); + WriteTrace(TraceUserInterface, TraceError, "Exception processing %s", (LPCSTR)SearchDir); } } #endif @@ -421,9 +421,9 @@ bool CRomList::LoadDataFromRomFile(const char * FileName, uint8_t * Data, int32_ uint32_t diskidoffset = 0x43670; uint32_t romdataoffset = 0x738C0; bool isValidDisk = false; - //Could still be a Disk Image + // Could still be a disk image - //System Data + // System data const uint8_t blocks[7] = { 2, 3, 10, 11, 1, 8, 9 }; for (int i = 0; i < 7; i++) { @@ -462,7 +462,7 @@ bool CRomList::LoadDataFromRomFile(const char * FileName, uint8_t * Data, int32_ } else if (CN64Disk::IsValidDiskImage(Test)) { - //Is a Disk Image + // If it is a disk image uint32_t sysdataoffset = 0; uint32_t diskidoffset = 0x100; uint32_t romdataoffset = 0x200; @@ -564,7 +564,7 @@ bool CRomList::FillRomInfo(ROM_INFO * pRomInfo) void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo) { - //Initialize the structure + // Initialize the structure pRomInfo->UserNotes[0] = '\0'; pRomInfo->Developer[0] = '\0'; pRomInfo->ReleaseDate[0] = '\0'; @@ -588,29 +588,29 @@ void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo) } } - //Rom Notes + // ROM notes strncpy(pRomInfo->UserNotes, m_NotesIniFile->GetString(Identifier, "Note", "").c_str(), sizeof(pRomInfo->UserNotes) / sizeof(char)); - //Rom Extension info + // ROM extension info strncpy(pRomInfo->Developer, m_ExtIniFile->GetString(Identifier, "Developer", "").c_str(), sizeof(pRomInfo->Developer) / sizeof(char)); strncpy(pRomInfo->ReleaseDate, m_ExtIniFile->GetString(Identifier, "ReleaseDate", "").c_str(), sizeof(pRomInfo->ReleaseDate) / sizeof(char)); strncpy(pRomInfo->Genre, m_ExtIniFile->GetString(Identifier, "Genre", "").c_str(), sizeof(pRomInfo->Genre) / sizeof(char)); m_ExtIniFile->GetNumber(Identifier, "Players", 1, (uint32_t &)pRomInfo->Players); strncpy(pRomInfo->ForceFeedback, m_ExtIniFile->GetString(Identifier, "ForceFeedback", "unknown").c_str(), sizeof(pRomInfo->ForceFeedback) / sizeof(char)); - //Rom Settings + // ROM settings strncpy(pRomInfo->GoodName, m_RomIniFile->GetString(Identifier, "Good Name", pRomInfo->GoodName).c_str(), sizeof(pRomInfo->GoodName) / sizeof(char)); strncpy(pRomInfo->Name, m_RomIniFile->GetString(Identifier, "Good Name", pRomInfo->Name).c_str(), sizeof(pRomInfo->Name) / sizeof(char)); strncpy(pRomInfo->Status, m_RomIniFile->GetString(Identifier, "Status", pRomInfo->Status).c_str(), sizeof(pRomInfo->Status) / sizeof(char)); strncpy(pRomInfo->CoreNotes, m_RomIniFile->GetString(Identifier, "Core Note", "").c_str(), sizeof(pRomInfo->CoreNotes) / sizeof(char)); strncpy(pRomInfo->PluginNotes, m_RomIniFile->GetString(Identifier, "Plugin Note", "").c_str(), sizeof(pRomInfo->PluginNotes) / sizeof(char)); - //Get the text color + // Get the text color stdstr String = m_RomIniFile->GetString("Rom Status", pRomInfo->Status, "000000"); pRomInfo->TextColor = (strtoul(String.c_str(), 0, 16) & 0xFFFFFF); pRomInfo->TextColor = (pRomInfo->TextColor & 0x00FF00) | ((pRomInfo->TextColor >> 0x10) & 0xFF) | ((pRomInfo->TextColor & 0xFF) << 0x10); - //Get the selected color + // Get the selected color String.Format("%s.Sel", pRomInfo->Status); String = m_RomIniFile->GetString("Rom Status", String.c_str(), "FFFFFFFF"); uint32_t selcol = strtoul(String.c_str(), NULL, 16); @@ -624,7 +624,7 @@ void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo) pRomInfo->SelColor = selcol; } - //Get the selected text color + // Get the selected text color String.Format("%s.Seltext", pRomInfo->Status); String = m_RomIniFile->GetString("Rom Status", String.c_str(), "FFFFFF"); pRomInfo->SelTextColor = (strtoul(String.c_str(), 0, 16) & 0xFFFFFF); @@ -638,9 +638,9 @@ void CRomList::ByteSwapRomData(uint8_t * Data, int32_t DataLen) switch (*((uint32_t *)&Data[0])) { case 0x12408037: - case 0x07408027: //64DD IPL - case 0xD316E848: //64DD JP Disk - case 0xEE562263: //64DD US Disk + case 0x07408027: // 64DD IPL + case 0xD316E848: // 64DD JP disk + case 0xEE562263: // 64DD US disk for (count = 0; count < DataLen; count += 4) { Data[count] ^= Data[count + 2]; @@ -651,11 +651,11 @@ void CRomList::ByteSwapRomData(uint8_t * Data, int32_t DataLen) Data[count + 1] ^= Data[count + 3]; } break; - case 0x40072780: //64DD IPL - case 0x16D348E8: //64DD JP Disk - case 0x56EE6322: //64DD US Disk + case 0x40072780: // 64DD IPL + case 0x16D348E8: // 64DD JP disk + case 0x56EE6322: // 64DD US disk case 0x40123780: - case 0x00000000: //64DD DEV Disk + case 0x00000000: // 64DD DEV disk for (count = 0; count < DataLen; count += 4) { Data[count] ^= Data[count + 3]; @@ -667,9 +667,9 @@ void CRomList::ByteSwapRomData(uint8_t * Data, int32_t DataLen) } break; case 0x80371240: - case 0x80270740: //64DD IPL - case 0xE848D316: //64DD JP Disk - case 0x2263EE56: //64DD US Disk + case 0x80270740: // 64DD IPL + case 0xE848D316: // 64DD JP disk + case 0x2263EE56: // 64DD US disk break; } } @@ -682,7 +682,7 @@ void CRomList::LoadRomList(void) if (!file.IsOpen()) { - //if file does not exist then refresh the data + // If file does not exist then refresh the data RefreshRomList(); return; } @@ -694,7 +694,7 @@ void CRomList::LoadRomList(void) return; } - //Read the size of ROM_INFO + // Read the size of ROM_INFO int32_t RomInfoSize = 0; if (!file.Read(&RomInfoSize, sizeof(RomInfoSize)) || RomInfoSize != sizeof(ROM_INFO)) { @@ -703,11 +703,11 @@ void CRomList::LoadRomList(void) return; } - //Read the Number of entries + // Read the number of entries int32_t Entries = 0; file.Read(&Entries, sizeof(Entries)); - //Read Every Entry + // Read every entry m_RomInfo.clear(); RomListReset(); for (int32_t count = 0; count < Entries; count++) @@ -722,10 +722,9 @@ void CRomList::LoadRomList(void) WriteTrace(TraceRomList, TraceVerbose, "Done"); } -/* -* SaveRomList - save all the rom information about the current roms in the rom brower -* to a cache file, so it is quick to reload the information -*/ +// SaveRomList - save all the ROM information about the current ROMs in the ROM browser +// to a cache file, so it is quick to reload the information + void CRomList::SaveRomList(strlist & FileList) { MD5 ListHash = RomListHash(FileList); @@ -734,21 +733,21 @@ void CRomList::SaveRomList(strlist & FileList) CFile file(FileName, CFileBase::modeWrite | CFileBase::modeCreate); file.Write(ListHash.raw_digest(), 16); - //Write the size of ROM_INFO + // Write the size of ROM_INFO int32_t RomInfoSize = sizeof(ROM_INFO); file.Write(&RomInfoSize, sizeof(RomInfoSize)); - //Write the Number of entries + // Write the number of entries int32_t Entries = m_RomInfo.size(); file.Write(&Entries, sizeof(Entries)); - //Write Every Entry + // Write every entry for (int32_t count = 0; count < Entries; count++) { file.Write(&m_RomInfo[count], RomInfoSize); } - //Close the file handle + // Close the file handle file.Close(); } From 821766666e6a8d02cf47825fb09067ebb833bf61 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 03:12:48 -0500 Subject: [PATCH 12/16] Update 7zip.cpp Fix comments, add newline --- Source/Project64-core/3rdParty/7zip.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Project64-core/3rdParty/7zip.cpp b/Source/Project64-core/3rdParty/7zip.cpp index b9b51f95e..1f7ab00b0 100644 --- a/Source/Project64-core/3rdParty/7zip.cpp +++ b/Source/Project64-core/3rdParty/7zip.cpp @@ -36,7 +36,7 @@ m_Opened(false) InFile_Open(&m_archiveStream.file, FileName); if (m_archiveStream.file.handle == INVALID_HANDLE_VALUE) { - //PrintError("can not open input file"); + //PrintError("Can not open input file"); return; } m_FileSize = GetFileSize(m_archiveStream.file.handle, NULL); @@ -58,7 +58,7 @@ m_Opened(false) } else { - //SzArEx_Open will delete the passed db if it fails + // SzArEx_Open will delete the passed database if it fails m_db = NULL; } } @@ -227,16 +227,16 @@ std::wstring C7zip::FileNameIndex(int index) std::wstring filename; if (m_db == NULL || m_db->FileNameOffsets == 0) { - /* no filename */ + // No filename return filename; } int namelen = SzArEx_GetFileNameUtf16(m_db, index, NULL); if (namelen <= 0) { - /* no filename */ + // No filename return filename; } filename.resize(namelen); SzArEx_GetFileNameUtf16(m_db, index, (UInt16 *)filename.c_str()); return filename; -} \ No newline at end of file +} From 3c650bdde742878c2d87a76de1a742673fe70a81 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 03:14:15 -0500 Subject: [PATCH 13/16] Update 7zip.h Fix comments --- Source/Project64-core/3rdParty/7zip.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Project64-core/3rdParty/7zip.h b/Source/Project64-core/3rdParty/7zip.h index 6f64673a1..22b179d7b 100644 --- a/Source/Project64-core/3rdParty/7zip.h +++ b/Source/Project64-core/3rdParty/7zip.h @@ -55,13 +55,13 @@ private: int m_CurrentFile; bool m_Opened; - //Used for extraction - UInt32 m_blockIndex; // it can have any value before first call (if outBuffer = 0) - Byte * m_outBuffer; // it must be 0 before first call for each new archive. - size_t m_outBufferSize; // it can have any value before first call (if outBuffer = 0) + // Used for extraction + UInt32 m_blockIndex; // It can have any value before first call (if outBuffer = 0) + Byte * m_outBuffer; // It must be 0 before first call for each new archive + size_t m_outBufferSize; // It can have any value before first call (if outBuffer = 0) static void * AllocAllocImp(void *p, size_t size); - static void AllocFreeImp(void *p, void *address); /* address can be 0 */ + static void AllocFreeImp(void *p, void *address); // Address can be 0 static SRes SzFileReadImp(void *object, void *buffer, size_t *processedSize); static SRes SzFileSeekImp(void *p, Int64 *pos, ESzSeek origin); From 536ccbc8949333600cc3fc8f47f4d216a02e9209 Mon Sep 17 00:00:00 2001 From: "Derek \"Turtle\" Roe" Date: Fri, 2 Apr 2021 03:15:37 -0500 Subject: [PATCH 14/16] Update LanguageClass.cpp Fix comments, add a TODO, fix and update a ton of the UI text, add newline --- .../Multilanguage/LanguageClass.cpp | 210 +++++++++--------- 1 file changed, 99 insertions(+), 111 deletions(-) diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index e43268fd0..4351ac08a 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -11,16 +11,15 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(EMPTY_STRING, ""); - /********************************************************************************* - * Meta Information * - *********************************************************************************/ - //About DLL + // Meta information + + // About DLL DEF_STR(LANGUAGE_NAME, ""); DEF_STR(LANGUAGE_AUTHOR, ""); DEF_STR(LANGUAGE_VERSION, ""); DEF_STR(LANGUAGE_DATE, ""); - //About DLL Dialog + // About DLL dialog DEF_STR(INI_CURRENT_LANG, "Current Language"); DEF_STR(INI_AUTHOR, "Author"); DEF_STR(INI_VERSION, "Version"); @@ -30,12 +29,11 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(INI_CURRENT_CHT, "Cheat Code File (.CHT)"); DEF_STR(INI_CURRENT_RDX, "Extended ROM Info (.RDX)"); - //About INI title + // About INI title DEF_STR(INI_TITLE, "About Config Files"); - /********************************************************************************* - * Numbers * - *********************************************************************************/ + // Numbers + DEF_STR(NUMBER_0, "0"); DEF_STR(NUMBER_1, "1"); DEF_STR(NUMBER_2, "2"); @@ -47,10 +45,9 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(NUMBER_8, "8"); DEF_STR(NUMBER_9, "9"); - /********************************************************************************* - * Menu * - *********************************************************************************/ - //File Menu + // Menu + + // File menu DEF_STR(MENU_FILE, "&File"); DEF_STR(MENU_OPEN, "&Open ROM"); DEF_STR(MENU_ROM_INFO, "ROM &Info...."); @@ -63,7 +60,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_EXIT, "E&xit"); DEF_STR(MENU_OPEN_COMBO, "Open &Combo"); - //System Menu + // System menu DEF_STR(MENU_SYSTEM, "&System"); DEF_STR(MENU_RESET, "&Reset"); DEF_STR(MENU_PAUSE, "&Pause"); @@ -82,7 +79,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SWAPDISK, "Swap &Disk"); DEF_STR(MENU_ENHANCEMENT, "Enhancement..."); - //Options Menu + // Options menu DEF_STR(MENU_OPTIONS, "&Options"); DEF_STR(MENU_FULL_SCREEN, "&Full Screen"); DEF_STR(MENU_ON_TOP, "&Always on &Top"); @@ -93,20 +90,20 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SHOW_CPU, "Show CPU Usage"); DEF_STR(MENU_SETTINGS, "&Settings..."); - //Debugger Menu + // Debugger menu DEF_STR(MENU_DEBUGGER, "&Debugger"); - //Language Menu + // Language menu DEF_STR(MENU_LANGUAGE, "&Language"); - //Help Menu + // Help menu DEF_STR(MENU_HELP, "&Help"); DEF_STR(MENU_ABOUT_PJ64, "&About Project64"); DEF_STR(MENU_WEBSITE, "&Website"); DEF_STR(MENU_SUPPORT_PROJECT64, "&Support Project64"); DEF_STR(MENU_DISCORD, "&Discord"); - //Current Save Slot menu + // Current save slot menu DEF_STR(MENU_SLOT_DEFAULT, "Default"); DEF_STR(MENU_SLOT_1, "Slot 1"); DEF_STR(MENU_SLOT_2, "Slot 2"); @@ -120,7 +117,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(MENU_SLOT_10, "Slot 10"); DEF_STR(MENU_SLOT_SAVE, "Save slot (%s) selected"); - //Pop up Menu + // Pop-up menu DEF_STR(POPUP_PLAY, "Play Game"); DEF_STR(POPUP_INFO, "ROM Information"); DEF_STR(POPUP_SETTINGS, "Edit Game Settings"); @@ -129,7 +126,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(POPUP_PLAYDISK, "Play Game with Disk"); DEF_STR(POPUP_ENHANCEMENTS, "Choose Enhancement"); - //Alternate Name to save Slot + // Alternate name to save slot DEF_STR(SAVE_SLOT_DEFAULT, "Save Slot - Default"); DEF_STR(SAVE_SLOT_1, "Save Slot - 1"); DEF_STR(SAVE_SLOT_2, "Save Slot - 2"); @@ -142,10 +139,9 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(SAVE_SLOT_9, "Save Slot - 9"); DEF_STR(SAVE_SLOT_10, "Save Slot - 10"); - /********************************************************************************* - * ROM Browser * - *********************************************************************************/ - //ROM Browser Fields + // ROM browser + + // ROM browser fields DEF_STR(RB_FILENAME, "File Name"); DEF_STR(RB_INTERNALNAME, "Internal Name"); DEF_STR(RB_GOODNAME, "Good Name"); @@ -168,19 +164,18 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_FORCE_FEEDBACK, "Force Feedback"); DEF_STR(RB_FILE_FORMAT, "File Format"); - //Select ROM + // Select ROM DEF_STR(SELECT_ROM_DIR, "Select current ROM directory"); - //Messages + // Messages (TODO: GoodN64 is no longer maintained and perhaps should be replaced with references to something else?) DEF_STR(RB_NOT_GOOD_FILE, "Bad ROM? Use GoodN64 & check that the RDB is up-to-date."); - /********************************************************************************* - * Options * - *********************************************************************************/ - //Options Title + // Options + + // Options title DEF_STR(OPTIONS_TITLE, "Settings"); - //Tabs + // Tabs DEF_STR(TAB_PLUGIN, "Plugins"); DEF_STR(TAB_DIRECTORY, "Directories"); DEF_STR(TAB_OPTIONS, "Options"); @@ -196,7 +191,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(TAB_DISKDRIVE, "64DD"); DEF_STR(TAB_DISKSETTINGS, "64DD"); - //Plugin Dialog + // Plugin dialog DEF_STR(PLUG_ABOUT, "About"); DEF_STR(PLUG_RSP, " RSP (Reality Signal Processor) plugin: "); DEF_STR(PLUG_GFX, " Video (graphics) plugin: "); @@ -206,7 +201,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(PLUG_HLE_AUDIO, "Audio HLE"); DEF_STR(PLUG_DEFAULT, "** Use System Plugin **"); - //Directory Dialog + // Directory dialog DEF_STR(DIR_PLUGIN, " Plugin directory: "); DEF_STR(DIR_ROM, " ROM directory: "); DEF_STR(DIR_AUTO_SAVE, " N64 native saves directory: "); @@ -221,7 +216,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(DIR_TEXTURE, " Texture pack directory: "); DEF_STR(DIR_SELECT_TEXTURE, "Select texture pack directory"); - //Options (general) Tab + // Options (general) tab DEF_STR(OPTION_AUTO_SLEEP, "Pause emulation when window is not active"); DEF_STR(OPTION_AUTO_FULLSCREEN, "Enter full-screen mode when loading a ROM"); DEF_STR(OPTION_BASIC_MODE, "Hide advanced settings"); @@ -239,7 +234,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(OPTION_SHOW_STATUS_BAR, "Show Status Bar"); DEF_STR(OPTION_EXIT_FULLSCREEN_ON_LOSE_FOCUS, "Exit full screen on lose focus"); - //ROM Browser Tab + // ROM browser tab DEF_STR(RB_MAX_ROMS, "Max # of ROMs remembered (0-10):"); DEF_STR(RB_ROMS, "ROMs"); DEF_STR(RB_MAX_DIRS, "Max # of ROM dirs remembered (0-10):"); @@ -255,7 +250,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_DOWN, "Down"); DEF_STR(RB_REFRESH, "Automatically refresh browser"); - //Advanced Options + // Advanced options DEF_STR(ADVANCE_INFO, "Most of these changes will not take effect until a new ROM is opened or current ROM is reset."); DEF_STR(ADVANCE_DEFAULTS, "Core Defaults"); DEF_STR(ADVANCE_CPU_STYLE, "CPU core style:"); @@ -272,7 +267,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ADVANCE_SMM_PROTECT, "Protect memory"); DEF_STR(ADVANCE_SMM_TLB, "TLB unmapping"); - //ROM Options + // ROM options DEF_STR(ROM_CPU_STYLE, "CPU core style:"); DEF_STR(ROM_VIREFRESH, "VI refresh rate:"); DEF_STR(ROM_MEM_SIZE, "Memory size:"); @@ -301,12 +296,12 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ROM_DISK_SEEK_TIMING_TURBO, "Turbo"); DEF_STR(ROM_DISK_SEEK_TIMING_SLOW, "Slow"); - //Core Styles + // Core styles DEF_STR(CORE_INTERPTER, "Interpreter"); DEF_STR(CORE_RECOMPILER, "Recompiler"); DEF_STR(CORE_SYNC, "Synchronize cores"); - //Self Mod Methods + // Self-mod methods DEF_STR(SMCM_NONE, "None"); DEF_STR(SMCM_CACHE, "Cache"); DEF_STR(SMCM_PROECTED, "Protect memory"); @@ -315,35 +310,35 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(SMCM_CHECK_ADV, "Check memory advance"); DEF_STR(SMCM_CACHE2, "Clear code on cache"); - //Function Lookup method + // Function lookup method DEF_STR(FLM_PLOOKUP, "Physical lookup table"); DEF_STR(FLM_VLOOKUP, "Virtual lookup table"); DEF_STR(FLM_CHANGEMEM, "Change memory"); - //RDRAM Size + // RDRAM size DEF_STR(RDRAM_4MB, "4 MB"); DEF_STR(RDRAM_8MB, "8 MB"); - //Advanced Block Linking + // Advanced block linking DEF_STR(ABL_ON, "On"); DEF_STR(ABL_OFF, "Off"); - //Save Type + // Save type DEF_STR(SAVE_FIRST_USED, "Use first-used save type"); DEF_STR(SAVE_4K_EEPROM, "4-kbit EEPROM"); DEF_STR(SAVE_16K_EEPROM, "16-kbit EEPROM"); DEF_STR(SAVE_SRAM, "SRAM"); DEF_STR(SAVE_FLASHRAM, "Flash RAM"); - //Shell Integration Tab + // Shell integration tab DEF_STR(SHELL_TEXT, "File extension association:"); - //ROM Notes + // ROM notes DEF_STR(NOTE_STATUS, "ROM status:"); DEF_STR(NOTE_CORE, "Core note:"); DEF_STR(NOTE_PLUGIN, "Plugin note:"); - // Accelerator Selector + // Accelerator selector DEF_STR(ACCEL_CPUSTATE_TITLE, "CPU state:"); DEF_STR(ACCEL_MENUITEM_TITLE, "Menu item:"); DEF_STR(ACCEL_CURRENTKEYS_TITLE, "Current keys:"); @@ -358,7 +353,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(ACCEL_CPUSTATE_4, "Game playing (full-screen)"); DEF_STR(ACCEL_DETECTKEY, "Detect Key"); - // Frame Rate Option + // Frame rate option DEF_STR(STR_FR_VIS, "Vertical interrupts per second"); DEF_STR(STR_FR_DLS, "Display lists per second"); DEF_STR(STR_FR_PERCENT, "Percentage of full speed"); @@ -368,23 +363,22 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(STR_INSREASE_SPEED, "Increase Game Speed"); DEF_STR(STR_DECREASE_SPEED, "Decrease Game Speed"); - //Bottom page buttons + // Bottom page buttons DEF_STR(BOTTOM_RESET_PAGE, "Reset Page"); DEF_STR(BOTTOM_RESET_ALL, "Reset All"); DEF_STR(BOTTOM_APPLY, "Apply"); DEF_STR(BOTTOM_CLOSE, "Close"); - //Disk Save Type + // Disk save type DEF_STR(DISKSAVE_SHADOW, "Full Disk Copy"); DEF_STR(DISKSAVE_RAM, "Save Area Only"); - /********************************************************************************* - * ROM Information * - *********************************************************************************/ - //ROM Info Title + // ROM Information + + // ROM info title DEF_STR(INFO_TITLE, "ROM Information"); - //ROM Info Text + // ROM info text DEF_STR(INFO_ROM_NAME_TEXT, "ROM name:"); DEF_STR(INFO_FILE_NAME_TEXT, "File name:"); DEF_STR(INFO_LOCATION_TEXT, "Location:"); @@ -397,17 +391,16 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(INFO_CIC_CHIP_TEXT, "CIC chip:"); DEF_STR(INFO_MD5_TEXT, "MD5:"); - /********************************************************************************* - * Cheats * - *********************************************************************************/ - //Cheat List + // Cheats + + // Cheat list DEF_STR(CHEAT_TITLE, "Cheats"); DEF_STR(CHEAT_LIST_FRAME, "Cheats:"); DEF_STR(CHEAT_NOTES_FRAME, " Notes: "); DEF_STR(CHEAT_MARK_ALL, "Mark All"); DEF_STR(CHEAT_MARK_NONE, "Unmark All"); - //Add Cheat + // Add cheat DEF_STR(CHEAT_ADDCHEAT_FRAME, "Add Cheat"); DEF_STR(CHEAT_ADDCHEAT_NAME, "Name:"); DEF_STR(CHEAT_ADDCHEAT_CODE, "Code:"); @@ -416,13 +409,13 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(CHEAT_ADDCHEAT_NOTES, " Cheat Notes: "); DEF_STR(CHEAT_ADD_TO_DB, "Add to DB"); - //Code extension + // Code extension DEF_STR(CHEAT_CODE_EXT_TITLE, "Code Extensions"); DEF_STR(CHEAT_CODE_EXT_TXT, "Please choose a value to be used for:"); DEF_STR(CHEAT_OK, "OK"); DEF_STR(CHEAT_CANCEL, "Cancel"); - //Digital Value + // Digital value DEF_STR(CHEAT_QUANTITY_TITLE, "Quantity Digit"); DEF_STR(CHEAT_CHOOSE_VALUE, "Please choose a value for:"); DEF_STR(CHEAT_VALUE, "&Value"); @@ -435,60 +428,56 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(CHEAT_ADDCHEAT_OPT, "Options:"); DEF_STR(CHEAT_ADDCHEAT_OPTDES, "