add debuggerPageSize config variable which lets you pick whether 8KB physical PRG pages are used, or 16KB (the original). it defaults to 14 (1<<14 == 16KB) but you can change it to anything else.

This commit is contained in:
zeromus 2014-02-01 07:50:18 +00:00
parent a82532f5cf
commit 3334d90235
3 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
unsigned int debuggerPageSize = 14;
int vblankScanLines = 0; //Used to calculate scanlines 240-261 (vblank) int vblankScanLines = 0; //Used to calculate scanlines 240-261 (vblank)
int vblankPixel = 0; //Used to calculate the pixels in vblank int vblankPixel = 0; //Used to calculate the pixels in vblank
@ -232,7 +232,7 @@ int getBank(int offs)
if (GameInfo && GameInfo->type==GIT_NSF) if (GameInfo && GameInfo->type==GIT_NSF)
return addr != -1 ? addr / 0x1000 : -1; return addr != -1 ? addr / 0x1000 : -1;
return addr != -1 ? addr / 0x4000 : -1; return addr != -1 ? addr / (1<<debuggerPageSize) : -1; //formerly, dividing by 0x4000
} }
int GetNesFileAddress(int A){ int GetNesFileAddress(int A){

View File

@ -279,6 +279,7 @@ static CFGSTRUCT fceuconfig[] =
AC(debuggerSaveLoadDEBFiles), AC(debuggerSaveLoadDEBFiles),
AC(debuggerDisplayROMoffsets), AC(debuggerDisplayROMoffsets),
AC(debuggerFontSize), AC(debuggerFontSize),
AC(debuggerPageSize),
AC(hexeditorFontSize), AC(hexeditorFontSize),
AC(fullSaveStateLoads), AC(fullSaveStateLoads),
AC(frameSkipAmt), AC(frameSkipAmt),

View File

@ -22,6 +22,7 @@ extern bool debuggerAutoload;
extern bool debuggerSaveLoadDEBFiles; extern bool debuggerSaveLoadDEBFiles;
extern bool debuggerDisplayROMoffsets; extern bool debuggerDisplayROMoffsets;
extern unsigned int debuggerPageSize;
extern unsigned int debuggerFontSize; extern unsigned int debuggerFontSize;
extern unsigned int hexeditorFontSize; extern unsigned int hexeditorFontSize;