more debugging cleanups
[[Split portion of a mixed commit.]]
This commit is contained in:
parent
16a27a1162
commit
26ba7e79e1
|
@ -79,9 +79,8 @@ char *cdlogfilename;
|
|||
//char loadedcdfile[MAX_PATH];
|
||||
static int indirectnext;
|
||||
|
||||
//records whether loggingCD is enabled
|
||||
int debug_loggingCD;
|
||||
//void FCEUI_SetLoggingCD(int val) { debug_loggingCD = val; }
|
||||
//int FCEUI_GetLoggingCD(int val) { return debug_loggingCD = val; }
|
||||
|
||||
//called by the cpu to perform logging if CDLogging is enabled
|
||||
void LogCDVectors(int which){
|
||||
|
@ -412,6 +411,7 @@ void breakpoint() {
|
|||
}
|
||||
//bbit edited: this is the end of the inserted code
|
||||
|
||||
int debug_tracing;
|
||||
|
||||
void DebugCycle() {
|
||||
if (numWPs | step | stepout | watchpoint[64].flags | badopbreak)
|
||||
|
@ -419,5 +419,5 @@ void DebugCycle() {
|
|||
if(debug_loggingCD) LogCDData();
|
||||
//mbg 6/30/06 - this was commented out when i got here. i dont understand it anyway
|
||||
//if(logging || (hMemView && (EditingMode == 2))) LogInstruction();
|
||||
//if(logging) LogInstruction();
|
||||
FCEUD_TraceInstruction();
|
||||
}
|
||||
|
|
10
debug.h
10
debug.h
|
@ -65,7 +65,6 @@ uint8 GetPPUMem(uint8 A);
|
|||
void LogCDVectors(int which);
|
||||
void LogCDData();
|
||||
extern volatile int codecount, datacount, undefinedcount;
|
||||
extern volatile int loggingcodedata;
|
||||
extern unsigned char *cdloggerdata;
|
||||
|
||||
extern int debug_loggingCD;
|
||||
|
@ -73,6 +72,13 @@ static INLINE void FCEUI_SetLoggingCD(int val) { debug_loggingCD = val; }
|
|||
static INLINE int FCEUI_GetLoggingCD() { return debug_loggingCD; }
|
||||
//-------
|
||||
|
||||
//-------tracing
|
||||
//we're letting the win32 driver handle this ittself for now
|
||||
//extern int debug_tracing;
|
||||
//static INLINE void FCEUI_SetTracing(int val) { debug_tracing = val; }
|
||||
//static INLINE int FCEUI_GetTracing() { return debug_tracing; }
|
||||
//---------
|
||||
|
||||
//--------debugger
|
||||
extern int iaPC;
|
||||
extern uint32 iapoffset; //mbg merge 7/18/06 changed from int
|
||||
|
@ -84,4 +90,4 @@ extern uint8 *vnapage[4],*VPage[8];
|
|||
extern uint8 PPU[4],PALRAM[0x20],SPRAM[0x100],VRAMBuffer,PPUGenLatch,XOffset;
|
||||
extern uint32 RefreshAddr;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
7
driver.h
7
driver.h
|
@ -311,10 +311,15 @@ int FCEUD_ShowStatusIcon(void);
|
|||
void FCEUD_ToggleStatusIcon(void);
|
||||
void FCEUD_HideMenuToggle(void);
|
||||
|
||||
//new merge-era driver routines here
|
||||
//new merge-era driver routines here:
|
||||
|
||||
//signals that the cpu core hit a breakpoint
|
||||
//this function should not return until the core is ready for the next cycle
|
||||
void FCEUD_DebugBreakpoint();
|
||||
|
||||
//the driver should log the current instruction, if it wants
|
||||
//(we should move the code in the win driver that does this to the shared area)
|
||||
void FCEUD_TraceInstruction();
|
||||
|
||||
|
||||
#endif /* __DRIVER_H_ */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "..\..\x6502.h"
|
||||
#include "..\..\debug.h"
|
||||
#include "debugger.h"
|
||||
#include "..\..\tracer.h"
|
||||
#include "tracer.h"
|
||||
#include "cdlogger.h"
|
||||
|
||||
#define INESPRIV
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "..\..\nsf.h"
|
||||
#include "..\..\cart.h"
|
||||
#include "..\..\ines.h"
|
||||
#include "..\..\tracer.h"
|
||||
#include "tracer.h"
|
||||
#include "..\..\memview.h"
|
||||
#include "cheat.h"
|
||||
#include <assert.h>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "..\..\ppuview.h"
|
||||
#include "..\..\ntview.h"
|
||||
#include "..\..\memview.h"
|
||||
#include "..\..\tracer.h"
|
||||
#include "tracer.h"
|
||||
#include "cdlogger.h"
|
||||
//-----
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "..\..\cart.h" //mbg merge 7/19/06 moved after fceu.h
|
||||
#include "cdlogger.h"
|
||||
#include "..\..\file.h"
|
||||
#include "..\..\tracer.h"
|
||||
#include "tracer.h"
|
||||
#include "..\..\memview.h"
|
||||
|
||||
//#define LOG_SKIP_UNMAPPED 4
|
||||
|
@ -277,7 +277,9 @@ done:
|
|||
}*/
|
||||
|
||||
//todo: really speed this up
|
||||
void LogInstruction(){
|
||||
void FCEUD_TraceInstruction(){
|
||||
if(!logging) return;
|
||||
|
||||
char address[7], data[11], disassembly[28], axystate[16], procstatus[12];
|
||||
char str[96];
|
||||
int addr=X.PC;
|
||||
|
|
Loading…
Reference in New Issue