1. Fixed accidentally added the cheat name control to the limit list.

2. Add text limit to Memory Watch for experiment.
3. Make the IDs of controls in Memory Watch predefined rather than directly coded, that's not quite standard in programming. Calculations to ID is not always trusted as they are automatically determined by the development tool.
This commit is contained in:
owomomo 2019-06-19 15:53:47 +08:00
parent 56f0db87fa
commit f0396ef980
5 changed files with 260 additions and 165 deletions

View File

@ -345,7 +345,6 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_COM), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_NAME), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_KNOWN), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_NE_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_GT_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);

View File

@ -201,7 +201,7 @@ void MemwAddRecentFile(const char *filename)
UpdateMemwRecentArray(filename, memw_recent_files, MEMW_MAX_NUMBER_OF_RECENT_FILES, memwrecentmenu, ID_FILE_RECENT, MEMW_MENU_FIRST_RECENT_FILE);
}
static const int MW_ADDR_Lookup[] = {
static const int MW_ADDR[] = {
MW_ADDR00,MW_ADDR01,MW_ADDR02,MW_ADDR03,
MW_ADDR04,MW_ADDR05,MW_ADDR06,MW_ADDR07,
MW_ADDR08,MW_ADDR09,MW_ADDR10,MW_ADDR11,
@ -209,11 +209,42 @@ static const int MW_ADDR_Lookup[] = {
MW_ADDR16,MW_ADDR17,MW_ADDR18,MW_ADDR19,
MW_ADDR20,MW_ADDR21,MW_ADDR22,MW_ADDR23
};
inline int MW_ADDR(int i) { return MW_ADDR_Lookup[i] ; }
inline int MW_NAME(int i) { return MW_ADDR_Lookup[i]-1; }
inline int MW_VAL (int i) { return MW_ADDR_Lookup[i]+1; }
static const int MW_NAME[] =
{
MW_NAME00,MW_NAME01,MW_NAME02,MW_NAME03,
MW_NAME04,MW_NAME05,MW_NAME06,MW_NAME07,
MW_NAME08,MW_NAME09,MW_NAME10,MW_NAME11,
MW_NAME12,MW_NAME13,MW_NAME14,MW_NAME15,
MW_NAME16,MW_NAME17,MW_NAME18,MW_NAME19,
MW_NAME20,MW_NAME21,MW_NAME22,MW_NAME23
};
static const int MW_VAL[] = {
MW_VAL00,MW_VAL01,MW_VAL02,MW_VAL03,
MW_VAL04,MW_VAL05,MW_VAL06,MW_VAL07,
MW_VAL08,MW_VAL09,MW_VAL10,MW_VAL11,
MW_VAL12,MW_VAL13,MW_VAL14,MW_VAL15,
MW_VAL16,MW_VAL17,MW_VAL18,MW_VAL19,
MW_VAL20,MW_VAL21,MW_VAL22,MW_VAL23
};
static const int MW_RESET[] = {
MEMW_EDIT00RESET, MEMW_EDIT01RESET,
MEMW_EDIT02RESET, MEMW_EDIT03RESET
};
static const int MW_RESULT[] = {
EDIT00_RESULTS, EDIT01_RESULTS,
EDIT02_RESULTS, EDIT03_RESULTS
};
static const int MW_RMADDR[] = {
MEMW_EDIT00RMADDRESS, MEMW_EDIT01RMADDRESS,
MEMW_EDIT02RMADDRESS, MEMW_EDIT03RMADDRESS
};
static const int MW_EDITFORMULA[] = {
MEMW_EDIT00FORMULA, MEMW_EDIT01FORMULA,
MEMW_EDIT02FORMULA,MEMW_EDIT03FORMULA
};
static const int MWNUM = ARRAY_SIZE(MW_ADDR_Lookup);
static const int MWNUM = ARRAY_SIZE(MW_ADDR);
static int yPositions[MWNUM];
static int xPositions[MWNUM];
@ -223,7 +254,7 @@ static struct MWRec
static int findIndex(WORD ctl)
{
for(int i=0;i<MWNUM;i++)
if(MW_ADDR(i) == ctl)
if(MW_ADDR[i] == ctl)
return i;
return -1;
}
@ -346,8 +377,8 @@ static void SaveStrings()
int i;
for(i=0;i<MWNUM;i++)
{
GetDlgItemText(hwndMemWatch,MW_ADDR(i),addresses[i],ADDRESSLENGTH);
GetDlgItemText(hwndMemWatch,MW_NAME(i),labels[i],LABELLENGTH);
GetDlgItemText(hwndMemWatch,MW_ADDR[i],addresses[i],ADDRESSLENGTH);
GetDlgItemText(hwndMemWatch,MW_NAME[i],labels[i],LABELLENGTH);
}
}
@ -565,9 +596,9 @@ static void LoadMemWatch()
addresses[i][tempal] = 0;
labels[i][templl] = 0; //just in case
SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
SetDlgItemText(hwndMemWatch,MW_VAL [i],(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
}
fclose(fp);
}
@ -615,9 +646,9 @@ void OpenMemwatchRecentFile(int memwRFileNumber)
addresses[i][tempal] = 0;
labels[i][templl] = 0; //just in case
SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
SetDlgItemText(hwndMemWatch,MW_VAL [i],(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
}
fclose(fp); //Close the file
fileChanged = false; //Flag that the memwatch file has not been changed since last save
@ -686,8 +717,8 @@ void ClearAllText()
{
addresses[i][0] = 0;
labels[i][0] = 0;
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
}
//Now clear last file used variable (memwLastFilename)
for (int i=0;i<2048;i++)
@ -702,31 +733,40 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
const int FMAX = 6;
string formula[FMAX] = {"> than", "> by 1", "< than", "< by 1", "equal", "!equal"};
const int kLabelControls[] = {MW_VALUELABEL1,MW_VALUELABEL2};
const int kLabelControls[] = {MW_VALUELABEL1, MW_VALUELABEL2};
switch(uMsg)
{
case WM_ENTERMENULOOP:
EnableMenuItem(memwmenu,MEMW_FILE_SAVE,MF_BYCOMMAND | (fileChanged ? MF_ENABLED : MF_GRAYED));
EnableMenuItem(memwmenu, MEMW_FILE_SAVE, MF_BYCOMMAND | fileChanged ? MF_ENABLED : MF_GRAYED);
break;
case WM_MOVE: {
if (!IsIconic(hwndDlg)) {
RECT wrect;
GetWindowRect(hwndDlg,&wrect);
MemWatch_wndx = wrect.left;
MemWatch_wndy = wrect.top;
RECT wrect;
GetWindowRect(hwndDlg,&wrect);
MemWatch_wndx = wrect.left;
MemWatch_wndy = wrect.top;
#ifdef WIN32
WindowBoundsCheckNoResize(MemWatch_wndx,MemWatch_wndy,wrect.right);
#endif
#ifdef WIN32
WindowBoundsCheckNoResize(MemWatch_wndx,MemWatch_wndy,wrect.right);
#endif
}
break;
};
case WM_INITDIALOG:
if (MemWatch_wndx==-32000) MemWatch_wndx=0; //Just in case
if (MemWatch_wndy==-32000) MemWatch_wndy=0; //-32000 bugs can happen as it is a special windows value
SetWindowPos(hwndDlg,0,MemWatch_wndx,MemWatch_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
POINT pt;
if (MemWatch_wndx != 0 && MemWatch_wndy != 0)
{
pt.x = MemWatch_wndx;
pt.y = MemWatch_wndy;
pt = CalcSubWindowPos(hwndDlg, &pt);
}
else
pt = CalcSubWindowPos(hwndDlg, NULL);
MemWatch_wndx = pt.x;
MemWatch_wndy = pt.y;
hdc = GetDC(hwndDlg);
SelectObject (hdc, debugSystem->hFixedFont);
SetTextAlign(hdc,TA_UPDATECP | TA_TOP | TA_LEFT);
@ -739,19 +779,23 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
}
//find the positions where we should draw string values
for(int i=0;i<MWNUM;i++) {
int col=0;
if(i>=MWNUM/2)
col=1;
for(int i = 0; i < MWNUM; i++) {
int col = 0;
if(i >= MWNUM / 2)
col = 1;
RECT r;
GetWindowRect(GetDlgItem(hwndDlg,MW_ADDR(i)),&r);
ScreenToClient(hwndDlg,(LPPOINT)&r);
ScreenToClient(hwndDlg,(LPPOINT)&r.right);
GetWindowRect(GetDlgItem(hwndDlg, MW_ADDR[i]), &r);
ScreenToClient(hwndDlg, (LPPOINT)&r);
ScreenToClient(hwndDlg, (LPPOINT)&r.right);
yPositions[i] = r.top;
yPositions[i] += ((r.bottom-r.top)-debugSystem->fixedFontHeight)/2; //vertically center
GetWindowRect(GetDlgItem(hwndDlg,kLabelControls[col]),&r);
ScreenToClient(hwndDlg,(LPPOINT)&r);
yPositions[i] += (r.bottom - r.top - debugSystem->fixedFontHeight) / 2; //vertically center
GetWindowRect(GetDlgItem(hwndDlg, kLabelControls[col]), &r);
ScreenToClient(hwndDlg, (LPPOINT)&r);
xPositions[i] = r.left;
// experimental: limit the text length and input to hex values
SendDlgItemMessage(hwndDlg, MW_ADDR[i], EM_SETLIMITTEXT, 4, 0);
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, MW_ADDR[i]), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
}
//Populate Formula pulldown menus
@ -759,9 +803,9 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
{
for (int y = 0; y < FMAX; y++)
{
SendDlgItemMessage(hwndDlg, MEMW_EDIT00FORMULA+x,(UINT) CB_ADDSTRING, 0,(LPARAM) formula[y].c_str() );
SendDlgItemMessage(hwndDlg, MW_EDITFORMULA[x], (UINT)CB_ADDSTRING, 0, (LPARAM)formula[y].c_str());
}
SendDlgItemMessage(hwndDlg, MEMW_EDIT00FORMULA+x, CB_SETCURSEL, 0, 0);
SendDlgItemMessage(hwndDlg, MW_EDITFORMULA[x], CB_SETCURSEL, 0, 0);
}
@ -771,6 +815,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
editnow[x] = 0;
editlast[x]= 0;
}
RamChangeInitialize = true;
break;
@ -870,7 +915,6 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
case MEMW_EXPANDCOLLAPSE:
CollapseWindow();
break;
case MEMW_EDIT00RESET:
RamChangeReset(0);
break;
@ -892,7 +936,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
switch(HIWORD(wParam))
{
case EN_CHANGE:
case EN_CHANGE:
{
fileChanged = iftextchanged();
//the contents of an address box changed. re-parse it.
@ -904,44 +948,44 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
}
#if 0
case BN_CLICKED:
case BN_CLICKED:
switch(LOWORD(wParam))
{
case 101: //Save button clicked
//StopSound(); //mbg 5/7/08
//SaveMemWatch(); //5/13/08 Buttons removed (I didn't remove the code so it would be easy to add them back one day)
break;
case 102: //Load button clicked
//StopSound(); //mbg 5/7/08
//LoadMemWatch(); //5/13/08 Buttons removed
break;
case 103: //Clear button clicked
//ClearAllText(); //5/13/08 Buttons removed
break;
default:
break;
}
switch(LOWORD(wParam))
{
case 101: //Save button clicked
//StopSound(); //mbg 5/7/08
//SaveMemWatch(); //5/13/08 Buttons removed (I didn't remove the code so it would be easy to add them back one day)
break;
case 102: //Load button clicked
//StopSound(); //mbg 5/7/08
//LoadMemWatch(); //5/13/08 Buttons removed
break;
case 103: //Clear button clicked
//ClearAllText(); //5/13/08 Buttons removed
break;
default:
break;
}
#endif
}
}
#if 0
if(!(wParam>>16)) //Close button clicked
{
switch(wParam&0xFFFF)
if(!(wParam>>16)) //Close button clicked
{
case 1:
//CloseMemoryWatch(); //5/13/08 Buttons removed
break;
switch(wParam&0xFFFF)
{
case 1:
//CloseMemoryWatch(); //5/13/08 Buttons removed
break;
}
}
}
#endif
break;
default:
break;
break;
default:
break;
}
}
return 0;
}
@ -993,9 +1037,9 @@ void CreateMemWatch()
int i;
for(i = 0; i < MWNUM; i++)
{
SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
SetDlgItemText(hwndMemWatch,MW_VAL [i],(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
}
}
if (MemWatchLoadFileOnStart) OpenMemwatchRecentFile(0);
@ -1014,10 +1058,10 @@ void AddMemWatch(char memaddress[32])
CreateMemWatch();
for(i = 0; i < MWNUM; i++)
{
GetDlgItemText(hwndMemWatch,MW_ADDR(i),TempArray,32);
GetDlgItemText(hwndMemWatch,MW_ADDR[i],TempArray,32);
if (TempArray[0] == 0)
{
SetDlgItemText(hwndMemWatch,MW_ADDR(i),memaddress);
SetDlgItemText(hwndMemWatch,MW_ADDR[i],memaddress);
break;
}
}
@ -1039,23 +1083,19 @@ void RamChange()
//Get proper Addr edit box
switch (x)
{
case 0:
whichADDR = 0; break; //Addr 1
case 1:
whichADDR = 3; break; //Addr 2
case 2:
whichADDR = 36; break; //Addr 12
case 3:
whichADDR = 39; break; //Addr 13
case 0: whichADDR = 0; break; //Addr 1
case 1: whichADDR = 1; break; //Addr 2
case 2: whichADDR = 11; break; //Addr 12
case 3: whichADDR = 12; break; //Addr 13
}
GetDlgItemText(hwndMemWatch, MW_ADDR00+(whichADDR), editboxnow[x], 6); //Get Address value of edit00
SetDlgItemText(hwndMemWatch, MEMW_EDIT00RMADDRESS+x, editboxnow[x]); //Put Address value
GetDlgItemText(hwndMemWatch, MW_ADDR[whichADDR], editboxnow[x], 6); //Get Address value of edit00
SetDlgItemText(hwndMemWatch, MW_RMADDR[x], editboxnow[x]); //Put Address value
editlast[x] = editnow[x]; //Update last value
editnow[x] = GetMem(mwrec.addr); //Update now value
//Calculate Ram Change
int z = SendDlgItemMessage(hwndMemWatch, MEMW_EDIT00FORMULA+x,(UINT) CB_GETTOPINDEX, 0,0);
int z = SendDlgItemMessage(hwndMemWatch, MW_EDITFORMULA[x],(UINT) CB_GETTOPINDEX, 0,0);
switch (z)
{
//Greater than------------------------------------
@ -1102,7 +1142,7 @@ void RamChangeReset(int x)
{
editcount[x] = 0;
sprintf(editchangem[x], "%d", editcount[x]); //Convert counter to text
SetDlgItemText(hwndMemWatch, EDIT00_RESULTS+x, editchangem[x]); //Display text in results box
SetDlgItemText(hwndMemWatch, MW_RESULT[x], editchangem[x]); //Display text in results box
}
void ChangeMemwMenuItemText(int menuitem, string text)

View File

@ -12,7 +12,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English(U.S) resources
// English(U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
@ -1309,59 +1309,59 @@ FONT 8, "Tahoma", 0, 0, 0x0
BEGIN
GROUPBOX "",IDC_STATIC,3,0,126,200
GROUPBOX "",IDC_STATIC,131,0,128,200
EDITTEXT MW_ADDR00,6,17,30,14
EDITTEXT 1000,41,17,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR01,6,32,30,14
EDITTEXT 1003,41,32,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR02,6,47,30,14
EDITTEXT 1006,41,47,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR03,6,62,30,14
EDITTEXT 1009,41,62,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR04,6,77,30,14
EDITTEXT 1012,41,77,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR05,6,92,30,14
EDITTEXT 1015,41,92,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR06,6,107,30,14
EDITTEXT 1018,41,107,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR07,6,122,30,14
EDITTEXT 1021,41,122,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR08,6,137,30,14
EDITTEXT 1024,41,137,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR09,6,152,30,14
EDITTEXT 1027,41,152,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR10,6,167,30,14
EDITTEXT 1030,41,167,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR11,6,182,30,14
EDITTEXT 1033,41,182,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR12,135,17,30,14
EDITTEXT 1036,171,17,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR13,135,32,30,14
EDITTEXT 1039,171,32,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR14,135,47,30,14
EDITTEXT 1042,171,47,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR15,135,62,30,14
EDITTEXT 1045,171,62,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR16,135,77,30,14
EDITTEXT 1048,171,77,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR17,135,92,30,14
EDITTEXT 1051,171,92,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR18,135,107,30,14
EDITTEXT 1054,171,107,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR19,135,122,30,14
EDITTEXT 1057,171,122,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR20,135,137,30,14
EDITTEXT 1060,171,137,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR21,135,152,30,14
EDITTEXT 1063,171,152,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR22,135,167,30,14
EDITTEXT 1066,171,167,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR23,135,182,30,14
EDITTEXT 1069,171,182,55,14,ES_AUTOHSCROLL
LTEXT "Name",65428,41,7,20,8
LTEXT "Address",65427,6,7,26,8
EDITTEXT MW_ADDR00,6,17,30,14,ES_UPPERCASE
EDITTEXT MW_NAME00,41,17,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR01,6,32,30,14,ES_UPPERCASE
EDITTEXT MW_NAME01,41,32,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR02,6,47,30,14,ES_UPPERCASE
EDITTEXT MW_NAME02,41,47,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR03,6,62,30,14,ES_UPPERCASE
EDITTEXT MW_NAME03,41,62,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR04,6,77,30,14,ES_UPPERCASE
EDITTEXT MW_NAME04,41,77,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR05,6,92,30,14,ES_UPPERCASE
EDITTEXT MW_NAME05,41,92,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR06,6,107,30,14,ES_UPPERCASE
EDITTEXT MW_NAME06,41,107,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR07,6,122,30,14,ES_UPPERCASE
EDITTEXT MW_NAME07,41,122,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR08,6,137,30,14,ES_UPPERCASE
EDITTEXT MW_NAME08,41,137,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR09,6,152,30,14,ES_UPPERCASE
EDITTEXT MW_NAME09,41,152,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR10,6,167,30,14,ES_UPPERCASE
EDITTEXT MW_NAME10,41,167,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR11,6,182,30,14,ES_UPPERCASE
EDITTEXT MW_NAME11,41,182,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR12,135,17,30,14,ES_UPPERCASE
EDITTEXT MW_NAME12,171,17,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR13,135,32,30,14,ES_UPPERCASE
EDITTEXT MW_NAME13,171,32,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR14,135,47,30,14,ES_UPPERCASE
EDITTEXT MW_NAME14,171,47,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR15,135,62,30,14,ES_UPPERCASE
EDITTEXT MW_NAME15,171,62,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR16,135,77,30,14,ES_UPPERCASE
EDITTEXT MW_NAME16,171,77,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR17,135,92,30,14,ES_UPPERCASE
EDITTEXT MW_NAME17,171,92,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR18,135,107,30,14,ES_UPPERCASE
EDITTEXT MW_NAME18,171,107,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR19,135,122,30,14,ES_UPPERCASE
EDITTEXT MW_NAME19,171,122,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR20,135,137,30,14,ES_UPPERCASE
EDITTEXT MW_NAME20,171,137,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR21,135,152,30,14,ES_UPPERCASE
EDITTEXT MW_NAME21,171,152,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR22,135,167,30,14,ES_UPPERCASE
EDITTEXT MW_NAME22,171,167,55,14,ES_AUTOHSCROLL
EDITTEXT MW_ADDR23,135,182,30,14,ES_UPPERCASE
EDITTEXT MW_NAME23,171,182,55,14,ES_AUTOHSCROLL
LTEXT "Name",IDC_STATIC,41,7,20,8
LTEXT "Address",IDC_STATIC,6,7,26,8
LTEXT "Value",MW_VALUELABEL1,101,7,19,8
LTEXT "Name",65425,171,7,20,8
LTEXT "Address",65424,135,7,26,8
LTEXT "Name",IDC_STATIC,171,7,20,8
LTEXT "Address",IDC_STATIC,135,7,26,8
LTEXT "Value",MW_VALUELABEL2,231,7,19,8
LTEXT " ",EDIT00_RESULTS,89,225,26,8
GROUPBOX "Memory Change Monitoring",IDC_STATIC,0,202,129,57,BS_CENTER
@ -2205,9 +2205,9 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
CAPTION " Edit Watch"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CTEXT "Address:",IDC_SPECIFICADDRESS,15,12,30,8
CTEXT "&Address:",IDC_SPECIFICADDRESS,15,12,30,8
EDITTEXT IDC_EDIT_COMPAREADDRESS,48,10,65,12,ES_UPPERCASE | ES_AUTOHSCROLL
CTEXT "Notes:",IDC_PROMPT_TEXT,23,24,22,8
CTEXT "&Notes:",IDC_PROMPT_TEXT,23,24,22,8
EDITTEXT IDC_PROMPT_EDIT,48,22,119,12,ES_AUTOHSCROLL
GROUPBOX "Data Type",IDC_DATATYPE_GROUPBOX,14,37,75,42,0,WS_EX_TRANSPARENT
CONTROL "&Signed",IDC_SIGNED,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,18,47,67,9
@ -2217,8 +2217,8 @@ BEGIN
CONTROL "&1 byte",IDC_1_BYTE,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,98,47,61,11
CONTROL "&2 bytes",IDC_2_BYTES,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,98,57,61,11
CONTROL "&4 bytes",IDC_4_BYTES,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,98,67,61,11
DEFPUSHBUTTON "&OK",IDOK,66,80,50,14
PUSHBUTTON "&Cancel",IDCANCEL,120,80,50,14
DEFPUSHBUTTON "OK",IDOK,66,80,50,14
PUSHBUTTON "Cancel",IDCANCEL,120,80,50,14
END
DLG_SNESPAD DIALOGEX 4, 109, 243, 121
@ -2637,6 +2637,11 @@ BEGIN
0
END
MEMWATCH AFX_DIALOG_LAYOUT
BEGIN
0
END
/////////////////////////////////////////////////////////////////////////////
//

View File

@ -442,19 +442,21 @@
#define IDC_GAME_GENIE_CODE 1000
#define IDC_MEMVIEWFIND_WHAT 1000
#define IDC_BOOKMARK_DESCRIPTION 1000
#define MW_NAME00 1000
#define MW_ADDR00 1001
#define IDC_GAME_GENIE_ADDR 1001
#define IDC_MEMVIEWFIND_TYPE_HEX 1001
#define IDC_NTVIEW_MIRROR_HORIZONTAL 1001
#define IDC_CHECK_STOPMOVIE 1002
#define IDC_GAME_GENIE_COMP 1002
#define IDC_MEMVIEWFIND_TYPE_TEXT 1002
#define IDC_NTVIEW_MIRROR_VERTICAL 1002
#define MW_VAL00 1002
#define LV_MAPPING 1003
#define IDC_EDIT_STOPFRAME 1003
#define IDC_GAME_GENIE_VAL 1003
#define IDC_MEMVIEWFIND_DIR_UP 1003
#define IDC_NTVIEW_MIRROR_FOUR_SCREEN 1003
#define MW_NAME01 1003
#define MW_ADDR01 1004
#define IDC_LIST_GGADDRESSES 1004
#define IDC_MEMVIEWFIND_DIR_DOWN 1004
@ -462,78 +464,123 @@
#define IDC_BTN_ADD_TO_CHEATS 1005
#define IDC_MEMVIEWFIND_NEXT 1005
#define IDC_NTVIEW_MIRROR_SS_TABLE_1 1005
#define MW_VAL01 1005
#define IDC_NTVIEW_MIRROR_SS_TABLE_2 1006
#define MW_NAME02 1006
#define MW_ADDR02 1007
#define IDC_NTVIEW_MIRROR_SS_TABLE_3 1007
#define IDC_NTVIEW_SHOW_SCROLL_LINES 1008
#define MW_VAL02 1008
#define IDC_NTVIEW_SHOW_ATTRIBUTES 1009
#define MW_NAME03 1009
#define IDC_NTVIEW_HIDE_PALETTES 1010
#define MW_ADDR03 1010
#define IDC_BTN_CHEAT_EXPORTTOFILE 1011
#define MW_VAL03 1011
#define IDSAVE 1012
#define MW_NAME04 1012
#define MW_ADDR04 1013
#define IDC_CHECK1 1013
#define IDC_CHEAT_AUTOLOADSAVE 1013
#define IDC_RESTORE_BUTTON 1014
#define MW_VAL04 1014
#define MW_NAME05 1015
#define MW_ADDR05 1016
#define MW_VAL05 1017
#define IDC_PRGROM_COMBO 1018
#define MW_NAME06 1018
#define MW_ADDR06 1019
#define IDC_CHRROM_COMBO 1019
#define IDC_RADIO_MIRR_HORIZONTAL 1020
#define MW_VAL06 1020
#define IDC_RADIO_MIRR_VERTICAL 1021
#define MW_NAME07 1021
#define MW_ADDR07 1022
#define IDC_RADIO_MIRR_4SCREEN 1022
#define MW_VAL07 1023
#define IDC_CHECK_TRAINER 1024
#define MW_NAME08 1024
#define MW_ADDR08 1025
#define IDC_PRGRAM_COMBO 1025
#define IDC_MAPPER_COMBO 1026
#define MW_VAL08 1026
#define IDC_SUBMAPPER_EDIT 1027
#define MW_NAME09 1027
#define MW_ADDR09 1028
#define IDC_CHRRAM_COMBO 1028
#define IDC_PRGNVRAM_COMBO 1029
#define MW_VAL09 1029
#define IDC_CHRNVRAM_COMBO 1030
#define MW_NAME10 1030
#define MW_ADDR10 1031
#define IDC_RADIO_REGION_NTSC 1031
#define IDC_RADIO_REGION_PAL 1032
#define MW_VAL10 1032
#define IDC_RADIO_REGION_DUAL 1033
#define MW_NAME11 1033
#define MW_ADDR11 1034
#define MW_VAL11 1035
#define IDC_INPUT_DEVICE_COMBO 1036
#define MW_NAME12 1036
#define MW_ADDR12 1037
#define IDC_RADIO_REGION_DENDY 1037
#define IDC_RADIO_SYSTEM_NORMAL 1038
#define MW_VAL12 1038
#define IDC_RADIO_SYSTEM_VS 1039
#define MW_NAME13 1039
#define MW_ADDR13 1040
#define IDC_RADIO_SYSTEM_PLAYCHOICE10 1040
#define IDC_RADIO_SYSTEM_EXTEND 1041
#define MW_VAL13 1041
#define MW_NAME14 1042
#define MW_ADDR14 1043
#define IDC_SYSTEM_EXTEND_COMBO 1043
#define MW_VAL14 1044
#define MW_NAME15 1045
#define MW_ADDR15 1046
#define IDC_VS_SYSTEM_COMBO 1046
#define IDC_VS_PPU_COMBO 1047
#define MW_VAL15 1047
#define MW_NAME16 1048
#define MW_ADDR16 1049
#define IDC_MAPPER_TEXT 1049
#define IDC_SUBMAPPER_TEXT 1050
#define MW_VAL16 1050
#define IDC_PRGROM_TEXT 1051
#define MW_NAME17 1051
#define MW_ADDR17 1052
#define IDC_CHRROM_TEXT 1053
#define MW_VAL17 1053
#define MW_NAME18 1054
#define MW_ADDR18 1055
#define IDC_PRGRAM_TEXT 1055
#define MW_VAL18 1056
#define IDC_CHRRAM_TEXT 1057
#define MW_NAME19 1057
#define MW_ADDR19 1058
#define IDC_PRGNVRAM_TEXT 1059
#define MW_VAL19 1059
#define IDC_CHRNVRAM_TEXT 1060
#define MW_NAME20 1060
#define MW_ADDR20 1061
#define MW_VAL20 1062
#define IDC_INESHEADER_GROUP 1063
#define MW_NAME21 1063
#define MW_ADDR21 1064
#define IDC_MIRRORING_GROUP 1064
#define IDC_REGION_GROUP 1065
#define MW_VAL21 1065
#define IDC_SYSTEM_GROUP 1066
#define MW_NAME22 1066
#define MW_ADDR22 1067
#define IDC_VS_SYSTEM_GROUP 1067
#define IDC_VS_SYSTEM_TEXT 1068
#define MW_VAL22 1068
#define IDC_VS_PPU_TEXT 1069
#define MW_NAME23 1069
#define MW_ADDR23 1070
#define IDC_RADIO_VERSION_STANDARD 1071
#define MW_VAL23 1071
#define IDC_RADIO_VERSION_INES20 1073
#define IDC_VERSION_GROUP 1074
#define IDC_MAPPER_GROUP 1075
@ -556,7 +603,6 @@
#define IDC_GAME_GENIE_LABEL 1097
#define IDC_CHEAT_GAME_GENIE_TEXT 1098
#define IDC_CHECK2 1099
#define IDC_SHOW_GG 1099
#define BTN_ALLOW_LRUD 1117
#define IDC_PRGROM_EDIT 1118
#define IDC_CHRROM_EDIT 1119
@ -779,6 +825,7 @@
#define IDC_CHEAT_VAL_LABEL 1314
#define IDC_CHEAT_COM_LABEL 1315
#define IDC_CHEAT_LABEL_KNOWN 1316
#define IDC_GAME_GENIE_ADDR 1501
#define MENU_INESHEADEREDITOR 40001
#define MENU_NETWORK 40040
#define MENU_PALETTE 40041

View File

@ -3352,27 +3352,31 @@ bool inline (*GetIsLetterLegal(UINT id))(char letter)
case IDC_CHEAT_GAME_GENIE_TEXT:
case IDC_GAME_GENIE_CODE:
return IsLetterLegalGG;
case IDC_CHEAT_ADDR:
case IDC_CHEAT_VAL:
case IDC_CHEAT_COM:
case IDC_CHEAT_NAME:
case IDC_CHEAT_VAL_KNOWN:
case IDC_CHEAT_VAL_NE_BY:
case IDC_CHEAT_VAL_GT_BY:
case IDC_CHEAT_VAL_LT_BY:
case IDC_GAME_GENIE_ADDR:
case IDC_GAME_GENIE_COMP:
case IDC_GAME_GENIE_VAL:
case IDC_CHEAT_ADDR: case IDC_CHEAT_VAL: case IDC_CHEAT_COM:
case IDC_CHEAT_VAL_KNOWN: case IDC_CHEAT_VAL_NE_BY:
case IDC_CHEAT_VAL_GT_BY: case IDC_CHEAT_VAL_LT_BY:
case IDC_GAME_GENIE_ADDR: case IDC_GAME_GENIE_VAL: case IDC_GAME_GENIE_COMP:
case MW_ADDR00: case MW_ADDR01: case MW_ADDR02: case MW_ADDR03:
case MW_ADDR04: case MW_ADDR05: case MW_ADDR06: case MW_ADDR07:
case MW_ADDR08: case MW_ADDR09: case MW_ADDR10: case MW_ADDR11:
case MW_ADDR12: case MW_ADDR13: case MW_ADDR14: case MW_ADDR15:
case MW_ADDR16: case MW_ADDR17: case MW_ADDR18: case MW_ADDR19:
case MW_ADDR20: case MW_ADDR21: case MW_ADDR22: case MW_ADDR23:
return IsLetterLegalHex;
case IDC_CHEAT_TEXT:
return IsLetterLegalCheat;
case IDC_PRGROM_EDIT:
case IDC_PRGRAM_EDIT:
case IDC_PRGNVRAM_EDIT:
case IDC_CHRROM_EDIT:
case IDC_CHRRAM_EDIT:
case IDC_CHRNVRAM_EDIT:
case IDC_PRGROM_EDIT: case IDC_PRGRAM_EDIT: case IDC_PRGNVRAM_EDIT:
case IDC_CHRROM_EDIT: case IDC_CHRRAM_EDIT: case IDC_CHRNVRAM_EDIT:
return IsLetterLegalSize;
case IDC_SUBMAPPER_EDIT:
case IDC_MISCELLANEOUS_ROMS_EDIT:
return IsLetterLegalPosDec;