mirror of https://github.com/PCSX2/pcsx2.git
Move the configuration section of Misc.h to a new file, Pcsx2Config.h.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@699 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
9a89523532
commit
3880bf5a14
|
@ -0,0 +1,150 @@
|
||||||
|
/* Pcsx2 - Pc Ps2 Emulator
|
||||||
|
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __PCSX2CONFIG_H__
|
||||||
|
#define __PCSX2CONFIG_H__
|
||||||
|
|
||||||
|
// Hack so that you can still use this file from C (not C++), or from a plugin without access to Paths.h.
|
||||||
|
#ifdef PLUGIN_ONLY
|
||||||
|
#define g_MaxPath 255
|
||||||
|
#else
|
||||||
|
#include "Paths.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////
|
||||||
|
// Session Configuration Override Flags
|
||||||
|
//
|
||||||
|
// a handful of flags that can override user configurations for the current application session
|
||||||
|
// only. This allows us to do things like force-disable recompilers if the memory allocations
|
||||||
|
// for them fail.
|
||||||
|
struct SessionOverrideFlags
|
||||||
|
{
|
||||||
|
bool ForceDisableEErec:1;
|
||||||
|
bool ForceDisableVU0rec:1;
|
||||||
|
bool ForceDisableVU1rec:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern SessionOverrideFlags g_Session;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// Pcsx2 User Configuration Options!
|
||||||
|
|
||||||
|
//#define PCSX2_MICROVU // Use Micro VU recs instead of Zero VU Recs
|
||||||
|
#define PCSX2_GSMULTITHREAD 1 // uses multi-threaded gs
|
||||||
|
#define PCSX2_EEREC 0x10
|
||||||
|
#define PCSX2_VU0REC 0x20
|
||||||
|
#define PCSX2_VU1REC 0x40
|
||||||
|
#define PCSX2_FRAMELIMIT_MASK 0xc00
|
||||||
|
#define PCSX2_FRAMELIMIT_NORMAL 0x000
|
||||||
|
#define PCSX2_FRAMELIMIT_LIMIT 0x400
|
||||||
|
#define PCSX2_FRAMELIMIT_SKIP 0x800
|
||||||
|
#define PCSX2_FRAMELIMIT_VUSKIP 0xc00
|
||||||
|
|
||||||
|
#define CHECK_MULTIGS (Config.Options&PCSX2_GSMULTITHREAD)
|
||||||
|
#define CHECK_EEREC (!g_Session.ForceDisableEErec && Config.Options&PCSX2_EEREC)
|
||||||
|
//------------ SPEED/MISC HACKS!!! ---------------
|
||||||
|
#define CHECK_EE_CYCLERATE (Config.Hacks & 0x03)
|
||||||
|
#define CHECK_IOP_CYCLERATE (Config.Hacks & 0x08)
|
||||||
|
#define CHECK_WAITCYCLE_HACK (Config.Hacks & 0x10)
|
||||||
|
#define CHECK_INTC_STAT_HACK (Config.Hacks & 0x20)
|
||||||
|
#define CHECK_ESCAPE_HACK (Config.Hacks & 0x400)
|
||||||
|
//------------ SPECIAL GAME FIXES!!! ---------------
|
||||||
|
#define CHECK_VUADDSUBHACK (Config.GameFixes & 0x1) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
|
||||||
|
#define CHECK_FPUCOMPAREHACK (Config.GameFixes & 0x4) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||||
|
#define CHECK_VUCLIPFLAGHACK (Config.GameFixes & 0x2) // Special Fix for God of War, fixes SPS.
|
||||||
|
//------------ Advanced Options!!! ---------------
|
||||||
|
#define CHECK_VU_OVERFLOW (Config.vuOptions & 0x1)
|
||||||
|
#define CHECK_VU_EXTRA_OVERFLOW (Config.vuOptions & 0x2) // If enabled, Operands are clamped before being used in the VU recs
|
||||||
|
#define CHECK_VU_SIGN_OVERFLOW (Config.vuOptions & 0x4)
|
||||||
|
#define CHECK_VU_UNDERFLOW (Config.vuOptions & 0x8)
|
||||||
|
#define CHECK_VU_EXTRA_FLAGS 0 // Always disabled now // Sets correct flags in the VU recs
|
||||||
|
#define CHECK_FPU_OVERFLOW (Config.eeOptions & 0x1)
|
||||||
|
#define CHECK_FPU_EXTRA_OVERFLOW (Config.eeOptions & 0x2) // If enabled, Operands are checked for infinities before being used in the FPU recs
|
||||||
|
#define CHECK_FPU_EXTRA_FLAGS 1 // Always enabled now // Sets D/I flags on FPU instructions
|
||||||
|
#define CHECK_FPU_FULL (Config.eeOptions & 0x4)
|
||||||
|
#define DEFAULT_eeOptions 0x01
|
||||||
|
#define DEFAULT_vuOptions 0x01
|
||||||
|
//------------ DEFAULT sseMXCSR VALUES!!! ---------------
|
||||||
|
#define DEFAULT_sseMXCSR 0x7fc0 //FPU rounding, DaZ, "chop" - Note: Dont enable FtZ by default, it breaks games! E.g. Enthusia (Refraction)
|
||||||
|
#define DEFAULT_sseVUMXCSR 0x7fc0 //VU rounding, DaZ, "chop"
|
||||||
|
|
||||||
|
#define CHECK_FRAMELIMIT (Config.Options&PCSX2_FRAMELIMIT_MASK)
|
||||||
|
|
||||||
|
#define CHECK_VU0REC (!g_Session.ForceDisableVU0rec && Config.Options&PCSX2_VU0REC)
|
||||||
|
#define CHECK_VU1REC (!g_Session.ForceDisableVU1rec && (Config.Options&PCSX2_VU1REC))
|
||||||
|
|
||||||
|
// Memory Card configuration, per slot.
|
||||||
|
struct McdConfig
|
||||||
|
{
|
||||||
|
// filename of the memory card for this slot.
|
||||||
|
// If the string is empty characters long then the default is used.
|
||||||
|
char Filename[g_MaxPath];
|
||||||
|
|
||||||
|
// Enables the memory card at the emulation level. When false, games will treat this
|
||||||
|
// slot as if the memory card has been physically removed from the PS2.
|
||||||
|
bool Enabled;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PcsxConfig
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
char Bios[g_MaxPath];
|
||||||
|
char GS[g_MaxPath];
|
||||||
|
char PAD1[g_MaxPath];
|
||||||
|
char PAD2[g_MaxPath];
|
||||||
|
char SPU2[g_MaxPath];
|
||||||
|
char CDVD[g_MaxPath];
|
||||||
|
char DEV9[g_MaxPath];
|
||||||
|
char USB[g_MaxPath];
|
||||||
|
char FW[g_MaxPath];
|
||||||
|
char PluginsDir[g_MaxPath];
|
||||||
|
char BiosDir[g_MaxPath];
|
||||||
|
char InisDir[g_MaxPath]; // This is intended for the program to populate, and the plugins to read. Obviously can't be saved in the config file. :)
|
||||||
|
char Lang[g_MaxPath];
|
||||||
|
|
||||||
|
McdConfig Mcd[2];
|
||||||
|
|
||||||
|
bool McdEnableNTFS; // enables NTFS compression on cards and the mcd folder.
|
||||||
|
bool McdEnableEject; // enables auto-ejection of cards after loading savestates.
|
||||||
|
|
||||||
|
u32 Options; // PCSX2_X options
|
||||||
|
|
||||||
|
bool PsxOut;
|
||||||
|
bool Profiler; // Displays profiling info to console
|
||||||
|
bool cdvdPrint; // Prints cdvd reads to console
|
||||||
|
bool closeGSonEsc; // closes the GS (and saves its state) on escape automatically.
|
||||||
|
|
||||||
|
int PsxType;
|
||||||
|
int Cdda;
|
||||||
|
int Mdec;
|
||||||
|
int Patch;
|
||||||
|
int CustomFps;
|
||||||
|
int Hacks;
|
||||||
|
int GameFixes;
|
||||||
|
int CustomFrameSkip;
|
||||||
|
int CustomConsecutiveFrames;
|
||||||
|
int CustomConsecutiveSkip;
|
||||||
|
u32 sseMXCSR;
|
||||||
|
u32 sseVUMXCSR;
|
||||||
|
u32 eeOptions;
|
||||||
|
u32 vuOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern PcsxConfig Config;
|
||||||
|
|
||||||
|
#endif // __PCSX2CONFIG_H__
|
|
@ -43,11 +43,20 @@ int main(int argc, char *argv[])
|
||||||
bindtextdomain(PACKAGE, "Langs");
|
bindtextdomain(PACKAGE, "Langs");
|
||||||
textdomain(PACKAGE);
|
textdomain(PACKAGE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("\n");
|
// Note: Config.InisDir won't do anything till we set up windows and the plugins to use it.
|
||||||
mkdir(CONFIG_DIR, 0755);
|
#ifndef LOCAL_PLUGIN_INIS
|
||||||
|
mkdir(DEFAULT_INIS_DIR, 0755);
|
||||||
strcpy(cfgfile, CONFIG_DIR "/pcsx2.cfg");
|
sprintf(Config.InisDir, "%s/%s/", MAIN_DIR, DEFAULT_INIS_DIR);
|
||||||
|
sprintf(cfgfile, "%s/pcsx2.cfg", Config.InisDir);
|
||||||
|
#else
|
||||||
|
mkdir("~/.pcsx2");
|
||||||
|
chdir("~/.pcsx2");
|
||||||
|
mkdir(DEFAULT_INIS_DIR, 0755);
|
||||||
|
sprintf(Config.InisDir, "~/.pcsx2/%s/", DEFAULT_INIS_DIR);
|
||||||
|
sprintf(cfgfile, "%s/pcsx2.cfg", Config.InisDir);
|
||||||
|
chdir(MAIN_DIR);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PCSX2_DEVBUILD
|
#ifdef PCSX2_DEVBUILD
|
||||||
memset(&g_TestRun, 0, sizeof(g_TestRun));
|
memset(&g_TestRun, 0, sizeof(g_TestRun));
|
||||||
|
|
|
@ -12,7 +12,7 @@ SPR.cpp SaveState.cpp Sif.cpp Sio.cpp SourceLog.cpp Stats.cpp System.cpp ThreadT
|
||||||
VU0.cpp VU0micro.cpp VU0microInterp.cpp VU1micro.cpp VU1microInterp.cpp VUflags.cpp VUmicroMem.cpp VUops.cpp \
|
VU0.cpp VU0micro.cpp VU0microInterp.cpp VU1micro.cpp VU1microInterp.cpp VUflags.cpp VUmicroMem.cpp VUops.cpp \
|
||||||
Vif.cpp VifDma.cpp vssprintf.cpp vtlb.cpp xmlpatchloader.cpp AlignedMalloc.cpp \
|
Vif.cpp VifDma.cpp vssprintf.cpp vtlb.cpp xmlpatchloader.cpp AlignedMalloc.cpp \
|
||||||
RecoverySystem.cpp Saveslots.cpp
|
RecoverySystem.cpp Saveslots.cpp
|
||||||
#HashTools.cpp
|
|
||||||
|
|
||||||
|
|
||||||
libpcsx2_a_SOURCES += \
|
libpcsx2_a_SOURCES += \
|
||||||
|
@ -20,7 +20,6 @@ CDVD.h CDVDiso.h CDVDisodrv.h CDVDlib.h COP0.h Cache.h CdRom.h Common.h Counters
|
||||||
Elfheader.h Exceptions.h GS.h Hw.h IopBios.h IopBios2.h IopCounters.h IopDma.h IopHw.h IopMem.h IopSio2.h Memcpyfast.h \
|
Elfheader.h Exceptions.h GS.h Hw.h IopBios.h IopBios2.h IopCounters.h IopDma.h IopHw.h IopMem.h IopSio2.h Memcpyfast.h \
|
||||||
Memory.h MemoryCard.h Misc.h Patch.h Paths.h Plugins.h PrecompiledHeader.h PsxCommon.h R3000A.h R5900.h R5900OpcodeTables.h \
|
Memory.h MemoryCard.h Misc.h Patch.h Paths.h Plugins.h PrecompiledHeader.h PsxCommon.h R3000A.h R5900.h R5900OpcodeTables.h \
|
||||||
SPR.h SamplProf.h SaveState.h Sif.h Sifcmd.h Sio.h SafeArray.h Stats.h StringUtils.h System.h Threading.h \
|
SPR.h SamplProf.h SaveState.h Sif.h Sifcmd.h Sio.h SafeArray.h Stats.h StringUtils.h System.h Threading.h \
|
||||||
VU.h VUflags.h VUmicro.h VUops.h Vif.h VifDma.h cheatscpp.h vtlb.h NakedAsm.h R5900Exceptions.h HostGui.h
|
VU.h VUflags.h VUmicro.h VUops.h Vif.h VifDma.h cheatscpp.h vtlb.h NakedAsm.h R5900Exceptions.h HostGui.h Pcsx2Config.h
|
||||||
#HashMap.h
|
|
||||||
|
|
||||||
SUBDIRS = x86 . DebugTools IPU RDebug tinyxml Linux
|
SUBDIRS = x86 . DebugTools IPU RDebug tinyxml Linux
|
206
pcsx2/Misc.h
206
pcsx2/Misc.h
|
@ -20,9 +20,11 @@
|
||||||
#define __MISC_H__
|
#define __MISC_H__
|
||||||
|
|
||||||
#include "System.h"
|
#include "System.h"
|
||||||
|
#include "Pcsx2Config.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// GNU GetText / NLS
|
// GNU GetText / NLS
|
||||||
|
// Move to System.h, perhaps?
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
|
|
||||||
|
@ -48,144 +50,57 @@
|
||||||
|
|
||||||
#endif // ENABLE_NLS
|
#endif // ENABLE_NLS
|
||||||
|
|
||||||
// [TODO] : Move the config options mess from Misc.h into "config.h" or someting more sensible.
|
// what the hell is this unused piece of crap passed to every plugin for? (air)
|
||||||
|
// Agreed. It ought to get removed in the next version of the plugin api. (arcum42)
|
||||||
|
extern uptr pDsp; //Used in GS, MTGS, Plugins, Misc
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
u32 GetBiosVersion(); // Used in Misc, Memory
|
||||||
// Session Configuration Override Flags
|
extern u32 BiosVersion; // Used in Memory, Misc, CDVD
|
||||||
//
|
int GetPS2ElfName(char*); // Used in Misc, System, Linux, CDVD
|
||||||
// a handful of flags that can override user configurations for the current application session
|
|
||||||
// only. This allows us to do things like force-disable recompilers if the memory allocations
|
|
||||||
// for them fail.
|
|
||||||
struct SessionOverrideFlags
|
|
||||||
{
|
|
||||||
bool ForceDisableEErec:1;
|
|
||||||
bool ForceDisableVU0rec:1;
|
|
||||||
bool ForceDisableVU1rec:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern SessionOverrideFlags g_Session;
|
// Not sure what header these should go in. Probably not this one.
|
||||||
|
void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR);
|
||||||
|
extern u32 g_sseVUMXCSR, g_sseMXCSR;
|
||||||
|
extern u8 g_globalMMXSaved, g_globalXMMSaved;
|
||||||
|
extern bool g_EEFreezeRegs;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
// when using mmx/xmm regs, use; 0 is load
|
||||||
// Pcsx2 User Configuration Options!
|
// freezes no matter the state
|
||||||
|
#ifndef __INTEL_COMPILER
|
||||||
|
extern "C" void FreezeXMMRegs_(int save);
|
||||||
|
extern "C" void FreezeMMXRegs_(int save);
|
||||||
|
#else
|
||||||
|
extern void FreezeXMMRegs_(int save);
|
||||||
|
extern void FreezeMMXRegs_(int save);
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define PCSX2_MICROVU // Use Micro VU recs instead of Zero VU Recs
|
// these macros check to see if needs freezing
|
||||||
#define PCSX2_GSMULTITHREAD 1 // uses multi-threaded gs
|
#define FreezeXMMRegs(save) if( g_EEFreezeRegs ) { FreezeXMMRegs_(save); }
|
||||||
#define PCSX2_EEREC 0x10
|
#define FreezeMMXRegs(save) if( g_EEFreezeRegs ) { FreezeMMXRegs_(save); }
|
||||||
#define PCSX2_VU0REC 0x20
|
|
||||||
#define PCSX2_VU1REC 0x40
|
|
||||||
#define PCSX2_FRAMELIMIT_MASK 0xc00
|
|
||||||
#define PCSX2_FRAMELIMIT_NORMAL 0x000
|
|
||||||
#define PCSX2_FRAMELIMIT_LIMIT 0x400
|
|
||||||
#define PCSX2_FRAMELIMIT_SKIP 0x800
|
|
||||||
#define PCSX2_FRAMELIMIT_VUSKIP 0xc00
|
|
||||||
|
|
||||||
#define CHECK_MULTIGS (Config.Options&PCSX2_GSMULTITHREAD)
|
// Not used.
|
||||||
#define CHECK_EEREC (!g_Session.ForceDisableEErec && Config.Options&PCSX2_EEREC)
|
//void injectIRX(const char *filename);
|
||||||
//------------ SPEED/MISC HACKS!!! ---------------
|
|
||||||
#define CHECK_EE_CYCLERATE (Config.Hacks & 0x03)
|
|
||||||
#define CHECK_IOP_CYCLERATE (Config.Hacks & 0x08)
|
|
||||||
#define CHECK_WAITCYCLE_HACK (Config.Hacks & 0x10)
|
|
||||||
#define CHECK_INTC_STAT_HACK (Config.Hacks & 0x20)
|
|
||||||
#define CHECK_ESCAPE_HACK (Config.Hacks & 0x400)
|
|
||||||
//------------ SPECIAL GAME FIXES!!! ---------------
|
|
||||||
#define CHECK_VUADDSUBHACK (Config.GameFixes & 0x1) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
|
|
||||||
#define CHECK_FPUCOMPAREHACK (Config.GameFixes & 0x4) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
|
||||||
#define CHECK_VUCLIPFLAGHACK (Config.GameFixes & 0x2) // Special Fix for God of War, fixes SPS.
|
|
||||||
//------------ Advanced Options!!! ---------------
|
|
||||||
#define CHECK_VU_OVERFLOW (Config.vuOptions & 0x1)
|
|
||||||
#define CHECK_VU_EXTRA_OVERFLOW (Config.vuOptions & 0x2) // If enabled, Operands are clamped before being used in the VU recs
|
|
||||||
#define CHECK_VU_SIGN_OVERFLOW (Config.vuOptions & 0x4)
|
|
||||||
#define CHECK_VU_UNDERFLOW (Config.vuOptions & 0x8)
|
|
||||||
#define CHECK_VU_EXTRA_FLAGS 0 // Always disabled now // Sets correct flags in the VU recs
|
|
||||||
#define CHECK_FPU_OVERFLOW (Config.eeOptions & 0x1)
|
|
||||||
#define CHECK_FPU_EXTRA_OVERFLOW (Config.eeOptions & 0x2) // If enabled, Operands are checked for infinities before being used in the FPU recs
|
|
||||||
#define CHECK_FPU_EXTRA_FLAGS 1 // Always enabled now // Sets D/I flags on FPU instructions
|
|
||||||
#define CHECK_FPU_FULL (Config.eeOptions & 0x4)
|
|
||||||
#define DEFAULT_eeOptions 0x01
|
|
||||||
#define DEFAULT_vuOptions 0x01
|
|
||||||
//------------ DEFAULT sseMXCSR VALUES!!! ---------------
|
|
||||||
#define DEFAULT_sseMXCSR 0x7fc0 //FPU rounding, DaZ, "chop" - Note: Dont enable FtZ by default, it breaks games! E.g. Enthusia (Refraction)
|
|
||||||
#define DEFAULT_sseVUMXCSR 0x7fc0 //VU rounding, DaZ, "chop"
|
|
||||||
|
|
||||||
#define CHECK_FRAMELIMIT (Config.Options&PCSX2_FRAMELIMIT_MASK)
|
// If we move the rest of this stuff, we can probably move these, too.
|
||||||
|
extern void InitCPUTicks();
|
||||||
#define CHECK_VU0REC (!g_Session.ForceDisableVU0rec && Config.Options&PCSX2_VU0REC)
|
extern u64 GetCPUTicks();
|
||||||
#define CHECK_VU1REC (!g_Session.ForceDisableVU1rec && (Config.Options&PCSX2_VU1REC))
|
extern u64 GetTickFrequency();
|
||||||
|
|
||||||
// Memory Card configuration, per slot.
|
|
||||||
struct McdConfig
|
|
||||||
{
|
|
||||||
// filename of the memory card for this slot.
|
|
||||||
// If the string is empty characters long then the default is used.
|
|
||||||
char Filename[g_MaxPath];
|
|
||||||
|
|
||||||
// Enables the memory card at the emulation level. When false, games will treat this
|
|
||||||
// slot as if the memory card has been physically removed from the PS2.
|
|
||||||
bool Enabled;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct PcsxConfig
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
char Bios[g_MaxPath];
|
|
||||||
char GS[g_MaxPath];
|
|
||||||
char PAD1[g_MaxPath];
|
|
||||||
char PAD2[g_MaxPath];
|
|
||||||
char SPU2[g_MaxPath];
|
|
||||||
char CDVD[g_MaxPath];
|
|
||||||
char DEV9[g_MaxPath];
|
|
||||||
char USB[g_MaxPath];
|
|
||||||
char FW[g_MaxPath];
|
|
||||||
char PluginsDir[g_MaxPath];
|
|
||||||
char BiosDir[g_MaxPath];
|
|
||||||
char Lang[g_MaxPath];
|
|
||||||
|
|
||||||
McdConfig Mcd[2];
|
|
||||||
|
|
||||||
bool McdEnableNTFS; // enables NTFS compression on cards and the mcd folder.
|
|
||||||
bool McdEnableEject; // enables auto-ejection of cards after loading savestates.
|
|
||||||
|
|
||||||
u32 Options; // PCSX2_X options
|
|
||||||
|
|
||||||
bool PsxOut;
|
|
||||||
bool Profiler; // Displays profiling info to console
|
|
||||||
bool cdvdPrint; // Prints cdvd reads to console
|
|
||||||
bool closeGSonEsc; // closes the GS (and saves its state) on escape automatically.
|
|
||||||
|
|
||||||
int PsxType;
|
|
||||||
int Cdda;
|
|
||||||
int Mdec;
|
|
||||||
int Patch;
|
|
||||||
int CustomFps;
|
|
||||||
int Hacks;
|
|
||||||
int GameFixes;
|
|
||||||
int CustomFrameSkip;
|
|
||||||
int CustomConsecutiveFrames;
|
|
||||||
int CustomConsecutiveSkip;
|
|
||||||
u32 sseMXCSR;
|
|
||||||
u32 sseVUMXCSR;
|
|
||||||
u32 eeOptions;
|
|
||||||
u32 vuOptions;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern PcsxConfig Config;
|
|
||||||
extern u32 BiosVersion;
|
|
||||||
extern char CdromId[12];
|
|
||||||
extern uptr pDsp; // what the hell is this unused piece of crap passed to every plugin for? (air)
|
|
||||||
|
|
||||||
int LoadCdrom();
|
|
||||||
int CheckCdrom();
|
|
||||||
int GetPS2ElfName(char*);
|
|
||||||
|
|
||||||
|
// Used in Misc,and Windows/Linux files.
|
||||||
|
void ProcessFKeys(int fkey, int shift); // processes fkey related commands value 1-12
|
||||||
|
int IsBIOS(char *filename, char *description);
|
||||||
|
char *ParseLang(char *id);
|
||||||
extern const char *LabelAuthors;
|
extern const char *LabelAuthors;
|
||||||
extern const char *LabelGreets;
|
extern const char *LabelGreets;
|
||||||
|
void CycleFrameLimit(int dir);
|
||||||
|
|
||||||
|
// Only used in Misc.cpp
|
||||||
void SaveGSState(const string& file);
|
void SaveGSState(const string& file);
|
||||||
void LoadGSState(const string& file);
|
void LoadGSState(const string& file);
|
||||||
|
|
||||||
char *ParseLang(char *id);
|
extern char CdromId[12];
|
||||||
void CycleFrameLimit(int dir);
|
int LoadCdrom();
|
||||||
void ProcessFKeys(int fkey, int shift); // processes fkey related commands value 1-12
|
int CheckCdrom();
|
||||||
|
|
||||||
#define DIRENTRY_SIZE 16
|
#define DIRENTRY_SIZE 16
|
||||||
|
|
||||||
|
@ -198,46 +113,11 @@ struct romdir{
|
||||||
u16 extInfoSize;
|
u16 extInfoSize;
|
||||||
u32 fileSize;
|
u32 fileSize;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
}; //+22
|
};
|
||||||
|
#pragma pack() //+22
|
||||||
#else
|
#else
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32 GetBiosVersion();
|
|
||||||
int IsBIOS(char *filename, char *description);
|
|
||||||
|
|
||||||
extern u32 g_sseVUMXCSR, g_sseMXCSR;
|
|
||||||
|
|
||||||
void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR);
|
|
||||||
|
|
||||||
// when using mmx/xmm regs, use; 0 is load
|
|
||||||
// freezes no matter the state
|
|
||||||
#ifndef __INTEL_COMPILER
|
|
||||||
extern "C" void FreezeXMMRegs_(int save);
|
|
||||||
extern "C" void FreezeMMXRegs_(int save);
|
|
||||||
#else
|
|
||||||
extern void FreezeXMMRegs_(int save);
|
|
||||||
extern void FreezeMMXRegs_(int save);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern bool g_EEFreezeRegs;
|
|
||||||
extern u8 g_globalMMXSaved;
|
|
||||||
extern u8 g_globalXMMSaved;
|
|
||||||
|
|
||||||
// these macros check to see if needs freezing
|
|
||||||
#define FreezeXMMRegs(save) if( g_EEFreezeRegs ) { FreezeXMMRegs_(save); }
|
|
||||||
#define FreezeMMXRegs(save) if( g_EEFreezeRegs ) { FreezeMMXRegs_(save); }
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma pack()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void injectIRX(const char *filename);
|
|
||||||
|
|
||||||
extern void InitCPUTicks();
|
|
||||||
extern u64 GetTickFrequency();
|
|
||||||
extern u64 GetCPUTicks();
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __MISC_H__ */
|
#endif /* __MISC_H__ */
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
extern char MAIN_DIR[g_MaxPath];
|
extern char MAIN_DIR[g_MaxPath];
|
||||||
#endif
|
#endif
|
||||||
#define CONFIG_DIR "inis"
|
|
||||||
|
|
||||||
|
#define DEFAULT_INIS_DIR "inis"
|
||||||
#define DEFAULT_BIOS_DIR "bios"
|
#define DEFAULT_BIOS_DIR "bios"
|
||||||
#define DEFAULT_PLUGINS_DIR "plugins"
|
#define DEFAULT_PLUGINS_DIR "plugins"
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ AC_ARG_ENABLE(sse3, AC_HELP_STRING([--enable-sse3], [Forces sse3 detection on CP
|
||||||
sse3=$enableval,sse3=no)
|
sse3=$enableval,sse3=no)
|
||||||
if test "x$sse3" == xyes
|
if test "x$sse3" == xyes
|
||||||
then
|
then
|
||||||
AC_DEFINE(PCSX2_FORCESSE3,1,[PCSX2_DEVBUILD])
|
AC_DEFINE(PCSX2_FORCESSE3,1,[PCSX2_FORCESSE3])
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT(sse3)
|
AC_MSG_RESULT(sse3)
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ AC_ARG_ENABLE(sse4, AC_HELP_STRING([--enable-sse4], [Forces sse4 detection on CP
|
||||||
sse4=$enableval,sse4=no)
|
sse4=$enableval,sse4=no)
|
||||||
if test "x$sse4" == xyes
|
if test "x$sse4" == xyes
|
||||||
then
|
then
|
||||||
AC_DEFINE(PCSX2_FORCESSE4,1,[PCSX2_DEVBUILD])
|
AC_DEFINE(PCSX2_FORCESSE4,1,[PCSX2_FORCESSE4])
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT(sse4)
|
AC_MSG_RESULT(sse4)
|
||||||
|
|
||||||
|
|
|
@ -935,6 +935,10 @@
|
||||||
RelativePath="..\..\Patch.h"
|
RelativePath="..\..\Patch.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\common\include\Pcsx2Config.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\PrecompiledHeader.cpp"
|
RelativePath="..\..\PrecompiledHeader.cpp"
|
||||||
>
|
>
|
||||||
|
|
|
@ -38,7 +38,7 @@ static string GetConfigFilename()
|
||||||
// Load a user-specified configuration, or use the ini relative to the application's working directory.
|
// Load a user-specified configuration, or use the ini relative to the application's working directory.
|
||||||
// (Our current working directory can change, so we use the one we detected at startup)
|
// (Our current working directory can change, so we use the one we detected at startup)
|
||||||
|
|
||||||
return Path::Combine( g_WorkingFolder, hasCustomConfig() ? g_CustomConfigFile : (CONFIG_DIR "\\pcsx2.ini") );
|
return Path::Combine( g_WorkingFolder, hasCustomConfig() ? g_CustomConfigFile : (DEFAULT_INIS_DIR "\\pcsx2.ini") );
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1197,8 +1197,11 @@ void iopRecRecompile(u32 startpc)
|
||||||
|
|
||||||
// if recPtr reached the mem limit reset whole mem
|
// if recPtr reached the mem limit reset whole mem
|
||||||
if (((uptr)recPtr - (uptr)recMem) >= (RECMEM_SIZE - 0x10000))
|
if (((uptr)recPtr - (uptr)recMem) >= (RECMEM_SIZE - 0x10000))
|
||||||
|
{
|
||||||
|
// This is getting called pretty often in Linux. (21 times in the course of getting to the starting screen of KH1) --arcum42
|
||||||
recResetIOP();
|
recResetIOP();
|
||||||
|
}
|
||||||
|
|
||||||
s_pCurBlock = PSX_GETBLOCK(startpc);
|
s_pCurBlock = PSX_GETBLOCK(startpc);
|
||||||
|
|
||||||
if( s_pCurBlock->GetFnptr() != (uptr)iopJITCompile ) {
|
if( s_pCurBlock->GetFnptr() != (uptr)iopJITCompile ) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ void SysMessage(char *fmt, ...)
|
||||||
void USBconfigure()
|
void USBconfigure()
|
||||||
{
|
{
|
||||||
char *file;
|
char *file;
|
||||||
getcwd(file, ARRAYSIZE(file));
|
getcwd(file, ArraySize(file));
|
||||||
chdir("plugins");
|
chdir("plugins");
|
||||||
ExecCfg("configure");
|
ExecCfg("configure");
|
||||||
chdir(file);
|
chdir(file);
|
||||||
|
@ -90,7 +90,7 @@ void USBconfigure()
|
||||||
void USBabout()
|
void USBabout()
|
||||||
{
|
{
|
||||||
char *file;
|
char *file;
|
||||||
getcwd(file, ARRAYSIZE(file));
|
getcwd(file, ArraySize(file));
|
||||||
chdir("plugins");
|
chdir("plugins");
|
||||||
ExecCfg("about");
|
ExecCfg("about");
|
||||||
chdir(file);
|
chdir(file);
|
||||||
|
|
Loading…
Reference in New Issue