diff --git a/src/drivers/win/ram_search.cpp b/src/drivers/win/ram_search.cpp index 9b6ffe21..6cd48858 100644 --- a/src/drivers/win/ram_search.cpp +++ b/src/drivers/win/ram_search.cpp @@ -45,16 +45,23 @@ #include "stdint.h" #endif +bool ShowROM = false; + bool IsHardwareAddressValid(HWAddressType address) { if (!GameInfo) return false; - if ((address <= 0x07ff) || (address >= 0x6000 && address <= 0x7FFF)) - return true; + if(!ShowROM) + if ((address >= 0x0000 && address < 0x0800) || (address >= 0x6000 && address < 0x8000)) + return true; + else + return false; else - return false; - + if (address >= 0x8000 && address < 0x10000) + return true; + else + return false; } #define INVALID_HARDWARE_ADDRESS ((HWAddressType) -1) @@ -1469,6 +1476,7 @@ LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara s_prevValuesNeedUpdate = true; SendDlgItemMessage(hDlg,IDC_C_AUTOSEARCH,BM_SETCHECK,AutoSearch?BST_CHECKED:BST_UNCHECKED,0); + SendDlgItemMessage(hDlg,IDC_C_SEARCHROM,BM_SETCHECK,ShowROM?BST_CHECKED:BST_UNCHECKED,0); //const char* names[5] = {"Address","Value","Previous","Changes","Notes"}; //int widths[5] = {62,64,64,55,55}; const char* names[] = {"Address","Value","Previous","Changes"}; @@ -1766,6 +1774,8 @@ LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara } } {rv = true; break;} + case IDC_C_SEARCHROM: + ShowROM = SendDlgItemMessage(hDlg, IDC_C_SEARCHROM, BM_GETCHECK, 0, 0) != 0; case IDC_C_RESET: { RamSearchSaveUndoStateIfNotTooBig(RamSearchHWnd); diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 7b1b2e66..fc54579e 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -1834,6 +1834,7 @@ BEGIN PUSHBUTTON "&Clear Change Counts",IDC_C_RESET_CHANGES,226,46,52,20,BS_MULTILINE PUSHBUTTON "&Undo",IDC_C_UNDO,226,69,52,16,WS_DISABLED LTEXT "Is",IDC_STATIC,92,270,12,8 + CONTROL "Search ROM",IDC_C_SEARCHROM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,226,91,52,11 END IDD_RAMWATCH DIALOGEX 0, 0, 269, 298 diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index 569cc388..0d1c8243 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -681,7 +681,7 @@ #define IDC_EDIT_LUAARGS 1256 #define CB_PARTIALVISUALTHEME 1257 #define DEBUGLOADDEB 1258 -#define IDC_CHECK2 1258 +#define IDC_C_SEARCHROM 1258 #define IDC_SINGLEINSTANCE 1258 #define IDC_MOVIE_CLOSEAFTERPLAYBACK 1258 #define IDC_C_WATCH_SEPARATE 1259