win32 - debugger - added an auto-load feature
This commit is contained in:
parent
bf14da0052
commit
2cf4d23994
|
@ -1,4 +1,4 @@
|
||||||
|
04-nov-2009 - adelikat - win32 - debugger - added an auto-load feature
|
||||||
|
|
||||||
---r1527 - FCEUX 2.1.2 Released---
|
---r1527 - FCEUX 2.1.2 Released---
|
||||||
---November 3, 2009---
|
---November 3, 2009---
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "texthook.h"
|
#include "texthook.h"
|
||||||
#include "movieoptions.h"
|
#include "movieoptions.h"
|
||||||
#include "ramwatch.h"
|
#include "ramwatch.h"
|
||||||
|
#include "debugger.h"
|
||||||
|
|
||||||
extern CFGSTRUCT NetplayConfig[];
|
extern CFGSTRUCT NetplayConfig[];
|
||||||
extern CFGSTRUCT InputConfig[];
|
extern CFGSTRUCT InputConfig[];
|
||||||
|
@ -219,7 +220,7 @@ static CFGSTRUCT fceuconfig[] = {
|
||||||
AC(BindToMain),
|
AC(BindToMain),
|
||||||
AC(EnableAutosave),
|
AC(EnableAutosave),
|
||||||
AC(frameAdvanceLagSkip),
|
AC(frameAdvanceLagSkip),
|
||||||
|
AC(debuggerAutoload),
|
||||||
AC(allowUDLR),
|
AC(allowUDLR),
|
||||||
|
|
||||||
//window positions
|
//window positions
|
||||||
|
|
|
@ -65,6 +65,8 @@ HWND hDebug;
|
||||||
static HFONT hFont;
|
static HFONT hFont;
|
||||||
static SCROLLINFO si;
|
static SCROLLINFO si;
|
||||||
|
|
||||||
|
bool debuggerAutoload = false;
|
||||||
|
|
||||||
#define INVALID_START_OFFSET 1
|
#define INVALID_START_OFFSET 1
|
||||||
#define INVALID_END_OFFSET 2
|
#define INVALID_END_OFFSET 2
|
||||||
|
|
||||||
|
@ -953,6 +955,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
//these messages get handled at any time
|
//these messages get handled at any time
|
||||||
switch(uMsg) {
|
switch(uMsg) {
|
||||||
case WM_INITDIALOG: {
|
case WM_INITDIALOG: {
|
||||||
|
CheckDlgButton(hwndDlg, DEBUGAUTOLOAD, debuggerAutoload ? MF_CHECKED : MF_UNCHECKED);
|
||||||
extern int loadDebugDataFailed;
|
extern int loadDebugDataFailed;
|
||||||
if (DbgPosX==-32000) DbgPosX=0; //Just in case
|
if (DbgPosX==-32000) DbgPosX=0; //Just in case
|
||||||
if (DbgPosY==-32000) DbgPosY=0;
|
if (DbgPosY==-32000) DbgPosY=0;
|
||||||
|
@ -1081,6 +1084,15 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
DbgPosX = wrect.left;
|
DbgPosX = wrect.left;
|
||||||
DbgPosY = wrect.top;
|
DbgPosY = wrect.top;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
//adelikat: Buttons that don't need a rom loaded to do something, such as autoload
|
||||||
|
case WM_COMMAND:
|
||||||
|
switch(LOWORD(wParam))
|
||||||
|
{
|
||||||
|
case DEBUGAUTOLOAD:
|
||||||
|
debuggerAutoload ^= 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//these messages only get handled when a game is loaded
|
//these messages only get handled when a game is loaded
|
||||||
|
|
|
@ -18,6 +18,7 @@ extern int scanline; //current scanline! :D
|
||||||
extern HWND hDebug;
|
extern HWND hDebug;
|
||||||
|
|
||||||
extern int childwnd,numWPs; //mbg merge 7/18/06 had to make extern
|
extern int childwnd,numWPs; //mbg merge 7/18/06 had to make extern
|
||||||
|
extern bool debuggerAutoload;
|
||||||
|
|
||||||
void CenterWindow(HWND hwndDlg);
|
void CenterWindow(HWND hwndDlg);
|
||||||
void DoPatcher(int address,HWND hParent);
|
void DoPatcher(int address,HWND hParent);
|
||||||
|
|
|
@ -1021,6 +1021,7 @@ BEGIN
|
||||||
PUSHBUTTON "Run Line",IDC_DEBUGGER_RUN_LINE,349,39,37,14
|
PUSHBUTTON "Run Line",IDC_DEBUGGER_RUN_LINE,349,39,37,14
|
||||||
PUSHBUTTON "128 Lines",IDC_DEBUGGER_RUN_FRAME2,389,39,37,14
|
PUSHBUTTON "128 Lines",IDC_DEBUGGER_RUN_FRAME2,389,39,37,14
|
||||||
LTEXT "Scanline: PPU Pixel:",IDC_STATIC,436,191,78,8
|
LTEXT "Scanline: PPU Pixel:",IDC_STATIC,436,191,78,8
|
||||||
|
CONTROL "Auto-load",DEBUGAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,495,308,46,10
|
||||||
END
|
END
|
||||||
|
|
||||||
TRACER DIALOGEX 65527, 65513, 398, 319
|
TRACER DIALOGEX 65527, 65513, 398, 319
|
||||||
|
|
|
@ -413,6 +413,7 @@
|
||||||
#define ID_SOUND_QUALITYNOTIFY 1202
|
#define ID_SOUND_QUALITYNOTIFY 1202
|
||||||
#define IDC_CHECK1 1203
|
#define IDC_CHECK1 1203
|
||||||
#define CB_ENABLECONTEXTMENU 1203
|
#define CB_ENABLECONTEXTMENU 1203
|
||||||
|
#define DEBUGAUTOLOAD 1203
|
||||||
#define IDC_VOLUMEGROUP 1204
|
#define IDC_VOLUMEGROUP 1204
|
||||||
#define IDC_RAMLIST 1205
|
#define IDC_RAMLIST 1205
|
||||||
#define IDC_C_SEARCH 1206
|
#define IDC_C_SEARCH 1206
|
||||||
|
|
|
@ -1044,9 +1044,13 @@ bool ALoad(char *nameo, char* innerFilename)
|
||||||
|
|
||||||
if (AutoRWLoad)
|
if (AutoRWLoad)
|
||||||
{
|
{
|
||||||
if (AutoRWLoad) OpenRWRecentFile(0); //adelikat: TODO: This command should be called internally from the RamWatch dialog in order for it to be more portable
|
OpenRWRecentFile(0); //adelikat: TODO: This command should be called internally from the RamWatch dialog in order for it to be more portable
|
||||||
OpenRamWatch();
|
OpenRamWatch();
|
||||||
}
|
}
|
||||||
|
if (debuggerAutoload)
|
||||||
|
{
|
||||||
|
DoDebug(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue