Magic-number holocaust part 1: substitution for existing UI elements

This commit is contained in:
jeblanchard 2008-06-03 01:25:12 +00:00
parent 69d6da7451
commit 5a9781ade5
22 changed files with 1195 additions and 1136 deletions

View File

@ -86,16 +86,16 @@ MB_OK);
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 103: case BTN_CDLOGGER_RESET:
codecount = datacount = 0; codecount = datacount = 0;
undefinedcount = PRGsize[0]; undefinedcount = PRGsize[0];
ZeroMemory(cdloggerdata,PRGsize[0]); ZeroMemory(cdloggerdata,PRGsize[0]);
UpdateCDLogger(); UpdateCDLogger();
break; break;
case 104: case BTN_CDLOGGER_LOAD:
LoadCDLogFile(); LoadCDLogFile();
break; break;
case 105: case BTN_CDLOGGER_START_PAUSE:
if(FCEUI_GetLoggingCD()){ if(FCEUI_GetLoggingCD()){
if((logging) && (logging_options & LOG_NEW_INSTRUCTIONS)){ if((logging) && (logging_options & LOG_NEW_INSTRUCTIONS)){
MessageBox(hCDLogger, MessageBox(hCDLogger,
@ -106,21 +106,21 @@ MB_OK);
} }
FCEUI_SetLoggingCD(0); FCEUI_SetLoggingCD(0);
EnableTracerMenuItems(); EnableTracerMenuItems();
SetDlgItemText(hCDLogger, 105, "Start"); SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Start");
} }
else{ else{
FCEUI_SetLoggingCD(1); FCEUI_SetLoggingCD(1);
EnableTracerMenuItems(); EnableTracerMenuItems();
SetDlgItemText(hCDLogger, 105, "Pause"); SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Pause");
} }
break; break;
case 106: case BTN_CDLOGGER_SAVE_AS:
SaveCDLogFileAs(); SaveCDLogFileAs();
break; break;
case 107: case BTN_CDLOGGER_SAVE:
SaveCDLogFile(); SaveCDLogFile();
break; break;
case 108: case BTN_CDLOGGER_SAVE_STRIPPED:
SaveStrippedRom(); SaveStrippedRom();
break; break;
} }
@ -240,11 +240,11 @@ void UpdateCDLogger(){
fundefinedcount = undefinedcount, fromsize = PRGsize[0]; fundefinedcount = undefinedcount, fromsize = PRGsize[0];
if(!hCDLogger)return; if(!hCDLogger)return;
sprintf(str,"0x%06x %.2f%%",codecount,fcodecount/fromsize*100); sprintf(str,"0x%06x %.2f%%",codecount,fcodecount/fromsize*100);
SetDlgItemText(hCDLogger,100,str); SetDlgItemText(hCDLogger,LBL_CDLOGGER_CODECOUNT,str);
sprintf(str,"0x%06x %.2f%%",datacount,fdatacount/fromsize*100); sprintf(str,"0x%06x %.2f%%",datacount,fdatacount/fromsize*100);
SetDlgItemText(hCDLogger,101,str); SetDlgItemText(hCDLogger,LBL_CDLOGGER_DATACOUNT,str);
sprintf(str,"0x%06x %.2f%%",undefinedcount,fundefinedcount/fromsize*100); sprintf(str,"0x%06x %.2f%%",undefinedcount,fundefinedcount/fromsize*100);
SetDlgItemText(hCDLogger,102,str); SetDlgItemText(hCDLogger,LBL_CDLOGGER_UNDEFCOUNT,str);
return; return;
} }

View File

@ -89,12 +89,12 @@ int RedoCheatsCallB(char *name, uint32 a, uint8 v, int compare,int s,int type,vo
if(name[0] == 0)sprintf(str,"%s%04X=%02X",s?"* ":" ",(int)a,(int)v); if(name[0] == 0)sprintf(str,"%s%04X=%02X",s?"* ":" ",(int)a,(int)v);
else sprintf(str,"%s%s",s?"* ":" ",name); else sprintf(str,"%s%s",s?"* ":" ",name);
SendDlgItemMessage(hwndLB,101,LB_ADDSTRING,0,(LPARAM)(LPSTR)str); SendDlgItemMessage(hwndLB,IDC_LIST_CHEATS,LB_ADDSTRING,0,(LPARAM)(LPSTR)str);
return 1; return 1;
} }
void RedoCheatsLB(HWND hwndDlg) { void RedoCheatsLB(HWND hwndDlg) {
SendDlgItemMessage(hwndDlg,101,LB_RESETCONTENT,0,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_RESETCONTENT,0,0);
hwndLB=hwndDlg; hwndLB=hwndDlg;
FCEUI_ListCheats(RedoCheatsCallB,0); FCEUI_ListCheats(RedoCheatsCallB,0);
} }
@ -103,7 +103,7 @@ int ShowResultsCallB(uint32 a, uint8 last, uint8 current) {
char temp[16]; char temp[16];
sprintf(temp,"$%04X: %02X | %02X",(unsigned int)a,last,current); sprintf(temp,"$%04X: %02X | %02X",(unsigned int)a,last,current);
SendDlgItemMessage(hwndLB,106,LB_ADDSTRING,0,(LPARAM)(LPSTR)temp); SendDlgItemMessage(hwndLB,IDC_CHEAT_LIST_POSSIBILITIES,LB_ADDSTRING,0,(LPARAM)(LPSTR)temp);
return 1; return 1;
} }
@ -116,26 +116,26 @@ void ShowResults(HWND hwndDlg) {
scrollindex=-32768; scrollindex=-32768;
hwndLB=hwndDlg; hwndLB=hwndDlg;
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,0,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,0,0);
FCEUI_CheatSearchGetRange(0,16,ShowResultsCallB); FCEUI_CheatSearchGetRange(0,16,ShowResultsCallB);
t=-32768+n-17; t=-32768+n-17;
if (t<-32768) t=-32768; if (t<-32768) t=-32768;
scrollmax=t; scrollmax=t;
SendDlgItemMessage(hwndDlg,107,SBM_SETRANGE,-32768,t); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETRANGE,-32768,t);
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,-32768,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,-32768,1);
sprintf(str,"%d Possibilities",n); sprintf(str,"%d Possibilities",n);
SetDlgItemText(hwndDlg,203,str); SetDlgItemText(hwndDlg,IDC_CHEAT_BOX_POSSIBILITIES,str);
} }
void EnableCheatButtons(HWND hwndDlg, int enable) { void EnableCheatButtons(HWND hwndDlg, int enable) {
EnableWindow(GetDlgItem(hwndDlg,105),enable); EnableWindow(GetDlgItem(hwndDlg,IDC_CHEAT_VAL_KNOWN),enable);
EnableWindow(GetDlgItem(hwndDlg,305),enable); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_KNOWN),enable);
EnableWindow(GetDlgItem(hwndDlg,306),enable); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_EQ),enable);
EnableWindow(GetDlgItem(hwndDlg,307),enable); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_NE),enable);
EnableWindow(GetDlgItem(hwndDlg,308),enable); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_GT),enable);
EnableWindow(GetDlgItem(hwndDlg,309),enable); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_LT),enable);
} }
BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
@ -159,39 +159,39 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
strcpy(lf.lfFaceName,"Courier"); strcpy(lf.lfFaceName,"Courier");
hNewFont = CreateFontIndirect(&lf); hNewFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg,102,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_ADDR,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,103,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,105,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_KNOWN,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,106,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,108,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_NE_BY,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,109,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_GT_BY,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,110,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_LT_BY,WM_SETFONT,(WPARAM)hNewFont,FALSE);
//text limits //text limits
SendDlgItemMessage(hwndDlg,102,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_ADDR,EM_SETLIMITTEXT,4,0);
SendDlgItemMessage(hwndDlg,103,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,104,EM_SETLIMITTEXT,256,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_NAME,EM_SETLIMITTEXT,256,0);
SendDlgItemMessage(hwndDlg,105,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_KNOWN,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,108,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_NE_BY,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,109,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_GT_BY,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,110,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_VAL_LT_BY,EM_SETLIMITTEXT,2,0);
//disable or enable buttons //disable or enable buttons
EnableWindow(GetDlgItem(hwndDlg,105),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_CHEAT_VAL_KNOWN),FALSE);
EnableWindow(GetDlgItem(hwndDlg,302),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_DEL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,303),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_UPD),FALSE);
if (scrollnum) { if (scrollnum) {
EnableCheatButtons(hwndDlg,TRUE); EnableCheatButtons(hwndDlg,TRUE);
ShowResults(hwndDlg); ShowResults(hwndDlg);
sprintf(str,"%d Possibilities",(int)FCEUI_CheatSearchGetCount()); sprintf(str,"%d Possibilities",(int)FCEUI_CheatSearchGetCount());
SetDlgItemText(hwndDlg,203,str); SetDlgItemText(hwndDlg,IDC_CHEAT_BOX_POSSIBILITIES,str);
} }
else EnableCheatButtons(hwndDlg,FALSE); else EnableCheatButtons(hwndDlg,FALSE);
//misc setup //misc setup
RedoCheatsLB(hwndDlg); RedoCheatsLB(hwndDlg);
searchdone=0; searchdone=0;
SetDlgItemText(hwndDlg,105,(LPTSTR)U8ToStr(knownvalue)); SetDlgItemText(hwndDlg,IDC_CHEAT_VAL_KNOWN,(LPTSTR)U8ToStr(knownvalue));
break; break;
case WM_NCACTIVATE: case WM_NCACTIVATE:
@ -226,52 +226,52 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case SB_TOP: case SB_TOP:
scrollindex=-32768; scrollindex=-32768;
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,16,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,16,0);
FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB);
break; break;
case SB_BOTTOM: case SB_BOTTOM:
scrollindex=scrollmax; scrollindex=scrollmax;
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,16,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,16,0);
FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB);
break; break;
case SB_LINEUP: case SB_LINEUP:
if (scrollindex > -32768) { if (scrollindex > -32768) {
scrollindex--; scrollindex--;
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,16,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,16,0);
FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB);
} }
break; break;
case SB_PAGEUP: case SB_PAGEUP:
scrollindex-=17; scrollindex-=17;
if(scrollindex<-32768) scrollindex=-32768; if(scrollindex<-32768) scrollindex=-32768;
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,16,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,16,0);
FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB);
break; break;
case SB_LINEDOWN: case SB_LINEDOWN:
if (scrollindex<scrollmax) { if (scrollindex<scrollmax) {
scrollindex++; scrollindex++;
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,0,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,0,0);
FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB);
} }
break; break;
case SB_PAGEDOWN: case SB_PAGEDOWN:
scrollindex+=17; scrollindex+=17;
if (scrollindex>scrollmax) scrollindex=scrollmax; if (scrollindex>scrollmax) scrollindex=scrollmax;
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,0,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,0,0);
FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(scrollindex+32768,scrollindex+32768+16,ShowResultsCallB);
break; break;
case SB_THUMBPOSITION: case SB_THUMBPOSITION:
case SB_THUMBTRACK: case SB_THUMBTRACK:
scrollindex=(short int)HIWORD(wParam); scrollindex=(short int)HIWORD(wParam);
SendDlgItemMessage(hwndDlg,107,SBM_SETPOS,scrollindex,1); SendDlgItemMessage(hwndDlg,IDC_CHEAT_SCRL_POSSIBILITIES,SBM_SETPOS,scrollindex,1);
SendDlgItemMessage(hwndDlg,106,LB_RESETCONTENT,0,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_RESETCONTENT,0,0);
FCEUI_CheatSearchGetRange(32768+scrollindex,32768+scrollindex+16,ShowResultsCallB); FCEUI_CheatSearchGetRange(32768+scrollindex,32768+scrollindex+16,ShowResultsCallB);
break; break;
} }
@ -283,7 +283,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (lbfocus) { if (lbfocus) {
int real; int real;
real=SendDlgItemMessage(hwndDlg,106,LB_GETCURSEL,0,0); real=SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_GETCURSEL,0,0);
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case VK_UP: case VK_UP:
// mmmm....recursive goodness // mmmm....recursive goodness
@ -293,7 +293,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
case VK_DOWN: case VK_DOWN:
if (real == 16) { if (real == 16) {
SendMessage(hwndDlg,WM_VSCROLL,SB_LINEDOWN,0); SendMessage(hwndDlg,WM_VSCROLL,SB_LINEDOWN,0);
SendDlgItemMessage(hwndDlg,106,LB_SETCURSEL,real,0); SendDlgItemMessage(hwndDlg,IDC_CHEAT_LIST_POSSIBILITIES,LB_SETCURSEL,real,0);
} }
return -1; return -1;
break; break;
@ -318,50 +318,50 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
switch (HIWORD(wParam)) { switch (HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case 301: //Add case IDC_BTN_CHEAT_ADD:
GetDlgItemText(hwndDlg,102,str,5); GetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,str,5);
a=StrToU16(str); a=StrToU16(str);
GetDlgItemText(hwndDlg,103,str,3); GetDlgItemText(hwndDlg,IDC_CHEAT_VAL,str,3);
v=StrToU8(str); v=StrToU8(str);
GetDlgItemText(hwndDlg,104,str,256); GetDlgItemText(hwndDlg,IDC_CHEAT_NAME,str,256);
// if (FCEUI_AddCheat(str,a,v)) { //bbit edited: replaced this with the line below // if (FCEUI_AddCheat(str,a,v)) { //bbit edited: replaced this with the line below
if (FCEUI_AddCheat(str,a,v,-1,1)) { if (FCEUI_AddCheat(str,a,v,-1,1)) {
if(str[0] == 0)sprintf(str,"%04X=%02X",(int)a,(int)v); //bbit edited: added this line to give your cheat a name if you didn't supply one if(str[0] == 0)sprintf(str,"%04X=%02X",(int)a,(int)v); //bbit edited: added this line to give your cheat a name if you didn't supply one
strcpy(str2,"* "); strcpy(str2,"* ");
strcat(str2,str); strcat(str2,str);
SendDlgItemMessage(hwndDlg,101,LB_ADDSTRING,0,(LPARAM)(LPSTR)str2); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_ADDSTRING,0,(LPARAM)(LPSTR)str2);
selcheat = (SendDlgItemMessage(hwndDlg,101,LB_GETCOUNT,0,0) - 1); selcheat = (SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_GETCOUNT,0,0) - 1);
SendDlgItemMessage(hwndDlg,101,LB_SETCURSEL,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_SETCURSEL,selcheat,0);
SetDlgItemText(hwndDlg,102,(LPTSTR)U16ToStr(a)); SetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,(LPTSTR)U16ToStr(a));
SetDlgItemText(hwndDlg,103,(LPTSTR)U8ToStr(v)); SetDlgItemText(hwndDlg,IDC_CHEAT_VAL,(LPTSTR)U8ToStr(v));
EnableWindow(GetDlgItem(hwndDlg,302),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_DEL),TRUE);
EnableWindow(GetDlgItem(hwndDlg,303),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_UPD),TRUE);
} }
if(hMemView)UpdateColorTable(); //if the memory viewer is open then update any blue freeze locations in it as well if(hMemView)UpdateColorTable(); //if the memory viewer is open then update any blue freeze locations in it as well
break; break;
case 302: //Delete case IDC_BTN_CHEAT_DEL:
if (selcheat >= 0) { if (selcheat >= 0) {
FCEUI_DelCheat(selcheat); FCEUI_DelCheat(selcheat);
SendDlgItemMessage(hwndDlg,101,LB_DELETESTRING,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_DELETESTRING,selcheat,0);
selcheat=-1; selcheat=-1;
SetDlgItemText(hwndDlg,102,(LPTSTR)""); SetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,(LPTSTR)"");
SetDlgItemText(hwndDlg,103,(LPTSTR)""); SetDlgItemText(hwndDlg,IDC_CHEAT_VAL,(LPTSTR)"");
SetDlgItemText(hwndDlg,104,(LPTSTR)""); SetDlgItemText(hwndDlg,IDC_CHEAT_NAME,(LPTSTR)"");
} }
EnableWindow(GetDlgItem(hwndDlg,302),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_DEL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,303),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_UPD),FALSE);
if(hMemView)UpdateColorTable(); //if the memory viewer is open then update any blue freeze locations in it as well if(hMemView)UpdateColorTable(); //if the memory viewer is open then update any blue freeze locations in it as well
break; break;
case 303: //Update case IDC_BTN_CHEAT_UPD:
if (selcheat < 0) break; if (selcheat < 0) break;
GetDlgItemText(hwndDlg,102,str,5); GetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,str,5);
a=StrToU16(str); a=StrToU16(str);
GetDlgItemText(hwndDlg,103,str,3); GetDlgItemText(hwndDlg,IDC_CHEAT_VAL,str,3);
v=StrToU8(str); v=StrToU8(str);
GetDlgItemText(hwndDlg,104,str,256); GetDlgItemText(hwndDlg,IDC_CHEAT_NAME,str,256);
// FCEUI_SetCheat(selcheat,str,a,v,-1); //bbit edited: replaced this with the line below // FCEUI_SetCheat(selcheat,str,a,v,-1); //bbit edited: replaced this with the line below
FCEUI_SetCheat(selcheat,str,a,v,-1,-1,1); FCEUI_SetCheat(selcheat,str,a,v,-1,-1,1);
// FCEUI_GetCheat(selcheat,&name,&a,&v,&s); //bbit edited: replaced this with the line below // FCEUI_GetCheat(selcheat,&name,&a,&v,&s); //bbit edited: replaced this with the line below
@ -370,53 +370,53 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if(str[0] == 0)sprintf(str,"%04X=%02X",(int)a,(int)v); //bbit edited: added this line to give your cheat a name if you didn't supply one if(str[0] == 0)sprintf(str,"%04X=%02X",(int)a,(int)v); //bbit edited: added this line to give your cheat a name if you didn't supply one
strcat(str2,str); strcat(str2,str);
SendDlgItemMessage(hwndDlg,101,LB_DELETESTRING,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_DELETESTRING,selcheat,0);
SendDlgItemMessage(hwndDlg,101,LB_INSERTSTRING,selcheat,(LPARAM)(LPSTR)str2); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_INSERTSTRING,selcheat,(LPARAM)(LPSTR)str2);
SendDlgItemMessage(hwndDlg,101,LB_SETCURSEL,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_SETCURSEL,selcheat,0);
SetDlgItemText(hwndDlg,102,(LPTSTR)U16ToStr(a)); SetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,(LPTSTR)U16ToStr(a));
SetDlgItemText(hwndDlg,103,(LPTSTR)U8ToStr(v)); SetDlgItemText(hwndDlg,IDC_CHEAT_VAL,(LPTSTR)U8ToStr(v));
if(hMemView)UpdateColorTable(); //if the memory viewer is open then update any blue freeze locations in it as well if(hMemView)UpdateColorTable(); //if the memory viewer is open then update any blue freeze locations in it as well
break; break;
case 304: //Reset case IDC_BTN_CHEAT_RESET:
FCEUI_CheatSearchBegin(); FCEUI_CheatSearchBegin();
ShowResults(hwndDlg); ShowResults(hwndDlg);
EnableCheatButtons(hwndDlg,TRUE); EnableCheatButtons(hwndDlg,TRUE);
break; break;
case 305: //Known Value case IDC_BTN_CHEAT_KNOWN:
searchdone=1; searchdone=1;
GetDlgItemText(hwndDlg,105,str,3); GetDlgItemText(hwndDlg,IDC_CHEAT_VAL_KNOWN,str,3);
knownvalue=StrToU8(str); knownvalue=StrToU8(str);
FCEUI_CheatSearchEnd(4,knownvalue,0); FCEUI_CheatSearchEnd(4,knownvalue,0);
ShowResults(hwndDlg); ShowResults(hwndDlg);
break; break;
case 306: //Equal case IDC_BTN_CHEAT_EQ:
searchdone=1; searchdone=1;
FCEUI_CheatSearchEnd(2,0,0); FCEUI_CheatSearchEnd(2,0,0);
ShowResults(hwndDlg); ShowResults(hwndDlg);
break; break;
case 307: //Not Equal case IDC_BTN_CHEAT_NE:
searchdone=1; searchdone=1;
if (IsDlgButtonChecked(hwndDlg,401) == BST_CHECKED) { if (IsDlgButtonChecked(hwndDlg,IDC_CHEAT_CHECK_NE_BY) == BST_CHECKED) {
GetDlgItemText(hwndDlg,108,str,3); GetDlgItemText(hwndDlg,IDC_CHEAT_VAL_NE_BY,str,3);
FCEUI_CheatSearchEnd(2,0,StrToU8(str)); FCEUI_CheatSearchEnd(2,0,StrToU8(str));
} }
else FCEUI_CheatSearchEnd(3,0,0); else FCEUI_CheatSearchEnd(3,0,0);
ShowResults(hwndDlg); ShowResults(hwndDlg);
break; break;
case 308: //Greater Than case IDC_BTN_CHEAT_GT:
searchdone=1; searchdone=1;
if (IsDlgButtonChecked(hwndDlg,402) == BST_CHECKED) { if (IsDlgButtonChecked(hwndDlg,IDC_CHEAT_CHECK_GT_BY) == BST_CHECKED) {
GetDlgItemText(hwndDlg,109,str,3); GetDlgItemText(hwndDlg,IDC_CHEAT_VAL_GT_BY,str,3);
FCEUI_CheatSearchEnd(7,0,StrToU8(str)); FCEUI_CheatSearchEnd(7,0,StrToU8(str));
} }
else FCEUI_CheatSearchEnd(5,0,0); else FCEUI_CheatSearchEnd(5,0,0);
ShowResults(hwndDlg); ShowResults(hwndDlg);
break; break;
case 309: //Less Than case IDC_BTN_CHEAT_LT:
searchdone=1; searchdone=1;
if (IsDlgButtonChecked(hwndDlg,403) == BST_CHECKED) { if (IsDlgButtonChecked(hwndDlg,IDC_CHEAT_CHECK_LT_BY) == BST_CHECKED) {
GetDlgItemText(hwndDlg,110,str,3); GetDlgItemText(hwndDlg,IDC_CHEAT_VAL_LT_BY,str,3);
FCEUI_CheatSearchEnd(8,0,StrToU8(str)); FCEUI_CheatSearchEnd(8,0,StrToU8(str));
} }
else FCEUI_CheatSearchEnd(6,0,0); else FCEUI_CheatSearchEnd(6,0,0);
@ -426,14 +426,20 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
break; break;
case LBN_DBLCLK: case LBN_DBLCLK:
switch (LOWORD(wParam)) { //disable/enable cheat switch (LOWORD(wParam)) { //disable/enable cheat
case 106: case IDC_CHEAT_LIST_POSSIBILITIES:
lbfocus=1; lbfocus=1;
SendDlgItemMessage(hwndDlg,106,LB_GETTEXT,SendDlgItemMessage(hwndDlg,106,LB_GETCURSEL,0,0),(LPARAM)(LPCTSTR)str); SendDlgItemMessage(hwndDlg,
IDC_CHEAT_LIST_POSSIBILITIES,
LB_GETTEXT,
SendDlgItemMessage(hwndDlg,
IDC_CHEAT_LIST_POSSIBILITIES,
LB_GETCURSEL,0,0),
(LPARAM)(LPCTSTR)str);
strcpy(str2,str+1); strcpy(str2,str+1);
str2[4] = 0; str2[4] = 0;
AddMemWatch(str2); AddMemWatch(str2);
break; break;
case 101: case IDC_LIST_CHEATS:
// FCEUI_GetCheat(selcheat,&name,&a,&v,&s); //bbit edited: replaced this with the line below // FCEUI_GetCheat(selcheat,&name,&a,&v,&s); //bbit edited: replaced this with the line below
FCEUI_GetCheat(selcheat,&name,&a,&v,NULL,&s,NULL); FCEUI_GetCheat(selcheat,&name,&a,&v,NULL,&s,NULL);
// FCEUI_SetCheat(selcheat,0,-1,-1,s^=1);//bbit edited: replaced this with the line below // FCEUI_SetCheat(selcheat,0,-1,-1,s^=1);//bbit edited: replaced this with the line below
@ -442,45 +448,51 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
else sprintf(str,"%s%s",s?"* ":" ",name); else sprintf(str,"%s%s",s?"* ":" ",name);
//strcpy(str,(s?"* ":" ")); //strcpy(str,(s?"* ":" "));
//strcat(str,name); //strcat(str,name);
SendDlgItemMessage(hwndDlg,101,LB_DELETESTRING,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_DELETESTRING,selcheat,0);
SendDlgItemMessage(hwndDlg,101,LB_INSERTSTRING,selcheat,(LPARAM)(LPSTR)str); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_INSERTSTRING,selcheat,(LPARAM)(LPSTR)str);
SendDlgItemMessage(hwndDlg,101,LB_SETCURSEL,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_SETCURSEL,selcheat,0);
UpdateColorTable(); UpdateColorTable();
break; break;
} }
break; break;
case LBN_SELCHANGE: case LBN_SELCHANGE:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case 101: case IDC_LIST_CHEATS:
selcheat = SendDlgItemMessage(hwndDlg,101,LB_GETCURSEL,0,0); selcheat = SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_GETCURSEL,0,0);
if (selcheat < 0) break; if (selcheat < 0) break;
FCEUI_GetCheat(selcheat,&name,&a,&v,NULL,&s,NULL); FCEUI_GetCheat(selcheat,&name,&a,&v,NULL,&s,NULL);
SetDlgItemText(hwndDlg,104,(LPTSTR)name); SetDlgItemText(hwndDlg,IDC_CHEAT_NAME,(LPTSTR)name);
SetDlgItemText(hwndDlg,102,(LPTSTR)U16ToStr(a)); SetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,(LPTSTR)U16ToStr(a));
SetDlgItemText(hwndDlg,103,(LPTSTR)U8ToStr(v)); SetDlgItemText(hwndDlg,IDC_CHEAT_VAL,(LPTSTR)U8ToStr(v));
EnableWindow(GetDlgItem(hwndDlg,302),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_DEL),TRUE);
EnableWindow(GetDlgItem(hwndDlg,303),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_UPD),TRUE);
break; break;
case 106: case IDC_CHEAT_LIST_POSSIBILITIES:
lbfocus=1; lbfocus=1;
SendDlgItemMessage(hwndDlg,106,LB_GETTEXT,SendDlgItemMessage(hwndDlg,106,LB_GETCURSEL,0,0),(LPARAM)(LPCTSTR)str); SendDlgItemMessage(hwndDlg,
IDC_CHEAT_LIST_POSSIBILITIES,
LB_GETTEXT,
SendDlgItemMessage(hwndDlg,
IDC_CHEAT_LIST_POSSIBILITIES,
LB_GETCURSEL,0,0),
(LPARAM)(LPCTSTR)str);
strcpy(str2,str+1); strcpy(str2,str+1);
str2[4] = 0; str2[4] = 0;
SetDlgItemText(hwndDlg,102,(LPTSTR)str2); SetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,(LPTSTR)str2);
strcpy(str2,str+13); strcpy(str2,str+13);
SetDlgItemText(hwndDlg,103,(LPTSTR)str2); SetDlgItemText(hwndDlg,IDC_CHEAT_VAL,(LPTSTR)str2);
break; break;
} }
break; break;
case LBN_SELCANCEL: case LBN_SELCANCEL:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 101: case IDC_LIST_CHEATS:
EnableWindow(GetDlgItem(hwndDlg,302),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_DEL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,303),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_CHEAT_UPD),FALSE);
break; break;
case 106: case IDC_CHEAT_LIST_POSSIBILITIES:
lbfocus=0; lbfocus=0;
break; break;
} }
@ -560,44 +572,44 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if(dontupdateGG)break; if(dontupdateGG)break;
dontupdateGG = 1; dontupdateGG = 1;
switch(LOWORD(wParam)){ //lets find out what edit control got changed switch(LOWORD(wParam)){ //lets find out what edit control got changed
case 1000: //The Game Genie Code - in this case decode it. case IDC_GAME_GENIE_CODE: //The Game Genie Code - in this case decode it.
GetDlgItemText(hGGConv,1000,GGcode,9); GetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode,9);
if((strlen(GGcode) != 8) && (strlen(GGcode) != 6))break; if((strlen(GGcode) != 8) && (strlen(GGcode) != 6))break;
FCEUI_DecodeGG(GGcode, (uint16 *)&GGaddr, (uint8 *)&GGval, &GGcomp); FCEUI_DecodeGG(GGcode, (uint16 *)&GGaddr, (uint8 *)&GGval, &GGcomp);
sprintf(str,"%04X",GGaddr); sprintf(str,"%04X",GGaddr);
SetDlgItemText(hGGConv,1001,str); SetDlgItemText(hGGConv,IDC_GAME_GENIE_ADDR,str);
if(GGcomp != -1) if(GGcomp != -1)
sprintf(str,"%02X",GGcomp); sprintf(str,"%02X",GGcomp);
else str[0] = 0; else str[0] = 0;
SetDlgItemText(hGGConv,1002,str); SetDlgItemText(hGGConv,IDC_GAME_GENIE_COMP,str);
sprintf(str,"%02X",GGval); sprintf(str,"%02X",GGval);
SetDlgItemText(hGGConv,1003,str); SetDlgItemText(hGGConv,IDC_GAME_GENIE_VAL,str);
//ListGGAddresses(); //ListGGAddresses();
break; break;
case 1001: case IDC_GAME_GENIE_ADDR:
case 1002: case IDC_GAME_GENIE_COMP:
case 1003: case IDC_GAME_GENIE_VAL:
GetDlgItemText(hGGConv,1001,str,5); GetDlgItemText(hGGConv,IDC_GAME_GENIE_ADDR,str,5);
if(strlen(str) != 4) break; if(strlen(str) != 4) break;
GetDlgItemText(hGGConv,1003,str,5); GetDlgItemText(hGGConv,IDC_GAME_GENIE_VAL,str,5);
if(strlen(str) != 2) {GGval = -1; break;} if(strlen(str) != 2) {GGval = -1; break;}
GGaddr = GetEditHex(hGGConv,1001); GGaddr = GetEditHex(hGGConv,IDC_GAME_GENIE_ADDR);
GGval = GetEditHex(hGGConv,1003); GGval = GetEditHex(hGGConv,IDC_GAME_GENIE_VAL);
GetDlgItemText(hGGConv,1002,str,5); GetDlgItemText(hGGConv,IDC_GAME_GENIE_COMP,str,5);
if(strlen(str) != 2) GGcomp = -1; if(strlen(str) != 2) GGcomp = -1;
else GGcomp = GetEditHex(hGGConv,1002); else GGcomp = GetEditHex(hGGConv,IDC_GAME_GENIE_COMP);
EncodeGG(GGcode, GGaddr, GGval, GGcomp); EncodeGG(GGcode, GGaddr, GGval, GGcomp);
SetDlgItemText(hGGConv,1000,GGcode); SetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode);
//ListGGAddresses(); //ListGGAddresses();
break; break;
} }
@ -606,7 +618,7 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break; break;
case BN_CLICKED: case BN_CLICKED:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case 1005: //Add Cheat case IDC_BTN_ADD_TO_CHEATS:
//ConfigCheats(fceu_hInstance); //ConfigCheats(fceu_hInstance);
if(GGaddr < 0x8000)GGaddr += 0x8000; if(GGaddr < 0x8000)GGaddr += 0x8000;
@ -614,23 +626,23 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (FCEUI_AddCheat(GGcode,GGaddr,GGval,GGcomp,1) && (hCheat != 0)) { if (FCEUI_AddCheat(GGcode,GGaddr,GGval,GGcomp,1) && (hCheat != 0)) {
strcpy(str,"* "); strcpy(str,"* ");
strcat(str,GGcode); strcat(str,GGcode);
SendDlgItemMessage(hCheat,101,LB_ADDSTRING,0,(LPARAM)(LPSTR)str); SendDlgItemMessage(hCheat,IDC_LIST_CHEATS,LB_ADDSTRING,0,(LPARAM)(LPSTR)str);
selcheat = (SendDlgItemMessage(hCheat,101,LB_GETCOUNT,0,0) - 1); selcheat = (SendDlgItemMessage(hCheat,IDC_LIST_CHEATS,LB_GETCOUNT,0,0) - 1);
SendDlgItemMessage(hCheat,101,LB_SETCURSEL,selcheat,0); SendDlgItemMessage(hCheat,IDC_LIST_CHEATS,LB_SETCURSEL,selcheat,0);
SetDlgItemText(hCheat,102,(LPTSTR)U16ToStr(GGaddr)); SetDlgItemText(hCheat,IDC_CHEAT_ADDR,(LPTSTR)U16ToStr(GGaddr));
SetDlgItemText(hCheat,103,(LPTSTR)U8ToStr(GGval)); SetDlgItemText(hCheat,IDC_CHEAT_VAL,(LPTSTR)U8ToStr(GGval));
EnableWindow(GetDlgItem(hCheat,302),TRUE); EnableWindow(GetDlgItem(hCheat,IDC_BTN_CHEAT_DEL),TRUE);
EnableWindow(GetDlgItem(hCheat,303),TRUE); EnableWindow(GetDlgItem(hCheat,IDC_BTN_CHEAT_UPD),TRUE);
} }
} }
break; break;
case LBN_DBLCLK: case LBN_DBLCLK:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case 1004: case IDC_LIST_GGADDRESSES:
i = SendDlgItemMessage(hwndDlg,1004,LB_GETCURSEL,0,0); i = SendDlgItemMessage(hwndDlg,IDC_LIST_GGADDRESSES,LB_GETCURSEL,0,0);
ChangeMemViewFocus(2,GGlist[i],-1); ChangeMemViewFocus(2,GGlist[i],-1);
break; break;
} }
@ -678,20 +690,20 @@ void EncodeGG(char *str, int a, int v, int c){
void ListGGAddresses(){ void ListGGAddresses(){
uint32 i, j = 0; //mbg merge 7/18/06 changed from int uint32 i, j = 0; //mbg merge 7/18/06 changed from int
char str[20]; char str[20];
SendDlgItemMessage(hGGConv,1004,LB_RESETCONTENT,0,0); SendDlgItemMessage(hGGConv,IDC_LIST_GGADDRESSES,LB_RESETCONTENT,0,0);
//also enable/disable the add GG button here //also enable/disable the add GG button here
GetDlgItemText(hGGConv,1000,GGcode,9); GetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode,9);
if((GGaddr < 0) || ((strlen(GGcode) != 8) && (strlen(GGcode) != 6)))EnableWindow(GetDlgItem(hGGConv,1005),FALSE); if((GGaddr < 0) || ((strlen(GGcode) != 8) && (strlen(GGcode) != 6)))EnableWindow(GetDlgItem(hGGConv,IDC_BTN_ADD_TO_CHEATS),FALSE);
else EnableWindow(GetDlgItem(hGGConv,1005),TRUE); else EnableWindow(GetDlgItem(hGGConv,IDC_BTN_ADD_TO_CHEATS),TRUE);
for(i = 0;i < PRGsize[0];i+=0x2000){ for(i = 0;i < PRGsize[0];i+=0x2000){
if((PRGptr[0][i+(GGaddr&0x1FFF)] == GGcomp) || (GGcomp == -1)){ if((PRGptr[0][i+(GGaddr&0x1FFF)] == GGcomp) || (GGcomp == -1)){
GGlist[j] = i+(GGaddr&0x1FFF)+0x10; GGlist[j] = i+(GGaddr&0x1FFF)+0x10;
if(++j > GGLISTSIZE)return; if(++j > GGLISTSIZE)return;
sprintf(str,"%06X",i+(GGaddr&0x1FFF)+0x10); sprintf(str,"%06X",i+(GGaddr&0x1FFF)+0x10);
SendDlgItemMessage(hGGConv,1004,LB_ADDSTRING,0,(LPARAM)(LPSTR)str); SendDlgItemMessage(hGGConv,IDC_LIST_GGADDRESSES,LB_ADDSTRING,0,(LPARAM)(LPSTR)str);
} }
} }
@ -710,21 +722,21 @@ void SetGGConvFocus(int address,int compare){
dontupdateGG = 1; //little hack to fix a nasty bug dontupdateGG = 1; //little hack to fix a nasty bug
sprintf(str,"%04X",address); sprintf(str,"%04X",address);
SetDlgItemText(hGGConv,1001,str); SetDlgItemText(hGGConv,IDC_GAME_GENIE_ADDR,str);
dontupdateGG = 0; dontupdateGG = 0;
sprintf(str,"%02X",GGcomp); sprintf(str,"%02X",GGcomp);
SetDlgItemText(hGGConv,1002,str); SetDlgItemText(hGGConv,IDC_GAME_GENIE_COMP,str);
if(GGval < 0)SetDlgItemText(hGGConv,1000,""); if(GGval < 0)SetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,"");
else { else {
EncodeGG(GGcode, GGaddr, GGval, GGcomp); EncodeGG(GGcode, GGaddr, GGval, GGcomp);
SetDlgItemText(hGGConv,1000,GGcode); SetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode);
} }
SetFocus(GetDlgItem(hGGConv,1003)); SetFocus(GetDlgItem(hGGConv,IDC_GAME_GENIE_VAL));
return; return;
} }

View File

@ -70,17 +70,6 @@ static CFGSTRUCT fceuconfig[] = {
ACS(recent_files[8]), ACS(recent_files[8]),
ACS(recent_files[9]), ACS(recent_files[9]),
ACS(recent_directories[0]),
ACS(recent_directories[1]),
ACS(recent_directories[2]),
ACS(recent_directories[3]),
ACS(recent_directories[4]),
ACS(recent_directories[5]),
ACS(recent_directories[6]),
ACS(recent_directories[7]),
ACS(recent_directories[8]),
ACS(recent_directories[9]),
ACS(memw_recent_files[0]), ACS(memw_recent_files[0]),
ACS(memw_recent_files[1]), ACS(memw_recent_files[1]),
ACS(memw_recent_files[2]), ACS(memw_recent_files[2]),

View File

@ -58,22 +58,11 @@ HWND hDebug;
static HFONT hFont,hNewFont; static HFONT hFont,hNewFont;
static SCROLLINFO si; static SCROLLINFO si;
#define START_OFFSET_HANDLE 200
#define END_OFFSET_HANDLE 201
#define READ_BREAKPOINT_HANDLE 102
#define WRITE_BREAKPOINT_HANDLE 103
#define EXECUTE_BREAKPOINT_HANDLE 104
#define CPU_BREAKPOINT_HANDLE 105
#define PPU_BREAKPOINT_HANDLE 106
#define SPRITE_BREAKPOINT_HANDLE 107
#define INVALID_START_OFFSET 1 #define INVALID_START_OFFSET 1
#define INVALID_END_OFFSET 2 #define INVALID_END_OFFSET 2
#define MAX_NAME_SIZE 200 #define MAX_NAME_SIZE 200
#define MAX_CONDITION_SIZE 200 #define MAX_CONDITION_SIZE 200
#define CONDITION_HANDLE 202
#define NAME_HANDLE 203
unsigned int NewBreakWindows(HWND hwndDlg, unsigned int num, bool enable) unsigned int NewBreakWindows(HWND hwndDlg, unsigned int num, bool enable)
{ {
@ -81,14 +70,14 @@ unsigned int NewBreakWindows(HWND hwndDlg, unsigned int num, bool enable)
char endOffsetBuffer[5] = {0}; char endOffsetBuffer[5] = {0};
unsigned int type = 0; unsigned int type = 0;
GetDlgItemText(hwndDlg, START_OFFSET_HANDLE, startOffsetBuffer, sizeof(startOffsetBuffer)); GetDlgItemText(hwndDlg, IDC_ADDBP_ADDR_START, startOffsetBuffer, sizeof(startOffsetBuffer));
GetDlgItemText(hwndDlg, END_OFFSET_HANDLE, endOffsetBuffer, sizeof(endOffsetBuffer)); GetDlgItemText(hwndDlg, IDC_ADDBP_ADDR_END, endOffsetBuffer, sizeof(endOffsetBuffer));
if (IsDlgButtonChecked(hwndDlg, CPU_BREAKPOINT_HANDLE)) if (IsDlgButtonChecked(hwndDlg, IDC_ADDBP_MEM_CPU))
{ {
type |= CPU_BREAKPOINT; type |= CPU_BREAKPOINT;
} }
else if (IsDlgButtonChecked(hwndDlg, PPU_BREAKPOINT_HANDLE)) else if (IsDlgButtonChecked(hwndDlg, IDC_ADDBP_MEM_PPU))
{ {
type |= PPU_BREAKPOINT; type |= PPU_BREAKPOINT;
} }
@ -97,17 +86,17 @@ unsigned int NewBreakWindows(HWND hwndDlg, unsigned int num, bool enable)
type |= SPRITE_BREAKPOINT; type |= SPRITE_BREAKPOINT;
} }
if (IsDlgButtonChecked(hwndDlg, READ_BREAKPOINT_HANDLE)) if (IsDlgButtonChecked(hwndDlg, IDC_ADDBP_MODE_R))
{ {
type |= READ_BREAKPOINT; type |= READ_BREAKPOINT;
} }
if (IsDlgButtonChecked(hwndDlg, WRITE_BREAKPOINT_HANDLE)) if (IsDlgButtonChecked(hwndDlg, IDC_ADDBP_MODE_W))
{ {
type |= WRITE_BREAKPOINT; type |= WRITE_BREAKPOINT;
} }
if (IsDlgButtonChecked(hwndDlg, EXECUTE_BREAKPOINT_HANDLE)) if (IsDlgButtonChecked(hwndDlg, IDC_ADDBP_MODE_X))
{ {
type |= EXECUTE_BREAKPOINT; type |= EXECUTE_BREAKPOINT;
} }
@ -128,10 +117,10 @@ unsigned int NewBreakWindows(HWND hwndDlg, unsigned int num, bool enable)
// Handle breakpoint conditions // Handle breakpoint conditions
char name[MAX_NAME_SIZE] = {0}; char name[MAX_NAME_SIZE] = {0};
GetDlgItemText(hwndDlg, NAME_HANDLE, name, MAX_NAME_SIZE); GetDlgItemText(hwndDlg, IDC_ADDBP_NAME, name, MAX_NAME_SIZE);
char condition[MAX_CONDITION_SIZE] = {0}; char condition[MAX_CONDITION_SIZE] = {0};
GetDlgItemText(hwndDlg, CONDITION_HANDLE, condition, MAX_CONDITION_SIZE); GetDlgItemText(hwndDlg, IDC_ADDBP_CONDITION, condition, MAX_CONDITION_SIZE);
return NewBreak(name, start, end, type, condition, num, enable); return NewBreak(name, start, end, type, condition, num, enable);
} }
@ -173,55 +162,55 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(uMsg) { switch(uMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
CenterWindow(hwndDlg); CenterWindow(hwndDlg);
SendDlgItemMessage(hwndDlg,200,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_ADDBP_ADDR_START,EM_SETLIMITTEXT,4,0);
SendDlgItemMessage(hwndDlg,201,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_ADDBP_ADDR_END,EM_SETLIMITTEXT,4,0);
if (WP_edit >= 0) { if (WP_edit >= 0) {
SetWindowText(hwndDlg,"Edit Breakpoint..."); SetWindowText(hwndDlg,"Edit Breakpoint...");
sprintf(str,"%04X",watchpoint[WP_edit].address); sprintf(str,"%04X",watchpoint[WP_edit].address);
SetDlgItemText(hwndDlg,200,str); SetDlgItemText(hwndDlg,IDC_ADDBP_ADDR_START,str);
sprintf(str,"%04X",watchpoint[WP_edit].endaddress); sprintf(str,"%04X",watchpoint[WP_edit].endaddress);
if (strcmp(str,"0000") != 0) SetDlgItemText(hwndDlg,201,str); if (strcmp(str,"0000") != 0) SetDlgItemText(hwndDlg,IDC_ADDBP_ADDR_END,str);
if (watchpoint[WP_edit].flags&WP_R) CheckDlgButton(hwndDlg, 102, BST_CHECKED); if (watchpoint[WP_edit].flags&WP_R) CheckDlgButton(hwndDlg, IDC_ADDBP_MODE_R, BST_CHECKED);
if (watchpoint[WP_edit].flags&WP_W) CheckDlgButton(hwndDlg, 103, BST_CHECKED); if (watchpoint[WP_edit].flags&WP_W) CheckDlgButton(hwndDlg, IDC_ADDBP_MODE_W, BST_CHECKED);
if (watchpoint[WP_edit].flags&WP_X) CheckDlgButton(hwndDlg, 104, BST_CHECKED); if (watchpoint[WP_edit].flags&WP_X) CheckDlgButton(hwndDlg, IDC_ADDBP_MODE_X, BST_CHECKED);
if (watchpoint[WP_edit].flags&BT_P) { if (watchpoint[WP_edit].flags&BT_P) {
CheckDlgButton(hwndDlg, 106, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_ADDBP_MEM_PPU, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg,104),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ADDBP_MODE_X),FALSE);
} }
else if (watchpoint[WP_edit].flags&BT_S) { else if (watchpoint[WP_edit].flags&BT_S) {
CheckDlgButton(hwndDlg, 107, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_ADDBP_MEM_SPR, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg,104),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ADDBP_MODE_X),FALSE);
} }
else CheckDlgButton(hwndDlg, 105, BST_CHECKED); else CheckDlgButton(hwndDlg, IDC_ADDBP_MEM_CPU, BST_CHECKED);
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
SendDlgItemMessage(hwndDlg,202,EM_SETLIMITTEXT,200,0); SendDlgItemMessage(hwndDlg,IDC_ADDBP_CONDITION,EM_SETLIMITTEXT,200,0);
SendDlgItemMessage(hwndDlg,203,EM_SETLIMITTEXT,200,0); SendDlgItemMessage(hwndDlg,IDC_ADDBP_NAME,EM_SETLIMITTEXT,200,0);
if (watchpoint[WP_edit].cond) if (watchpoint[WP_edit].cond)
{ {
SetDlgItemText(hwndDlg, 202, watchpoint[WP_edit].condText); SetDlgItemText(hwndDlg, IDC_ADDBP_CONDITION, watchpoint[WP_edit].condText);
} }
else else
{ {
SetDlgItemText(hwndDlg, 202, ""); SetDlgItemText(hwndDlg, IDC_ADDBP_CONDITION, "");
} }
if (watchpoint[WP_edit].desc) if (watchpoint[WP_edit].desc)
{ {
SetDlgItemText(hwndDlg, 203, watchpoint[WP_edit].desc); SetDlgItemText(hwndDlg, IDC_ADDBP_NAME, watchpoint[WP_edit].desc);
} }
else else
{ {
SetDlgItemText(hwndDlg, 203, ""); SetDlgItemText(hwndDlg, IDC_ADDBP_NAME, "");
} }
// ################################## End of SP CODE ########################### // ################################## End of SP CODE ###########################
} }
else CheckDlgButton(hwndDlg, 105, BST_CHECKED); else CheckDlgButton(hwndDlg, IDC_ADDBP_MEM_CPU, BST_CHECKED);
break; break;
case WM_CLOSE: case WM_CLOSE:
case WM_QUIT: case WM_QUIT:
@ -230,7 +219,7 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 100: case IDOK:
if (WP_edit >= 0) { if (WP_edit >= 0) {
int tmp = NewBreakWindows(hwndDlg,WP_edit,(BOOL)(watchpoint[WP_edit].flags&WP_E)); int tmp = NewBreakWindows(hwndDlg,WP_edit,(BOOL)(watchpoint[WP_edit].flags&WP_E));
if (tmp == INVALID_BREAKPOINT_CONDITION) if (tmp == INVALID_BREAKPOINT_CONDITION)
@ -253,16 +242,16 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
EndDialog(hwndDlg,1); EndDialog(hwndDlg,1);
break; break;
case 101: case IDCANCEL:
endaddbrk: endaddbrk:
EndDialog(hwndDlg,0); EndDialog(hwndDlg,0);
break; break;
case 105: //CPU Mem case IDC_ADDBP_MEM_CPU:
EnableWindow(GetDlgItem(hwndDlg,104),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_ADDBP_MODE_X),TRUE);
break; break;
case 106: //PPU Mem case IDC_ADDBP_MEM_PPU:
case 107: //Sprtie Mem case IDC_ADDBP_MEM_SPR:
EnableWindow(GetDlgItem(hwndDlg,104),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ADDBP_MODE_X),FALSE);
break; break;
} }
break; break;
@ -302,7 +291,7 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr) {
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
symbDebugEnabled = IsDlgButtonChecked(hWnd, 208); symbDebugEnabled = IsDlgButtonChecked(hWnd, IDC_DEBUGGER_ENABLE_SYMBOLIC);
decorateAddress(addr, str, chr, symbDebugEnabled); decorateAddress(addr, str, chr, symbDebugEnabled);
@ -461,17 +450,17 @@ int *GetEditHexData(HWND hwndDlg, int id){
int GetEditStack(HWND hwndDlg) { int GetEditStack(HWND hwndDlg) {
char str[85]; char str[85];
int tmp; int tmp;
GetDlgItemText(hwndDlg,308,str,85); GetDlgItemText(hwndDlg,IDC_DEBUGGER_STACK_CONTENTS,str,85);
sscanf(str,"%2x,%2x,%2x,%2x,\r\n",&tmp); sscanf(str,"%2x,%2x,%2x,%2x,\r\n",&tmp);
return tmp; return tmp;
} }
*/ */
void UpdateRegs(HWND hwndDlg) { void UpdateRegs(HWND hwndDlg) {
X.A = GetEditHex(hwndDlg,304); X.A = GetEditHex(hwndDlg,IDC_DEBUGGER_VAL_A);
X.X = GetEditHex(hwndDlg,305); X.X = GetEditHex(hwndDlg,IDC_DEBUGGER_VAL_X);
X.Y = GetEditHex(hwndDlg,306); X.Y = GetEditHex(hwndDlg,IDC_DEBUGGER_VAL_Y);
X.PC = GetEditHex(hwndDlg,307); X.PC = GetEditHex(hwndDlg,IDC_DEBUGGER_VAL_PC);
} }
///indicates whether we're under the control of the debugger ///indicates whether we're under the control of the debugger
@ -486,35 +475,35 @@ void FCEUD_DebugBreakpoint() {
void UpdateDebugger() void UpdateDebugger()
{ {
//dont do anything if the debugger is not visible //don't do anything if the debugger is not visible
if(!hDebug) if(!hDebug)
return; return;
char str[256]={0},chr[8]; char str[256]={0},chr[8];
int tmp,ret,i; int tmp,ret,i;
Disassemble(hDebug, 300, 301, X.PC); Disassemble(hDebug, IDC_DEBUGGER_DISASSEMBLY, IDC_DEBUGGER_DISASSEMBLY_VSCR, X.PC);
sprintf(str, "%02X", X.A); sprintf(str, "%02X", X.A);
SetDlgItemText(hDebug, 304, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_A, str);
sprintf(str, "%02X", X.X); sprintf(str, "%02X", X.X);
SetDlgItemText(hDebug, 305, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_X, str);
sprintf(str, "%02X", X.Y); sprintf(str, "%02X", X.Y);
SetDlgItemText(hDebug, 306, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_Y, str);
sprintf(str, "%04X", (int)X.PC); sprintf(str, "%04X", (int)X.PC);
SetDlgItemText(hDebug, 307, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_PC, str);
sprintf(str, "%04X", (int)RefreshAddr); sprintf(str, "%04X", (int)RefreshAddr);
SetDlgItemText(hDebug, 310, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_PPU, str);
sprintf(str, "%02X", PPU[3]); sprintf(str, "%02X", PPU[3]);
SetDlgItemText(hDebug, 311, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_SPR, str);
sprintf(str, "Scanline: %d", scanline); sprintf(str, "Scanline: %d", scanline);
SetDlgItemText(hDebug, 501, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_SLINE, str);
tmp = X.S|0x0100; tmp = X.S|0x0100;
sprintf(str, "Stack $%04X", tmp); sprintf(str, "Stack $%04X", tmp);
SetDlgItemText(hDebug, 403, str); SetDlgItemText(hDebug, IDC_DEBUGGER_VAL_S, str);
tmp = ((tmp+1)|0x0100)&0x01FF; tmp = ((tmp+1)|0x0100)&0x01FF;
sprintf(str, "%02X", GetMem(tmp)); sprintf(str, "%02X", GetMem(tmp));
for (i = 1; i < 28; i++) { for (i = 1; i < 28; i++) {
@ -523,31 +512,31 @@ void UpdateDebugger()
else sprintf(chr, ",%02X", GetMem(tmp)); else sprintf(chr, ",%02X", GetMem(tmp));
strcat(str,chr); strcat(str,chr);
} }
SetDlgItemText(hDebug, 308, str); SetDlgItemText(hDebug, IDC_DEBUGGER_STACK_CONTENTS, str);
GetDlgItemText(hDebug,309,str,5); GetDlgItemText(hDebug,IDC_DEBUGGER_VAL_PCSEEK,str,5);
if (((ret = sscanf(str,"%4X",&tmp)) == EOF) || (ret != 1)) tmp = 0; if (((ret = sscanf(str,"%4X",&tmp)) == EOF) || (ret != 1)) tmp = 0;
sprintf(str,"%04X",tmp); sprintf(str,"%04X",tmp);
SetDlgItemText(hDebug,309,str); SetDlgItemText(hDebug,IDC_DEBUGGER_VAL_PCSEEK,str);
CheckDlgButton(hDebug, 200, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_N, BST_UNCHECKED);
CheckDlgButton(hDebug, 201, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_V, BST_UNCHECKED);
CheckDlgButton(hDebug, 202, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_U, BST_UNCHECKED);
CheckDlgButton(hDebug, 203, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_B, BST_UNCHECKED);
CheckDlgButton(hDebug, 204, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_D, BST_UNCHECKED);
CheckDlgButton(hDebug, 205, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_I, BST_UNCHECKED);
CheckDlgButton(hDebug, 206, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_Z, BST_UNCHECKED);
CheckDlgButton(hDebug, 207, BST_UNCHECKED); CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_C, BST_UNCHECKED);
tmp = X.P; tmp = X.P;
if (tmp & N_FLAG) CheckDlgButton(hDebug, 200, BST_CHECKED); if (tmp & N_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_N, BST_CHECKED);
if (tmp & V_FLAG) CheckDlgButton(hDebug, 201, BST_CHECKED); if (tmp & V_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_V, BST_CHECKED);
if (tmp & U_FLAG) CheckDlgButton(hDebug, 202, BST_CHECKED); if (tmp & U_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_U, BST_CHECKED);
if (tmp & B_FLAG) CheckDlgButton(hDebug, 203, BST_CHECKED); if (tmp & B_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_B, BST_CHECKED);
if (tmp & D_FLAG) CheckDlgButton(hDebug, 204, BST_CHECKED); if (tmp & D_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_D, BST_CHECKED);
if (tmp & I_FLAG) CheckDlgButton(hDebug, 205, BST_CHECKED); if (tmp & I_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_I, BST_CHECKED);
if (tmp & Z_FLAG) CheckDlgButton(hDebug, 206, BST_CHECKED); if (tmp & Z_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_Z, BST_CHECKED);
if (tmp & C_FLAG) CheckDlgButton(hDebug, 207, BST_CHECKED); if (tmp & C_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_C, BST_CHECKED);
} }
char *BreakToText(unsigned int num) { char *BreakToText(unsigned int num) {
@ -576,14 +565,14 @@ char *BreakToText(unsigned int num) {
} }
void AddBreakList() { void AddBreakList() {
SendDlgItemMessage(hDebug,302,LB_INSERTSTRING,-1,(LPARAM)(LPSTR)BreakToText(numWPs-1)); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_INSERTSTRING,-1,(LPARAM)(LPSTR)BreakToText(numWPs-1));
} }
void EditBreakList() { void EditBreakList() {
if (WP_edit >= 0) { if (WP_edit >= 0) {
SendDlgItemMessage(hDebug,302,LB_DELETESTRING,WP_edit,0); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_DELETESTRING,WP_edit,0);
SendDlgItemMessage(hDebug,302,LB_INSERTSTRING,WP_edit,(LPARAM)(LPSTR)BreakToText(WP_edit)); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_INSERTSTRING,WP_edit,(LPARAM)(LPSTR)BreakToText(WP_edit));
SendDlgItemMessage(hDebug,302,LB_SETCURSEL,WP_edit,0); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_SETCURSEL,WP_edit,0);
} }
} }
@ -591,15 +580,15 @@ void FillBreakList(HWND hwndDlg) {
int i; int i;
for (i = 0; i < numWPs; i++) { for (i = 0; i < numWPs; i++) {
SendDlgItemMessage(hwndDlg,302,LB_INSERTSTRING,-1,(LPARAM)(LPSTR)BreakToText(i)); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_BP_LIST,LB_INSERTSTRING,-1,(LPARAM)(LPSTR)BreakToText(i));
} }
} }
void EnableBreak(int sel) { void EnableBreak(int sel) {
watchpoint[sel].flags^=WP_E; watchpoint[sel].flags^=WP_E;
SendDlgItemMessage(hDebug,302,LB_DELETESTRING,sel,0); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_DELETESTRING,sel,0);
SendDlgItemMessage(hDebug,302,LB_INSERTSTRING,sel,(LPARAM)(LPSTR)BreakToText(sel)); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_INSERTSTRING,sel,(LPARAM)(LPSTR)BreakToText(sel));
SendDlgItemMessage(hDebug,302,LB_SETCURSEL,sel,0); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_SETCURSEL,sel,0);
} }
void DeleteBreak(int sel) { void DeleteBreak(int sel) {
@ -619,13 +608,13 @@ void DeleteBreak(int sel) {
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
myNumWPs--; myNumWPs--;
// ################################## End of SP CODE ########################### // ################################## End of SP CODE ###########################
SendDlgItemMessage(hDebug,302,LB_DELETESTRING,sel,0); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_DELETESTRING,sel,0);
EnableWindow(GetDlgItem(hDebug,102),FALSE); EnableWindow(GetDlgItem(hDebug,IDC_DEBUGGER_BP_DEL),FALSE);
EnableWindow(GetDlgItem(hDebug,103),FALSE); EnableWindow(GetDlgItem(hDebug,IDC_DEBUGGER_BP_EDIT),FALSE);
} }
void KillDebugger() { void KillDebugger() {
SendDlgItemMessage(hDebug,302,LB_RESETCONTENT,0,0); SendDlgItemMessage(hDebug,IDC_DEBUGGER_BP_LIST,LB_RESETCONTENT,0,0);
FCEUI_Debugger().reset(); FCEUI_Debugger().reset();
FCEUI_SetEmulationPaused(0); //mbg merge 7/18/06 changed from userpause FCEUI_SetEmulationPaused(0); //mbg merge 7/18/06 changed from userpause
} }
@ -768,17 +757,17 @@ BOOL CALLBACK PatcherCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
CenterWindow(hwndDlg); CenterWindow(hwndDlg);
//set limits //set limits
SendDlgItemMessage(hwndDlg,102,EM_SETLIMITTEXT,6,0); SendDlgItemMessage(hwndDlg,IDC_ROMPATCHER_OFFSET,EM_SETLIMITTEXT,6,0);
SendDlgItemMessage(hwndDlg,109,EM_SETLIMITTEXT,30,0); SendDlgItemMessage(hwndDlg,IDC_ROMPATCHER_PATCH_DATA,EM_SETLIMITTEXT,30,0);
UpdatePatcher(hwndDlg); UpdatePatcher(hwndDlg);
if(iapoffset != -1){ if(iapoffset != -1){
CheckDlgButton(hwndDlg, 101, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_ROMPATCHER_DOTNES_OFFSET, BST_CHECKED);
sprintf((char*)str,"%X",iapoffset); //mbg merge 7/18/06 added cast sprintf((char*)str,"%X",iapoffset); //mbg merge 7/18/06 added cast
SetDlgItemText(hwndDlg,102,str); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_OFFSET,str);
} }
SetFocus(GetDlgItem(hwndDlg,100)); SetFocus(GetDlgItem(hwndDlg,IDC_ROMPATCHER_OFFSET_BOX));
break; break;
case WM_CLOSE: case WM_CLOSE:
case WM_QUIT: case WM_QUIT:
@ -788,10 +777,10 @@ BOOL CALLBACK PatcherCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 103: //todo: maybe get rid of this button and cause iapoffset to update every time you change the text case IDC_ROMPATCHER_BTN_EDIT: //todo: maybe get rid of this button and cause iapoffset to update every time you change the text
if(IsDlgButtonChecked(hwndDlg,101) == BST_CHECKED){ if(IsDlgButtonChecked(hwndDlg,IDC_ROMPATCHER_DOTNES_OFFSET) == BST_CHECKED){
iapoffset = GetEditHex(hwndDlg,102); iapoffset = GetEditHex(hwndDlg,IDC_ROMPATCHER_OFFSET);
} else iapoffset = GetNesFileAddress(GetEditHex(hwndDlg,102)); } else iapoffset = GetNesFileAddress(GetEditHex(hwndDlg,IDC_ROMPATCHER_OFFSET));
if((iapoffset < 16) && (iapoffset != -1)){ if((iapoffset < 16) && (iapoffset != -1)){
MessageBox(hDebug, "Sorry, iNes Header editing isn't supported", "Error", MB_OK); MessageBox(hDebug, "Sorry, iNes Header editing isn't supported", "Error", MB_OK);
iapoffset = -1; iapoffset = -1;
@ -802,8 +791,8 @@ BOOL CALLBACK PatcherCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
} }
UpdatePatcher(hwndDlg); UpdatePatcher(hwndDlg);
break; break;
case 110: case IDC_ROMPATCHER_BTN_APPLY:
p = GetEditHexData(hwndDlg,109); p = GetEditHexData(hwndDlg,IDC_ROMPATCHER_PATCH_DATA);
i=0; i=0;
c = GetNesPRGPointer(iapoffset-16); c = GetNesPRGPointer(iapoffset-16);
while(p[i] != -1){ while(p[i] != -1){
@ -812,7 +801,7 @@ BOOL CALLBACK PatcherCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
} }
UpdatePatcher(hwndDlg); UpdatePatcher(hwndDlg);
break; break;
case 111: case IDC_ROMPATCHER_BTN_SAVE:
if(!iNesSave())MessageBox(NULL,"Error Saving","Error",MB_OK); if(!iNesSave())MessageBox(NULL,"Error Saving","Error",MB_OK);
break; break;
} }
@ -855,7 +844,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
si.nMax = 0x10000; si.nMax = 0x10000;
si.nPos = 0; si.nPos = 0;
si.nPage = 20; si.nPage = 20;
SetScrollInfo(GetDlgItem(hwndDlg,301),SB_CTL,&si,TRUE); SetScrollInfo(GetDlgItem(hwndDlg,IDC_DEBUGGER_DISASSEMBLY_VSCR),SB_CTL,&si,TRUE);
//setup font //setup font
hFont = (HFONT)SendMessage(hwndDlg, WM_GETFONT, 0, 0); hFont = (HFONT)SendMessage(hwndDlg, WM_GETFONT, 0, 0);
@ -863,33 +852,33 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
strcpy(lf.lfFaceName,"Courier"); strcpy(lf.lfFaceName,"Courier");
hNewFont = CreateFontIndirect(&lf); hNewFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg,300,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_DISASSEMBLY,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,304,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_A,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,305,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_X,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,306,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_Y,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,307,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PC,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,308,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_STACK_CONTENTS,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,309,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PCSEEK,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,310,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PPU,WM_SETFONT,(WPARAM)hNewFont,FALSE);
SendDlgItemMessage(hwndDlg,311,WM_SETFONT,(WPARAM)hNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_SPR,WM_SETFONT,(WPARAM)hNewFont,FALSE);
//text limits //text limits
SendDlgItemMessage(hwndDlg,304,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_A,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,305,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_X,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,306,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_Y,EM_SETLIMITTEXT,2,0);
SendDlgItemMessage(hwndDlg,307,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PC,EM_SETLIMITTEXT,4,0);
SendDlgItemMessage(hwndDlg,308,EM_SETLIMITTEXT,83,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_STACK_CONTENTS,EM_SETLIMITTEXT,83,0);
SendDlgItemMessage(hwndDlg,309,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PCSEEK,EM_SETLIMITTEXT,4,0);
SendDlgItemMessage(hwndDlg,310,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PPU,EM_SETLIMITTEXT,4,0);
SendDlgItemMessage(hwndDlg,311,EM_SETLIMITTEXT,2,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_SPR,EM_SETLIMITTEXT,2,0);
//I'm lazy, disable the controls which I can't mess with right now //I'm lazy, disable the controls which I can't mess with right now
SendDlgItemMessage(hwndDlg,310,EM_SETREADONLY,TRUE,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PPU,EM_SETREADONLY,TRUE,0);
SendDlgItemMessage(hwndDlg,311,EM_SETREADONLY,TRUE,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_SPR,EM_SETREADONLY,TRUE,0);
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
SendDlgItemMessage(hwndDlg,312,EM_SETLIMITTEXT,4,0); SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_BOOKMARK,EM_SETLIMITTEXT,4,0);
if (!loadDebugDataFailed) if (!loadDebugDataFailed)
{ {
@ -906,7 +895,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
if (symbDebugEnabled) if (symbDebugEnabled)
{ {
CheckDlgButton(hwndDlg, 208, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_DEBUGGER_ENABLE_SYMBOLIC, BST_CHECKED);
} }
numWPs = myNumWPs; numWPs = myNumWPs;
@ -937,9 +926,6 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
DbgPosX = wrect.left; DbgPosX = wrect.left;
DbgPosY = wrect.top; DbgPosY = wrect.top;
break; break;
case WM_COMMAND:
if ((HIWORD(wParam) == BN_CLICKED) && (LOWORD(wParam) == 100)) goto exitdebug;
break;
} }
//these messages only get handled when a game is loaded //these messages only get handled when a game is loaded
@ -967,7 +953,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
if (si.nPos < si.nMin) si.nPos = si.nMin; if (si.nPos < si.nMin) si.nPos = si.nMin;
if ((si.nPos+(int)si.nPage) > si.nMax) si.nPos = si.nMax-si.nPage; //mbg merge 7/18/06 added cast if ((si.nPos+(int)si.nPage) > si.nMax) si.nPos = si.nMax-si.nPage; //mbg merge 7/18/06 added cast
SetScrollInfo((HWND)lParam,SB_CTL,&si,TRUE); SetScrollInfo((HWND)lParam,SB_CTL,&si,TRUE);
Disassemble(hDebug, 300, 301, si.nPos); Disassemble(hDebug, IDC_DEBUGGER_DISASSEMBLY, IDC_DEBUGGER_DISASSEMBLY_VSCR, si.nPos);
} }
break; break;
@ -979,7 +965,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
if (si.nPos < si.nMin) si.nPos = si.nMin; if (si.nPos < si.nMin) si.nPos = si.nMin;
if ((si.nPos+(int)si.nPage) > si.nMax) si.nPos = si.nMax-si.nPage; //mbg merge 7/18/06 added cast if ((si.nPos+(int)si.nPage) > si.nMax) si.nPos = si.nMax-si.nPage; //mbg merge 7/18/06 added cast
SetScrollInfo((HWND)lParam,SB_CTL,&si,TRUE); SetScrollInfo((HWND)lParam,SB_CTL,&si,TRUE);
Disassemble(hDebug, 300, 301, si.nPos); Disassemble(hDebug, IDC_DEBUGGER_DISASSEMBLY, IDC_DEBUGGER_DISASSEMBLY_VSCR, si.nPos);
break; break;
case WM_KEYDOWN: case WM_KEYDOWN:
@ -1021,11 +1007,11 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
else sprintf(str,"CPU Address %02X:%04X, Offset 0x%06X in file \"%.20s%s\" (NL file: %X)",getBank(i),i,GetNesFileAddress(i),ptr,dotdot,getBank(i)); else sprintf(str,"CPU Address %02X:%04X, Offset 0x%06X in file \"%.20s%s\" (NL file: %X)",getBank(i),i,GetNesFileAddress(i),ptr,dotdot,getBank(i));
// ################################## End of SP CODE ########################### // ################################## End of SP CODE ###########################
SetDlgItemText(hwndDlg,502,str); SetDlgItemText(hwndDlg,IDC_DEBUGGER_ADDR_LINE,str);
} }
else SetDlgItemText(hwndDlg,502,""); else SetDlgItemText(hwndDlg,IDC_DEBUGGER_ADDR_LINE,"");
} }
else SetDlgItemText(hwndDlg,502,""); else SetDlgItemText(hwndDlg,IDC_DEBUGGER_ADDR_LINE,"");
break; break;
case WM_LBUTTONDOWN: case WM_LBUTTONDOWN:
mouse_x = GET_X_LPARAM(lParam); mouse_x = GET_X_LPARAM(lParam);
@ -1100,29 +1086,29 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 101: //Add case IDC_DEBUGGER_BP_ADD:
childwnd = 1; childwnd = 1;
if (DialogBox(fceu_hInstance,"ADDBP",hwndDlg,AddbpCallB)) AddBreakList(); if (DialogBox(fceu_hInstance,"ADDBP",hwndDlg,AddbpCallB)) AddBreakList();
childwnd = 0; childwnd = 0;
UpdateDebugger(); UpdateDebugger();
break; break;
case 102: //Delete case IDC_DEBUGGER_BP_DEL:
DeleteBreak(SendDlgItemMessage(hwndDlg,302,LB_GETCURSEL,0,0)); DeleteBreak(SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_BP_LIST,LB_GETCURSEL,0,0));
break; break;
case 103: //Edit case IDC_DEBUGGER_BP_EDIT:
WP_edit = SendDlgItemMessage(hwndDlg,302,LB_GETCURSEL,0,0); WP_edit = SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_BP_LIST,LB_GETCURSEL,0,0);
if (DialogBox(fceu_hInstance,"ADDBP",hwndDlg,AddbpCallB)) EditBreakList(); if (DialogBox(fceu_hInstance,"ADDBP",hwndDlg,AddbpCallB)) EditBreakList();
WP_edit = -1; WP_edit = -1;
UpdateDebugger(); UpdateDebugger();
break; break;
case 104: //Run case IDC_DEBUGGER_RUN:
//mbg merge 7/18/06 changed pausing check and set //mbg merge 7/18/06 changed pausing check and set
if (FCEUI_EmulationPaused()) { if (FCEUI_EmulationPaused()) {
UpdateRegs(hwndDlg); UpdateRegs(hwndDlg);
FCEUI_ToggleEmulationPause(); FCEUI_ToggleEmulationPause();
} }
break; break;
case 105: //Step Into case IDC_DEBUGGER_STEP_IN:
//mbg merge 7/19/06 also put the whole block inside the if (previously only updateregs was... was it a bug?) //mbg merge 7/19/06 also put the whole block inside the if (previously only updateregs was... was it a bug?)
//mbg merge 7/18/06 changed pausing check and set //mbg merge 7/18/06 changed pausing check and set
if (FCEUI_EmulationPaused()) { if (FCEUI_EmulationPaused()) {
@ -1132,7 +1118,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
UpdateDebugger(); UpdateDebugger();
} }
break; break;
case 106: //Step Out case IDC_DEBUGGER_STEP_OUT:
//mbg merge 7/18/06 changed pausing check and set //mbg merge 7/18/06 changed pausing check and set
if (FCEUI_EmulationPaused() > 0) { if (FCEUI_EmulationPaused() > 0) {
DebuggerState &dbgstate = FCEUI_Debugger(); DebuggerState &dbgstate = FCEUI_Debugger();
@ -1145,7 +1131,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
//UpdateDebugger(); //UpdateDebugger();
} }
break; break;
case 107: //Step Over case IDC_DEBUGGER_STEP_OVER:
//mbg merge 7/18/06 changed pausing check and set //mbg merge 7/18/06 changed pausing check and set
if (FCEUI_EmulationPaused()) { if (FCEUI_EmulationPaused()) {
UpdateRegs(hwndDlg); UpdateRegs(hwndDlg);
@ -1158,97 +1144,75 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
FCEUI_SetEmulationPaused(0); FCEUI_SetEmulationPaused(0);
} }
break; break;
case 108: //Seek PC case IDC_DEBUGGER_SEEK_PC:
//mbg merge 7/18/06 changed pausing check //mbg merge 7/18/06 changed pausing check
if (FCEUI_EmulationPaused()) { if (FCEUI_EmulationPaused()) {
UpdateRegs(hwndDlg); UpdateRegs(hwndDlg);
UpdateDebugger(); UpdateDebugger();
} }
break; break;
case 109: //Seek To: case IDC_DEBUGGER_SEEK_TO:
//mbg merge 7/18/06 changed pausing check //mbg merge 7/18/06 changed pausing check
if (FCEUI_EmulationPaused()) UpdateRegs(hwndDlg); if (FCEUI_EmulationPaused()) UpdateRegs(hwndDlg);
GetDlgItemText(hwndDlg,309,str,5); GetDlgItemText(hwndDlg,IDC_DEBUGGER_VAL_PCSEEK,str,5);
if (((ret = sscanf(str,"%4X",&tmp)) == EOF) || (ret != 1)) tmp = 0; if (((ret = sscanf(str,"%4X",&tmp)) == EOF) || (ret != 1)) tmp = 0;
sprintf(str,"%04X",tmp); sprintf(str,"%04X",tmp);
SetDlgItemText(hwndDlg,309,str); SetDlgItemText(hwndDlg,IDC_DEBUGGER_VAL_PCSEEK,str);
Disassemble(hDebug, 300, 301, tmp); Disassemble(hDebug, IDC_DEBUGGER_DISASSEMBLY, IDC_DEBUGGER_DISASSEMBLY_VSCR, tmp);
break; break;
case 110: //Break on bad opcode case IDC_DEBUGGER_BREAK_ON_BAD_OP: //Break on bad opcode
FCEUI_Debugger().badopbreak ^=1; FCEUI_Debugger().badopbreak ^=1;
break; break;
case 200: X.P^=N_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_N: X.P^=N_FLAG; UpdateDebugger(); break;
case 201: X.P^=V_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_V: X.P^=V_FLAG; UpdateDebugger(); break;
case 202: X.P^=U_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_U: X.P^=U_FLAG; UpdateDebugger(); break;
case 203: X.P^=B_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_B: X.P^=B_FLAG; UpdateDebugger(); break;
case 204: X.P^=D_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_D: X.P^=D_FLAG; UpdateDebugger(); break;
case 205: X.P^=I_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_I: X.P^=I_FLAG; UpdateDebugger(); break;
case 206: X.P^=Z_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_Z: X.P^=Z_FLAG; UpdateDebugger(); break;
case 207: X.P^=C_FLAG; UpdateDebugger(); break; case IDC_DEBUGGER_FLAG_C: X.P^=C_FLAG; UpdateDebugger(); break;
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
case 111: lastBank = loadedBank = -1; loadNameFiles(); UpdateDebugger(); break; case IDC_DEBUGGER_RELOAD_SYMS: lastBank = loadedBank = -1; loadNameFiles(); UpdateDebugger(); break;
case 112: AddDebuggerBookmark(hwndDlg); break; case IDC_DEBUGGER_BOOKMARK_ADD: AddDebuggerBookmark(hwndDlg); break;
case 113: DeleteDebuggerBookmark(hwndDlg); break; case IDC_DEBUGGER_BOOKMARK_DEL: DeleteDebuggerBookmark(hwndDlg); break;
case 208: UpdateDebugger(); break; case IDC_DEBUGGER_ENABLE_SYMBOLIC: UpdateDebugger(); break;
// ################################## End of SP CODE ########################### // ################################## End of SP CODE ###########################
case 602: DoPatcher(-1,hwndDlg); break; case IDC_DEBUGGER_ROM_PATCHER: DoPatcher(-1,hwndDlg); break;
//case 603: DoTracer(hwndDlg); break;
} }
//UpdateDebugger(); //UpdateDebugger();
break; break;
case LBN_DBLCLK: case LBN_DBLCLK:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 302: EnableBreak(SendDlgItemMessage(hwndDlg,302,LB_GETCURSEL,0,0)); break; case IDC_DEBUGGER_BP_LIST: EnableBreak(SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_BP_LIST,LB_GETCURSEL,0,0)); break;
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
case 701: GoToDebuggerBookmark(hwndDlg); break; case LIST_DEBUGGER_BOOKMARKS: GoToDebuggerBookmark(hwndDlg); break;
// ################################## End of SP CODE ########################### // ################################## End of SP CODE ###########################
} }
break; break;
case LBN_SELCANCEL: case LBN_SELCANCEL:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 302: case IDC_DEBUGGER_BP_LIST:
EnableWindow(GetDlgItem(hwndDlg,102),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_DEBUGGER_BP_DEL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,103),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_DEBUGGER_BP_EDIT),FALSE);
break; break;
} }
break; break;
case LBN_SELCHANGE: case LBN_SELCHANGE:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 302: case IDC_DEBUGGER_BP_LIST:
EnableWindow(GetDlgItem(hwndDlg,102),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_DEBUGGER_BP_DEL),TRUE);
EnableWindow(GetDlgItem(hwndDlg,103),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_DEBUGGER_BP_EDIT),TRUE);
break; break;
} }
break; break;
} }
break;/* break;
default:
if(
(uMsg == 312) ||
(uMsg == 309) ||
(uMsg == 308) ||
(uMsg == 307) ||
(uMsg == 311) ||
(uMsg == 71) ||
(uMsg == 310) ||
(uMsg == 20) ||
(uMsg == 13) ||
(uMsg == 133) ||
(uMsg == 70) ||
(uMsg == 24) ||
(uMsg == 296) ||
(uMsg == 295) ||
(uMsg == 15) ||
(uMsg == 272) ||
(uMsg == 49) ||
(uMsg == 3)
)break;*/
/* /*
if(skipdebug)break; if(skipdebug)break;
@ -1284,34 +1248,34 @@ void UpdatePatcher(HWND hwndDlg){
char str[75]; //mbg merge 7/18/06 changed from unsigned char str[75]; //mbg merge 7/18/06 changed from unsigned
uint8 *p; uint8 *p;
if(iapoffset != -1){ if(iapoffset != -1){
EnableWindow(GetDlgItem(hwndDlg,109),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_ROMPATCHER_PATCH_DATA),TRUE);
EnableWindow(GetDlgItem(hwndDlg,110),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_ROMPATCHER_BTN_APPLY),TRUE);
if(GetRomAddress(iapoffset) != -1)sprintf(str,"Current Data at NES ROM Address: %04X, .NES file Address: %04X",GetRomAddress(iapoffset),iapoffset); if(GetRomAddress(iapoffset) != -1)sprintf(str,"Current Data at NES ROM Address: %04X, .NES file Address: %04X",GetRomAddress(iapoffset),iapoffset);
else sprintf(str,"Current Data at .NES file Address: %04X",iapoffset); else sprintf(str,"Current Data at .NES file Address: %04X",iapoffset);
SetDlgItemText(hwndDlg,104,str); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_CURRENT_DATA_BOX,str);
sprintf(str,"%04X",GetRomAddress(iapoffset)); sprintf(str,"%04X",GetRomAddress(iapoffset));
SetDlgItemText(hwndDlg,107,str); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_DISASSEMBLY,str);
if(GetRomAddress(iapoffset) != -1)SetDlgItemText(hwndDlg,107,DisassembleLine(GetRomAddress(iapoffset))); if(GetRomAddress(iapoffset) != -1)SetDlgItemText(hwndDlg,IDC_ROMPATCHER_DISASSEMBLY,DisassembleLine(GetRomAddress(iapoffset)));
else SetDlgItemText(hwndDlg,107,"Not Currently Loaded in ROM for disassembly"); else SetDlgItemText(hwndDlg,IDC_ROMPATCHER_DISASSEMBLY,"Not Currently Loaded in ROM for disassembly");
p = GetNesPRGPointer(iapoffset-16); p = GetNesPRGPointer(iapoffset-16);
sprintf(str,"%02X %02X %02X %02X %02X %02X %02X %02X", sprintf(str,"%02X %02X %02X %02X %02X %02X %02X %02X",
p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7]); p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7]);
SetDlgItemText(hwndDlg,105,str); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_CURRENT_DATA,str);
} else { } else {
SetDlgItemText(hwndDlg,104,"No Offset Selected"); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_CURRENT_DATA_BOX,"No Offset Selected");
SetDlgItemText(hwndDlg,105,""); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_CURRENT_DATA,"");
SetDlgItemText(hwndDlg,107,""); SetDlgItemText(hwndDlg,IDC_ROMPATCHER_DISASSEMBLY,"");
EnableWindow(GetDlgItem(hwndDlg,109),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ROMPATCHER_PATCH_DATA),FALSE);
EnableWindow(GetDlgItem(hwndDlg,110),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ROMPATCHER_BTN_APPLY),FALSE);
} }
if(GameInfo->type != GIT_CART)EnableWindow(GetDlgItem(hwndDlg,111),FALSE); if(GameInfo->type != GIT_CART)EnableWindow(GetDlgItem(hwndDlg,IDC_ROMPATCHER_BTN_SAVE),FALSE);
else EnableWindow(GetDlgItem(hwndDlg,111),TRUE); else EnableWindow(GetDlgItem(hwndDlg,IDC_ROMPATCHER_BTN_SAVE),TRUE);
} }
void DoDebug(uint8 halt) { void DoDebug(uint8 halt) {

View File

@ -685,7 +685,7 @@ unsigned int getBookmarkAddress(HWND hwnd, unsigned int index)
int n; int n;
char buffer[5] = {0}; char buffer[5] = {0};
SendDlgItemMessage(hwnd, 701, LB_GETTEXT, index, (LPARAM)buffer); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_GETTEXT, index, (LPARAM)buffer);
sscanf(buffer, "%x", &n); sscanf(buffer, "%x", &n);
@ -707,7 +707,7 @@ void dumpBookmarks(HWND hwnd)
if (bookmarkData) if (bookmarkData)
free(bookmarkData); free(bookmarkData);
bookmarks = SendDlgItemMessage(hwnd, 701, LB_GETCOUNT, 0, 0); bookmarks = SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_GETCOUNT, 0, 0);
bookmarkData = (unsigned short*)malloc(bookmarks * sizeof(unsigned short)); bookmarkData = (unsigned short*)malloc(bookmarks * sizeof(unsigned short));
for (i=0;i<bookmarks;i++) for (i=0;i<bookmarks;i++)
@ -730,7 +730,7 @@ void AddDebuggerBookmark2(HWND hwnd, char* buffer)
return; return;
} }
SendDlgItemMessage(hwnd, 701, LB_ADDSTRING, 0, (LPARAM)buffer); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_ADDSTRING, 0, (LPARAM)buffer);
dumpBookmarks(hwnd); dumpBookmarks(hwnd);
} }
@ -747,7 +747,7 @@ void AddDebuggerBookmark(HWND hwnd)
unsigned int n; unsigned int n;
char buffer[5] = {0}; char buffer[5] = {0};
GetDlgItemText(hwnd, 312, buffer, 5); GetDlgItemText(hwnd, IDC_DEBUGGER_BOOKMARK, buffer, 5);
result = sscanf(buffer, "%x", &n); result = sscanf(buffer, "%x", &n);
@ -769,7 +769,7 @@ void AddDebuggerBookmark(HWND hwnd)
void DeleteDebuggerBookmark(HWND hwnd) void DeleteDebuggerBookmark(HWND hwnd)
{ {
// Get the selected bookmark // Get the selected bookmark
int selectedItem = SendDlgItemMessage(hwnd, 701, LB_GETCURSEL, 0, 0); int selectedItem = SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_GETCURSEL, 0, 0);
if (selectedItem == LB_ERR) if (selectedItem == LB_ERR)
{ {
@ -780,7 +780,7 @@ void DeleteDebuggerBookmark(HWND hwnd)
{ {
// Remove the selected bookmark // Remove the selected bookmark
SendDlgItemMessage(hwnd, 701, LB_DELETESTRING, selectedItem, 0); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_DELETESTRING, selectedItem, 0);
dumpBookmarks(hwnd); dumpBookmarks(hwnd);
} }
} }
@ -795,7 +795,7 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr);
void GoToDebuggerBookmark(HWND hwnd) void GoToDebuggerBookmark(HWND hwnd)
{ {
unsigned int n; unsigned int n;
int selectedItem = SendDlgItemMessage(hwnd, 701, LB_GETCURSEL, 0, 0); int selectedItem = SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_GETCURSEL, 0, 0);
// If no bookmark is selected just return // If no bookmark is selected just return
if (selectedItem == LB_ERR) return; if (selectedItem == LB_ERR) return;

View File

@ -777,13 +777,13 @@ static BOOL CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if(bc->NumC >= MAXBUTTCONFIG) if(bc->NumC >= MAXBUTTCONFIG)
goto gornk; goto gornk;
nstr = MakeButtString(bc); nstr = MakeButtString(bc);
SetDlgItemText(hwndDlg, 100, nstr); SetDlgItemText(hwndDlg, LBL_DWBDIALOG_TEXT, nstr);
free(nstr); free(nstr);
} }
} }
break; break;
case WM_USER + 666: case WM_USER + 666:
//SetFocus(GetDlgItem(hwndDlg,100)); //SetFocus(GetDlgItem(hwndDlg,LBL_DWBDIALOG_TEXT));
if(DWBStarted) if(DWBStarted)
{ {
char *nstr; char *nstr;
@ -791,7 +791,7 @@ static BOOL CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bc->NumC = 0; bc->NumC = 0;
DWBStarted = 0; DWBStarted = 0;
nstr = MakeButtString(bc); nstr = MakeButtString(bc);
SetDlgItemText(hwndDlg, 100, nstr); SetDlgItemText(hwndDlg, LBL_DWBDIALOG_TEXT, nstr);
free(nstr); free(nstr);
} }
@ -815,7 +815,7 @@ static BOOL CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
goto gornk; goto gornk;
nstr = MakeButtString(bc); nstr = MakeButtString(bc);
SetDlgItemText(hwndDlg, 100, nstr); SetDlgItemText(hwndDlg, LBL_DWBDIALOG_TEXT, nstr);
free(nstr); free(nstr);
} }
break; break;
@ -825,7 +825,7 @@ static BOOL CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetTimer(hwndDlg,666,25,0); /* Every 25ms.*/ SetTimer(hwndDlg,666,25,0); /* Every 25ms.*/
{ {
char *nstr = MakeButtString(DWBButtons); char *nstr = MakeButtString(DWBButtons);
SetDlgItemText(hwndDlg, 100, nstr); SetDlgItemText(hwndDlg, LBL_DWBDIALOG_TEXT, nstr);
free(nstr); free(nstr);
} }
break; break;
@ -835,17 +835,17 @@ static BOOL CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case WM_COMMAND: case WM_COMMAND:
switch(wParam&0xFFFF) switch(wParam&0xFFFF)
{ {
case 200: case BTN_CLEAR:
{ {
ButtConfig *bc = DWBButtons; ButtConfig *bc = DWBButtons;
char *nstr; char *nstr;
bc->NumC = 0; bc->NumC = 0;
nstr = MakeButtString(bc); nstr = MakeButtString(bc);
SetDlgItemText(hwndDlg, 100, nstr); SetDlgItemText(hwndDlg, LBL_DWBDIALOG_TEXT, nstr);
free(nstr); free(nstr);
} }
break; break;
case 201: case BTN_CLOSE:
gornk: gornk:
KillTimer(hwndDlg,666); KillTimer(hwndDlg,666);
EndJoyWait(hAppWnd); EndJoyWait(hAppWnd);
@ -958,12 +958,12 @@ static BOOL CALLBACK DoTBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
{ {
char buf[32]; char buf[32];
sprintf(buf,"Virtual Gamepad %d",DoTBPort+1); sprintf(buf,"Virtual Gamepad %d",DoTBPort+1);
SetDlgItemText(hwndDlg, 100,buf); SetDlgItemText(hwndDlg, GRP_GAMEPAD1,buf);
sprintf(buf,"Virtual Gamepad %d",DoTBPort+3); sprintf(buf,"Virtual Gamepad %d",DoTBPort+3);
SetDlgItemText(hwndDlg, 101, buf); SetDlgItemText(hwndDlg, GRP_GAMEPAD2, buf);
CheckDlgButton(hwndDlg,400,(eoptions & EO_NOFOURSCORE)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg,CHECK_DISABLE_FOURSCORE,(eoptions & EO_NOFOURSCORE)?BST_CHECKED:BST_UNCHECKED);
} }
SetWindowText(hwndDlg, DoTBTitle); SetWindowText(hwndDlg, DoTBTitle);
break; break;
@ -983,13 +983,13 @@ static BOOL CALLBACK DoTBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
} }
else switch(wParam&0xFFFF) else switch(wParam&0xFFFF)
{ {
case 1: case BTN_CLOSE:
gornk: gornk:
if(DoTBType == SI_GAMEPAD) if(DoTBType == SI_GAMEPAD)
{ {
eoptions &= ~EO_NOFOURSCORE; eoptions &= ~EO_NOFOURSCORE;
if(IsDlgButtonChecked(hwndDlg,400)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,CHECK_DISABLE_FOURSCORE)==BST_CHECKED)
eoptions|=EO_NOFOURSCORE; eoptions|=EO_NOFOURSCORE;
} }
EndDialog(hwndDlg,0); EndDialog(hwndDlg,0);

View File

@ -47,8 +47,8 @@ void RedoText(void)
} }
} }
SetDlgItemText(logwin, 100, textbuf); SetDlgItemText(logwin, LBL_LOG_TEXT, textbuf);
SendDlgItemMessage(logwin, 100, EM_LINESCROLL, 0, 200); SendDlgItemMessage(logwin, LBL_LOG_TEXT, EM_LINESCROLL, 0, 200);
} }
/** /**

View File

@ -338,7 +338,7 @@ BOOL CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
memset(keyonce, 0, sizeof(keyonce)); memset(keyonce, 0, sizeof(keyonce));
KeyboardSetBackgroundAccess(1); KeyboardSetBackgroundAccess(1);
SetFocus(GetDlgItem(hwndDlg, 100)); SetFocus(GetDlgItem(hwndDlg, LBL_KEY_COMBO));
CenterWindowOnScreen(hwndDlg); CenterWindowOnScreen(hwndDlg);
} }
@ -375,7 +375,7 @@ BOOL CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
{ {
key = newkey | meta; key = newkey | meta;
ClearExtraMeta(&key); ClearExtraMeta(&key);
SetDlgItemText(hwndDlg, 100, GetKeyComboName(key)); SetDlgItemText(hwndDlg, LBL_KEY_COMBO, GetKeyComboName(key));
} }
else if(NothingPressed() && key) else if(NothingPressed() && key)
{ {

View File

@ -697,7 +697,7 @@ void ChangeMemViewFocus(int newEditingMode, int StartOffset,int EndOffset){
if(!hMemView)DoMemView(); if(!hMemView)DoMemView();
if(EditingMode != newEditingMode) if(EditingMode != newEditingMode)
MemViewCallB(hMemView,WM_COMMAND,300+newEditingMode,0); //let the window handler change this for us MemViewCallB(hMemView,WM_COMMAND,MENU_MV_VIEW_RAM+newEditingMode,0); //let the window handler change this for us
if((EndOffset == StartOffset) || (EndOffset == -1)){ if((EndOffset == StartOffset) || (EndOffset == -1)){
CursorEndAddy = -1; CursorEndAddy = -1;
@ -831,11 +831,11 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_ENTERMENULOOP:return 0; case WM_ENTERMENULOOP:return 0;
case WM_INITMENUPOPUP: case WM_INITMENUPOPUP:
if(undo_list != 0)EnableMenuItem(GetMenu(hMemView),200,MF_BYCOMMAND | MF_ENABLED); if(undo_list != 0)EnableMenuItem(GetMenu(hMemView),MENU_MV_EDIT_UNDO,MF_BYCOMMAND | MF_ENABLED);
else EnableMenuItem(GetMenu(hMemView),200,MF_BYCOMMAND | MF_GRAYED); else EnableMenuItem(GetMenu(hMemView),MENU_MV_EDIT_UNDO,MF_BYCOMMAND | MF_GRAYED);
if(TableFileLoaded)EnableMenuItem(GetMenu(hMemView),103,MF_BYCOMMAND | MF_ENABLED); if(TableFileLoaded)EnableMenuItem(GetMenu(hMemView),MENU_MV_FILE_UNLOAD_TBL,MF_BYCOMMAND | MF_ENABLED);
else EnableMenuItem(GetMenu(hMemView),103,MF_BYCOMMAND | MF_GRAYED); else EnableMenuItem(GetMenu(hMemView),MENU_MV_FILE_UNLOAD_TBL,MF_BYCOMMAND | MF_GRAYED);
return 0; return 0;
@ -939,10 +939,10 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
switch(wParam){ switch(wParam){
case 0x43: //Ctrl+C case 0x43: //Ctrl+C
MemViewCallB(hMemView,WM_COMMAND,201,0); //recursion at work MemViewCallB(hMemView,WM_COMMAND,MENU_MV_EDIT_COPY,0); //recursion at work
return 0; return 0;
case 0x56: //Ctrl+V case 0x56: //Ctrl+V
MemViewCallB(hMemView,WM_COMMAND,202,0); MemViewCallB(hMemView,WM_COMMAND,MENU_MV_EDIT_PASTE,0);
return 0; return 0;
case 0x5a: //Ctrl+Z case 0x5a: //Ctrl+Z
UndoLastPatch(); UndoLastPatch();
@ -1118,7 +1118,6 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
InsertMenuItem(hMenu,i+1,1,&MenuInfo); InsertMenuItem(hMenu,i+1,1,&MenuInfo);
} }
} }
//InsertMenu(hMenu, 1, MF_STRING, 892, "Test");
if(i != 0)i = TrackPopupMenuEx(hMenu, TPM_RETURNCMD, x, y, hMemView, NULL); if(i != 0)i = TrackPopupMenuEx(hMenu, TPM_RETURNCMD, x, y, hMemView, NULL);
switch(i){ switch(i){
case 1 : //1 = Freeze Ram Address case 1 : //1 = Freeze Ram Address
@ -1295,42 +1294,18 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_COMMAND: case WM_COMMAND:
// ################################## Start of SP CODE ###########################
if (wParam >= 30 && wParam <= 39)
{
int newValue = handleBookmarkMenu(wParam - 30);
if (newValue != -1)
{
CurOffset = newValue;
CursorEndAddy = -1;
CursorStartAddy = hexBookmarks[wParam - 30].address;
UpdateColorTable();
}
}
else if (wParam == 400)
{
removeAllBookmarks(GetSubMenu(GetMenu(hwnd), 3));
UpdateColorTable();
}
else if (wParam == 600)
{
MessageBox(0, "", "", 0);
}
// ################################## End of SP CODE ###########################
switch(wParam) switch(wParam)
{ {
case 100: case MENU_MV_FILE_SAVE:
FlushUndoBuffer(); FlushUndoBuffer();
iNesSave(); iNesSave();
UpdateColorTable(); UpdateColorTable();
return 0; return 0;
case 101: case MENU_MV_FILE_SAVE_AS:
return 0; return 0;
case 102: case MENU_MV_FILE_LOAD_TBL:
if((i = LoadTableFile()) != -1){ if((i = LoadTableFile()) != -1){
sprintf(str,"Error Loading Table File At Line %d",i); sprintf(str,"Error Loading Table File At Line %d",i);
MessageBox(hMemView,str,"error", MB_OK); MessageBox(hMemView,str,"error", MB_OK);
@ -1338,13 +1313,13 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
UpdateColorTable(); UpdateColorTable();
return 0; return 0;
case 103: case MENU_MV_FILE_UNLOAD_TBL:
UnloadTableFile(); UnloadTableFile();
UpdateColorTable(); UpdateColorTable();
return 0; return 0;
// ################################## Start of SP CODE ########################### // ################################## Start of SP CODE ###########################
case 104: case MENU_MV_FILE_DUMP_RAM:
{ {
char bar[0x800]; char bar[0x800];
unsigned int i; unsigned int i;
@ -1353,7 +1328,7 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
dumpToFile(bar, sizeof(bar)); dumpToFile(bar, sizeof(bar));
return 0; return 0;
} }
case 105: case MENU_MV_FILE_DUMP_PPU:
{ {
char bar[0x4000]; char bar[0x4000];
unsigned int i; unsigned int i;
@ -1370,11 +1345,11 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
} }
// ################################## End of SP CODE ########################### // ################################## End of SP CODE ###########################
case 200: //undo case MENU_MV_EDIT_UNDO:
UndoLastPatch(); UndoLastPatch();
return 0; return 0;
case 201: //copy case MENU_MV_EDIT_COPY:
if(CursorEndAddy == -1)i = 1; if(CursorEndAddy == -1)i = 1;
else i = CursorEndAddy-CursorStartAddy+1; else i = CursorEndAddy-CursorStartAddy+1;
@ -1402,7 +1377,7 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
CloseClipboard () ; CloseClipboard () ;
return 0; return 0;
case 202: //paste case MENU_MV_EDIT_PASTE:
OpenClipboard(hwnd); OpenClipboard(hwnd);
hGlobal = GetClipboardData(CF_TEXT); hGlobal = GetClipboardData(CF_TEXT);
@ -1417,20 +1392,19 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
GlobalUnlock (hGlobal); GlobalUnlock (hGlobal);
CloseClipboard(); CloseClipboard();
return 0; return 0;
return 0;
case 203: //find case MENU_MV_EDIT_FIND:
OpenFindDialog(); OpenFindDialog();
return 0; return 0;
case 300: case MENU_MV_VIEW_RAM:
case 301: case MENU_MV_VIEW_PPU:
case 302: case MENU_MV_VIEW_ROM:
EditingMode = wParam-300; EditingMode = wParam-MENU_MV_VIEW_RAM;
for(i = 0;i < 3;i++){ for(i = 0;i < 3;i++){
if(EditingMode == i)CheckMenuItem(GetMenu(hMemView),300+i,MF_CHECKED); if(EditingMode == i)CheckMenuItem(GetMenu(hMemView),MENU_MV_VIEW_RAM+i,MF_CHECKED);
else CheckMenuItem(GetMenu(hMemView),300+i,MF_UNCHECKED); else CheckMenuItem(GetMenu(hMemView),MENU_MV_VIEW_RAM+i,MF_UNCHECKED);
} }
if(EditingMode == 0)MaxSize = 0x10000; if(EditingMode == 0)MaxSize = 0x10000;
if(EditingMode == 1)MaxSize = 0x4000; if(EditingMode == 1)MaxSize = 0x4000;
@ -1452,6 +1426,28 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
UpdateColorTable(); UpdateColorTable();
return 0; return 0;
// ################################## Start of SP CODE ###########################
case MENU_MV_BOOKMARKS_RM_ALL:
removeAllBookmarks(GetSubMenu(GetMenu(hwnd), 3));
UpdateColorTable();
return 0;
default:
if (wParam >= 30 && wParam <= 39)
{
int newValue = handleBookmarkMenu(wParam - 30);
if (newValue != -1)
{
CurOffset = newValue;
CursorEndAddy = -1;
CursorStartAddy = hexBookmarks[wParam - 30].address;
UpdateColorTable();
}
return 0;
}
// ################################## End of SP CODE ###########################
} }
case WM_MOVE: { case WM_MOVE: {
@ -1526,15 +1522,15 @@ BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
case WM_INITDIALOG: case WM_INITDIALOG:
SetWindowPos(hwndDlg,0,MemFind_wndx,MemFind_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER); SetWindowPos(hwndDlg,0,MemFind_wndx,MemFind_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
if(FindDirectionUp) CheckDlgButton(hwndDlg, 1003, BST_CHECKED); if(FindDirectionUp) CheckDlgButton(hwndDlg, IDC_MEMVIEWFIND_DIR_UP, BST_CHECKED);
else CheckDlgButton(hwndDlg, 1004, BST_CHECKED); else CheckDlgButton(hwndDlg, IDC_MEMVIEWFIND_DIR_DOWN, BST_CHECKED);
if(FindAsText) CheckDlgButton(hwndDlg, 1002, BST_CHECKED); if(FindAsText) CheckDlgButton(hwndDlg, IDC_MEMVIEWFIND_TYPE_TEXT, BST_CHECKED);
else CheckDlgButton(hwndDlg, 1001, BST_CHECKED); else CheckDlgButton(hwndDlg, IDC_MEMVIEWFIND_TYPE_HEX, BST_CHECKED);
if(FindTextBox[0])SetDlgItemText(hwndDlg,1000,FindTextBox); if(FindTextBox[0])SetDlgItemText(hwndDlg,IDC_MEMVIEWFIND_WHAT,FindTextBox);
SendDlgItemMessage(hwndDlg,1000,EM_SETLIMITTEXT,59,0); SendDlgItemMessage(hwndDlg,IDC_MEMVIEWFIND_WHAT,EM_SETLIMITTEXT,59,0);
break; break;
case WM_CREATE: case WM_CREATE:
@ -1543,9 +1539,9 @@ BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
break; break;
case WM_CLOSE: case WM_CLOSE:
case WM_QUIT: case WM_QUIT:
GetDlgItemText(hMemFind,1000,FindTextBox,59); GetDlgItemText(hwndDlg,IDC_MEMVIEWFIND_WHAT,FindTextBox,59);
DestroyWindow(hMemFind); DestroyWindow(hwndDlg);
hMemFind = 0; hwndDlg = 0;
break; break;
case WM_MOVING: case WM_MOVING:
break; break;
@ -1566,20 +1562,20 @@ BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 1001 : case IDC_MEMVIEWFIND_TYPE_HEX :
FindAsText=0; FindAsText=0;
break; break;
case 1002 : case IDC_MEMVIEWFIND_TYPE_TEXT :
FindAsText=1; FindAsText=1;
break; break;
case 1003 : case IDC_MEMVIEWFIND_DIR_UP :
FindDirectionUp = 1; FindDirectionUp = 1;
break; break;
case 1004 : case IDC_MEMVIEWFIND_DIR_DOWN :
FindDirectionUp = 0; FindDirectionUp = 0;
break; break;
case 1005 : case IDC_MEMVIEWFIND_NEXT :
FindNext(); FindNext();
break; break;
} }
@ -1596,7 +1592,7 @@ void FindNext(){
unsigned char data[60]; unsigned char data[60];
int datasize = 0, i, j, inputc = -1, found; int datasize = 0, i, j, inputc = -1, found;
if(hMemFind) GetDlgItemText(hMemFind,1000,str,59); if(hMemFind) GetDlgItemText(hMemFind,IDC_MEMVIEWFIND_WHAT,str,59);
else strcpy(str,FindTextBox); else strcpy(str,FindTextBox);
for(i = 0;str[i] != 0;i++){ for(i = 0;str[i] != 0;i++){

View File

@ -182,6 +182,9 @@ static const int MW_ADDR_Lookup[] = {
MW_ADDR16,MW_ADDR17,MW_ADDR18,MW_ADDR19, MW_ADDR16,MW_ADDR17,MW_ADDR18,MW_ADDR19,
MW_ADDR20,MW_ADDR21,MW_ADDR22,MW_ADDR23 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 MWNUM = ARRAY_SIZE(MW_ADDR_Lookup); static const int MWNUM = ARRAY_SIZE(MW_ADDR_Lookup);
@ -193,7 +196,7 @@ static struct MWRec
static int findIndex(WORD ctl) static int findIndex(WORD ctl)
{ {
for(int i=0;i<MWNUM;i++) for(int i=0;i<MWNUM;i++)
if(MW_ADDR_Lookup[i] == ctl) if(MW_ADDR(i) == ctl)
return i; return i;
return -1; return -1;
} }
@ -287,10 +290,10 @@ void UpdateMemWatch()
static void SaveStrings() static void SaveStrings()
{ {
int i; int i;
for(i=0;i<NUMWATCHES;i++) for(i=0;i<MWNUM;i++)
{ {
GetDlgItemText(hwndMemWatch,1001+i*3,addresses[i],ADDRESSLENGTH); GetDlgItemText(hwndMemWatch,MW_ADDR(i),addresses[i],ADDRESSLENGTH);
GetDlgItemText(hwndMemWatch,1000+i*3,labels[i],LABELLENGTH); GetDlgItemText(hwndMemWatch,MW_NAME(i),labels[i],LABELLENGTH);
} }
} }
@ -518,9 +521,9 @@ static void LoadMemWatch()
addresses[i][tempal] = 0; addresses[i][tempal] = 0;
labels[i][templl] = 0; //just in case labels[i][templl] = 0; //just in case
SetDlgItemText(hwndMemWatch,1002+i*3,(LPTSTR) "---"); SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,1001+i*3,(LPTSTR) addresses[i]); SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,1000+i*3,(LPTSTR) labels[i]); SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
} }
fclose(fp); fclose(fp);
} }
@ -568,9 +571,9 @@ void OpenMemwatchRecentFile(int memwRFileNumber)
addresses[i][tempal] = 0; addresses[i][tempal] = 0;
labels[i][templl] = 0; //just in case labels[i][templl] = 0; //just in case
SetDlgItemText(hwndMemWatch,1002+i*3,(LPTSTR) "---"); SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,1001+i*3,(LPTSTR) addresses[i]); SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,1000+i*3,(LPTSTR) labels[i]); SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
} }
fclose(fp); fclose(fp);
@ -608,12 +611,12 @@ void ClearAllText()
} }
int i; int i;
for(i=0;i<NUMWATCHES;i++) for(i=0;i<MWNUM;i++)
{ {
addresses[i][0] = 0; addresses[i][0] = 0;
labels[i][0] = 0; labels[i][0] = 0;
SetDlgItemText(hwndMemWatch,1001+i*3,(LPTSTR) addresses[i]); SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,1000+i*3,(LPTSTR) labels[i]); SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
} }
//Now clear last file used variable (memwLastFilename) //Now clear last file used variable (memwLastFilename)
for (int i=0;i<2048;i++) for (int i=0;i<2048;i++)
@ -651,7 +654,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if(i>=MWNUM/2) if(i>=MWNUM/2)
col=1; col=1;
RECT r; RECT r;
GetWindowRect(GetDlgItem(hwndDlg,MW_ADDR_Lookup[i]),&r); GetWindowRect(GetDlgItem(hwndDlg,MW_ADDR(i)),&r);
ScreenToClient(hwndDlg,(LPPOINT)&r); ScreenToClient(hwndDlg,(LPPOINT)&r);
ScreenToClient(hwndDlg,(LPPOINT)&r.right); ScreenToClient(hwndDlg,(LPPOINT)&r.right);
yPositions[i] = r.top; yPositions[i] = r.top;
@ -686,23 +689,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
//Menu Items //Menu Items
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
case 600: //First item in recent menu
OpenMemwatchRecentFile(0);
break;
case 601: //2nd item in recent menu
OpenMemwatchRecentFile(1);
break;
case 602: //3rd item in recent menu
OpenMemwatchRecentFile(2);
break;
case 603: //4th item in recent menu
OpenMemwatchRecentFile(3);
break;
case 604: //5th item in recent menu
OpenMemwatchRecentFile(4);
break;
case ACCEL_CTRL_W: case ACCEL_CTRL_W:
case MEMW_FILE_CLOSE: case MEMW_FILE_CLOSE:
CloseMemoryWatch(); CloseMemoryWatch();
@ -745,6 +732,8 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
break; break;
default: default:
if (LOWORD(wParam) >= MEMW_MENU_FIRST_RECENT_FILE && LOWORD(wParam) < MEMW_MENU_FIRST_RECENT_FILE+MEMW_MAX_NUMBER_OF_RECENT_FILES)
OpenMemwatchRecentFile(LOWORD(wParam) - MEMW_MENU_FIRST_RECENT_FILE);
break; break;
} }
@ -762,6 +751,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
break; break;
} }
#if 0
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) switch(LOWORD(wParam))
@ -780,8 +770,10 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
default: default:
break; break;
} }
#endif
} }
#if 0
if(!(wParam>>16)) //Close button clicked if(!(wParam>>16)) //Close button clicked
{ {
switch(wParam&0xFFFF) switch(wParam&0xFFFF)
@ -791,6 +783,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
break; break;
} }
} }
#endif
break; break;
default: default:
@ -838,11 +831,11 @@ void CreateMemWatch()
//Initialize values to previous entered addresses/labels //Initialize values to previous entered addresses/labels
{ {
int i; int i;
for(i = 0; i < NUMWATCHES; i++) for(i = 0; i < MWNUM; i++)
{ {
SetDlgItemText(hwndMemWatch,1002+i*3,(LPTSTR) "---"); SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
SetDlgItemText(hwndMemWatch,1001+i*3,(LPTSTR) addresses[i]); SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
SetDlgItemText(hwndMemWatch,1000+i*3,(LPTSTR) labels[i]); SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
} }
} }
if (MemWatchLoadFileOnStart) OpenMemwatchRecentFile(0); if (MemWatchLoadFileOnStart) OpenMemwatchRecentFile(0);
@ -852,12 +845,12 @@ void AddMemWatch(char memaddress[32])
char TempArray[32]; char TempArray[32];
int i; int i;
CreateMemWatch(); CreateMemWatch();
for(i = 0; i < NUMWATCHES; i++) for(i = 0; i < MWNUM; i++)
{ {
GetDlgItemText(hwndMemWatch,1001+i*3,TempArray,32); GetDlgItemText(hwndMemWatch,MW_ADDR(i),TempArray,32);
if (TempArray[0] == 0) if (TempArray[0] == 0)
{ {
SetDlgItemText(hwndMemWatch,1001+i*3,memaddress); SetDlgItemText(hwndMemWatch,MW_ADDR(i),memaddress);
break; break;
} }
} }

View File

@ -67,7 +67,7 @@ void FCEUD_NetworkClose(void)
NetStatAdd("*** Connection lost."); NetStatAdd("*** Connection lost.");
if(netwin) if(netwin)
{ {
SetDlgItemText(netwin,250,"Connect"); SetDlgItemText(netwin,BTN_NETMOO_CONNECT,"Connect");
FixCDis(netwin,1); FixCDis(netwin,1);
} }
if(Socket!=INVALID_SOCKET) if(Socket!=INVALID_SOCKET)
@ -90,14 +90,14 @@ static void FixCDis(HWND hParent, int how)
{ {
int x; int x;
for(x=200;x<=206;x++) for(x=IDC_NETMOO_HOST;x<=IDC_NETMOO_PASS;x++) // XXX iterate over all netplay settings elements
EnableWindow( GetDlgItem(hParent,x),how); EnableWindow( GetDlgItem(hParent,x),how);
} }
static void GetSettings(HWND hwndDlg) static void GetSettings(HWND hwndDlg)
{ {
char buf[256]; char buf[256];
char **strs[4]={&netplayhost,&netplaynick,&netgamekey,&netpassword}; char **strs[4]={&netplayhost,&netplaynick,&netgamekey,&netpassword};
int ids[4]={200,203,205,206}; int ids[4]={IDC_NETMOO_HOST,IDC_NETMOO_NICK,IDC_NETMOO_KEY,IDC_NETMOO_PASS};
int x; int x;
for(x=0;x<4;x++) for(x=0;x<4;x++)
@ -114,8 +114,8 @@ static void GetSettings(HWND hwndDlg)
strcpy(*strs[x], buf); strcpy(*strs[x], buf);
} }
} }
remotetport = GetDlgItemInt(hwndDlg,201,0,0); remotetport = GetDlgItemInt(hwndDlg,IDC_NETMOO_PORT,0,0);
netlocalplayers=1 + SendDlgItemMessage(hwndDlg,204,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); netlocalplayers=1 + SendDlgItemMessage(hwndDlg,COMBO_NETMOO_LOCAL_PLAYERS,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
} }
static void NetStatAdd(char *text) static void NetStatAdd(char *text)
@ -172,9 +172,9 @@ static void NetStatAdd(char *text)
strcat(textbuf,"\r\n"); strcat(textbuf,"\r\n");
} }
} }
SetDlgItemText(netwin,101,textbuf); SetDlgItemText(netwin,IDC_NETMOO_STATUS,textbuf);
free(textbuf); free(textbuf);
SendDlgItemMessage(netwin,101,EM_LINESCROLL,0,32767); SendDlgItemMessage(netwin,IDC_NETMOO_STATUS,EM_LINESCROLL,0,32767);
} }
void FCEUD_NetplayText(uint8 *text) void FCEUD_NetplayText(uint8 *text)
@ -408,11 +408,11 @@ static BOOL CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
{ {
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
case 250: case BTN_NETMOO_CONNECT:
if(FCEUDnetplay) if(FCEUDnetplay)
{ {
FCEUD_NetworkClose(); FCEUD_NetworkClose();
SetDlgItemText(hwndDlg,250,"Connect"); SetDlgItemText(hwndDlg,BTN_NETMOO_CONNECT,"Connect");
FixCDis(hwndDlg,1); FixCDis(hwndDlg,1);
} }
else if(GameInfo) else if(GameInfo)
@ -420,7 +420,7 @@ static BOOL CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
GetSettings(hwndDlg); GetSettings(hwndDlg);
if(FCEUD_NetworkConnect()) if(FCEUD_NetworkConnect())
{ {
SetDlgItemText(hwndDlg,250,"Disconnect"); SetDlgItemText(hwndDlg,BTN_NETMOO_CONNECT,"Disconnect");
FixCDis(hwndDlg,0); FixCDis(hwndDlg,0);
} }
} }
@ -433,7 +433,7 @@ static BOOL CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
int t; int t;
t=GetDlgItemText(hwndDlg,102,buf,1024); t=GetDlgItemText(hwndDlg,IDC_NETMOO_CMD_INPUT,buf,1024);
buf[1023]=0; buf[1023]=0;
if(strchr(buf,'\r')) if(strchr(buf,'\r'))
@ -453,20 +453,20 @@ static BOOL CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
} }
*dest = 0; *dest = 0;
FCEUI_NetplayText((uint8*)buf); //mbg merge 7/17/06 added cast FCEUI_NetplayText((uint8*)buf); //mbg merge 7/17/06 added cast
SetDlgItemText(hwndDlg,102,""); SetDlgItemText(hwndDlg,IDC_NETMOO_CMD_INPUT,"");
} }
} }
break; break;
case WM_INITDIALOG: case WM_INITDIALOG:
if(netplayhost) if(netplayhost)
SetDlgItemText(hwndDlg,200,netplayhost); SetDlgItemText(hwndDlg,IDC_NETMOO_HOST,netplayhost);
SetDlgItemInt(hwndDlg,201,remotetport,0); SetDlgItemInt(hwndDlg,IDC_NETMOO_PORT,remotetport,0);
if(netplaynick) if(netplaynick)
SetDlgItemText(hwndDlg,203,netplaynick); SetDlgItemText(hwndDlg,IDC_NETMOO_NICK,netplaynick);
if(netgamekey) if(netgamekey)
SetDlgItemText(hwndDlg,205,netgamekey); SetDlgItemText(hwndDlg,IDC_NETMOO_KEY,netgamekey);
if(netpassword) if(netpassword)
SetDlgItemText(hwndDlg,206,netpassword); SetDlgItemText(hwndDlg,IDC_NETMOO_PASS,netpassword);
{ {
int x; int x;
@ -474,9 +474,9 @@ static BOOL CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
for(x=0;x<4;x++) for(x=0;x<4;x++)
{ {
sprintf(buf,"%d",x+1); sprintf(buf,"%d",x+1);
SendDlgItemMessage(hwndDlg,204,CB_ADDSTRING,0,(LPARAM)(LPSTR)buf); SendDlgItemMessage(hwndDlg,COMBO_NETMOO_LOCAL_PLAYERS,CB_ADDSTRING,0,(LPARAM)(LPSTR)buf);
} }
SendDlgItemMessage(hwndDlg,204,CB_SETCURSEL,netlocalplayers-1,(LPARAM)(LPSTR)0); SendDlgItemMessage(hwndDlg,COMBO_NETMOO_LOCAL_PLAYERS,CB_SETCURSEL,netlocalplayers-1,(LPARAM)(LPSTR)0);
} }

View File

@ -43,8 +43,17 @@ int NTViewSkip,NTViewRefresh;
static int mouse_x,mouse_y; //todo: is static needed here? --mbg 7/19/06 - i think so static int mouse_x,mouse_y; //todo: is static needed here? --mbg 7/19/06 - i think so
int redrawtables = 0; int redrawtables = 0;
int chrchanged = 0; int chrchanged = 0;
int ntmirroring, oldntmirroring = -1; //0 is horizontal, 1 is vertical, 2 is four screen.
int lockmirroring; enum NT_MirrorType {
NT_NONE = -1,
NT_HORIZONTAL, NT_VERTICAL, NT_FOUR_SCREEN,
NT_SINGLE_SCREEN_TABLE_0, NT_SINGLE_SCREEN_TABLE_1,
NT_SINGLE_SCREEN_TABLE_2, NT_SINGLE_SCREEN_TABLE_3,
NT_NUM_MIRROR_TYPES
};
#define IDC_NTVIEW_MIRROR_TYPE_0 IDC_NTVIEW_MIRROR_HORIZONTAL
NT_MirrorType ntmirroring, oldntmirroring = NT_NONE;
//int lockmirroring;
//int ntmirroring[4]; //these 4 ints are either 0, 1, 2, or 3 and tell where each of the 4 nametables point to //int ntmirroring[4]; //these 4 ints are either 0, 1, 2, or 3 and tell where each of the 4 nametables point to
//uint8 *ntmirroringpointers[] = {&NTARAM[0x000],&NTARAM[0x400],ExtraNTARAM,ExtraNTARAM+0x400}; //uint8 *ntmirroringpointers[] = {&NTARAM[0x000],&NTARAM[0x400],ExtraNTARAM,ExtraNTARAM+0x400};
@ -94,43 +103,43 @@ void NTViewDoBlit(int autorefresh) {
if((redrawtables && !autorefresh) || (autorefresh) || (scrolllines)){ if((redrawtables && !autorefresh) || (autorefresh) || (scrolllines)){
//todo: use switch and use bitblt for because its faster //todo: use switch and use bitblt for because its faster
switch(ntmirroring){ switch(ntmirroring){
case 0: //horizontal case NT_HORIZONTAL:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
break; break;
case 1: //vertical case NT_VERTICAL:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
break; break;
case 2: //four screen case NT_FOUR_SCREEN:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY);
break; break;
case 3: //single screen, table 0 case NT_SINGLE_SCREEN_TABLE_0:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC0,0,0,SRCCOPY);
break; break;
case 4: //single screen, table 1 case NT_SINGLE_SCREEN_TABLE_1:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC1,0,0,SRCCOPY);
break; break;
case 5: //single screen, table 2 case NT_SINGLE_SCREEN_TABLE_2:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC2,0,0,SRCCOPY);
break; break;
case 6: //single screen, table 3 case NT_SINGLE_SCREEN_TABLE_3:
BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY); BitBlt(pDC,NTDESTX+NTWIDTH,NTDESTY,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY);
BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY); BitBlt(pDC,NTDESTX,NTDESTY+NTHEIGHT,NTWIDTH,NTHEIGHT,TmpDC3,0,0,SRCCOPY);
@ -138,43 +147,43 @@ void NTViewDoBlit(int autorefresh) {
break; break;
} }
/* /*
if(ntmirroring == 0){ //horizontal if(ntmirroring == NT_HORIZONTAL){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
} }
if(ntmirroring == 1){ //vertical if(ntmirroring == NT_VERTICAL){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
} }
if(ntmirroring == 2){ //four screen if(ntmirroring == NT_FOUR_SCREEN){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
} }
if(ntmirroring == 3){ //single screen, table 0 if(ntmirroring == NT_SINGLE_SCREEN_TABLE_0){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC0,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
} }
if(ntmirroring == 4){ //single screen, table 1 if(ntmirroring == NT_SINGLE_SCREEN_TABLE_1){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC1,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
} }
if(ntmirroring == 5){ //single screen, table 2 if(ntmirroring == NT_SINGLE_SCREEN_TABLE_2){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC2,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
} }
if(ntmirroring == 6){ //single screen, table 3 if(ntmirroring == NT_SINGLE_SCREEN_TABLE_3){
StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX+(NTWIDTH*ZOOM),NTDESTY,NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY); StretchBlt(pDC,NTDESTX,NTDESTY+(NTHEIGHT*ZOOM),NTWIDTH*ZOOM,NTHEIGHT*ZOOM,TmpDC3,0,NTHEIGHT-1,NTWIDTH,-NTHEIGHT,SRCCOPY);
@ -205,39 +214,39 @@ void NTViewDoBlit(int autorefresh) {
void UpdateMirroringButtons(){ void UpdateMirroringButtons(){
int i; int i;
for(i = 0; i < 7;i++){ for(i = 0; i < NT_NUM_MIRROR_TYPES;i++){
if(i != ntmirroring)CheckDlgButton(hNTView, i+1001, BST_UNCHECKED); if(i != ntmirroring)CheckDlgButton(hNTView, i+IDC_NTVIEW_MIRROR_TYPE_0, BST_UNCHECKED);
else CheckDlgButton(hNTView, i+1001, BST_CHECKED); else CheckDlgButton(hNTView, i+IDC_NTVIEW_MIRROR_TYPE_0, BST_CHECKED);
} }
return; return;
} }
void ChangeMirroring(){ void ChangeMirroring(){
switch(ntmirroring){ switch(ntmirroring){
case 0: case NT_HORIZONTAL:
vnapage[0] = vnapage[1] = &NTARAM[0x000]; vnapage[0] = vnapage[1] = &NTARAM[0x000];
vnapage[2] = vnapage[3] = &NTARAM[0x400]; vnapage[2] = vnapage[3] = &NTARAM[0x400];
break; break;
case 1: case NT_VERTICAL:
vnapage[0] = vnapage[2] = &NTARAM[0x000]; vnapage[0] = vnapage[2] = &NTARAM[0x000];
vnapage[1] = vnapage[3] = &NTARAM[0x400]; vnapage[1] = vnapage[3] = &NTARAM[0x400];
break; break;
case 2: case NT_FOUR_SCREEN:
vnapage[0] = &NTARAM[0x000]; vnapage[0] = &NTARAM[0x000];
vnapage[1] = &NTARAM[0x400]; vnapage[1] = &NTARAM[0x400];
vnapage[2] = ExtraNTARAM; vnapage[2] = ExtraNTARAM;
vnapage[3] = ExtraNTARAM+0x400; vnapage[3] = ExtraNTARAM+0x400;
break; break;
case 3: case NT_SINGLE_SCREEN_TABLE_0:
vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = &NTARAM[0x000]; vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = &NTARAM[0x000];
break; break;
case 4: case NT_SINGLE_SCREEN_TABLE_1:
vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = &NTARAM[0x400]; vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = &NTARAM[0x400];
break; break;
case 5: case NT_SINGLE_SCREEN_TABLE_2:
vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = ExtraNTARAM; vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = ExtraNTARAM;
break; break;
case 6: case NT_SINGLE_SCREEN_TABLE_3:
vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = ExtraNTARAM+0x400; vnapage[0] = vnapage[1] = vnapage[2] = vnapage[3] = ExtraNTARAM+0x400;
break; break;
} }
@ -329,7 +338,7 @@ void FCEUD_UpdateNTView(int scanline, int drawall) {
//char str[50]; //char str[50];
//sprintf(str,"%d,%d,%d",horzscroll,vertscroll,ntmirroring); //sprintf(str,"%d,%d,%d",horzscroll,vertscroll,ntmirroring);
//sprintf(str,"%08X %08X",TempAddr, RefreshAddr); //sprintf(str,"%08X %08X",TempAddr, RefreshAddr);
//SetDlgItemText(hNTView, 103, str); //SetDlgItemText(hNTView, IDC_NTVIEW_PROPERTIES_LINE_1, str);
if (NTViewSkip < NTViewRefresh) return; if (NTViewSkip < NTViewRefresh) return;
@ -342,16 +351,16 @@ void FCEUD_UpdateNTView(int scanline, int drawall) {
} }
ntmirroring = -1; ntmirroring = NT_NONE;
if(vnapage[0] == vnapage[1])ntmirroring = 0; if(vnapage[0] == vnapage[1])ntmirroring = NT_HORIZONTAL;
if(vnapage[0] == vnapage[2])ntmirroring = 1; if(vnapage[0] == vnapage[2])ntmirroring = NT_VERTICAL;
if((vnapage[0] != vnapage[1]) && (vnapage[0] != vnapage[2]))ntmirroring = 2; if((vnapage[0] != vnapage[1]) && (vnapage[0] != vnapage[2]))ntmirroring = NT_FOUR_SCREEN;
if((vnapage[0] == vnapage[1]) && (vnapage[1] == vnapage[2]) && (vnapage[2] == vnapage[3])){ if((vnapage[0] == vnapage[1]) && (vnapage[1] == vnapage[2]) && (vnapage[2] == vnapage[3])){
if(vnapage[0] == &NTARAM[0x000])ntmirroring = 3; if(vnapage[0] == &NTARAM[0x000])ntmirroring = NT_SINGLE_SCREEN_TABLE_0;
if(vnapage[0] == &NTARAM[0x400])ntmirroring = 4; if(vnapage[0] == &NTARAM[0x400])ntmirroring = NT_SINGLE_SCREEN_TABLE_1;
if(vnapage[0] == ExtraNTARAM)ntmirroring = 5; if(vnapage[0] == ExtraNTARAM)ntmirroring = NT_SINGLE_SCREEN_TABLE_2;
if(vnapage[0] == ExtraNTARAM+0x400)ntmirroring = 6; if(vnapage[0] == ExtraNTARAM+0x400)ntmirroring = NT_SINGLE_SCREEN_TABLE_3;
} }
if(oldntmirroring != ntmirroring){ if(oldntmirroring != ntmirroring){
@ -365,11 +374,11 @@ void FCEUD_UpdateNTView(int scanline, int drawall) {
DrawNameTable(ntable2,ExtraNTARAM,0); DrawNameTable(ntable2,ExtraNTARAM,0);
DrawNameTable(ntable3,ExtraNTARAM+0x400,0); DrawNameTable(ntable3,ExtraNTARAM+0x400,0);
} else { } else {
if((ntmirroring == 0) || (ntmirroring == 1) || (ntmirroring == 3)) if(ntmirroring == NT_HORIZONTAL || ntmirroring == NT_VERTICAL || ntmirroring == NT_SINGLE_SCREEN_TABLE_0)
DrawNameTable(ntable0,&NTARAM[0x000],ntcache[0]); DrawNameTable(ntable0,&NTARAM[0x000],ntcache[0]);
if((ntmirroring == 0) || (ntmirroring == 1) || (ntmirroring == 4)) if(ntmirroring == NT_HORIZONTAL || ntmirroring == NT_VERTICAL || ntmirroring == NT_SINGLE_SCREEN_TABLE_1)
DrawNameTable(ntable1,&NTARAM[0x400],ntcache[1]); DrawNameTable(ntable1,&NTARAM[0x400],ntcache[1]);
if(ntmirroring == 2){ if(ntmirroring == NT_FOUR_SCREEN){
DrawNameTable(ntable2,ExtraNTARAM,ntcache[2]); DrawNameTable(ntable2,ExtraNTARAM,ntcache[2]);
DrawNameTable(ntable3,ExtraNTARAM+0x400,ntcache[3]); DrawNameTable(ntable3,ExtraNTARAM+0x400,ntcache[3]);
} }
@ -423,7 +432,7 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
bmInfo.bmiHeader.biBitCount = 24; bmInfo.bmiHeader.biBitCount = 24;
//create memory dcs //create memory dcs
pDC = GetDC(hwndDlg); // GetDC(GetDlgItem(hwndDlg,101)); pDC = GetDC(hwndDlg); // GetDC(GetDlgItem(hwndDlg,IDC_NTVIEW_TABLE_BOX));
TmpDC0 = CreateCompatibleDC(pDC); //name table 0 TmpDC0 = CreateCompatibleDC(pDC); //name table 0
TmpDC1 = CreateCompatibleDC(pDC); //name table 1 TmpDC1 = CreateCompatibleDC(pDC); //name table 1
TmpDC2 = CreateCompatibleDC(pDC); //name table 2 TmpDC2 = CreateCompatibleDC(pDC); //name table 2
@ -441,18 +450,18 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
TmpObj3 = SelectObject(TmpDC3,TmpBmp3); TmpObj3 = SelectObject(TmpDC3,TmpBmp3);
//Refresh Trackbar //Refresh Trackbar
SendDlgItemMessage(hwndDlg,201,TBM_SETRANGE,0,(LPARAM)MAKELONG(0,25)); SendDlgItemMessage(hwndDlg,IDC_NTVIEW_REFRESH_TRACKBAR,TBM_SETRANGE,0,(LPARAM)MAKELONG(0,25));
SendDlgItemMessage(hwndDlg,201,TBM_SETPOS,1,NTViewRefresh); SendDlgItemMessage(hwndDlg,IDC_NTVIEW_REFRESH_TRACKBAR,TBM_SETPOS,1,NTViewRefresh);
//Set Text Limit //Set Text Limit
SendDlgItemMessage(hwndDlg,102,EM_SETLIMITTEXT,3,0); SendDlgItemMessage(hwndDlg,IDC_NTVIEW_SCANLINE,EM_SETLIMITTEXT,3,0);
//force redraw the first time the PPU Viewer is opened //force redraw the first time the PPU Viewer is opened
NTViewSkip=100; NTViewSkip=100;
SelectObject (pDC, CreatePen (PS_SOLID, 2, RGB (255, 255, 255))) ; SelectObject (pDC, CreatePen (PS_SOLID, 2, RGB (255, 255, 255))) ;
CheckDlgButton(hwndDlg, 1008, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_NTVIEW_SHOW_SCROLL_LINES, BST_CHECKED);
//clear cache //clear cache
//memset(palcache,0,32); //memset(palcache,0,32);
//memset(ntcache0,0,0x400); //memset(ntcache0,0,0x400);
@ -499,72 +508,72 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
TileX = (mouse_x-NTDESTX)/8; TileX = (mouse_x-NTDESTX)/8;
TileY = (mouse_y-NTDESTY)/8; TileY = (mouse_y-NTDESTY)/8;
sprintf(str,"X / Y: %0d / %0d",TileX,TileY); sprintf(str,"X / Y: %0d / %0d",TileX,TileY);
SetDlgItemText(hwndDlg,104,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_2,str);
NameTable = (TileX/32)+((TileY/30)*2); NameTable = (TileX/32)+((TileY/30)*2);
PPUAddress = 0x2000+(NameTable*0x400)+((TileY%30)*32)+(TileX%32); PPUAddress = 0x2000+(NameTable*0x400)+((TileY%30)*32)+(TileX%32);
sprintf(str,"PPU Address: %04X",PPUAddress); sprintf(str,"PPU Address: %04X",PPUAddress);
SetDlgItemText(hwndDlg,105,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_3,str);
TileID = vnapage[(PPUAddress>>10)&0x3][PPUAddress&0x3FF]; TileID = vnapage[(PPUAddress>>10)&0x3][PPUAddress&0x3FF];
sprintf(str,"Tile ID: %02X",TileID); sprintf(str,"Tile ID: %02X",TileID);
SetDlgItemText(hwndDlg,103,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_1,str);
} }
/* if (((mouse_x >= PATTERNDESTX) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) { /* if (((mouse_x >= PATTERNDESTX) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) {
mouse_x = (mouse_x-PATTERNDESTX)/(8*ZOOM); mouse_x = (mouse_x-PATTERNDESTX)/(8*ZOOM);
mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM); mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM);
sprintf(str,"Tile: $%X%X",mouse_y,mouse_x); sprintf(str,"Tile: $%X%X",mouse_y,mouse_x);
SetDlgItemText(hwndDlg,103,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_1,str);
SetDlgItemText(hwndDlg,104,"Tile:"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_2,"Tile:");
SetDlgItemText(hwndDlg,105,"Palettes"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_3,"Palettes");
} }
else if (((mouse_x >= PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)*2+1))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) { else if (((mouse_x >= PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)*2+1))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) {
mouse_x = (mouse_x-(PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1))/(8*ZOOM); mouse_x = (mouse_x-(PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1))/(8*ZOOM);
mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM); mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM);
sprintf(str,"Tile: $%X%X",mouse_y,mouse_x); sprintf(str,"Tile: $%X%X",mouse_y,mouse_x);
SetDlgItemText(hwndDlg,104,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_2,str);
SetDlgItemText(hwndDlg,103,"Tile:"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_1,"Tile:");
SetDlgItemText(hwndDlg,105,"Palettes"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_3,"Palettes");
} }
else if (((mouse_x >= PALETTEDESTX) && (mouse_x < (PALETTEDESTX+PALETTEWIDTH))) && (mouse_y >= PALETTEDESTY) && (mouse_y < (PALETTEDESTY+PALETTEHEIGHT))) { else if (((mouse_x >= PALETTEDESTX) && (mouse_x < (PALETTEDESTX+PALETTEWIDTH))) && (mouse_y >= PALETTEDESTY) && (mouse_y < (PALETTEDESTY+PALETTEHEIGHT))) {
mouse_x = (mouse_x-PALETTEDESTX)/32; mouse_x = (mouse_x-PALETTEDESTX)/32;
mouse_y = (mouse_y-PALETTEDESTY)/32; mouse_y = (mouse_y-PALETTEDESTY)/32;
sprintf(str,"Palette: $%02X",palcache[(mouse_y<<4)|mouse_x]); sprintf(str,"Palette: $%02X",palcache[(mouse_y<<4)|mouse_x]);
SetDlgItemText(hwndDlg,103,"Tile:"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_1,"Tile:");
SetDlgItemText(hwndDlg,104,"Tile:"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_2,"Tile:");
SetDlgItemText(hwndDlg,105,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_3,str);
} }
else { else {
SetDlgItemText(hwndDlg,103,"Tile:"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_1,"Tile:");
SetDlgItemText(hwndDlg,104,"Tile:"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_2,"Tile:");
SetDlgItemText(hwndDlg,105,"Palettes"); SetDlgItemText(hwndDlg,IDC_NTVIEW_PROPERTIES_LINE_3,"Palettes");
} }
*/ */
break; break;
case WM_NCACTIVATE: case WM_NCACTIVATE:
sprintf(str,"%d",NTViewScanline); sprintf(str,"%d",NTViewScanline);
SetDlgItemText(hwndDlg,102,str); SetDlgItemText(hwndDlg,IDC_NTVIEW_SCANLINE,str);
break; break;
case WM_COMMAND: case WM_COMMAND:
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case EN_UPDATE: case EN_UPDATE:
GetDlgItemText(hwndDlg,102,str,4); GetDlgItemText(hwndDlg,IDC_NTVIEW_SCANLINE,str,4);
sscanf(str,"%d",&NTViewScanline); sscanf(str,"%d",&NTViewScanline);
if (NTViewScanline > 239) NTViewScanline = 239; if (NTViewScanline > 239) NTViewScanline = 239;
chrchanged = 1; chrchanged = 1;
break; break;
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 1001 : case IDC_NTVIEW_MIRROR_HORIZONTAL :
case 1002 : case IDC_NTVIEW_MIRROR_VERTICAL :
case 1003 : case IDC_NTVIEW_MIRROR_FOUR_SCREEN :
case 1004 : case IDC_NTVIEW_MIRROR_SS_TABLE_0 :
case 1005 : case IDC_NTVIEW_MIRROR_SS_TABLE_1 :
case 1006 : case IDC_NTVIEW_MIRROR_SS_TABLE_2 :
case 1007 : case IDC_NTVIEW_MIRROR_SS_TABLE_3 :
oldntmirroring = ntmirroring = LOWORD(wParam)-1001; oldntmirroring = ntmirroring = NT_MirrorType(LOWORD(wParam)-IDC_NTVIEW_MIRROR_TYPE_0);
ChangeMirroring(); ChangeMirroring();
break; break;
case 1008 : case IDC_NTVIEW_SHOW_SCROLL_LINES :
scrolllines ^= 1; scrolllines ^= 1;
chrchanged = 1; chrchanged = 1;
break; break;
@ -574,7 +583,7 @@ BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break; break;
case WM_HSCROLL: case WM_HSCROLL:
if (lParam) { //refresh trackbar if (lParam) { //refresh trackbar
NTViewRefresh = SendDlgItemMessage(hwndDlg,201,TBM_GETPOS,0,0); NTViewRefresh = SendDlgItemMessage(hwndDlg,IDC_NTVIEW_REFRESH_TRACKBAR,TBM_GETPOS,0,0);
} }
break; break;
} }

View File

@ -62,26 +62,26 @@ BOOL CALLBACK PaletteConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if(ntsccol) if(ntsccol)
{ {
CheckDlgButton(hwndDlg, 100, BST_CHECKED); CheckDlgButton(hwndDlg, CHECK_PALETTE_ENABLED, BST_CHECKED);
} }
SendDlgItemMessage(hwndDlg, 500, TBM_SETRANGE, 1, MAKELONG(0, 128)); SendDlgItemMessage(hwndDlg, CTL_TINT_TRACKBAR, TBM_SETRANGE, 1, MAKELONG(0, 128));
SendDlgItemMessage(hwndDlg, 501, TBM_SETRANGE, 1, MAKELONG(0, 128)); SendDlgItemMessage(hwndDlg, CTL_HUE_TRACKBAR, TBM_SETRANGE, 1, MAKELONG(0, 128));
FCEUI_GetNTSCTH(&ntsctint, &ntschue); FCEUI_GetNTSCTH(&ntsctint, &ntschue);
SendDlgItemMessage(hwndDlg, 500, TBM_SETPOS, 1, ntsctint); SendDlgItemMessage(hwndDlg, CTL_TINT_TRACKBAR, TBM_SETPOS, 1, ntsctint);
SendDlgItemMessage(hwndDlg, 501, TBM_SETPOS, 1, ntschue); SendDlgItemMessage(hwndDlg, CTL_HUE_TRACKBAR, TBM_SETPOS, 1, ntschue);
EnableWindow(GetDlgItem(hwndDlg, 201), (eoptions & EO_CPALETTE) ? 1 : 0); EnableWindow(GetDlgItem(hwndDlg, BTN_PALETTE_RESET), (eoptions & EO_CPALETTE) ? 1 : 0);
CenterWindowOnScreen(hwndDlg); CenterWindowOnScreen(hwndDlg);
break; break;
case WM_HSCROLL: case WM_HSCROLL:
ntsctint = SendDlgItemMessage(hwndDlg, 500, TBM_GETPOS, 0, (LPARAM)(LPSTR)0); ntsctint = SendDlgItemMessage(hwndDlg, CTL_TINT_TRACKBAR, TBM_GETPOS, 0, (LPARAM)(LPSTR)0);
ntschue = SendDlgItemMessage(hwndDlg, 501, TBM_GETPOS, 0, (LPARAM)(LPSTR)0); ntschue = SendDlgItemMessage(hwndDlg, CTL_HUE_TRACKBAR, TBM_GETPOS, 0, (LPARAM)(LPSTR)0);
FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue); FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue);
break; break;
@ -94,25 +94,25 @@ BOOL CALLBACK PaletteConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{ {
switch(wParam&0xFFFF) switch(wParam&0xFFFF)
{ {
case 100: case CHECK_PALETTE_ENABLED:
ntsccol ^= 1; ntsccol ^= 1;
FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue); FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue);
break; break;
case 200: case BTN_PALETTE_LOAD:
if(LoadPaletteFile()) if(LoadPaletteFile())
{ {
EnableWindow(GetDlgItem(hwndDlg, 201), 1); EnableWindow(GetDlgItem(hwndDlg, BTN_PALETTE_RESET), 1);
} }
break; break;
case 201: case BTN_PALETTE_RESET:
FCEUI_SetPaletteArray(0); FCEUI_SetPaletteArray(0);
eoptions &= ~EO_CPALETTE; eoptions &= ~EO_CPALETTE;
EnableWindow(GetDlgItem(hwndDlg, 201), 0); EnableWindow(GetDlgItem(hwndDlg, BTN_PALETTE_RESET), 0);
break; break;
case 1: case BUTTON_CLOSE:
gornk: gornk:
DestroyWindow(hwndDlg); DestroyWindow(hwndDlg);
pwindow = 0; // Yay for user race conditions. pwindow = 0; // Yay for user race conditions.

View File

@ -217,7 +217,7 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
bmInfo2.bmiHeader.biBitCount = 24; bmInfo2.bmiHeader.biBitCount = 24;
//create memory dcs //create memory dcs
pDC = GetDC(hwndDlg); // GetDC(GetDlgItem(hwndDlg,101)); pDC = GetDC(hwndDlg); // GetDC(GetDlgItem(hwndDlg,GRP_PPUVIEW_TABLES));
TmpDC0 = CreateCompatibleDC(pDC); //pattern table 0 TmpDC0 = CreateCompatibleDC(pDC); //pattern table 0
TmpDC1 = CreateCompatibleDC(pDC); //pattern table 1 TmpDC1 = CreateCompatibleDC(pDC); //pattern table 1
TmpDC2 = CreateCompatibleDC(pDC); //palettes TmpDC2 = CreateCompatibleDC(pDC); //palettes
@ -231,11 +231,11 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
TmpObj2 = SelectObject(TmpDC2,TmpBmp2); TmpObj2 = SelectObject(TmpDC2,TmpBmp2);
//Refresh Trackbar //Refresh Trackbar
SendDlgItemMessage(hwndDlg,201,TBM_SETRANGE,0,(LPARAM)MAKELONG(0,25)); SendDlgItemMessage(hwndDlg,CTL_PPUVIEW_TRACKBAR,TBM_SETRANGE,0,(LPARAM)MAKELONG(0,25));
SendDlgItemMessage(hwndDlg,201,TBM_SETPOS,1,PPUViewRefresh); SendDlgItemMessage(hwndDlg,CTL_PPUVIEW_TRACKBAR,TBM_SETPOS,1,PPUViewRefresh);
//Set Text Limit //Set Text Limit
SendDlgItemMessage(hwndDlg,102,EM_SETLIMITTEXT,3,0); SendDlgItemMessage(hwndDlg,IDC_PPUVIEW_SCANLINE,EM_SETLIMITTEXT,3,0);
//force redraw the first time the PPU Viewer is opened //force redraw the first time the PPU Viewer is opened
PPUViewSkip=100; PPUViewSkip=100;
@ -283,41 +283,41 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
mouse_x = (mouse_x-PATTERNDESTX)/(8*ZOOM); mouse_x = (mouse_x-PATTERNDESTX)/(8*ZOOM);
mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM); mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM);
sprintf(str,"Tile: $%X%X",mouse_y,mouse_x); sprintf(str,"Tile: $%X%X",mouse_y,mouse_x);
SetDlgItemText(hwndDlg,103,str); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE1,str);
SetDlgItemText(hwndDlg,104,"Tile:"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE2,"Tile:");
SetDlgItemText(hwndDlg,105,"Palettes"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_PALETTES,"Palettes");
} }
else if(((mouse_x >= PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)*2+1))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) { else if(((mouse_x >= PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1) && (mouse_x < (PATTERNDESTX+(PATTERNWIDTH*ZOOM)*2+1))) && (mouse_y >= PATTERNDESTY) && (mouse_y < (PATTERNDESTY+(PATTERNHEIGHT*ZOOM)))) {
mouse_x = (mouse_x-(PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1))/(8*ZOOM); mouse_x = (mouse_x-(PATTERNDESTX+(PATTERNWIDTH*ZOOM)+1))/(8*ZOOM);
mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM); mouse_y = (mouse_y-PATTERNDESTY)/(8*ZOOM);
sprintf(str,"Tile: $%X%X",mouse_y,mouse_x); sprintf(str,"Tile: $%X%X",mouse_y,mouse_x);
SetDlgItemText(hwndDlg,104,str); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE2,str);
SetDlgItemText(hwndDlg,103,"Tile:"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE1,"Tile:");
SetDlgItemText(hwndDlg,105,"Palettes"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_PALETTES,"Palettes");
} }
else if(((mouse_x >= PALETTEDESTX) && (mouse_x < (PALETTEDESTX+PALETTEWIDTH))) && (mouse_y >= PALETTEDESTY) && (mouse_y < (PALETTEDESTY+PALETTEHEIGHT))) { else if(((mouse_x >= PALETTEDESTX) && (mouse_x < (PALETTEDESTX+PALETTEWIDTH))) && (mouse_y >= PALETTEDESTY) && (mouse_y < (PALETTEDESTY+PALETTEHEIGHT))) {
mouse_x = (mouse_x-PALETTEDESTX)/32; mouse_x = (mouse_x-PALETTEDESTX)/32;
mouse_y = (mouse_y-PALETTEDESTY)/32; mouse_y = (mouse_y-PALETTEDESTY)/32;
sprintf(str,"Palette: $%02X",palcache[(mouse_y<<4)|mouse_x]); sprintf(str,"Palette: $%02X",palcache[(mouse_y<<4)|mouse_x]);
SetDlgItemText(hwndDlg,103,"Tile:"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE1,"Tile:");
SetDlgItemText(hwndDlg,104,"Tile:"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE2,"Tile:");
SetDlgItemText(hwndDlg,105,str); SetDlgItemText(hwndDlg,LBL_PPUVIEW_PALETTES,str);
} }
else { else {
SetDlgItemText(hwndDlg,103,"Tile:"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE1,"Tile:");
SetDlgItemText(hwndDlg,104,"Tile:"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_TILE2,"Tile:");
SetDlgItemText(hwndDlg,105,"Palettes"); SetDlgItemText(hwndDlg,LBL_PPUVIEW_PALETTES,"Palettes");
} }
break; break;
case WM_NCACTIVATE: case WM_NCACTIVATE:
sprintf(str,"%d",PPUViewScanline); sprintf(str,"%d",PPUViewScanline);
SetDlgItemText(hwndDlg,102,str); SetDlgItemText(hwndDlg,IDC_PPUVIEW_SCANLINE,str);
break; break;
case WM_COMMAND: case WM_COMMAND:
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case EN_UPDATE: case EN_UPDATE:
GetDlgItemText(hwndDlg,102,str,4); GetDlgItemText(hwndDlg,IDC_PPUVIEW_SCANLINE,str,4);
sscanf(str,"%d",&PPUViewScanline); sscanf(str,"%d",&PPUViewScanline);
if(PPUViewScanline > 239) PPUViewScanline = 239; if(PPUViewScanline > 239) PPUViewScanline = 239;
break; break;
@ -325,7 +325,7 @@ BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
break; break;
case WM_HSCROLL: case WM_HSCROLL:
if(lParam) { //refresh trackbar if(lParam) { //refresh trackbar
PPUViewRefresh = SendDlgItemMessage(hwndDlg,201,TBM_GETPOS,0,0); PPUViewRefresh = SendDlgItemMessage(hwndDlg,CTL_PPUVIEW_TRACKBAR,TBM_GETPOS,0,0);
} }
break; break;
} }

View File

@ -182,7 +182,7 @@ void UpdateReplayDialog(HWND hwndDlg)
//-------------------- //--------------------
SetWindowText(GetDlgItem(hwndDlg,IDC_LABEL_CURRCHECKSUM),md5_asciistr(GameInfo->MD5)); SetWindowText(GetDlgItem(hwndDlg,IDC_LABEL_CURRCHECKSUM),md5_asciistr(GameInfo->MD5));
EnableWindow(GetDlgItem(hwndDlg,1),TRUE); // enable OK EnableWindow(GetDlgItem(hwndDlg,IDOK),TRUE); // enable OK
doClear = 0; doClear = 0;
} }
@ -208,7 +208,7 @@ void UpdateReplayDialog(HWND hwndDlg)
SetDlgItemText(hwndDlg,IDC_EDIT_STOPFRAME,""); SetDlgItemText(hwndDlg,IDC_EDIT_STOPFRAME,"");
EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_READONLY),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_READONLY),FALSE);
SendDlgItemMessage(hwndDlg,IDC_CHECK_READONLY,BM_SETCHECK,BST_UNCHECKED,0); SendDlgItemMessage(hwndDlg,IDC_CHECK_READONLY,BM_SETCHECK,BST_UNCHECKED,0);
EnableWindow(GetDlgItem(hwndDlg,1),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDOK),FALSE);
} }
} }
@ -559,7 +559,7 @@ static void UpdateRecordDialog(HWND hwndDlg)
free(fn); free(fn);
} }
EnableWindow(GetDlgItem(hwndDlg,1),enable ? TRUE : FALSE); EnableWindow(GetDlgItem(hwndDlg,IDOK),enable ? TRUE : FALSE);
} }
static void UpdateRecordDialogPath(HWND hwndDlg, const char* fname) static void UpdateRecordDialogPath(HWND hwndDlg, const char* fname)

View File

@ -7,7 +7,8 @@
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include "afxres.h" #include "afxres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
@ -128,7 +129,7 @@ BEGIN
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Use &External Input", MENU_EXTERNAL_INPUT MENUITEM "Use &External Input", MENU_EXTERNAL_INPUT
END END
POPUP "Debug" POPUP "&Debug"
BEGIN BEGIN
MENUITEM "Debugger", MENU_DEBUGGER MENUITEM "Debugger", MENU_DEBUGGER
MENUITEM "PPU Viewer", MENU_PPUVIEWER MENUITEM "PPU Viewer", MENU_PPUVIEWER
@ -153,48 +154,6 @@ END
// Dialog // Dialog
// //
ADDCHEAT DIALOG 28, 53, 405, 239
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Add Cheat"
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX 108,9,30,56,202,LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_WANTKEYBOARDINPUT
LTEXT "V1:",-1,85,39,12,8,NOT WS_GROUP
LTEXT "V2:",65534,136,39,12,8,NOT WS_GROUP
EDITTEXT 110,101,37,20,12,ES_AUTOHSCROLL
EDITTEXT 111,152,37,20,12,ES_AUTOHSCROLL
PUSHBUTTON "&Reset Search",112,98,213,59,14
PUSHBUTTON "&Do Search",113,93,194,49,14
PUSHBUTTON "&Unhide Excluded",107,89,164,59,14
PUSHBUTTON "Set Original to Current",114,82,139,80,14
GROUPBOX "Cheat Search",65533,5,17,172,219
GROUPBOX "Parameters",65532,80,26,97,103
CONTROL "O==V1 &&&& C==V2",115,"Button",BS_AUTORADIOBUTTON,86,54,87,12
CONTROL "O==V1 &&&& |O-C|==V2",116,"Button",BS_AUTORADIOBUTTON,86,66,87,12
CONTROL "|O-C|==V2",117,"Button",BS_AUTORADIOBUTTON,86,102,48,12
CONTROL "O!=C",118,"Button",BS_AUTORADIOBUTTON,86,114,48,12
SCROLLBAR 64000,66,30,12,200,SBS_VERT
PUSHBUTTON "Close",106,317,218,81,14
CONTROL "Value decreased.",119,"Button",BS_AUTORADIOBUTTON,86,78,75,12
CONTROL "Value increased.",120,"Button",BS_AUTORADIOBUTTON,86,90,75,12
RTEXT "Name:",65531,300,31,23,8,NOT WS_GROUP
EDITTEXT 200,328,30,65,12,ES_AUTOHSCROLL
RTEXT "Address:",65530,304,47,31,8,NOT WS_GROUP
EDITTEXT 201,340,46,27,12,ES_AUTOHSCROLL
RTEXT "Value:",65529,309,63,26,8,NOT WS_GROUP
EDITTEXT 202,340,62,27,12,ES_AUTOHSCROLL
EDITTEXT 203,340,78,27,12,ES_AUTOHSCROLL
PUSHBUTTON "Add",250,329,116,50,14
GROUPBOX "Cheats",65528,182,17,217,188
RTEXT "Compare:",65527,306,80,30,8,NOT WS_GROUP
CONTROL "Read Substitute",204,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,317,94,74,12
PUSHBUTTON "Update",251,326,158,58,14
LISTBOX 300,188,30,110,164,WS_VSCROLL
PUSHBUTTON "Delete",252,326,187,58,14
PUSHBUTTON "Add Game Genie",253,323,136,64,14
LTEXT "To add a Game Genie code, type the code into the ""Name"" field, and hit ""Add Game Genie"".",65526,10,4,387,8
END
CREATEMOVIE DIALOG 0, 0, 371, 133 CREATEMOVIE DIALOG 0, 0, 371, 133
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Record Movie" CAPTION "Record Movie"
@ -267,9 +226,9 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "DWB!" CAPTION "DWB!"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
LTEXT "Text",100,7,9,237,8 LTEXT "Text",LBL_DWBDIALOG_TEXT,7,9,237,8
PUSHBUTTON "Clear",200,64,32,50,14 PUSHBUTTON "Clear",BTN_CLEAR,64,32,50,14
PUSHBUTTON "Close",201,188,33,50,14 PUSHBUTTON "Close",BTN_CLOSE,188,33,50,14
END END
FKBDIALOG DIALOG 13, 72, 402, 194 FKBDIALOG DIALOG 13, 72, 402, 194
@ -277,7 +236,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Family Keyboard Configuration" CAPTION "Family Keyboard Configuration"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,320,170,56,14 DEFPUSHBUTTON "Close",BTN_CLOSE,320,170,56,14
LTEXT "Remember to push the ""Scroll Lock"" key during emulation to enable Family Keyboard input.",65503,18,6,370,12 LTEXT "Remember to push the ""Scroll Lock"" key during emulation to enable Family Keyboard input.",65503,18,6,370,12
GROUPBOX "",65502,11,22,380,133,WS_GROUP GROUPBOX "",65502,11,22,380,133,WS_GROUP
PUSHBUTTON "F1",300,22,43,32,12 PUSHBUTTON "F1",300,22,43,32,12
@ -359,8 +318,8 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Gamepad Configuration" CAPTION "Gamepad Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,173,196,56,14 DEFPUSHBUTTON "Close",BTN_CLOSE,173,196,56,14
GROUPBOX "",100,4,8,232,82,WS_GROUP GROUPBOX "",GRP_GAMEPAD1,4,8,232,82,WS_GROUP
PUSHBUTTON "Up",304,35,27,24,12 PUSHBUTTON "Up",304,35,27,24,12
PUSHBUTTON "Left",306,9,45,25,12 PUSHBUTTON "Left",306,9,45,25,12
PUSHBUTTON "Right",307,60,45,24,12 PUSHBUTTON "Right",307,60,45,24,12
@ -371,7 +330,7 @@ BEGIN
PUSHBUTTON "A",300,195,45,16,12 PUSHBUTTON "A",300,195,45,16,12
PUSHBUTTON "Turbo B",309,154,29,32,12 PUSHBUTTON "Turbo B",309,154,29,32,12
PUSHBUTTON "Turbo A",308,195,29,32,12 PUSHBUTTON "Turbo A",308,195,29,32,12
GROUPBOX "",101,4,101,232,82,WS_GROUP GROUPBOX "",GRP_GAMEPAD2,4,101,232,82,WS_GROUP
PUSHBUTTON "Up",314,35,120,24,12 PUSHBUTTON "Up",314,35,120,24,12
PUSHBUTTON "Left",316,9,138,25,12 PUSHBUTTON "Left",316,9,138,25,12
PUSHBUTTON "Right",317,60,138,24,12 PUSHBUTTON "Right",317,60,138,24,12
@ -382,7 +341,7 @@ BEGIN
PUSHBUTTON "A",310,195,138,16,12 PUSHBUTTON "A",310,195,138,16,12
PUSHBUTTON "Turbo B",319,154,122,32,12 PUSHBUTTON "Turbo B",319,154,122,32,12
PUSHBUTTON "Turbo A",318,195,122,32,12 PUSHBUTTON "Turbo A",318,195,122,32,12
CONTROL "Disable four-score emulation.",400,"Button",BS_AUTOCHECKBOX,9,193,106,12 CONTROL "Disable four-score emulation.",CHECK_DISABLE_FOURSCORE,"Button",BS_AUTOCHECKBOX,9,193,106,12
END END
GUICONFIG DIALOGEX 16, 123, 184, 90 GUICONFIG DIALOGEX 16, 123, 184, 90
@ -501,7 +460,7 @@ CAPTION "Message Log"
FONT 9, "Terminal" FONT 9, "Terminal"
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,299,157,56,14 DEFPUSHBUTTON "Close",1,299,157,56,14
EDITTEXT 100,19,15,339,130,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL EDITTEXT LBL_LOG_TEXT,19,15,339,130,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
END END
NETMOO DIALOGEX 44, 59, 365, 209 NETMOO DIALOGEX 44, 59, 365, 209
@ -509,43 +468,21 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSM
CAPTION "Network Play" CAPTION "Network Play"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
EDITTEXT 102,10,137,347,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_OEMCONVERT | ES_WANTRETURN EDITTEXT IDC_NETMOO_CMD_INPUT,10,137,347,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_OEMCONVERT | ES_WANTRETURN
EDITTEXT 101,10,8,347,130,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL EDITTEXT IDC_NETMOO_STATUS,10,8,347,130,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
RTEXT "Remote Host:",65481,13,167,44,8 RTEXT "Remote Host:",65481,13,167,44,8
EDITTEXT 200,60,165,90,12 EDITTEXT IDC_NETMOO_HOST,60,165,90,12
EDITTEXT 201,151,165,27,12 EDITTEXT IDC_NETMOO_PORT,151,165,27,12
GROUPBOX "Settings",100,10,154,347,47,WS_GROUP GROUPBOX "Settings",100,10,154,347,47,WS_GROUP
DEFPUSHBUTTON "Connect",250,296,163,56,14 DEFPUSHBUTTON "Connect",BTN_NETMOO_CONNECT,296,163,56,14
EDITTEXT 203,282,182,70,12,ES_AUTOHSCROLL EDITTEXT IDC_NETMOO_NICK,282,182,70,12,ES_AUTOHSCROLL
RTEXT "Local Players:",65480,187,167,46,8 RTEXT "Local Players:",65480,187,167,46,8
RTEXT "Nickname:",65479,238,184,40,8 RTEXT "Nickname:",65479,238,184,40,8
COMBOBOX 204,238,165,28,51,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX COMBO_NETMOO_LOCAL_PLAYERS,238,165,28,51,CBS_DROPDOWNLIST | WS_TABSTOP
RTEXT "Game Key:",65478,127,184,39,8 RTEXT "Game Key:",65478,127,184,39,8
EDITTEXT 205,169,182,67,12 EDITTEXT IDC_NETMOO_KEY,169,182,67,12
RTEXT "Password:",65477,19,184,37,8 RTEXT "Password:",65477,19,184,37,8
EDITTEXT 206,60,182,67,12,ES_PASSWORD EDITTEXT IDC_NETMOO_PASS,60,182,67,12,ES_PASSWORD
END
NETPLAYCONFIG DIALOGEX 33, 49, 224, 178
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Netplay Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "Close",1,156,156,56,14
CTEXT "Network play will commence when a new game is loaded.",65476,14,8,198,12
EDITTEXT 101,71,55,135,12,ES_AUTOHSCROLL
GROUPBOX "Client",65475,14,23,198,66
EDITTEXT 100,102,36,29,12,ES_AUTOHSCROLL
CONTROL "Enable network play.",300,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,158,102,12
GROUPBOX "Server",65474,14,99,198,52
LTEXT "Listen on TCP port:",65473,20,114,68,8
EDITTEXT 200,90,114,29,12,ES_AUTOHSCROLL
LTEXT "Local UDP port:",64396,21,38,62,8
LTEXT "Remote host:",65472,21,58,50,8
LTEXT "Remote TCP Port:",65471,106,74,61,8
EDITTEXT 102,168,71,29,12,ES_AUTOHSCROLL
CONTROL "",302,"Button",BS_AUTORADIOBUTTON,10,23,9,8
CONTROL "",301,"Button",BS_AUTORADIOBUTTON,10,99,9,8
END END
NEWINPUT DIALOGEX 0, 0, 186, 66 NEWINPUT DIALOGEX 0, 0, 186, 66
@ -554,7 +491,7 @@ CAPTION "Enter New Input"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
PUSHBUTTON "Cancel",BTN_CANCEL,40,45,50,14 PUSHBUTTON "Cancel",BTN_CANCEL,40,45,50,14
CTEXT "Press a key",100,47,14,90,12 CTEXT "Press a key",LBL_KEY_COMBO,47,14,90,12
PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14 PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14
END END
@ -587,14 +524,14 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Palette Configuration" CAPTION "Palette Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,162,94,56,14 DEFPUSHBUTTON "Close",BUTTON_CLOSE,162,94,56,14
GROUPBOX "NES Palette",302,10,8,102,81,WS_GROUP GROUPBOX "NES Palette",302,10,8,102,81,WS_GROUP
DEFPUSHBUTTON "&Load Palette...",200,18,32,58,14 DEFPUSHBUTTON "&Load Palette...",BTN_PALETTE_LOAD,18,32,58,14
DEFPUSHBUTTON "&Reset to Default Palette",201,18,55,85,14 DEFPUSHBUTTON "&Reset to Default Palette",BTN_PALETTE_RESET,18,55,85,14
CONTROL "Enabled",100,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,122,22,87,12 CONTROL "Enabled",CHECK_PALETTE_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,122,22,87,12
CONTROL "Tint",500,"msctls_trackbar32",WS_TABSTOP,121,44,91,11 CONTROL "Tint",CTL_TINT_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,121,44,91,11
GROUPBOX "NTSC Color Emulation",101,115,8,103,81,WS_GROUP GROUPBOX "NTSC Color Emulation",101,115,8,103,81,WS_GROUP
CONTROL "Hue",501,"msctls_trackbar32",WS_TABSTOP,121,69,91,11 CONTROL "Hue",CTL_HUE_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,121,69,91,11
CTEXT "Hue",64395,124,59,85,8 CTEXT "Hue",64395,124,59,85,8
CTEXT "Tint",65463,123,34,85,8 CTEXT "Tint",65463,123,34,85,8
END END
@ -604,7 +541,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Power Pad Configuration" CAPTION "Power Pad Configuration"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,34,95,56,14 DEFPUSHBUTTON "Close",BTN_CLOSE,34,95,56,14
GROUPBOX "",312,8,10,114,74,WS_GROUP GROUPBOX "",312,8,10,114,74,WS_GROUP
PUSHBUTTON "1",300,21,23,16,12 PUSHBUTTON "1",300,21,23,16,12
PUSHBUTTON "2",301,43,23,16,12 PUSHBUTTON "2",301,43,23,16,12
@ -625,7 +562,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "quiz king" CAPTION "quiz king"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,54,56,56,14 DEFPUSHBUTTON "Close",BTN_CLOSE,54,56,56,14
GROUPBOX "Buzzers",312,8,7,144,39,WS_GROUP GROUPBOX "Buzzers",312,8,7,144,39,WS_GROUP
PUSHBUTTON "1",300,16,23,16,12 PUSHBUTTON "1",300,16,23,16,12
PUSHBUTTON "2",301,38,23,16,12 PUSHBUTTON "2",301,38,23,16,12
@ -640,25 +577,25 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Sound Configuration" CAPTION "Sound Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
DEFPUSHBUTTON "Close",1,290,109,56,14 DEFPUSHBUTTON "Close",BTN_CLOSE,290,109,56,14
GROUPBOX "Output/Output Format:",302,10,9,131,93,WS_GROUP GROUPBOX "Output/Output Format:",302,10,9,131,93,WS_GROUP
CONTROL "Sound enabled.",126,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,22,117,12 CONTROL "Sound enabled.",CHECK_SOUND_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,22,117,12
CONTROL "Force 8-bit sound.",122,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,38,117,11 CONTROL "Force 8-bit sound.",CHECK_SOUND_8BIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,38,117,11
LTEXT "Rate:",65461,17,81,34,10 LTEXT "Rate:",65461,17,81,34,10
LTEXT "Hz",65460,115,81,15,9 LTEXT "Hz",65460,115,81,15,9
GROUPBOX "Buffering:",127,150,9,131,93,WS_GROUP GROUPBOX "Buffering:",127,150,9,131,93,WS_GROUP
CONTROL "Use Global Focus",124,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,22,100,12 CONTROL "Use Global Focus",124,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,22,100,12
CTEXT "Sound Latency",65459,162,47,107,8 CTEXT "Sound Latency",65459,162,47,107,8
CONTROL "",128,"msctls_trackbar32",WS_DISABLED | WS_TABSTOP,162,74,107,13 CONTROL "",CTL_LATENCY_TRACKBAR,"msctls_trackbar32",WS_DISABLED | WS_TABSTOP,162,74,107,13
GROUPBOX "Volume",125,290,9,56,93,WS_GROUP GROUPBOX "Volume",125,290,9,56,93,WS_GROUP
CONTROL "",500,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | TBS_BOTH | WS_TABSTOP,305,17,28,83 CONTROL "",CTL_VOLUME_TRACKBAR,"msctls_trackbar32",TBS_AUTOTICKS | TBS_VERT | TBS_BOTH | WS_TABSTOP,305,17,28,83
LTEXT "15 ms",65458,160,87,20,8 LTEXT "15 ms",65458,160,87,20,8
LTEXT "200 ms",65457,250,87,25,8 LTEXT "200 ms",65457,250,87,25,8
LTEXT "ms",65456,214,67,19,8 LTEXT "ms",65456,214,67,19,8
COMBOBOX 200,57,78,53,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX COMBO_SOUND_RATE,57,78,53,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX 129,57,54,77,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX COMBO_SOUND_QUALITY,57,54,77,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Quality:",65455,17,54,35,10 LTEXT "Quality:",65455,17,54,35,10
CONTROL "Mute frame advance.",130,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,110,117,11 CONTROL "Mute frame advance.",CHECK_SOUND_MUTEFA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,110,117,11
CTEXT "(disabled until config system change)",65462,156,57,120,8 CTEXT "(disabled until config system change)",65462,156,57,120,8
END END
@ -679,59 +616,59 @@ CAPTION "Video Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
GROUPBOX "Full Screen Settings",65453,10,8,364,115,WS_GROUP GROUPBOX "Full Screen Settings",65453,10,8,364,115,WS_GROUP
CONTROL "Full Screen",101,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,23,145,12 CONTROL "Full Screen",IDC_VIDEOCONFIG_FS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,23,145,12
CONTROL "Enter full screen mode after game is loaded.",102, CONTROL "Enter full screen mode after game is loaded.",IDC_VIDEOCONFIG_AUTO_FS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,39,151,12 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,39,151,12
LTEXT "Sync Method:",65452,20,82,48,10 LTEXT "Sync Method:",65452,20,82,48,10
COMBOBOX 105,72,79,93,50,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_VIDEOCONFIG_SYNC_METHOD_FS,72,79,93,50,CBS_DROPDOWNLIST | WS_TABSTOP
LTEXT "Video Mode:",65451,20,62,42,10 LTEXT "Video Mode:",65451,20,62,42,10
COMBOBOX 100,72,59,93,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_VIDEOCONFIG_MODE,72,59,93,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Disable hardware acceleration.",131,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,103,145,12 CONTROL "Disable hardware acceleration.",IDC_DISABLE_HW_ACCEL_FS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,103,145,12
GROUPBOX "Custom Video Mode",65450,177,18,186,97,WS_GROUP GROUPBOX "Custom Video Mode",65450,177,18,186,97,WS_GROUP
LTEXT "Mode:",13,186,32,25,8 LTEXT "Mode:",13,186,32,25,8
EDITTEXT 200,214,30,27,12,ES_RIGHT EDITTEXT IDC_VIDEOCONFIG_XRES,214,30,27,12,ES_RIGHT
LTEXT "by",12,244,32,11,8 LTEXT "by",12,244,32,11,8
EDITTEXT 201,258,30,27,12,ES_RIGHT EDITTEXT IDC_VIDEOCONFIG_YRES,258,30,27,12,ES_RIGHT
LTEXT "@",11,289,32,12,8 LTEXT "@",11,289,32,12,8
COMBOBOX 202,302,30,35,60,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_VIDEOCONFIG_BPP,302,30,35,60,CBS_DROPDOWNLIST | WS_TABSTOP
LTEXT "bpp",10,341,32,17,8 LTEXT "bpp",10,341,32,17,8
GROUPBOX "Image Size Transform",65445,185,47,170,61,WS_GROUP GROUPBOX "Image Size Transform",65445,185,47,170,61,WS_GROUP
LTEXT "Special scaler:",65444,192,61,60,8 LTEXT "Special scaler:",65444,192,61,60,8
COMBOBOX 304,281,58,65,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_VIDEOCONFIG_SCALER_FS,281,58,65,46,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Scale dimensions by:",300,"Button",BS_AUTORADIOBUTTON,192,76,85,12 CONTROL "Scale dimensions by:",IDC_RADIO_SCALE,"Button",BS_AUTORADIOBUTTON,192,76,85,12
CONTROL "Stretch to Fill Screen",301,"Button",BS_AUTORADIOBUTTON,192,91,88,12 CONTROL "Stretch to Fill Screen",IDC_RADIO_STRETCH,"Button",BS_AUTORADIOBUTTON,192,91,88,12
LTEXT "X:",65443,282,78,10,8 LTEXT "X:",65443,282,78,10,8
EDITTEXT 302,292,76,20,12 EDITTEXT IDC_VIDEOCONFIG_XSCALE,292,76,20,12
LTEXT "Y:",65442,316,78,11,8 LTEXT "Y:",65442,316,78,11,8
EDITTEXT 303,326,76,20,12 EDITTEXT IDC_VIDEOCONFIG_YSCALE,326,76,20,12
GROUPBOX "Windowed Settings",65441,10,127,178,121,WS_GROUP GROUPBOX "Windowed Settings",65441,10,127,178,121,WS_GROUP
LTEXT "Size Multiplier:",65440,20,149,50,8 LTEXT "Size Multiplier:",65440,20,149,50,8
CTEXT "X:",65439,83,137,42,8 CTEXT "X:",65439,83,137,42,8
CTEXT "Y:",65438,134,137,42,8 CTEXT "Y:",65438,134,137,42,8
EDITTEXT 400,83,148,42,12,ES_AUTOHSCROLL EDITTEXT IDC_WINSIZE_MUL_X,83,148,42,12,ES_AUTOHSCROLL
EDITTEXT 401,134,148,42,12,ES_AUTOHSCROLL EDITTEXT IDC_WINSIZE_MUL_Y,134,148,42,12,ES_AUTOHSCROLL
CONTROL "Force integral scaling factors.",402,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,164,145,12 CONTROL "Force integral scaling factors.",IDC_FORCE_INT_VIDEO_SCALARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,164,145,12
CONTROL "Force aspect ratio correction.",403,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,179,145,12 CONTROL "Force aspect ratio correction.",IDC_FORCE_ASPECT_CORRECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,179,145,12
LTEXT "Sync Method:",65437,20,215,51,8 LTEXT "Sync Method:",65437,20,215,51,8
COMBOBOX 104,83,213,93,47,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_VIDEOCONFIG_SYNC_METHOD_WIN,83,213,93,47,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Disable hardware acceleration.",130,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,230,145,12 CONTROL "Disable hardware acceleration.",IDC_DISABLE_HW_ACCEL_WIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,230,145,12
GROUPBOX "Drawing Area",65494,196,127,178,86,WS_GROUP GROUPBOX "Drawing Area",65494,196,127,178,86,WS_GROUP
LTEXT "First Line:",65436,218,153,39,8 LTEXT "First Line:",65436,218,153,39,8
LTEXT "Last Line:",65435,218,173,43,8 LTEXT "Last Line:",65435,218,173,43,8
CTEXT "NTSC",65434,262,140,27,8 CTEXT "NTSC",65434,262,140,27,8
CTEXT "PAL",65433,313,140,27,8 CTEXT "PAL",65433,313,140,27,8
EDITTEXT 500,263,152,27,12,ES_RIGHT EDITTEXT IDC_SCANLINE_FIRST_NTSC,263,152,27,12,ES_RIGHT
EDITTEXT 501,263,171,27,12,ES_RIGHT EDITTEXT IDC_SCANLINE_LAST_NTSC,263,171,27,12,ES_RIGHT
EDITTEXT 502,313,152,27,12,ES_RIGHT EDITTEXT IDC_SCANLINE_FIRST_PAL,313,152,27,12,ES_RIGHT
EDITTEXT 503,313,171,27,12,ES_RIGHT EDITTEXT IDC_SCANLINE_LAST_PAL,313,171,27,12,ES_RIGHT
CONTROL "Clip left and right sides (8 columns on each).",106, CONTROL "Clip left and right sides (8 columns on each).",IDC_VIDEOCONFIG_CLIPSIDES,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,206,192,157,12 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,206,192,157,12
DEFPUSHBUTTON "Close",1,318,254,56,14 DEFPUSHBUTTON "Close",BTN_CLOSE,318,254,56,14
LTEXT "Current Pixel Aspect Ratio:",65432,20,197,88,8 LTEXT "Current Pixel Aspect Ratio:",65432,20,197,88,8
EDITTEXT 404,109,195,28,12,ES_AUTOHSCROLL EDITTEXT IDC_VIDEOCONFIG_ASPECT_X,109,195,28,12,ES_AUTOHSCROLL
CTEXT ":",65431,139,197,8,8 CTEXT ":",65431,139,197,8,8
EDITTEXT 405,148,195,28,12,ES_AUTOHSCROLL EDITTEXT IDC_VIDEOCONFIG_ASPECT_Y,148,195,28,12,ES_AUTOHSCROLL
CONTROL "Allow more than 8 sprites per scanline.",600,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,206,230,157,11 CONTROL "Allow more than 8 sprites per scanline.",IDC_VIDEOCONFIG_NO8LIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,206,230,157,11
GROUPBOX "Emulation",65430,196,216,178,32,WS_GROUP GROUPBOX "Emulation",65430,196,216,178,32,WS_GROUP
LTEXT "(can someone please tell us what use this is?)",IDC_STATIC,227,203,144,8 LTEXT "(can someone please tell us what use this is?)",IDC_STATIC,227,203,144,8
END END
@ -986,55 +923,55 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "6502 Debugger" CAPTION "6502 Debugger"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
EDITTEXT 300,15,6,318,289,ES_MULTILINE | ES_READONLY | WS_HSCROLL EDITTEXT IDC_DEBUGGER_DISASSEMBLY,15,6,318,289,ES_MULTILINE | ES_READONLY | WS_HSCROLL
SCROLLBAR 301,336,6,8,288,SBS_VERT SCROLLBAR IDC_DEBUGGER_DISASSEMBLY_VSCR,336,6,8,288,SBS_VERT
GROUPBOX "Status Flags",401,430,138,104,38,WS_TABSTOP GROUPBOX "Status Flags",401,430,138,104,38,WS_TABSTOP
CONTROL "N",200,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,435,150,22,12 CONTROL "N",IDC_DEBUGGER_FLAG_N,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,435,150,22,12
CONTROL "V",201,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,460,150,22,12 CONTROL "V",IDC_DEBUGGER_FLAG_V,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,460,150,22,12
CONTROL "U",202,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,485,150,22,12 CONTROL "U",IDC_DEBUGGER_FLAG_U,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,485,150,22,12
CONTROL "B",203,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,510,150,22,12 CONTROL "B",IDC_DEBUGGER_FLAG_B,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,510,150,22,12
CONTROL "D",204,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,435,161,22,12 CONTROL "D",IDC_DEBUGGER_FLAG_D,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,435,161,22,12
CONTROL "I",205,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,460,161,22,12 CONTROL "I",IDC_DEBUGGER_FLAG_I,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,460,161,22,12
CONTROL "Z",206,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,485,161,22,12 CONTROL "Z",IDC_DEBUGGER_FLAG_Z,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,485,161,22,12
CONTROL "C",207,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,510,161,22,12 CONTROL "C",IDC_DEBUGGER_FLAG_C,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,510,161,22,12
GROUPBOX "BreakPoints",402,430,3,104,132,WS_TABSTOP GROUPBOX "BreakPoints",402,430,3,104,132,WS_TABSTOP
LISTBOX 302,437,16,90,74,LBS_SORT | LBS_DISABLENOSCROLL | WS_VSCROLL LISTBOX IDC_DEBUGGER_BP_LIST,437,16,90,74,LBS_SORT | LBS_DISABLENOSCROLL | WS_VSCROLL
PUSHBUTTON "Add...",101,437,97,30,15 PUSHBUTTON "Add...",IDC_DEBUGGER_BP_ADD,437,97,30,15
PUSHBUTTON "Delete",102,469,97,30,15,WS_DISABLED PUSHBUTTON "Delete",IDC_DEBUGGER_BP_DEL,469,97,30,15,WS_DISABLED
PUSHBUTTON "Edit",103,501,97,26,15,WS_DISABLED PUSHBUTTON "Edit",IDC_DEBUGGER_BP_EDIT,501,97,26,15,WS_DISABLED
PUSHBUTTON "Run",104,349,7,37,14 PUSHBUTTON "Run",IDC_DEBUGGER_RUN,349,7,37,14
PUSHBUTTON "Step Into",105,389,7,38,14 PUSHBUTTON "Step Into",IDC_DEBUGGER_STEP_IN,389,7,38,14
PUSHBUTTON "Step Out",106,349,23,37,14 PUSHBUTTON "Step Out",IDC_DEBUGGER_STEP_OUT,349,23,37,14
PUSHBUTTON "Step Over",107,389,23,38,14 PUSHBUTTON "Step Over",IDC_DEBUGGER_STEP_OVER,389,23,38,14
LTEXT "A:",-1,349,83,10,8 LTEXT "A:",-1,349,83,10,8
LTEXT "X:",65534,376,83,10,8 LTEXT "X:",65534,376,83,10,8
LTEXT "Y:",65533,404,83,10,8 LTEXT "Y:",65533,404,83,10,8
LTEXT "PC:",65532,349,65,13,8 LTEXT "PC:",65532,349,65,13,8
EDITTEXT 304,357,81,15,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_A,357,81,15,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 305,385,81,15,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_X,385,81,15,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 306,412,81,15,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_Y,412,81,15,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 307,361,63,25,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_PC,361,63,25,12,ES_UPPERCASE | ES_WANTRETURN
GROUPBOX "Stack",403,349,99,79,78,WS_TABSTOP GROUPBOX "Stack",IDC_DEBUGGER_VAL_S,349,99,79,78,WS_TABSTOP
EDITTEXT 308,354,110,69,62,ES_MULTILINE | ES_UPPERCASE | ES_READONLY EDITTEXT IDC_DEBUGGER_STACK_CONTENTS,354,110,69,62,ES_MULTILINE | ES_UPPERCASE | ES_READONLY
PUSHBUTTON "Seek PC",108,389,62,38,14 PUSHBUTTON "Seek PC",IDC_DEBUGGER_SEEK_PC,389,62,38,14
PUSHBUTTON "Seek To:",109,349,43,37,14 PUSHBUTTON "Seek To:",IDC_DEBUGGER_SEEK_TO,349,43,37,14
EDITTEXT 309,389,44,38,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_PCSEEK,389,44,38,12,ES_UPPERCASE | ES_WANTRETURN
LTEXT "PPU:",65531,349,183,19,10 LTEXT "PPU:",65531,349,183,19,10
LTEXT "Sprite:",65530,395,183,21,10 LTEXT "Sprite:",65530,395,183,21,10
EDITTEXT 310,367,182,25,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_PPU,367,182,25,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 311,417,182,15,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_DEBUGGER_VAL_SPR,417,182,15,12,ES_UPPERCASE | ES_WANTRETURN
LTEXT "Scanline:",501,435,183,50,10 LTEXT "Scanline:",IDC_DEBUGGER_VAL_SLINE,435,183,50,10
CONTROL "",55535,"Static",SS_BLACKFRAME,5,6,10,289 CONTROL "",55535,"Static",SS_BLACKFRAME,5,6,10,289
LTEXT "",502,5,296,538,10 LTEXT "",IDC_DEBUGGER_ADDR_LINE,5,296,538,10
CONTROL "Break on Bad Opcode",110,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,437,118,90,10 CONTROL "Break on Bad Opcode",IDC_DEBUGGER_BREAK_ON_BAD_OP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,437,118,90,10
CONTROL "Symbolic debugging",208,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,200,79,10 CONTROL "Symbolic debugging",IDC_DEBUGGER_ENABLE_SYMBOLIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,200,79,10
PUSHBUTTON "Reload Symbols",111,427,198,55,14 PUSHBUTTON "Reload Symbols",IDC_DEBUGGER_RELOAD_SYMS,427,198,55,14
GROUPBOX "Bookmarks",45535,348,214,119,80 GROUPBOX "Bookmarks",45535,348,214,119,80
LISTBOX 701,351,223,67,66,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LISTBOX LIST_DEBUGGER_BOOKMARKS,351,223,67,66,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
EDITTEXT 312,421,223,40,14,ES_AUTOHSCROLL EDITTEXT IDC_DEBUGGER_BOOKMARK,421,223,40,14,ES_AUTOHSCROLL
PUSHBUTTON "Add",112,421,239,40,14 PUSHBUTTON "Add",IDC_DEBUGGER_BOOKMARK_ADD,421,239,40,14
PUSHBUTTON "Delete",113,421,255,40,14 PUSHBUTTON "Delete",IDC_DEBUGGER_BOOKMARK_DEL,421,255,40,14
PUSHBUTTON "Rom Patcher",602,489,198,49,14 PUSHBUTTON "Rom Patcher",IDC_DEBUGGER_ROM_PATCHER,489,198,49,14
END END
TRACER DIALOGEX 65527, 65513, 398, 319 TRACER DIALOGEX 65527, 65513, 398, 319
@ -1042,23 +979,23 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Trace Logger" CAPTION "Trace Logger"
FONT 8, "MS Sans Serif", 400, 0, 0x0 FONT 8, "MS Sans Serif", 400, 0, 0x0
BEGIN BEGIN
SCROLLBAR 101,388,2,10,172,SBS_VERT SCROLLBAR IDC_SCRL_TRACER_LOG,388,2,10,172,SBS_VERT
EDITTEXT 100,3,1,384,172,ES_MULTILINE | ES_READONLY EDITTEXT IDC_TRACER_LOG,3,1,384,172,ES_MULTILINE | ES_READONLY
CONTROL "Log last",103,"Button",BS_AUTORADIOBUTTON | BS_LEFT,5,195,38,10 CONTROL "Log last",IDC_RADIO_LOG_LAST,"Button",BS_AUTORADIOBUTTON | BS_LEFT,5,195,38,10
CONTROL "Log to File",104,"Button",BS_AUTORADIOBUTTON | BS_LEFT,5,215,49,10 CONTROL "Log to File",IDC_RADIO_LOG_TO_FILE,"Button",BS_AUTORADIOBUTTON | BS_LEFT,5,215,49,10
LTEXT "Instructions to this window",106,93,196,93,13 LTEXT "Instructions to this window",106,93,196,93,13
PUSHBUTTON "Start Logging",102,155,176,67,14,BS_CENTER | BS_VCENTER PUSHBUTTON "Start Logging",IDC_BTN_START_STOP_LOGGING,155,176,67,14,BS_CENTER | BS_VCENTER
COMBOBOX 105,44,194,48,127,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_TRACER_LOG_SIZE,44,194,48,127,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Extra Log Options",109,3,234,384,35 GROUPBOX "Extra Log Options",109,3,234,384,35
CONTROL "Log state of A, X and Y registers",110,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,246,120,10 CONTROL "Log state of A, X and Y registers",IDC_CHECK_LOG_REGISTERS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,246,120,10
CONTROL "Log Processor Status Flags",111,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,133,246,103,10 CONTROL "Log Processor Status Flags",IDC_CHECK_LOG_PROCESSOR_STATUS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,133,246,103,10
PUSHBUTTON "Browse...",112,55,213,43,14,BS_CENTER | BS_VCENTER PUSHBUTTON "Browse...",IDC_BTN_LOG_BROWSE,55,213,43,14,BS_CENTER | BS_VCENTER
LTEXT "",1002,123,216,153,14 LTEXT "",IDC_TRACER_STATS,123,216,153,14
CONTROL "Only log newly mapped code",114,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,284,107,10 CONTROL "Only log newly mapped code",IDC_CHECK_LOG_NEW_INSTRUCTIONS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,284,107,10
GROUPBOX "Extra Log Options that work with the Code/Data Logger",113,3,272,383,40 GROUPBOX "Extra Log Options that work with the Code/Data Logger",113,3,272,383,40
CONTROL "Only log code that accesses newly mapped data",115, CONTROL "Only log code that accesses newly mapped data",IDC_CHECK_LOG_NEW_DATA,
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,297,169,10 "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,297,169,10
CONTROL "Automatically update Window While logging",116,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,181,196,158,10 CONTROL "Automatically update Window While logging",IDC_CHECK_LOG_UPDATE_WINDOW,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,181,196,158,10
END END
ADDBP DIALOGEX 66, 83, 185, 121 ADDBP DIALOGEX 66, 83, 185, 121
@ -1068,21 +1005,21 @@ FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
LTEXT "Address:",-1,14,5,30,10 LTEXT "Address:",-1,14,5,30,10
CTEXT "-",65534,78,5,8,8 CTEXT "-",65534,78,5,8,8
EDITTEXT 200,48,4,30,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_ADDBP_ADDR_START,48,4,30,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 201,83,4,30,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_ADDBP_ADDR_END,83,4,30,12,ES_UPPERCASE | ES_WANTRETURN
CONTROL "Read",102,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,20,35,12 CONTROL "Read",IDC_ADDBP_MODE_R,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,20,35,12
CONTROL "Write",103,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,20,35,12 CONTROL "Write",IDC_ADDBP_MODE_W,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,20,35,12
CONTROL "Execute",104,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,20,40,12 CONTROL "Execute",IDC_ADDBP_MODE_X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,80,20,40,12
DEFPUSHBUTTON "&OK",100,47,104,42,13 DEFPUSHBUTTON "&OK",IDOK,47,104,42,13
PUSHBUTTON "&Cancel",101,95,105,42,13 PUSHBUTTON "&Cancel",IDCANCEL,95,105,42,13
GROUPBOX "Memory",108,6,34,174,24,WS_TABSTOP GROUPBOX "Memory",108,6,34,174,24,WS_TABSTOP
CONTROL "CPU Mem",105,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,44,50,10 CONTROL "CPU Mem",IDC_ADDBP_MEM_CPU,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,44,50,10
CONTROL "PPU Mem",106,"Button",BS_AUTORADIOBUTTON,65,44,50,10 CONTROL "PPU Mem",IDC_ADDBP_MEM_PPU,"Button",BS_AUTORADIOBUTTON,65,44,50,10
CONTROL "Sprite Mem",107,"Button",BS_AUTORADIOBUTTON,121,44,50,10 CONTROL "Sprite Mem",IDC_ADDBP_MEM_SPR,"Button",BS_AUTORADIOBUTTON,121,44,50,10
EDITTEXT 202,43,64,136,14,ES_AUTOHSCROLL EDITTEXT IDC_ADDBP_CONDITION,43,64,136,14,ES_AUTOHSCROLL
LTEXT "Condition",65533,7,66,30,8 LTEXT "Condition",65533,7,66,30,8
LTEXT "Name",65532,8,84,20,8 LTEXT "Name",65532,8,84,20,8
EDITTEXT 203,43,81,136,14,ES_AUTOHSCROLL EDITTEXT IDC_ADDBP_NAME,43,81,136,14,ES_AUTOHSCROLL
END END
NTVIEW DIALOGEX 44, 38, 355, 402 NTVIEW DIALOGEX 44, 38, 355, 402
@ -1090,26 +1027,26 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Name Table Viewer" CAPTION "Name Table Viewer"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
GROUPBOX "Name Tables",101,0,0,354,310,WS_TABSTOP GROUPBOX "Name Tables",IDC_NTVIEW_TABLE_BOX,0,0,354,310,WS_TABSTOP
LTEXT "Tile ID:",103,237,346,93,10 LTEXT "Tile ID:",IDC_NTVIEW_PROPERTIES_LINE_1,237,346,93,10
CONTROL "",201,"msctls_trackbar32",WS_TABSTOP,227,318,106,11 CONTROL "",IDC_NTVIEW_REFRESH_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,227,318,106,11
LTEXT "Refresh: More",-1,177,318,50,10 LTEXT "Refresh: More",-1,177,318,50,10
LTEXT "Less",65534,333,318,18,10 LTEXT "Less",65534,333,318,18,10
LTEXT "Display on scanline:",65533,7,318,65,10 LTEXT "Display on scanline:",65533,7,318,65,10
EDITTEXT 102,73,315,24,12 EDITTEXT IDC_NTVIEW_SCANLINE,73,315,24,12
LTEXT "X / Y:",104,238,355,75,8 LTEXT "X / Y:",IDC_NTVIEW_PROPERTIES_LINE_2,238,355,75,8
CONTROL "Vertical",1002,"Button",BS_AUTORADIOBUTTON,15,355,39,10 CONTROL "Vertical",IDC_NTVIEW_MIRROR_VERTICAL,"Button",BS_AUTORADIOBUTTON,15,355,39,10
CONTROL "Four Screen",1003,"Button",BS_AUTORADIOBUTTON,15,367,55,10 CONTROL "Four Screen",IDC_NTVIEW_MIRROR_FOUR_SCREEN,"Button",BS_AUTORADIOBUTTON,15,367,55,10
CONTROL "Single Screen (Table 0)",1004,"Button",BS_AUTORADIOBUTTON,113,345,90,10 CONTROL "Single Screen (Table 0)",IDC_NTVIEW_MIRROR_SS_TABLE_0,"Button",BS_AUTORADIOBUTTON,113,345,90,10
CONTROL "Single Screen (Table 1)",1005,"Button",BS_AUTORADIOBUTTON,113,356,90,10 CONTROL "Single Screen (Table 1)",IDC_NTVIEW_MIRROR_SS_TABLE_1,"Button",BS_AUTORADIOBUTTON,113,356,90,10
CONTROL "Single Screen (Table 2)",1006,"Button",BS_AUTORADIOBUTTON,113,366,90,10 CONTROL "Single Screen (Table 2)",IDC_NTVIEW_MIRROR_SS_TABLE_2,"Button",BS_AUTORADIOBUTTON,113,366,90,10
CONTROL "Single Screen (Table 3)",1007,"Button",BS_AUTORADIOBUTTON,113,377,90,10 CONTROL "Single Screen (Table 3)",IDC_NTVIEW_MIRROR_SS_TABLE_3,"Button",BS_AUTORADIOBUTTON,113,377,90,10
GROUPBOX "Current Mirroring",65532,7,332,214,58 GROUPBOX "Current Mirroring",65532,7,332,214,58
CONTROL "Show Scroll Lines",1008,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,319,69,10 CONTROL "Show Scroll Lines",IDC_NTVIEW_SHOW_SCROLL_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,319,69,10
CONTROL "Horizontal",1001,"Button",BS_AUTORADIOBUTTON,15,344,47,10 CONTROL "Horizontal",IDC_NTVIEW_MIRROR_HORIZONTAL,"Button",BS_AUTORADIOBUTTON,15,344,47,10
GROUPBOX "Properties",65531,227,336,122,60 GROUPBOX "Properties",65531,227,336,122,60
LTEXT "PPU Address:",105,237,363,75,8 LTEXT "PPU Address:",IDC_NTVIEW_PROPERTIES_LINE_3,237,363,75,8
LTEXT "Mirror:",106,237,372,75,8 LTEXT "Mirror:",IDC_NTVIEW_PROPERTIES_LINE_4,237,372,75,8
END END
ROMPATCHER DIALOGEX 84, 67, 304, 135 ROMPATCHER DIALOGEX 84, 67, 304, 135
@ -1117,17 +1054,17 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Rom Data Editor" CAPTION "Rom Data Editor"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
EDITTEXT 105,7,47,282,12,ES_READONLY EDITTEXT IDC_ROMPATCHER_CURRENT_DATA,7,47,282,12,ES_READONLY
PUSHBUTTON "Apply",110,185,92,54,14 PUSHBUTTON "Apply",IDC_ROMPATCHER_BTN_APPLY,185,92,54,14
PUSHBUTTON "Save Rom File...",111,4,114,65,14,WS_DISABLED PUSHBUTTON "Save Rom File...",IDC_ROMPATCHER_BTN_SAVE,4,114,65,14,WS_DISABLED
EDITTEXT 109,7,93,172,13,ES_AUTOHSCROLL EDITTEXT IDC_ROMPATCHER_PATCH_DATA,7,93,172,13,ES_AUTOHSCROLL
GROUPBOX "Current Data At Offset",104,3,36,292,43 GROUPBOX "Current Data At Offset",IDC_ROMPATCHER_CURRENT_DATA_BOX,3,36,292,43
GROUPBOX "Offset",100,4,4,291,27 GROUPBOX "Offset",IDC_ROMPATCHER_OFFSET_BOX,4,4,291,27
EDITTEXT 102,83,12,47,14,ES_AUTOHSCROLL EDITTEXT IDC_ROMPATCHER_OFFSET,83,12,47,14,ES_AUTOHSCROLL
CONTROL ".Nes File Address",101,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,14,71,10 CONTROL ".Nes File Address",IDC_ROMPATCHER_DOTNES_OFFSET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,14,71,10
PUSHBUTTON "Edit This Offset",103,135,12,65,14 PUSHBUTTON "Edit This Offset",IDC_ROMPATCHER_BTN_EDIT,135,12,65,14
LTEXT "Disassembled: ",106,7,63,45,12 LTEXT "Disassembled: ",106,7,63,45,12
EDITTEXT 107,56,62,234,14,ES_AUTOHSCROLL | ES_READONLY EDITTEXT IDC_ROMPATCHER_DISASSEMBLY,56,62,234,14,ES_AUTOHSCROLL | ES_READONLY
GROUPBOX "Patch Data",108,3,81,292,30 GROUPBOX "Patch Data",108,3,81,292,30
END END
@ -1136,18 +1073,18 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Game Gene Encoder/Decoder Tool" CAPTION "Game Gene Encoder/Decoder Tool"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
EDITTEXT 1000,115,22,53,14,ES_AUTOHSCROLL EDITTEXT IDC_GAME_GENIE_CODE,115,22,53,14,ES_AUTOHSCROLL
GROUPBOX "Game Genie Code",-1,107,5,69,42 GROUPBOX "Game Genie Code",-1,107,5,69,42
GROUPBOX "Address/Compare/Value",65534,9,5,91,75 GROUPBOX "Address/Compare/Value",65534,9,5,91,75
LTEXT "Address:",65533,18,24,35,8 LTEXT "Address:",65533,18,24,35,8
EDITTEXT 1001,50,21,36,14,ES_AUTOHSCROLL EDITTEXT IDC_GAME_GENIE_ADDR,50,21,36,14,ES_AUTOHSCROLL
EDITTEXT 1002,64,38,22,14,ES_AUTOHSCROLL EDITTEXT IDC_GAME_GENIE_COMP,64,38,22,14,ES_AUTOHSCROLL
EDITTEXT 1003,64,56,22,14,ES_AUTOHSCROLL EDITTEXT IDC_GAME_GENIE_VAL,64,56,22,14,ES_AUTOHSCROLL
LTEXT "Compare:",65532,17,41,37,8 LTEXT "Compare:",65532,17,41,37,8
LTEXT "Value:",65531,18,58,32,8 LTEXT "Value:",65531,18,58,32,8
GROUPBOX "Possible Affected Rom File Addresses",65530,8,83,169,58 GROUPBOX "Possible Affected Rom File Addresses",65530,8,83,169,58
LISTBOX 1004,67,95,54,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LISTBOX IDC_LIST_GGADDRESSES,67,95,54,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Add To Cheat List",1005,108,58,68,14,WS_DISABLED PUSHBUTTON "Add To Cheat List",IDC_BTN_ADD_TO_CHEATS,108,58,68,14,WS_DISABLED
END END
MONITOR DIALOGEX 0, 0, 392, 343 MONITOR DIALOGEX 0, 0, 392, 343
@ -1207,16 +1144,16 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPT
CAPTION "Find" CAPTION "Find"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
EDITTEXT 1000,47,7,171,14,ES_AUTOHSCROLL EDITTEXT IDC_MEMVIEWFIND_WHAT,47,7,171,14,ES_AUTOHSCROLL
LTEXT "Find What:",-1,7,9,38,8 LTEXT "Find What:",-1,7,9,38,8
GROUPBOX "Type",-1,83,29,187,45 GROUPBOX "Type",-1,83,29,187,45
CONTROL "Hex",1001,"Button",BS_AUTORADIOBUTTON | WS_GROUP,93,43,29,10 CONTROL "Hex",IDC_MEMVIEWFIND_TYPE_HEX,"Button",BS_AUTORADIOBUTTON | WS_GROUP,93,43,29,10
CONTROL "Text (Uses Currently Loaded Table as Reference)",1002, CONTROL "Text (Uses Currently Loaded Table as Reference)",IDC_MEMVIEWFIND_TYPE_TEXT,
"Button",BS_AUTORADIOBUTTON,93,56,172,10 "Button",BS_AUTORADIOBUTTON,93,56,172,10
GROUPBOX "Direction",-1,9,29,65,44 GROUPBOX "Direction",-1,9,29,65,44
CONTROL "Up",1003,"Button",BS_AUTORADIOBUTTON | WS_GROUP,18,43,25,10 CONTROL "Up",IDC_MEMVIEWFIND_DIR_UP,"Button",BS_AUTORADIOBUTTON | WS_GROUP,18,43,25,10
CONTROL "Down",1004,"Button",BS_AUTORADIOBUTTON,18,56,35,10 CONTROL "Down",IDC_MEMVIEWFIND_DIR_DOWN,"Button",BS_AUTORADIOBUTTON,18,56,35,10
PUSHBUTTON "Find Next",1005,225,7,50,14 PUSHBUTTON "Find Next",IDC_MEMVIEWFIND_NEXT,225,7,50,14
END END
IDD_RECORDINP DIALOGEX 0, 0, 276, 65 IDD_RECORDINP DIALOGEX 0, 0, 276, 65
@ -1317,14 +1254,6 @@ BEGIN
BOTTOMMARGIN, 201 BOTTOMMARGIN, 201
END END
"NETPLAYCONFIG", DIALOG
BEGIN
LEFTMARGIN, 10
RIGHTMARGIN, 212
TOPMARGIN, 8
BOTTOMMARGIN, 170
END
"PALCONFIG", DIALOG "PALCONFIG", DIALOG
BEGIN BEGIN
LEFTMARGIN, 10 LEFTMARGIN, 10
@ -1408,33 +1337,33 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
GROUPBOX "Active Cheats",201,3,1,133,168,WS_TABSTOP GROUPBOX "Active Cheats",201,3,1,133,168,WS_TABSTOP
GROUPBOX "Cheat Search",202,139,1,238,168,WS_TABSTOP GROUPBOX "Cheat Search",202,139,1,238,168,WS_TABSTOP
LISTBOX 101,12,14,115,110,WS_VSCROLL LISTBOX IDC_LIST_CHEATS,12,14,115,110,WS_VSCROLL
LTEXT "Address:",IDC_STATIC,12,134,28,10 LTEXT "Address:",IDC_STATIC,12,134,28,10
LTEXT "Value:",IDC_STATIC,85,134,21,10 LTEXT "Value:",IDC_STATIC,85,134,21,10
LTEXT "Name:",IDC_STATIC,12,118,22,10 LTEXT "Name:",IDC_STATIC,12,118,22,10
EDITTEXT 102,42,132,30,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_CHEAT_ADDR,42,132,30,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 103,107,132,20,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_CHEAT_VAL,107,132,20,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 104,35,116,92,12,ES_AUTOHSCROLL | ES_WANTRETURN EDITTEXT IDC_CHEAT_NAME,35,116,92,12,ES_AUTOHSCROLL | ES_WANTRETURN
PUSHBUTTON "Add",301,12,148,35,16 PUSHBUTTON "Add",IDC_BTN_CHEAT_ADD,12,148,35,16
PUSHBUTTON "Delete",302,52,148,35,16 PUSHBUTTON "Delete",IDC_BTN_CHEAT_DEL,52,148,35,16
PUSHBUTTON "Update",303,92,148,35,16 PUSHBUTTON "Update",IDC_BTN_CHEAT_UPD,92,148,35,16
GROUPBOX "Possibilities",203,252,13,125,156,WS_TABSTOP GROUPBOX "Possibilities",IDC_CHEAT_BOX_POSSIBILITIES,252,13,125,156,WS_TABSTOP
LISTBOX 106,260,25,99,147,LBS_SORT | LBS_WANTKEYBOARDINPUT LISTBOX IDC_CHEAT_LIST_POSSIBILITIES,260,25,99,147,LBS_SORT | LBS_WANTKEYBOARDINPUT
SCROLLBAR 107,360,25,10,138,SBS_VERT SCROLLBAR IDC_CHEAT_SCRL_POSSIBILITIES,360,25,10,138,SBS_VERT
PUSHBUTTON "Reset",304,146,12,55,15 PUSHBUTTON "Reset",IDC_BTN_CHEAT_RESET,146,12,55,15
PUSHBUTTON "Known Value:",305,146,31,55,15 PUSHBUTTON "Known Value:",IDC_BTN_CHEAT_KNOWN,146,31,55,15
EDITTEXT 105,204,32,20,12,ES_UPPERCASE EDITTEXT IDC_CHEAT_VAL_KNOWN,204,32,20,12,ES_UPPERCASE
GROUPBOX "Previous Compare",204,139,51,114,118,WS_TABSTOP GROUPBOX "Previous Compare",204,139,51,114,118,WS_TABSTOP
PUSHBUTTON "Equal",306,146,64,55,15 PUSHBUTTON "Equal",IDC_BTN_CHEAT_EQ,146,64,55,15
PUSHBUTTON "Not Equal",307,146,91,55,15 PUSHBUTTON "Not Equal",IDC_BTN_CHEAT_NE,146,91,55,15
PUSHBUTTON "Greater Than",308,146,118,55,15 PUSHBUTTON "Greater Than",IDC_BTN_CHEAT_GT,146,118,55,15
PUSHBUTTON "Less Than",309,146,145,55,15 PUSHBUTTON "Less Than",IDC_BTN_CHEAT_LT,146,145,55,15
CONTROL "By:",401,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,94,22,10 CONTROL "By:",IDC_CHEAT_CHECK_NE_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,94,22,10
CONTROL "By:",402,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,121,22,10 CONTROL "By:",IDC_CHEAT_CHECK_GT_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,121,22,10
CONTROL "By:",403,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,148,22,10 CONTROL "By:",IDC_CHEAT_CHECK_LT_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,148,22,10
EDITTEXT 108,228,93,20,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_CHEAT_VAL_NE_BY,228,93,20,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 109,228,120,20,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_CHEAT_VAL_GT_BY,228,120,20,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT 110,228,147,20,12,ES_UPPERCASE | ES_WANTRETURN EDITTEXT IDC_CHEAT_VAL_LT_BY,228,147,20,12,ES_UPPERCASE | ES_WANTRETURN
LTEXT "(Hex)",IDC_STATIC,226,34,19,8 LTEXT "(Hex)",IDC_STATIC,226,34,19,8
END END
@ -1479,35 +1408,35 @@ MEMVIEWMENU MENU
BEGIN BEGIN
POPUP "&File" POPUP "&File"
BEGIN BEGIN
MENUITEM "&Save Rom", 100 MENUITEM "&Save Rom", MENU_MV_FILE_SAVE
MENUITEM "S&ave Rom As...", 101 MENUITEM "S&ave Rom As...", MENU_MV_FILE_SAVE_AS
MENUITEM "&Load *.TBL File", 102 MENUITEM "&Load *.TBL File", MENU_MV_FILE_LOAD_TBL
MENUITEM "Unload *.TBL file", 103 MENUITEM "Unload *.TBL file", MENU_MV_FILE_UNLOAD_TBL
POPUP "&Dump to file" POPUP "&Dump to file"
BEGIN BEGIN
MENUITEM "&Ram", 104 MENUITEM "&Ram", MENU_MV_FILE_DUMP_RAM
MENUITEM "&PPU Memory", 105 MENUITEM "&PPU Memory", MENU_MV_FILE_DUMP_PPU
END END
END END
POPUP "&Edit" POPUP "&Edit"
BEGIN BEGIN
MENUITEM "Undo Ctrl+Z", 200 MENUITEM "Undo Ctrl+Z", MENU_MV_EDIT_UNDO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Copy", 201 MENUITEM "Copy", MENU_MV_EDIT_COPY
MENUITEM "Paste", 202 MENUITEM "Paste", MENU_MV_EDIT_PASTE
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Find...", 203 MENUITEM "Find...", MENU_MV_EDIT_FIND
MENUITEM "Find Next", 204 MENUITEM "Find Next", MENU_MV_EDIT_FIND_NEXT
END END
POPUP "&View" POPUP "&View"
BEGIN BEGIN
MENUITEM "NES Memory", 300, CHECKED MENUITEM "NES Memory", MENU_MV_VIEW_RAM, CHECKED
MENUITEM "PPU Memory", 301 MENUITEM "PPU Memory", MENU_MV_VIEW_PPU
MENUITEM "Rom File", 302 MENUITEM "Rom File", MENU_MV_VIEW_ROM
END END
POPUP "&Bookmarks" POPUP "&Bookmarks"
BEGIN BEGIN
MENUITEM "&Remove all bookmarks", 400 MENUITEM "&Remove all bookmarks", MENU_MV_BOOKMARKS_RM_ALL
MENUITEM SEPARATOR MENUITEM SEPARATOR
END END
END END
@ -1546,24 +1475,24 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPT
CAPTION "Code Data Logger" CAPTION "Code Data Logger"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Load...",104,7,81,50,14 DEFPUSHBUTTON "Load...",BTN_CDLOGGER_LOAD,7,81,50,14
PUSHBUTTON "Save",107,257,81,50,14 PUSHBUTTON "Save",BTN_CDLOGGER_SAVE,257,81,50,14
GROUPBOX "Code Data Log Status",-1,2,4,316,119,BS_CENTER GROUPBOX "Code Data Log Status",-1,2,4,316,119,BS_CENTER
PUSHBUTTON "Start",105,129,81,50,14 PUSHBUTTON "Start",BTN_CDLOGGER_START_PAUSE,129,81,50,14
GROUPBOX "Address Label Logger",65534,3,128,315,79,BS_CENTER GROUPBOX "Address Label Logger",65534,3,128,315,79,BS_CENTER
PUSHBUTTON "Load...",111,7,182,50,14,WS_DISABLED PUSHBUTTON "Load...",111,7,182,50,14,WS_DISABLED
PUSHBUTTON "Start",112,127,181,50,14,WS_DISABLED PUSHBUTTON "Start",112,127,181,50,14,WS_DISABLED
PUSHBUTTON "Save...",113,259,181,50,14,WS_DISABLED PUSHBUTTON "Save...",113,259,181,50,14,WS_DISABLED
LTEXT "4067 - 29.5%",100,38,31,68,11 LTEXT "4067 - 29.5%",LBL_CDLOGGER_CODECOUNT,38,31,68,11
GROUPBOX "Bytes Logged As Code",65533,29,20,84,27 GROUPBOX "Bytes Logged As Code",65533,29,20,84,27
GROUPBOX "Bytes Logged as data",65532,117,20,84,27 GROUPBOX "Bytes Logged as data",65532,117,20,84,27
LTEXT "7092 - 37.2%",101,128,31,65,9 LTEXT "7092 - 37.2%",LBL_CDLOGGER_DATACOUNT,128,31,65,9
GROUPBOX "Bytes Not Logged",65531,205,20,79,27 GROUPBOX "Bytes Not Logged",65531,205,20,79,27
LTEXT "6072 - 32.7%",102,210,31,60,8 LTEXT "6072 - 32.7%",LBL_CDLOGGER_UNDEFCOUNT,210,31,60,8
LTEXT "Itsa me the Code Data Logger! Press Start to play!",65530,69,56,172,12 LTEXT "Itsa me the Code Data Logger! Press Start to play!",65530,69,56,172,12
PUSHBUTTON "Reset Log",103,7,66,50,14 PUSHBUTTON "Reset Log",BTN_CDLOGGER_RESET,7,66,50,14
PUSHBUTTON "Save as...",106,257,66,50,14 PUSHBUTTON "Save as...",BTN_CDLOGGER_SAVE_AS,257,66,50,14
PUSHBUTTON "Save Stripped iNes Rom...",108,213,102,99,14 PUSHBUTTON "Save Stripped iNes Rom...",BTN_CDLOGGER_SAVE_STRIPPED,213,102,99,14
END END
PPUVIEW DIALOG 44, 38, 355, 246 PPUVIEW DIALOG 44, 38, 355, 246
@ -1571,15 +1500,15 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSME
CAPTION "PPU Viewer" CAPTION "PPU Viewer"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
GROUPBOX "Pattern Tables",101,2,-1,351,192,WS_TABSTOP GROUPBOX "Pattern Tables",GRP_PPUVIEW_TABLES,2,-1,351,192,WS_TABSTOP
LTEXT "Tile:",103,6,168,50,10 LTEXT "Tile:",LBL_PPUVIEW_TILE1,6,168,50,10
LTEXT "Tile:",104,177,168,50,10 LTEXT "Tile:",LBL_PPUVIEW_TILE2,177,168,50,10
CONTROL "",201,"msctls_trackbar32",WS_TABSTOP,227,178,106,11 CONTROL "",CTL_PPUVIEW_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,227,178,106,11
LTEXT "Refresh: More",-1,177,178,50,10 LTEXT "Refresh: More",-1,177,178,50,10
LTEXT "Less",-1,334,178,18,10 LTEXT "Less",-1,334,178,18,10
GROUPBOX "Palettes",105,2,192,351,53,WS_TABSTOP GROUPBOX "Palettes",LBL_PPUVIEW_PALETTES,2,192,351,53,WS_TABSTOP
LTEXT "Display on scanline:",-1,6,178,65,10 LTEXT "Display on scanline:",-1,6,178,65,10
EDITTEXT 102,72,176,27,12 EDITTEXT IDC_PPUVIEW_SCANLINE,72,176,27,12
END END
@ -1640,7 +1569,8 @@ IDB_TE_ARROW BITMAP "res/te_arrow.bmp"
// //
// Generated from the TEXTINCLUDE 3 resource. // Generated from the TEXTINCLUDE 3 resource.
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED #endif // not APSTUDIO_INVOKED

View File

@ -10,34 +10,133 @@
#define BTN_CANCEL 2 #define BTN_CANCEL 2
#define MENU_OPEN_FILE 100 #define MENU_OPEN_FILE 100
#define EDIT_ROMS 100 #define EDIT_ROMS 100
#define LBL_LOG_TEXT 100
#define LBL_KEY_COMBO 100
#define LBL_CDLOGGER_CODECOUNT 100
#define CHECK_PALETTE_ENABLED 100
#define LBL_DWBDIALOG_TEXT 100
#define GRP_GAMEPAD1 100
#define IDC_TRACER_LOG 100
#define MENU_MV_FILE_SAVE 100
#define IDC_VIDEOCONFIG_MODE 100
#define IDC_ROMPATCHER_OFFSET_BOX 100
#define MENU_CLOSE_FILE 101 #define MENU_CLOSE_FILE 101
#define IDI_ICON1 101 #define IDI_ICON1 101
#define CB_DISABLE_SPEED_THROTTLING 101 #define CB_DISABLE_SPEED_THROTTLING 101
#define LBL_CDLOGGER_DATACOUNT 101
#define GRP_PPUVIEW_TABLES 101
#define IDC_NETMOO_STATUS 101
#define GRP_GAMEPAD2 101
#define IDC_LIST_CHEATS 101
#define IDC_SCRL_TRACER_LOG 101
#define MENU_MV_FILE_SAVE_AS 101
#define IDC_VIDEOCONFIG_FS 101
#define IDC_DEBUGGER_BP_ADD 101
#define IDC_ROMPATCHER_DOTNES_OFFSET 101
#define IDC_NTVIEW_TABLE_BOX 101
#define IDI_ICON2 102 #define IDI_ICON2 102
#define MENU_RECENT_FILES 102 #define MENU_RECENT_FILES 102
#define CB_LOAD_FILE_OPEN 102 #define CB_LOAD_FILE_OPEN 102
#define LBL_CDLOGGER_UNDEFCOUNT 102
#define IDC_PPUVIEW_SCANLINE 102
#define IDC_NETMOO_CMD_INPUT 102
#define IDC_CHEAT_ADDR 102
#define IDC_BTN_START_STOP_LOGGING 102
#define MENU_MV_FILE_LOAD_TBL 102
#define IDC_VIDEOCONFIG_AUTO_FS 102
#define IDC_DEBUGGER_BP_DEL 102
#define IDC_ADDBP_MODE_R 102
#define IDC_ROMPATCHER_OFFSET 102
#define IDC_NTVIEW_SCANLINE 102
#define BTN_CDLOGGER_RESET 103
#define LBL_PPUVIEW_TILE1 103
#define IDC_CHEAT_VAL 103
#define IDC_RADIO_LOG_LAST 103
#define MENU_MV_FILE_UNLOAD_TBL 103
#define IDC_DEBUGGER_BP_EDIT 103
#define IDC_ADDBP_MODE_W 103
#define IDC_ROMPATCHER_BTN_EDIT 103
#define IDC_NTVIEW_PROPERTIES_LINE_1 103
#define CB_AUTO_HIDE_MENU 104 #define CB_AUTO_HIDE_MENU 104
#define COMBO_PAD1 104 #define COMBO_PAD1 104
#define BTN_CDLOGGER_LOAD 104
#define LBL_PPUVIEW_TILE2 104
#define IDC_CHEAT_NAME 104
#define IDC_RADIO_LOG_TO_FILE 104
#define MENU_MV_FILE_DUMP_RAM 104
#define IDC_VIDEOCONFIG_SYNC_METHOD_WIN 104
#define IDC_DEBUGGER_RUN 104
#define IDC_ADDBP_MODE_X 104
#define IDC_ROMPATCHER_CURRENT_DATA_BOX 104
#define IDC_NTVIEW_PROPERTIES_LINE_2 104
#define COMBO_PAD2 105 #define COMBO_PAD2 105
#define CB_SET_HIGH_PRIORITY 105 #define CB_SET_HIGH_PRIORITY 105
#define BTN_CDLOGGER_START_PAUSE 105
#define LBL_PPUVIEW_PALETTES 105
#define IDC_CHEAT_VAL_KNOWN 105
#define MENU_MV_FILE_DUMP_PPU 105
#define IDC_VIDEOCONFIG_SYNC_METHOD_FS 105
#define IDC_DEBUGGER_STEP_IN 105
#define IDC_TRACER_LOG_SIZE 105
#define IDC_ADDBP_MEM_CPU 105
#define IDC_ROMPATCHER_CURRENT_DATA 105
#define IDC_NTVIEW_PROPERTIES_LINE_3 105
#define BTN_PORT1 106 #define BTN_PORT1 106
#define BTN_CDLOGGER_SAVE_AS 106
#define IDC_CHEAT_LIST_POSSIBILITIES 106
#define IDC_VIDEOCONFIG_CLIPSIDES 106
#define IDC_DEBUGGER_STEP_OUT 106
#define IDC_ADDBP_MEM_PPU 106
#define IDC_NTVIEW_PROPERTIES_LINE_4 105
#define BTN_PORT2 107 #define BTN_PORT2 107
#define BTN_CDLOGGER_SAVE 107
#define IDC_CHEAT_SCRL_POSSIBILITIES 107
#define IDC_DEBUGGER_STEP_OVER 107
#define IDC_ADDBP_MEM_SPR 107
#define IDC_ROMPATCHER_DISASSEMBLY 107
#define IDR_ACCELERATOR1 108 #define IDR_ACCELERATOR1 108
#define BTN_CDLOGGER_SAVE_STRIPPED 108
#define IDC_CHEAT_VAL_NE_BY 108
#define IDC_DEBUGGER_SEEK_PC 108
#define IDC_CHEAT_VAL_GT_BY 109
#define IDC_DEBUGGER_SEEK_TO 109
#define IDC_ROMPATCHER_PATCH_DATA 109
#define IDC_CHEAT_VAL_LT_BY 110
#define MENU_SAVE_STATE 110 #define MENU_SAVE_STATE 110
#define CB_ASK_EXIT 110 #define CB_ASK_EXIT 110
#define COMBO_FAM 110 #define COMBO_FAM 110
#define IDB_BITMAP1 110 #define IDB_BITMAP1 110
#define IDB_TE_ARROW 110 #define IDB_TE_ARROW 110
#define IDC_CHECK_LOG_REGISTERS 110
#define IDC_DEBUGGER_BREAK_ON_BAD_OP 110
#define IDC_ROMPATCHER_BTN_APPLY 110
#define MENU_LOAD_STATE 111 #define MENU_LOAD_STATE 111
#define CB_DISABLE_SCREEN_SAVER 111 #define CB_DISABLE_SCREEN_SAVER 111
#define BTN_FAM 111 #define BTN_FAM 111
#define IDC_CHECK_LOG_PROCESSOR_STATUS 111
#define IDC_DEBUGGER_RELOAD_SYMS 111
#define IDC_ROMPATCHER_BTN_SAVE 111
#define BTN_AUTO_HOLD 112 #define BTN_AUTO_HOLD 112
#define IDC_BTN_LOG_BROWSE 112
#define IDC_DEBUGGER_BOOKMARK_ADD 112
#define IDC_DEBUGGER_BOOKMARK_DEL 113
#define BTN_CLEAR_AH 114 #define BTN_CLEAR_AH 114
#define IDC_CHECK_LOG_NEW_INSTRUCTIONS 114
#define LBL_AUTO_HOLD 115 #define LBL_AUTO_HOLD 115
#define IDC_CHECK_LOG_NEW_DATA 115
#define LBL_CLEAR_AH 116 #define LBL_CLEAR_AH 116
#define IDC_CHECK_LOG_UPDATE_WINDOW 116
#define LBL_AUTO_HOLD2 118 #define LBL_AUTO_HOLD2 118
#define LBL_AUTO_HOLD3 120 #define LBL_AUTO_HOLD3 120
#define LBL_AUTO_HOLD4 122 #define LBL_AUTO_HOLD4 122
#define CHECK_SOUND_8BIT 122
#define CHECK_SOUND_GLOBAL_FOCUS 124
#define CHECK_SOUND_ENABLED 126
#define CTL_LATENCY_TRACKBAR 128
#define COMBO_SOUND_QUALITY 129
#define CHECK_SOUND_MUTEFA 130
#define IDC_DISABLE_HW_ACCEL_WIN 130
#define IDC_DISABLE_HW_ACCEL_FS 131
#define MENU_RECORD_MOVIE 141 #define MENU_RECORD_MOVIE 141
#define MENU_REPLAY_MOVIE 142 #define MENU_REPLAY_MOVIE 142
#define MENU_STOP_MOVIE 143 #define MENU_STOP_MOVIE 143
@ -51,54 +150,162 @@
#define BTN_CLEAR 200 #define BTN_CLEAR 200
#define IDC_EDIT_FILENAME 200 #define IDC_EDIT_FILENAME 200
#define IDC_COMBO_FILENAME 200 #define IDC_COMBO_FILENAME 200
#define BTN_PALETTE_LOAD 200
#define IDC_NETMOO_HOST 200
#define COMBO_SOUND_RATE 200
#define MENU_MV_EDIT_UNDO 200
#define IDC_VIDEOCONFIG_XRES 200
#define IDC_DEBUGGER_FLAG_N 200
#define IDC_ADDBP_ADDR_START 200
#define MENU_POWER 201 #define MENU_POWER 201
#define TXT_PAD2 201 #define TXT_PAD2 201
#define IDC_BUTTON_BROWSEFILE 201 #define IDC_BUTTON_BROWSEFILE 201
#define IDC_CHECK_READONLY 201 #define IDC_CHECK_READONLY 201
#define BTN_PALETTE_RESET 201
#define CTL_PPUVIEW_TRACKBAR 201
#define IDC_NETMOO_PORT 201
#define MENU_MV_EDIT_COPY 201
#define IDC_VIDEOCONFIG_YRES 201
#define IDC_DEBUGGER_FLAG_V 201
#define IDC_ADDBP_ADDR_END 201
#define IDC_NTVIEW_REFRESH_TRACKBAR 201
#define MENU_EJECT_DISK 202 #define MENU_EJECT_DISK 202
#define TXT_FAM 202 #define TXT_FAM 202
#define MENU_MV_EDIT_PASTE 202
#define IDC_VIDEOCONFIG_BPP 202
#define IDC_DEBUGGER_FLAG_U 202
#define IDC_ADDBP_CONDITION 202
#define MENU_SWITCH_DISK 203 #define MENU_SWITCH_DISK 203
#define IDC_NETMOO_NICK 203
#define IDC_CHEAT_BOX_POSSIBILITIES 203
#define MENU_MV_EDIT_FIND 203
#define IDC_DEBUGGER_FLAG_B 203
#define IDC_ADDBP_NAME 203
#define MENU_INSERT_COIN 204 #define MENU_INSERT_COIN 204
#define COMBO_NETMOO_LOCAL_PLAYERS 204
#define MENU_MV_EDIT_FIND_NEXT 204
#define IDC_DEBUGGER_FLAG_D 204
#define IDC_NETMOO_KEY 205
#define IDC_DEBUGGER_FLAG_I 205
#define IDC_NETMOO_PASS 206
#define IDC_DEBUGGER_ENABLE_SYMBOLIC 208
#define IDC_DEBUGGER_FLAG_Z 206
#define IDC_DEBUGGER_FLAG_C 207
#define BTN_NETMOO_CONNECT 250
#define MENU_HIDE_MENU 300 #define MENU_HIDE_MENU 300
#define CHECK_SCREENSHOT_NAMES 300 #define CHECK_SCREENSHOT_NAMES 300
#define COMBO_FILTER 300 #define COMBO_FILTER 300
#define IDC_EDIT_AUTHORINFO 300 #define IDC_EDIT_AUTHORINFO 300
#define IDC_LABEL_LENGTH 300 #define IDC_LABEL_LENGTH 300
#define MENU_MV_VIEW_RAM 300
#define IDC_RADIO_SCALE 300
#define IDC_DEBUGGER_DISASSEMBLY 300
#define MENU_RUN_IN_BACKGROUND 301 #define MENU_RUN_IN_BACKGROUND 301
#define IDC_COMBO_RECORDFROM 301 #define IDC_COMBO_RECORDFROM 301
#define IDC_LABEL_FRAMES 301 #define IDC_LABEL_FRAMES 301
#define IDC_BTN_CHEAT_ADD 301
#define MENU_MV_VIEW_PPU 301
#define IDC_RADIO_STRETCH 301
#define IDC_DEBUGGER_DISASSEMBLY_VSCR 301
#define MENU_BACKGROUND_INPUT 302 #define MENU_BACKGROUND_INPUT 302
#define IDC_LABEL_UNDOCOUNT 302 #define IDC_LABEL_UNDOCOUNT 302
#define IDC_BTN_CHEAT_DEL 302
#define MENU_MV_VIEW_ROM 302
#define IDC_VIDEOCONFIG_XSCALE 302
#define IDC_DEBUGGER_BP_LIST 302
#define MENU_SHOW_STATUS_ICON 303 #define MENU_SHOW_STATUS_ICON 303
#define IDC_LABEL_AUTHORINFO 303 #define IDC_LABEL_AUTHORINFO 303
#define IDC_BTN_CHEAT_UPD 303
#define IDC_VIDEOCONFIG_YSCALE 303
#define MENU_ENABLE_REWIND 304 #define MENU_ENABLE_REWIND 304
#define IDC_LABEL_ROMUSED 304 #define IDC_LABEL_ROMUSED 304
#define IDC_BTN_CHEAT_RESET 304
#define IDC_VIDEOCONFIG_SCALER_FS 304
#define IDC_DEBUGGER_VAL_A 304
#define IDC_LABEL_ROMCHECKSUM 305 #define IDC_LABEL_ROMCHECKSUM 305
#define IDC_BTN_CHEAT_KNOWN 305
#define IDC_DEBUGGER_VAL_X 305
#define IDC_LABEL_RECORDEDFROM 306 #define IDC_LABEL_RECORDEDFROM 306
#define IDC_BTN_CHEAT_EQ 306
#define IDC_DEBUGGER_VAL_Y 306
#define IDC_LABEL_EMULATORUSED 307 #define IDC_LABEL_EMULATORUSED 307
#define IDC_BTN_CHEAT_NE 307
#define IDC_DEBUGGER_VAL_PC 307
#define IDC_LABEL_CURRCHECKSUM 308 #define IDC_LABEL_CURRCHECKSUM 308
#define IDC_BTN_CHEAT_GT 308
#define IDC_DEBUGGER_STACK_CONTENTS 308
#define IDC_BTN_CHEAT_LT 309
#define IDC_DEBUGGER_VAL_PCSEEK 309
#define MENU_GAME_GENIE 310 #define MENU_GAME_GENIE 310
#define IDC_DEBUGGER_VAL_PPU 310
#define MENU_PAL 311 #define MENU_PAL 311
#define IDC_DEBUGGER_VAL_SPR 311
#define IDC_DEBUGGER_BOOKMARK 312
#define MENU_DIRECTORIES 320 #define MENU_DIRECTORIES 320
#define MENU_INPUT 321 #define MENU_INPUT 321
#define MENU_GUI_OPTIONS 327 #define MENU_GUI_OPTIONS 327
#define CHECK_DISABLE_FOURSCORE 400
#define MENU_MV_BOOKMARKS_RM_ALL 400
#define IDC_WINSIZE_MUL_X 400
#define IDC_CHEAT_CHECK_NE_BY 401
#define IDC_WINSIZE_MUL_Y 401
#define IDC_CHEAT_CHECK_GT_BY 402
#define IDC_FORCE_INT_VIDEO_SCALARS 402
#define IDC_CHEAT_CHECK_LT_BY 403
#define IDC_FORCE_ASPECT_CORRECTION 403
#define IDC_DEBUGGER_VAL_S 403
#define IDC_VIDEOCONFIG_ASPECT_X 404
#define IDC_VIDEOCONFIG_ASPECT_Y 405
#define CTL_TINT_TRACKBAR 500
#define CTL_VOLUME_TRACKBAR 500
#define IDC_SCANLINE_FIRST_NTSC 500
#define IDC_SCANLINE_LAST_NTSC 501
#define CTL_HUE_TRACKBAR 501
#define IDC_DEBUGGER_VAL_SLINE 501
#define IDC_SCANLINE_FIRST_PAL 502
#define IDC_DEBUGGER_ADDR_LINE 502
#define IDC_SCANLINE_LAST_PAL 503
#define IDC_VIDEOCONFIG_NO8LIM 600
#define IDC_DEBUGGER_ROM_PATCHER 602
#define LIST_DEBUGGER_BOOKMARKS 701
#define GUI_BOT_A_1 1000 #define GUI_BOT_A_1 1000
#define IDC_EDIT_OFFSET 1000 #define IDC_EDIT_OFFSET 1000
#define IDC_GAME_GENIE_CODE 1000
#define IDC_MEMVIEWFIND_WHAT 1000
#define GUI_BOT_B_1 1001 #define GUI_BOT_B_1 1001
#define MW_ADDR00 1001 #define MW_ADDR00 1001
#define IDC_EDIT_FROM 1001 #define IDC_EDIT_FROM 1001
#define IDC_GAME_GENIE_ADDR 1001
#define IDC_MEMVIEWFIND_TYPE_HEX 1001
#define IDC_NTVIEW_MIRROR_HORIZONTAL 1001
#define GUI_BOT_SELECT_1 1002 #define GUI_BOT_SELECT_1 1002
#define IDC_CHECK_STOPMOVIE 1002 #define IDC_CHECK_STOPMOVIE 1002
#define IDC_GAME_GENIE_COMP 1002
#define IDC_TRACER_STATS 1002
#define IDC_MEMVIEWFIND_TYPE_TEXT 1002
#define IDC_NTVIEW_MIRROR_VERTICAL 1002
#define GUI_BOT_START_1 1003 #define GUI_BOT_START_1 1003
#define LV_MAPPING 1003 #define LV_MAPPING 1003
#define IDC_EDIT_STOPFRAME 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 GUI_BOT_UP_1 1004 #define GUI_BOT_UP_1 1004
#define MW_ADDR01 1004 #define MW_ADDR01 1004
#define IDC_LIST_GGADDRESSES 1004
#define IDC_MEMVIEWFIND_DIR_DOWN 1004
#define IDC_NTVIEW_MIRROR_SS_TABLE_0 1004
#define GUI_BOT_DOWN_1 1005 #define GUI_BOT_DOWN_1 1005
#define IDC_BTN_ADD_TO_CHEATS 1005
#define IDC_MEMVIEWFIND_NEXT 1005
#define IDC_NTVIEW_MIRROR_SS_TABLE_1 1005
#define GUI_BOT_LEFT_1 1006 #define GUI_BOT_LEFT_1 1006
#define IDC_NTVIEW_MIRROR_SS_TABLE_2 1006
#define GUI_BOT_RIGHT_1 1007 #define GUI_BOT_RIGHT_1 1007
#define MW_ADDR02 1007 #define MW_ADDR02 1007
#define IDC_NTVIEW_MIRROR_SS_TABLE_3 1007
#define GUI_BOT_A_2 1008 #define GUI_BOT_A_2 1008
#define IDC_NTVIEW_SHOW_SCROLL_LINES 1008
#define GUI_BOT_END 1009 #define GUI_BOT_END 1009
#define GUI_BOT_INVALID 1009 #define GUI_BOT_INVALID 1009
#define GUI_BOT_X 1010 #define GUI_BOT_X 1010

View File

@ -383,19 +383,21 @@ static void UpdateSD(HWND hwndDlg)
{ {
int t; int t;
CheckDlgButton(hwndDlg,126,soundo?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg,CHECK_SOUND_ENABLED,soundo?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg,122,(soundoptions&SO_FORCE8BIT)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg,CHECK_SOUND_8BIT,(soundoptions&SO_FORCE8BIT)?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg,123,(soundoptions&SO_SECONDARY)?BST_CHECKED:BST_UNCHECKED); // The option formerly flagged by SO_SECONDARY can no longer be disabled.
CheckDlgButton(hwndDlg,124,(soundoptions&SO_GFOCUS)?BST_CHECKED:BST_UNCHECKED); // CheckDlgButton(hwndDlg,123,(soundoptions&SO_SECONDARY)?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg,130,(soundoptions&SO_MUTEFA)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg,CHECK_SOUND_GLOBAL_FOCUS,(soundoptions&SO_GFOCUS)?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg,131,(soundoptions&SO_OLDUP)?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg,CHECK_SOUND_MUTEFA,(soundoptions&SO_MUTEFA)?BST_CHECKED:BST_UNCHECKED);
SendDlgItemMessage(hwndDlg,129,CB_SETCURSEL,soundquality,(LPARAM)(LPSTR)0); // The option formerly flagged by SO_OLDUP can no longer be enabled.
// CheckDlgButton(hwndDlg,131,(soundoptions&SO_OLDUP)?BST_CHECKED:BST_UNCHECKED);
SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_SETCURSEL,soundquality,(LPARAM)(LPSTR)0);
t=0; t=0;
if(soundrate==22050) t=1; if(soundrate==22050) t=1;
else if(soundrate==44100) t=2; else if(soundrate==44100) t=2;
else if(soundrate==48000) t=3; else if(soundrate==48000) t=3;
else if(soundrate==96000) t=4; else if(soundrate==96000) t=4;
SendDlgItemMessage(hwndDlg,200,CB_SETCURSEL,t,(LPARAM)(LPSTR)0); SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_SETCURSEL,t,(LPARAM)(LPSTR)0);
} }
BOOL CALLBACK SoundConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) BOOL CALLBACK SoundConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@ -408,14 +410,14 @@ case WM_NCLBUTTONDOWN:break;
case WM_INITDIALOG: case WM_INITDIALOG:
/* Volume Trackbar */ /* Volume Trackbar */
SendDlgItemMessage(hwndDlg,500,TBM_SETRANGE,1,MAKELONG(0,150)); SendDlgItemMessage(hwndDlg,CTL_VOLUME_TRACKBAR,TBM_SETRANGE,1,MAKELONG(0,150));
SendDlgItemMessage(hwndDlg,500,TBM_SETTICFREQ,25,0); SendDlgItemMessage(hwndDlg,CTL_VOLUME_TRACKBAR,TBM_SETTICFREQ,25,0);
SendDlgItemMessage(hwndDlg,500,TBM_SETPOS,1,150-soundvolume); SendDlgItemMessage(hwndDlg,CTL_VOLUME_TRACKBAR,TBM_SETPOS,1,150-soundvolume);
/* buffer size time trackbar */ /* buffer size time trackbar */
SendDlgItemMessage(hwndDlg,128,TBM_SETRANGE,1,MAKELONG(15,200)); SendDlgItemMessage(hwndDlg,CTL_LATENCY_TRACKBAR,TBM_SETRANGE,1,MAKELONG(15,200));
SendDlgItemMessage(hwndDlg,128,TBM_SETTICFREQ,1,0); SendDlgItemMessage(hwndDlg,CTL_LATENCY_TRACKBAR,TBM_SETTICFREQ,1,0);
SendDlgItemMessage(hwndDlg,128,TBM_SETPOS,1,soundbuftime); SendDlgItemMessage(hwndDlg,CTL_LATENCY_TRACKBAR,TBM_SETPOS,1,soundbuftime);
{ {
char tbuf[8]; char tbuf[8];
@ -423,26 +425,26 @@ case WM_INITDIALOG:
SetDlgItemText(hwndDlg,666,(LPTSTR)tbuf); SetDlgItemText(hwndDlg,666,(LPTSTR)tbuf);
} }
SendDlgItemMessage(hwndDlg,129,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Low"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Low");
SendDlgItemMessage(hwndDlg,129,CB_ADDSTRING,0,(LPARAM)(LPSTR)"High"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_ADDSTRING,0,(LPARAM)(LPSTR)"High");
SendDlgItemMessage(hwndDlg,129,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Highest"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Highest");
SendDlgItemMessage(hwndDlg,200,CB_ADDSTRING,0,(LPARAM)(LPSTR)"11025"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_ADDSTRING,0,(LPARAM)(LPSTR)"11025");
SendDlgItemMessage(hwndDlg,200,CB_ADDSTRING,0,(LPARAM)(LPSTR)"22050"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_ADDSTRING,0,(LPARAM)(LPSTR)"22050");
SendDlgItemMessage(hwndDlg,200,CB_ADDSTRING,0,(LPARAM)(LPSTR)"44100"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_ADDSTRING,0,(LPARAM)(LPSTR)"44100");
SendDlgItemMessage(hwndDlg,200,CB_ADDSTRING,0,(LPARAM)(LPSTR)"48000"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_ADDSTRING,0,(LPARAM)(LPSTR)"48000");
SendDlgItemMessage(hwndDlg,200,CB_ADDSTRING,0,(LPARAM)(LPSTR)"96000"); SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_ADDSTRING,0,(LPARAM)(LPSTR)"96000");
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
break; break;
case WM_VSCROLL: case WM_VSCROLL:
soundvolume=150-SendDlgItemMessage(hwndDlg,500,TBM_GETPOS,0,0); soundvolume=150-SendDlgItemMessage(hwndDlg,CTL_VOLUME_TRACKBAR,TBM_GETPOS,0,0);
FCEUI_SetSoundVolume(soundvolume); FCEUI_SetSoundVolume(soundvolume);
break; break;
case WM_HSCROLL: case WM_HSCROLL:
{ {
char tbuf[8]; char tbuf[8];
soundbuftime=SendDlgItemMessage(hwndDlg,128,TBM_GETPOS,0,0); soundbuftime=SendDlgItemMessage(hwndDlg,CTL_LATENCY_TRACKBAR,TBM_GETPOS,0,0);
sprintf(tbuf,"%d",soundbuftime); sprintf(tbuf,"%d",soundbuftime);
SetDlgItemText(hwndDlg,666,(LPTSTR)tbuf); SetDlgItemText(hwndDlg,666,(LPTSTR)tbuf);
//soundbufsize=(soundbuftime*soundrate/1000); //soundbufsize=(soundbuftime*soundrate/1000);
@ -456,10 +458,10 @@ case WM_COMMAND:
case CBN_SELENDOK: case CBN_SELENDOK:
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
case 200: case COMBO_SOUND_RATE:
{ {
int tmp; int tmp;
tmp=SendDlgItemMessage(hwndDlg,200,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); tmp=SendDlgItemMessage(hwndDlg,COMBO_SOUND_RATE,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
if(tmp==0) tmp=11025; if(tmp==0) tmp=11025;
else if(tmp==1) tmp=22050; else if(tmp==1) tmp=22050;
else if(tmp==2) tmp=44100; else if(tmp==2) tmp=44100;
@ -484,8 +486,8 @@ case WM_COMMAND:
} }
break; break;
case 129: case COMBO_SOUND_QUALITY:
soundquality=SendDlgItemMessage(hwndDlg,129,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); soundquality=SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
if(soundrate<44100) soundquality=0; if(soundrate<44100) soundquality=0;
FCEUI_SetSoundQuality(soundquality); FCEUI_SetSoundQuality(soundquality);
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
@ -496,7 +498,7 @@ case WM_COMMAND:
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
case 122:soundoptions^=SO_FORCE8BIT; case CHECK_SOUND_8BIT:soundoptions^=SO_FORCE8BIT;
if(soundo) if(soundo)
{ {
TrashSoundNow(); TrashSoundNow();
@ -504,6 +506,8 @@ case WM_COMMAND:
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
} }
break; break;
// The option formerly flagged by SO_SECONDARY can no longer be disabled.
#if 0
case 123:soundoptions^=SO_SECONDARY; case 123:soundoptions^=SO_SECONDARY;
if(soundo) if(soundo)
{ {
@ -512,7 +516,8 @@ case WM_COMMAND:
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
} }
break; break;
case 124:soundoptions^=SO_GFOCUS; #endif
case CHECK_SOUND_GLOBAL_FOCUS:soundoptions^=SO_GFOCUS;
if(soundo) if(soundo)
{ {
TrashSoundNow(); TrashSoundNow();
@ -520,8 +525,10 @@ case WM_COMMAND:
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
} }
break; break;
case 130:soundoptions^=SO_MUTEFA; case CHECK_SOUND_MUTEFA:soundoptions^=SO_MUTEFA;
break; break;
// The option formerly flagged by SO_OLDUP can no longer be enabled.
#if 0
case 131:soundoptions^=SO_OLDUP; case 131:soundoptions^=SO_OLDUP;
if(soundo) if(soundo)
{ {
@ -530,7 +537,8 @@ case WM_COMMAND:
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
} }
break; break;
case 126:soundo=!soundo; #endif
case CHECK_SOUND_ENABLED:soundo=!soundo;
if(!soundo) TrashSound(); if(!soundo) TrashSound();
else soundo=InitSound(); else soundo=InitSound();
UpdateSD(hwndDlg); UpdateSD(hwndDlg);
@ -541,7 +549,7 @@ case WM_COMMAND:
if(!(wParam>>16)) if(!(wParam>>16))
switch(wParam&0xFFFF) switch(wParam&0xFFFF)
{ {
case 1: case BTN_CLOSE:
gornk: gornk:
DestroyWindow(hwndDlg); DestroyWindow(hwndDlg);
uug=0; uug=0;
@ -590,5 +598,3 @@ void FCEUD_SoundVolumeAdjust(int n)
FCEUI_SetSoundVolume(soundvolume); FCEUI_SetSoundVolume(soundvolume);
FCEU_DispMessage("Sound volume %d.", soundvolume); FCEU_DispMessage("Sound volume %d.", soundvolume);
} }
//#include "wave.cpp"

View File

@ -87,32 +87,32 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
GetObject(hlogFont, sizeof(LOGFONT), &lf); GetObject(hlogFont, sizeof(LOGFONT), &lf);
strcpy(lf.lfFaceName,"Courier"); strcpy(lf.lfFaceName,"Courier");
hlogNewFont = CreateFontIndirect(&lf); hlogNewFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg,100,WM_SETFONT,(WPARAM)hlogNewFont,FALSE); SendDlgItemMessage(hwndDlg,IDC_TRACER_LOG,WM_SETFONT,(WPARAM)hlogNewFont,FALSE);
//check the disabled radio button //check the disabled radio button
CheckRadioButton(hwndDlg,103,104,103); CheckRadioButton(hwndDlg,IDC_RADIO_LOG_LAST,IDC_RADIO_LOG_TO_FILE,IDC_RADIO_LOG_LAST);
//EnableWindow(GetDlgItem(hwndDlg,101),FALSE); //EnableWindow(GetDlgItem(hwndDlg,IDC_SCRL_TRACER_LOG),FALSE);
//fill in the options for the log size //fill in the options for the log size
for(i = 0;i < LOG_OPTION_SIZE;i++){ for(i = 0;i < LOG_OPTION_SIZE;i++){
SendDlgItemMessage(hwndDlg,105,CB_INSERTSTRING,-1,(LPARAM)(LPSTR)log_optn_strlst[i]); SendDlgItemMessage(hwndDlg,IDC_TRACER_LOG_SIZE,CB_INSERTSTRING,-1,(LPARAM)(LPSTR)log_optn_strlst[i]);
} }
SendDlgItemMessage(hwndDlg,105,CB_SETCURSEL,0,0); SendDlgItemMessage(hwndDlg,IDC_TRACER_LOG_SIZE,CB_SETCURSEL,0,0);
SetDlgItemText(hwndDlg, 100, "Welcome to the Trace Logger."); SetDlgItemText(hwndDlg, IDC_TRACER_LOG, "Welcome to the Trace Logger.");
logtofile = 0; logtofile = 0;
if(logging_options == -1){ if(logging_options == -1){
logging_options = (LOG_REGISTERS | LOG_PROCESSOR_STATUS); logging_options = (LOG_REGISTERS | LOG_PROCESSOR_STATUS);
CheckDlgButton(hwndDlg, 110, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_CHECK_LOG_REGISTERS, BST_CHECKED);
CheckDlgButton(hwndDlg, 111, BST_CHECKED); CheckDlgButton(hwndDlg, IDC_CHECK_LOG_PROCESSOR_STATUS, BST_CHECKED);
} else{ } else{
if(logging_options&LOG_REGISTERS)CheckDlgButton(hwndDlg, 110, BST_CHECKED); if(logging_options&LOG_REGISTERS)CheckDlgButton(hwndDlg, IDC_CHECK_LOG_REGISTERS, BST_CHECKED);
if(logging_options&LOG_PROCESSOR_STATUS)CheckDlgButton(hwndDlg, 111, BST_CHECKED); if(logging_options&LOG_PROCESSOR_STATUS)CheckDlgButton(hwndDlg, IDC_CHECK_LOG_PROCESSOR_STATUS, BST_CHECKED);
} }
EnableWindow(GetDlgItem(hwndDlg,105),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_TRACER_LOG_SIZE),TRUE);
EnableWindow(GetDlgItem(hwndDlg,112),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_LOG_BROWSE),FALSE);
if(log_update_window)CheckDlgButton(hwndDlg, 116, BST_CHECKED); if(log_update_window)CheckDlgButton(hwndDlg, IDC_CHECK_LOG_UPDATE_WINDOW, BST_CHECKED);
EnableTracerMenuItems(); EnableTracerMenuItems();
break; break;
@ -128,48 +128,48 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(HIWORD(wParam)) { switch(HIWORD(wParam)) {
case BN_CLICKED: case BN_CLICKED:
switch(LOWORD(wParam)) { switch(LOWORD(wParam)) {
case 102: //start logging case IDC_BTN_START_STOP_LOGGING:
if(logging)EndLoggingSequence(); if(logging)EndLoggingSequence();
else BeginLoggingSequence(); else BeginLoggingSequence();
EnableTracerMenuItems(); EnableTracerMenuItems();
break; break;
case 103: case IDC_RADIO_LOG_LAST:
logtofile = 0; logtofile = 0;
EnableTracerMenuItems(); EnableTracerMenuItems();
break; break;
case 104: case IDC_RADIO_LOG_TO_FILE:
logtofile = 1; logtofile = 1;
EnableTracerMenuItems(); EnableTracerMenuItems();
break; break;
case 110: case IDC_CHECK_LOG_REGISTERS:
logging_options ^= LOG_REGISTERS; logging_options ^= LOG_REGISTERS;
break; break;
case 111: case IDC_CHECK_LOG_PROCESSOR_STATUS:
logging_options ^= LOG_PROCESSOR_STATUS; logging_options ^= LOG_PROCESSOR_STATUS;
break; break;
case 114: case IDC_CHECK_LOG_NEW_INSTRUCTIONS:
logging_options ^= LOG_NEW_INSTRUCTIONS; logging_options ^= LOG_NEW_INSTRUCTIONS;
if(logging && (!PromptForCDLogger())){ if(logging && (!PromptForCDLogger())){
logging_options ^= LOG_NEW_INSTRUCTIONS; //turn it back off logging_options ^= LOG_NEW_INSTRUCTIONS; //turn it back off
CheckDlgButton(hTracer, 114, BST_UNCHECKED); CheckDlgButton(hTracer, IDC_CHECK_LOG_NEW_INSTRUCTIONS, BST_UNCHECKED);
} }
//EnableTracerMenuItems(); //EnableTracerMenuItems();
break; break;
case 115: case IDC_CHECK_LOG_NEW_DATA:
logging_options ^= LOG_NEW_DATA; logging_options ^= LOG_NEW_DATA;
if(logging && (!PromptForCDLogger())){ if(logging && (!PromptForCDLogger())){
logging_options ^= LOG_NEW_DATA; //turn it back off logging_options ^= LOG_NEW_DATA; //turn it back off
CheckDlgButton(hTracer, 115, BST_UNCHECKED); CheckDlgButton(hTracer, IDC_CHECK_LOG_NEW_DATA, BST_UNCHECKED);
} }
break; break;
case 116: case IDC_CHECK_LOG_UPDATE_WINDOW:
//todo: if this gets unchecked then we need to clear out the window //todo: if this gets unchecked then we need to clear out the window
log_update_window ^= 1; log_update_window ^= 1;
if(!FCEUI_EmulationPaused() && !log_update_window) //mbg merge 7/19/06 changed to use EmulationPaused() if(!FCEUI_EmulationPaused() && !log_update_window) //mbg merge 7/19/06 changed to use EmulationPaused()
SetDlgItemText(hTracer, 100, "Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n"); SetDlgItemText(hTracer, IDC_TRACER_LOG, "Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n");
//PauseLoggingSequence(); //PauseLoggingSequence();
break; break;
case 112: case IDC_BTN_LOG_BROWSE:
ShowLogDirDialog(); ShowLogDirDialog();
break; break;
} }
@ -231,8 +231,8 @@ void BeginLoggingSequence(void){
fprintf(LOG_FP,FCEU_NAME_AND_VERSION" - Trace Log File\n"); //mbg merge 7/19/06 changed string fprintf(LOG_FP,FCEU_NAME_AND_VERSION" - Trace Log File\n"); //mbg merge 7/19/06 changed string
} else { } else {
strcpy(str,"Allocating Memory...\r\n"); strcpy(str,"Allocating Memory...\r\n");
SetDlgItemText(hTracer, 100, str); SetDlgItemText(hTracer, IDC_TRACER_LOG, str);
tracelogbufsize = j = log_optn_intlst[SendDlgItemMessage(hTracer,105,CB_GETCURSEL,0,0)]; tracelogbufsize = j = log_optn_intlst[SendDlgItemMessage(hTracer,IDC_TRACER_LOG_SIZE,CB_GETCURSEL,0,0)];
tracelogbuf = (char**)malloc(j*sizeof(char *)); //mbg merge 7/19/06 added cast tracelogbuf = (char**)malloc(j*sizeof(char *)); //mbg merge 7/19/06 added cast
for(i = 0;i < j;i++){ for(i = 0;i < j;i++){
tracelogbuf[i] = (char*)malloc(80); //mbg merge 7/19/06 added cast tracelogbuf[i] = (char*)malloc(80); //mbg merge 7/19/06 added cast
@ -241,7 +241,7 @@ void BeginLoggingSequence(void){
sprintf(str2,"%d Bytes Allocated...\r\n",j*80); sprintf(str2,"%d Bytes Allocated...\r\n",j*80);
strcat(str,str2); strcat(str,str2);
strcat(str,"Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n"); strcat(str,"Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n");
SetDlgItemText(hTracer, 100, str); SetDlgItemText(hTracer, IDC_TRACER_LOG, str);
tracelogbufpos = tracelogbufusedsize = 0; tracelogbufpos = tracelogbufusedsize = 0;
} }
@ -249,7 +249,7 @@ void BeginLoggingSequence(void){
olddatacount = datacount; olddatacount = datacount;
logging=1; logging=1;
SetDlgItemText(hTracer, 102,"Stop Logging"); SetDlgItemText(hTracer, IDC_BTN_START_STOP_LOGGING,"Stop Logging");
return; return;
} }
/* /*
@ -409,10 +409,10 @@ void EndLoggingSequence(void){
free(tracelogbuf[i]); free(tracelogbuf[i]);
} }
free(tracelogbuf); free(tracelogbuf);
SetDlgItemText(hTracer, 100, "Welcome to the Trace Logger."); SetDlgItemText(hTracer, IDC_TRACER_LOG, "Welcome to the Trace Logger.");
} }
logging=0; logging=0;
SetDlgItemText(hTracer, 102,"Start Logging"); SetDlgItemText(hTracer, IDC_BTN_START_STOP_LOGGING,"Start Logging");
} }
@ -425,7 +425,7 @@ void UpdateLogWindow(void){
//todo: fix this up. //todo: fix this up.
//if(!log_update_window && !userpause){ //if(!log_update_window && !userpause){
// SetDlgItemText(hTracer, 100, "Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n"); // SetDlgItemText(hTracer, IDC_TRACER_LOG, "Press F2 to pause the game, or snap \r\nthe debugger to update this window.\r\n");
// return; // return;
//} //}
@ -446,7 +446,7 @@ void UpdateLogWindow(void){
tracesi.nMax = tracelogbufusedsize; //todo: try -2 tracesi.nMax = tracelogbufusedsize; //todo: try -2
tracesi.nPos = tracesi.nMax-tracesi.nPage; tracesi.nPos = tracesi.nMax-tracesi.nPage;
if (tracesi.nPos < tracesi.nMin) tracesi.nPos = tracesi.nMin; if (tracesi.nPos < tracesi.nMin) tracesi.nPos = tracesi.nMin;
SetScrollInfo(GetDlgItem(hTracer,101),SB_CTL,&tracesi,TRUE); SetScrollInfo(GetDlgItem(hTracer,IDC_SCRL_TRACER_LOG),SB_CTL,&tracesi,TRUE);
UpdateLogText(); UpdateLogText();
return; return;
@ -471,65 +471,65 @@ void UpdateLogText(void){
} }
strcat(str,tracelogbuf[j]); strcat(str,tracelogbuf[j]);
} }
SetDlgItemText(hTracer, 100, str); SetDlgItemText(hTracer, IDC_TRACER_LOG, str);
sprintf(str,"nPage = %d, nPos = %d, nMax = %d, nMin = %d",tracesi.nPage,tracesi.nPos,tracesi.nMax,tracesi.nMin); sprintf(str,"nPage = %d, nPos = %d, nMax = %d, nMin = %d",tracesi.nPage,tracesi.nPos,tracesi.nMax,tracesi.nMin);
SetDlgItemText(hTracer, 1002, str); SetDlgItemText(hTracer, IDC_TRACER_STATS, str);
return; return;
} }
void EnableTracerMenuItems(void){ void EnableTracerMenuItems(void){
//if(logging_options & LOG_NEW_INSTRUCTIONS){ //if(logging_options & LOG_NEW_INSTRUCTIONS){
//EnableWindow(GetDlgItem(hTracer,115),TRUE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),TRUE);
//} else { //} else {
// CheckDlgButton(hTracer, 115, BST_UNCHECKED); // CheckDlgButton(hTracer, IDC_CHECK_LOG_NEW_DATA, BST_UNCHECKED);
//EnableWindow(GetDlgItem(hTracer,115),FALSE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
//} //}
if(logging){ if(logging){
EnableWindow(GetDlgItem(hTracer,103),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_LAST),FALSE);
EnableWindow(GetDlgItem(hTracer,104),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_TO_FILE),FALSE);
EnableWindow(GetDlgItem(hTracer,105),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),FALSE);
//EnableWindow(GetDlgItem(hTracer,110),FALSE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_REGISTERS),FALSE);
//EnableWindow(GetDlgItem(hTracer,111),FALSE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_PROCESSOR_STATUS),FALSE);
EnableWindow(GetDlgItem(hTracer,112),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),FALSE);
//EnableWindow(GetDlgItem(hTracer,114),FALSE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),FALSE);
//EnableWindow(GetDlgItem(hTracer,115),FALSE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
return; return;
} }
EnableWindow(GetDlgItem(hTracer,103),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_LAST),TRUE);
EnableWindow(GetDlgItem(hTracer,104),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_TO_FILE),TRUE);
EnableWindow(GetDlgItem(hTracer,105),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),TRUE);
//EnableWindow(GetDlgItem(hTracer,110),TRUE); //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_REGISTERS),TRUE);
//EnableWindow(GetDlgItem(hTracer,111),TRUE); //uncomment me //EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_PROCESSOR_STATUS),TRUE); //uncomment me
EnableWindow(GetDlgItem(hTracer,112),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),TRUE);
EnableWindow(GetDlgItem(hTracer,114),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),TRUE);
if(logtofile){ if(logtofile){
EnableWindow(GetDlgItem(hTracer,105),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),FALSE);
EnableWindow(GetDlgItem(hTracer,112),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),TRUE);
CheckDlgButton(hTracer, 116, BST_UNCHECKED); CheckDlgButton(hTracer, IDC_CHECK_LOG_UPDATE_WINDOW, BST_UNCHECKED);
log_update_window = 0; log_update_window = 0;
EnableWindow(GetDlgItem(hTracer,116),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_UPDATE_WINDOW),FALSE);
} else{ } else{
EnableWindow(GetDlgItem(hTracer,105),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),TRUE);
EnableWindow(GetDlgItem(hTracer,112),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),FALSE);
EnableWindow(GetDlgItem(hTracer,116),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_UPDATE_WINDOW),TRUE);
} }
/* /*
if(FCEUI_GetLoggingCD()){ if(FCEUI_GetLoggingCD()){
EnableWindow(GetDlgItem(hTracer,114),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),TRUE);
if(logging_options & LOG_NEW_INSTRUCTIONS){ if(logging_options & LOG_NEW_INSTRUCTIONS){
EnableWindow(GetDlgItem(hTracer,115),TRUE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),TRUE);
} else EnableWindow(GetDlgItem(hTracer,115),FALSE); } else EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
} }
else{ else{
EnableWindow(GetDlgItem(hTracer,114),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),FALSE);
EnableWindow(GetDlgItem(hTracer,115),FALSE); EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
CheckDlgButton(hTracer, 114, BST_UNCHECKED); CheckDlgButton(hTracer, IDC_CHECK_LOG_NEW_INSTRUCTIONS, BST_UNCHECKED);
CheckDlgButton(hTracer, 115, BST_UNCHECKED); CheckDlgButton(hTracer, IDC_CHECK_LOG_NEW_DATA, BST_UNCHECKED);
logging_options &= 3; logging_options &= 3;
} }
*/ */
@ -546,7 +546,7 @@ int PromptForCDLogger(void){
DoCDLogger(); DoCDLogger();
FCEUI_SetLoggingCD(1); FCEUI_SetLoggingCD(1);
//EnableTracerMenuItems(); //EnableTracerMenuItems();
SetDlgItemText(hCDLogger, 105, "Pause"); SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Pause");
return 1; return 1;
} }
return 0; //user selected no so 0 is returned return 0; //user selected no so 0 is returned

View File

@ -929,81 +929,79 @@ BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
case WM_INITDIALOG: case WM_INITDIALOG:
SetDlgItemText(hwndDlg,65454,"For the custom video mode settings to be in effect, the \"Custom\" video mode needs to be selected. If you select a sync method, and sound is disabled, you may want to disable speed throttling(in the \"Timing\" window). If you use \"wait for vblank\", you should use the \"lazy\" form.\x0AAllowing more than 8 sprites per scanline can cause graphics corruption in some games, including \"Solstice\"."); SetDlgItemText(hwndDlg,65454,"For the custom video mode settings to be in effect, the \"Custom\" video mode needs to be selected. If you select a sync method, and sound is disabled, you may want to disable speed throttling(in the \"Timing\" window). If you use \"wait for vblank\", you should use the \"lazy\" form.\x0AAllowing more than 8 sprites per scanline can cause graphics corruption in some games, including \"Solstice\".");
for(x=0;x<11;x++) for(x=0;x<11;x++)
SendDlgItemMessage(hwndDlg,100,CB_ADDSTRING,0,(LPARAM)(LPSTR)vmstr[x]); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_MODE,CB_ADDSTRING,0,(LPARAM)(LPSTR)vmstr[x]);
SendDlgItemMessage(hwndDlg,100,CB_SETCURSEL,vmod,(LPARAM)(LPSTR)0); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_MODE,CB_SETCURSEL,vmod,(LPARAM)(LPSTR)0);
SendDlgItemMessage(hwndDlg,202,CB_ADDSTRING,0,(LPARAM)(LPSTR)"8"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_BPP,CB_ADDSTRING,0,(LPARAM)(LPSTR)"8");
SendDlgItemMessage(hwndDlg,202,CB_ADDSTRING,0,(LPARAM)(LPSTR)"16"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_BPP,CB_ADDSTRING,0,(LPARAM)(LPSTR)"16");
SendDlgItemMessage(hwndDlg,202,CB_ADDSTRING,0,(LPARAM)(LPSTR)"24"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_BPP,CB_ADDSTRING,0,(LPARAM)(LPSTR)"24");
SendDlgItemMessage(hwndDlg,202,CB_ADDSTRING,0,(LPARAM)(LPSTR)"32"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_BPP,CB_ADDSTRING,0,(LPARAM)(LPSTR)"32");
SendDlgItemMessage(hwndDlg,202,CB_SETCURSEL,(vmodes[0].bpp>>3)-1,(LPARAM)(LPSTR)0); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_BPP,CB_SETCURSEL,(vmodes[0].bpp>>3)-1,(LPARAM)(LPSTR)0);
SetDlgItemInt(hwndDlg,200,vmodes[0].x,0); SetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_XRES,vmodes[0].x,0);
SetDlgItemInt(hwndDlg,201,vmodes[0].y,0); SetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_YRES,vmodes[0].y,0);
SetDlgItemInt(hwndDlg,302,vmodes[0].xscale,0); SetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_XSCALE,vmodes[0].xscale,0);
SetDlgItemInt(hwndDlg,303,vmodes[0].yscale,0); SetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_YSCALE,vmodes[0].yscale,0);
CheckRadioButton(hwndDlg,300,301,(vmodes[0].flags&VMDF_STRFS)?301:300); CheckRadioButton(hwndDlg,IDC_RADIO_SCALE,IDC_RADIO_STRETCH,(vmodes[0].flags&VMDF_STRFS)?IDC_RADIO_STRETCH:IDC_RADIO_SCALE);
{ {
char *str[]={"<none>","hq2x","Scale2x","hq3x","Scale3x"}; char *str[]={"<none>","hq2x","Scale2x","hq3x","Scale3x"};
int x; int x;
for(x=0;x<5;x++) for(x=0;x<5;x++)
{ {
SendDlgItemMessage(hwndDlg,304,CB_ADDSTRING,0,(LPARAM)(LPSTR)str[x]); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SCALER_FS,CB_ADDSTRING,0,(LPARAM)(LPSTR)str[x]);
SendDlgItemMessage(hwndDlg,406,CB_ADDSTRING,0,(LPARAM)(LPSTR)str[x]); SendDlgItemMessage(hwndDlg,406,CB_ADDSTRING,0,(LPARAM)(LPSTR)str[x]);
} }
} }
SendDlgItemMessage(hwndDlg,304,CB_SETCURSEL,vmodes[0].special,(LPARAM)(LPSTR)0); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SCALER_FS,CB_SETCURSEL,vmodes[0].special,(LPARAM)(LPSTR)0);
SendDlgItemMessage(hwndDlg,406,CB_SETCURSEL,winspecial,(LPARAM)(LPSTR)0); SendDlgItemMessage(hwndDlg,406,CB_SETCURSEL,winspecial,(LPARAM)(LPSTR)0);
if(eoptions&EO_FSAFTERLOAD) if(eoptions&EO_FSAFTERLOAD)
CheckDlgButton(hwndDlg,102,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_VIDEOCONFIG_AUTO_FS,BST_CHECKED);
if(eoptions&EO_CLIPSIDES) if(eoptions&EO_CLIPSIDES)
CheckDlgButton(hwndDlg,106,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_VIDEOCONFIG_CLIPSIDES,BST_CHECKED);
if(disvaccel&1) if(disvaccel&1)
CheckDlgButton(hwndDlg,130,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_DISABLE_HW_ACCEL_WIN,BST_CHECKED);
if(disvaccel&2) if(disvaccel&2)
CheckDlgButton(hwndDlg,131,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_DISABLE_HW_ACCEL_FS,BST_CHECKED);
if(eoptions&EO_FORCEISCALE) if(eoptions&EO_FORCEISCALE)
CheckDlgButton(hwndDlg,402,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_FORCE_INT_VIDEO_SCALARS,BST_CHECKED);
if(eoptions&EO_FORCEASPECT) if(eoptions&EO_FORCEASPECT)
CheckDlgButton(hwndDlg,403,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_FORCE_ASPECT_CORRECTION,BST_CHECKED);
SetDlgItemInt(hwndDlg,500,srendlinen,0); SetDlgItemInt(hwndDlg,IDC_SCANLINE_FIRST_NTSC,srendlinen,0);
SetDlgItemInt(hwndDlg,501,erendlinen,0); SetDlgItemInt(hwndDlg,IDC_SCANLINE_LAST_NTSC,erendlinen,0);
SetDlgItemInt(hwndDlg,502,srendlinep,0); SetDlgItemInt(hwndDlg,IDC_SCANLINE_FIRST_PAL,srendlinep,0);
SetDlgItemInt(hwndDlg,503,erendlinep,0); SetDlgItemInt(hwndDlg,IDC_SCANLINE_LAST_PAL,erendlinep,0);
SetDlgItemDouble(hwndDlg, 400, winsizemulx); SetDlgItemDouble(hwndDlg, IDC_WINSIZE_MUL_X, winsizemulx);
SetDlgItemDouble(hwndDlg, 401, winsizemuly); SetDlgItemDouble(hwndDlg, IDC_WINSIZE_MUL_Y, winsizemuly);
SetDlgItemDouble(hwndDlg, 404, saspectw); SetDlgItemDouble(hwndDlg, IDC_VIDEOCONFIG_ASPECT_X, saspectw);
SetDlgItemDouble(hwndDlg, 405, saspecth); SetDlgItemDouble(hwndDlg, IDC_VIDEOCONFIG_ASPECT_Y, saspecth);
//SetDlgI temInt(hwndDlg,103,winsizemul,0); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_WIN,CB_ADDSTRING,0,(LPARAM)(LPSTR)"<none>");
SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_FS,CB_ADDSTRING,0,(LPARAM)(LPSTR)"<none>");
SendDlgItemMessage(hwndDlg,104,CB_ADDSTRING,0,(LPARAM)(LPSTR)"<none>"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_WIN,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Wait for VBlank");
SendDlgItemMessage(hwndDlg,105,CB_ADDSTRING,0,(LPARAM)(LPSTR)"<none>"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_WIN,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Lazy wait for VBlank");
SendDlgItemMessage(hwndDlg,104,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Wait for VBlank"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_FS,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Wait for VBlank");
SendDlgItemMessage(hwndDlg,104,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Lazy wait for VBlank"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_FS,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Lazy wait for VBlank");
SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_FS,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Double Buffering");
SendDlgItemMessage(hwndDlg,105,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Wait for VBlank"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_WIN,CB_SETCURSEL,winsync,(LPARAM)(LPSTR)0);
SendDlgItemMessage(hwndDlg,105,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Lazy wait for VBlank"); SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_FS,CB_SETCURSEL,fssync,(LPARAM)(LPSTR)0);
SendDlgItemMessage(hwndDlg,105,CB_ADDSTRING,0,(LPARAM)(LPSTR)"Double Buffering");
SendDlgItemMessage(hwndDlg,104,CB_SETCURSEL,winsync,(LPARAM)(LPSTR)0);
SendDlgItemMessage(hwndDlg,105,CB_SETCURSEL,fssync,(LPARAM)(LPSTR)0);
if(eoptions&EO_NOSPRLIM) if(eoptions&EO_NOSPRLIM)
CheckDlgButton(hwndDlg,600,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_VIDEOCONFIG_NO8LIM,BST_CHECKED);
break; break;
case WM_CLOSE: case WM_CLOSE:
@ -1012,23 +1010,23 @@ BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
if(!(wParam>>16)) if(!(wParam>>16))
switch(wParam&0xFFFF) switch(wParam&0xFFFF)
{ {
case 1: case BTN_CLOSE:
gornk: gornk:
if(IsDlgButtonChecked(hwndDlg,106)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_VIDEOCONFIG_CLIPSIDES)==BST_CHECKED)
eoptions|=EO_CLIPSIDES; eoptions|=EO_CLIPSIDES;
else else
eoptions&=~EO_CLIPSIDES; eoptions&=~EO_CLIPSIDES;
if(IsDlgButtonChecked(hwndDlg,600)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_VIDEOCONFIG_NO8LIM)==BST_CHECKED)
eoptions|=EO_NOSPRLIM; eoptions|=EO_NOSPRLIM;
else else
eoptions&=~EO_NOSPRLIM; eoptions&=~EO_NOSPRLIM;
srendlinen=GetDlgItemInt(hwndDlg,500,0,0); srendlinen=GetDlgItemInt(hwndDlg,IDC_SCANLINE_FIRST_NTSC,0,0);
erendlinen=GetDlgItemInt(hwndDlg,501,0,0); erendlinen=GetDlgItemInt(hwndDlg,IDC_SCANLINE_LAST_NTSC,0,0);
srendlinep=GetDlgItemInt(hwndDlg,502,0,0); srendlinep=GetDlgItemInt(hwndDlg,IDC_SCANLINE_FIRST_PAL,0,0);
erendlinep=GetDlgItemInt(hwndDlg,503,0,0); erendlinep=GetDlgItemInt(hwndDlg,IDC_SCANLINE_LAST_PAL,0,0);
if(erendlinen>239) erendlinen=239; if(erendlinen>239) erendlinen=239;
@ -1039,53 +1037,53 @@ BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
UpdateRendBounds(); UpdateRendBounds();
if(IsDlgButtonChecked(hwndDlg,301)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_RADIO_STRETCH)==BST_CHECKED)
vmodes[0].flags|=VMDF_STRFS; vmodes[0].flags|=VMDF_STRFS;
else else
vmodes[0].flags&=~VMDF_STRFS; vmodes[0].flags&=~VMDF_STRFS;
vmod=SendDlgItemMessage(hwndDlg,100,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); vmod=SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_MODE,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
vmodes[0].x=GetDlgItemInt(hwndDlg,200,0,0); vmodes[0].x=GetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_XRES,0,0);
vmodes[0].y=GetDlgItemInt(hwndDlg,201,0,0); vmodes[0].y=GetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_YRES,0,0);
vmodes[0].bpp=(SendDlgItemMessage(hwndDlg,202,CB_GETCURSEL,0,(LPARAM)(LPSTR)0)+1)<<3; vmodes[0].bpp=(SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_BPP,CB_GETCURSEL,0,(LPARAM)(LPSTR)0)+1)<<3;
vmodes[0].xscale=GetDlgItemInt(hwndDlg,302,0,0); vmodes[0].xscale=GetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_XSCALE,0,0);
vmodes[0].yscale=GetDlgItemInt(hwndDlg,303,0,0); vmodes[0].yscale=GetDlgItemInt(hwndDlg,IDC_VIDEOCONFIG_YSCALE,0,0);
vmodes[0].special=SendDlgItemMessage(hwndDlg,304,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); vmodes[0].special=SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SCALER_FS,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
winspecial = SendDlgItemMessage(hwndDlg,406,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); winspecial = SendDlgItemMessage(hwndDlg,406,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
disvaccel = 0; disvaccel = 0;
if(IsDlgButtonChecked(hwndDlg,130)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_DISABLE_HW_ACCEL_WIN)==BST_CHECKED)
disvaccel |= 1; disvaccel |= 1;
if(IsDlgButtonChecked(hwndDlg,131)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_DISABLE_HW_ACCEL_FS)==BST_CHECKED)
disvaccel |= 2; disvaccel |= 2;
if(IsDlgButtonChecked(hwndDlg,101)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_VIDEOCONFIG_FS)==BST_CHECKED)
fullscreen=1; fullscreen=1;
else else
fullscreen=0; fullscreen=0;
if(IsDlgButtonChecked(hwndDlg,102)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_VIDEOCONFIG_AUTO_FS)==BST_CHECKED)
eoptions|=EO_FSAFTERLOAD; eoptions|=EO_FSAFTERLOAD;
else else
eoptions&=~EO_FSAFTERLOAD; eoptions&=~EO_FSAFTERLOAD;
eoptions &= ~(EO_FORCEISCALE | EO_FORCEASPECT); eoptions &= ~(EO_FORCEISCALE | EO_FORCEASPECT);
if(IsDlgButtonChecked(hwndDlg,402)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_FORCE_INT_VIDEO_SCALARS)==BST_CHECKED)
eoptions|=EO_FORCEISCALE; eoptions|=EO_FORCEISCALE;
if(IsDlgButtonChecked(hwndDlg,403)==BST_CHECKED) if(IsDlgButtonChecked(hwndDlg,IDC_FORCE_ASPECT_CORRECTION)==BST_CHECKED)
eoptions|=EO_FORCEASPECT; eoptions|=EO_FORCEASPECT;
winsizemulx=GetDlgItemDouble(hwndDlg, 400); winsizemulx=GetDlgItemDouble(hwndDlg, IDC_WINSIZE_MUL_X);
winsizemuly=GetDlgItemDouble(hwndDlg, 401); winsizemuly=GetDlgItemDouble(hwndDlg, IDC_WINSIZE_MUL_Y);
saspectw=GetDlgItemDouble(hwndDlg, 404); saspectw=GetDlgItemDouble(hwndDlg, IDC_VIDEOCONFIG_ASPECT_X);
saspecth=GetDlgItemDouble(hwndDlg, 405); saspecth=GetDlgItemDouble(hwndDlg, IDC_VIDEOCONFIG_ASPECT_Y);
FixWXY(0); FixWXY(0);
winsync=SendDlgItemMessage(hwndDlg,104,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); winsync=SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_WIN,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
fssync=SendDlgItemMessage(hwndDlg,105,CB_GETCURSEL,0,(LPARAM)(LPSTR)0); fssync=SendDlgItemMessage(hwndDlg,IDC_VIDEOCONFIG_SYNC_METHOD_FS,CB_GETCURSEL,0,(LPARAM)(LPSTR)0);
EndDialog(hwndDlg,0); EndDialog(hwndDlg,0);
break; break;
} }

View File

@ -83,11 +83,9 @@ static volatile int nofocus = 0;
// Contains recent file strings // Contains recent file strings
char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };
char *recent_directories[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const unsigned int MENU_FIRST_RECENT_FILE = 600; const unsigned int MENU_FIRST_RECENT_FILE = 600;
const unsigned int MAX_NUMBER_OF_RECENT_FILES = sizeof(recent_files)/sizeof(*recent_files); const unsigned int MAX_NUMBER_OF_RECENT_FILES = sizeof(recent_files)/sizeof(*recent_files);
const unsigned int MAX_NUMBER_OF_RECENT_DIRS = sizeof(recent_directories)/sizeof(*recent_directories);
// Exported variables // Exported variables
HWND pwindow; HWND pwindow;
@ -104,7 +102,7 @@ static int CheckedAutoFirePattern = MENU_AUTOFIRE_PATTERN_1;
static int CheckedAutoFireOffset = MENU_AUTOFIRE_OFFSET_1; static int CheckedAutoFireOffset = MENU_AUTOFIRE_OFFSET_1;
static bool loggingSound = false; static bool loggingSound = false;
static HMENU recentmenu, recentdmenu; static HMENU recentmenu;
static LONG WindowXC=1<<30,WindowYC; static LONG WindowXC=1<<30,WindowYC;
int MainWindow_wndx, MainWindow_wndy; int MainWindow_wndx, MainWindow_wndy;
@ -156,7 +154,6 @@ void updateGameDependentMenus(unsigned int enable)
MENU_STOP_AVI, MENU_STOP_AVI,
MENU_LOG_SOUND, MENU_LOG_SOUND,
MENU_HIDE_MENU, MENU_HIDE_MENU,
40003,
MENU_DEBUGGER, MENU_DEBUGGER,
MENU_PPUVIEWER, MENU_PPUVIEWER,
MENU_NAMETABLEVIEWER, MENU_NAMETABLEVIEWER,
@ -169,13 +166,8 @@ void updateGameDependentMenus(unsigned int enable)
for (unsigned int i = 0; i < sizeof(menu_ids) / sizeof(*menu_ids); i++) for (unsigned int i = 0; i < sizeof(menu_ids) / sizeof(*menu_ids); i++)
{ {
#ifndef FCEUDEF_DEBUGGER
if(simpled[i] == 203)
EnableMenuItem(fceumenu,menu_ids[i],MF_BYCOMMAND | MF_GRAYED);
else
#endif
#ifndef _USE_SHARED_MEMORY_ #ifndef _USE_SHARED_MEMORY_
if(simpled[x] == MENU_BASIC_BOT || simpled[i] == 40003) if(simpled[x] == MENU_BASIC_BOT)
EnableMenuItem(fceumenu,menu_ids[i],MF_BYCOMMAND| MF_GRAYED); EnableMenuItem(fceumenu,menu_ids[i],MF_BYCOMMAND| MF_GRAYED);
else else
#endif #endif
@ -201,9 +193,7 @@ void UpdateCheckedMenuItems()
CheckMenuItem(fceumenu, MENU_PAUSEAFTERPLAYBACK, pauseAfterPlayback ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_PAUSEAFTERPLAYBACK, pauseAfterPlayback ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(fceumenu, MENU_RUN_IN_BACKGROUND, eoptions & EO_BGRUN ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_RUN_IN_BACKGROUND, eoptions & EO_BGRUN ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(fceumenu, 40003, FCEU_BotMode() ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_ALTERNATE_AB, GetAutoFireDesynch() ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(fceumenu, 40025, GetAutoFireDesynch() ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(fceumenu, MENU_BACKGROUND_INPUT, EnableBackgroundInput ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_BACKGROUND_INPUT, EnableBackgroundInput ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(fceumenu, MENU_ENABLE_REWIND, EnableRewind ? MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_ENABLE_REWIND, EnableRewind ? MF_CHECKED : MF_UNCHECKED);
@ -397,16 +387,6 @@ void AddRecentFile(const char *filename)
UpdateRecentArray(filename, recent_files, MAX_NUMBER_OF_RECENT_FILES, recentmenu, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE); UpdateRecentArray(filename, recent_files, MAX_NUMBER_OF_RECENT_FILES, recentmenu, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE);
} }
/**
* Add a directory to the recent directories list.
*
* @param dirname Name of the directory to add.
**/
void AddRecentDirectory(const char *dirname)
{
UpdateRecentArray(dirname, recent_directories, MAX_NUMBER_OF_RECENT_DIRS, recentdmenu, 103, 700);
}
/** /**
* Hides the main menu. * Hides the main menu.
* *
@ -541,9 +521,6 @@ void LoadNewGamey(HWND hParent, const char *initialdir)
strncpy(tmpdir, ofn.lpstrFile, ofn.nFileOffset); strncpy(tmpdir, ofn.lpstrFile, ofn.nFileOffset);
tmpdir[ofn.nFileOffset]=0; tmpdir[ofn.nFileOffset]=0;
// Add the directory to the list of recent directories
AddRecentDirectory(tmpdir);
// Prevent setting the File->Open default // Prevent setting the File->Open default
// directory when a "Recent Directory" is selected. // directory when a "Recent Directory" is selected.
if(!initialdir) if(!initialdir)
@ -711,15 +688,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
if(wParam >= MENU_FIRST_RECENT_FILE && wParam <= MENU_FIRST_RECENT_FILE + MAX_NUMBER_OF_RECENT_FILES - 1) if(wParam >= MENU_FIRST_RECENT_FILE && wParam <= MENU_FIRST_RECENT_FILE + MAX_NUMBER_OF_RECENT_FILES - 1)
{ {
if(recent_files[wParam - MENU_FIRST_RECENT_FILE]) if(recent_files[wParam - MENU_FIRST_RECENT_FILE])
{
ALoad(recent_files[wParam - MENU_FIRST_RECENT_FILE]); ALoad(recent_files[wParam - MENU_FIRST_RECENT_FILE]);
}
}
else if(wParam >= 700 && wParam <= 709) // Recent dirs
{
// TODO: Do menu items 700 - 709 even exist?
if(recent_directories[wParam-700])
LoadNewGamey(hWnd, recent_directories[wParam - 700]);
} }
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
@ -942,11 +911,6 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
ConfigCheats(hWnd); ConfigCheats(hWnd);
break; break;
case 40003:
FCEU_SetBotMode(1^FCEU_BotMode());
UpdateCheckedMenuItems();
break;
case MENU_BASIC_BOT: case MENU_BASIC_BOT:
CreateBasicBot(); CreateBasicBot();
break; break;
@ -1022,12 +986,6 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
break; break;
#ifdef FCEUDEF_DEBUGGER
//case 203:BeginDSeq(hWnd);break; //mbg merge 7/18/06 removed as part of old debugger
#endif
//case 204:ConfigAddCheat(hWnd);break; //mbg merge TODO 7/17/06 - had to remove this
case MENU_MEMORY_WATCH: case MENU_MEMORY_WATCH:
CreateMemWatch(); CreateMemWatch();
break; break;
@ -1353,11 +1311,9 @@ int CreateMainWindow()
fceumenu = LoadMenu(fceu_hInstance,"FCEUMENU"); fceumenu = LoadMenu(fceu_hInstance,"FCEUMENU");
recentmenu = CreateMenu(); recentmenu = CreateMenu();
recentdmenu = CreateMenu();
// Update recent files menu // Update recent files menu
UpdateRMenu(recentmenu, recent_files, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE); UpdateRMenu(recentmenu, recent_files, MENU_RECENT_FILES, MENU_FIRST_RECENT_FILE);
UpdateRMenu(recentdmenu, recent_directories, 103, 700);
updateGameDependentMenus(0); updateGameDependentMenus(0);

View File

@ -13,7 +13,6 @@ struct CreateMovieParameters
}; };
extern char *recent_files[]; extern char *recent_files[];
extern char *recent_directories[10];
extern HWND pwindow; extern HWND pwindow;
void HideFWindow(int h); void HideFWindow(int h);