From 85e3a2dbfbb6d0962af96dfad9639ae86a09dbfb Mon Sep 17 00:00:00 2001 From: The Dax Date: Thu, 28 Nov 2013 14:37:10 -0500 Subject: [PATCH] Make the model option ini-only. Move PSP_MODEL_FAT and PSP_MODEL_SLIM to Config.h. Default to a PSP Slim, and enable 64 megs of memory by default. --- Core/Config.cpp | 3 +-- Core/Config.h | 2 ++ Core/HLE/scePower.cpp | 3 --- Core/MemMap.h | 3 +++ Core/PSPLoaders.cpp | 1 + Core/System.cpp | 6 +++++- UI/GameSettingsScreen.cpp | 3 --- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 86c379d378..fa89f5d2a4 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -294,8 +294,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { } IniFile::Section *pspConfig = iniFile.GetOrCreateSection("SystemParam"); - // 0 = PSP Fat, 1 = PSP Slim - pspConfig->Get("PSPModel", &iPSPModel, 0); + pspConfig->Get("PSPModel", &iPSPModel, PSP_MODEL_SLIM); pspConfig->Get("NickName", &sNickName, "PPSSPP"); pspConfig->Get("proAdhocServer", &proAdhocServer, "localhost"); pspConfig->Get("MacAddress", &localMacAddress, "01:02:03:04:05:06"); diff --git a/Core/Config.h b/Core/Config.h index 978fca81c6..98d5b3ca8f 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -27,6 +27,8 @@ extern const char *PPSSPP_GIT_VERSION; #endif const int MAX_CONFIG_VOLUME = 8; +const int PSP_MODEL_FAT = 0; +const int PSP_MODEL_SLIM = 1; namespace http { class Download; diff --git a/Core/HLE/scePower.cpp b/Core/HLE/scePower.cpp index 32760e5299..ac068a9fdc 100644 --- a/Core/HLE/scePower.cpp +++ b/Core/HLE/scePower.cpp @@ -45,9 +45,6 @@ const int PSP_POWER_CB_BATTERY_FULL = 0x00000064; const int POWER_CB_AUTO = -1; -const int PSP_MODEL_FAT = 0; -const int PSP_MODEL_SLIM = 1; - const int numberOfCBPowerSlots = 16; const int numberOfCBPowerSlotsPrivate = 32; diff --git a/Core/MemMap.h b/Core/MemMap.h index e82ed7b272..d8f160fa98 100644 --- a/Core/MemMap.h +++ b/Core/MemMap.h @@ -82,6 +82,9 @@ enum RAM_NORMAL_SIZE = 0x02000000, RAM_NORMAL_MASK = RAM_NORMAL_SIZE - 1, + // Used if the PSP model is PSP-2000 (Slim). + RAM_DOUBLE_SIZE = RAM_NORMAL_SIZE * 2, + VRAM_SIZE = 0x200000, VRAM_MASK = VRAM_SIZE - 1, diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 0f0e825bca..7dfce911a8 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -41,6 +41,7 @@ #include "HLE/sceKernelModule.h" #include "HLE/sceKernelMemory.h" #include "ELF/ParamSFO.h" +#include "Core/Config.h" // We gather the game info before actually loading/booting the ISO // to determine if the emulator should enable extra memory and diff --git a/Core/System.cpp b/Core/System.cpp index 37a461ee43..8fd570cae1 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -153,7 +153,11 @@ void CPU_Init() { // Default memory settings // Seems to be the safest place currently.. - Memory::g_MemorySize = Memory::RAM_NORMAL_SIZE; // 32 MB of ram by default + if (g_Config.iPSPModel == PSP_MODEL_FAT) + Memory::g_MemorySize = Memory::RAM_NORMAL_SIZE; // 32 MB of ram by default + else + Memory::g_MemorySize = Memory::RAM_DOUBLE_SIZE; + g_RemasterMode = false; g_DoubleTextureCoordinates = false; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 1520b7b56b..9d57987d0e 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -295,9 +295,6 @@ void GameSettingsScreen::CreateViews() { systemSettings->Add(new PopupMultiChoice(&g_Config.iTimeFormat, s->T("Time Format"), timeFormat, 1, 2, s, screenManager())); static const char *buttonPref[] = { "Use O to confirm", "Use X to confirm" }; systemSettings->Add(new PopupMultiChoice(&g_Config.iButtonPreference, s->T("Confirmation Button"), buttonPref, 0, 2, s, screenManager())); - static const char *pspModels[] = { "PSP-1000 (Fat)", "PSP-2000 (Slim)" }; - systemSettings->Add(new PopupMultiChoice(&g_Config.iPSPModel, s->T("PSP Model"), pspModels, 0, 2, s, screenManager())); - } UI::EventReturn GameSettingsScreen::OnRenderingMode(UI::EventParams &e) {