diff --git a/src/drivers/win/debuggersp.cpp b/src/drivers/win/debuggersp.cpp index 8cf8c093..20b1a838 100644 --- a/src/drivers/win/debuggersp.cpp +++ b/src/drivers/win/debuggersp.cpp @@ -23,6 +23,7 @@ #include "debuggersp.h" #include "window.h" #include "../../fceu.h" +#include "../../ines.h" #include "../../debug.h" #include "../../conddebug.h" @@ -54,7 +55,6 @@ int pageNumbersLoaded[32] = { Name* ramBankNames = 0; bool ramBankNamesLoaded = false; -extern char LoadedRomFName[2048]; char NLfilename[2048]; bool symbDebugEnabled = true; bool symbRegNames = true; diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 54147dbc..bec6033b 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -44,6 +44,7 @@ extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; } #include "../../version.h" #include "../../types.h" #include "../../fceu.h" +#include "../../ines.h" #include "../../state.h" #include "../../debug.h" #include "../../movie.h" @@ -544,7 +545,6 @@ void DoFCEUExit() closeGame = true;//mbg 6/30/06 - for housekeeping purposes we need to exit after the emulation cycle finishes // remember the ROM name - extern char LoadedRomFName[2048]; if (GameInfo) strcpy(romNameWhenClosingEmulator, LoadedRomFName); else @@ -1174,7 +1174,7 @@ std::string GetRomName(bool force) //The purpose of this function is to format the ROM name stored in LoadedRomFName //And return a char array with just the name with path or extension //The purpose of this function is to populate a save as dialog with the ROM name as a default filename - extern char LoadedRomFName[2048]; //Contains full path of ROM + // LoadedRomFName; //Contains full path of ROM std::string Rom; //Will contain the formatted path if(GameInfo || force) //If ROM is loaded { @@ -1193,7 +1193,7 @@ std::string GetRomPath(bool force) //The purpose of this function is to format the ROM name stored in LoadedRomFName //And return a char array with just the name with path or extension //The purpose of this function is to populate a save as dialog with the ROM name as a default filename - extern char LoadedRomFName[2048]; //Contains full path of ROM + // LoadedRomFName; //Contains full path of ROM std::string Rom; //Will contain the formatted path if(GameInfo || force) //If ROM is loaded { @@ -1205,4 +1205,4 @@ std::string GetRomPath(bool force) else Rom = ""; return Rom; -} \ No newline at end of file +} diff --git a/src/fceu.cpp b/src/fceu.cpp index 12d7eddd..d7c23ab7 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -181,7 +181,6 @@ static void FCEU_CloseGame(void) } #ifdef __WIN_DRIVER__ - extern char LoadedRomFName[2048]; if (storePreferences(mass_replace(LoadedRomFName, "|", ".").c_str())) FCEUD_PrintError("Couldn't store debugging data"); CDLoggerROMClosed(); @@ -505,7 +504,6 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen #ifdef __WIN_DRIVER__ // ################################## Start of SP CODE ########################### - extern char LoadedRomFName[2048]; extern int loadDebugDataFailed; if ((loadDebugDataFailed = loadPreferences(mass_replace(LoadedRomFName, "|", ".").c_str()))) diff --git a/src/fds.cpp b/src/fds.cpp index f608436f..532dc14c 100644 --- a/src/fds.cpp +++ b/src/fds.cpp @@ -29,6 +29,7 @@ #include "state.h" #include "file.h" #include "cart.h" +#include "ines.h" #include "netplay.h" #include "driver.h" #include "movie.h" @@ -852,7 +853,6 @@ int FDSLoad(const char *name, FCEUFILE *fp) { free(fn); } - extern char LoadedRomFName[2048]; strcpy(LoadedRomFName, name); //For the debugger list GameInfo->type = GIT_FDS; diff --git a/src/ines.cpp b/src/ines.cpp index 8c7cf2d3..055f5fb1 100644 --- a/src/ines.cpp +++ b/src/ines.cpp @@ -58,8 +58,8 @@ uint8 Mirroring = 0; uint8 MirroringAs2bits = 0; uint32 ROM_size = 0; uint32 VROM_size = 0; -char LoadedRomFName[2048]; //mbg merge 7/17/06 added -char LoadedRomFNamePatchToUse[2048]; +char LoadedRomFName[4096]; //mbg merge 7/17/06 added +char LoadedRomFNamePatchToUse[4096]; static int CHRRAMSize = -1; static int iNES_Init(int num); diff --git a/src/ines.h b/src/ines.h index 3e2cb82c..b1201bea 100644 --- a/src/ines.h +++ b/src/ines.h @@ -46,8 +46,8 @@ extern uint8 *ExtraNTARAM; extern uint8 **VPageR; extern int iNesSave(void); //bbit Edited: line added extern int iNesSaveAs(const char* name); -extern char LoadedRomFName[2048]; //bbit Edited: line added -extern char LoadedRomFNamePatchToUse[2048]; +extern char LoadedRomFName[4096]; //bbit Edited: line added +extern char LoadedRomFNamePatchToUse[4096]; extern char *iNesShortFName(void); extern const TMasterRomInfo* MasterRomInfo; extern TMasterRomInfoParams MasterRomInfoParams; diff --git a/src/nsf.cpp b/src/nsf.cpp index d7aee068..aedd369d 100644 --- a/src/nsf.cpp +++ b/src/nsf.cpp @@ -32,6 +32,7 @@ #include "file.h" #include "fds.h" #include "cart.h" +#include "ines.h" #include "input.h" #include "state.h" #include "driver.h" @@ -123,8 +124,6 @@ static uint16 PlayAddr; //configuration static uint16 InitAddr; //configuration static uint16 LoadAddr; //configuration -extern char LoadedRomFName[2048]; - NSF_HEADER NSFHeader; //mbg merge 6/29/06 - needs to be global void NSFMMC5_Close(void);