* CDLogger: code cleanup
* CDLogger: removed obnoxious reminder about NewPPU * CDLogger: added current CDL filename field * CDLogger: added default CDL naming * CDLogger: added "Auto-save .CDL when closing ROMs" option * CDLogger: added "Auto-resume logging when loading ROMs" option
This commit is contained in:
parent
71f4affe5c
commit
009ece83d4
|
@ -370,6 +370,7 @@ int condition(watchpointinfo* wp)
|
||||||
|
|
||||||
volatile int codecount, datacount, undefinedcount;
|
volatile int codecount, datacount, undefinedcount;
|
||||||
unsigned char *cdloggerdata;
|
unsigned char *cdloggerdata;
|
||||||
|
unsigned int cdloggerdataSize = 0;
|
||||||
static int indirectnext;
|
static int indirectnext;
|
||||||
|
|
||||||
int debug_loggingCD;
|
int debug_loggingCD;
|
||||||
|
|
|
@ -76,6 +76,7 @@ void LogCDVectors(int which);
|
||||||
void LogCDData(uint8 *opcode, uint16 A, int size);
|
void LogCDData(uint8 *opcode, uint16 A, int size);
|
||||||
extern volatile int codecount, datacount, undefinedcount;
|
extern volatile int codecount, datacount, undefinedcount;
|
||||||
extern unsigned char *cdloggerdata;
|
extern unsigned char *cdloggerdata;
|
||||||
|
extern unsigned int cdloggerdataSize;
|
||||||
|
|
||||||
extern int debug_loggingCD;
|
extern int debug_loggingCD;
|
||||||
static INLINE void FCEUI_SetLoggingCD(int val) { debug_loggingCD = val; }
|
static INLINE void FCEUI_SetLoggingCD(int val) { debug_loggingCD = val; }
|
||||||
|
|
|
@ -35,10 +35,20 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
bool LoadCDLog(const char* nameo);
|
||||||
void LoadCDLogFile();
|
void LoadCDLogFile();
|
||||||
void SaveCDLogFileAs();
|
void SaveCDLogFileAs();
|
||||||
void SaveCDLogFile();
|
void SaveCDLogFile();
|
||||||
void SaveStrippedRom(int invert);
|
void SaveStrippedRom(int invert);
|
||||||
|
void CDLoggerROMClosed();
|
||||||
|
void CDLoggerROMChanged();
|
||||||
|
void CDLoggerPPUChanged();
|
||||||
|
bool PauseLogging();
|
||||||
|
void StartLogging();
|
||||||
|
void FreeLog();
|
||||||
|
void InitLog();
|
||||||
|
void ResetLog();
|
||||||
|
void RenameLog(const char* newName);
|
||||||
|
|
||||||
extern iNES_HEADER head; //defined in ines.c
|
extern iNES_HEADER head; //defined in ines.c
|
||||||
extern uint8 *trainerpoo;
|
extern uint8 *trainerpoo;
|
||||||
|
@ -46,9 +56,12 @@ extern uint8 *trainerpoo;
|
||||||
//---------CDLogger VROM
|
//---------CDLogger VROM
|
||||||
extern volatile int rendercount, vromreadcount, undefinedvromcount;
|
extern volatile int rendercount, vromreadcount, undefinedvromcount;
|
||||||
extern unsigned char *cdloggervdata;
|
extern unsigned char *cdloggervdata;
|
||||||
|
extern unsigned int cdloggerVideoDataSize;
|
||||||
extern int newppu;
|
extern int newppu;
|
||||||
|
|
||||||
int CDLogger_wndx=0, CDLogger_wndy=0;
|
int CDLogger_wndx=0, CDLogger_wndy=0;
|
||||||
|
bool autosaveCDL = true;
|
||||||
|
bool autoresumeCDLogging = true;
|
||||||
|
|
||||||
extern uint8 *NSFDATA;
|
extern uint8 *NSFDATA;
|
||||||
extern int NSFMaxBank;
|
extern int NSFMaxBank;
|
||||||
|
@ -56,20 +69,20 @@ static uint8 NSFLoadLow;
|
||||||
static uint8 NSFLoadHigh;
|
static uint8 NSFLoadHigh;
|
||||||
|
|
||||||
HWND hCDLogger;
|
HWND hCDLogger;
|
||||||
char loadedcdfile[1024];
|
char loadedcdfile[2048] = {0};
|
||||||
|
|
||||||
//Prototypes
|
BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
void LoadCDLog (const char* nameo);
|
{
|
||||||
|
switch(uMsg)
|
||||||
BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
{
|
||||||
switch(uMsg) {
|
|
||||||
case WM_DROPFILES:
|
case WM_DROPFILES:
|
||||||
{
|
{
|
||||||
UINT len;
|
UINT len;
|
||||||
char *ftmp;
|
char *ftmp;
|
||||||
|
|
||||||
len=DragQueryFile((HDROP)wParam,0,0,0)+1;
|
len=DragQueryFile((HDROP)wParam,0,0,0)+1;
|
||||||
if((ftmp=(char*)malloc(len))) {
|
if((ftmp=(char*)malloc(len)))
|
||||||
|
{
|
||||||
DragQueryFile((HDROP)wParam,0,ftmp,len);
|
DragQueryFile((HDROP)wParam,0,ftmp,len);
|
||||||
string fileDropped = ftmp;
|
string fileDropped = ftmp;
|
||||||
//adelikat: Drag and Drop only checks file extension, the internal functions are responsible for file error checking
|
//adelikat: Drag and Drop only checks file extension, the internal functions are responsible for file error checking
|
||||||
|
@ -90,16 +103,15 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_MOVE: {
|
case WM_MOVE:
|
||||||
if (!IsIconic(hwndDlg)) {
|
{
|
||||||
RECT wrect;
|
if (!IsIconic(hwndDlg))
|
||||||
GetWindowRect(hwndDlg,&wrect);
|
{
|
||||||
CDLogger_wndx = wrect.left;
|
RECT wrect;
|
||||||
CDLogger_wndy = wrect.top;
|
GetWindowRect(hwndDlg,&wrect);
|
||||||
|
CDLogger_wndx = wrect.left;
|
||||||
#ifdef WIN32
|
CDLogger_wndy = wrect.top;
|
||||||
WindowBoundsCheckNoResize(CDLogger_wndx,CDLogger_wndy,wrect.right);
|
WindowBoundsCheckNoResize(CDLogger_wndx,CDLogger_wndy,wrect.right);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
@ -108,78 +120,45 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
if (CDLogger_wndy==-32000) CDLogger_wndy=0;
|
if (CDLogger_wndy==-32000) CDLogger_wndy=0;
|
||||||
SetWindowPos(hwndDlg,0,CDLogger_wndx,CDLogger_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
|
SetWindowPos(hwndDlg,0,CDLogger_wndx,CDLogger_wndy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
|
||||||
hCDLogger = hwndDlg;
|
hCDLogger = hwndDlg;
|
||||||
codecount = datacount = rendercount = vromreadcount = 0;
|
InitLog();
|
||||||
undefinedcount = PRGsize[0];
|
ResetLog();
|
||||||
cdloggerdata = (unsigned char*)malloc(PRGsize[0]); //mbg merge 7/18/06 added cast
|
RenameLog("");
|
||||||
ZeroMemory(cdloggerdata,PRGsize[0]);
|
SetDlgItemText(hCDLogger, ID_CDLFILENAME, loadedcdfile);
|
||||||
if(CHRsize[0] != 0)
|
CheckDlgButton(hCDLogger, IDC_AUTOSAVECDL, autosaveCDL ? BST_CHECKED : BST_UNCHECKED);
|
||||||
{
|
CheckDlgButton(hCDLogger, IDC_AUTORESUMECDLOGGING, autoresumeCDLogging ? BST_CHECKED : BST_UNCHECKED);
|
||||||
undefinedvromcount = CHRsize[0];
|
CDLoggerPPUChanged();
|
||||||
cdloggervdata = (unsigned char*)malloc(CHRsize[0]);
|
|
||||||
ZeroMemory(cdloggervdata,CHRsize[0]);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
case WM_QUIT:
|
case WM_QUIT:
|
||||||
if((logging) && (logging_options & LOG_NEW_INSTRUCTIONS)){
|
if (PauseLogging())
|
||||||
MessageBox(hCDLogger,
|
{
|
||||||
"The Trace logger is currently using this for some of its features.\
|
FreeLog();
|
||||||
Please turn the trace logger off and try again.","Unable to Pause Code/Data Logger", MB_OK);
|
RenameLog("");
|
||||||
break;
|
hCDLogger = 0;
|
||||||
}
|
EndDialog(hwndDlg,0);
|
||||||
FCEUI_SetLoggingCD(0);
|
}
|
||||||
free(cdloggerdata);
|
|
||||||
free(cdloggervdata);
|
|
||||||
cdloggerdata=0;
|
|
||||||
cdloggervdata=0;
|
|
||||||
hCDLogger = 0;
|
|
||||||
EndDialog(hwndDlg,0);
|
|
||||||
break;
|
break;
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch(HIWORD(wParam)) {
|
switch(HIWORD(wParam))
|
||||||
|
{
|
||||||
case BN_CLICKED:
|
case BN_CLICKED:
|
||||||
switch(LOWORD(wParam)) {
|
{
|
||||||
|
switch(LOWORD(wParam))
|
||||||
|
{
|
||||||
case BTN_CDLOGGER_RESET:
|
case BTN_CDLOGGER_RESET:
|
||||||
codecount = datacount = rendercount = vromreadcount = 0;
|
{
|
||||||
undefinedcount = PRGsize[0];
|
ResetLog();
|
||||||
ZeroMemory(cdloggerdata,PRGsize[0]);
|
|
||||||
if(CHRsize[0] != 0)
|
|
||||||
{
|
|
||||||
undefinedvromcount = CHRsize[0];
|
|
||||||
ZeroMemory(cdloggervdata,CHRsize[0]);
|
|
||||||
}
|
|
||||||
UpdateCDLogger();
|
UpdateCDLogger();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case BTN_CDLOGGER_LOAD:
|
case BTN_CDLOGGER_LOAD:
|
||||||
LoadCDLogFile();
|
LoadCDLogFile();
|
||||||
break;
|
break;
|
||||||
case BTN_CDLOGGER_START_PAUSE:
|
case BTN_CDLOGGER_START_PAUSE:
|
||||||
if(FCEUI_GetLoggingCD()){
|
if (FCEUI_GetLoggingCD())
|
||||||
if((logging) && (logging_options & LOG_NEW_INSTRUCTIONS)){
|
PauseLogging();
|
||||||
MessageBox(hCDLogger,
|
else
|
||||||
"The Trace logger is currently using this for some of its features.\
|
StartLogging();
|
||||||
Please turn the trace logger off and try again.","Unable to Pause Code/Data Logger", MB_OK);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
FCEUI_SetLoggingCD(0);
|
|
||||||
EnableTracerMenuItems();
|
|
||||||
SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Start");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(!newppu)
|
|
||||||
{
|
|
||||||
if(MessageBox(hCDLogger,
|
|
||||||
"In order for CHR data logging to take effect, the New PPU engine must also be enabled.\
|
|
||||||
Would you like to enable New PPU engine now?","Enable New PPU engine?",
|
|
||||||
MB_YESNO) == IDYES)
|
|
||||||
{
|
|
||||||
FCEU_TogglePPU();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FCEUI_SetLoggingCD(1);
|
|
||||||
EnableTracerMenuItems();
|
|
||||||
SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Pause");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case BTN_CDLOGGER_SAVE_AS:
|
case BTN_CDLOGGER_SAVE_AS:
|
||||||
SaveCDLogFileAs();
|
SaveCDLogFileAs();
|
||||||
|
@ -193,8 +172,15 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
case BTN_CDLOGGER_SAVE_UNUSED:
|
case BTN_CDLOGGER_SAVE_UNUSED:
|
||||||
SaveStrippedRom(1);
|
SaveStrippedRom(1);
|
||||||
break;
|
break;
|
||||||
|
case IDC_AUTOSAVECDL:
|
||||||
|
autosaveCDL = (IsDlgButtonChecked(hCDLogger, IDC_AUTOSAVECDL) == BST_CHECKED);
|
||||||
|
break;
|
||||||
|
case IDC_AUTORESUMECDLOGGING:
|
||||||
|
autoresumeCDLogging = (IsDlgButtonChecked(hCDLogger, IDC_AUTORESUMECDLOGGING) == BST_CHECKED);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_MOVING:
|
case WM_MOVING:
|
||||||
|
@ -203,31 +189,36 @@ BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadCDLog (const char* nameo)
|
bool LoadCDLog(const char* nameo)
|
||||||
{
|
{
|
||||||
FILE *FP;
|
FILE *FP;
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
strcpy(loadedcdfile,nameo);
|
FP = fopen(nameo, "rb");
|
||||||
|
if (FP == NULL)
|
||||||
FP = fopen(loadedcdfile,"rb");
|
{
|
||||||
if(FP == NULL){
|
FCEUD_PrintError("Error Opening CDL File!");
|
||||||
FCEUD_PrintError("Error Opening File");
|
return false;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0;i < (int)PRGsize[0];i++){
|
for(i = 0;i < (int)cdloggerdataSize;i++)
|
||||||
|
{
|
||||||
j = fgetc(FP);
|
j = fgetc(FP);
|
||||||
if(j == EOF)break;
|
if (j == EOF)
|
||||||
if((j & 1) && !(cdloggerdata[i] & 1))codecount++; //if the new byte has something logged and
|
break;
|
||||||
if((j & 2) && !(cdloggerdata[i] & 2))datacount++; //and the old one doesn't. Then increment
|
if ((j & 1) && !(cdloggerdata[i] & 1))
|
||||||
if((j & 3) && !(cdloggerdata[i] & 3))undefinedcount--; //the appropriate counter.
|
codecount++; //if the new byte has something logged and
|
||||||
|
if ((j & 2) && !(cdloggerdata[i] & 2))
|
||||||
|
datacount++; //and the old one doesn't. Then increment
|
||||||
|
if ((j & 3) && !(cdloggerdata[i] & 3))
|
||||||
|
undefinedcount--; //the appropriate counter.
|
||||||
cdloggerdata[i] |= j;
|
cdloggerdata[i] |= j;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CHRsize[0] != 0)
|
if(cdloggerVideoDataSize != 0)
|
||||||
{
|
{
|
||||||
for(i = 0;i < (int)CHRsize[0];i++){
|
for(i = 0;i < (int)cdloggerVideoDataSize;i++)
|
||||||
|
{
|
||||||
j = fgetc(FP);
|
j = fgetc(FP);
|
||||||
if(j == EOF)break;
|
if(j == EOF)break;
|
||||||
if((j & 1) && !(cdloggervdata[i] & 1))rendercount++; //if the new byte has something logged and
|
if((j & 1) && !(cdloggervdata[i] & 1))rendercount++; //if the new byte has something logged and
|
||||||
|
@ -238,11 +229,13 @@ void LoadCDLog (const char* nameo)
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(FP);
|
fclose(FP);
|
||||||
|
RenameLog(nameo);
|
||||||
UpdateCDLogger();
|
UpdateCDLogger();
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadCDLogFile(){
|
void LoadCDLogFile()
|
||||||
|
{
|
||||||
const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0\0";
|
const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0\0";
|
||||||
char nameo[2048];
|
char nameo[2048];
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
|
@ -256,43 +249,60 @@ void LoadCDLogFile(){
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
ofn.hwndOwner = hCDLogger;
|
ofn.hwndOwner = hCDLogger;
|
||||||
if(!GetOpenFileName(&ofn))return;
|
if (!GetOpenFileName(&ofn))
|
||||||
|
return;
|
||||||
LoadCDLog(nameo);
|
LoadCDLog(nameo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveCDLogFileAs()
|
void SaveCDLogFileAs()
|
||||||
{
|
{
|
||||||
const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0All Files (*.*)\0*.*\0\0";
|
const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0All Files (*.*)\0*.*\0\0";
|
||||||
char nameo[2048];
|
char nameo[2048] = {0};
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
memset(&ofn,0,sizeof(ofn));
|
memset(&ofn,0,sizeof(ofn));
|
||||||
ofn.lStructSize=sizeof(ofn);
|
ofn.lStructSize=sizeof(ofn);
|
||||||
ofn.hInstance=fceu_hInstance;
|
ofn.hInstance=fceu_hInstance;
|
||||||
ofn.lpstrTitle="Save Code Data Log File As...";
|
ofn.lpstrTitle="Save Code Data Log File As...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
if (loadedcdfile[0])
|
||||||
|
{
|
||||||
|
strcpy(nameo, loadedcdfile);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
strcpy(nameo, LoadedRomFName);
|
||||||
|
strcat(nameo, ".cdl");
|
||||||
|
}
|
||||||
ofn.lpstrDefExt = "cdl";
|
ofn.lpstrDefExt = "cdl";
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile = nameo;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile = 256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags = OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
ofn.hwndOwner = hCDLogger;
|
ofn.hwndOwner = hCDLogger;
|
||||||
if(!GetSaveFileName(&ofn))
|
if (!GetSaveFileName(&ofn))
|
||||||
return;
|
return;
|
||||||
strcpy(loadedcdfile,nameo);
|
RenameLog(nameo);
|
||||||
SaveCDLogFile();
|
SaveCDLogFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveCDLogFile(){ //todo make this button work before you've saved as
|
void SaveCDLogFile()
|
||||||
|
{
|
||||||
|
if (loadedcdfile[0] == 0)
|
||||||
|
{
|
||||||
|
char nameo[2048];
|
||||||
|
strcpy(nameo, LoadedRomFName);
|
||||||
|
strcat(nameo, ".cdl");
|
||||||
|
RenameLog(nameo);
|
||||||
|
}
|
||||||
|
|
||||||
FILE *FP;
|
FILE *FP;
|
||||||
FP = fopen(loadedcdfile,"wb");
|
FP = fopen(loadedcdfile, "wb");
|
||||||
if(FP == NULL) // removed deadly recurrence
|
if (FP == NULL)
|
||||||
{
|
{
|
||||||
FCEUD_PrintError("Error Saving File");
|
FCEUD_PrintError("Error Saving File");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fwrite(cdloggerdata,PRGsize[0],1,FP);
|
fwrite(cdloggerdata, cdloggerdataSize, 1, FP);
|
||||||
if(CHRsize[0] != 0)
|
if(cdloggerVideoDataSize != 0)
|
||||||
fwrite(cdloggervdata,CHRsize[0],1,FP);
|
fwrite(cdloggervdata, cdloggerVideoDataSize, 1, FP);
|
||||||
fclose(FP);
|
fclose(FP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +328,7 @@ bool DoCDLogger()
|
||||||
|
|
||||||
void UpdateCDLogger()
|
void UpdateCDLogger()
|
||||||
{
|
{
|
||||||
if(!hCDLogger)return;
|
if(!hCDLogger) return;
|
||||||
|
|
||||||
char str[50];
|
char str[50];
|
||||||
float fcodecount = codecount;
|
float fcodecount = codecount;
|
||||||
|
@ -327,22 +337,22 @@ void UpdateCDLogger()
|
||||||
float fvromreadcount = vromreadcount;
|
float fvromreadcount = vromreadcount;
|
||||||
float fundefinedcount = undefinedcount;
|
float fundefinedcount = undefinedcount;
|
||||||
float fundefinedvromcount = undefinedvromcount;
|
float fundefinedvromcount = undefinedvromcount;
|
||||||
float fromsize = PRGsize[0];
|
float fromsize = cdloggerdataSize;
|
||||||
float fvromsize = CHRsize[0] != 0 ? CHRsize[0] : 1;
|
float fvromsize = (cdloggerVideoDataSize != 0) ? cdloggerVideoDataSize : 1;
|
||||||
|
|
||||||
sprintf(str,"0x%06x %.2f%%",codecount,fcodecount/fromsize*100);
|
sprintf(str,"0x%06x %.2f%%", codecount, (fcodecount / fromsize) * 100);
|
||||||
SetDlgItemText(hCDLogger,LBL_CDLOGGER_CODECOUNT,str);
|
SetDlgItemText(hCDLogger, LBL_CDLOGGER_CODECOUNT, str);
|
||||||
sprintf(str,"0x%06x %.2f%%",datacount,fdatacount/fromsize*100);
|
sprintf(str,"0x%06x %.2f%%", datacount,(fdatacount / fromsize) * 100);
|
||||||
SetDlgItemText(hCDLogger,LBL_CDLOGGER_DATACOUNT,str);
|
SetDlgItemText(hCDLogger, LBL_CDLOGGER_DATACOUNT, str);
|
||||||
sprintf(str,"0x%06x %.2f%%",undefinedcount,fundefinedcount/fromsize*100);
|
sprintf(str,"0x%06x %.2f%%", undefinedcount, (fundefinedcount / fromsize) * 100);
|
||||||
SetDlgItemText(hCDLogger,LBL_CDLOGGER_UNDEFCOUNT,str);
|
SetDlgItemText(hCDLogger, LBL_CDLOGGER_UNDEFCOUNT, str);
|
||||||
|
|
||||||
sprintf(str,"0x%06x %.2f%%",rendercount,frendercount/fvromsize*100);
|
sprintf(str,"0x%06x %.2f%%", rendercount, (frendercount / fvromsize) * 100);
|
||||||
SetDlgItemText(hCDLogger,LBL_CDLOGGER_RENDERCOUNT,str);
|
SetDlgItemText(hCDLogger, LBL_CDLOGGER_RENDERCOUNT, str);
|
||||||
sprintf(str,"0x%06x %.2f%%",vromreadcount,fvromreadcount/fvromsize*100);
|
sprintf(str,"0x%06x %.2f%%", vromreadcount, (fvromreadcount / fvromsize) * 100);
|
||||||
SetDlgItemText(hCDLogger,LBL_CDLOGGER_VROMREADCOUNT,str);
|
SetDlgItemText(hCDLogger, LBL_CDLOGGER_VROMREADCOUNT, str);
|
||||||
sprintf(str,"0x%06x %.2f%%",undefinedvromcount,fundefinedvromcount/fvromsize*100);
|
sprintf(str,"0x%06x %.2f%%", undefinedvromcount, (fundefinedvromcount / fvromsize) * 100);
|
||||||
SetDlgItemText(hCDLogger,LBL_CDLOGGER_UNDEFVROMCOUNT,str);
|
SetDlgItemText(hCDLogger, LBL_CDLOGGER_UNDEFVROMCOUNT, str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +365,7 @@ void SaveStrippedRom(int invert)
|
||||||
char sromfilename[MAX_PATH];
|
char sromfilename[MAX_PATH];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
iNES_HEADER cdlhead;
|
iNES_HEADER cdlhead;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!GameInfo)
|
if (!GameInfo)
|
||||||
|
@ -369,7 +379,7 @@ void SaveStrippedRom(int invert)
|
||||||
|
|
||||||
if(codecount == 0)
|
if(codecount == 0)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "Unable to Generate Stripped Rom. Get Something Logged and try again.", "Error", MB_OK);
|
MessageBox(NULL, "Unable to Generate Stripped ROM. Get Something Logged and try again.", "Error", MB_OK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memset(&ofn,0,sizeof(ofn));
|
memset(&ofn,0,sizeof(ofn));
|
||||||
|
@ -441,9 +451,9 @@ void SaveStrippedRom(int invert)
|
||||||
fputc(pchar, fp);
|
fputc(pchar, fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CHRsize[0] != 0)
|
if(cdloggerVideoDataSize != 0)
|
||||||
{
|
{
|
||||||
// since an old ppu at least log the 2007 ppu read accesses, so need to save anyway...
|
// since the OldPPU at least logs the $2007 read accesses, we should save the data anyway
|
||||||
for(i = 0; i < (int)CHRsize[0]; i++) {
|
for(i = 0; i < (int)CHRsize[0]; i++) {
|
||||||
unsigned char vchar;
|
unsigned char vchar;
|
||||||
if(cdloggervdata[i] & 3)
|
if(cdloggervdata[i] & 3)
|
||||||
|
@ -457,3 +467,122 @@ void SaveStrippedRom(int invert)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CDLoggerROMClosed()
|
||||||
|
{
|
||||||
|
if (hCDLogger)
|
||||||
|
{
|
||||||
|
PauseLogging();
|
||||||
|
if (autosaveCDL)
|
||||||
|
SaveCDLogFile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void CDLoggerROMChanged()
|
||||||
|
{
|
||||||
|
if (hCDLogger)
|
||||||
|
{
|
||||||
|
FreeLog();
|
||||||
|
InitLog();
|
||||||
|
ResetLog();
|
||||||
|
RenameLog("");
|
||||||
|
UpdateCDLogger();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!autoresumeCDLogging)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// try to load respective CDL file
|
||||||
|
char nameo[2048];
|
||||||
|
strcpy(nameo, LoadedRomFName);
|
||||||
|
strcat(nameo, ".cdl");
|
||||||
|
|
||||||
|
/*
|
||||||
|
// if the new CDL is the same (and arrays size is the same), don't do anything
|
||||||
|
if (hCDLogger
|
||||||
|
&& strcmp(loadedcdfile, nameo) == 0
|
||||||
|
&& PRGsize[0] == cdloggerdataSize
|
||||||
|
&& CHRsize[0] == cdloggerVideoDataSize)
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
|
FILE *FP;
|
||||||
|
FP = fopen(nameo, "rb");
|
||||||
|
if (FP != NULL)
|
||||||
|
{
|
||||||
|
// .cdl file with this ROM name exists
|
||||||
|
fclose(FP);
|
||||||
|
if (!hCDLogger)
|
||||||
|
DoCDLogger();
|
||||||
|
if (LoadCDLog(nameo))
|
||||||
|
StartLogging();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void CDLoggerPPUChanged()
|
||||||
|
{
|
||||||
|
if (newppu)
|
||||||
|
SetDlgItemText(hCDLogger, ID_CHR1, "CHR Rendered");
|
||||||
|
else
|
||||||
|
SetDlgItemText(hCDLogger, ID_CHR1, "!!! Enable NewPPU !!!");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PauseLogging()
|
||||||
|
{
|
||||||
|
// can't pause while Trace Logger is using
|
||||||
|
if ((logging) && (logging_options & LOG_NEW_INSTRUCTIONS))
|
||||||
|
{
|
||||||
|
MessageBox(hCDLogger, "The Trace Logger is currently using this for some of its features.\nPlease turn the Trace Logger off and try again.","Unable to Pause Code/Data Logger", MB_OK);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
FCEUI_SetLoggingCD(0);
|
||||||
|
EnableTracerMenuItems();
|
||||||
|
SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Start");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
void StartLogging()
|
||||||
|
{
|
||||||
|
FCEUI_SetLoggingCD(1);
|
||||||
|
EnableTracerMenuItems();
|
||||||
|
SetDlgItemText(hCDLogger, BTN_CDLOGGER_START_PAUSE, "Pause");
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeLog()
|
||||||
|
{
|
||||||
|
if (cdloggerdata)
|
||||||
|
{
|
||||||
|
free(cdloggerdata);
|
||||||
|
cdloggerdata = 0;
|
||||||
|
cdloggerdataSize = 0;
|
||||||
|
}
|
||||||
|
if (cdloggervdata)
|
||||||
|
{
|
||||||
|
free(cdloggervdata);
|
||||||
|
cdloggervdata = 0;
|
||||||
|
cdloggerVideoDataSize = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void InitLog()
|
||||||
|
{
|
||||||
|
cdloggerdataSize = PRGsize[0];
|
||||||
|
cdloggerdata = (unsigned char*)malloc(cdloggerdataSize);
|
||||||
|
cdloggerVideoDataSize = CHRsize[0];
|
||||||
|
if(cdloggerVideoDataSize != 0)
|
||||||
|
cdloggervdata = (unsigned char*)malloc(cdloggerVideoDataSize);
|
||||||
|
}
|
||||||
|
void ResetLog()
|
||||||
|
{
|
||||||
|
codecount = datacount = rendercount = vromreadcount = 0;
|
||||||
|
undefinedcount = cdloggerdataSize;
|
||||||
|
ZeroMemory(cdloggerdata, cdloggerdataSize);
|
||||||
|
if(cdloggerVideoDataSize != 0)
|
||||||
|
{
|
||||||
|
undefinedvromcount = cdloggerVideoDataSize;
|
||||||
|
ZeroMemory(cdloggervdata, cdloggerVideoDataSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void RenameLog(const char* newName)
|
||||||
|
{
|
||||||
|
strcpy(loadedcdfile, newName);
|
||||||
|
if (hCDLogger)
|
||||||
|
{
|
||||||
|
SetDlgItemText(hCDLogger, ID_CDLFILENAME, loadedcdfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -96,6 +96,8 @@ extern int logging_options;
|
||||||
extern int log_lines_option;
|
extern int log_lines_option;
|
||||||
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 bool autoresumeCDLogging;
|
||||||
|
extern bool autosaveCDL;
|
||||||
extern int GGConv_wndx, GGConv_wndy;
|
extern int GGConv_wndx, GGConv_wndy;
|
||||||
extern int MetaPosX,MetaPosY;
|
extern int MetaPosX,MetaPosY;
|
||||||
extern int MLogPosX,MLogPosY;
|
extern int MLogPosX,MLogPosY;
|
||||||
|
@ -299,6 +301,8 @@ static CFGSTRUCT fceuconfig[] =
|
||||||
AC(Tracer_wndy),
|
AC(Tracer_wndy),
|
||||||
AC(CDLogger_wndx),
|
AC(CDLogger_wndx),
|
||||||
AC(CDLogger_wndy),
|
AC(CDLogger_wndy),
|
||||||
|
AC(autosaveCDL),
|
||||||
|
AC(autoresumeCDLogging),
|
||||||
AC(GGConv_wndx),
|
AC(GGConv_wndx),
|
||||||
AC(GGConv_wndy),
|
AC(GGConv_wndy),
|
||||||
AC(TextHookerPosX),
|
AC(TextHookerPosX),
|
||||||
|
|
|
@ -375,7 +375,7 @@ int LoadTable(const char* nameo)
|
||||||
//should return -1, otherwise returns the line number it had the error on
|
//should return -1, otherwise returns the line number it had the error on
|
||||||
int LoadTableFile(){
|
int LoadTableFile(){
|
||||||
const char filter[]="Table Files (*.TBL)\0*.tbl\0All Files (*.*)\0*.*\0\0";
|
const char filter[]="Table Files (*.TBL)\0*.tbl\0All Files (*.*)\0*.*\0\0";
|
||||||
char nameo[2048]; //todo: possibly no need for this? can lpstrfilter point to loadedcdfile instead?
|
char nameo[2048];
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
memset(&ofn,0,sizeof(ofn));
|
memset(&ofn,0,sizeof(ofn));
|
||||||
ofn.lStructSize=sizeof(ofn);
|
ofn.lStructSize=sizeof(ofn);
|
||||||
|
|
|
@ -1574,37 +1574,43 @@ BEGIN
|
||||||
DEFPUSHBUTTON "&OK",IDOK,67,52,50,14
|
DEFPUSHBUTTON "&OK",IDOK,67,52,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
CDLOGGER DIALOGEX 0, 0, 315, 243
|
CDLOGGER DIALOGEX 0, 0, 307, 242
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Code Data Logger"
|
CAPTION "Code Data Logger"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "Load...",BTN_CDLOGGER_LOAD,7,105,50,14
|
PUSHBUTTON "Load...",BTN_CDLOGGER_LOAD,7,123,50,14
|
||||||
PUSHBUTTON "Save",BTN_CDLOGGER_SAVE,257,105,50,14
|
PUSHBUTTON "Save",BTN_CDLOGGER_SAVE,249,107,50,14
|
||||||
GROUPBOX "Code/Data Log Status",-1,3,4,308,155,BS_CENTER
|
GROUPBOX "Code/Data Log Status",ID_CDL,3,3,300,174,BS_CENTER
|
||||||
PUSHBUTTON "Start",BTN_CDLOGGER_START_PAUSE,129,105,50,14
|
DEFPUSHBUTTON "Start",BTN_CDLOGGER_START_PAUSE,127,107,50,14
|
||||||
GROUPBOX "Address Label Logger",65534,3,161,308,79,BS_CENTER
|
GROUPBOX "Address Label Logger",65534,3,179,300,59,BS_CENTER
|
||||||
PUSHBUTTON "Load...",111,7,219,50,14,WS_DISABLED
|
PUSHBUTTON "Load...",111,7,218,50,14,WS_DISABLED
|
||||||
PUSHBUTTON "Start",112,129,219,50,14,WS_DISABLED
|
PUSHBUTTON "Start",112,127,218,50,14,WS_DISABLED
|
||||||
PUSHBUTTON "Save...",113,257,219,50,14,WS_DISABLED
|
PUSHBUTTON "Save...",113,249,218,50,14,WS_DISABLED
|
||||||
LTEXT "4067 - 29.5%",LBL_CDLOGGER_CODECOUNT,40,31,68,11
|
LTEXT "4067 - 29.5%",LBL_CDLOGGER_CODECOUNT,34,29,72,11
|
||||||
GROUPBOX "PRG Logged as Code",65533,29,20,84,27
|
GROUPBOX "PRG Logged as Code",65533,25,18,84,27
|
||||||
GROUPBOX "PRG Logged as Data",65532,117,20,84,27
|
GROUPBOX "PRG Logged as Data",65532,113,18,84,27
|
||||||
LTEXT "7092 - 37.2%",LBL_CDLOGGER_DATACOUNT,128,31,65,9
|
LTEXT "7092 - 37.2%",LBL_CDLOGGER_DATACOUNT,122,29,71,9
|
||||||
GROUPBOX "PRG not Logged",65531,205,20,79,27
|
GROUPBOX "PRG not Logged",65531,201,18,79,27
|
||||||
LTEXT "6072 - 32.7%",LBL_CDLOGGER_UNDEFCOUNT,216,31,60,8
|
LTEXT "6072 - 32.7%",LBL_CDLOGGER_UNDEFCOUNT,210,29,66,8
|
||||||
LTEXT "Itsa me the Code/Data Logger! Press Start to play!",65530,69,80,172,12
|
LTEXT "Itsa me, the Code/Data Logger! Press Start to play!",65530,67,80,172,11
|
||||||
PUSHBUTTON "Reset Log",BTN_CDLOGGER_RESET,7,90,50,14
|
PUSHBUTTON "Reset Log",BTN_CDLOGGER_RESET,7,107,50,14
|
||||||
PUSHBUTTON "Save as...",BTN_CDLOGGER_SAVE_AS,257,90,50,14
|
PUSHBUTTON "Save as...",BTN_CDLOGGER_SAVE_AS,250,123,50,14
|
||||||
PUSHBUTTON "Save Stripped iNes Rom...",BTN_CDLOGGER_SAVE_STRIPPED,208,125,99,14
|
PUSHBUTTON "Save Stripped Data...",BTN_CDLOGGER_SAVE_STRIPPED,117,157,89,14
|
||||||
PUSHBUTTON "Save Unused Data...",BTN_CDLOGGER_SAVE_UNUSED,208,140,99,14
|
PUSHBUTTON "Save Unused Data...",BTN_CDLOGGER_SAVE_UNUSED,210,157,89,14
|
||||||
LTEXT "4067 - 29.5%",LBL_CDLOGGER_RENDERCOUNT,40,60,68,11
|
LTEXT "4067 - 29.5%",LBL_CDLOGGER_RENDERCOUNT,34,58,72,11
|
||||||
GROUPBOX "CHR Rendered",-1,29,50,84,27
|
GROUPBOX "CHR Rendered",ID_CHR1,25,47,84,27
|
||||||
GROUPBOX "CHR Logged as Data",-1,117,50,84,27
|
GROUPBOX "CHR Logged as Data",ID_CHR2,113,47,84,27
|
||||||
LTEXT "7092 - 37.2%",LBL_CDLOGGER_VROMREADCOUNT,128,60,65,9
|
LTEXT "7092 - 37.2%",LBL_CDLOGGER_VROMREADCOUNT,122,58,71,9
|
||||||
GROUPBOX "CHR not Logged",-1,205,50,79,27
|
GROUPBOX "CHR not Logged",ID_CHR3,201,47,79,27
|
||||||
LTEXT "6072 - 32.7%",LBL_CDLOGGER_UNDEFVROMCOUNT,216,60,60,8
|
LTEXT "6072 - 32.7%",LBL_CDLOGGER_UNDEFVROMCOUNT,210,58,66,9
|
||||||
|
LTEXT "CDL file:",ID_STATIC,12,94,29,11
|
||||||
|
LTEXT "",ID_CDLFILENAME,43,94,252,11,SS_PATHELLIPSIS
|
||||||
|
CONTROL " Auto-resume logging when loading ROMs",IDC_AUTORESUMECDLOGGING,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,142,149,12
|
||||||
|
CONTROL " Auto-save .CDL when closing ROMs",IDC_AUTOSAVECDL,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,142,133,12
|
||||||
END
|
END
|
||||||
|
|
||||||
PPUVIEW DIALOGEX 44, 38, 355, 246
|
PPUVIEW DIALOGEX 44, 38, 355, 246
|
||||||
|
@ -2083,7 +2089,6 @@ BEGIN
|
||||||
|
|
||||||
"CDLOGGER", DIALOG
|
"CDLOGGER", DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
BOTTOMMARGIN, 238
|
|
||||||
END
|
END
|
||||||
|
|
||||||
"PPUVIEW", DIALOG
|
"PPUVIEW", DIALOG
|
||||||
|
|
|
@ -611,12 +611,15 @@
|
||||||
#define IDC_NOTES_TO_SUBTITLES 1203
|
#define IDC_NOTES_TO_SUBTITLES 1203
|
||||||
#define IDC_MATCH_CASE 1203
|
#define IDC_MATCH_CASE 1203
|
||||||
#define IDC_COPY_INPUT 1203
|
#define IDC_COPY_INPUT 1203
|
||||||
|
#define IDC_AUTORESUMECDLOGGING 1203
|
||||||
#define IDC_VOLUMEGROUP 1204
|
#define IDC_VOLUMEGROUP 1204
|
||||||
#define IDC_OMITBLANK 1204
|
#define IDC_OMITBLANK 1204
|
||||||
#define IDC_CHECK3 1204
|
#define IDC_CHECK3 1204
|
||||||
#define IDC_CHECK_MARKERS 1204
|
#define IDC_CHECK_MARKERS 1204
|
||||||
#define IDC_RECORDING 1204
|
#define IDC_RECORDING 1204
|
||||||
#define IDC_COPY_MARKERS 1204
|
#define IDC_COPY_MARKERS 1204
|
||||||
|
#define IDC_AUTORESUMECDLOGGING2 1204
|
||||||
|
#define IDC_AUTOSAVECDL 1204
|
||||||
#define IDC_RAMLIST 1205
|
#define IDC_RAMLIST 1205
|
||||||
#define IDC_CHECK4 1205
|
#define IDC_CHECK4 1205
|
||||||
#define IDC_CHECK_BOOKMARKS 1205
|
#define IDC_CHECK_BOOKMARKS 1205
|
||||||
|
@ -720,6 +723,10 @@
|
||||||
#define ID_CANCEL 1281
|
#define ID_CANCEL 1281
|
||||||
#define IDC_AUTOSAVE_PROJECT 1282
|
#define IDC_AUTOSAVE_PROJECT 1282
|
||||||
#define IDC_SILENT_AUTOSAVE 1283
|
#define IDC_SILENT_AUTOSAVE 1283
|
||||||
|
#define ID_CHR1 1283
|
||||||
|
#define ID_CHR2 1284
|
||||||
|
#define ID_CHR3 1285
|
||||||
|
#define ID_STATIC 1286
|
||||||
#define MENU_NETWORK 40040
|
#define MENU_NETWORK 40040
|
||||||
#define MENU_PALETTE 40041
|
#define MENU_PALETTE 40041
|
||||||
#define MENU_SOUND 40042
|
#define MENU_SOUND 40042
|
||||||
|
@ -1161,18 +1168,20 @@
|
||||||
#define ID_ENABLE_AUTORESUME 40579
|
#define ID_ENABLE_AUTORESUME 40579
|
||||||
#define ID_CONFIG_COMPACTQUICKSAVING 40580
|
#define ID_CONFIG_COMPACTQUICKSAVING 40580
|
||||||
#define ID_CONFIG_SAVING_OPTIONS 40581
|
#define ID_CONFIG_SAVING_OPTIONS 40581
|
||||||
|
#define ID_CDLFILENAME 40582
|
||||||
#define IDC_DEBUGGER_ICONTRAY 55535
|
#define IDC_DEBUGGER_ICONTRAY 55535
|
||||||
#define MW_ValueLabel2 65423
|
#define MW_ValueLabel2 65423
|
||||||
#define MW_ValueLabel1 65426
|
#define MW_ValueLabel1 65426
|
||||||
#define IDC_BOOKMARK_NAME_TEXT 65535
|
#define IDC_BOOKMARK_NAME_TEXT 65535
|
||||||
|
#define ID_CDL 65535
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 290
|
#define _APS_NEXT_RESOURCE_VALUE 290
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40582
|
#define _APS_NEXT_COMMAND_VALUE 40583
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1283
|
#define _APS_NEXT_CONTROL_VALUE 1287
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,8 +34,8 @@ extern PIANO_ROLL piano_roll;
|
||||||
extern EDITOR editor;
|
extern EDITOR editor;
|
||||||
|
|
||||||
// resources
|
// resources
|
||||||
const char recordingCheckbox[10] = "Recording";
|
const char recordingCheckbox[11] = " Recording";
|
||||||
const char recordingCheckboxBlankPattern[16] = "Recording blank";
|
const char recordingCheckboxBlankPattern[17] = " Recording blank";
|
||||||
|
|
||||||
const char recordingModes[5][4] = { "All",
|
const char recordingModes[5][4] = { "All",
|
||||||
"1P",
|
"1P",
|
||||||
|
|
|
@ -683,7 +683,7 @@ int TextHookerSaveTableFile(){
|
||||||
|
|
||||||
//init the "Save File" dialogue
|
//init the "Save File" dialogue
|
||||||
const char filter[]="Table Files (*.THT)\0*.tht\0All Files (*.*)\0*.*\0\0";
|
const char filter[]="Table Files (*.THT)\0*.tht\0All Files (*.*)\0*.*\0\0";
|
||||||
char nameo[2048]; //todo: possibly no need for this? can lpstrfilter point to loadedcdfile instead?
|
char nameo[2048];
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
//StopSound(); //mbg merge 6/30/08
|
//StopSound(); //mbg merge 6/30/08
|
||||||
memset(&ofn,0,sizeof(ofn));
|
memset(&ofn,0,sizeof(ofn));
|
||||||
|
|
|
@ -53,9 +53,11 @@
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "drivers/win/pref.h"
|
#include "drivers/win/pref.h"
|
||||||
|
|
||||||
|
extern void CDLoggerROMClosed();
|
||||||
|
extern void CDLoggerROMChanged();
|
||||||
extern void ResetDebugStatisticsCounters();
|
extern void ResetDebugStatisticsCounters();
|
||||||
extern void SetMainWindowText();
|
extern void SetMainWindowText();
|
||||||
|
extern void CDLoggerPPUChanged();
|
||||||
extern bool TaseditorIsRecording();
|
extern bool TaseditorIsRecording();
|
||||||
|
|
||||||
extern int32 fps_scale;
|
extern int32 fps_scale;
|
||||||
|
@ -132,6 +134,7 @@ void FCEU_TogglePPU(void) {
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
SetMainWindowText();
|
SetMainWindowText();
|
||||||
|
CDLoggerPPUChanged();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +154,7 @@ static void FCEU_CloseGame(void)
|
||||||
{
|
{
|
||||||
FCEUD_PrintError("Couldn't store debugging data");
|
FCEUD_PrintError("Couldn't store debugging data");
|
||||||
}
|
}
|
||||||
|
CDLoggerROMClosed();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (FCEUnetplay) {
|
if (FCEUnetplay) {
|
||||||
|
@ -484,6 +488,7 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
||||||
|
|
||||||
#if defined (WIN32) || defined (WIN64)
|
#if defined (WIN32) || defined (WIN64)
|
||||||
DoDebuggerDataReload(); // Reloads data without reopening window
|
DoDebuggerDataReload(); // Reloads data without reopening window
|
||||||
|
CDLoggerROMChanged();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (AutoResumePlay && (GameInfo->type != GIT_NSF))
|
if (AutoResumePlay && (GameInfo->type != GIT_NSF))
|
||||||
|
|
|
@ -438,6 +438,7 @@ inline void FFCEUX_PPUWrite_Default(uint32 A, uint8 V) {
|
||||||
|
|
||||||
volatile int rendercount, vromreadcount, undefinedvromcount, LogAddress = -1;
|
volatile int rendercount, vromreadcount, undefinedvromcount, LogAddress = -1;
|
||||||
unsigned char *cdloggervdata;
|
unsigned char *cdloggervdata;
|
||||||
|
unsigned int cdloggerVideoDataSize = 0;
|
||||||
|
|
||||||
int GetCHRAddress(int A){
|
int GetCHRAddress(int A){
|
||||||
int result;
|
int result;
|
||||||
|
|
Loading…
Reference in New Issue