Remove MPN Extended rename super extended to MPN Extended

This commit is contained in:
Nayla Hanegan 2025-01-03 16:38:57 -05:00
commit 1242123537
5 changed files with 22 additions and 30 deletions

View file

@ -151,9 +151,7 @@
#define GECKO_CODE_HANDLER "codehandler.bin" #define GECKO_CODE_HANDLER "codehandler.bin"
#define GECKO_CODE_HANDLER_MPN "codehandler-mpn.bin" #define GECKO_CODE_HANDLER_MPN "codehandler.bin"
#define GECKO_CODE_HANDLER_MPN_SUPER "codehandler.bin" // MPN Codehanlder is breaking some textures.
// Subdirs in Sys // Subdirs in Sys
#define GC_SYS_DIR "GC" #define GC_SYS_DIR "GC"

View file

@ -117,8 +117,6 @@ const char* GetGeckoCodeHandlerPath()
return GECKO_CODE_HANDLER; // Dolphin (Stock) return GECKO_CODE_HANDLER; // Dolphin (Stock)
case 1: case 1:
return GECKO_CODE_HANDLER_MPN; // MPN (Extended) return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
case 2:
return GECKO_CODE_HANDLER_MPN_SUPER; // MPN (Super Extended)
default: default:
return GECKO_CODE_HANDLER; // Fallback return GECKO_CODE_HANDLER; // Fallback
} }
@ -127,10 +125,10 @@ const char* GetGeckoCodeHandlerPath()
bool IsGeckoCodeHandlerEnabled() bool IsGeckoCodeHandlerEnabled()
{ {
int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER);
return code_handler_value == 1 || code_handler_value == 2; return code_handler_value == 1;
} }
bool IsGeckoCodeHandlerSUPER() bool IsGeckoCodeHandlerMPN()
{ {
int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER);
return code_handler_value == 2; return code_handler_value == 2;
@ -176,15 +174,15 @@ static Installation InstallCodeHandlerLocked(const Core::CPUThreadGuard& guard)
} }
const bool is_mpn_handler_and_game_id_rm8e01 = const bool is_mpn_handler_and_game_id_rm8e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "RM8E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "RM8E01");
const bool is_mpn_handler_and_game_id_gp7e01 = const bool is_mpn_handler_and_game_id_gp7e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP7E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP7E01");
const bool is_mpn_handler_and_game_id_gp6e01 = const bool is_mpn_handler_and_game_id_gp6e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP6E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP6E01");
const bool is_mpn_handler_and_game_id_gp5e01 = const bool is_mpn_handler_and_game_id_gp5e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP5E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP5E01");
const bool is_mpn_handler_and_game_id_gmpe01 = const bool is_mpn_handler_and_game_id_gmpe01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GMPE01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GMPE01");
u32 codelist_base_address = u32 codelist_base_address =
is_mpn_handler_and_game_id_rm8e01 ? INSTALLER_BASE_ADDRESS_MP8 : is_mpn_handler_and_game_id_rm8e01 ? INSTALLER_BASE_ADDRESS_MP8 :

View file

@ -86,7 +86,6 @@ const char* GetGeckoCodeHandlerPath()
{ {
case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock) case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock)
case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended) case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
case 2: return GECKO_CODE_HANDLER_MPN_SUPER; // MPN (Super Extended)
default: return GECKO_CODE_HANDLER; // Fallback default: return GECKO_CODE_HANDLER; // Fallback
} }
} }
@ -94,13 +93,13 @@ const char* GetGeckoCodeHandlerPath()
bool IsGeckoCodeHandlerEnabled() bool IsGeckoCodeHandlerEnabled()
{ {
int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value
return code_handler_value == 1 || code_handler_value == 2; // Return true for 1 and 2 return code_handler_value == 1; // Return true for 1 and 2
} }
bool IsGeckoCodeHandlerSUPER() bool IsGeckoCodeHandlerMPN()
{ {
int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value
return code_handler_value == 2; // Return true for 1 and 2 return code_handler_value == 1;
} }
void PatchFixedFunctions(Core::System& system) void PatchFixedFunctions(Core::System& system)
@ -126,11 +125,11 @@ void PatchFixedFunctions(Core::System& system)
// this, and it doesn't clear the icache properly. // this, and it doesn't clear the icache properly.
const bool is_mpn_handler_and_game_id_gp7e01 = const bool is_mpn_handler_and_game_id_gp7e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP7E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP7E01");
const bool is_mpn_handler_and_game_id_gp6e01 = const bool is_mpn_handler_and_game_id_gp6e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP6E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP6E01");
const bool is_mpn_handler_and_game_id_gp5e01 = const bool is_mpn_handler_and_game_id_gp5e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP5E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP5E01");
u32 codelist_hook = is_mpn_handler_and_game_id_gp7e01 ? u32 codelist_hook = is_mpn_handler_and_game_id_gp7e01 ?
Gecko::ENTRY_POINT_MP7 : Gecko::ENTRY_POINT_MP7 :

View file

@ -33,7 +33,6 @@ const char* GetGeckoCodeHandlerPath()
{ {
case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock) case 0: return GECKO_CODE_HANDLER; // Dolphin (Stock)
case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended) case 1: return GECKO_CODE_HANDLER_MPN; // MPN (Extended)
case 2: return GECKO_CODE_HANDLER_MPN_SUPER; // MPN (Super Extended)
default: return GECKO_CODE_HANDLER; // Fallback default: return GECKO_CODE_HANDLER; // Fallback
} }
} }
@ -41,10 +40,10 @@ const char* GetGeckoCodeHandlerPath()
bool IsGeckoCodeHandlerEnabled() bool IsGeckoCodeHandlerEnabled()
{ {
int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value
return code_handler_value == 1 || code_handler_value == 2; // Return true for 1 and 2 return code_handler_value == 1; // Return true for 1 and 2
} }
bool IsGeckoCodeHandlerSUPER() bool IsGeckoCodeHandlerMPN()
{ {
int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value int code_handler_value = Config::Get(Config::MAIN_CODE_HANDLER); // Get the integer value
return code_handler_value == 2; // Return true for 1 and 2 return code_handler_value == 2; // Return true for 1 and 2
@ -72,11 +71,11 @@ void GeckoCodeHandlerICacheFlush(const Core::CPUThreadGuard& guard)
// would be even uglier.) // would be even uglier.)
const bool is_mpn_handler_and_game_id_gp7e01 = const bool is_mpn_handler_and_game_id_gp7e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP7E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP7E01");
const bool is_mpn_handler_and_game_id_gp6e01 = const bool is_mpn_handler_and_game_id_gp6e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP6E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP6E01");
const bool is_mpn_handler_and_game_id_gp5e01 = const bool is_mpn_handler_and_game_id_gp5e01 =
IsGeckoCodeHandlerSUPER() && (SConfig::GetInstance().GetGameID() == "GP5E01"); IsGeckoCodeHandlerMPN() && (SConfig::GetInstance().GetGameID() == "GP5E01");
u32 codelist_hook = is_mpn_handler_and_game_id_gp7e01 ? Gecko::INSTALLER_BASE_ADDRESS_MP7 : u32 codelist_hook = is_mpn_handler_and_game_id_gp7e01 ? Gecko::INSTALLER_BASE_ADDRESS_MP7 :
is_mpn_handler_and_game_id_gp6e01 ? Gecko::INSTALLER_BASE_ADDRESS_MP6 : is_mpn_handler_and_game_id_gp6e01 ? Gecko::INSTALLER_BASE_ADDRESS_MP6 :

View file

@ -225,8 +225,7 @@ void GeneralPane::CreateCheats()
m_combobox_codehandler = new QComboBox(); m_combobox_codehandler = new QComboBox();
m_combobox_codehandler->addItem(tr("Dolphin (Stock)"), QVariant(0)); m_combobox_codehandler->addItem(tr("Dolphin (Stock)"), QVariant(0));
m_combobox_codehandler->addItem(tr("MPN (Extended)"), QVariant(1)); m_combobox_codehandler->addItem(tr("MPN (Super Extended)"), QVariant(1));
m_combobox_codehandler->addItem(tr("MPN (Super Extended)"), QVariant(2));
code_handler_layout->addRow(code_handler_label, m_combobox_codehandler); code_handler_layout->addRow(code_handler_label, m_combobox_codehandler);
cheats_group_layout->addLayout(code_handler_layout); cheats_group_layout->addLayout(code_handler_layout);
@ -237,8 +236,7 @@ void GeneralPane::CreateCheats()
// Add a label to define the different code handlers // Add a label to define the different code handlers
auto* code_handler_info_label = new QLabel(tr("<b>Dolphin (Stock)</b>: Compatibility with legacy and non Dolphin-MPN builds <br>(around 3,200 bytes / 400 lines of code.)<br><br>" auto* code_handler_info_label = new QLabel(tr("<b>Dolphin (Stock)</b>: Compatibility with legacy and non Dolphin-MPN builds <br>(around 3,200 bytes / 400 lines of code.)<br><br>"
"<b>MPN (Extended)</b>: Improved code handler that has more space with some removed irrevalent functions<br>(around 3,200 bytes / 440 lines of code.)<br><br>" "<b>MPN (Extended)</b>: Enhanced code handler that uses hacks to give certain games<br>currently Mario Party 4, 5, 6, 7, and 8 way more code room<br>(around 30,000 bytes / 3,750 lines of codes)."));
"<b>MPN (Super Extended)</b>: Enhanced code handler that uses hacks to give certain games<br>currently Mario Party 4, 5, 6 and 8 way more code room<br>(around 30,000 bytes / 3,750 lines of codes)."));
code_handler_info_label->setWordWrap(true); code_handler_info_label->setWordWrap(true);
cheats_group_layout->addWidget(code_handler_info_label); cheats_group_layout->addWidget(code_handler_info_label);