Merge branch 'master' into binary-view-on-ram-watch
This commit is contained in:
commit
3b8928fd50
|
@ -1,3 +1,6 @@
|
|||
#ifndef CART_H
|
||||
#define CART_H
|
||||
|
||||
typedef struct {
|
||||
// Set by mapper/board code:
|
||||
void (*Power)(void);
|
||||
|
@ -100,3 +103,5 @@ void FCEU_GeniePower(void);
|
|||
bool FCEU_OpenGenie(void);
|
||||
void FCEU_CloseGenie(void);
|
||||
void FCEU_KillGenie(void);
|
||||
|
||||
#endif#endif
|
|
@ -62,6 +62,8 @@ void FCEU_CheatAddRAM(int s, uint32 A, uint8 *p)
|
|||
|
||||
CHEATF_SUBFAST SubCheats[256] = { 0 };
|
||||
uint32 numsubcheats = 0;
|
||||
int globalCheatDisabled = 0;
|
||||
int disableAutoLSCheats = 0;
|
||||
struct CHEATF *cheats = 0, *cheatsl = 0;
|
||||
|
||||
|
||||
|
@ -104,11 +106,10 @@ void RebuildSubCheats(void)
|
|||
SetReadHandler(SubCheats[x].addr, SubCheats[x].addr, SubCheats[x].PrevRead);
|
||||
|
||||
numsubcheats = 0;
|
||||
if (!globalCheatDisabled)
|
||||
while(c)
|
||||
{
|
||||
if(c->type == 1 && c->status)
|
||||
{
|
||||
if(GetReadHandler(c->addr) != SubCheatsRead)
|
||||
if(c->type == 1 && c->status && GetReadHandler(c->addr) != SubCheatsRead)
|
||||
{
|
||||
SubCheats[numsubcheats].PrevRead = GetReadHandler(c->addr);
|
||||
SubCheats[numsubcheats].addr = c->addr;
|
||||
|
@ -117,9 +118,9 @@ void RebuildSubCheats(void)
|
|||
SetReadHandler(c->addr, c->addr, SubCheatsRead);
|
||||
numsubcheats++;
|
||||
}
|
||||
}
|
||||
c = c->next;
|
||||
}
|
||||
|
||||
FrozenAddressCount = numsubcheats; //Update the frozen address list
|
||||
UpdateFrozenList();
|
||||
|
||||
|
@ -243,7 +244,6 @@ void FCEU_LoadGameCheats(FILE *override, int override_existing)
|
|||
char *neo = &tbuf[4+2+2+1+1+1];
|
||||
if(sscanf(tbuf, "%04x%*[:]%02x%*[:]%02x", &addr, &val, &compare) != 3)
|
||||
continue;
|
||||
char namebuf[128];
|
||||
strcpy(namebuf, neo);
|
||||
}
|
||||
else
|
||||
|
@ -277,6 +277,31 @@ void FCEU_LoadGameCheats(FILE *override, int override_existing)
|
|||
fclose(fp);
|
||||
}
|
||||
|
||||
void FCEU_SaveGameCheats(FILE* fp, int release)
|
||||
{
|
||||
struct CHEATF *next = cheats;
|
||||
while (next)
|
||||
{
|
||||
if (next->type)
|
||||
fputc('S', fp);
|
||||
if (next->compare >= 0)
|
||||
fputc('C', fp);
|
||||
|
||||
if (!next->status)
|
||||
fputc(':', fp);
|
||||
|
||||
if (next->compare >= 0)
|
||||
fprintf(fp, "%04x:%02x:%02x:%s\n", next->addr, next->val, next->compare, next->name);
|
||||
else
|
||||
fprintf(fp, "%04x:%02x:%s\n", next->addr, next->val, next->name);
|
||||
|
||||
if (release) free(next->name);
|
||||
struct CHEATF *t = next;
|
||||
next = next->next;
|
||||
if (release) free(t);
|
||||
}
|
||||
}
|
||||
|
||||
void FCEU_FlushGameCheats(FILE *override, int nosave)
|
||||
{
|
||||
if(CheatComp)
|
||||
|
@ -309,7 +334,6 @@ void FCEU_FlushGameCheats(FILE *override, int nosave)
|
|||
|
||||
if(cheats)
|
||||
{
|
||||
struct CHEATF *next=cheats;
|
||||
FILE *fp;
|
||||
|
||||
if(override)
|
||||
|
@ -319,28 +343,7 @@ void FCEU_FlushGameCheats(FILE *override, int nosave)
|
|||
|
||||
if(fp)
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
struct CHEATF *t;
|
||||
if(next->type)
|
||||
fputc('S',fp);
|
||||
if(next->compare>=0)
|
||||
fputc('C',fp);
|
||||
|
||||
if(!next->status)
|
||||
fputc(':',fp);
|
||||
|
||||
if(next->compare>=0)
|
||||
fprintf(fp,"%04x:%02x:%02x:%s\n",next->addr,next->val,next->compare,next->name);
|
||||
else
|
||||
fprintf(fp,"%04x:%02x:%s\n",next->addr,next->val,next->name);
|
||||
|
||||
free(next->name);
|
||||
t=next;
|
||||
next=next->next;
|
||||
free(t);
|
||||
if(!next) break;
|
||||
}
|
||||
FCEU_SaveGameCheats(fp, 1);
|
||||
if(!override)
|
||||
fclose(fp);
|
||||
}
|
||||
|
@ -642,6 +645,14 @@ int FCEUI_ToggleCheat(uint32 which)
|
|||
return(-1);
|
||||
}
|
||||
|
||||
int FCEUI_GlobalToggleCheat(int global_enabled)
|
||||
{
|
||||
int _numsubcheats = numsubcheats;
|
||||
globalCheatDisabled = !global_enabled;
|
||||
RebuildSubCheats();
|
||||
return _numsubcheats != numsubcheats;
|
||||
}
|
||||
|
||||
static int InitCheatComp(void)
|
||||
{
|
||||
uint32 x;
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#ifndef CHEAT_H
|
||||
#define CHEAT_H
|
||||
void FCEU_CheatResetRAM(void);
|
||||
void FCEU_CheatAddRAM(int s, uint32 A, uint8 *p);
|
||||
|
||||
void FCEU_LoadGameCheats(FILE *override, int override_existing = 1);
|
||||
void FCEU_FlushGameCheats(FILE *override, int nosave);
|
||||
void FCEU_SaveGameCheats(FILE *fp, int release = 0);
|
||||
int FCEUI_GlobalToggleCheat(int global_enabled);
|
||||
void FCEU_ApplyPeriodicCheats(void);
|
||||
void FCEU_PowerCheats(void);
|
||||
int FCEU_CalcCheatAffectedBytes(uint32 address, uint32 size);
|
||||
|
@ -12,6 +16,8 @@ int FCEU_CheatGetByte(uint32 A);
|
|||
void FCEU_CheatSetByte(uint32 A, uint8 V);
|
||||
|
||||
extern int savecheats;
|
||||
extern int globalCheatDisabled;
|
||||
extern int disableAutoLSCheats;
|
||||
|
||||
int FCEU_DisableAllCheats();
|
||||
|
||||
|
@ -55,3 +61,4 @@ struct SEARCHPOSSIBLE {
|
|||
for (int i = 0; i < numsubcheats && count < size; ++i) \
|
||||
if (SubCheats[i].addr >= address && SubCheats[i].addr < address + size) \
|
||||
++count
|
||||
#endif
|
|
@ -191,6 +191,7 @@ int FCEUI_DecodeGG(const char *str, int *a, int *v, int *c);
|
|||
int FCEUI_AddCheat(const char *name, uint32 addr, uint8 val, int compare, int type);
|
||||
int FCEUI_DelCheat(uint32 which);
|
||||
int FCEUI_ToggleCheat(uint32 which);
|
||||
int FCEUI_GlobalToggleCheat(int global_enable);
|
||||
|
||||
int32 FCEUI_CheatSearchGetCount(void);
|
||||
void FCEUI_CheatSearchGetRange(uint32 first, uint32 last, int (*callb)(uint32 a, uint8 last, uint8 current));
|
||||
|
|
|
@ -17,5 +17,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_CHEAT_H
|
||||
#define COMMON_CHEAT_H
|
||||
void DoConsoleCheatConfig(void);
|
||||
#endif
|
|
@ -135,7 +135,7 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
FreeCDLog();
|
||||
RenameCDLog("");
|
||||
hCDLogger = 0;
|
||||
EndDialog(hwndDlg, 0);
|
||||
DestroyWindow(hwndDlg);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
|
|
|
@ -29,11 +29,13 @@
|
|||
#include "../../cheat.h" // For FCEU_LoadGameCheats()
|
||||
#include <map>
|
||||
|
||||
static HWND pwindow = 0; //Handle to Cheats dialog
|
||||
HWND hCheat = 0; //mbg merge 7/19/06 had to add
|
||||
// static HWND pwindow = 0; // owomomo: removed pwindow because ambiguous, perhaps it is some obseleted early future plan from half developed old FCEUX?
|
||||
HWND hCheat = 0; //Handle to Cheats dialog
|
||||
HMENU hCheatcontext = 0; //Handle to cheat context menu
|
||||
|
||||
bool pauseWhileActive = false; //For checkbox "Pause while active"
|
||||
extern int globalCheatDisabled;
|
||||
extern int disableAutoLSCheats;
|
||||
extern bool wasPausedByCheats;
|
||||
|
||||
int CheatWindow;
|
||||
|
@ -62,17 +64,18 @@ int lbfocus = 0;
|
|||
int searchdone;
|
||||
static int knownvalue = 0;
|
||||
|
||||
int GGaddr, GGcomp, GGval;
|
||||
char GGcode[10];
|
||||
// int GGaddr, GGcomp, GGval;
|
||||
// char GGcode[10];
|
||||
int GGlist[GGLISTSIZE];
|
||||
static int dontupdateGG; //this eliminates recursive crashing
|
||||
char* GameGenieLetters = "APZLGITYEOXUKSVN";
|
||||
|
||||
// bool dodecode;
|
||||
|
||||
HWND hGGConv;
|
||||
|
||||
void EncodeGG(char *str, int a, int v, int c);
|
||||
void ListGGAddresses();
|
||||
void ListGGAddresses(HWND hwndDlg);
|
||||
|
||||
uint16 StrToU16(char *s)
|
||||
{
|
||||
|
@ -292,18 +295,28 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
if (ChtPosX == -32000) ChtPosX = 0; //Just in case
|
||||
if (ChtPosY == -32000) ChtPosY = 0;
|
||||
SetWindowPos(hwndDlg, 0, ChtPosX, ChtPosY, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
POINT pt;
|
||||
if (ChtPosX != 0 && ChtPosY != 0)
|
||||
{
|
||||
pt.x = ChtPosX;
|
||||
pt.y = ChtPosY;
|
||||
pt = CalcSubWindowPos(hwndDlg, &pt);
|
||||
}
|
||||
else
|
||||
pt = CalcSubWindowPos(hwndDlg, NULL);
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_CHEAT_PAUSEWHENACTIVE, pauseWhileActive ? MF_CHECKED : MF_UNCHECKED);
|
||||
ChtPosX = pt.x;
|
||||
ChtPosY = pt.y;
|
||||
|
||||
|
||||
// SetWindowPos(hwndDlg, 0, ChtPosX, ChtPosY, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_CHEAT_PAUSEWHENACTIVE, pauseWhileActive ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_CHEAT_GLOBAL_SWITCH, globalCheatDisabled ? BST_UNCHECKED : BST_CHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_CHEAT_AUTOLOADSAVE, disableAutoLSCheats == 2 ? BST_UNCHECKED : disableAutoLSCheats == 1 ? BST_INDETERMINATE : BST_CHECKED);
|
||||
|
||||
//setup font
|
||||
hFont = (HFONT)SendMessage(hwndDlg, WM_GETFONT, 0, 0);
|
||||
LOGFONT lf;
|
||||
GetObject(hFont, sizeof(LOGFONT), &lf);
|
||||
strcpy(lf.lfFaceName, "Courier New");
|
||||
hNewFont = CreateFontIndirect(&lf);
|
||||
SetupCheatFont(hwndDlg);
|
||||
|
||||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_ADDR, WM_SETFONT, (WPARAM)hNewFont, FALSE);
|
||||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_VAL, WM_SETFONT, (WPARAM)hNewFont, FALSE);
|
||||
|
@ -325,6 +338,21 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_VAL_GT_BY, EM_SETLIMITTEXT, 2, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_VAL_LT_BY, EM_SETLIMITTEXT, 2, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_TEXT, EM_SETLIMITTEXT, 10, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT, EM_SETLIMITTEXT, 8, 0);
|
||||
|
||||
// limit their characters
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_COM), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_KNOWN), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_NE_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_GT_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_LT_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_TEXT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
|
||||
|
||||
|
||||
possiTotalCount = 0;
|
||||
possiItemCount = SendDlgItemMessage(hwndDlg, IDC_CHEAT_LIST_POSSIBILITIES, LVM_GETCOUNTPERPAGE, 0, 0);
|
||||
|
@ -338,7 +366,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
|
||||
//misc setup
|
||||
searchdone = 0;
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL_KNOWN, (LPTSTR)U8ToStr(knownvalue));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL_KNOWN, (LPCSTR)U8ToStr(knownvalue));
|
||||
|
||||
// Enable Context Sub-Menus
|
||||
hCheatcontext = LoadMenu(fceu_hInstance, "CHEATCONTEXTMENUS");
|
||||
|
@ -356,7 +384,6 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
wasPausedByCheats = true;
|
||||
FCEU_printf("Emulation paused: %d\n", EmulationPaused);
|
||||
}
|
||||
|
||||
}
|
||||
if (CheatStyle && possiTotalCount) {
|
||||
if ((!wParam) && searchdone) {
|
||||
|
@ -366,6 +393,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
ShowResults(hwndDlg);
|
||||
}
|
||||
break;
|
||||
case WM_QUIT:
|
||||
case WM_CLOSE:
|
||||
if (CheatStyle)
|
||||
DestroyWindow(hwndDlg);
|
||||
|
@ -375,8 +403,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
case WM_DESTROY:
|
||||
CheatWindow = 0;
|
||||
hCheat = NULL;
|
||||
DeleteObject(hFont);
|
||||
DeleteObject(hNewFont);
|
||||
DeleteCheatFont();
|
||||
if (searchdone)
|
||||
FCEUI_CheatSearchSetCurrentAsOriginal();
|
||||
possiList.clear();
|
||||
|
@ -620,12 +647,12 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
RedoCheatsCallB(name, a, v, c, s, 1, &selcheat);
|
||||
SendDlgItemMessage(hwndDlg, IDC_LIST_CHEATS, LVM_SETSELECTIONMARK, 0, selcheat);
|
||||
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPTSTR)U16ToStr(a));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPTSTR)U8ToStr(v));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPCSTR)U16ToStr(a));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPCSTR)U8ToStr(v));
|
||||
if (c == -1)
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)"");
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPCSTR)"");
|
||||
else
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)U8ToStr(c));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPCSTR)U8ToStr(c));
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
// UpdateCheatAdded();
|
||||
|
@ -633,25 +660,10 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
}
|
||||
case IDC_BTN_CHEAT_ADDFROMFILE:
|
||||
{
|
||||
OPENFILENAME ofn;
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hwndDlg;
|
||||
ofn.hInstance = fceu_hInstance;
|
||||
ofn.lpstrTitle = "Open Cheats file";
|
||||
const char filter[] = "Cheat files (*.cht)\0*.cht\0All Files (*.*)\0*.*\0\0";
|
||||
ofn.lpstrFilter = filter;
|
||||
|
||||
char nameo[2048] = { 0 };
|
||||
ofn.lpstrFile = nameo;
|
||||
ofn.nMaxFile = 2048;
|
||||
ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST;
|
||||
std::string initdir = FCEU_GetPath(FCEUMKF_CHEAT);
|
||||
ofn.lpstrInitialDir = initdir.c_str();
|
||||
|
||||
if (GetOpenFileName(&ofn))
|
||||
char filename[2048];
|
||||
if (ShowCheatFileBox(hwndDlg, filename, false))
|
||||
{
|
||||
FILE* file = FCEUD_UTF8fopen(nameo, "rb");
|
||||
FILE* file = FCEUD_UTF8fopen(filename, "rb");
|
||||
if (file)
|
||||
{
|
||||
FCEU_LoadGameCheats(file, 0);
|
||||
|
@ -662,6 +674,9 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
}
|
||||
}
|
||||
break;
|
||||
case IDC_BTN_CHEAT_EXPORTTOFILE:
|
||||
SaveCheatAs(hwndDlg);
|
||||
break;
|
||||
case IDC_BTN_CHEAT_RESET:
|
||||
FCEUI_CheatSearchBegin();
|
||||
ShowResults(hwndDlg);
|
||||
|
@ -718,6 +733,27 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
ShowResults(hwndDlg);
|
||||
}
|
||||
break;
|
||||
case IDC_CHEAT_GLOBAL_SWITCH:
|
||||
if (FCEUI_GlobalToggleCheat(IsDlgButtonChecked(hwndDlg, IDC_CHEAT_GLOBAL_SWITCH)))
|
||||
{
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
break;
|
||||
case IDC_CHEAT_AUTOLOADSAVE:
|
||||
switch (IsDlgButtonChecked(hwndDlg, IDC_CHEAT_AUTOLOADSAVE))
|
||||
{
|
||||
case BST_CHECKED: disableAutoLSCheats = 0; break;
|
||||
case BST_INDETERMINATE: disableAutoLSCheats = 1; break;
|
||||
case BST_UNCHECKED:
|
||||
if(MessageBox(hwndDlg, "If this option is unchecked, you must manually save the cheats by yourself, or all the changed you made to the cheat list would be discarded silently without any asking once you close the game!\nDo you really want to do it in this way?", "Cheat warning", MB_YESNO | MB_ICONWARNING) == IDYES)
|
||||
disableAutoLSCheats = 2;
|
||||
else
|
||||
{
|
||||
disableAutoLSCheats = 0;
|
||||
CheckDlgButton(hwndDlg, IDC_CHEAT_AUTOLOADSAVE, BST_CHECKED);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EN_SETFOCUS:
|
||||
|
@ -727,6 +763,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
case IDC_CHEAT_VAL:
|
||||
case IDC_CHEAT_COM: editMode = 0; break;
|
||||
case IDC_CHEAT_TEXT: editMode = 1; break;
|
||||
case IDC_CHEAT_GAME_GENIE_TEXT: editMode = 2; break;
|
||||
}
|
||||
break;
|
||||
case EN_UPDATE:
|
||||
|
@ -740,8 +777,13 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
{
|
||||
char buf[16]; uint32 a; uint8 v; int c;
|
||||
GetUICheatInfo(hwndDlg, NULL, &a, &v, &c);
|
||||
GetCheatStr(buf, a, v, c);
|
||||
buf[0] = 0;
|
||||
GetCheatCodeStr(buf, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_TEXT, buf);
|
||||
buf[0] = 0;
|
||||
if (a > 0x7FFF && v != -1)
|
||||
EncodeGG(buf, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT, buf);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -751,7 +793,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
{
|
||||
char buf[16];
|
||||
GetDlgItemText(hwndDlg, IDC_CHEAT_TEXT, buf, 16);
|
||||
int a = -1, v = -1; int c = -1;
|
||||
int a = -1, v = -1, c = -1;
|
||||
if (strchr(buf, ':'))
|
||||
{
|
||||
if (strchr(buf, '?'))
|
||||
|
@ -759,12 +801,35 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
else
|
||||
sscanf(buf, "%X:%X", &a, &v);
|
||||
}
|
||||
else if (strlen(buf) == 6 || strlen(buf) == 8)
|
||||
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPCSTR)(a == -1 ? "" : U16ToStr(a)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPCSTR)(v == -1 ? "" : U8ToStr(v)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPCSTR)(c == -1 ? "" : U8ToStr(c)));
|
||||
buf[0] = 0;
|
||||
if (a > 0x7FFF && v != -1)
|
||||
EncodeGG(buf, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT, buf);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case IDC_CHEAT_GAME_GENIE_TEXT:
|
||||
{
|
||||
if (editMode == 2)
|
||||
{
|
||||
char buf[16];
|
||||
GetDlgItemText(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT, buf, 16);
|
||||
int a = -1, v = -1, c = -1;
|
||||
if (strlen(buf) == 6 || strlen(buf) == 8)
|
||||
FCEUI_DecodeGG(buf, &a, &v, &c);
|
||||
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPTSTR)(a == -1 ? "" : U16ToStr(a)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPTSTR)(v == -1 ? "" : U8ToStr(v)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)(c == -1 ? "" : U8ToStr(c)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPCSTR)(a == -1 ? "" : U16ToStr(a)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPCSTR)(v == -1 ? "" : U8ToStr(v)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPCSTR)(c == -1 ? "" : U8ToStr(c)));
|
||||
|
||||
buf[0] = 0;
|
||||
if (a != -1 && v != -1)
|
||||
GetCheatCodeStr(buf, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_TEXT, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -793,15 +858,20 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
{
|
||||
char* name = ""; uint32 a; uint8 v; int s; int c;
|
||||
FCEUI_GetCheat(selcheat, &name, &a, &v, &c, &s, NULL);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_NAME, (LPTSTR)name);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPTSTR)U16ToStr(a));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPTSTR)U8ToStr(v));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)(c == -1 ? "" : U8ToStr(c)));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_NAME, (LPCSTR)name);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPCSTR)U16ToStr(a));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPCSTR)U8ToStr(v));
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPCSTR)(c == -1 ? "" : U8ToStr(c)));
|
||||
|
||||
char code[32];
|
||||
GetCheatStr(code, a, v, c);
|
||||
|
||||
code[0] = 0;
|
||||
GetCheatCodeStr(code, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_TEXT, code);
|
||||
code[0] = 0;
|
||||
if (a > 0x7FFF && v != -1)
|
||||
EncodeGG(code, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT, code);
|
||||
|
||||
}
|
||||
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_CHEAT_DEL), selcheatcount > 0);
|
||||
|
@ -819,7 +889,6 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
if (!s)
|
||||
{
|
||||
FCEUI_SetCheat(tmpsel, name, -1, -1, -2, s ^= 1, 1);
|
||||
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
|
@ -858,10 +927,10 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
SEARCHPOSSIBLE& possible = possiList[pNMListView->iItem];
|
||||
char str[16];
|
||||
sprintf(str, "%04X", possible.addr);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPCTSTR)str);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_ADDR, (LPCSTR)str);
|
||||
sprintf(str, "%02X", possible.current);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPCTSTR)str);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)"");
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_VAL, (LPCSTR)str);
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPCSTR)"");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -922,7 +991,7 @@ void ConfigCheats(HWND hParent)
|
|||
selcheat = -1;
|
||||
CheatWindow = 1;
|
||||
if (CheatStyle)
|
||||
pwindow = hCheat = CreateDialog(fceu_hInstance, "CHEATCONSOLE", hParent, CheatConsoleCallB);
|
||||
hCheat = CreateDialog(fceu_hInstance, "CHEATCONSOLE", hParent, CheatConsoleCallB);
|
||||
else
|
||||
DialogBox(fceu_hInstance, "CHEATCONSOLE", hParent, CheatConsoleCallB);
|
||||
UpdateCheatsAdded();
|
||||
|
@ -936,10 +1005,10 @@ void ConfigCheats(HWND hParent)
|
|||
|
||||
void UpdateCheatList()
|
||||
{
|
||||
if (!pwindow)
|
||||
if (!hCheat)
|
||||
return;
|
||||
else
|
||||
ShowResults(pwindow);
|
||||
ShowResults(hCheat);
|
||||
}
|
||||
|
||||
void UpdateCheatListGroupBoxUI()
|
||||
|
@ -963,8 +1032,9 @@ void UpdateCheatListGroupBoxUI()
|
|||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADD), FALSE);
|
||||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADDFROMFILE), FALSE);
|
||||
}
|
||||
|
||||
SetDlgItemText(hCheat, IDC_GROUPBOX_CHEATLIST, temp);
|
||||
|
||||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_EXPORTTOFILE), cheats != 0);
|
||||
}
|
||||
|
||||
//Used by cheats and external dialogs such as hex editor to update items in the cheat search dialog
|
||||
|
@ -976,8 +1046,8 @@ void UpdateCheatsAdded()
|
|||
|
||||
BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char str[100];
|
||||
int i;
|
||||
// int i;
|
||||
extern void GetUIGGInfo(HWND hwndDlg, uint32* a, uint8* v, int* c);
|
||||
|
||||
switch(uMsg) {
|
||||
case WM_MOVE: {
|
||||
|
@ -994,67 +1064,85 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
};
|
||||
case WM_INITDIALOG:
|
||||
//todo: set text limits
|
||||
if (GGConv_wndx == -32000)
|
||||
GGConv_wndx = 0; //Just in case
|
||||
if (GGConv_wndy == -32000)
|
||||
GGConv_wndy = 0;
|
||||
SetWindowPos(hwndDlg, 0, GGConv_wndx, GGConv_wndy, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
{
|
||||
POINT pt;
|
||||
if (GGConv_wndx != 0 && GGConv_wndy != 0)
|
||||
{
|
||||
pt.x = GGConv_wndx;
|
||||
pt.y = GGConv_wndy;
|
||||
pt = CalcSubWindowPos(hwndDlg, &pt);
|
||||
}
|
||||
else
|
||||
pt = CalcSubWindowPos(hwndDlg, NULL);
|
||||
|
||||
GGConv_wndx = pt.x;
|
||||
GGConv_wndy = pt.y;
|
||||
|
||||
// text limits;
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_CODE, EM_SETLIMITTEXT, 8, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_ADDR, EM_SETLIMITTEXT, 4, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_COMP, EM_SETLIMITTEXT, 2, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_VAL, EM_SETLIMITTEXT, 2, 0);
|
||||
|
||||
// setup font
|
||||
SetupCheatFont(hwndDlg);
|
||||
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_ADDR, WM_SETFONT, (WPARAM)hNewFont, FALSE);
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_COMP, WM_SETFONT, (WPARAM)hNewFont, FALSE);
|
||||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_VAL, WM_SETFONT, (WPARAM)hNewFont, FALSE);
|
||||
|
||||
// limit their characters
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_CODE), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_COMP), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_VAL), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
}
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
case WM_QUIT:
|
||||
DestroyWindow(hGGConv);
|
||||
hGGConv = 0;
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
hGGConv = NULL;
|
||||
DeleteCheatFont();
|
||||
case WM_COMMAND:
|
||||
switch(HIWORD(wParam)) {
|
||||
case EN_UPDATE:
|
||||
if(dontupdateGG)break;
|
||||
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 IDC_GAME_GENIE_CODE: //The Game Genie Code - in this case decode it.
|
||||
GetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode,9);
|
||||
if((strlen(GGcode) != 8) && (strlen(GGcode) != 6))break;
|
||||
{
|
||||
char buf[9];
|
||||
GetDlgItemText(hGGConv, IDC_GAME_GENIE_CODE, buf, 9);
|
||||
|
||||
FCEUI_DecodeGG(GGcode, &GGaddr, &GGval, &GGcomp);
|
||||
int a = -1, v = -1, c = -1;
|
||||
if (strlen(buf) == 6 || strlen(buf) == 8)
|
||||
FCEUI_DecodeGG(buf, &a, &v, &c);
|
||||
|
||||
sprintf(str,"%04X",GGaddr);
|
||||
SetDlgItemText(hGGConv,IDC_GAME_GENIE_ADDR,str);
|
||||
|
||||
if(GGcomp != -1)
|
||||
sprintf(str,"%02X",GGcomp);
|
||||
else str[0] = 0;
|
||||
SetDlgItemText(hGGConv,IDC_GAME_GENIE_COMP,str);
|
||||
|
||||
sprintf(str,"%02X",GGval);
|
||||
SetDlgItemText(hGGConv,IDC_GAME_GENIE_VAL,str);
|
||||
//ListGGAddresses();
|
||||
SetDlgItemText(hwndDlg, IDC_GAME_GENIE_ADDR, a == -1 ? "" : U16ToStr(a));
|
||||
SetDlgItemText(hwndDlg, IDC_GAME_GENIE_COMP, c == -1 ? "" : U8ToStr(c));
|
||||
SetDlgItemText(hwndDlg, IDC_GAME_GENIE_VAL, v == -1 ? "" : U8ToStr(v));
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_GAME_GENIE_ADDR:
|
||||
case IDC_GAME_GENIE_COMP:
|
||||
case IDC_GAME_GENIE_VAL:
|
||||
|
||||
GetDlgItemText(hGGConv,IDC_GAME_GENIE_ADDR,str,5);
|
||||
if(strlen(str) != 4) break;
|
||||
uint32 a = -1; uint8 v = -1; int c = -1;
|
||||
GetUIGGInfo(hwndDlg, &a, &v, &c);
|
||||
|
||||
GetDlgItemText(hGGConv,IDC_GAME_GENIE_VAL,str,5);
|
||||
if(strlen(str) != 2) {GGval = -1; break;}
|
||||
|
||||
GGaddr = GetEditHex(hGGConv,IDC_GAME_GENIE_ADDR);
|
||||
GGval = GetEditHex(hGGConv,IDC_GAME_GENIE_VAL);
|
||||
|
||||
GetDlgItemText(hGGConv,IDC_GAME_GENIE_COMP,str,5);
|
||||
if(strlen(str) != 2) GGcomp = -1;
|
||||
else GGcomp = GetEditHex(hGGConv,IDC_GAME_GENIE_COMP);
|
||||
|
||||
EncodeGG(GGcode, GGaddr, GGval, GGcomp);
|
||||
SetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode);
|
||||
char buf[9] = { 0 };
|
||||
if (a > 0x7FFF && v != -1)
|
||||
EncodeGG(buf, a, v, c);
|
||||
SetDlgItemText(hwndDlg, IDC_GAME_GENIE_CODE, buf);
|
||||
//ListGGAddresses();
|
||||
break;
|
||||
}
|
||||
ListGGAddresses();
|
||||
ListGGAddresses(hwndDlg);
|
||||
dontupdateGG = 0;
|
||||
break;
|
||||
case BN_CLICKED:
|
||||
|
@ -1062,20 +1150,22 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case IDC_BTN_ADD_TO_CHEATS:
|
||||
//ConfigCheats(fceu_hInstance);
|
||||
|
||||
if(GGaddr < 0x8000)GGaddr += 0x8000;
|
||||
char buf[9];
|
||||
uint32 a = -1; uint8 v = -1; int c = -1;
|
||||
GetUIGGInfo(hwndDlg, &a, &v, &c);
|
||||
GetDlgItemText(hwndDlg, IDC_GAME_GENIE_CODE, buf, 9);
|
||||
|
||||
if (FCEUI_AddCheat(GGcode, GGaddr, GGval, GGcomp, 1) && hCheat) {
|
||||
RedoCheatsCallB(GGcode, GGaddr, GGval, GGcomp, 1, 1, NULL);
|
||||
if(a < 0x8000) a += 0x8000;
|
||||
|
||||
if (FCEUI_AddCheat(buf, a, v, c, 1) && hCheat) {
|
||||
RedoCheatsCallB(buf, a, v, c, 1, 1, NULL);
|
||||
int newselcheat = SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_GETITEMCOUNT, 0, 0) - 1;
|
||||
ListView_MoveSelectionMark(GetDlgItem(hCheat, IDC_LIST_CHEATS), selcheat, newselcheat);
|
||||
selcheat = newselcheat;
|
||||
|
||||
SetDlgItemText(hCheat, IDC_CHEAT_ADDR, (LPTSTR)U16ToStr(GGaddr));
|
||||
SetDlgItemText(hCheat, IDC_CHEAT_VAL, (LPTSTR)U8ToStr(GGval));
|
||||
if(GGcomp == -1)
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)"");
|
||||
else
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)U8ToStr(GGcomp));
|
||||
SetDlgItemText(hCheat, IDC_CHEAT_ADDR, (LPCSTR)U16ToStr(a));
|
||||
SetDlgItemText(hCheat, IDC_CHEAT_VAL, (LPCSTR)U8ToStr(v));
|
||||
SetDlgItemText(hCheat, IDC_CHEAT_COM, (LPCSTR)(c == -1 ? "" : U8ToStr(c)));
|
||||
|
||||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_DEL), TRUE);
|
||||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_UPD), TRUE);
|
||||
|
@ -1088,27 +1178,22 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case LBN_DBLCLK:
|
||||
switch (LOWORD(wParam)) {
|
||||
case IDC_LIST_GGADDRESSES:
|
||||
i = SendDlgItemMessage(hwndDlg,IDC_LIST_GGADDRESSES,LB_GETCURSEL,0,0);
|
||||
ChangeMemViewFocus(3,GGlist[i],-1);
|
||||
ChangeMemViewFocus(3,GGlist[SendDlgItemMessage(hwndDlg, IDC_LIST_GGADDRESSES, LB_GETCURSEL, 0, 0)],-1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WM_MOUSEMOVE:
|
||||
break;
|
||||
case WM_HSCROLL:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//The code in this function is a modified version
|
||||
//of Chris Covell's work - I'd just like to point that out
|
||||
void EncodeGG(char *str, int a, int v, int c)
|
||||
{
|
||||
uint8 num[8];
|
||||
static char lets[16]={'A','P','Z','L','G','I','T','Y','E','O','X','U','K','S','V','N'};
|
||||
int i;
|
||||
|
||||
a&=0x7fff;
|
||||
|
@ -1122,38 +1207,41 @@ void EncodeGG(char *str, int a, int v, int c)
|
|||
|
||||
if (c == -1){
|
||||
num[5]+=v&8;
|
||||
for(i = 0;i < 6;i++)str[i] = lets[num[i]];
|
||||
for(i = 0;i < 6;i++)str[i] = GameGenieLetters[num[i]];
|
||||
str[6] = 0;
|
||||
} else {
|
||||
num[2]+=8;
|
||||
num[5]+=c&8;
|
||||
num[6]=(c&7)+((c>>4)&8);
|
||||
num[7]=((c>>4)&7)+(v&8);
|
||||
for(i = 0;i < 8;i++)str[i] = lets[num[i]];
|
||||
for(i = 0;i < 8;i++)str[i] = GameGenieLetters[num[i]];
|
||||
str[8] = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void ListGGAddresses()
|
||||
void ListGGAddresses(HWND hwndDlg)
|
||||
{
|
||||
uint32 i, j = 0; //mbg merge 7/18/06 changed from int
|
||||
char str[20];
|
||||
SendDlgItemMessage(hGGConv,IDC_LIST_GGADDRESSES,LB_RESETCONTENT,0,0);
|
||||
char str[20], code[9];
|
||||
SendDlgItemMessage(hwndDlg, IDC_LIST_GGADDRESSES, LB_RESETCONTENT,0,0);
|
||||
|
||||
uint32 a = -1; uint8 v = -1; int c = -1;
|
||||
extern void GetUIGGInfo(HWND hwnd, uint32* a, uint8* v, int* c);
|
||||
GetUIGGInfo(hwndDlg, &a, &v, &c);
|
||||
|
||||
// also enable/disable the add GG button here
|
||||
GetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode,9);
|
||||
GetDlgItemText(hwndDlg, IDC_GAME_GENIE_CODE, code, 9);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_ADD_TO_CHEATS), a >= 0 && (strlen(code) == 6 || strlen(code) == 8));
|
||||
|
||||
if((GGaddr < 0) || ((strlen(GGcode) != 8) && (strlen(GGcode) != 6)))EnableWindow(GetDlgItem(hGGConv,IDC_BTN_ADD_TO_CHEATS),FALSE);
|
||||
else EnableWindow(GetDlgItem(hGGConv,IDC_BTN_ADD_TO_CHEATS),TRUE);
|
||||
|
||||
for(i = 0;i < PRGsize[0];i+=0x2000){
|
||||
if((PRGptr[0][i+(GGaddr&0x1FFF)] == GGcomp) || (GGcomp == -1)){
|
||||
GGlist[j] = i+(GGaddr&0x1FFF)+0x10;
|
||||
if(++j > GGLISTSIZE)return;
|
||||
sprintf(str,"%06X",i+(GGaddr&0x1FFF)+0x10);
|
||||
SendDlgItemMessage(hGGConv,IDC_LIST_GGADDRESSES,LB_ADDSTRING,0,(LPARAM)(LPSTR)str);
|
||||
}
|
||||
if (a != -1 && v != -1)
|
||||
for(i = 0; i < PRGsize[0]; i += 0x2000)
|
||||
if(c == -1 || PRGptr[0][i + (a & 0x1FFF)] == c){
|
||||
GGlist[j] = i + (a & 0x1FFF) + 0x10;
|
||||
if(++j > GGLISTSIZE)
|
||||
return;
|
||||
sprintf(str, "%06X", i + (a & 0x1FFF) + 0x10);
|
||||
SendDlgItemMessage(hwndDlg, IDC_LIST_GGADDRESSES, LB_ADDSTRING, 0, (LPARAM)str);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1163,9 +1251,10 @@ void ListGGAddresses()
|
|||
void SetGGConvFocus(int address, int compare)
|
||||
{
|
||||
char str[10];
|
||||
if(!hGGConv)DoGGConv();
|
||||
GGaddr = address;
|
||||
GGcomp = compare;
|
||||
if(!hGGConv)
|
||||
DoGGConv();
|
||||
// GGaddr = address;
|
||||
// GGcomp = compare;
|
||||
|
||||
dontupdateGG = 1; //little hack to fix a nasty bug
|
||||
|
||||
|
@ -1174,14 +1263,19 @@ void SetGGConvFocus(int address,int compare)
|
|||
|
||||
dontupdateGG = 0;
|
||||
|
||||
sprintf(str,"%02X",GGcomp);
|
||||
sprintf(str, "%02X", compare);
|
||||
SetDlgItemText(hGGConv, IDC_GAME_GENIE_COMP, str);
|
||||
|
||||
GetDlgItemText(hGGConv, IDC_GAME_GENIE_VAL, str, 3);
|
||||
uint8 val = StrToU8(str);
|
||||
|
||||
if(GGval < 0)SetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,"");
|
||||
if(val < 0)
|
||||
SetDlgItemText(hGGConv, IDC_GAME_GENIE_CODE, "");
|
||||
else {
|
||||
EncodeGG(GGcode, GGaddr, GGval, GGcomp);
|
||||
SetDlgItemText(hGGConv,IDC_GAME_GENIE_CODE,GGcode);
|
||||
str[0] = 0;
|
||||
if (val > 0x7FFF)
|
||||
EncodeGG(str, address, val, compare);
|
||||
SetDlgItemText(hGGConv, IDC_GAME_GENIE_CODE, str);
|
||||
}
|
||||
|
||||
SetFocus(GetDlgItem(hGGConv, IDC_GAME_GENIE_VAL));
|
||||
|
@ -1196,23 +1290,24 @@ void DoGGConv()
|
|||
ShowWindow(hGGConv, SW_SHOWNORMAL);
|
||||
SetForegroundWindow(hGGConv);
|
||||
} else
|
||||
{
|
||||
hGGConv = CreateDialog(fceu_hInstance,"GGCONV",NULL,GGConvCallB);
|
||||
}
|
||||
return;
|
||||
hGGConv = CreateDialog(fceu_hInstance,"GGCONV", hAppWnd, GGConvCallB);
|
||||
}
|
||||
|
||||
inline void GetCheatStr(char* buf, int a, int v, int c)
|
||||
{
|
||||
if (a >= 0x8000)
|
||||
if (a > 0x7FFF)
|
||||
EncodeGG(buf, a, v, c);
|
||||
else {
|
||||
if (c == -1)
|
||||
sprintf(buf, "%04X:%02X", (int)a, (int)v);
|
||||
else
|
||||
sprintf(buf, "%04X?%02X:%02X", (int)a, (int)c, (int)v);
|
||||
GetCheatCodeStr(buf, a, v, c);
|
||||
}
|
||||
}
|
||||
|
||||
inline void GetCheatCodeStr(char* buf, int a, int v, int c)
|
||||
{
|
||||
if (c == -1)
|
||||
sprintf(buf, "%04X:%02X", a, v);
|
||||
else
|
||||
sprintf(buf, "%04X?%02X:%02X", a, c, v);
|
||||
}
|
||||
|
||||
void GetUICheatInfo(HWND hwndDlg, char* name, uint32* a, uint8* v, int* c)
|
||||
|
@ -1228,6 +1323,17 @@ void GetUICheatInfo(HWND hwndDlg, char* name, uint32* a, uint8* v, int* c)
|
|||
GetDlgItemText(hwndDlg, IDC_CHEAT_NAME, name, 256);
|
||||
}
|
||||
|
||||
void GetUIGGInfo(HWND hwndDlg, uint32* a, uint8* v, int* c)
|
||||
{
|
||||
char buf[16];
|
||||
GetDlgItemText(hwndDlg, IDC_GAME_GENIE_ADDR, buf, 5);
|
||||
*a = StrToU16(buf);
|
||||
GetDlgItemText(hwndDlg, IDC_GAME_GENIE_VAL, buf, 3);
|
||||
*v = StrToU8(buf);
|
||||
GetDlgItemText(hwndDlg, IDC_GAME_GENIE_COMP, buf, 3);
|
||||
*c = (buf[0] == 0 ? -1 : StrToU8(buf));
|
||||
}
|
||||
|
||||
void DisableAllCheats()
|
||||
{
|
||||
if(FCEU_DisableAllCheats() && hCheat){
|
||||
|
@ -1270,3 +1376,111 @@ void UpdateCheatRelatedWindow()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
bool ShowCheatFileBox(HWND hwnd, char* buf, bool save)
|
||||
{
|
||||
if (!buf)
|
||||
return false;
|
||||
|
||||
char filename[2048] = { 0 };
|
||||
|
||||
OPENFILENAME ofn;
|
||||
memset(&ofn, 0, sizeof(OPENFILENAME));
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
ofn.hInstance = fceu_hInstance;
|
||||
ofn.hwndOwner = hwnd;
|
||||
ofn.lpstrTitle = save ? "Save cheats file" : "Open cheats file";
|
||||
ofn.lpstrFilter = "Cheat files (*.cht)\0*.cht\0All Files (*.*)\0*.*\0\0";
|
||||
|
||||
// I gave up setting the default filename for import cheat dialog, since the filename display contains a bug.
|
||||
if (save)
|
||||
{
|
||||
if (GameInfo)
|
||||
{
|
||||
char* _filename;
|
||||
if ((_filename = strrchr(GameInfo->filename, '\\')) || (_filename = strrchr(GameInfo->filename, '/')))
|
||||
strcpy(filename, _filename + 1);
|
||||
else
|
||||
strcpy(filename, GameInfo->filename);
|
||||
|
||||
_filename = strrchr(filename, '.');
|
||||
if (_filename)
|
||||
strcpy(_filename, ".cht");
|
||||
else
|
||||
strcat(filename, ".cht");
|
||||
}
|
||||
}
|
||||
|
||||
ofn.lpstrFile = filename;
|
||||
ofn.nMaxFile = sizeof(filename);
|
||||
ofn.lpstrDefExt = "cht";
|
||||
ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST;
|
||||
ofn.lpstrInitialDir = FCEU_GetPath(FCEUMKF_CHEAT).c_str();
|
||||
|
||||
if (save ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn))
|
||||
{
|
||||
strcpy(buf, filename);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AskSaveCheat()
|
||||
{
|
||||
if (cheats)
|
||||
{
|
||||
HWND hwnd = hCheat ? hCheat : hAppWnd;
|
||||
if (MessageBox(hwnd, "Save cheats?", "Cheat Console", MB_YESNO | MB_ICONASTERISK) == IDYES)
|
||||
SaveCheatAs(hwnd, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SaveCheatAs(HWND hwnd, bool flush)
|
||||
{
|
||||
if (cheats)
|
||||
{
|
||||
char filename[2048];
|
||||
if (ShowCheatFileBox(hwnd, filename, true))
|
||||
{
|
||||
FILE* file = FCEUD_UTF8fopen(filename, "wb");
|
||||
if (file)
|
||||
{
|
||||
if (flush)
|
||||
{
|
||||
savecheats = 1;
|
||||
FCEU_FlushGameCheats(file, 0);
|
||||
}
|
||||
else
|
||||
FCEU_SaveGameCheats(file);
|
||||
fclose(file);
|
||||
}
|
||||
else
|
||||
MessageBox(hwnd, "Error saving cheats!", "Cheat Console", MB_OK | MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetupCheatFont(HWND hwnd)
|
||||
{
|
||||
if (!hCheat && !hGGConv)
|
||||
{
|
||||
hFont = (HFONT)SendMessage(hwnd, WM_GETFONT, 0, 0);
|
||||
LOGFONT lf;
|
||||
GetObject(hFont, sizeof(LOGFONT), &lf);
|
||||
strcpy(lf.lfFaceName, "Courier New");
|
||||
hNewFont = CreateFontIndirect(&lf);
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteCheatFont()
|
||||
{
|
||||
if (!hCheat && !hGGConv)
|
||||
{
|
||||
DeleteObject(hFont);
|
||||
DeleteObject(hNewFont);
|
||||
hFont = NULL;
|
||||
hNewFont = NULL;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
//--
|
||||
//mbg merge 7/18/06 had to make these extern
|
||||
#ifndef WIN_CHEAT_H
|
||||
#define WIN_CHEAT_H
|
||||
extern int CheatWindow,CheatStyle; //bbit edited: this line added
|
||||
extern HWND hCheat;
|
||||
|
||||
|
@ -18,14 +20,28 @@ void UpdateCheatsAdded();
|
|||
void ToggleCheatInputMode(HWND hwndDlg, int modeId);
|
||||
void GetUICheatInfo(HWND hwndDlg, char* name, uint32* a, uint8* v, int* c);
|
||||
inline void GetCheatStr(char* buf, int a, int v, int c);
|
||||
inline void GetCheatCodeStr(char* buf, int a, int v, int c);
|
||||
|
||||
extern unsigned int FrozenAddressCount;
|
||||
extern std::vector<uint16> FrozenAddresses;
|
||||
//void ConfigAddCheat(HWND wnd); //bbit edited:commented out this line
|
||||
extern struct CHEATF* cheats;
|
||||
extern char* GameGenieLetters;
|
||||
|
||||
void DisableAllCheats();
|
||||
bool ShowCheatFileBox(HWND hwnd, char* buf, bool save = false);
|
||||
void AskSaveCheat();
|
||||
void SaveCheatAs(HWND hwnd, bool flush = false);
|
||||
|
||||
void UpdateCheatRelatedWindow();
|
||||
void SetupCheatFont(HWND hDlg);
|
||||
void DeleteCheatFont();
|
||||
extern POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
|
||||
extern BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern LRESULT APIENTRY FilterEditCtrlProc(HWND hDlg, UINT msg, WPARAM wP, LPARAM lP);
|
||||
extern WNDPROC DefaultEditCtrlProc;
|
||||
|
||||
|
||||
// deselect the old one and select the new one
|
||||
#define ListView_MoveSelectionMark(hwnd, prevIndex, newIndex) \
|
||||
|
@ -35,9 +51,11 @@ SendMessage(hwnd, LVM_SETITEMSTATE, newIndex, (LPARAM)&(lvi.state = LVIS_SELECTE
|
|||
SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, newIndex)
|
||||
|
||||
#define ClearCheatListText(hwnd) \
|
||||
(SetDlgItemText(hwnd, IDC_CHEAT_ADDR, (LPTSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_VAL, (LPTSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_COM, (LPTSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_NAME, (LPTSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_TEXT, (LPTSTR)""))
|
||||
(SetDlgItemText(hwnd, IDC_CHEAT_ADDR, (LPCSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_VAL, (LPCSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_COM, (LPCSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_NAME, (LPCSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_TEXT, (LPCSTR)"") & \
|
||||
SetDlgItemText(hwnd, IDC_CHEAT_GAME_GENIE_TEXT, (LPCSTR)""))
|
||||
|
||||
#endif
|
|
@ -56,6 +56,8 @@ extern bool rightClickEnabled;
|
|||
extern bool fullscreenByDoubleclick;
|
||||
extern int CurrentState;
|
||||
extern bool pauseWhileActive; //adelikat: Cheats dialog
|
||||
extern int globalCheatDisabled;
|
||||
extern int disableAutoLSCheats;
|
||||
extern bool enableHUDrecording;
|
||||
extern bool disableMovieMessages;
|
||||
extern bool replaceP2StartWithMicrophone;
|
||||
|
@ -466,6 +468,8 @@ static CFGSTRUCT fceuconfig[] =
|
|||
AC(backupSavestates),
|
||||
AC(compressSavestates),
|
||||
AC(pauseWhileActive),
|
||||
AC(disableAutoLSCheats),
|
||||
AC(globalCheatDisabled),
|
||||
AC(enableHUDrecording),
|
||||
AC(disableMovieMessages),
|
||||
AC(replaceP2StartWithMicrophone),
|
||||
|
|
|
@ -70,7 +70,7 @@ static HMENU hDisasmcontext; //Handle to context menu
|
|||
static HMENU hDisasmcontextsub; //Handle to context sub menu
|
||||
WNDPROC IDC_DEBUGGER_DISASSEMBLY_oldWndProc = 0;
|
||||
|
||||
static HFONT hFont;
|
||||
// static HFONT hFont;
|
||||
static SCROLLINFO si;
|
||||
|
||||
bool debuggerAutoload = false;
|
||||
|
@ -278,6 +278,10 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
CenterWindow(hwndDlg);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADDBP_ADDR_START, EM_SETLIMITTEXT, 4, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADDBP_ADDR_END, EM_SETLIMITTEXT, 4, 0);
|
||||
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_ADDBP_ADDR_START), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_ADDBP_ADDR_END), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
|
||||
if (WP_edit >= 0)
|
||||
{
|
||||
SetWindowText(hwndDlg,"Edit Breakpoint...");
|
||||
|
@ -359,7 +363,7 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
int tmp = NewBreakWindows(hwndDlg,WP_edit,(BOOL)(watchpoint[WP_edit].flags&WP_E));
|
||||
if (tmp == 2 || tmp == INVALID_BREAKPOINT_CONDITION)
|
||||
{
|
||||
MessageBox(hwndDlg, "Invalid breakpoint condition", "Error", MB_OK);
|
||||
MessageBox(hwndDlg, "Invalid breakpoint condition", "Error", MB_OK | MB_ICONERROR);
|
||||
break;
|
||||
}
|
||||
EndDialog(hwndDlg,1);
|
||||
|
@ -1820,6 +1824,14 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PPU,EM_SETLIMITTEXT,4,0);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_SPR,EM_SETLIMITTEXT,2,0);
|
||||
|
||||
// limit input
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_PCSEEK), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_PC), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_A), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_X), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_Y), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_BOOKMARK), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
|
||||
//I'm lazy, disable the controls which I can't mess with right now
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PPU,EM_SETREADONLY,TRUE,0);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_SPR,EM_SETREADONLY,TRUE,0);
|
||||
|
@ -2475,11 +2487,11 @@ void UpdatePatcher(HWND hwndDlg){
|
|||
|
||||
/// Updates debugger controls that should be enabled/disabled if a game is loaded.
|
||||
/// @param enable Flag that indicates whether the menus should be enabled (1) or disabled (0).
|
||||
void updateGameDependentMenusDebugger(unsigned int enable) {
|
||||
void updateGameDependentMenusDebugger() {
|
||||
if (!hDebug)
|
||||
return;
|
||||
|
||||
//EnableWindow(GetDlgItem(hDebug,DEBUGLOADDEB),(enable ? 0 : 1));
|
||||
// EnableWindow(GetDlgItem(hDebug,DEBUGLOADDEB), GameInfo != 0 ? FALSE : TRUE);
|
||||
}
|
||||
|
||||
void DoDebug(uint8 halt)
|
||||
|
@ -2496,7 +2508,7 @@ void DoDebug(uint8 halt)
|
|||
ShowWindow(hDebug, SW_SHOWNORMAL);
|
||||
SetForegroundWindow(hDebug);
|
||||
|
||||
updateGameDependentMenusDebugger(GameInfo != 0);
|
||||
updateGameDependentMenusDebugger();
|
||||
|
||||
if (GameInfo)
|
||||
UpdateDebugger(true);
|
||||
|
|
|
@ -43,7 +43,7 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr);
|
|||
void PrintOffsetToSeekAndBookmarkFields(int offset);
|
||||
|
||||
void LoadGameDebuggerData(HWND hwndDlg);
|
||||
void updateGameDependentMenusDebugger(unsigned int enable);
|
||||
void updateGameDependentMenusDebugger();
|
||||
|
||||
extern bool inDebugger;
|
||||
|
||||
|
@ -69,5 +69,7 @@ public:
|
|||
|
||||
} *debugSystem;
|
||||
|
||||
// extern WNDPROC DefaultEditCtrlProc;
|
||||
// extern LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP);
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,31 @@
|
|||
#ifndef HEADEREDITOR_H
|
||||
#define HEADEREDITOR_H
|
||||
|
||||
struct iNES_HEADER;
|
||||
|
||||
extern HWND hHeadEditor;
|
||||
void DoHeadEdit();
|
||||
|
||||
HWND InitHeaderEditDialog(HWND hwnd, iNES_HEADER* header);
|
||||
bool ShowINESFileBox(HWND parent, char* buf = NULL, bool save = false);
|
||||
void ToggleINES20(HWND hwnd, bool ines20);
|
||||
void ToggleExtendSystemList(HWND hwnd, bool enable);
|
||||
void ToggleVSSystemGroup(HWND hwnd, bool enable);
|
||||
void ToggleUnofficialPropertiesEnabled(HWND hwnd, bool ines20, bool check);
|
||||
void ToggleUnofficialExtraRegionCode(HWND hwnd, bool ines20, bool unofficial_check, bool check);
|
||||
void ToggleUnofficialPrgRamPresent(HWND hwnd, bool ines20, bool unofficial_check, bool check);
|
||||
void SetHeaderData(HWND hwnd, iNES_HEADER* header);
|
||||
bool LoadHeader(HWND parent, iNES_HEADER* header);
|
||||
bool WriteHeaderData(HWND hwnd, iNES_HEADER* header);
|
||||
int GetComboBoxByteSize(HWND hwnd, UINT id, int* value);
|
||||
bool SearchByString(HWND hwnd, UINT id, int* value, char* buf);
|
||||
bool GetComboBoxListItemData(HWND hwnd, UINT id, int* value, char* buf, bool exact = false);
|
||||
bool SaveINESFile(HWND hwnd, char* path, iNES_HEADER* header);
|
||||
|
||||
|
||||
LRESULT CALLBACK HeaderEditorProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP);
|
||||
extern WNDPROC DefaultEditCtrlProc;
|
||||
extern LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP);
|
||||
|
||||
extern POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
#endif
|
|
@ -102,9 +102,9 @@ void WinLuaOnStop(int hDlgAsInt)
|
|||
|
||||
INT_PTR CALLBACK DlgLuaScriptDialog(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT r;
|
||||
RECT r2;
|
||||
int dx1, dy1, dx2, dy2;
|
||||
// RECT r;
|
||||
// RECT r2;
|
||||
// int dx1, dy1, dx2, dy2;
|
||||
|
||||
switch (msg) {
|
||||
|
||||
|
@ -113,42 +113,9 @@ INT_PTR CALLBACK DlgLuaScriptDialog(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
|||
// remove the 30000 character limit from the console control
|
||||
SendMessage(GetDlgItem(hDlg, IDC_LUACONSOLE),EM_LIMITTEXT,0,0);
|
||||
|
||||
GetWindowRect(hAppWnd, &r);
|
||||
dx1 = (r.right - r.left) / 2;
|
||||
dy1 = (r.bottom - r.top) / 2;
|
||||
extern POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
CalcSubWindowPos(hDlg, NULL);
|
||||
|
||||
GetWindowRect(hDlg, &r2);
|
||||
dx2 = (r2.right - r2.left) / 2;
|
||||
dy2 = (r2.bottom - r2.top) / 2;
|
||||
|
||||
//int windowIndex = 0;//std::find(LuaScriptHWnds.begin(), LuaScriptHWnds.end(), hDlg) - LuaScriptHWnds.begin();
|
||||
//int staggerOffset = windowIndex * 24;
|
||||
//r.left += staggerOffset;
|
||||
//r.right += staggerOffset;
|
||||
//r.top += staggerOffset;
|
||||
//r.bottom += staggerOffset;
|
||||
|
||||
// push it away from the main window if we can
|
||||
const int width = (r.right-r.left);
|
||||
const int width2 = (r2.right-r2.left);
|
||||
const int rspace = GetSystemMetrics(SM_CXSCREEN)- (r.left+width2+width);
|
||||
if(rspace > r.left && r.left+width2 + width < GetSystemMetrics(SM_CXSCREEN))
|
||||
{
|
||||
r.right += width;
|
||||
r.left += width;
|
||||
}
|
||||
else if((int)r.left - (int)width2 > 0)
|
||||
{
|
||||
r.right -= width2;
|
||||
r.left -= width2;
|
||||
}
|
||||
else if(r.left+width2 + width < GetSystemMetrics(SM_CXSCREEN))
|
||||
{
|
||||
r.right += width;
|
||||
r.left += width;
|
||||
}
|
||||
|
||||
SetWindowPos(hDlg, NULL, r.left, r.top, NULL, NULL, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
|
||||
|
||||
RECT r3;
|
||||
GetClientRect(hDlg, &r3);
|
||||
|
|
|
@ -321,18 +321,18 @@ int BlockingCheck()
|
|||
if(GetMessage(&msg, 0, 0, 0) > 0)
|
||||
{
|
||||
//other accelerator capable dialogs could be added here
|
||||
extern HWND hwndMemWatch;
|
||||
|
||||
int handled = 0;
|
||||
|
||||
if(hCheat)
|
||||
if(IsChild(hCheat, msg.hwnd))
|
||||
// Cheat console
|
||||
if(hCheat && IsChild(hCheat, msg.hwnd))
|
||||
handled = IsDialogMessage(hCheat, &msg);
|
||||
if(!handled && hMemFind)
|
||||
{
|
||||
if(IsChild(hMemFind, msg.hwnd))
|
||||
|
||||
// Hex Editor -> Find
|
||||
if(!handled && hMemFind && IsChild(hMemFind, msg.hwnd))
|
||||
handled = IsDialogMessage(hMemFind, &msg);
|
||||
}
|
||||
|
||||
// Memory Watch
|
||||
extern HWND hwndMemWatch;
|
||||
if(!handled && hwndMemWatch)
|
||||
{
|
||||
if(IsChild(hwndMemWatch, msg.hwnd))
|
||||
|
@ -340,65 +340,94 @@ int BlockingCheck()
|
|||
if(!handled)
|
||||
handled = IsDialogMessage(hwndMemWatch,&msg);
|
||||
}
|
||||
if(!handled && RamSearchHWnd)
|
||||
{
|
||||
|
||||
// RAM Search
|
||||
if(!handled && RamSearchHWnd && IsChild(RamSearchHWnd, msg.hwnd))
|
||||
handled = IsDialogMessage(RamSearchHWnd, &msg);
|
||||
}
|
||||
|
||||
// RAM_Watch
|
||||
if(!handled && RamWatchHWnd)
|
||||
{
|
||||
if(IsDialogMessage(RamWatchHWnd, &msg))
|
||||
{
|
||||
if(handled = IsDialogMessage(RamWatchHWnd, &msg))
|
||||
if(msg.message == WM_KEYDOWN) // send keydown messages to the dialog (for accelerators, and also needed for the Alt key to work)
|
||||
SendMessage(RamWatchHWnd, msg.message, msg.wParam, msg.lParam);
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// TAS Editor
|
||||
if(!handled && taseditorWindow.hwndTASEditor)
|
||||
{
|
||||
if(taseditorEnableAcceleratorKeys)
|
||||
if(IsChild(taseditorWindow.hwndTASEditor, msg.hwnd))
|
||||
handled = TranslateAccelerator(taseditorWindow.hwndTASEditor, fceu_hAccel, &msg);
|
||||
if(!handled && taseditorWindow.hwndTASEditor){
|
||||
if(!handled){
|
||||
handled = IsDialogMessage(taseditorWindow.hwndTASEditor, &msg);
|
||||
}
|
||||
}
|
||||
if(!handled && taseditorWindow.hwndFindNote)
|
||||
{
|
||||
if(IsChild(taseditorWindow.hwndFindNote, msg.hwnd))
|
||||
handled = IsDialogMessage(taseditorWindow.hwndFindNote, &msg);
|
||||
}
|
||||
|
||||
// TAS Editor -> Find Node
|
||||
if(!handled && taseditorWindow.hwndFindNote && IsChild(taseditorWindow.hwndFindNote, msg.hwnd))
|
||||
handled = IsDialogMessage(taseditorWindow.hwndFindNote, &msg);
|
||||
|
||||
// Sound Config
|
||||
extern HWND uug;
|
||||
if(!handled && uug && IsChild(uug, msg.hwnd))
|
||||
handled = IsDialogMessage(uug, &msg);
|
||||
if(!handled && pwindow && IsChild(pwindow, msg.hwnd))
|
||||
handled = IsDialogMessage(pwindow, &msg);
|
||||
|
||||
// Palette Config
|
||||
extern HWND hWndPal;
|
||||
if(!handled && hWndPal && IsChild(hWndPal, msg.hwnd))
|
||||
handled = IsDialogMessage(hWndPal, &msg);
|
||||
|
||||
// Code/Data Logger
|
||||
if(!handled && hCDLogger && IsChild(hCDLogger, msg.hwnd))
|
||||
handled = IsDialogMessage(hCDLogger, &msg);
|
||||
|
||||
// Trace Logger
|
||||
if(!handled && hTracer && IsChild(hTracer, msg.hwnd))
|
||||
handled = IsDialogMessage(hTracer, &msg);
|
||||
|
||||
// Game Genie Encoder/Decoder
|
||||
extern HWND hGGConv;
|
||||
if(!handled && hGGConv && IsChild(hGGConv, msg.hwnd))
|
||||
handled = IsDialogMessage(hGGConv, &msg);
|
||||
|
||||
// Debugger
|
||||
if(!handled && hDebug && IsChild(hDebug, msg.hwnd))
|
||||
handled = IsDialogMessage(hDebug, &msg);
|
||||
|
||||
// PPU Viewer
|
||||
extern HWND hPPUView;
|
||||
if(!handled && hPPUView && IsChild(hPPUView, msg.hwnd))
|
||||
handled = IsDialogMessage(hPPUView, &msg);
|
||||
|
||||
// Nametable Viewer
|
||||
extern HWND hNTView;
|
||||
if(!handled && hNTView && IsChild(hNTView, msg.hwnd))
|
||||
handled = IsDialogMessage(hNTView, &msg);
|
||||
|
||||
// Text Hooker
|
||||
extern HWND hTextHooker;
|
||||
if(!handled && hTextHooker && IsChild(hTextHooker, msg.hwnd))
|
||||
handled = IsDialogMessage(hTextHooker, &msg);
|
||||
|
||||
// Lua Scripts
|
||||
extern HWND LuaConsoleHWnd;
|
||||
if(!handled && LuaConsoleHWnd && IsChild(LuaConsoleHWnd, msg.hwnd))
|
||||
handled = IsDialogMessage(LuaConsoleHWnd, &msg);
|
||||
|
||||
// Logs
|
||||
extern HWND logwin;
|
||||
if(!handled && logwin && IsChild(logwin, msg.hwnd))
|
||||
handled = IsDialogMessage(logwin, &msg);
|
||||
|
||||
// Header Editor
|
||||
extern HWND hHeadEditor;
|
||||
if (!handled && hHeadEditor && IsChild(hHeadEditor, msg.hwnd))
|
||||
handled = IsDialogMessage(hHeadEditor, &msg);
|
||||
|
||||
// Netplay (Though it's quite dummy and nearly forgotten)
|
||||
extern HWND netwin;
|
||||
if (!handled && netwin && IsChild(netwin, msg.hwnd))
|
||||
handled = IsDialogMessage(netwin, &msg);
|
||||
|
||||
/* //adelikat - Currently no accel keys are used in the main window. Uncomment this block to activate them.
|
||||
if(!handled)
|
||||
if(msg.hwnd == hAppWnd)
|
||||
|
@ -410,6 +439,7 @@ int BlockingCheck()
|
|||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(!handled)
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
|
@ -467,7 +497,7 @@ void DoFCEUExit()
|
|||
if (FCEUMOV_Mode(MOVIEMODE_TASEDITOR) && !exitTASEditor())
|
||||
return;
|
||||
|
||||
if (CloseMemoryWatch() && AskSave()) //If user was asked to save changes in the memory watch dialog or ram watch, and chose cancel, don't close FCEUX!
|
||||
if (CloseMemoryWatch() && AskSaveRamWatch()) //If user was asked to save changes in the memory watch dialog or ram watch, and chose cancel, don't close FCEUX!
|
||||
{
|
||||
if(goptions & GOO_CONFIRMEXIT)
|
||||
{
|
||||
|
@ -1124,14 +1154,14 @@ void FCEUD_ToggleStatusIcon(void)
|
|||
UpdateCheckedMenuItems();
|
||||
}
|
||||
|
||||
char *GetRomName()
|
||||
char *GetRomName(bool force)
|
||||
{
|
||||
//The purpose of this function is to format the ROM name stored in LoadedRomFName
|
||||
//And return a char array with just the name with path or extension
|
||||
//The purpose of this function is to populate a save as dialog with the ROM name as a default filename
|
||||
extern char LoadedRomFName[2048]; //Contains full path of ROM
|
||||
std::string Rom; //Will contain the formatted path
|
||||
if(GameInfo) //If ROM is loaded
|
||||
if(GameInfo || force) //If ROM is loaded
|
||||
{
|
||||
char drv[PATH_MAX], dir[PATH_MAX], name[PATH_MAX], ext[PATH_MAX];
|
||||
splitpath(LoadedRomFName,drv,dir,name,ext); //Extract components of the ROM path
|
||||
|
@ -1145,14 +1175,14 @@ char *GetRomName()
|
|||
return mystring;
|
||||
}
|
||||
|
||||
char *GetRomPath()
|
||||
char *GetRomPath(bool force)
|
||||
{
|
||||
//The purpose of this function is to format the ROM name stored in LoadedRomFName
|
||||
//And return a char array with just the name with path or extension
|
||||
//The purpose of this function is to populate a save as dialog with the ROM name as a default filename
|
||||
extern char LoadedRomFName[2048]; //Contains full path of ROM
|
||||
std::string Rom; //Will contain the formatted path
|
||||
if(GameInfo) //If ROM is loaded
|
||||
if(GameInfo || force) //If ROM is loaded
|
||||
{
|
||||
char drv[PATH_MAX], dir[PATH_MAX], name[PATH_MAX], ext[PATH_MAX];
|
||||
splitpath(LoadedRomFName,drv,dir,name,ext); //Extract components of the ROM path
|
||||
|
|
|
@ -65,8 +65,8 @@ extern int vmod;
|
|||
|
||||
extern char* directory_names[14];
|
||||
|
||||
char *GetRomName(); //Checks if rom is loaded, if so, outputs the Rom name with no directory path or file extension
|
||||
char *GetRomPath(); //Checks if rom is loaded, if so, outputs the Rom path only
|
||||
char *GetRomName(bool force = false); //Checks if rom is loaded, if so, outputs the Rom name with no directory path or file extension
|
||||
char *GetRomPath(bool force = false); //Checks if rom is loaded, if so, outputs the Rom path only
|
||||
|
||||
///Contains the names of the default directories.
|
||||
static const char *default_directory_names[13] = {
|
||||
|
|
|
@ -316,7 +316,7 @@ static int GetFileData(uint32 offset){
|
|||
}
|
||||
|
||||
static int WriteFileData(uint32 addr,int data){
|
||||
if (addr < 16)MessageBox(hMemView,"Sorry", "Go bug bbit if you really want to edit the header.", MB_OK);
|
||||
if (addr < 16) MessageBox(hMemView, "You can't edit ROM header here, however you can use iNES Header Editor to edit the header if it's an iNES format file.", "Sorry", MB_OK | MB_ICONERROR);
|
||||
if((addr >= 16) && (addr < PRGsize[0]+16)) *(uint8 *)(GetNesPRGPointer(addr-16)) = data;
|
||||
if((addr >= PRGsize[0]+16) && (addr < CHRsize[0]+PRGsize[0]+16)) *(uint8 *)(GetNesCHRPointer(addr-16-PRGsize[0])) = data;
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ void MemwAddRecentFile(const char *filename)
|
|||
UpdateMemwRecentArray(filename, memw_recent_files, MEMW_MAX_NUMBER_OF_RECENT_FILES, memwrecentmenu, ID_FILE_RECENT, MEMW_MENU_FIRST_RECENT_FILE);
|
||||
}
|
||||
|
||||
static const int MW_ADDR_Lookup[] = {
|
||||
static const int MW_ADDR[] = {
|
||||
MW_ADDR00, MW_ADDR01, MW_ADDR02, MW_ADDR03,
|
||||
MW_ADDR04, MW_ADDR05, MW_ADDR06, MW_ADDR07,
|
||||
MW_ADDR08, MW_ADDR09, MW_ADDR10, MW_ADDR11,
|
||||
|
@ -209,11 +209,42 @@ static const int MW_ADDR_Lookup[] = {
|
|||
MW_ADDR16, MW_ADDR17, MW_ADDR18, MW_ADDR19,
|
||||
MW_ADDR20, MW_ADDR21, MW_ADDR22, MW_ADDR23
|
||||
};
|
||||
inline int MW_ADDR(int i) { return MW_ADDR_Lookup[i] ; }
|
||||
inline int MW_NAME(int i) { return MW_ADDR_Lookup[i]-1; }
|
||||
inline int MW_VAL (int i) { return MW_ADDR_Lookup[i]+1; }
|
||||
static const int MW_NAME[] =
|
||||
{
|
||||
MW_NAME00, MW_NAME01, MW_NAME02, MW_NAME03,
|
||||
MW_NAME04, MW_NAME05, MW_NAME06, MW_NAME07,
|
||||
MW_NAME08, MW_NAME09, MW_NAME10, MW_NAME11,
|
||||
MW_NAME12, MW_NAME13, MW_NAME14, MW_NAME15,
|
||||
MW_NAME16, MW_NAME17, MW_NAME18, MW_NAME19,
|
||||
MW_NAME20, MW_NAME21, MW_NAME22, MW_NAME23
|
||||
};
|
||||
static const int MW_VAL[] = {
|
||||
MW_VAL00, MW_VAL01, MW_VAL02, MW_VAL03,
|
||||
MW_VAL04, MW_VAL05, MW_VAL06, MW_VAL07,
|
||||
MW_VAL08, MW_VAL09, MW_VAL10, MW_VAL11,
|
||||
MW_VAL12, MW_VAL13, MW_VAL14, MW_VAL15,
|
||||
MW_VAL16, MW_VAL17, MW_VAL18, MW_VAL19,
|
||||
MW_VAL20, MW_VAL21, MW_VAL22, MW_VAL23
|
||||
};
|
||||
static const int MW_RESET[] = {
|
||||
MEMW_EDIT00RESET, MEMW_EDIT01RESET,
|
||||
MEMW_EDIT02RESET, MEMW_EDIT03RESET
|
||||
};
|
||||
static const int MW_RESULT[] = {
|
||||
EDIT00_RESULTS, EDIT01_RESULTS,
|
||||
EDIT02_RESULTS, EDIT03_RESULTS
|
||||
};
|
||||
static const int MW_RMADDR[] = {
|
||||
MEMW_EDIT00RMADDRESS, MEMW_EDIT01RMADDRESS,
|
||||
MEMW_EDIT02RMADDRESS, MEMW_EDIT03RMADDRESS
|
||||
};
|
||||
static const int MW_EDITFORMULA[] = {
|
||||
MEMW_EDIT00FORMULA, MEMW_EDIT01FORMULA,
|
||||
MEMW_EDIT02FORMULA, MEMW_EDIT03FORMULA
|
||||
};
|
||||
|
||||
static const int MWNUM = ARRAY_SIZE(MW_ADDR_Lookup);
|
||||
|
||||
static const int MWNUM = ARRAY_SIZE(MW_ADDR);
|
||||
|
||||
static int yPositions[MWNUM];
|
||||
static int xPositions[MWNUM];
|
||||
|
@ -223,7 +254,7 @@ static struct MWRec
|
|||
static int findIndex(WORD ctl)
|
||||
{
|
||||
for(int i=0;i<MWNUM;i++)
|
||||
if(MW_ADDR(i) == ctl)
|
||||
if(MW_ADDR[i] == ctl)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
@ -346,8 +377,8 @@ static void SaveStrings()
|
|||
int i;
|
||||
for(i=0;i<MWNUM;i++)
|
||||
{
|
||||
GetDlgItemText(hwndMemWatch,MW_ADDR(i),addresses[i],ADDRESSLENGTH);
|
||||
GetDlgItemText(hwndMemWatch,MW_NAME(i),labels[i],LABELLENGTH);
|
||||
GetDlgItemText(hwndMemWatch,MW_ADDR[i],addresses[i],ADDRESSLENGTH);
|
||||
GetDlgItemText(hwndMemWatch,MW_NAME[i],labels[i],LABELLENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -565,9 +596,9 @@ static void LoadMemWatch()
|
|||
addresses[i][tempal] = 0;
|
||||
labels[i][templl] = 0; //just in case
|
||||
|
||||
SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_VAL [i],(LPTSTR) "---");
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
@ -615,9 +646,9 @@ void OpenMemwatchRecentFile(int memwRFileNumber)
|
|||
addresses[i][tempal] = 0;
|
||||
labels[i][templl] = 0; //just in case
|
||||
|
||||
SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_VAL [i],(LPTSTR) "---");
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
|
||||
}
|
||||
fclose(fp); //Close the file
|
||||
fileChanged = false; //Flag that the memwatch file has not been changed since last save
|
||||
|
@ -686,8 +717,8 @@ void ClearAllText()
|
|||
{
|
||||
addresses[i][0] = 0;
|
||||
labels[i][0] = 0;
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
|
||||
}
|
||||
//Now clear last file used variable (memwLastFilename)
|
||||
for (int i=0;i<2048;i++)
|
||||
|
@ -707,7 +738,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
switch(uMsg)
|
||||
{
|
||||
case WM_ENTERMENULOOP:
|
||||
EnableMenuItem(memwmenu,MEMW_FILE_SAVE,MF_BYCOMMAND | (fileChanged ? MF_ENABLED : MF_GRAYED));
|
||||
EnableMenuItem(memwmenu, MEMW_FILE_SAVE, MF_BYCOMMAND | fileChanged ? MF_ENABLED : MF_GRAYED);
|
||||
break;
|
||||
case WM_MOVE: {
|
||||
if (!IsIconic(hwndDlg)) {
|
||||
|
@ -724,9 +755,18 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
};
|
||||
|
||||
case WM_INITDIALOG:
|
||||
if (MemWatch_wndx==-32000) MemWatch_wndx=0; //Just in case
|
||||
if (MemWatch_wndy==-32000) MemWatch_wndy=0; //-32000 bugs can happen as it is a special windows value
|
||||
SetWindowPos(hwndDlg,0,MemWatch_wndx,MemWatch_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
|
||||
POINT pt;
|
||||
if (MemWatch_wndx != 0 && MemWatch_wndy != 0)
|
||||
{
|
||||
pt.x = MemWatch_wndx;
|
||||
pt.y = MemWatch_wndy;
|
||||
pt = CalcSubWindowPos(hwndDlg, &pt);
|
||||
}
|
||||
else
|
||||
pt = CalcSubWindowPos(hwndDlg, NULL);
|
||||
MemWatch_wndx = pt.x;
|
||||
MemWatch_wndy = pt.y;
|
||||
|
||||
hdc = GetDC(hwndDlg);
|
||||
SelectObject (hdc, debugSystem->hFixedFont);
|
||||
SetTextAlign(hdc,TA_UPDATECP | TA_TOP | TA_LEFT);
|
||||
|
@ -744,14 +784,18 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
if(i >= MWNUM / 2)
|
||||
col = 1;
|
||||
RECT r;
|
||||
GetWindowRect(GetDlgItem(hwndDlg,MW_ADDR(i)),&r);
|
||||
GetWindowRect(GetDlgItem(hwndDlg, MW_ADDR[i]), &r);
|
||||
ScreenToClient(hwndDlg, (LPPOINT)&r);
|
||||
ScreenToClient(hwndDlg, (LPPOINT)&r.right);
|
||||
yPositions[i] = r.top;
|
||||
yPositions[i] += ((r.bottom-r.top)-debugSystem->fixedFontHeight)/2; //vertically center
|
||||
yPositions[i] += (r.bottom - r.top - debugSystem->fixedFontHeight) / 2; //vertically center
|
||||
GetWindowRect(GetDlgItem(hwndDlg, kLabelControls[col]), &r);
|
||||
ScreenToClient(hwndDlg, (LPPOINT)&r);
|
||||
xPositions[i] = r.left;
|
||||
|
||||
// experimental: limit the text length and input to hex values
|
||||
SendDlgItemMessage(hwndDlg, MW_ADDR[i], EM_SETLIMITTEXT, 4, 0);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, MW_ADDR[i]), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
}
|
||||
|
||||
//Populate Formula pulldown menus
|
||||
|
@ -759,9 +803,9 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
{
|
||||
for (int y = 0; y < FMAX; y++)
|
||||
{
|
||||
SendDlgItemMessage(hwndDlg, MEMW_EDIT00FORMULA+x,(UINT) CB_ADDSTRING, 0,(LPARAM) formula[y].c_str() );
|
||||
SendDlgItemMessage(hwndDlg, MW_EDITFORMULA[x], (UINT)CB_ADDSTRING, 0, (LPARAM)formula[y].c_str());
|
||||
}
|
||||
SendDlgItemMessage(hwndDlg, MEMW_EDIT00FORMULA+x, CB_SETCURSEL, 0, 0);
|
||||
SendDlgItemMessage(hwndDlg, MW_EDITFORMULA[x], CB_SETCURSEL, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -771,6 +815,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
editnow[x] = 0;
|
||||
editlast[x]= 0;
|
||||
}
|
||||
|
||||
RamChangeInitialize = true;
|
||||
break;
|
||||
|
||||
|
@ -870,7 +915,6 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
case MEMW_EXPANDCOLLAPSE:
|
||||
CollapseWindow();
|
||||
break;
|
||||
|
||||
case MEMW_EDIT00RESET:
|
||||
RamChangeReset(0);
|
||||
break;
|
||||
|
@ -993,9 +1037,9 @@ void CreateMemWatch()
|
|||
int i;
|
||||
for(i = 0; i < MWNUM; i++)
|
||||
{
|
||||
SetDlgItemText(hwndMemWatch,MW_VAL (i),(LPTSTR) "---");
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR(i),(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME(i),(LPTSTR) labels[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_VAL [i],(LPTSTR) "---");
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR[i],(LPTSTR) addresses[i]);
|
||||
SetDlgItemText(hwndMemWatch,MW_NAME[i],(LPTSTR) labels[i]);
|
||||
}
|
||||
}
|
||||
if (MemWatchLoadFileOnStart) OpenMemwatchRecentFile(0);
|
||||
|
@ -1014,10 +1058,10 @@ void AddMemWatch(char memaddress[32])
|
|||
CreateMemWatch();
|
||||
for(i = 0; i < MWNUM; i++)
|
||||
{
|
||||
GetDlgItemText(hwndMemWatch,MW_ADDR(i),TempArray,32);
|
||||
GetDlgItemText(hwndMemWatch,MW_ADDR[i],TempArray,32);
|
||||
if (TempArray[0] == 0)
|
||||
{
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR(i),memaddress);
|
||||
SetDlgItemText(hwndMemWatch,MW_ADDR[i],memaddress);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1039,23 +1083,19 @@ void RamChange()
|
|||
//Get proper Addr edit box
|
||||
switch (x)
|
||||
{
|
||||
case 0:
|
||||
whichADDR = 0; break; //Addr 1
|
||||
case 1:
|
||||
whichADDR = 3; break; //Addr 2
|
||||
case 2:
|
||||
whichADDR = 36; break; //Addr 12
|
||||
case 3:
|
||||
whichADDR = 39; break; //Addr 13
|
||||
case 0: whichADDR = 0; break; //Addr 1
|
||||
case 1: whichADDR = 1; break; //Addr 2
|
||||
case 2: whichADDR = 11; break; //Addr 12
|
||||
case 3: whichADDR = 12; break; //Addr 13
|
||||
}
|
||||
GetDlgItemText(hwndMemWatch, MW_ADDR00+(whichADDR), editboxnow[x], 6); //Get Address value of edit00
|
||||
SetDlgItemText(hwndMemWatch, MEMW_EDIT00RMADDRESS+x, editboxnow[x]); //Put Address value
|
||||
GetDlgItemText(hwndMemWatch, MW_ADDR[whichADDR], editboxnow[x], 6); //Get Address value of edit00
|
||||
SetDlgItemText(hwndMemWatch, MW_RMADDR[x], editboxnow[x]); //Put Address value
|
||||
editlast[x] = editnow[x]; //Update last value
|
||||
editnow[x] = GetMem(mwrec.addr); //Update now value
|
||||
|
||||
|
||||
//Calculate Ram Change
|
||||
int z = SendDlgItemMessage(hwndMemWatch, MEMW_EDIT00FORMULA+x,(UINT) CB_GETTOPINDEX, 0,0);
|
||||
int z = SendDlgItemMessage(hwndMemWatch, MW_EDITFORMULA[x],(UINT) CB_GETTOPINDEX, 0,0);
|
||||
switch (z)
|
||||
{
|
||||
//Greater than------------------------------------
|
||||
|
@ -1102,7 +1142,7 @@ void RamChangeReset(int x)
|
|||
{
|
||||
editcount[x] = 0;
|
||||
sprintf(editchangem[x], "%d", editcount[x]); //Convert counter to text
|
||||
SetDlgItemText(hwndMemWatch, EDIT00_RESULTS+x, editchangem[x]); //Display text in results box
|
||||
SetDlgItemText(hwndMemWatch, MW_RESULT[x], editchangem[x]); //Display text in results box
|
||||
}
|
||||
|
||||
void ChangeMemwMenuItemText(int menuitem, string text)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
static int recv_tcpwrap(uint8 *buf, int len);
|
||||
static void NetStatAdd(char *text);
|
||||
|
||||
static HWND netwin=0;
|
||||
HWND netwin=0;
|
||||
|
||||
static char *netstatt[64];
|
||||
static int netstattcount=0;
|
||||
|
|
|
@ -12,6 +12,7 @@ extern int palsharpness;
|
|||
extern int palcontrast;
|
||||
extern int palbrightness;
|
||||
extern bool paldeemphswap;
|
||||
HWND hWndPal = NULL;
|
||||
|
||||
bool SetPalette(const char* nameo)
|
||||
{
|
||||
|
@ -226,7 +227,7 @@ BOOL CALLBACK PaletteConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
case BUTTON_CLOSE:
|
||||
gornk:
|
||||
DestroyWindow(hwndDlg);
|
||||
pwindow = 0; // Yay for user race conditions.
|
||||
hWndPal = 0; // Yay for user race conditions.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -240,13 +241,9 @@ gornk:
|
|||
**/
|
||||
void ConfigPalette()
|
||||
{
|
||||
if(!pwindow)
|
||||
{
|
||||
pwindow=CreateDialog(fceu_hInstance, "PALCONFIG" ,0 , PaletteConCallB);
|
||||
}
|
||||
if(!hWndPal)
|
||||
hWndPal = CreateDialog(fceu_hInstance, "PALCONFIG", hAppWnd, PaletteConCallB);
|
||||
else
|
||||
{
|
||||
SetFocus(pwindow);
|
||||
}
|
||||
SetFocus(hWndPal);
|
||||
}
|
||||
|
||||
|
|
|
@ -1245,7 +1245,6 @@ LRESULT CustomDraw (LPARAM lParam)
|
|||
{
|
||||
case CDDS_PREPAINT :
|
||||
return CDRF_NOTIFYITEMDRAW;
|
||||
|
||||
case CDDS_ITEMPREPAINT:
|
||||
{
|
||||
int rv = CDRF_DODEFAULT;
|
||||
|
@ -1398,38 +1397,15 @@ static BOOL SelectingByKeyboard()
|
|||
|
||||
LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT r;
|
||||
RECT r2;
|
||||
int dx1, dy1, dx2, dy2;
|
||||
|
||||
static int watchIndex=0;
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG: {
|
||||
RamSearchHWnd = hDlg;
|
||||
|
||||
GetWindowRect(hWnd, &r);
|
||||
dx1 = (r.right - r.left) / 2;
|
||||
dy1 = (r.bottom - r.top) / 2;
|
||||
CalcSubWindowPos(hDlg, NULL);
|
||||
|
||||
GetWindowRect(hDlg, &r2);
|
||||
dx2 = (r2.right - r2.left) / 2;
|
||||
dy2 = (r2.bottom - r2.top) / 2;
|
||||
|
||||
// push it away from the main window if we can
|
||||
const int width = (r.right-r.left);
|
||||
const int width2 = (r2.right-r2.left);
|
||||
if(r.left+width2 + width < GetSystemMetrics(SM_CXSCREEN))
|
||||
{
|
||||
r.right += width;
|
||||
r.left += width;
|
||||
}
|
||||
else if((int)r.left - (int)width2 > 0)
|
||||
{
|
||||
r.right -= width2;
|
||||
r.left -= width2;
|
||||
}
|
||||
|
||||
SetWindowPos(hDlg, NULL, r.left, r.top, NULL, NULL, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
|
||||
switch(rs_o)
|
||||
{
|
||||
case '<':
|
||||
|
|
|
@ -30,6 +30,7 @@ void DoRamSearchOperation(); //Perform a search
|
|||
|
||||
extern HWND RamSearchHWnd;
|
||||
extern LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
|
||||
// Too much work to do for resorting the values, and finding the biggest number
|
||||
// by sorting in ram list doesn't help too much in usually use, so I gave it up.
|
||||
|
|
|
@ -235,7 +235,7 @@ void Update_RAM_Watch()
|
|||
}
|
||||
}
|
||||
|
||||
bool AskSave()
|
||||
bool AskSaveRamWatch()
|
||||
{
|
||||
//This function asks to save changes if the watch file contents have changed
|
||||
//returns false only if a save was attempted but failed or was cancelled
|
||||
|
@ -678,7 +678,7 @@ bool Load_Watches(bool clear)
|
|||
|
||||
bool ResetWatches()
|
||||
{
|
||||
if(!AskSave())
|
||||
if(!AskSaveRamWatch())
|
||||
return false;
|
||||
for (;WatchCount >= 0; WatchCount--)
|
||||
{
|
||||
|
@ -1039,46 +1039,15 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
RECT r, r2;
|
||||
int dx1, dy1, dx2, dy2;
|
||||
|
||||
GetWindowRect(hWnd, &r); //Ramwatch window
|
||||
dx1 = (r.right - r.left) / 2;
|
||||
dy1 = (r.bottom - r.top) / 2;
|
||||
|
||||
GetWindowRect(hDlg, &r2); // TASer window
|
||||
dx2 = (r2.right - r2.left) / 2;
|
||||
dy2 = (r2.bottom - r2.top) / 2;
|
||||
|
||||
|
||||
// push it away from the main window if we can
|
||||
const int width = (r.right-r.left);
|
||||
const int height = (r.bottom - r.top);
|
||||
const int width2 = (r2.right-r2.left);
|
||||
if(r.left+width2 + width < GetSystemMetrics(SM_CXSCREEN))
|
||||
{
|
||||
r.right += width;
|
||||
r.left += width;
|
||||
}
|
||||
else if((int)r.left - (int)width2 > 0)
|
||||
{
|
||||
r.right -= width2;
|
||||
r.left -= width2;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
//If user has Save Window Pos selected, override default positioning
|
||||
if (RWSaveWindowPos)
|
||||
{
|
||||
//If ramwindow is for some reason completely off screen, use default instead
|
||||
if (ramw_x > (-width*2) || ramw_x < (width*2 + GetSystemMetrics(SM_CYSCREEN)) )
|
||||
r.left = ramw_x; //This also ignores cases of windows -32000 error codes
|
||||
//If ramwindow is for some reason completely off screen, use default instead
|
||||
if (ramw_y > (0-height*2) ||ramw_y < (height*2 + GetSystemMetrics(SM_CYSCREEN)) )
|
||||
r.top = ramw_y; //This also ignores cases of windows -32000 error codes
|
||||
POINT pt = { ramw_x, ramw_y };
|
||||
pt = CalcSubWindowPos(hDlg, &pt);
|
||||
ramw_x = pt.x;
|
||||
ramw_y = pt.y;
|
||||
}
|
||||
//-------------------------------------------------------------------------------------
|
||||
SetWindowPos(hDlg, NULL, r.left, r.top, NULL, NULL, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
|
||||
else
|
||||
CalcSubWindowPos(hDlg, NULL);
|
||||
|
||||
ramwatchmenu=GetMenu(hDlg);
|
||||
rwrecentmenu=CreateMenu();
|
||||
|
|
|
@ -6,7 +6,7 @@ extern bool AutoRWLoad;
|
|||
extern bool RWSaveWindowPos;
|
||||
#define MAX_RECENT_WATCHES 5
|
||||
extern char rw_recent_files[MAX_RECENT_WATCHES][1024];
|
||||
extern bool AskSave();
|
||||
extern bool AskSaveRamWatch();
|
||||
extern int ramw_x;
|
||||
extern int ramw_y;
|
||||
extern bool RWfileChanged;
|
||||
|
|
|
@ -8,15 +8,41 @@
|
|||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Neutral resources
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
// English(U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
|
@ -240,6 +266,7 @@ BEGIN
|
|||
MENUITEM "&Trace Logger...", MENU_TRACELOGGER
|
||||
MENUITEM "&Code/Data Logger...", MENU_CDLOGGER
|
||||
MENUITEM "&Game Genie Decoder/Encoder...", MENU_GAMEGENIEDECODER
|
||||
MENUITEM "&iNES Header Editor...", MENU_INESHEADEREDITOR
|
||||
END
|
||||
POPUP "&Help"
|
||||
BEGIN
|
||||
|
@ -681,7 +708,7 @@ END
|
|||
DIRCONFIG DIALOGEX 63, 7, 305, 255
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Directories Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",CLOSE_BUTTON,175,230,56,14
|
||||
PUSHBUTTON "Cancel",BTN_CANCEL,239,230,56,14
|
||||
|
@ -726,7 +753,7 @@ END
|
|||
DWBDIALOG DIALOG 33, 99, 250, 56
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "DWB!"
|
||||
FONT 8, "Tahoma"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Text",LBL_DWBDIALOG_TEXT,7,9,237,8
|
||||
PUSHBUTTON "Clear",BTN_CLEAR,64,32,50,14
|
||||
|
@ -736,7 +763,7 @@ END
|
|||
FKBDIALOG DIALOG 13, 72, 402, 194
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Family Keyboard Configuration"
|
||||
FONT 8, "Tahoma"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
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
|
||||
|
@ -818,7 +845,7 @@ END
|
|||
GAMEPADDIALOG DIALOGEX 4, 109, 243, 220
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Gamepad Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,173,196,56,14
|
||||
GROUPBOX "",GRP_GAMEPAD1,4,8,232,82,WS_GROUP
|
||||
|
@ -848,9 +875,9 @@ END
|
|||
GUICONFIG DIALOGEX 16, 123, 184, 158
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GUI Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BUTTON_CLOSE,65,136,56,14
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,65,136,56,14
|
||||
CONTROL "Load ""File Open"" dialog when FCEUX starts.",CB_LOAD_FILE_OPEN,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,168,12
|
||||
CONTROL "Automatically hide menu on game load.",CB_AUTO_HIDE_MENU,
|
||||
|
@ -870,7 +897,7 @@ END
|
|||
INPUTCONFIG DIALOGEX 122, 105, 349, 199
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Input Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Port 1:",102,20,31,152,50
|
||||
COMBOBOX COMBO_PAD1,27,57,71,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
|
@ -918,7 +945,7 @@ END
|
|||
MAHJONGDIALOG DIALOG 65510, 106, 340, 110
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "mahjong"
|
||||
FONT 8, "Tahoma"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,277,91,56,14
|
||||
GROUPBOX "",321,8,8,324,73,WS_GROUP
|
||||
|
@ -948,7 +975,7 @@ END
|
|||
MAPINPUT DIALOGEX 0, 0, 318, 294
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Hotkeys"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,261,274,50,14
|
||||
PUSHBUTTON "Cancel",BTN_CANCEL,205,274,50,14
|
||||
|
@ -961,7 +988,7 @@ END
|
|||
MESSAGELOG DIALOGEX 33, 38, 197, 229
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Message Log"
|
||||
FONT 9, "MS Shell Dlg", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT LBL_LOG_TEXT,1,1,194,208,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
|
||||
PUSHBUTTON "Clear",CLEAR_LOG,94,211,47,14
|
||||
|
@ -971,7 +998,7 @@ END
|
|||
NETMOO DIALOGEX 44, 59, 365, 209
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Network Play"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_NETMOO_CMD_INPUT,10,137,347,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_OEMCONVERT | ES_WANTRETURN
|
||||
EDITTEXT IDC_NETMOO_STATUS,10,8,347,130,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
|
||||
|
@ -993,7 +1020,7 @@ END
|
|||
NEWINPUT DIALOGEX 0, 0, 186, 66
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Enter New Input"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CTEXT "Press a key",LBL_KEY_COMBO,31,14,122,20
|
||||
PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14
|
||||
|
@ -1003,7 +1030,7 @@ END
|
|||
PALCONFIG DIALOGEX 16, 81, 228, 217
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Palette Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BUTTON_CLOSE,162,195,56,14
|
||||
GROUPBOX "NES Palette",302,10,8,102,81,WS_GROUP
|
||||
|
@ -1035,7 +1062,7 @@ END
|
|||
POWERPADDIALOG DIALOG 30, 123, 131, 119
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Power Pad Configuration"
|
||||
FONT 8, "Tahoma"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,34,95,56,14
|
||||
GROUPBOX "",312,8,10,114,74,WS_GROUP
|
||||
|
@ -1056,7 +1083,7 @@ END
|
|||
QUIZKINGDIALOG DIALOG 30, 123, 160, 74
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "quiz king"
|
||||
FONT 8, "Tahoma"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,54,56,56,14
|
||||
GROUPBOX "Buzzers",312,8,7,144,39,WS_GROUP
|
||||
|
@ -1071,7 +1098,7 @@ END
|
|||
SOUNDCONFIG DIALOGEX 8, 95, 334, 282
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Sound Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,280,260,44,14
|
||||
GROUPBOX "Output/Output Format:",302,10,9,131,93,WS_GROUP
|
||||
|
@ -1114,7 +1141,7 @@ END
|
|||
SUBORKBDIALOG DIALOGEX 13, 72, 478, 171
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Subor Keyboard Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",1,405,151,56,14
|
||||
LTEXT "Remember to push the ""Scroll Lock"" key during emulation to enable Keyboard input.",-1,18,6,370,12
|
||||
|
@ -1223,26 +1250,26 @@ BEGIN
|
|||
END
|
||||
|
||||
TIMINGCONFIG DIALOGEX 23, 157, 203, 110
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Timing Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",1,137,87,56,14
|
||||
CONTROL "Disable speed throttling used when sound is disabled.",CB_DISABLE_SPEED_THROTTLING,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,8,183,12
|
||||
CONTROL "Set high-priority thread.",CB_SET_HIGH_PRIORITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,24,102,12
|
||||
CONTROL "Overclocking (old PPU only).",CB_OVERCLOCKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,41,101,10
|
||||
EDITTEXT IDC_EXTRA_SCANLINES,104,55,84,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||
EDITTEXT IDC_EXTRA_SCANLINES,104,55,84,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
|
||||
LTEXT "Post-render scanlines:",IDC_EXTRA_SCANLINES_TEXT,21,57,74,8,WS_DISABLED
|
||||
CONTROL "Don't overclock 7-bit samples.",CB_SKIP_7BIT,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,10,87,111,10
|
||||
EDITTEXT IDC_VBLANK_SCANLINES,104,68,84,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||
EDITTEXT IDC_VBLANK_SCANLINES,104,68,84,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
|
||||
LTEXT "VBlank scanlines:",IDC_VBLANK_SCANLINES_TEXT,21,71,76,8,WS_DISABLED
|
||||
END
|
||||
|
||||
MOVIEOPTIONS DIALOGEX 65520, 76, 147, 222
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Movie Options"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDC_MOVIE_CLOSE,48,200,49,14,BS_CENTER
|
||||
CONTROL "Pause after playback",IDC_MOVIE_PAUSEAFTERPLAYBACK,
|
||||
|
@ -1269,7 +1296,7 @@ END
|
|||
DWBDIALOGSIMPLE DIALOGEX 33, 99, 250, 39
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "DWBS!"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Type a key, or press Escape to disable.",65429,53,14,125,8
|
||||
END
|
||||
|
@ -1279,63 +1306,63 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VI
|
|||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Memory Watch"
|
||||
MENU MEMWATCHMENU
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "",IDC_STATIC,3,0,126,200
|
||||
GROUPBOX "",IDC_STATIC,131,0,128,200
|
||||
EDITTEXT MW_ADDR00,6,17,30,14
|
||||
EDITTEXT 1000,41,17,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR01,6,32,30,14
|
||||
EDITTEXT 1003,41,32,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR02,6,47,30,14
|
||||
EDITTEXT 1006,41,47,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR03,6,62,30,14
|
||||
EDITTEXT 1009,41,62,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR04,6,77,30,14
|
||||
EDITTEXT 1012,41,77,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR05,6,92,30,14
|
||||
EDITTEXT 1015,41,92,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR06,6,107,30,14
|
||||
EDITTEXT 1018,41,107,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR07,6,122,30,14
|
||||
EDITTEXT 1021,41,122,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR08,6,137,30,14
|
||||
EDITTEXT 1024,41,137,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR09,6,152,30,14
|
||||
EDITTEXT 1027,41,152,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR10,6,167,30,14
|
||||
EDITTEXT 1030,41,167,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR11,6,182,30,14
|
||||
EDITTEXT 1033,41,182,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR12,135,17,30,14
|
||||
EDITTEXT 1036,171,17,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR13,135,32,30,14
|
||||
EDITTEXT 1039,171,32,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR14,135,47,30,14
|
||||
EDITTEXT 1042,171,47,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR15,135,62,30,14
|
||||
EDITTEXT 1045,171,62,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR16,135,77,30,14
|
||||
EDITTEXT 1048,171,77,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR17,135,92,30,14
|
||||
EDITTEXT 1051,171,92,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR18,135,107,30,14
|
||||
EDITTEXT 1054,171,107,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR19,135,122,30,14
|
||||
EDITTEXT 1057,171,122,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR20,135,137,30,14
|
||||
EDITTEXT 1060,171,137,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR21,135,152,30,14
|
||||
EDITTEXT 1063,171,152,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR22,135,167,30,14
|
||||
EDITTEXT 1066,171,167,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR23,135,182,30,14
|
||||
EDITTEXT 1069,171,182,55,14,ES_AUTOHSCROLL
|
||||
LTEXT "Name",65428,41,7,20,8
|
||||
LTEXT "Address",65427,6,7,26,8
|
||||
EDITTEXT MW_ADDR00,6,17,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME00,41,17,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR01,6,32,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME01,41,32,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR02,6,47,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME02,41,47,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR03,6,62,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME03,41,62,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR04,6,77,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME04,41,77,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR05,6,92,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME05,41,92,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR06,6,107,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME06,41,107,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR07,6,122,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME07,41,122,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR08,6,137,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME08,41,137,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR09,6,152,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME09,41,152,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR10,6,167,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME10,41,167,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR11,6,182,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME11,41,182,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR12,135,17,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME12,171,17,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR13,135,32,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME13,171,32,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR14,135,47,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME14,171,47,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR15,135,62,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME15,171,62,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR16,135,77,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME16,171,77,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR17,135,92,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME17,171,92,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR18,135,107,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME18,171,107,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR19,135,122,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME19,171,122,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR20,135,137,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME20,171,137,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR21,135,152,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME21,171,152,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR22,135,167,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME22,171,167,55,14,ES_AUTOHSCROLL
|
||||
EDITTEXT MW_ADDR23,135,182,30,14,ES_UPPERCASE
|
||||
EDITTEXT MW_NAME23,171,182,55,14,ES_AUTOHSCROLL
|
||||
LTEXT "Name",IDC_STATIC,41,7,20,8
|
||||
LTEXT "Address",IDC_STATIC,6,7,26,8
|
||||
LTEXT "Value",MW_VALUELABEL1,101,7,19,8
|
||||
LTEXT "Name",65425,171,7,20,8
|
||||
LTEXT "Address",65424,135,7,26,8
|
||||
LTEXT "Name",IDC_STATIC,171,7,20,8
|
||||
LTEXT "Address",IDC_STATIC,135,7,26,8
|
||||
LTEXT "Value",MW_VALUELABEL2,231,7,19,8
|
||||
LTEXT " ",EDIT00_RESULTS,89,225,26,8
|
||||
GROUPBOX "Memory Change Monitoring",IDC_STATIC,0,202,129,57,BS_CENTER
|
||||
|
@ -1369,7 +1396,7 @@ END
|
|||
DEBUGGER DIALOGEX 54, 74, 546, 334
|
||||
STYLE DS_SETFONT | DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
CAPTION "6502 Debugger"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_DEBUGGER_DISASSEMBLY,"RichEdit20A",ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | WS_BORDER | WS_HSCROLL,18,5,316,317
|
||||
SCROLLBAR IDC_DEBUGGER_DISASSEMBLY_VSCR,334,5,11,317,SBS_VERT
|
||||
|
@ -1452,7 +1479,7 @@ END
|
|||
TRACER DIALOGEX 0, 0, 317, 181
|
||||
STYLE DS_SETFONT | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
CAPTION "Trace Logger"
|
||||
FONT 8, "Tahoma", 400, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_TRACER_LOG,3,3,300,44,ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | WS_HSCROLL
|
||||
SCROLLBAR IDC_SCRL_TRACER_LOG,303,3,11,44,SBS_VERT
|
||||
|
@ -1487,43 +1514,43 @@ BEGIN
|
|||
CONTROL "Log Bank number",IDC_CHECK_LOG_BANK_NUMBER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,211,121,100,10
|
||||
END
|
||||
|
||||
ADDBP DIALOGEX 66, 83, 196, 130
|
||||
ADDBP DIALOGEX 66, 83, 197, 125
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Add Breakpoint..."
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Address:",-1,14,5,30,10
|
||||
CTEXT "-",65534,78,5,8,8
|
||||
LTEXT "&Address:",-1,14,6,30,10
|
||||
EDITTEXT IDC_ADDBP_ADDR_START,48,4,30,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
EDITTEXT IDC_ADDBP_ADDR_END,83,4,30,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
CONTROL "Read",IDC_ADDBP_MODE_R,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,25,35,12
|
||||
CONTROL "Write",IDC_ADDBP_MODE_W,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,49,25,35,12
|
||||
CONTROL "Execute",IDC_ADDBP_MODE_X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,86,25,40,12
|
||||
DEFPUSHBUTTON "&OK",IDOK,99,113,42,13
|
||||
PUSHBUTTON "&Cancel",IDCANCEL,147,114,42,13
|
||||
GROUPBOX "Memory",108,9,39,174,24,WS_TABSTOP
|
||||
CONTROL "CPU Mem",IDC_ADDBP_MEM_CPU,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,49,50,10
|
||||
CONTROL "PPU Mem",IDC_ADDBP_MEM_PPU,"Button",BS_AUTORADIOBUTTON,68,49,50,10
|
||||
CONTROL "Sprite Mem",IDC_ADDBP_MEM_SPR,"Button",BS_AUTORADIOBUTTON,124,49,50,10
|
||||
EDITTEXT IDC_ADDBP_CONDITION,43,72,136,14,ES_AUTOHSCROLL
|
||||
LTEXT "Condition",65533,7,74,30,8
|
||||
LTEXT "Name",65532,8,92,20,8
|
||||
EDITTEXT IDC_ADDBP_NAME,43,89,136,14,ES_AUTOHSCROLL
|
||||
CONTROL "Forbid",IDC_ADDBP_MODE_F,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,145,6,40,12
|
||||
CTEXT "-",65534,78,6,8,8
|
||||
EDITTEXT IDC_ADDBP_ADDR_END,87,4,30,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
CONTROL "&Forbid",IDC_ADDBP_MODE_F,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,154,6,33,12
|
||||
GROUPBOX "",112,3,18,185,50,WS_TABSTOP
|
||||
CONTROL "&Read",IDC_ADDBP_MODE_R,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,25,35,12
|
||||
CONTROL "&Write",IDC_ADDBP_MODE_W,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,49,25,35,12
|
||||
CONTROL "&Execute",IDC_ADDBP_MODE_X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,86,25,40,12
|
||||
GROUPBOX "Memory",108,9,39,174,24,WS_TABSTOP
|
||||
CONTROL "&CPU Mem",IDC_ADDBP_MEM_CPU,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,49,50,10
|
||||
CONTROL "&PPU Mem",IDC_ADDBP_MEM_PPU,"Button",BS_AUTORADIOBUTTON,68,49,50,10
|
||||
CONTROL "&Sprite Mem",IDC_ADDBP_MEM_SPR,"Button",BS_AUTORADIOBUTTON,124,49,50,10
|
||||
LTEXT "C&ondition:",65533,7,74,34,8
|
||||
EDITTEXT IDC_ADDBP_CONDITION,43,72,136,14,ES_AUTOHSCROLL
|
||||
LTEXT "&Name:",65532,8,92,20,8
|
||||
EDITTEXT IDC_ADDBP_NAME,43,89,136,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,99,110,42,13
|
||||
PUSHBUTTON "Cancel",IDCANCEL,147,110,42,13
|
||||
END
|
||||
|
||||
NTVIEW DIALOGEX 44, 38, 352, 350
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Name Table Viewer"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Name Tables",IDC_NTVIEW_TABLE_BOX,2,0,347,251,WS_TABSTOP
|
||||
LTEXT "Refresh: More",IDC_STATIC,225,254,50,9
|
||||
CONTROL "",IDC_NTVIEW_REFRESH_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,275,254,50,11
|
||||
LTEXT "Less",IDC_STATIC,325,254,18,10
|
||||
LTEXT "Display on scanline:",IDC_NTVIEW_SCANLINE_TEXT,253,269,65,9
|
||||
EDITTEXT IDC_NTVIEW_SCANLINE,315,267,27,12
|
||||
LTEXT "Display on scanline:",IDC_NTVIEW_SCANLINE_TEXT,249,269,65,9
|
||||
EDITTEXT IDC_NTVIEW_SCANLINE,315,267,27,12,ES_NUMBER
|
||||
CONTROL "Show Scroll Lines",IDC_NTVIEW_SHOW_SCROLL_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,254,69,10
|
||||
CONTROL "Show Attributes",IDC_NTVIEW_SHOW_ATTRIBUTES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,265,69,10
|
||||
CONTROL "Ignore Palettes",IDC_NTVIEW_HIDE_PALETTES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,276,69,10
|
||||
|
@ -1545,7 +1572,7 @@ END
|
|||
ROMPATCHER DIALOGEX 84, 67, 304, 135
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Rom Data Editor"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_ROMPATCHER_CURRENT_DATA,7,47,282,12,ES_READONLY
|
||||
PUSHBUTTON "Apply",IDC_ROMPATCHER_BTN_APPLY,185,92,54,14
|
||||
|
@ -1564,20 +1591,20 @@ END
|
|||
GGCONV DIALOGEX 84, 67, 186, 146
|
||||
STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Game Genie Encoder/Decoder Tool"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_GAME_GENIE_CODE,115,22,53,14,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
GROUPBOX "Game Genie Code",-1,107,5,69,42
|
||||
EDITTEXT IDC_GAME_GENIE_CODE,115,22,53,14,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Add To Cheat List",IDC_BTN_ADD_TO_CHEATS,108,58,68,14,WS_DISABLED
|
||||
GROUPBOX "Address/Compare/Value",65534,9,5,91,75
|
||||
LTEXT "Address:",65533,18,24,35,8
|
||||
EDITTEXT IDC_GAME_GENIE_ADDR,50,21,36,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_GAME_GENIE_COMP,64,38,22,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_GAME_GENIE_VAL,64,56,22,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_GAME_GENIE_ADDR,50,21,36,14,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
LTEXT "Compare:",65532,17,41,37,8
|
||||
EDITTEXT IDC_GAME_GENIE_COMP,64,38,22,14,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
LTEXT "Value:",65531,18,58,32,8
|
||||
EDITTEXT IDC_GAME_GENIE_VAL,64,56,22,14,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
GROUPBOX "Possible Affected Rom File Addresses",65530,8,83,169,58
|
||||
LISTBOX IDC_LIST_GGADDRESSES,67,95,54,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Add To Cheat List",IDC_BTN_ADD_TO_CHEATS,108,58,68,14,WS_DISABLED
|
||||
END
|
||||
|
||||
MONITOR DIALOGEX 0, 0, 316, 343
|
||||
|
@ -1826,10 +1853,14 @@ BEGIN
|
|||
CONTROL " Piano Roll",IDC_CHECK_PIANO_ROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,68,67,10
|
||||
CONTROL " Selection",IDC_CHECK_SELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,83,67,10
|
||||
GROUPBOX "Greenzone saving options",IDC_STATIC,13,98,97,72
|
||||
CONTROL " all frames",IDC_RADIO_GREENZONE_SAVINGMODE_ALLFRAMES,"Button",BS_AUTORADIOBUTTON,23,109,77,10
|
||||
CONTROL " every 16th frame",IDC_RADIO_GREENZONE_SAVINGMODE_EVERY16FRAME,"Button",BS_AUTORADIOBUTTON,23,124,77,10
|
||||
CONTROL " marked frames",IDC_RADIO_GREENZONE_SAVINGMODE_MARKEDFRAMES,"Button",BS_AUTORADIOBUTTON,23,139,77,10
|
||||
CONTROL " don't save",IDC_RADIO_GREENZONE_SAVINGMODE_DONTSAVE,"Button",BS_AUTORADIOBUTTON,23,154,77,10
|
||||
CONTROL " all frames",IDC_RADIO_GREENZONE_SAVINGMODE_ALLFRAMES,
|
||||
"Button",BS_AUTORADIOBUTTON,23,109,77,10
|
||||
CONTROL " every 16th frame",IDC_RADIO_GREENZONE_SAVINGMODE_EVERY16FRAME,
|
||||
"Button",BS_AUTORADIOBUTTON,23,124,77,10
|
||||
CONTROL " marked frames",IDC_RADIO_GREENZONE_SAVINGMODE_MARKEDFRAMES,
|
||||
"Button",BS_AUTORADIOBUTTON,23,139,77,10
|
||||
CONTROL " don't save",IDC_RADIO_GREENZONE_SAVINGMODE_DONTSAVE,
|
||||
"Button",BS_AUTORADIOBUTTON,23,154,77,10
|
||||
END
|
||||
|
||||
ASSEMBLER DIALOGEX 0, 0, 202, 135
|
||||
|
@ -1837,15 +1868,15 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTI
|
|||
CAPTION "Inline Assembler"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_ASSEMBLER_DISASSEMBLY,27,9,167,12,ES_READONLY
|
||||
COMBOBOX IDC_ASSEMBLER_HISTORY,15,25,180,54,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_ASSEMBLER_DISASSEMBLY,23,9,171,12,ES_READONLY
|
||||
COMBOBOX IDC_ASSEMBLER_HISTORY,7,25,188,54,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Apply",IDC_ASSEMBLER_APPLY,159,114,36,14
|
||||
LTEXT "PC:",-1,15,10,12,10
|
||||
LTEXT "Patch:",-1,15,41,26,9
|
||||
LTEXT "PC:",-1,8,11,12,8
|
||||
LTEXT "Patch:",-1,8,41,22,8
|
||||
PUSHBUTTON "Save...",IDC_ASSEMBLER_SAVE,117,114,36,14
|
||||
PUSHBUTTON "Undo",IDC_ASSEMBLER_UNDO,15,114,35,14
|
||||
DEFPUSHBUTTON "Def",IDC_ASSEMBLER_DEFPUSHBUTTON,55,116,16,12,NOT WS_VISIBLE
|
||||
LISTBOX IDC_ASSEMBLER_PATCH_DISASM,15,50,180,59,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Undo",IDC_ASSEMBLER_UNDO,6,114,36,14
|
||||
DEFPUSHBUTTON "Define",IDC_ASSEMBLER_DEFPUSHBUTTON,46,114,36,14,NOT WS_VISIBLE
|
||||
LISTBOX IDC_ASSEMBLER_PATCH_DISASM,7,50,188,59,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
NAMEBOOKMARKDLG DIALOGEX 0, 0, 186, 73
|
||||
|
@ -1904,7 +1935,7 @@ END
|
|||
PPUVIEW DIALOGEX 44, 38, 353, 234
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "PPU Viewer"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Pattern Tables",GRP_PPUVIEW_TABLES,2,-1,348,185,WS_TABSTOP
|
||||
LTEXT "Tile:",LBL_PPUVIEW_TILE1,6,138,50,9
|
||||
|
@ -1913,7 +1944,7 @@ BEGIN
|
|||
CONTROL "",CTL_PPUVIEW_TRACKBAR,"msctls_trackbar32",WS_TABSTOP,280,151,50,11
|
||||
LTEXT "Less",-1,330,151,18,10
|
||||
LTEXT "Display on scanline:",-1,253,166,65,9
|
||||
EDITTEXT IDC_PPUVIEW_SCANLINE,315,164,27,12
|
||||
EDITTEXT IDC_PPUVIEW_SCANLINE,315,164,27,12,ES_NUMBER
|
||||
CONTROL "Sprites 8x16 mode",IDC_SPRITE16_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,151,160,10
|
||||
CONTROL "Mask unused graphics (Code/Data Logger)",IDC_MASK_UNUSED_GRAPHICS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,162,160,10
|
||||
|
@ -1972,47 +2003,53 @@ BEGIN
|
|||
LTEXT "New Selection Name:",-1,5,240,68,8
|
||||
END
|
||||
|
||||
CHEATCONSOLE DIALOGEX 0, 0, 386, 217
|
||||
CHEATCONSOLE DIALOGEX 0, 0, 387, 226
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Cheat Search"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Active Cheats",IDC_GROUPBOX_CHEATLIST,5,2,169,209,WS_TABSTOP
|
||||
GROUPBOX "Cheat Search",IDC_GROUPBOX_CHEATSEARCH,179,2,201,209,WS_TABSTOP
|
||||
CONTROL "",IDC_LIST_CHEATS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,11,11,157,133
|
||||
LTEXT "Name:",IDC_STATIC,12,149,22,10
|
||||
LTEXT "Value:",IDC_CHEAT_VAL_LABEL,73,163,22,8
|
||||
LTEXT "Compare:",IDC_CHEAT_COM_LABEL,117,163,34,8
|
||||
EDITTEXT IDC_CHEAT_NAME,37,147,131,12,ES_AUTOHSCROLL | ES_WANTRETURN
|
||||
EDITTEXT IDC_CHEAT_ADDR,44,161,25,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
EDITTEXT IDC_CHEAT_VAL,97,161,16,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
EDITTEXT IDC_CHEAT_COM,152,161,16,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
DEFPUSHBUTTON "Add",IDC_BTN_CHEAT_ADD,9,192,36,16
|
||||
PUSHBUTTON "Delete",IDC_BTN_CHEAT_DEL,45,192,36,16
|
||||
PUSHBUTTON "Update",IDC_BTN_CHEAT_UPD,81,192,36,16
|
||||
PUSHBUTTON "Reset",IDC_BTN_CHEAT_RESET,191,12,55,15
|
||||
PUSHBUTTON "Known Value:",IDC_BTN_CHEAT_KNOWN,191,32,55,15
|
||||
LTEXT "0x",IDC_CHEAT_LABEL_KNOWN,216,51,9,8
|
||||
EDITTEXT IDC_CHEAT_VAL_KNOWN,227,49,18,12,ES_UPPERCASE
|
||||
GROUPBOX "Previous Compare",IDC_GROUP_PREV_COM,184,63,69,132
|
||||
PUSHBUTTON "Equal",IDC_BTN_CHEAT_EQ,191,75,55,15,WS_GROUP
|
||||
PUSHBUTTON "Not Equal",IDC_BTN_CHEAT_NE,191,96,55,15
|
||||
CONTROL "By:",IDC_CHEAT_CHECK_NE_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,203,114,22,10
|
||||
EDITTEXT IDC_CHEAT_VAL_NE_BY,227,113,18,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
PUSHBUTTON "Greater Than",IDC_BTN_CHEAT_GT,191,129,55,15
|
||||
CONTROL "By:",IDC_CHEAT_CHECK_GT_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,203,147,22,10
|
||||
EDITTEXT IDC_CHEAT_VAL_GT_BY,227,146,18,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
PUSHBUTTON "Less Than",IDC_BTN_CHEAT_LT,191,162,55,15
|
||||
CONTROL "By:",IDC_CHEAT_CHECK_LT_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,203,180,22,10
|
||||
EDITTEXT IDC_CHEAT_VAL_LT_BY,227,179,18,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
GROUPBOX "Possibilities",IDC_CHEAT_BOX_POSSIBILITIES,257,8,117,187,WS_TABSTOP
|
||||
CONTROL "",IDC_CHEAT_LIST_POSSIBILITIES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,263,18,106,172
|
||||
GROUPBOX "Active Cheats",IDC_GROUPBOX_CHEATLIST,5,2,169,219,WS_TABSTOP
|
||||
CONTROL "Enable cheats",IDC_CHEAT_GLOBAL_SWITCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,12,58,10
|
||||
CONTROL "Auto load / save with game",IDC_CHEAT_AUTOLOADSAVE,
|
||||
"Button",BS_AUTO3STATE | WS_TABSTOP,71,12,100,10
|
||||
CONTROL "",IDC_LIST_CHEATS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,11,24,157,133
|
||||
LTEXT "Name:",IDC_STATIC,12,162,22,10
|
||||
EDITTEXT IDC_CHEAT_NAME,37,160,131,12,ES_AUTOHSCROLL | ES_WANTRETURN
|
||||
LTEXT "Address:",IDC_CHEAT_ADDRESS_LABEL,12,176,30,8
|
||||
EDITTEXT IDC_CHEAT_ADDR,44,174,25,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
LTEXT "Value:",IDC_CHEAT_VAL_LABEL,73,176,22,8
|
||||
EDITTEXT IDC_CHEAT_VAL,97,174,16,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
LTEXT "Compare:",IDC_CHEAT_COM_LABEL,117,176,34,8
|
||||
EDITTEXT IDC_CHEAT_COM,152,174,16,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
LTEXT "Cheat Code:",IDC_CHEAT_CODE_LABEL,12,190,42,8
|
||||
EDITTEXT IDC_CHEAT_TEXT,55,188,47,12,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
LTEXT "GG:",IDC_GAME_GENIE_LABEL,106,191,13,8
|
||||
EDITTEXT IDC_CHEAT_GAME_GENIE_TEXT,120,188,47,12,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "Add",IDC_BTN_CHEAT_ADD,7,202,30,16
|
||||
PUSHBUTTON "Delete",IDC_BTN_CHEAT_DEL,37,202,30,16
|
||||
PUSHBUTTON "Update",IDC_BTN_CHEAT_UPD,67,202,30,16
|
||||
PUSHBUTTON "Import...",IDC_BTN_CHEAT_ADDFROMFILE,100,202,36,16
|
||||
PUSHBUTTON "Export...",IDC_BTN_CHEAT_EXPORTTOFILE,136,202,36,16
|
||||
GROUPBOX "Cheat Search",IDC_GROUPBOX_CHEATSEARCH,180,2,201,206,WS_TABSTOP
|
||||
PUSHBUTTON "Reset",IDC_BTN_CHEAT_RESET,192,12,55,15
|
||||
PUSHBUTTON "Known Value:",IDC_BTN_CHEAT_KNOWN,192,36,55,15
|
||||
LTEXT "0x",IDC_CHEAT_LABEL_KNOWN,217,55,9,8
|
||||
EDITTEXT IDC_CHEAT_VAL_KNOWN,228,53,18,12,ES_UPPERCASE
|
||||
GROUPBOX "Previous Compare",IDC_GROUP_PREV_COM,185,68,69,135
|
||||
PUSHBUTTON "Equal",IDC_BTN_CHEAT_EQ,192,79,55,15,WS_GROUP
|
||||
PUSHBUTTON "Not Equal",IDC_BTN_CHEAT_NE,192,99,55,15
|
||||
CONTROL "By:",IDC_CHEAT_CHECK_NE_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,117,22,10
|
||||
EDITTEXT IDC_CHEAT_VAL_NE_BY,228,116,18,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
PUSHBUTTON "Greater Than",IDC_BTN_CHEAT_GT,192,134,55,15
|
||||
CONTROL "By:",IDC_CHEAT_CHECK_GT_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,152,22,10
|
||||
EDITTEXT IDC_CHEAT_VAL_GT_BY,228,151,18,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
PUSHBUTTON "Less Than",IDC_BTN_CHEAT_LT,192,169,55,15
|
||||
CONTROL "By:",IDC_CHEAT_CHECK_LT_BY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,187,22,10
|
||||
EDITTEXT IDC_CHEAT_VAL_LT_BY,228,186,18,12,ES_UPPERCASE | ES_WANTRETURN
|
||||
GROUPBOX "Possibilities",IDC_CHEAT_BOX_POSSIBILITIES,258,8,117,195,WS_TABSTOP
|
||||
CONTROL "",IDC_CHEAT_LIST_POSSIBILITIES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,264,18,106,179
|
||||
CONTROL "Pause emulation when this window is active",IDC_CHEAT_PAUSEWHENACTIVE,
|
||||
"Button",BS_AUTOCHECKBOX,185,198,157,10
|
||||
PUSHBUTTON "Import...",IDC_BTN_CHEAT_ADDFROMFILE,126,192,43,16
|
||||
EDITTEXT IDC_CHEAT_TEXT,105,175,63,12,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
LTEXT "Address:",IDC_CHEAT_ADDRESS_LABEL,12,163,30,8
|
||||
LTEXT "Cheat code / Game Genie:",IDC_CHEAT_CODE_GG_LABEL,12,177,87,8
|
||||
"Button",BS_AUTOCHECKBOX,180,211,157,10
|
||||
END
|
||||
|
||||
IDD_LUA DIALOGEX 0, 0, 270, 150
|
||||
|
@ -2035,9 +2072,9 @@ BEGIN
|
|||
END
|
||||
|
||||
VIDEOCONFIG DIALOGEX 65520, 76, 511, 170
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Video Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Full Screen Settings",65453,5,3,171,141,WS_GROUP
|
||||
CONTROL "Full Screen (Alt + Enter or double-click)",IDC_VIDEOCONFIG_FS,
|
||||
|
@ -2047,9 +2084,9 @@ BEGIN
|
|||
LTEXT "Sync method:",65452,11,108,46,10
|
||||
COMBOBOX IDC_VIDEOCONFIG_SYNC_METHOD_FS,59,106,105,50,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
LTEXT "Mode:",13,11,67,23,9
|
||||
EDITTEXT IDC_VIDEOCONFIG_XRES,36,65,27,13,ES_RIGHT
|
||||
EDITTEXT IDC_VIDEOCONFIG_XRES,36,65,27,13,ES_RIGHT | ES_NUMBER
|
||||
LTEXT "by",12,67,67,11,9
|
||||
EDITTEXT IDC_VIDEOCONFIG_YRES,79,65,27,13,ES_RIGHT
|
||||
EDITTEXT IDC_VIDEOCONFIG_YRES,79,65,27,13,ES_RIGHT | ES_NUMBER
|
||||
LTEXT "@",11,110,67,11,9
|
||||
COMBOBOX IDC_VIDEOCONFIG_BPP,122,65,32,12,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
LTEXT "bpp",10,157,67,14,9
|
||||
|
@ -2074,10 +2111,10 @@ BEGIN
|
|||
LTEXT "Last line:",65435,367,84,40,9
|
||||
CTEXT "NTSC",65434,413,57,27,8
|
||||
CTEXT "PAL/Dendy",65433,455,57,48,8
|
||||
EDITTEXT IDC_SCANLINE_FIRST_NTSC,414,66,27,12,ES_RIGHT
|
||||
EDITTEXT IDC_SCANLINE_LAST_NTSC,414,83,27,12,ES_RIGHT
|
||||
EDITTEXT IDC_SCANLINE_FIRST_PAL,465,66,27,12,ES_RIGHT
|
||||
EDITTEXT IDC_SCANLINE_LAST_PAL,465,83,27,12,ES_RIGHT
|
||||
EDITTEXT IDC_SCANLINE_FIRST_NTSC,414,66,27,12,ES_RIGHT | ES_NUMBER
|
||||
EDITTEXT IDC_SCANLINE_LAST_NTSC,414,83,27,12,ES_RIGHT | ES_NUMBER
|
||||
EDITTEXT IDC_SCANLINE_FIRST_PAL,465,66,27,12,ES_RIGHT | ES_NUMBER
|
||||
EDITTEXT IDC_SCANLINE_LAST_PAL,465,83,27,12,ES_RIGHT | ES_NUMBER
|
||||
CONTROL "Clip left and right sides (8 px on each)",IDC_VIDEOCONFIG_CLIPSIDES,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,357,98,140,12
|
||||
DEFPUSHBUTTON "Close",ID_CANCEL,449,150,56,14
|
||||
|
@ -2169,9 +2206,9 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
|
|||
CAPTION " Edit Watch"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CTEXT "Address:",IDC_SPECIFICADDRESS,15,12,30,8
|
||||
CTEXT "&Address:",IDC_SPECIFICADDRESS,15,12,30,8
|
||||
EDITTEXT IDC_EDIT_COMPAREADDRESS,48,10,65,12,ES_UPPERCASE | ES_AUTOHSCROLL
|
||||
CTEXT "Notes:",IDC_PROMPT_TEXT,23,24,22,8
|
||||
CTEXT "&Notes:",IDC_PROMPT_TEXT,23,24,22,8
|
||||
EDITTEXT IDC_PROMPT_EDIT,48,22,119,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "Data Type",IDC_DATATYPE_GROUPBOX,14,37,75,51,0,WS_EX_TRANSPARENT
|
||||
CONTROL "&Signed",IDC_SIGNED,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,18,47,67,9
|
||||
|
@ -2183,13 +2220,13 @@ BEGIN
|
|||
CONTROL "&2 bytes",IDC_2_BYTES,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,98,57,61,11
|
||||
CONTROL "&4 bytes",IDC_4_BYTES,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,98,67,61,11
|
||||
DEFPUSHBUTTON "&OK",IDOK,66,90,50,14
|
||||
PUSHBUTTON "&Cancel",IDCANCEL,120,90,50,14
|
||||
PUSHBUTTON "&Cancel",IDCANCEL,120,90,50,147
|
||||
END
|
||||
|
||||
DLG_SNESPAD DIALOGEX 4, 109, 243, 121
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Gamepad Configuration"
|
||||
FONT 8, "Tahoma", 0, 0, 0x0
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",BTN_CLOSE,177,97,56,14
|
||||
GROUPBOX "",GRP_GAMEPAD1,4,8,232,82,WS_GROUP
|
||||
|
@ -2222,10 +2259,14 @@ BEGIN
|
|||
CONTROL " Selection",IDC_CHECK_SELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,122,92,67,10
|
||||
GROUPBOX "File contents",IDC_STATIC,105,4,111,177
|
||||
GROUPBOX "Greenzone saving options",IDC_STATIC,112,106,97,69
|
||||
CONTROL " all frames",IDC_RADIO_GREENZONE_SAVINGMODE_ALLFRAMES,"Button",BS_AUTORADIOBUTTON,122,117,77,10
|
||||
CONTROL " every 16th frame", IDC_RADIO_GREENZONE_SAVINGMODE_EVERY16FRAME,"Button",BS_AUTORADIOBUTTON,122,131,77,10
|
||||
CONTROL " marked frames", IDC_RADIO_GREENZONE_SAVINGMODE_MARKEDFRAMES,"Button",BS_AUTORADIOBUTTON,122,145,77,10
|
||||
CONTROL " don't save", IDC_RADIO_GREENZONE_SAVINGMODE_DONTSAVE,"Button",BS_AUTORADIOBUTTON,122,159,77,10
|
||||
CONTROL " all frames",IDC_RADIO_GREENZONE_SAVINGMODE_ALLFRAMES,
|
||||
"Button",BS_AUTORADIOBUTTON,122,117,77,10
|
||||
CONTROL " every 16th frame",IDC_RADIO_GREENZONE_SAVINGMODE_EVERY16FRAME,
|
||||
"Button",BS_AUTORADIOBUTTON,122,131,77,10
|
||||
CONTROL " marked frames",IDC_RADIO_GREENZONE_SAVINGMODE_MARKEDFRAMES,
|
||||
"Button",BS_AUTORADIOBUTTON,122,145,77,10
|
||||
CONTROL " don't save",IDC_RADIO_GREENZONE_SAVINGMODE_DONTSAVE,
|
||||
"Button",BS_AUTORADIOBUTTON,122,159,77,10
|
||||
CONTROL " Autosave project",IDC_AUTOSAVE_PROJECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,17,81,10
|
||||
CONTROL " silently",IDC_SILENT_AUTOSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,47,42,10
|
||||
LTEXT "every",IDC_AUTOSAVE_PERIOD_EVERY_TEXT,14,32,21,8
|
||||
|
@ -2260,6 +2301,73 @@ BEGIN
|
|||
CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,311,214
|
||||
END
|
||||
|
||||
IDD_EDIT_HEADER DIALOGEX 0, 0, 321, 258
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "iNES Header Editor"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "iNES Header",IDC_INESHEADER_GROUP,6,3,309,231,WS_DISABLED
|
||||
GROUPBOX "Version",IDC_VERSION_GROUP,14,13,79,27,WS_DISABLED
|
||||
CONTROL "iNES",IDC_RADIO_VERSION_STANDARD,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP | WS_TABSTOP,20,24,27,10
|
||||
CONTROL "NES 2.0",IDC_RADIO_VERSION_INES20,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,51,24,38,10
|
||||
GROUPBOX "Mapper",IDC_MAPPER_GROUP,98,13,210,27,WS_DISABLED
|
||||
LTEXT "Mapper#:",IDC_MAPPER_TEXT,104,24,33,8,WS_DISABLED
|
||||
COMBOBOX IDC_MAPPER_COMBO,139,22,115,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Sub#:",IDC_SUBMAPPER_TEXT,261,24,21,8,WS_DISABLED
|
||||
EDITTEXT IDC_SUBMAPPER_EDIT,284,21,15,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
|
||||
GROUPBOX "PRG",IDC_PRG_GROUP,14,42,294,27,WS_DISABLED
|
||||
LTEXT "PRG ROM:",IDC_PRGROM_TEXT,20,53,34,8,WS_DISABLED
|
||||
COMBOBOX IDC_PRGROM_COMBO,57,51,46,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_UPPERCASE | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "PRG RAM:",IDC_PRGRAM_TEXT,115,53,34,8,WS_DISABLED
|
||||
COMBOBOX IDC_PRGRAM_COMBO,151,51,46,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_UPPERCASE | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Battery-backed NVRAM",IDC_CHECK_BATTERYNVRAM,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,211,53,86,10
|
||||
LTEXT "PRG NVRAM:",IDC_PRGNVRAM_TEXT,208,53,42,8,WS_DISABLED
|
||||
COMBOBOX IDC_PRGNVRAM_COMBO,253,51,46,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_UPPERCASE | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "CHR",IDC_CHR_GROUP,14,71,294,27,WS_DISABLED
|
||||
LTEXT "CHR ROM:",IDC_CHRROM_TEXT,20,82,35,8,WS_DISABLED
|
||||
COMBOBOX IDC_CHRROM_COMBO,57,80,46,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_UPPERCASE | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "CHR RAM:",IDC_CHRRAM_TEXT,115,82,34,8,WS_DISABLED
|
||||
COMBOBOX IDC_CHRRAM_COMBO,151,80,46,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_UPPERCASE | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "CHR NVRAM:",IDC_CHRNVRAM_TEXT,207,82,43,8,WS_DISABLED
|
||||
COMBOBOX IDC_CHRNVRAM_COMBO,253,80,46,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_UPPERCASE | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Mirroring",IDC_MIRRORING_GROUP,14,102,59,46,WS_DISABLED
|
||||
CONTROL "Horizontal",IDC_RADIO_MIRR_HORIZONTAL,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP | WS_TABSTOP,19,112,48,10
|
||||
CONTROL "Vertical",IDC_RADIO_MIRR_VERTICAL,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,19,123,39,10
|
||||
CONTROL "Four-screen",IDC_RADIO_MIRR_4SCREEN,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,19,134,51,10
|
||||
CONTROL "Trainer",IDC_CHECK_TRAINER,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,14,152,55,10
|
||||
GROUPBOX "Region",IDC_REGION_GROUP,78,102,40,58,WS_DISABLED
|
||||
CONTROL "NTSC",IDC_RADIO_REGION_NTSC,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP | WS_TABSTOP,83,112,29,10
|
||||
CONTROL "PAL",IDC_RADIO_REGION_PAL,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,83,123,28,10
|
||||
CONTROL "Dual",IDC_RADIO_REGION_DUAL,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,83,146,30,10
|
||||
CONTROL "Dendy",IDC_RADIO_REGION_DENDY,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,83,134,33,10
|
||||
GROUPBOX "System",IDC_SYSTEM_GROUP,123,102,184,109,WS_DISABLED
|
||||
CONTROL "Normal",IDC_RADIO_SYSTEM_NORMAL,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP | WS_TABSTOP,129,114,34,10
|
||||
CONTROL "VS. Sys",IDC_RADIO_SYSTEM_VS,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,167,114,37,10
|
||||
CONTROL "Playchoice-10",IDC_RADIO_SYSTEM_PLAYCHOICE10,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,208,114,56,10
|
||||
CONTROL "Extend",IDC_RADIO_SYSTEM_EXTEND,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,268,114,35,10
|
||||
GROUPBOX "Extend System",IDC_EXTEND_SYSTEM_GROUP,130,176,171,29,WS_DISABLED
|
||||
LTEXT "Console:",IDC_EXTEND_SYSTEM_TEXT,136,189,29,8,WS_DISABLED
|
||||
COMBOBOX IDC_SYSTEM_EXTEND_COMBO,168,186,127,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "VS. System",IDC_VS_SYSTEM_GROUP,130,126,171,46,WS_DISABLED
|
||||
LTEXT "Hardware:",IDC_VS_SYSTEM_TEXT,136,138,35,8,WS_DISABLED
|
||||
COMBOBOX IDC_VS_SYSTEM_COMBO,174,136,121,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "PPU:",IDC_VS_PPU_TEXT,136,155,16,8,WS_DISABLED
|
||||
COMBOBOX IDC_VS_PPU_COMBO,155,154,140,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "iNES 1.0 Unofficial Properties",IDC_CHECK_UNOFFICIAL,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,14,164,103,10
|
||||
GROUPBOX "iNES 1.0 Unofficial Properties",IDC_UNOFFICIAL_GROUP,13,176,104,35,WS_DISABLED
|
||||
CONTROL "Dual region",IDC_CHECK_UNOFFICIAL_EXTRA_REGION,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,19,186,48,10
|
||||
CONTROL "PRG RAM exists",IDC_CHECK_UNOFFICIAL_PRGRAM,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,70,188,43,17
|
||||
CONTROL "Bus conflict",IDC_CHECK_UNOFFICIAL_BUS_CONFLICT,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,19,198,49,10
|
||||
LTEXT "Input device:",IDC_INPUT_DEVICE_TEXT,106,218,44,8,WS_DISABLED
|
||||
COMBOBOX IDC_INPUT_DEVICE_COMBO,153,216,154,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Misc. ROM(s)",IDC_MISCELLANEOUS_ROMS_TEXT,29,218,48,8,WS_DISABLED
|
||||
EDITTEXT IDC_MISCELLANEOUS_ROMS_EDIT,14,215,12,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
|
||||
PUSHBUTTON "Restore",IDC_RESTORE_BUTTON,6,237,44,14,WS_DISABLED
|
||||
PUSHBUTTON "Save as...",IDSAVE,223,237,44,14,WS_DISABLED
|
||||
DEFPUSHBUTTON "Close",IDCLOSE,270,237,44,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -2276,6 +2384,14 @@ BEGIN
|
|||
TOPMARGIN, 8
|
||||
END
|
||||
|
||||
"DWBDIALOG", DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
"FKBDIALOG", DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
"GAMEPADDIALOG", DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
@ -2292,6 +2408,10 @@ BEGIN
|
|||
BOTTOMMARGIN, 191
|
||||
END
|
||||
|
||||
"MAHJONGDIALOG", DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
"NETMOO", DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 10
|
||||
|
@ -2332,6 +2452,10 @@ BEGIN
|
|||
BOTTOMMARGIN, 217
|
||||
END
|
||||
|
||||
"DWBDIALOGSIMPLE", DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
"MEMWATCH", DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 260
|
||||
|
@ -2349,8 +2473,8 @@ BEGIN
|
|||
|
||||
"ADDBP", DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 185
|
||||
BOTTOMMARGIN, 121
|
||||
RIGHTMARGIN, 195
|
||||
BOTTOMMARGIN, 123
|
||||
END
|
||||
|
||||
"NTVIEW", DIALOG
|
||||
|
@ -2391,6 +2515,26 @@ BEGIN
|
|||
BEGIN
|
||||
END
|
||||
|
||||
IDD_TASEDITOR_ABOUT, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
IDD_TASEDITOR_NEWPROJECT, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
IDD_TASEDITOR_EXPORT, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
IDD_TASEDITOR_FINDNOTE, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
IDD_TASEDITOR_SAVECOMPACT, DIALOG
|
||||
BEGIN
|
||||
END
|
||||
|
||||
"ASSEMBLER", DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
|
@ -2433,8 +2577,8 @@ BEGIN
|
|||
|
||||
"CHEATCONSOLE", DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 385
|
||||
BOTTOMMARGIN, 216
|
||||
RIGHTMARGIN, 386
|
||||
BOTTOMMARGIN, 225
|
||||
END
|
||||
|
||||
"VIDEOCONFIG", DIALOG
|
||||
|
@ -2474,6 +2618,14 @@ BEGIN
|
|||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 243
|
||||
END
|
||||
|
||||
IDD_EDIT_HEADER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 314
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 251
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
@ -2513,6 +2665,36 @@ BEGIN
|
|||
0
|
||||
END
|
||||
|
||||
IDD_EDIT_HEADER AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
ADDBP AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
MEMWATCH AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
ASSEMBLER AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
MEMVIEWFIND AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
VIDEOCONFIG AFX_DIALOG_LAYOUT
|
||||
BEGIN
|
||||
0
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -2684,41 +2866,7 @@ IDB_BITMAP_SELECTED17 BITMAP "res\\te_17_selected.bmp"
|
|||
IDB_BITMAP_SELECTED18 BITMAP "res\\te_18_selected.bmp"
|
||||
IDB_BITMAP_SELECTED19 BITMAP "res\\te_19_selected.bmp"
|
||||
IDB_BRANCH_SPRITESHEET BITMAP "res\\branch_spritesheet.bmp"
|
||||
#endif // Neutral resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S) resources
|
||||
#endif // English(U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -2729,6 +2877,7 @@ END
|
|||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated file
|
||||
// Microsoft Visual C++ generated include file
|
||||
// for res.rc
|
||||
//
|
||||
#define CLOSE_BUTTON 1
|
||||
|
@ -365,6 +365,7 @@
|
|||
#define MENU_MV_VIEW_ROM 303
|
||||
#define IDC_BTN_CHEAT_UPD 303
|
||||
#define IDC_DEBUGGER_DISASSEMBLY_LEFT_PANEL 303
|
||||
#define IDD_EDIT_HEADER 303
|
||||
#define MENU_ENABLE_AUTOSAVE 304
|
||||
#define IDC_LABEL_ROMUSED 304
|
||||
#define IDC_BTN_CHEAT_RESET 304
|
||||
|
@ -441,19 +442,21 @@
|
|||
#define IDC_GAME_GENIE_CODE 1000
|
||||
#define IDC_MEMVIEWFIND_WHAT 1000
|
||||
#define IDC_BOOKMARK_DESCRIPTION 1000
|
||||
#define MW_NAME00 1000
|
||||
#define MW_ADDR00 1001
|
||||
#define IDC_GAME_GENIE_ADDR 1001
|
||||
#define IDC_MEMVIEWFIND_TYPE_HEX 1001
|
||||
#define IDC_NTVIEW_MIRROR_HORIZONTAL 1001
|
||||
#define IDC_CHECK_STOPMOVIE 1002
|
||||
#define IDC_GAME_GENIE_COMP 1002
|
||||
#define IDC_MEMVIEWFIND_TYPE_TEXT 1002
|
||||
#define IDC_NTVIEW_MIRROR_VERTICAL 1002
|
||||
#define MW_VAL00 1002
|
||||
#define LV_MAPPING 1003
|
||||
#define IDC_EDIT_STOPFRAME 1003
|
||||
#define IDC_GAME_GENIE_VAL 1003
|
||||
#define IDC_MEMVIEWFIND_DIR_UP 1003
|
||||
#define IDC_NTVIEW_MIRROR_FOUR_SCREEN 1003
|
||||
#define MW_NAME01 1003
|
||||
#define MW_ADDR01 1004
|
||||
#define IDC_LIST_GGADDRESSES 1004
|
||||
#define IDC_MEMVIEWFIND_DIR_DOWN 1004
|
||||
|
@ -461,43 +464,161 @@
|
|||
#define IDC_BTN_ADD_TO_CHEATS 1005
|
||||
#define IDC_MEMVIEWFIND_NEXT 1005
|
||||
#define IDC_NTVIEW_MIRROR_SS_TABLE_1 1005
|
||||
#define MW_VAL01 1005
|
||||
#define IDC_NTVIEW_MIRROR_SS_TABLE_2 1006
|
||||
#define MW_NAME02 1006
|
||||
#define MW_ADDR02 1007
|
||||
#define IDC_NTVIEW_MIRROR_SS_TABLE_3 1007
|
||||
#define IDC_NTVIEW_SHOW_SCROLL_LINES 1008
|
||||
#define MW_VAL02 1008
|
||||
#define IDC_NTVIEW_SHOW_ATTRIBUTES 1009
|
||||
#define MW_NAME03 1009
|
||||
#define IDC_NTVIEW_HIDE_PALETTES 1010
|
||||
#define MW_ADDR03 1010
|
||||
#define IDC_BTN_CHEAT_EXPORTTOFILE 1011
|
||||
#define MW_VAL03 1011
|
||||
#define IDSAVE 1012
|
||||
#define MW_NAME04 1012
|
||||
#define MW_ADDR04 1013
|
||||
#define IDC_CHECK1 1013
|
||||
#define IDC_CHEAT_AUTOLOADSAVE 1013
|
||||
#define IDC_RESTORE_BUTTON 1014
|
||||
#define MW_VAL04 1014
|
||||
#define MW_NAME05 1015
|
||||
#define MW_ADDR05 1016
|
||||
#define MW_VAL05 1017
|
||||
#define IDC_PRGROM_COMBO 1018
|
||||
#define MW_NAME06 1018
|
||||
#define MW_ADDR06 1019
|
||||
#define IDC_CHRROM_COMBO 1019
|
||||
#define IDC_RADIO_MIRR_HORIZONTAL 1020
|
||||
#define MW_VAL06 1020
|
||||
#define IDC_RADIO_MIRR_VERTICAL 1021
|
||||
#define MW_NAME07 1021
|
||||
#define MW_ADDR07 1022
|
||||
#define IDC_RADIO_MIRR_4SCREEN 1022
|
||||
#define MW_VAL07 1023
|
||||
#define IDC_CHECK_TRAINER 1024
|
||||
#define MW_NAME08 1024
|
||||
#define MW_ADDR08 1025
|
||||
#define IDC_PRGRAM_COMBO 1025
|
||||
#define IDC_MAPPER_COMBO 1026
|
||||
#define MW_VAL08 1026
|
||||
#define IDC_SUBMAPPER_EDIT 1027
|
||||
#define MW_NAME09 1027
|
||||
#define MW_ADDR09 1028
|
||||
#define IDC_CHRRAM_COMBO 1028
|
||||
#define IDC_PRGNVRAM_COMBO 1029
|
||||
#define MW_VAL09 1029
|
||||
#define IDC_CHRNVRAM_COMBO 1030
|
||||
#define MW_NAME10 1030
|
||||
#define MW_ADDR10 1031
|
||||
#define IDC_RADIO_REGION_NTSC 1031
|
||||
#define IDC_RADIO_REGION_PAL 1032
|
||||
#define MW_VAL10 1032
|
||||
#define IDC_RADIO_REGION_DUAL 1033
|
||||
#define MW_NAME11 1033
|
||||
#define MW_ADDR11 1034
|
||||
#define MW_VAL11 1035
|
||||
#define IDC_INPUT_DEVICE_COMBO 1036
|
||||
#define MW_NAME12 1036
|
||||
#define MW_ADDR12 1037
|
||||
#define IDC_RADIO_REGION_DENDY 1037
|
||||
#define IDC_RADIO_SYSTEM_NORMAL 1038
|
||||
#define MW_VAL12 1038
|
||||
#define IDC_RADIO_SYSTEM_VS 1039
|
||||
#define MW_NAME13 1039
|
||||
#define MW_ADDR13 1040
|
||||
#define IDC_RADIO_SYSTEM_PLAYCHOICE10 1040
|
||||
#define IDC_RADIO_SYSTEM_EXTEND 1041
|
||||
#define MW_VAL13 1041
|
||||
#define MW_NAME14 1042
|
||||
#define MW_ADDR14 1043
|
||||
#define IDC_SYSTEM_EXTEND_COMBO 1043
|
||||
#define MW_VAL14 1044
|
||||
#define MW_NAME15 1045
|
||||
#define MW_ADDR15 1046
|
||||
#define IDC_VS_SYSTEM_COMBO 1046
|
||||
#define IDC_VS_PPU_COMBO 1047
|
||||
#define MW_VAL15 1047
|
||||
#define MW_NAME16 1048
|
||||
#define MW_ADDR16 1049
|
||||
#define IDC_MAPPER_TEXT 1049
|
||||
#define IDC_SUBMAPPER_TEXT 1050
|
||||
#define MW_VAL16 1050
|
||||
#define IDC_PRGROM_TEXT 1051
|
||||
#define MW_NAME17 1051
|
||||
#define MW_ADDR17 1052
|
||||
#define IDC_CHRROM_TEXT 1053
|
||||
#define MW_VAL17 1053
|
||||
#define MW_NAME18 1054
|
||||
#define MW_ADDR18 1055
|
||||
#define IDC_PRGRAM_TEXT 1055
|
||||
#define MW_VAL18 1056
|
||||
#define IDC_CHRRAM_TEXT 1057
|
||||
#define MW_NAME19 1057
|
||||
#define MW_ADDR19 1058
|
||||
#define IDC_PRGNVRAM_TEXT 1059
|
||||
#define MW_VAL19 1059
|
||||
#define IDC_CHRNVRAM_TEXT 1060
|
||||
#define MW_NAME20 1060
|
||||
#define MW_ADDR20 1061
|
||||
#define MW_VAL20 1062
|
||||
#define IDC_INESHEADER_GROUP 1063
|
||||
#define MW_NAME21 1063
|
||||
#define MW_ADDR21 1064
|
||||
#define IDC_MIRRORING_GROUP 1064
|
||||
#define IDC_REGION_GROUP 1065
|
||||
#define MW_VAL21 1065
|
||||
#define IDC_SYSTEM_GROUP 1066
|
||||
#define MW_NAME22 1066
|
||||
#define MW_ADDR22 1067
|
||||
#define IDC_VS_SYSTEM_GROUP 1067
|
||||
#define IDC_VS_SYSTEM_TEXT 1068
|
||||
#define MW_VAL22 1068
|
||||
#define IDC_VS_PPU_TEXT 1069
|
||||
#define MW_NAME23 1069
|
||||
#define MW_ADDR23 1070
|
||||
#define IDC_RADIO_VERSION_STANDARD 1071
|
||||
#define MW_VAL23 1071
|
||||
#define IDC_RADIO_VERSION_INES20 1073
|
||||
#define IDC_VERSION_GROUP 1074
|
||||
#define IDC_MAPPER_GROUP 1075
|
||||
#define IDC_CHECK_BATTERYNVRAM 1076
|
||||
#define IDC_INPUT_DEVICE_TEXT 1077
|
||||
#define IDC_PRG_GROUP 1078
|
||||
#define IDC_CHR_GROUP 1079
|
||||
#define IDC_UNOFFICIAL_GROUP 1081
|
||||
#define IDC_CHECK_UNOFFICIAL_PRGRAM 1082
|
||||
#define IDC_CHECK_UNOFFICIAL_EXTRA_REGION 1083
|
||||
#define IDC_CHECK_UNOFFICIAL_BUS_CONFLICT 1084
|
||||
#define IDC_CHECK_UNOFFICIAL 1085
|
||||
#define IDC_MISCELLANEOUS_ROMS_TEXT 1086
|
||||
#define IDC_MISCELLANEOUS_ROMS_EDIT 1087
|
||||
#define IDC_EXTEND_SYSTEM_GROUP 1089
|
||||
#define IDC_EXTEND_SYSTEM_TEXT 1090
|
||||
#define IDC_BUTTON1 1094
|
||||
#define IDC_CHEAT_SWITCH 1096
|
||||
#define IDC_CHEAT_GLOBAL_SWITCH 1096
|
||||
#define IDC_GAME_GENIE_LABEL 1097
|
||||
#define IDC_CHEAT_GAME_GENIE_TEXT 1098
|
||||
#define IDC_CHECK2 1099
|
||||
#define BTN_ALLOW_LRUD 1117
|
||||
#define IDC_PRGROM_EDIT 1118
|
||||
#define IDC_CHRROM_EDIT 1119
|
||||
#define BTN_PRESET_SET1 1119
|
||||
#define BTN_PRESET_SET2 1120
|
||||
#define BTN_PRESET_SET3 1121
|
||||
#define BTN_PRESET_IMPORT1 1122
|
||||
#define BTN_PRESET_IMPORT2 1123
|
||||
#define BTN_PRESET_IMPORT3 1124
|
||||
#define IDC_PRGRAM_EDIT 1125
|
||||
#define BTN_PRESET_EXPORT1 1125
|
||||
#define BTN_PRESET_EXPORT2 1126
|
||||
#define BTN_PRESET_EXPORT3 1127
|
||||
#define IDC_CHRRAM_EDIT 1128
|
||||
#define IDC_PRGNVRAM_EDIT 1129
|
||||
#define IDC_CHRNVRAM_EDIT 1130
|
||||
#define IDC_LIST1 1130
|
||||
#define IDC_BUTTON_METADATA 1132
|
||||
#define MEMW_EXPANDCOLLAPSE 1133
|
||||
|
@ -699,12 +820,14 @@
|
|||
#define IDC_EXTRA_SCANLINES_TEXT 1309
|
||||
#define IDC_DATASIZE_GROUPBOX 1310
|
||||
#define IDC_DATATYPE_GROUPBOX 1311
|
||||
#define IDC_CHEAT_CODE_GG_LABEL 1312
|
||||
#define IDC_CHEAT_CODE_LABEL 1312
|
||||
#define IDC_CHEAT_ADDRESS_LABEL 1313
|
||||
#define IDC_CHEAT_VAL_LABEL 1314
|
||||
#define IDC_CHEAT_COM_LABEL 1315
|
||||
#define IDC_CHEAT_LABEL_KNOWN 1316
|
||||
#define IDC_BINARY 1317
|
||||
#define IDC_GAME_GENIE_ADDR 1501
|
||||
#define MENU_INESHEADEREDITOR 40001
|
||||
#define MENU_NETWORK 40040
|
||||
#define MENU_PALETTE 40041
|
||||
#define MENU_SOUND 40042
|
||||
|
@ -998,9 +1121,9 @@
|
|||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 303
|
||||
#define _APS_NEXT_COMMAND_VALUE 40000
|
||||
#define _APS_NEXT_CONTROL_VALUE 1011
|
||||
#define _APS_NEXT_RESOURCE_VALUE 305
|
||||
#define _APS_NEXT_COMMAND_VALUE 40002
|
||||
#define _APS_NEXT_CONTROL_VALUE 1100
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -299,11 +299,11 @@ BOOL CALLBACK newProjectProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM l
|
|||
break;
|
||||
case IDC_COPY_INPUT:
|
||||
p->copyCurrentInput ^= 1;
|
||||
CheckDlgButton(hwndDlg, IDC_COPY_INPUT, p->copyCurrentInput?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_COPY_INPUT, p->copyCurrentInput? BST_CHECKED : BST_UNCHECKED);
|
||||
break;
|
||||
case IDC_COPY_MARKERS:
|
||||
p->copyCurrentMarkers ^= 1;
|
||||
CheckDlgButton(hwndDlg, IDC_COPY_MARKERS, p->copyCurrentMarkers?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_COPY_MARKERS, p->copyCurrentMarkers? BST_CHECKED : BST_UNCHECKED);
|
||||
break;
|
||||
case IDOK:
|
||||
{
|
||||
|
@ -792,7 +792,7 @@ BOOL CALLBACK ExportProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lPara
|
|||
break;
|
||||
}
|
||||
}
|
||||
CheckDlgButton(hwndDlg, IDC_NOTES_TO_SUBTITLES, taseditorConfig.lastExportedSubtitlesStatus?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_NOTES_TO_SUBTITLES, taseditorConfig.lastExportedSubtitlesStatus ? BST_CHECKED : BST_UNCHECKED);
|
||||
return TRUE;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
|
@ -808,7 +808,7 @@ BOOL CALLBACK ExportProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lPara
|
|||
break;
|
||||
case IDC_NOTES_TO_SUBTITLES:
|
||||
taseditorConfig.lastExportedSubtitlesStatus ^= 1;
|
||||
CheckDlgButton(hwndDlg, IDC_NOTES_TO_SUBTITLES, taseditorConfig.lastExportedSubtitlesStatus?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_NOTES_TO_SUBTITLES, taseditorConfig.lastExportedSubtitlesStatus ? BST_CHECKED : BST_UNCHECKED);
|
||||
break;
|
||||
case IDOK:
|
||||
EndDialog(hwndDlg, 1);
|
||||
|
|
|
@ -630,7 +630,7 @@ BOOL CALLBACK findNoteWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
|
|||
if (taseditorConfig.findnoteWindowY == -32000) taseditorConfig.findnoteWindowY = 0;
|
||||
SetWindowPos(hwndDlg, 0, taseditorConfig.findnoteWindowX, taseditorConfig.findnoteWindowY, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
|
||||
CheckDlgButton(hwndDlg, IDC_MATCH_CASE, taseditorConfig.findnoteMatchCase?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_MATCH_CASE, taseditorConfig.findnoteMatchCase ? BST_CHECKED : BST_UNCHECKED);
|
||||
if (taseditorConfig.findnoteSearchUp)
|
||||
Button_SetCheck(GetDlgItem(hwndDlg, IDC_RADIO_UP), BST_CHECKED);
|
||||
else
|
||||
|
@ -680,7 +680,7 @@ BOOL CALLBACK findNoteWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
|
|||
break;
|
||||
case IDC_MATCH_CASE:
|
||||
taseditorConfig.findnoteMatchCase ^= 1;
|
||||
CheckDlgButton(hwndDlg, IDC_MATCH_CASE, taseditorConfig.findnoteMatchCase?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckDlgButton(hwndDlg, IDC_MATCH_CASE, taseditorConfig.findnoteMatchCase? BST_CHECKED : BST_UNCHECKED);
|
||||
break;
|
||||
case IDOK:
|
||||
{
|
||||
|
|
|
@ -1288,6 +1288,11 @@ BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
EnableWindow(GetDlgItem(hwndDlg, IDC_TVASPECT_Y), eoptions&EO_TVASPECT);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_SLASHTEXT), eoptions&EO_TVASPECT);
|
||||
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_WINSIZE_MUL_X), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_WINSIZE_MUL_Y), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_TVASPECT_X), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_TVASPECT_Y), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_CLOSE:
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "memview.h"
|
||||
#include "tracer.h"
|
||||
#include "cdlogger.h"
|
||||
#include "header_editor.h"
|
||||
#include "throttle.h"
|
||||
#include "monitor.h"
|
||||
#include "keyboard.h"
|
||||
|
@ -100,7 +101,7 @@ using namespace std;
|
|||
|
||||
//Handles----------------------------------------------
|
||||
static HMENU fceumenu = 0; //Main menu.
|
||||
HWND pwindow; //Client Area
|
||||
// HWND pwindow; //Client Area
|
||||
HMENU recentmenu; //Recent Menu
|
||||
HMENU recentluamenu; //Recent Lua Files Menu
|
||||
HMENU recentmoviemenu; //Recent Movie Files Menu
|
||||
|
@ -181,6 +182,7 @@ const unsigned int MAX_NUMBER_OF_MOVIE_RECENT_FILES = sizeof(recent_movie)/sizeo
|
|||
|
||||
int EnableBackgroundInput = 0;
|
||||
int ismaximized = 0;
|
||||
WNDPROC DefaultEditCtrlProc;
|
||||
|
||||
//Help Menu subtopics
|
||||
string moviehelp = "MovieRecording"; //Movie Recording
|
||||
|
@ -366,8 +368,9 @@ void CalcWindowSize(RECT *al)
|
|||
|
||||
/// Updates the menu items that should only be enabled if a game is loaded.
|
||||
/// @param enable Flag that indicates whether the menus should be enabled (1) or disabled (0).
|
||||
void updateGameDependentMenus(unsigned int enable)
|
||||
void updateGameDependentMenus()
|
||||
{
|
||||
// they are quite simple, enabled only when game is loaded
|
||||
const int menu_ids[]= {
|
||||
MENU_CLOSE_FILE,
|
||||
ID_FILE_SCREENSHOT,
|
||||
|
@ -395,10 +398,14 @@ void updateGameDependentMenus(unsigned int enable)
|
|||
ID_TOOLS_TEXTHOOKER
|
||||
};
|
||||
|
||||
bool enable = GameInfo != 0;
|
||||
for (unsigned int i = 0; i < sizeof(menu_ids) / sizeof(*menu_ids); i++)
|
||||
{
|
||||
EnableMenuItem(fceumenu, menu_ids[i], MF_BYCOMMAND | (enable ? MF_ENABLED : MF_GRAYED));
|
||||
}
|
||||
EnableMenuItem(fceumenu, menu_ids[i], MF_BYCOMMAND | enable ? MF_ENABLED : MF_GRAYED | MF_DISABLED);
|
||||
|
||||
// Special treatment for the iNES head editor, only when no game is loaded or an NES game is loaded
|
||||
extern iNES_HEADER head;
|
||||
enable = GameInfo == 0 || !strncmp((const char*)&head, "NES\x1A", 4);
|
||||
EnableMenuItem(fceumenu, MENU_INESHEADEREDITOR, MF_BYCOMMAND | enable ? MF_ENABLED : MF_GRAYED | MF_DISABLED);
|
||||
}
|
||||
|
||||
//Updates menu items which need to be checked or unchecked.
|
||||
|
@ -1058,8 +1065,8 @@ void CloseGame()
|
|||
{
|
||||
FCEUI_CloseGame();
|
||||
KillMemView();
|
||||
updateGameDependentMenus(GameInfo != 0);
|
||||
updateGameDependentMenusDebugger(GameInfo != 0);
|
||||
updateGameDependentMenus();
|
||||
updateGameDependentMenusDebugger();
|
||||
SetMainWindowText();
|
||||
}
|
||||
}
|
||||
|
@ -1120,8 +1127,8 @@ bool ALoad(const char *nameo, char* innerFilename, bool silent)
|
|||
SetMainWindowText();
|
||||
ParseGIInput(GameInfo);
|
||||
|
||||
updateGameDependentMenus(GameInfo != 0);
|
||||
updateGameDependentMenusDebugger(GameInfo != 0);
|
||||
updateGameDependentMenus();
|
||||
updateGameDependentMenusDebugger();
|
||||
EmulationPaused = oldPaused;
|
||||
return true;
|
||||
}
|
||||
|
@ -2312,7 +2319,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
case MENU_GAMEGENIEDECODER:
|
||||
DoGGConv();
|
||||
break;
|
||||
|
||||
case MENU_INESHEADEREDITOR:
|
||||
DoHeadEdit();
|
||||
break;
|
||||
//Help Menu--------------------------------------------------------------
|
||||
case MENU_HELP:
|
||||
OpenHelpWindow();
|
||||
|
@ -2679,8 +2688,8 @@ int CreateMainWindow()
|
|||
UpdateLuaRMenu(recentluamenu, recent_lua, MENU_LUA_RECENT, LUA_FIRST_RECENT_FILE);
|
||||
UpdateMovieRMenu(recentmoviemenu, recent_movie, MENU_MOVIE_RECENT, MOVIE_FIRST_RECENT_FILE);
|
||||
|
||||
updateGameDependentMenus(0);
|
||||
updateGameDependentMenusDebugger(0);
|
||||
updateGameDependentMenus();
|
||||
updateGameDependentMenusDebugger();
|
||||
if (MainWindow_wndx==-32000) MainWindow_wndx=0; //Just in case
|
||||
if (MainWindow_wndy==-32000) MainWindow_wndy=0;
|
||||
hAppWnd = CreateWindowEx(
|
||||
|
@ -3212,3 +3221,255 @@ void UpdateSortColumnIcon(HWND hwndListView, int sortColumn, bool sortAsc)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Push the window away from the main FCEUX window
|
||||
POINT CalcSubWindowPos(HWND hDlg, POINT* conf)
|
||||
{
|
||||
POINT pt; // dialog position
|
||||
RECT wR, dR; // Window rect, dialog rect
|
||||
|
||||
|
||||
// Try to calc the default position, it doesn't overlap the main window and ensure it's in the screen;
|
||||
GetWindowRect(hAppWnd, &wR);
|
||||
GetWindowRect(hDlg, &dR);
|
||||
|
||||
pt.x = wR.left;
|
||||
pt.y = wR.top;
|
||||
|
||||
LONG wW = wR.right - wR.left; // window width
|
||||
LONG dW = dR.right - dR.left; // dialog width
|
||||
|
||||
if (pt.x + wW + dW < GetSystemMetrics(SM_CXSCREEN))
|
||||
pt.x += wW; // if there is enough place for the dialog on the right, put the dialog there
|
||||
else if (pt.x - dW > 0)
|
||||
pt.x -= dW; // otherwise, we check if we can put it on the left
|
||||
|
||||
// If the dialog has a configured window position, override the default position
|
||||
if (conf)
|
||||
{
|
||||
LONG wH = wR.bottom - wR.top;
|
||||
// It is overrided only when the configured position is not completely off screen
|
||||
if (conf->x > -wW * 2 || conf->x < wW * 2 + GetSystemMetrics(SM_CXSCREEN))
|
||||
pt.x = conf->x;
|
||||
if (conf->y > -wH * 2 || conf->y < wH * 2 + GetSystemMetrics(SM_CYSCREEN))
|
||||
pt.y = conf->y;
|
||||
}
|
||||
|
||||
// finally set the window position
|
||||
SetWindowPos(hDlg, NULL, pt.x, pt.y, NULL, NULL, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
|
||||
|
||||
// return the calculated point, maybe the caller can use it for further.
|
||||
return pt;
|
||||
}
|
||||
|
||||
LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP)
|
||||
{
|
||||
bool through = true;
|
||||
LRESULT result = 0;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_PASTE:
|
||||
{
|
||||
|
||||
bool(*IsLetterLegal)(char) = GetIsLetterLegal(GetDlgCtrlID(hwnd));
|
||||
|
||||
if (IsLetterLegal)
|
||||
{
|
||||
if (OpenClipboard(hwnd))
|
||||
{
|
||||
HANDLE handle = GetClipboardData(CF_TEXT);
|
||||
if (handle)
|
||||
{
|
||||
|
||||
// get the original clipboard string
|
||||
char* clipStr = (char*)GlobalLock(handle);
|
||||
|
||||
// check if the text in clipboard has illegal characters
|
||||
int len = strlen(clipStr);
|
||||
for (int i = 0; i < len; ++i)
|
||||
{
|
||||
if (!IsLetterLegal(clipStr[i]))
|
||||
{
|
||||
through = false;
|
||||
// Show Edit control tip, just like the control with ES_NUMBER do
|
||||
ShowLetterIllegalError(hwnd, IsLetterLegal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
GlobalUnlock(handle);
|
||||
CloseClipboard();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_CHAR:
|
||||
{
|
||||
bool(*IsLetterLegal)(char) = GetIsLetterLegal(GetDlgCtrlID(hwnd));
|
||||
through = IsInputLegal(GetIsLetterLegal(GetDlgCtrlID(hwnd)), wP);
|
||||
if (!through)
|
||||
ShowLetterIllegalError(hwnd, IsLetterLegal);
|
||||
}
|
||||
}
|
||||
|
||||
return through ? CallWindowProc(DefaultEditCtrlProc, hwnd, msg, wP, lP) : result;
|
||||
}
|
||||
|
||||
// return a letter legal checking function for the specified control with the given id
|
||||
bool inline (*GetIsLetterLegal(UINT id))(char letter)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
// owomomo TODO: RAM Search is a bit complicated,
|
||||
// I'll handle it in later development
|
||||
|
||||
|
||||
// Game genie text in Cheat and Game Genie Encoder/Decoder
|
||||
case IDC_CHEAT_GAME_GENIE_TEXT:
|
||||
case IDC_GAME_GENIE_CODE:
|
||||
return IsLetterLegalGG;
|
||||
|
||||
// Addresses in Debugger
|
||||
case IDC_DEBUGGER_VAL_PCSEEK:
|
||||
case IDC_DEBUGGER_VAL_PC:
|
||||
case IDC_DEBUGGER_VAL_A:
|
||||
case IDC_DEBUGGER_VAL_X:
|
||||
case IDC_DEBUGGER_VAL_Y:
|
||||
case IDC_DEBUGGER_BOOKMARK:
|
||||
|
||||
// Debugger -> Add breakpoint
|
||||
case IDC_ADDBP_ADDR_START: case IDC_ADDBP_ADDR_END:
|
||||
|
||||
// RAM Watch / RAM Search / Cheat -> Add watch
|
||||
// TODO: Some other features
|
||||
// case IDC_EDIT_COMPAREADDRESS:
|
||||
|
||||
// Address, Value, Compare, Known Value, Note equal, Greater than and Less than in Cheat
|
||||
case IDC_CHEAT_ADDR: case IDC_CHEAT_VAL: case IDC_CHEAT_COM:
|
||||
case IDC_CHEAT_VAL_KNOWN: case IDC_CHEAT_VAL_NE_BY:
|
||||
case IDC_CHEAT_VAL_GT_BY: case IDC_CHEAT_VAL_LT_BY:
|
||||
|
||||
// Address, Value and Compare in Game Genie Encoder/Decoder
|
||||
case IDC_GAME_GENIE_ADDR: case IDC_GAME_GENIE_VAL: case IDC_GAME_GENIE_COMP:
|
||||
|
||||
// Address controls in Memory watch
|
||||
case MW_ADDR00: case MW_ADDR01: case MW_ADDR02: case MW_ADDR03:
|
||||
case MW_ADDR04: case MW_ADDR05: case MW_ADDR06: case MW_ADDR07:
|
||||
case MW_ADDR08: case MW_ADDR09: case MW_ADDR10: case MW_ADDR11:
|
||||
case MW_ADDR12: case MW_ADDR13: case MW_ADDR14: case MW_ADDR15:
|
||||
case MW_ADDR16: case MW_ADDR17: case MW_ADDR18: case MW_ADDR19:
|
||||
case MW_ADDR20: case MW_ADDR21: case MW_ADDR22: case MW_ADDR23:
|
||||
return IsLetterLegalHex;
|
||||
|
||||
// Size multiplier and TV Aspect in Video Config
|
||||
case IDC_WINSIZE_MUL_X: case IDC_WINSIZE_MUL_Y:
|
||||
case IDC_TVASPECT_X: case IDC_TVASPECT_Y:
|
||||
return IsLetterLegalFloat;
|
||||
|
||||
// Cheat code in Cheat
|
||||
case IDC_CHEAT_TEXT:
|
||||
return IsLetterLegalCheat;
|
||||
|
||||
// PRG ROM, PRG RAM, PRG NVRAM, CHR ROM, CHR RAM, CHR NVRAM in iNES Header Editor
|
||||
case IDC_PRGROM_EDIT: case IDC_PRGRAM_EDIT: case IDC_PRGNVRAM_EDIT:
|
||||
case IDC_CHRROM_EDIT: case IDC_CHRRAM_EDIT: case IDC_CHRNVRAM_EDIT:
|
||||
return IsLetterLegalSize;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline void ShowLetterIllegalError(HWND hwnd, bool(*IsLetterLegal)(char letter), bool balloon)
|
||||
{
|
||||
(balloon ? ShowLetterIllegalBalloonTip : ShowLetterIllegalMessageBox)(hwnd, IsLetterLegal);
|
||||
}
|
||||
|
||||
void ShowLetterIllegalBalloonTip(HWND hwnd, bool(*IsLetterLegal)(char letter))
|
||||
{
|
||||
char* title = "Unacceptable Character";
|
||||
int uLen = MultiByteToWideChar(CP_ACP, NULL, title, -1, NULL, 0);
|
||||
wchar_t* titleW = (wchar_t*)malloc(sizeof(wchar_t) * uLen);
|
||||
MultiByteToWideChar(CP_ACP, 0, title, -1, (LPWSTR)titleW, uLen);
|
||||
|
||||
char* msg = GetLetterIllegalErrMsg(IsLetterLegal);
|
||||
uLen = MultiByteToWideChar(CP_ACP, NULL, msg, -1, NULL, 0);
|
||||
wchar_t* msgW = (wchar_t*)malloc(sizeof(wchar_t) * uLen);
|
||||
MultiByteToWideChar(CP_ACP, 0, msg, -1, (LPWSTR)msgW, uLen);
|
||||
|
||||
EDITBALLOONTIP tip;
|
||||
tip.cbStruct = sizeof(EDITBALLOONTIP);
|
||||
tip.pszText = msgW;
|
||||
tip.pszTitle = titleW;
|
||||
tip.ttiIcon = TTI_ERROR;
|
||||
SendMessage(hwnd, EM_SHOWBALLOONTIP, 0, (LPARAM)&tip);
|
||||
|
||||
free(titleW);
|
||||
free(msgW);
|
||||
}
|
||||
|
||||
inline void ShowLetterIllegalMessageBox(HWND hwnd, bool(*IsLetterLegal)(char letter))
|
||||
{
|
||||
MessageBox(hwnd, GetLetterIllegalErrMsg(IsLetterLegal), "Unacceptable Character", MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
inline char* GetLetterIllegalErrMsg(bool(*IsLetterLegal)(char letter))
|
||||
{
|
||||
if (IsLetterLegal == IsLetterLegalGG)
|
||||
return "You can only type Game Genie characters:\nA P Z L G I T Y E O X U K S V N";
|
||||
if (IsLetterLegal == IsLetterLegalHex)
|
||||
return "You can only type characters for hexadecimal number (0-9,A-F).";
|
||||
if (IsLetterLegal == IsLetterLegalCheat)
|
||||
return
|
||||
"The cheat code comes into the following 2 formats:\n"
|
||||
"AAAA:VV freezes the value in Address $AAAA to $VV.\n"
|
||||
"AAAA?CC:VV changes the value in Address $AAAA to $VV only when it's $CC.\n"
|
||||
"All the characters are hexadecimal number (0-9,A-F).\n";
|
||||
if (IsLetterLegal == IsLetterLegalFloat)
|
||||
return "You can only type decimal number (decimal point is acceptable).";
|
||||
if (IsLetterLegal == IsLetterLegalSize)
|
||||
return "You can only type decimal number followed with B, KB or MB.";
|
||||
if (IsLetterLegal == IsLetterLegalDec)
|
||||
return "You can only type decimal number (minus is acceptable).";
|
||||
|
||||
return "Your input contains invalid characters.";
|
||||
}
|
||||
|
||||
inline bool IsInputLegal(bool (*IsLetterLegal)(char letter), char letter)
|
||||
{
|
||||
return !IsLetterLegal || letter == VK_BACK || GetKeyState(VK_CONTROL) & 0x8000 || IsLetterLegal(letter);
|
||||
}
|
||||
|
||||
inline bool IsLetterLegalGG(char letter)
|
||||
{
|
||||
char ch = toupper(letter);
|
||||
for (int i = 0; GameGenieLetters[i]; ++i)
|
||||
if (GameGenieLetters[i] == ch)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool IsLetterLegalHex(char letter)
|
||||
{
|
||||
return letter >= '0' && letter <= '9' || letter >= 'A' && letter <= 'F' || letter >= 'a' && letter <= 'f';
|
||||
}
|
||||
|
||||
inline bool IsLetterLegalCheat(char letter)
|
||||
{
|
||||
return letter >= '0' && letter <= ':' || letter >= 'A' && letter <= 'F' || letter >= 'a' && letter <= 'f' || letter == '?';
|
||||
}
|
||||
|
||||
inline bool IsLetterLegalSize(char letter)
|
||||
{
|
||||
return letter >= '0' && letter <= '9' || letter == 'm' || letter == 'M' || letter == 'k' || letter == 'K' || letter == 'b' || letter == 'B';
|
||||
}
|
||||
|
||||
inline bool IsLetterLegalDec(char letter)
|
||||
{
|
||||
return letter >= '0' && letter <= '9' || letter == '-';
|
||||
}
|
||||
|
||||
inline bool IsLetterLegalFloat(char letter)
|
||||
{
|
||||
return letter >= '0' && letter <= '9' || letter == '.';
|
||||
}
|
|
@ -19,7 +19,7 @@ struct CreateMovieParameters
|
|||
extern char *recent_files[];
|
||||
extern char *recent_lua[];
|
||||
extern char *recent_movie[];
|
||||
extern HWND pwindow;
|
||||
// extern HWND pwindow;
|
||||
|
||||
HWND GetMainHWND();
|
||||
|
||||
|
@ -38,6 +38,7 @@ void SetMainWindowStuff();
|
|||
void GetMouseData(uint32 (&md)[3]);
|
||||
void GetMouseRelative(int32 (&md)[3]);
|
||||
//void ChangeMenuItemText(int menuitem, string text);
|
||||
POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
|
||||
template<int BUFSIZE>
|
||||
inline std::string GetDlgItemText(HWND hDlg, int nIDDlgItem) {
|
||||
|
@ -126,4 +127,21 @@ struct HOTKEYMENUINDEX {
|
|||
|
||||
void UpdateMenuHotkeys(FCEUMENU_INDEX index);
|
||||
int GetCurrentContextIndex();
|
||||
|
||||
inline bool (*GetIsLetterLegal(UINT id))(char letter);
|
||||
inline char* GetLetterIllegalErrMsg(bool(*IsLetterLegal)(char letter));
|
||||
inline void ShowLetterIllegalError(HWND hwnd, bool(*IsLetterLegal)(char letter), bool balloon = true);
|
||||
void ShowLetterIllegalBalloonTip(HWND hwnd, bool(*IsLetterLegal)(char letter));
|
||||
inline void ShowLetterIllegalMessageBox(HWND hwnd, bool(*IsLetterLegal)(char letter));
|
||||
inline bool IsInputLegal(bool(*IsLetterLegal)(char letter), char letter);
|
||||
inline bool IsLetterLegalGG(char letter);
|
||||
inline bool IsLetterLegalHex(char letter);
|
||||
inline bool IsLetterLegalCheat(char letter);
|
||||
inline bool IsLetterLegalDec(char letter);
|
||||
inline bool IsLetterLegalSize(char letter);
|
||||
inline bool IsLetterLegalFloat(char letter);
|
||||
|
||||
extern WNDPROC DefaultEditCtrlProc;
|
||||
extern LRESULT APIENTRY FilterEditCtrlProc(HWND hDlg, UINT msg, WPARAM wP, LPARAM lP);
|
||||
|
||||
#endif
|
||||
|
|
62
src/fceu.cpp
62
src/fceu.cpp
|
@ -189,6 +189,11 @@ static void FCEU_CloseGame(void)
|
|||
}
|
||||
|
||||
if (GameInfo->type != GIT_NSF) {
|
||||
if (disableAutoLSCheats == 2)
|
||||
FCEU_FlushGameCheats(0, 1);
|
||||
else if (disableAutoLSCheats == 1)
|
||||
AskSaveCheat();
|
||||
else if (disableAutoLSCheats == 0)
|
||||
FCEU_FlushGameCheats(0, 0);
|
||||
}
|
||||
|
||||
|
@ -432,9 +437,7 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
|||
strcat(fullname, "|");
|
||||
strcat(fullname, fp->filename.c_str());
|
||||
} else
|
||||
{
|
||||
strcpy(fullname, name);
|
||||
}
|
||||
|
||||
// reset loaded game BEFORE it's loading.
|
||||
ResetGameLoaded();
|
||||
|
@ -469,29 +472,12 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
|||
|
||||
//try to load each different format
|
||||
bool FCEUXLoad(const char *name, FCEUFILE * fp);
|
||||
/*if(FCEUXLoad(name,fp))
|
||||
goto endlseq;*/
|
||||
if (iNESLoad(fullname, fp, OverwriteVidMode))
|
||||
goto endlseq;
|
||||
if (NSFLoad(fullname, fp))
|
||||
goto endlseq;
|
||||
if (UNIFLoad(fullname, fp))
|
||||
goto endlseq;
|
||||
if (FDSLoad(fullname, fp))
|
||||
goto endlseq;
|
||||
|
||||
if (!silent)
|
||||
FCEU_PrintError("An error occurred while loading the file.");
|
||||
FCEU_fclose(fp);
|
||||
|
||||
delete GameInfo;
|
||||
GameInfo = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
endlseq:
|
||||
|
||||
FCEU_fclose(fp);
|
||||
if (iNESLoad(fullname, fp, OverwriteVidMode) ||
|
||||
NSFLoad(fullname, fp) ||
|
||||
UNIFLoad(fullname, fp) ||
|
||||
FDSLoad(fullname, fp))
|
||||
{
|
||||
|
||||
#ifdef WIN32
|
||||
// ################################## Start of SP CODE ###########################
|
||||
|
@ -508,19 +494,16 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
|||
if (OverwriteVidMode)
|
||||
FCEU_ResetVidSys();
|
||||
|
||||
if (GameInfo->type != GIT_NSF)
|
||||
{
|
||||
if (FSettings.GameGenie)
|
||||
{
|
||||
if (FCEU_OpenGenie())
|
||||
if (GameInfo->type != GIT_NSF &&
|
||||
FSettings.GameGenie &&
|
||||
FCEU_OpenGenie())
|
||||
{
|
||||
FCEUI_SetGameGenie(false);
|
||||
#ifdef WIN32
|
||||
genie = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PowerNES();
|
||||
|
||||
if (GameInfo->type != GIT_NSF)
|
||||
|
@ -532,16 +515,18 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
|||
if (!lastpal && PAL) {
|
||||
FCEU_DispMessage("PAL mode set", 0);
|
||||
FCEUI_printf("PAL mode set");
|
||||
} else if (!lastdendy && dendy) {
|
||||
}
|
||||
else if (!lastdendy && dendy) {
|
||||
// this won't happen, since we don't autodetect dendy, but maybe someday we will?
|
||||
FCEU_DispMessage("Dendy mode set", 0);
|
||||
FCEUI_printf("Dendy mode set");
|
||||
} else if ((lastpal || lastdendy) && !(PAL || dendy)) {
|
||||
}
|
||||
else if ((lastpal || lastdendy) && !(PAL || dendy)) {
|
||||
FCEU_DispMessage("NTSC mode set", 0);
|
||||
FCEUI_printf("NTSC mode set");
|
||||
}
|
||||
|
||||
if (GameInfo->type != GIT_NSF)
|
||||
if (GameInfo->type != GIT_NSF && !disableAutoLSCheats)
|
||||
FCEU_LoadGameCheats(0);
|
||||
|
||||
if (AutoResumePlay)
|
||||
|
@ -565,7 +550,16 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
|||
if (FrozenAddressCount)
|
||||
FCEU_DispMessage("%d cheats active", 0, FrozenAddressCount);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (!silent)
|
||||
FCEU_PrintError("An error occurred while loading the file.");
|
||||
|
||||
delete GameInfo;
|
||||
GameInfo = 0;
|
||||
}
|
||||
|
||||
FCEU_fclose(fp);
|
||||
return GameInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -261,9 +261,9 @@ FCEUFILE * FCEU_fopen(const char *path, const char *ipsfn, char *mode, char *ext
|
|||
FILE *ipsfile=0;
|
||||
FCEUFILE *fceufp=0;
|
||||
|
||||
bool read = (std::string)mode == "rb";
|
||||
bool write = (std::string)mode == "wb";
|
||||
if((read&&write) || (!read&&!write))
|
||||
bool read = !strcmp(mode, "rb");
|
||||
bool write = !strcmp(mode, "wb");
|
||||
if(read && write || !read && !write)
|
||||
{
|
||||
FCEU_PrintError("invalid file open mode specified (only wb and rb are supported)");
|
||||
return 0;
|
||||
|
|
14
src/ines.cpp
14
src/ines.cpp
|
@ -63,7 +63,7 @@ static int iNES_Init(int num);
|
|||
|
||||
static int MapperNo = 0;
|
||||
|
||||
static int iNES2 = 0;
|
||||
int iNES2 = 0;
|
||||
|
||||
static DECLFR(TrainerRead) {
|
||||
return(trainerpoo[A & 0x1FF]);
|
||||
|
@ -443,13 +443,8 @@ static int not_power2[] =
|
|||
{
|
||||
53, 198, 228
|
||||
};
|
||||
typedef struct {
|
||||
char *name;
|
||||
int32 number;
|
||||
void (*init)(CartInfo *);
|
||||
} BMAPPINGLocal;
|
||||
|
||||
static BMAPPINGLocal bmap[] = {
|
||||
BMAPPINGLocal bmap[] = {
|
||||
{"NROM", 0, NROM_Init},
|
||||
{"MMC1", 1, Mapper1_Init},
|
||||
{"UNROM", 2, UNROM_Init},
|
||||
|
@ -729,10 +724,7 @@ static BMAPPINGLocal bmap[] = {
|
|||
int iNESLoad(const char *name, FCEUFILE *fp, int OverwriteVidMode) {
|
||||
struct md5_context md5;
|
||||
|
||||
if (FCEU_fread(&head, 1, 16, fp) != 16)
|
||||
return 0;
|
||||
|
||||
if (memcmp(&head, "NES\x1a", 4))
|
||||
if (FCEU_fread(&head, 1, 16, fp) != 16 || memcmp(&head, "NES\x1A", 4))
|
||||
return 0;
|
||||
|
||||
head.cleanup();
|
||||
|
|
39
src/ines.h
39
src/ines.h
|
@ -51,30 +51,23 @@ extern TMasterRomInfoParams MasterRomInfoParams;
|
|||
|
||||
//mbg merge 7/19/06 changed to c++ decl format
|
||||
struct iNES_HEADER {
|
||||
char ID[4]; /*NES^Z*/
|
||||
uint8 ROM_size;
|
||||
uint8 VROM_size;
|
||||
uint8 ROM_type;
|
||||
uint8 ROM_type2;
|
||||
uint8 ROM_type3;
|
||||
uint8 Upper_ROM_VROM_size;
|
||||
uint8 RAM_size;
|
||||
uint8 VRAM_size;
|
||||
uint8 TV_system;
|
||||
uint8 VS_hardware;
|
||||
uint8 reserved[2];
|
||||
char ID[4]; /*NES^Z*/ // 0-3
|
||||
uint8 ROM_size; // 4
|
||||
uint8 VROM_size; // 5
|
||||
uint8 ROM_type; // 6
|
||||
uint8 ROM_type2; // 7
|
||||
uint8 ROM_type3; // 8
|
||||
uint8 Upper_ROM_VROM_size; // 9
|
||||
uint8 RAM_size; // 10
|
||||
uint8 VRAM_size; // 11
|
||||
uint8 TV_system; // 12
|
||||
uint8 VS_hardware; // 13
|
||||
uint8 reserved[2]; // 14, 15
|
||||
|
||||
void cleanup()
|
||||
{
|
||||
if(!memcmp((char *)(this)+0x7,"DiskDude",8))
|
||||
{
|
||||
if(!memcmp((char*)(this) + 0x7, "DiskDude", 8) || !memcmp((char*)(this) + 0x7, "demiforce", 9))
|
||||
memset((char*)(this) + 0x7, 0, 0x9);
|
||||
}
|
||||
|
||||
if(!memcmp((char *)(this)+0x7,"demiforce",9))
|
||||
{
|
||||
memset((char *)(this)+0x7,0,0x9);
|
||||
}
|
||||
|
||||
if(!memcmp((char*)(this) + 0xA, "Ni03", 4))
|
||||
{
|
||||
|
@ -85,6 +78,7 @@ struct iNES_HEADER {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
extern struct iNES_HEADER head; //for mappers usage
|
||||
|
||||
void NSFVRC6_Init(void);
|
||||
|
@ -274,4 +268,9 @@ void Mapper252_Init(CartInfo *);
|
|||
void Mapper253_Init(CartInfo *);
|
||||
void Mapper254_Init(CartInfo *);
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
int32 number;
|
||||
void (*init)(CartInfo *);
|
||||
} BMAPPINGLocal;
|
||||
#endif
|
||||
|
|
|
@ -1117,8 +1117,8 @@ static void LaunchCodeDataLogger(void)
|
|||
static void LaunchCheats(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
extern HWND pwindow;
|
||||
ConfigCheats(pwindow);
|
||||
extern HWND hCheat;
|
||||
ConfigCheats(hCheat);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1500,8 +1500,7 @@ bool FCEUMOV_ReadState(EMUFILE* is, uint32 size)
|
|||
//mbg 8/18/08 - this code can be used to turn the error message into an OK/CANCEL
|
||||
#ifdef WIN32
|
||||
std::string msg = "There is a mismatch between savestate's movie and current movie.\ncurrent: " + currMovieData.guid.toString() + "\nsavestate: " + tempMovieData.guid.toString() + "\n\nThis means that you have loaded a savestate belonging to a different movie than the one you are playing now.\n\nContinue loading this savestate anyway?";
|
||||
extern HWND pwindow;
|
||||
int result = MessageBox(pwindow,msg.c_str(),"Error loading savestate",MB_OKCANCEL);
|
||||
int result = MessageBox(hAppWnd, msg.c_str(), "Error loading savestate", MB_OKCANCEL);
|
||||
if(result == IDCANCEL)
|
||||
{
|
||||
if (!backupSavestates) //If backups are disabled we can just resume normally since we can't restore so stop movie and inform user
|
||||
|
|
|
@ -557,6 +557,7 @@
|
|||
<ClCompile Include="..\src\drivers\win\directories.cpp" />
|
||||
<ClCompile Include="..\src\drivers\win\gui.cpp" />
|
||||
<ClCompile Include="..\src\drivers\win\guiconfig.cpp" />
|
||||
<ClCompile Include="..\src\drivers\win\header_editor.cpp" />
|
||||
<ClCompile Include="..\src\drivers\win\help.cpp" />
|
||||
<ClCompile Include="..\src\drivers\win\input.cpp" />
|
||||
<ClCompile Include="..\src\drivers\win\joystick.cpp" />
|
||||
|
@ -1012,6 +1013,7 @@
|
|||
<ClInclude Include="..\src\drivers\win\directories.h" />
|
||||
<ClInclude Include="..\src\drivers\win\gui.h" />
|
||||
<ClInclude Include="..\src\drivers\win\guiconfig.h" />
|
||||
<ClInclude Include="..\src\drivers\win\header_editor.h" />
|
||||
<ClInclude Include="..\src\drivers\win\help.h" />
|
||||
<ClInclude Include="..\src\drivers\win\input.h" />
|
||||
<ClInclude Include="..\src\drivers\win\joystick.h" />
|
||||
|
|
|
@ -1093,6 +1093,9 @@
|
|||
<ClCompile Include="..\src\boards\hp10xx_hp20xx.cpp">
|
||||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\drivers\win\header_editor.cpp">
|
||||
<Filter>drivers\win</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\drivers\common\args.h">
|
||||
|
@ -1599,6 +1602,9 @@
|
|||
<ClInclude Include="..\src\input\fkb.h">
|
||||
<Filter>input</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\drivers\win\header_editor.h">
|
||||
<Filter>drivers\win</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\src\drivers\win\res.rc">
|
||||
|
|
Loading…
Reference in New Issue