* Tracer: added "To the left from disassembly text" option
* Tracer: fixed bug #529 * Tracer also updates its window when user pauses the game, not just when Debugger snaps
This commit is contained in:
parent
f32271f269
commit
792754a7e9
|
@ -88,6 +88,8 @@ extern int MainWindow_wndx, MainWindow_wndy;
|
||||||
extern int MemWatch_wndx, MemWatch_wndy;
|
extern int MemWatch_wndx, MemWatch_wndy;
|
||||||
extern int Monitor_wndx, Monitor_wndy;
|
extern int Monitor_wndx, Monitor_wndy;
|
||||||
extern bool tracer_lines_tabbing;
|
extern bool tracer_lines_tabbing;
|
||||||
|
extern bool tracer_statuses_to_the_left;
|
||||||
|
extern int logging_options;
|
||||||
extern int Tracer_wndx, Tracer_wndy;
|
extern int Tracer_wndx, Tracer_wndy;
|
||||||
extern int CDLogger_wndx, CDLogger_wndy;
|
extern int CDLogger_wndx, CDLogger_wndy;
|
||||||
extern int GGConv_wndx, GGConv_wndy;
|
extern int GGConv_wndx, GGConv_wndy;
|
||||||
|
@ -281,6 +283,8 @@ static CFGSTRUCT fceuconfig[] = {
|
||||||
AC(Monitor_wndx),
|
AC(Monitor_wndx),
|
||||||
AC(Monitor_wndy),
|
AC(Monitor_wndy),
|
||||||
AC(tracer_lines_tabbing),
|
AC(tracer_lines_tabbing),
|
||||||
|
AC(tracer_statuses_to_the_left),
|
||||||
|
AC(logging_options),
|
||||||
AC(Tracer_wndx),
|
AC(Tracer_wndx),
|
||||||
AC(Tracer_wndy),
|
AC(Tracer_wndy),
|
||||||
AC(CDLogger_wndx),
|
AC(CDLogger_wndx),
|
||||||
|
|
|
@ -866,7 +866,7 @@ void _updateWindow()
|
||||||
PPUViewDoBlit();
|
PPUViewDoBlit();
|
||||||
UpdateMemoryView(0);
|
UpdateMemoryView(0);
|
||||||
UpdateCDLogger();
|
UpdateCDLogger();
|
||||||
//UpdateLogWindow(); //adelikat: Moved to FCEUI_Emulate
|
UpdateLogWindow(); //adelikat: Moved to FCEUI_Emulate; AnS: moved back
|
||||||
UpdateMemWatch();
|
UpdateMemWatch();
|
||||||
NTViewDoBlit(0);
|
NTViewDoBlit(0);
|
||||||
//UpdateTasEditor(); //AnS: moved to FCEUD_Update
|
//UpdateTasEditor(); //AnS: moved to FCEUD_Update
|
||||||
|
|
|
@ -1149,7 +1149,7 @@ BEGIN
|
||||||
EDITTEXT IDC_DEBUGGER_INSTRUCTIONS_EXCEED,483,216,50,12,ES_UPPERCASE | ES_NOHIDESEL | ES_WANTRETURN | ES_NUMBER
|
EDITTEXT IDC_DEBUGGER_INSTRUCTIONS_EXCEED,483,216,50,12,ES_UPPERCASE | ES_NOHIDESEL | ES_WANTRETURN | ES_NUMBER
|
||||||
END
|
END
|
||||||
|
|
||||||
TRACER DIALOGEX 65527, 65513, 383, 308
|
TRACER DIALOGEX 65527, 65513, 383, 316
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Trace Logger"
|
CAPTION "Trace Logger"
|
||||||
FONT 8, "MS Sans Serif", 400, 0, 0x0
|
FONT 8, "MS Sans Serif", 400, 0, 0x0
|
||||||
|
@ -1161,22 +1161,24 @@ BEGIN
|
||||||
LTEXT "instructions to this window",106,98,195,87,10
|
LTEXT "instructions to this window",106,98,195,87,10
|
||||||
PUSHBUTTON "Start Logging",IDC_BTN_START_STOP_LOGGING,171,176,67,14,BS_CENTER | BS_VCENTER
|
PUSHBUTTON "Start Logging",IDC_BTN_START_STOP_LOGGING,171,176,67,14,BS_CENTER | BS_VCENTER
|
||||||
COMBOBOX IDC_TRACER_LOG_SIZE,47,193,48,127,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_TRACER_LOG_SIZE,47,193,48,127,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
GROUPBOX "Extra Log Options",109,3,232,376,29
|
GROUPBOX "Extra Log Options",109,3,232,376,39
|
||||||
CONTROL "Log state of A, X, Y and S registers",IDC_CHECK_LOG_REGISTERS,
|
CONTROL "Log state of A, X, Y and S registers",IDC_CHECK_LOG_REGISTERS,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,243,126,10
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,243,126,10
|
||||||
CONTROL "Log Processor Status Flags",IDC_CHECK_LOG_PROCESSOR_STATUS,
|
CONTROL "Log Processor Status Flags",IDC_CHECK_LOG_PROCESSOR_STATUS,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,138,243,102,10
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,138,243,102,10
|
||||||
PUSHBUTTON "Browse...",IDC_BTN_LOG_BROWSE,56,212,45,14,BS_CENTER | BS_VCENTER
|
PUSHBUTTON "Browse...",IDC_BTN_LOG_BROWSE,56,212,45,14,BS_CENTER | BS_VCENTER
|
||||||
LTEXT "",IDC_TRACER_STATS,123,213,159,14
|
LTEXT "",IDC_TRACER_STATS,121,213,246,12
|
||||||
CONTROL "Only log newly mapped code",IDC_CHECK_LOG_NEW_INSTRUCTIONS,
|
CONTROL "Only log newly mapped code",IDC_CHECK_LOG_NEW_INSTRUCTIONS,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,276,107,10
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,284,107,10
|
||||||
GROUPBOX "Extra Log Options that work with the Code/Data Logger",113,3,264,376,40
|
GROUPBOX "Extra Log Options that work with the Code/Data Logger",113,3,272,376,40
|
||||||
CONTROL "Only log code that accesses newly mapped data",IDC_CHECK_LOG_NEW_DATA,
|
CONTROL "Only log code that accesses newly mapped data",IDC_CHECK_LOG_NEW_DATA,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,289,169,10
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,297,169,10
|
||||||
CONTROL "Automatically update Window While logging",IDC_CHECK_LOG_UPDATE_WINDOW,
|
CONTROL "Automatically update Window while logging",IDC_CHECK_LOG_UPDATE_WINDOW,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,192,195,156,10
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,192,195,156,10
|
||||||
CONTROL "Use Stack Pointer for lines tabbing",IDC_CHECK_LINES_TABBING,
|
CONTROL "Use Stack Pointer for lines tabbing (nesting visualization)",IDC_CHECK_LINES_TABBING,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,247,243,126,10
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,9,256,197,10
|
||||||
|
CONTROL "To the left from disassembly text",IDC_CHECK_LOG_STATUSES_TO_THE_LEFT,
|
||||||
|
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,251,243,121,10
|
||||||
END
|
END
|
||||||
|
|
||||||
ADDBP DIALOGEX 66, 83, 196, 130
|
ADDBP DIALOGEX 66, 83, 196, 130
|
||||||
|
|
|
@ -139,10 +139,11 @@
|
||||||
#define CHEAT_CONTEXT_TOGGLECHEAT 117
|
#define CHEAT_CONTEXT_TOGGLECHEAT 117
|
||||||
#define IDC_DEBUGGER_RESET_ON_STEP 117
|
#define IDC_DEBUGGER_RESET_ON_STEP 117
|
||||||
#define IDC_DEBUGGER_BREAK_ON_CYCLES 117
|
#define IDC_DEBUGGER_BREAK_ON_CYCLES 117
|
||||||
#define IDC_CHECK_LOG_PROCESSOR_STATUS2 117
|
|
||||||
#define IDC_CHECK_LINES_TABBING 117
|
#define IDC_CHECK_LINES_TABBING 117
|
||||||
#define CHEAT_CONTEXT_POKECHEATVALUE 118
|
#define CHEAT_CONTEXT_POKECHEATVALUE 118
|
||||||
#define IDC_DEBUGGER_RESET_ON_BP0 118
|
#define IDC_DEBUGGER_RESET_ON_BP0 118
|
||||||
|
#define IDC_CHECK_LOG_STATUSES_TO_THE_RIGHT 118
|
||||||
|
#define IDC_CHECK_LOG_STATUSES_TO_THE_LEFT 118
|
||||||
#define CHEAT_CONTEXT_GOTOINHEXEDITOR 119
|
#define CHEAT_CONTEXT_GOTOINHEXEDITOR 119
|
||||||
#define IDC_DEBUGGER_BREAK_ON_INSTRUCTIONS 119
|
#define IDC_DEBUGGER_BREAK_ON_INSTRUCTIONS 119
|
||||||
#define CHECK_SOUND_8BIT 122
|
#define CHECK_SOUND_8BIT 122
|
||||||
|
|
|
@ -44,7 +44,7 @@ using namespace std;
|
||||||
//#define LOG_ADD_PERIODS 8
|
//#define LOG_ADD_PERIODS 8
|
||||||
|
|
||||||
//int logaxy = 1, logopdata = 1; //deleteme
|
//int logaxy = 1, logopdata = 1; //deleteme
|
||||||
int logging_options = -1;
|
int logging_options = LOG_REGISTERS | LOG_PROCESSOR_STATUS;
|
||||||
int log_update_window = 0;
|
int log_update_window = 0;
|
||||||
//int tracer_open=0;
|
//int tracer_open=0;
|
||||||
volatile int logtofile = 0, logging = 0;
|
volatile int logtofile = 0, logging = 0;
|
||||||
|
@ -61,6 +61,10 @@ int tracelogbufsize, tracelogbufpos;
|
||||||
int tracelogbufusedsize;
|
int tracelogbufusedsize;
|
||||||
|
|
||||||
bool tracer_lines_tabbing = true;
|
bool tracer_lines_tabbing = true;
|
||||||
|
bool tracer_statuses_to_the_left = false;
|
||||||
|
|
||||||
|
bool old_emu_paused = false; // thus the window only updates once after the game is paused
|
||||||
|
extern bool JustFrameAdvanced;
|
||||||
|
|
||||||
FILE *LOG_FP;
|
FILE *LOG_FP;
|
||||||
|
|
||||||
|
@ -127,21 +131,12 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
CheckDlgButton(hwndDlg, IDC_CHECK_LINES_TABBING, tracer_lines_tabbing ? BST_CHECKED : BST_UNCHECKED);
|
CheckDlgButton(hwndDlg, IDC_CHECK_LINES_TABBING, tracer_lines_tabbing ? BST_CHECKED : BST_UNCHECKED);
|
||||||
if(logging_options == -1)
|
CheckDlgButton(hwndDlg, IDC_CHECK_LOG_STATUSES_TO_THE_LEFT, tracer_statuses_to_the_left ? BST_CHECKED : BST_UNCHECKED);
|
||||||
{
|
CheckDlgButton(hwndDlg, IDC_CHECK_LOG_REGISTERS, (logging_options & LOG_REGISTERS) ? BST_CHECKED : BST_UNCHECKED);
|
||||||
logging_options = (LOG_REGISTERS | LOG_PROCESSOR_STATUS);
|
CheckDlgButton(hwndDlg, IDC_CHECK_LOG_PROCESSOR_STATUS, (logging_options & LOG_PROCESSOR_STATUS) ? BST_CHECKED : BST_UNCHECKED);
|
||||||
CheckDlgButton(hwndDlg, IDC_CHECK_LOG_REGISTERS, BST_CHECKED);
|
|
||||||
CheckDlgButton(hwndDlg, IDC_CHECK_LOG_PROCESSOR_STATUS, BST_CHECKED);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
if(logging_options&LOG_REGISTERS)CheckDlgButton(hwndDlg, IDC_CHECK_LOG_REGISTERS, BST_CHECKED);
|
|
||||||
if(logging_options&LOG_PROCESSOR_STATUS)CheckDlgButton(hwndDlg, IDC_CHECK_LOG_PROCESSOR_STATUS, BST_CHECKED);
|
|
||||||
}
|
|
||||||
EnableWindow(GetDlgItem(hwndDlg,IDC_TRACER_LOG_SIZE),TRUE);
|
EnableWindow(GetDlgItem(hwndDlg,IDC_TRACER_LOG_SIZE),TRUE);
|
||||||
EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_LOG_BROWSE),FALSE);
|
EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_LOG_BROWSE),FALSE);
|
||||||
|
CheckDlgButton(hwndDlg, IDC_CHECK_LOG_UPDATE_WINDOW, log_update_window ? BST_CHECKED : BST_UNCHECKED);
|
||||||
if(log_update_window)CheckDlgButton(hwndDlg, IDC_CHECK_LOG_UPDATE_WINDOW, BST_CHECKED);
|
|
||||||
|
|
||||||
EnableTracerMenuItems();
|
EnableTracerMenuItems();
|
||||||
break;
|
break;
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
|
@ -175,6 +170,9 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case IDC_CHECK_LOG_PROCESSOR_STATUS:
|
case IDC_CHECK_LOG_PROCESSOR_STATUS:
|
||||||
logging_options ^= LOG_PROCESSOR_STATUS;
|
logging_options ^= LOG_PROCESSOR_STATUS;
|
||||||
break;
|
break;
|
||||||
|
case IDC_CHECK_LOG_STATUSES_TO_THE_LEFT:
|
||||||
|
tracer_statuses_to_the_left ^= 1;
|
||||||
|
break;
|
||||||
case IDC_CHECK_LINES_TABBING:
|
case IDC_CHECK_LINES_TABBING:
|
||||||
tracer_lines_tabbing ^= 1;
|
tracer_lines_tabbing ^= 1;
|
||||||
break;
|
break;
|
||||||
|
@ -260,6 +258,7 @@ void BeginLoggingSequence(void){
|
||||||
|
|
||||||
if(logtofile){
|
if(logtofile){
|
||||||
if(logfilename == NULL) ShowLogDirDialog();
|
if(logfilename == NULL) ShowLogDirDialog();
|
||||||
|
if (!logfilename) return;
|
||||||
LOG_FP = fopen(logfilename,"w");
|
LOG_FP = fopen(logfilename,"w");
|
||||||
if(LOG_FP == NULL){
|
if(LOG_FP == NULL){
|
||||||
sprintf(str,"Error Opening File %s",logfilename);
|
sprintf(str,"Error Opening File %s",logfilename);
|
||||||
|
@ -329,7 +328,7 @@ done:
|
||||||
void FCEUD_TraceInstruction(){
|
void FCEUD_TraceInstruction(){
|
||||||
if(!logging) return;
|
if(!logging) return;
|
||||||
|
|
||||||
char address[7], data[11], disassembly[LOG_DISASSEMBLY_MAX_LEN], axystate[21], procstatus[12];
|
char str_tabs[LOG_TABS_MAX_LEN], address[7], data[11], disassembly[LOG_DISASSEMBLY_MAX_LEN], axystate[21], procstatus[12];
|
||||||
char str[LOG_LINE_MAX_LEN];
|
char str[LOG_LINE_MAX_LEN];
|
||||||
int addr=X.PC;
|
int addr=X.PC;
|
||||||
int size, j;
|
int size, j;
|
||||||
|
@ -357,11 +356,14 @@ void FCEUD_TraceInstruction(){
|
||||||
axystate[0] = str[0] = 0;
|
axystate[0] = str[0] = 0;
|
||||||
size = opsize[GetMem(addr)];
|
size = opsize[GetMem(addr)];
|
||||||
|
|
||||||
if ((addr+size) > 0xFFFF){
|
if ((addr+size) > 0xFFFF)
|
||||||
|
{
|
||||||
sprintf(data, "%02X ", GetMem(addr&0xFFFF));
|
sprintf(data, "%02X ", GetMem(addr&0xFFFF));
|
||||||
sprintf(disassembly,"OVERFLOW");
|
sprintf(disassembly,"OVERFLOW");
|
||||||
} else {
|
} else
|
||||||
switch(size){
|
{
|
||||||
|
switch(size)
|
||||||
|
{
|
||||||
case 0:
|
case 0:
|
||||||
sprintf(data, "%02X ", GetMem(addr));
|
sprintf(data, "%02X ", GetMem(addr));
|
||||||
sprintf(disassembly,"UNDEFINED");
|
sprintf(disassembly,"UNDEFINED");
|
||||||
|
@ -387,7 +389,8 @@ void FCEUD_TraceInstruction(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//stretch the disassembly string out if we have to output other stuff.
|
//stretch the disassembly string out if we have to output other stuff.
|
||||||
if(logging_options & (LOG_REGISTERS|LOG_PROCESSOR_STATUS)){
|
if((logging_options & (LOG_REGISTERS|LOG_PROCESSOR_STATUS)) && !tracer_statuses_to_the_left)
|
||||||
|
{
|
||||||
for(j = strlen(disassembly);j < LOG_DISASSEMBLY_MAX_LEN - 1;j++)disassembly[j] = ' ';
|
for(j = strlen(disassembly);j < LOG_DISASSEMBLY_MAX_LEN - 1;j++)disassembly[j] = ' ';
|
||||||
disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
disassembly[LOG_DISASSEMBLY_MAX_LEN - 1] = 0;
|
||||||
}
|
}
|
||||||
|
@ -410,23 +413,43 @@ void FCEUD_TraceInstruction(){
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tracer_statuses_to_the_left)
|
||||||
|
{
|
||||||
|
if (logging_options & LOG_REGISTERS)
|
||||||
|
strcat(str, axystate);
|
||||||
|
if ((logging_options & LOG_REGISTERS) && (logging_options & LOG_PROCESSOR_STATUS))
|
||||||
|
strcat(str, " ");
|
||||||
|
if (logging_options & LOG_PROCESSOR_STATUS)
|
||||||
|
strcat(str, procstatus);
|
||||||
|
if ((logging_options & LOG_REGISTERS) || (logging_options & LOG_PROCESSOR_STATUS))
|
||||||
|
strcat(str, " ");
|
||||||
|
}
|
||||||
|
|
||||||
if (tracer_lines_tabbing)
|
if (tracer_lines_tabbing)
|
||||||
{
|
{
|
||||||
// add spaces at the beginning of the line according to stack pointer
|
// add spaces at the beginning of the line according to stack pointer
|
||||||
int spaces = 0xFF - X.S;
|
int spaces = 0xFF - X.S;
|
||||||
if (spaces > LOG_TABS_MAX_LEN)
|
if (spaces >= LOG_TABS_MAX_LEN)
|
||||||
spaces = LOG_TABS_MAX_LEN;
|
spaces = LOG_TABS_MAX_LEN - 1;
|
||||||
for (int i = 0; i < spaces; i++)
|
for (int i = 0; i < spaces; i++)
|
||||||
str[i] = ' ';
|
str_tabs[i] = ' ';
|
||||||
str[spaces] = 0;
|
str_tabs[spaces] = 0;
|
||||||
|
strcat(str, str_tabs);
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(str,address);
|
strcat(str, address);
|
||||||
strcat(str,data);
|
strcat(str, data);
|
||||||
strcat(str,disassembly);
|
strcat(str, disassembly);
|
||||||
if(logging_options & LOG_REGISTERS)strcat(str,axystate);
|
|
||||||
if((logging_options & LOG_REGISTERS) && (logging_options & LOG_PROCESSOR_STATUS))strcat(str," ");
|
if (!tracer_statuses_to_the_left)
|
||||||
if(logging_options & LOG_PROCESSOR_STATUS)strcat(str,procstatus);
|
{
|
||||||
|
if (logging_options & LOG_REGISTERS)
|
||||||
|
strcat(str,axystate);
|
||||||
|
if ((logging_options & LOG_REGISTERS) && (logging_options & LOG_PROCESSOR_STATUS))
|
||||||
|
strcat(str," ");
|
||||||
|
if (logging_options & LOG_PROCESSOR_STATUS)
|
||||||
|
strcat(str,procstatus);
|
||||||
|
}
|
||||||
|
|
||||||
OutputLogLine(str);
|
OutputLogLine(str);
|
||||||
|
|
||||||
|
@ -481,12 +504,18 @@ void UpdateLogWindow(void){
|
||||||
//
|
//
|
||||||
|
|
||||||
//we don't want to continue if the trace logger isn't logging, or if its logging to a file.
|
//we don't want to continue if the trace logger isn't logging, or if its logging to a file.
|
||||||
if((!logging) || logtofile)return;
|
if ((!logging) || logtofile)
|
||||||
|
return;
|
||||||
|
|
||||||
//if the game isn't paused, and the option to update the log window while running isn't checked, then halt here.
|
// only update the window when some emulation occured
|
||||||
if(!FCEUI_EmulationPaused() && !log_update_window){ //mbg merge 7/19/06 changd to use EmulationPaused()
|
// and only update the window when emulator is paused or log_update_window=true
|
||||||
|
bool emu_paused = (FCEUI_EmulationPaused() != 0);
|
||||||
|
if ((!emu_paused && !log_update_window) || (old_emu_paused && !JustFrameAdvanced)) //mbg merge 7/19/06 changd to use EmulationPaused()
|
||||||
|
{
|
||||||
|
old_emu_paused = emu_paused;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
old_emu_paused = emu_paused;
|
||||||
|
|
||||||
tracesi.cbSize = sizeof(SCROLLINFO);
|
tracesi.cbSize = sizeof(SCROLLINFO);
|
||||||
tracesi.fMask = SIF_ALL;
|
tracesi.fMask = SIF_ALL;
|
||||||
|
@ -535,33 +564,29 @@ void EnableTracerMenuItems(void){
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
|
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if(logging){
|
if(logging)
|
||||||
|
{
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_LAST),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_LAST),FALSE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_TO_FILE),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_TO_FILE),FALSE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),FALSE);
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_REGISTERS),FALSE);
|
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_PROCESSOR_STATUS),FALSE);
|
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),FALSE);
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),FALSE);
|
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_DATA),FALSE);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_LAST),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_LAST),TRUE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_TO_FILE),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_RADIO_LOG_TO_FILE),TRUE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),TRUE);
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_REGISTERS),TRUE);
|
|
||||||
//EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_PROCESSOR_STATUS),TRUE); //uncomment me
|
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),TRUE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_NEW_INSTRUCTIONS),TRUE);
|
||||||
|
|
||||||
if(logtofile){
|
if(logtofile)
|
||||||
|
{
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),FALSE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),TRUE);
|
||||||
CheckDlgButton(hTracer, IDC_CHECK_LOG_UPDATE_WINDOW, BST_UNCHECKED);
|
|
||||||
log_update_window = 0;
|
log_update_window = 0;
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_UPDATE_WINDOW),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_UPDATE_WINDOW),FALSE);
|
||||||
} else{
|
} else
|
||||||
|
{
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_TRACER_LOG_SIZE),TRUE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),FALSE);
|
EnableWindow(GetDlgItem(hTracer,IDC_BTN_LOG_BROWSE),FALSE);
|
||||||
EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_UPDATE_WINDOW),TRUE);
|
EnableWindow(GetDlgItem(hTracer,IDC_CHECK_LOG_UPDATE_WINDOW),TRUE);
|
||||||
|
|
|
@ -217,7 +217,7 @@ bool frameAdvanceRequested=false;
|
||||||
int frameAdvanceDelay;
|
int frameAdvanceDelay;
|
||||||
|
|
||||||
//indicates that the emulation core just frame advanced (consumed the frame advance state and paused)
|
//indicates that the emulation core just frame advanced (consumed the frame advance state and paused)
|
||||||
bool JustFrameAdvanced=false;
|
bool JustFrameAdvanced = false;
|
||||||
|
|
||||||
static int *AutosaveStatus; //is it safe to load Auto-savestate
|
static int *AutosaveStatus; //is it safe to load Auto-savestate
|
||||||
static int AutosaveIndex = 0; //which Auto-savestate we're on
|
static int AutosaveIndex = 0; //which Auto-savestate we're on
|
||||||
|
@ -624,6 +624,11 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
|
||||||
//skip initiates frame skip if 1, or frame skip and sound skip if 2
|
//skip initiates frame skip if 1, or frame skip and sound skip if 2
|
||||||
int r,ssize;
|
int r,ssize;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
UpdateLogWindow();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
JustFrameAdvanced = false;
|
JustFrameAdvanced = false;
|
||||||
|
|
||||||
if (frameAdvanceRequested)
|
if (frameAdvanceRequested)
|
||||||
|
@ -676,7 +681,6 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
|
||||||
UpdateTextHooker();
|
UpdateTextHooker();
|
||||||
Update_RAM_Search(); // Update_RAM_Watch() is also called.
|
Update_RAM_Search(); // Update_RAM_Watch() is also called.
|
||||||
RamChange();
|
RamChange();
|
||||||
UpdateLogWindow();
|
|
||||||
//FCEUI_AviVideoUpdate(XBuf);
|
//FCEUI_AviVideoUpdate(XBuf);
|
||||||
extern int KillFCEUXonFrame;
|
extern int KillFCEUXonFrame;
|
||||||
if (KillFCEUXonFrame && (FCEUMOV_GetFrame() >= KillFCEUXonFrame))
|
if (KillFCEUXonFrame && (FCEUMOV_GetFrame() >= KillFCEUXonFrame))
|
||||||
|
|
Loading…
Reference in New Issue