* Added FPS display to Win32 port (Config->Display->FPS)
* Debugger: double-click breakpoint also adds current bank number to breakpoint condition * Debugger: "Display ROM offsets" option * updated docs [[Split portion of a mixed commit.]]
This commit is contained in:
parent
d5f5cd5aec
commit
83c4530df2
|
@ -1,3 +1,7 @@
|
|||
12-Aug-2012 - AnS - Debugger: "Display ROM offsets" option
|
||||
12-Aug-2012 - AnS - Debugger: double-click breakpoint also adds current bank number to breakpoint condition
|
||||
12-Aug-2012 - AnS - Added FPS display to Win32 port (Config->Display->FPS)
|
||||
|
||||
10-Aug-2012 - prg - gtk: reset video on video dialog close
|
||||
10-Aug-2012 - prg - gtk: add gui option for showfps
|
||||
10-Aug-2012 - prg - sdl: add runtime option for controling drawing fps (SDL.ShowFPS)
|
||||
|
|
|
@ -215,7 +215,7 @@ InitVideo(FCEUGI *gi)
|
|||
}
|
||||
|
||||
// check to see if we are showing FPS
|
||||
FCEUI_ShowFPS(show_fps);
|
||||
FCEUI_SetShowFPS(show_fps);
|
||||
|
||||
// check if we are rendering fullscreen
|
||||
if(s_fullscreen) {
|
||||
|
|
|
@ -66,6 +66,7 @@ extern bool enableHUDrecording;
|
|||
extern bool disableMovieMessages;
|
||||
extern bool replaceP2StartWithMicrophone;
|
||||
extern bool SingleInstanceOnly;
|
||||
extern bool Show_FPS;
|
||||
extern bool oldInputDisplay;
|
||||
extern bool fullSaveStateLoads;
|
||||
extern int frameSkipAmt;
|
||||
|
@ -256,6 +257,7 @@ static CFGSTRUCT fceuconfig[] = {
|
|||
AC(debuggerAutoload),
|
||||
AC(allowUDLR),
|
||||
AC(debuggerSaveLoadDEBFiles),
|
||||
AC(debuggerDisplayROMoffsets),
|
||||
AC(fullSaveStateLoads),
|
||||
AC(frameSkipAmt),
|
||||
|
||||
|
@ -396,6 +398,7 @@ static CFGSTRUCT fceuconfig[] = {
|
|||
AC(disableMovieMessages),
|
||||
AC(replaceP2StartWithMicrophone),
|
||||
AC(SingleInstanceOnly),
|
||||
AC(Show_FPS),
|
||||
|
||||
ENDCFGSTRUCT
|
||||
};
|
||||
|
|
|
@ -83,6 +83,7 @@ static SCROLLINFO si;
|
|||
|
||||
bool debuggerAutoload = false;
|
||||
bool debuggerSaveLoadDEBFiles = true;
|
||||
bool debuggerDisplayROMoffsets = false;
|
||||
|
||||
#define INVALID_START_OFFSET 1
|
||||
#define INVALID_END_OFFSET 2
|
||||
|
@ -276,6 +277,9 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
CheckDlgButton(hwndDlg, IDC_ADDBP_MODE_X, BST_CHECKED);
|
||||
sprintf(str, "%04X", lParam);
|
||||
SetDlgItemText(hwndDlg,IDC_ADDBP_ADDR_START,str);
|
||||
// also set the condition to only break at this Bank
|
||||
sprintf(str, "K==#%02X", getBank(lParam));
|
||||
SetDlgItemText(hwndDlg, IDC_ADDBP_CONDITION, str);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -372,9 +376,19 @@ void Disassemble(HWND hWnd, int id, int scrollid, unsigned int addr) {
|
|||
else
|
||||
strcat(str, " ");
|
||||
|
||||
if(addr >= 0x8000)
|
||||
sprintf(chr, "%02X:%04X", getBank(addr), addr);
|
||||
else sprintf(chr, " :%04X", addr);
|
||||
if (addr >= 0x8000)
|
||||
{
|
||||
if (debuggerDisplayROMoffsets && GetNesFileAddress(addr) != -1)
|
||||
{
|
||||
sprintf(chr, " %06X", GetNesFileAddress(addr));
|
||||
} else
|
||||
{
|
||||
sprintf(chr, "%02X:%04X", getBank(addr), addr);
|
||||
}
|
||||
} else
|
||||
{
|
||||
sprintf(chr, " :%04X", addr);
|
||||
}
|
||||
|
||||
// ################################## Start of SP CODE ###########################
|
||||
|
||||
|
@ -1522,10 +1536,11 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
break;
|
||||
}
|
||||
case WM_RBUTTONDOWN:
|
||||
{
|
||||
mouse_x = GET_X_LPARAM(lParam);
|
||||
mouse_y = GET_Y_LPARAM(lParam);
|
||||
//mbg merge 7/18/06 changed pausing check
|
||||
if (FCEUI_EmulationPaused() && (mouse_x > 8) && (mouse_x < 22) && (mouse_y > 10) && (mouse_y < 338))
|
||||
if (FCEUI_EmulationPaused() && (mouse_x > 8) && (mouse_x < 22) && (mouse_y > 10) && (mouse_y < 538))
|
||||
{
|
||||
tmp = (mouse_y - 10) / 14;
|
||||
i = si.nPos;
|
||||
|
@ -1545,11 +1560,13 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
ChangeMemViewFocus(0, i, -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_MBUTTONDOWN:
|
||||
{
|
||||
mouse_x = GET_X_LPARAM(lParam);
|
||||
mouse_y = GET_Y_LPARAM(lParam);
|
||||
//mbg merge 7/18/06 changed pausing check
|
||||
if (FCEUI_EmulationPaused() && (mouse_x > 8) && (mouse_x < 22) && (mouse_y > 10) && (mouse_y < 338))
|
||||
if (FCEUI_EmulationPaused() && (mouse_x > 8) && (mouse_x < 22) && (mouse_y > 10) && (mouse_y < 538))
|
||||
{
|
||||
tmp = (mouse_y - 10) / 14;
|
||||
i = si.nPos;
|
||||
|
@ -1564,6 +1581,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
SetGGConvFocus(i,GetMem(i));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_INITMENUPOPUP:
|
||||
case WM_INITMENU:
|
||||
break;
|
||||
|
@ -1723,6 +1741,12 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
|
||||
// ################################## End of SP CODE ###########################
|
||||
|
||||
case IDC_DEBUGGER_ROM_OFFSETS:
|
||||
{
|
||||
debuggerDisplayROMoffsets ^= 1;
|
||||
UpdateDebugger();
|
||||
break;
|
||||
}
|
||||
case IDC_DEBUGGER_ROM_PATCHER: DoPatcher(-1,hwndDlg); break;
|
||||
case DEBUGGER_CONTEXT_TOGGLEBREAK: DebuggerCallB(hwndDlg, WM_COMMAND, (LBN_DBLCLK * 0x10000) | (IDC_DEBUGGER_BP_LIST), lParam); break;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ extern HWND hDebug;
|
|||
extern int childwnd,numWPs; //mbg merge 7/18/06 had to make extern
|
||||
extern bool debuggerAutoload;
|
||||
extern bool debuggerSaveLoadDEBFiles;
|
||||
extern bool debuggerDisplayROMoffsets;
|
||||
|
||||
void CenterWindow(HWND hwndDlg);
|
||||
void DoPatcher(int address,HWND hParent);
|
||||
|
|
Binary file not shown.
|
@ -132,6 +132,7 @@ BEGIN
|
|||
MENUITEM "&Frame Counter", ID_DISPLAY_FRAMECOUNTER
|
||||
MENUITEM "&Rerecord Counter", ID_DISPLAY_RERECORDCOUNTER
|
||||
MENUITEM "&Movie status icon", ID_DISPLAY_MOVIESTATUSICON
|
||||
MENUITEM "FPS", ID_DISPLAY_FPS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Graphics: &BG", MENU_DISPLAY_BG
|
||||
MENUITEM "Graphics: &OBJ", MENU_DISPLAY_OBJ
|
||||
|
@ -1122,14 +1123,14 @@ BEGIN
|
|||
CONTROL "",IDC_DEBUGGER_ADDR_LINE,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,4,308,341,11
|
||||
CONTROL "Break on Bad Opcode",IDC_DEBUGGER_BREAK_ON_BAD_OP,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,438,125,89,10
|
||||
CONTROL "Symbolic debugging",IDC_DEBUGGER_ENABLE_SYMBOLIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,442,259,77,10
|
||||
PUSHBUTTON "Reload Symbols",IDC_DEBUGGER_RELOAD_SYMS,441,271,62,14
|
||||
CONTROL "Symbolic debugging",IDC_DEBUGGER_ENABLE_SYMBOLIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,442,261,80,10
|
||||
PUSHBUTTON "Reload Symbols",IDC_DEBUGGER_RELOAD_SYMS,441,272,62,14
|
||||
GROUPBOX "Address Bookmarks",45535,349,228,84,76
|
||||
LISTBOX LIST_DEBUGGER_BOOKMARKS,353,238,44,63,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_DEBUGGER_BOOKMARK,400,238,29,14,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Add",IDC_DEBUGGER_BOOKMARK_ADD,399,254,31,14
|
||||
PUSHBUTTON "Delete",IDC_DEBUGGER_BOOKMARK_DEL,399,270,31,14
|
||||
PUSHBUTTON "Rom Patcher",IDC_DEBUGGER_ROM_PATCHER,441,287,62,14
|
||||
PUSHBUTTON "Rom Patcher",IDC_DEBUGGER_ROM_PATCHER,441,288,62,14
|
||||
CONTROL "",IDC_DEBUGGER_ICONTRAY,"Static",SS_BLACKFRAME,4,5,11,300
|
||||
PUSHBUTTON "",IDC_DEBUGGER_RESTORESIZE,349,307,13,10
|
||||
LTEXT "Default window size",IDC_STATIC,364,308,68,9
|
||||
|
@ -1139,7 +1140,7 @@ BEGIN
|
|||
CONTROL "Load .DEB",DEBUGLOADDEB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,488,306,48,13
|
||||
CONTROL "Auto-open",DEBUGAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,438,306,46,13
|
||||
LTEXT "CPU cycles:",IDC_STATIC,402,179,39,8
|
||||
PUSHBUTTON "Reset counters",IDC_DEBUGGER_RESET_COUNTERS,471,230,64,14
|
||||
PUSHBUTTON "Reset counters",IDC_DEBUGGER_RESET_COUNTERS,471,229,64,14
|
||||
CONTROL "Break when exceed",IDC_DEBUGGER_BREAK_ON_CYCLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,403,191,77,10
|
||||
LTEXT "Pixel:",IDC_STATIC,352,216,17,8
|
||||
EDITTEXT IDC_DEBUGGER_CYCLES_EXCEED,481,190,53,12,ES_UPPERCASE | ES_NOHIDESEL | ES_WANTRETURN | ES_NUMBER
|
||||
|
@ -1147,7 +1148,8 @@ BEGIN
|
|||
CONTROL "Break when exceed",IDC_DEBUGGER_BREAK_ON_INSTRUCTIONS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,403,216,77,10
|
||||
EDITTEXT IDC_DEBUGGER_INSTRUCTIONS_EXCEED,481,215,53,12,ES_UPPERCASE | ES_NOHIDESEL | ES_WANTRETURN | ES_NUMBER
|
||||
GROUPBOX "",IDC_STATIC,437,252,97,52
|
||||
GROUPBOX "",IDC_STATIC,437,242,97,63
|
||||
CONTROL "Display ROM offsets",IDC_DEBUGGER_ROM_OFFSETS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,442,249,82,10
|
||||
END
|
||||
|
||||
TRACER DIALOGEX 65527, 65513, 383, 316
|
||||
|
|
|
@ -251,6 +251,8 @@
|
|||
#define IDC_DEBUGGER_ENABLE_SYMBOLIC 208
|
||||
#define IDB_TE_GREEN_BLUE_ARROW 208
|
||||
#define IDB_PIANO_0 209
|
||||
#define IDC_DEBUGGER_ENABLE_SYMBOLIC2 209
|
||||
#define IDC_DEBUGGER_ROM_OFFSETS 209
|
||||
#define IDB_PIANO_1 210
|
||||
#define IDB_PIANO_2 211
|
||||
#define IDB_PIANO_3 212
|
||||
|
@ -1114,6 +1116,7 @@
|
|||
#define ACCEL_CTRL_SPACEBAR 40563
|
||||
#define ACCEL_CTRL_SPACE 40563
|
||||
#define ID_HELP_OPEN_MANUAL 40564
|
||||
#define ID_DISPLAY_FPS 40565
|
||||
#define IDC_DEBUGGER_ICONTRAY 55535
|
||||
#define MW_ValueLabel2 65423
|
||||
#define MW_ValueLabel1 65426
|
||||
|
@ -1123,7 +1126,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 289
|
||||
#define _APS_NEXT_COMMAND_VALUE 40565
|
||||
#define _APS_NEXT_COMMAND_VALUE 40566
|
||||
#define _APS_NEXT_CONTROL_VALUE 1281
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
|
|
@ -422,6 +422,7 @@ void UpdateCheckedMenuItems()
|
|||
CheckMenuItem(fceumenu, MENU_DISPLAY_LAGCOUNTER, lagCounterDisplay?MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, ID_DISPLAY_FRAMECOUNTER, frame_display ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, ID_DISPLAY_RERECORDCOUNTER, rerecord_display ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, ID_DISPLAY_FPS, FCEUI_ShowFPS() ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, ID_DISPLAY_MOVIESTATUSICON, status_icon ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, MENU_DISPLAY_BG, bg?MF_CHECKED:MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, MENU_DISPLAY_OBJ, spr?MF_CHECKED:MF_UNCHECKED);
|
||||
|
@ -1817,7 +1818,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
case ID_DISPLAY_MOVIESTATUSICON:
|
||||
FCEUD_ToggleStatusIcon();
|
||||
break;
|
||||
|
||||
case ID_DISPLAY_FPS:
|
||||
FCEUI_SetShowFPS(FCEUI_ShowFPS() ^ 1);
|
||||
break;
|
||||
case MENU_DISPLAY_BG:
|
||||
case MENU_DISPLAY_OBJ:
|
||||
{
|
||||
|
|
|
@ -128,7 +128,6 @@ int FCEU_InitVirtualVideo(void)
|
|||
}
|
||||
|
||||
void ShowFPS(void);
|
||||
|
||||
#ifdef FRAMESKIP
|
||||
void FCEU_PutImageDummy(void)
|
||||
{
|
||||
|
@ -742,7 +741,11 @@ uint64 FCEUD_GetTime(void);
|
|||
uint64 FCEUD_GetTimeFreq(void);
|
||||
bool Show_FPS = false;
|
||||
// Control whether the frames per second of the emulation is rendered.
|
||||
void FCEUI_ShowFPS(bool showFPS)
|
||||
bool FCEUI_ShowFPS()
|
||||
{
|
||||
return Show_FPS;
|
||||
}
|
||||
void FCEUI_SetShowFPS(bool showFPS)
|
||||
{
|
||||
Show_FPS = showFPS;
|
||||
}
|
||||
|
@ -759,8 +762,8 @@ void ShowFPS(void)
|
|||
int booplimit = PAL?50:60;
|
||||
boop[boopcount] = FCEUD_GetTime();
|
||||
|
||||
sprintf(fpsmsg, "%8.1f",(double)booplimit / ((double)da / FCEUD_GetTimeFreq()));
|
||||
DrawTextTrans(ClipSidesOffset+XBuf + (256-8-8*8) + (FSettings.FirstSLine+4)*256,256, (uint8*)fpsmsg ,4);
|
||||
sprintf(fpsmsg, "%7.1f",(double)booplimit / ((double)da / FCEUD_GetTimeFreq()));
|
||||
DrawTextTrans(ClipSidesOffset + XBuf + (256 - 7*8) + (FSettings.FirstSLine+4)*256, 256, (uint8*)fpsmsg, 4);
|
||||
// It's not averaging FPS over exactly 1 second, but it's close enough.
|
||||
boopcount = (boopcount + 1) % booplimit;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ void FCEU_DrawNumberRow(uint8 *XBuf, int *nstatus, int cur);
|
|||
|
||||
std::string FCEUI_GetSnapshotAsName();
|
||||
void FCEUI_SetSnapshotAsName(std::string name);
|
||||
void FCEUI_ShowFPS(bool showFPS);
|
||||
bool FCEUI_ShowFPS();
|
||||
void FCEUI_SetShowFPS(bool showFPS);
|
||||
void snapAVI();
|
||||
#endif
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue