From 1512a9f74fd54ff1a95912c0272925caf1a876bb Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sun, 10 Feb 2013 11:13:33 +0000 Subject: [PATCH] -updated devolution config, now DM widescreen and activity led patches work with devo r188 too, also if you enable wifi gecko for wiiflow this option will be set in devolution as well -updated english.ini and german.ini --- source/gc/gc.cpp | 17 +++++++++++++---- source/gc/gc.hpp | 16 +++++++++++++--- source/menu/menu_config_game.cpp | 2 +- source/menu/menu_game.cpp | 9 +++++---- wii/wiiflow/Languages/english.ini | 2 +- wii/wiiflow/Languages/german.ini | 2 +- 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/source/gc/gc.cpp b/source/gc/gc.cpp index 476c4179..46b61ec4 100644 --- a/source/gc/gc.cpp +++ b/source/gc/gc.cpp @@ -199,7 +199,8 @@ void DEVO_GetLoader(const char *path) } } -void DEVO_SetOptions(const char *isopath, const char *gameID, bool memcard_emu) +void DEVO_SetOptions(const char *isopath, const char *gameID, bool memcard_emu, + bool widescreen, bool activity_led, bool wifi) { // re-mount device we need DeviceHandle.MountDevolution(); @@ -218,11 +219,19 @@ void DEVO_SetOptions(const char *isopath, const char *gameID, bool memcard_emu) // fill out the Devolution config struct memset(DEVO_CONFIG, 0, sizeof(gconfig)); - DEVO_CONFIG->signature = 0x3EF9DB23; - DEVO_CONFIG->version = 0x00000100; + DEVO_CONFIG->signature = DEVO_CONFIG_SIG; + DEVO_CONFIG->version = DEVO_CONFIG_VERSION; DEVO_CONFIG->device_signature = st.st_dev; DEVO_CONFIG->disc1_cluster = st.st_ino; - + + // Pergame options + if(wifi) + DEVO_CONFIG->options |= DEVO_CONFIG_WIFILOG; + if(widescreen) + DEVO_CONFIG->options |= DEVO_CONFIG_WIDE; + if(!activity_led) + DEVO_CONFIG->options |= DEVO_CONFIG_NOLED; + // If 2nd iso file tell Devo about it strncpy(iso2path, isopath, 255); char *ptz = strstr(iso2path, "game.iso"); diff --git a/source/gc/gc.hpp b/source/gc/gc.hpp index becbdc2d..f2c4fadd 100644 --- a/source/gc/gc.hpp +++ b/source/gc/gc.hpp @@ -74,18 +74,28 @@ void DML_New_WriteOptions(); // Devolution typedef struct global_config { - u32 signature; //0x3EF9DB23 - u16 version; //0x00000100 + u32 signature; + u16 version; u16 device_signature; u32 memcard_cluster; u32 disc1_cluster; u32 disc2_cluster; + u32 options; } gconfig; +// constant value for identification purposes +#define DEVO_CONFIG_SIG 0x3EF9DB23 +// version may change when future options are added +#define DEVO_CONFIG_VERSION 0x0110 +// option flags +#define DEVO_CONFIG_WIFILOG (1<<0) +#define DEVO_CONFIG_WIDE (1<<1) +#define DEVO_CONFIG_NOLED (1<<2) + bool DEVO_Installed(const char *path); void DEVO_GetLoader(const char *path); void DEVO_SetOptions(const char *isopath, const char *gameID, - bool memcard_emum); + bool memcard_emum, bool widescreen, bool activity_led, bool wifi); void DEVO_Boot(); // General diff --git a/source/menu/menu_config_game.cpp b/source/menu/menu_config_game.cpp index 095d2fae..043ff948 100644 --- a/source/menu/menu_config_game.cpp +++ b/source/menu/menu_config_game.cpp @@ -1035,7 +1035,7 @@ void CMenu::_textGameSettings(void) m_btnMgr.setText(m_gameSettingsBtnFlashSave, _t("cfgg33", L"Flash")); m_btnMgr.setText(m_gameSettingsLblDevoMemcardEmu, _t("cfgg34", L"Devolution Memcard Emulator")); m_btnMgr.setText(m_gameSettingsLblGCLoader, _t("cfgg35", L"GameCube Loader")); - m_btnMgr.setText(m_gameSettingsLblDM_Widescreen, _t("cfgg36", L"DM Widescreen Patch")); + m_btnMgr.setText(m_gameSettingsLblDM_Widescreen, _t("cfgg36", L"Widescreen Patch")); m_btnMgr.setText(m_gameSettingsLblApploader, _t("cfgg37", L"Boot Apploader")); m_btnMgr.setText(m_gameSettingsLblLED, _t("cfgg38", L"Activity LED")); m_btnMgr.setText(m_gameSettingsLblScreenshot, _t("cfgg39", L"DM Screenshot Feature")); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index aadb3bfe..acee807a 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -876,6 +876,8 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc) u8 loader = min((u32)m_gcfg2.getInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u); bool memcard_emu = m_gcfg2.getBool(id, "devo_memcard_emu", false); + bool widescreen = m_gcfg2.getBool(id, "dm_widescreen", false); + bool activity_led = m_gcfg2.getBool(id, "led", false); if(disc) { @@ -894,8 +896,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc) nodisc = (nodisc == 0) ? m_cfg.getInt(GC_DOMAIN, "no_disc_patch", 0) : nodisc-1; bool cheats = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(GC_DOMAIN, "cheat", false)); bool DML_debug = m_gcfg2.getBool(id, "debugger", false); - bool DM_Widescreen = m_gcfg2.getBool(id, "dm_widescreen", false); - bool activity_led = m_gcfg2.getBool(id, "led", false); bool screenshot = m_gcfg2.getBool(id, "screenshot", false); /* Generate gct path */ char GC_Path[1024]; @@ -914,7 +914,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc) const char *newPath = strcasestr(path, "boot.bin") == NULL ? strchr(path, '/') : strchr(GC_Path, '/'); if(m_new_dml) DML_New_SetOptions(newPath, CheatPath, NewCheatPath, DeviceName[currentPartition], - cheats, DML_debug, NMM, nodisc, videoMode, videoSetting, DM_Widescreen, m_new_dm_cfg, activity_led, screenshot); + cheats, DML_debug, NMM, nodisc, videoMode, videoSetting, widescreen, m_new_dm_cfg, activity_led, screenshot); else DML_Old_SetOptions(newPath); if(!nodisc || !m_new_dml) @@ -950,7 +950,8 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc) else //use cIOS instead to make sure Devolution works anyways loadIOS(mainIOS, false); ShutdownBeforeExit(); - DEVO_SetOptions(path, id, memcard_emu); + DEVO_SetOptions(path, id, memcard_emu, + widescreen, activity_led, m_use_wifi_gecko); DEVO_Boot(); } Sys_Exit(); diff --git a/wii/wiiflow/Languages/english.ini b/wii/wiiflow/Languages/english.ini index cb1e080f..bca5363b 100644 --- a/wii/wiiflow/Languages/english.ini +++ b/wii/wiiflow/Languages/english.ini @@ -87,7 +87,7 @@ cfgg32=Flash Save to NAND cfgg33=Flash cfgg34=Devolution Memcard Emulator cfgg35=GameCube Loader -cfgg36=DM Widescreen Patch +cfgg36=Widescreen Patch cfgg37=Boot Apploader cfgg38=Activity LED cfgg39=DM Screenshot Feature diff --git a/wii/wiiflow/Languages/german.ini b/wii/wiiflow/Languages/german.ini index 5f02f231..f4f8744f 100644 --- a/wii/wiiflow/Languages/german.ini +++ b/wii/wiiflow/Languages/german.ini @@ -87,7 +87,7 @@ cfgg32=Installiere Speicherstand cfgg33=Installieren cfgg34=Devolution Memcard Emulator cfgg35=GameCube Loader -cfgg36=DM Breitbild Patch +cfgg36=Breitbild Patch cfgg4=Länder-Strings patchen cfgg5=Ocarina cfgg7=Video patchen