Merge pull request #19 from xperia64/add_devo_progressive_patch

Support Devolution's progressive patching
This commit is contained in:
wiidev 2022-12-12 19:27:43 +00:00 committed by GitHub
commit f0b5b5d22b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 11 deletions

View File

@ -20,7 +20,7 @@
#define LAUNCH_DEVO() ((void(*)(void))loader_bin)()
#define DEVO_SIG 0x3EF9DB23
#define DEVO_CONFIG_VERSION 0x0200
#define DEVO_CONFIG_VERSION 0x0201
enum DEVOConfig
{
@ -33,6 +33,8 @@ enum DEVOConfig
DEVO_CFG_CROP_OVERSCAN = (1<<6), // added in Devo r234, config version 0x0200
DEVO_CFG_DISC_DELAY = (1<<7),
DEVO_CFG_PLAYLOG = (1<<8),
DEVO_CFG_FORCE_480P = (1<<9), // probably added in Devo r266, config version 0x0201
DEVO_CFG_FORCE_576P = (1<<10),
};
typedef struct _DEVO_CFG

View File

@ -227,6 +227,7 @@ void GCGameLoadSM::SetOptionNames()
Options->SetName(Idx++, "%s", tr( "D Buttons" ));
Options->SetName(Idx++, "%s", tr( "Crop Overscan" ));
Options->SetName(Idx++, "%s", tr( "Disc Read Delay" ));
Options->SetName(Idx++, "%s", tr( "Progressive Patch" ));
}
}
@ -555,6 +556,12 @@ void GCGameLoadSM::SetOptionValues()
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVODiscDelay]));
//! Settings: DML + NIN + Devo Progressive Patch
if(GameConfig.DMLProgPatch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLProgPatch]));
}
}
@ -950,6 +957,12 @@ int GCGameLoadSM::GetMenuInternal()
if (++GameConfig.DEVODiscDelay >= MAX_ON_OFF) GameConfig.DEVODiscDelay = INHERIT;
}
//! Settings: DEVO Progressive Patch
else if (currentGCmode == GC_MODE_DEVOLUTION && ret == ++Idx)
{
if (++GameConfig.DMLProgPatch >= MAX_ON_OFF) GameConfig.DMLProgPatch = INHERIT;
}
SetOptionValues();
return MENU_NONE;

View File

@ -268,9 +268,9 @@ void LoaderSettings::SetOptionNames()
Options->SetName(Idx++, "%s", tr( "=== GameCube Settings" ));
Options->SetName(Idx++, "%s", tr( "GameCube Source" ));
Options->SetName(Idx++, "%s", tr( "GameCube Mode" ));
Options->SetName(Idx++, "%s", tr( "Progressive Patch" ));
Options->SetName(Idx++, "%s", tr( "--== DM(L) + Nintendont" ));
Options->SetName(Idx++, "%s", tr( "Video Mode" ));
Options->SetName(Idx++, "%s", tr( "Progressive Patch" ));
Options->SetName(Idx++, "%s", tr( "Force Widescreen" ));
Options->SetName(Idx++, "%s", tr( "Debug" ));
Options->SetName(Idx++, "%s", tr( "Disc-Select Prompt" ));
@ -414,15 +414,15 @@ void LoaderSettings::SetOptionValues()
//! Settings: GameCube Mode
Options->SetValue(Idx++, "%s", tr(GCMode[Settings.GameCubeMode]));
//! Settings: DML + NIN + Devo Progressive Patch
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLProgPatch]));
//! Settings: TITLE - GameCube DIOS MIOS (Lite) + Nintendont
Options->SetValue(Idx++, "==-- ");
//! Settings: DML + NIN Video Mode
Options->SetValue(Idx++, "%s", tr(DMLVideoText[Settings.DMLVideo]));
//! Settings: DML + NIN Progressive Patch
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLProgPatch]));
//! Settings: DML + NIN Force Widescreen
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLWidescreen]));
@ -778,6 +778,12 @@ int LoaderSettings::GetMenuInternal()
if (++Settings.GameCubeMode >= CG_MODE_MAX_CHOICE) Settings.GameCubeMode = 0;
}
//! Settings: DML + NIN + Devo Progressive Patch
else if (ret == ++Idx)
{
if (++Settings.DMLProgPatch >= MAX_ON_OFF) Settings.DMLProgPatch = 0;
}
//! Settings: TITLE - GameCube DM(L) + Nintendont
else if (ret == ++Idx)
{
@ -793,12 +799,6 @@ int LoaderSettings::GetMenuInternal()
if(Settings.DMLVideo >= DML_VIDEO_MAX_CHOICE) Settings.DMLVideo = 0;
}
//! Settings: DML + NIN Progressive Patch
else if (ret == ++Idx)
{
if (++Settings.DMLProgPatch >= MAX_ON_OFF) Settings.DMLProgPatch = 0;
}
//! Settings: DML + NIN Force Widescreen
else if (ret == ++Idx)
{

View File

@ -810,6 +810,7 @@ int GameBooter::BootDevolution(struct discHdr *gameHdr)
GameCFG * game_cfg = GameSettings.GetGameCFG(gameHdr->id);
s8 languageChoice = game_cfg->language == INHERIT ? Settings.language -1 : game_cfg->language;
u8 devoProgressivePatch = game_cfg->DMLProgPatch == INHERIT ? Settings.DMLProgPatch : game_cfg->DMLProgPatch;
u8 devoMCEmulation = game_cfg->DEVOMCEmulation == INHERIT ? Settings.DEVOMCEmulation : game_cfg->DEVOMCEmulation;
u8 devoActivityLEDChoice = game_cfg->DEVOActivityLED == INHERIT ? Settings.DEVOActivityLED : game_cfg->DEVOActivityLED;
u8 devoWidescreenChoice = game_cfg->DEVOWidescreen == INHERIT ? Settings.DEVOWidescreen : game_cfg->DEVOWidescreen;
@ -944,6 +945,11 @@ int GameBooter::BootDevolution(struct discHdr *gameHdr)
if (devoDiscDelayChoice && DEVO_version >= 234)
devo_config->options |= DEVO_CFG_DISC_DELAY;
// devo_config->options |= DEVO_CFG_PLAYLOG; // Playlog setting managed by USBLoaderGX features menu
if (devoProgressivePatch && DEVO_version >= 266)
{
devo_config->options |= DEVO_CFG_FORCE_480P;
devo_config->options |= DEVO_CFG_FORCE_576P;
}
// check memory card
if(devoMCEmulation == DEVO_MC_OFF)