- fixed nintendont video and language selecting per game. seems their 'key' names were different in config_game.cpp and menu_game.cpp so when you changed them in settings it didn't matter because launching a game used a different setting name. this is fixed now. if you used the global defaults you would have never noticed this.

- fixed using force progressive patch for nintendont. so when you select a 480p or pal480p video mode it actually turns on progressive mode. only works on certain games just like nintendont. tested on rampage total destruction and working.
- fixed led option for nintendont. seems the setting was there in game settings but was not used when launching a game.
- added skip IPL option per game. used to skip the GC or triforce BIOS if you have it installed. some games may not work with the BIOS so you can set those to skip it.
- added wiimote CC rumble option per game. this works only with wii CC or CCpro and will only make the wiimote vibrate in case you didn't know.
- auto set native control and led to off if on Wii U. they only work on Wii.
- WiiFlow Lite now ALWAYS uses Nintendont Args config and only work with nintendont v3.358+. 
- removed USB HID option since nintendont auto detects usb controllers since v3.304+
This commit is contained in:
fledge68 2017-03-17 00:02:21 +00:00
parent 00ee2477ec
commit 97b79238a3
8 changed files with 178 additions and 158 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

@ -38,19 +38,21 @@
#include "memory/memory.h"
#include "memory/mem2.hpp"
/* since Nintendont v1.98 argsboot is supported. and since wiiflow lite doesn't support versions less than v3.358
we will use argsboot every time. */
// Nintendont
NIN_CFG NinCfg;
u8 NinDevice = 0;
bool NinArgsboot = false;
void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath,char *NewCheatPath, const char *partition,
bool cheats, u8 emuMC, u8 videomode, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker,
bool wiiu_widescreen, bool NIN_Debugger, bool tri_arcade)
void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath, char *NewCheatPath, const char *partition,
bool cheats, u8 emuMC, u8 videomode, bool widescreen, bool led, bool native_ctl, bool deflicker, bool wiiu_widescreen,
bool NIN_Debugger, bool tri_arcade, bool cc_rumble, bool ipl)
{
NinDevice = DeviceHandle.PathToDriveType(game);
//clear nincfg and set magicbytes now in case of return when NINRev=0 below
memset(&NinCfg, 0, sizeof(NIN_CFG));
NinCfg.Magicbytes = 0x01070CF6;
NinCfg.MemCardBlocks = 0x2;//251 blocks
//check version
u32 NIN_cfg_version = NIN_CFG_VERSION;
@ -61,123 +63,95 @@ void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath
const char *dol_path = fmt(NIN_LOADER_PATH, DeviceName[i]);
if(!fsop_FileExist(dol_path))
continue;
//u8 *buffer = NULL;
u8 *buffer = NULL;
u32 filesize = 0;
const char *str = "$$Version:";
u8 *buffer = fsop_ReadFile(dol_path, &filesize);
buffer = fsop_ReadFile(dol_path, &filesize);
// if buffer is NULL then out of memory - hopefully that doesn't happen and shouldn't
for(u32 i = 0; i < filesize; i += 32)
{
if(memcmp(buffer+i, str, strlen(str)) == 0)
{
// Write buffer in NINVersion
// get nintendont version (NINVersion) from current position in nintendont boot.dol (buffer)
snprintf(NINVersion, sizeof(NINVersion), "%s", buffer+i+strlen(str));
// get revision from version and use it to get NinCfg version
NINRev = atoi(strchr(NINVersion, '.')+1);
break;
}
}
free(buffer);
break;
/*u32 filesize = 0;
u8 *buffer = fsop_ReadFile(dol_path, &filesize);
char NINversion[21];
for(u32 i = 0; i < filesize-60; ++i)
{
// Nintendont Loader..Built : %s %s..Jan 10 2014.11:21:01
if((*(vu32*)(buffer+i+2)) == 0x6e74656e && (*(vu32*)(buffer+i+6)) == 0x646f6e74
&& (*(vu32*)(buffer+i+11)) == 0x4c6f6164) //'nten' 'dont' 'Load'
{
for(int k= 30; k <50; ++k)
{
if((*(vu32*)(buffer+i+k)) == 0x4A616E20 || (*(vu32*)(buffer+i+k)) == 0x46656220 ||
(*(vu32*)(buffer+i+k)) == 0x4D617220 || (*(vu32*)(buffer+i+k)) == 0x41707220 ||
(*(vu32*)(buffer+i+k)) == 0x4D617920 || (*(vu32*)(buffer+i+k)) == 0x4A756E20 ||
(*(vu32*)(buffer+i+k)) == 0x4A756C20 || (*(vu32*)(buffer+i+k)) == 0x41756720 ||
(*(vu32*)(buffer+i+k)) == 0x53657020 || (*(vu32*)(buffer+i+k)) == 0x4F637420 ||
(*(vu32*)(buffer+i+k)) == 0x4E6F7620 || (*(vu32*)(buffer+i+k)) == 0x44656320 ) // find Month
{
for(int j = 0 ; j < 20 ; j++)
NINversion[j] = *(u8*)(buffer+i+k+j);
NINversion[11] = ' '; // replace \0 between year and time with a space.
NINversion[20] = 0;
struct tm time;
strptime(NINversion, "%b %d %Y %H:%M:%S", &time);
const time_t NINLoaderTime = mktime(&time);
const time_t v135time = 1407167999;// v1.135
if(difftime(NINLoaderTime,v135time) > 0)
NIN_cfg_version = 3;
else
NIN_cfg_version = 2;
break;
}
}
break;
}
}
free(buffer);
break;*/
}
if(NINRev == 0)
return;
if(NINRev >= 135 && NINRev < 354)
if(NINRev == 0 || NINRev < 358)
return;// nintendont not found or revision is less than 358(was 135) thus too old for wiiflow lite
/*if(NINRev >= 135 && NINRev < 354)
NIN_cfg_version = 3;
else if(NINRev >= 354 && NINRev < 358)
NIN_cfg_version = 4;
NIN_cfg_version = 4;*/
else if(NINRev >= 358 && NINRev < 368)
NIN_cfg_version = 5;
else if(NINRev >= 368 && NINRev < 424)
NIN_cfg_version = 6;
else if(NINRev >= 424 && NINRev < 431)
NIN_cfg_version = 7;
NinCfg.Version = NIN_cfg_version;
/*if(memcmp("0x474851",gameID,3)==0)
/*if(memcmp("0x474851",gameID,3)==0) // old fix for simpsons hit & run - r155 fixed this
NinCfg.MaxPads = 1;
else*/
NinCfg.MaxPads = 4;
NinCfg.VideoMode |= NIN_VID_FORCE;// always force video?
if((videomode > 3) && (videomode != 6))
{
NinCfg.Config |= NIN_CFG_FORCE_PROG;
NinCfg.VideoMode |= NIN_VID_PROG;
}
NinCfg.Config |= NIN_CFG_AUTO_BOOT;
NinDevice = DeviceHandle.PathToDriveType(game);
if(NinDevice != SD)
NinCfg.Config |= NIN_CFG_USB;
if(IsOnWiiU() == true)
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
NinCfg.VideoMode |= NIN_VID_FORCE;
if((videomode > 3) && (videomode != 6))
NinCfg.Config |= NIN_CFG_FORCE_PROG;
if(usb_hid)
NinCfg.Config |= NIN_CFG_HID;
if(NIN_Debugger)
if(NIN_Debugger && IsOnWiiU() == false) //wii only
NinCfg.Config |= NIN_CFG_OSREPORT;
if(native_ctl)
if(native_ctl && IsOnWiiU() == false) //wii only
NinCfg.Config |= NIN_CFG_NATIVE_SI;
if(deflicker)
NinCfg.VideoMode |= NIN_VID_FORCE_DF;
if(wiiu_widescreen)
if(wiiu_widescreen && IsOnWiiU() == true) //wii u vwii only
NinCfg.Config |= NIN_CFG_WIIU_WIDE;
if(widescreen)
NinCfg.Config |= NIN_CFG_FORCE_WIDE;
if(led)
NinCfg.Config |= NIN_CFG_LED;
if(tri_arcade)
NinCfg.Config |= NIN_CFG_ARCADE_MODE;
if(emuMC > 0)
if(cc_rumble)
NinCfg.Config |= NIN_CFG_BIT_CC_RUMBLE;
if(ipl)
NinCfg.Config |= NIN_CFG_SKIP_IPL;
NinCfg.MemCardBlocks = 0x2; //251 blocks
if(emuMC > 0 || IsOnWiiU() == true) //force memcardemu for wii u vwii
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
if(emuMC > 1)
{
NinCfg.Config |= NIN_CFG_MC_MULTI;
NinCfg.MemCardBlocks = 0x4;//1019 blocks (8MB)
NinCfg.MemCardBlocks = 0x4; //1019 blocks (8MB)
}
if(CheatPath != NULL && NewCheatPath != NULL && cheats)
{
@ -205,23 +179,23 @@ void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath
gprintf("Nintendont Game Path: %s, ID: %08x\n", NinCfg.GamePath, NinCfg.GameID);
}
void Nintendont_BootDisc(u8 emuMC, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker)
void Nintendont_BootDisc(u8 emuMC, bool widescreen, bool cc_rumble, bool native_ctl, bool deflicker)
{
memset(&NinCfg, 0, sizeof(NIN_CFG));
NinCfg.Magicbytes = 0x01070CF6;
FILE * location = fopen("sd:/nincfg.bin", "r");
if(location == NULL)
{
NinCfg.Config |= NIN_CFG_USB;
fclose(location);
location = NULL;
}
NinCfg.Version = NIN_CFG_VERSION;
NinCfg.Config |= NIN_CFG_AUTO_BOOT;
NinCfg.VideoMode |= NIN_VID_AUTO;
if(usb_hid)
NinCfg.Config |= NIN_CFG_HID;
if(cc_rumble)
NinCfg.Config |= NIN_CFG_BIT_CC_RUMBLE;
if(emuMC == 1)
{
NinCfg.Config |= NIN_CFG_MEMCARDEMU;
@ -245,26 +219,32 @@ void Nintendont_BootDisc(u8 emuMC, bool widescreen, bool usb_hid, bool native_ct
void Nintendont_WriteOptions()
{
/* Newer Nintendont versions */
gprintf("Writing Arguments\n");
AddBootArgument((char*)&NinCfg, sizeof(NIN_CFG));
}
/*void Nintendont_WriteOptions()
{
// Newer Nintendont versions
if(NinArgsboot == true)
{
gprintf("Writing Arguments\n");
AddBootArgument((char*)&NinCfg, sizeof(NIN_CFG));
return;
}
/* general loader */
// general loader
if(DeviceHandle.SD_Inserted())
{
gprintf("Writing Nintendont CFG: sd:/%s\n", NIN_CFG_PATH);
fsop_WriteFile(fmt("sd:/%s", NIN_CFG_PATH), &NinCfg, sizeof(NIN_CFG));
}
/* for kernel */
// for kernel
if(NinDevice != SD)
{
gprintf("Writing Nintendont USB Kernel CFG: %s:/%s\n", DeviceName[NinDevice], NIN_CFG_PATH);
fsop_WriteFile(fmt("%s:/%s", DeviceName[NinDevice], NIN_CFG_PATH), &NinCfg, sizeof(NIN_CFG));
}
}
}*/
bool Nintendont_Installed()
{
@ -291,7 +271,8 @@ bool Nintendont_GetLoader()
{
gprintf("Nintendont loaded: %s\n", dol_path);
AddBootArgument(dol_path);
//search for argsboot
break;
//search for argsboot not needed
u32 size;
const char *dol_ptr = GetHomebrew(&size);
for(u32 i = 0; i < size; i += 0x10)
@ -483,7 +464,7 @@ void GC_SetVideoMode(u8 videomode, u8 loader)
syssram *sram;
sram = __SYS_LockSram();
GXRModeObj *vmode = VIDEO_GetPreferredMode(0);
int vmode_reg = 0;
int vmode_reg = 0;// VI_NTSC
if((VIDEO_HaveComponentCable() && (CONF_GetProgressiveScan() > 0)) || ((videomode > 3) && (videomode != 6)))
sram->flags |= 0x80; //set progressive flag
@ -492,7 +473,7 @@ void GC_SetVideoMode(u8 videomode, u8 loader)
if(videomode == 1 || videomode == 3 || videomode == 5 || videomode == 6 || videomode == 7)
{
vmode_reg = 1;
vmode_reg = 1;// VI_PAL
sram->flags |= 0x01; // Set bit 0 to set the video mode to PAL
sram->ntd |= 0x40; //set pal60 flag
}
@ -501,52 +482,52 @@ void GC_SetVideoMode(u8 videomode, u8 loader)
sram->flags &= 0xFE; // Clear bit 0 to set the video mode to NTSC
sram->ntd &= 0xBF; //clear pal60 flag
}
if(videomode == 1)
/* should the sram pal60 flag be cleared for PAL50? */
if(videomode == 1)// PAL50
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_PAL50;
vmode = &TVPal528IntDf;
}
else if(videomode == 2)
else if(videomode == 2)// NTSC
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_NTSC;
vmode = &TVNtsc480IntDf;
}
else if(videomode == 3)
else if(videomode == 3)// PAL60
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_PAL60;
vmode = &TVEurgb60Hz480IntDf;
vmode_reg = 5;
vmode_reg = 5;// VI_EURGB60
}
else if(videomode == 4)
else if(videomode == 4)// NTSC 480P
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_NTSC;
vmode = &TVNtsc480IntDf;// shouldn't this be vmode = &TVNtsc480Prog
vmode = &TVNtsc480Prog;
}
else if(videomode == 5)
else if(videomode == 5)// PAL 480P
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_PAL60;
vmode = &TVEurgb60Hz480IntDf;
vmode = &TVEurgb60Hz480Prog;
vmode_reg = 5;
}
else if(videomode == 6)
else if(videomode == 6)// MPAL
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_MPAL;
vmode = &TVEurgb60Hz480IntDf;
vmode_reg = 5;// not sure about this
vmode_reg = 2;// VI_MPAL
}
else if(videomode == 7)
else if(videomode == 7)// MPAL Prog
{
if(loader == 1)
NinCfg.VideoMode |= NIN_VID_FORCE_MPAL;
vmode = &TVEurgb60Hz480IntDf;
vmode_reg = 5;
vmode = &TVEurgb60Hz480Prog;
vmode_reg = 2;
}
__SYS_UnlockSram(1); // 1 -> write changes
@ -560,14 +541,14 @@ void GC_SetVideoMode(u8 videomode, u8 loader)
if(vmode != 0)
VIDEO_Configure(vmode);
/* Setup video */
/* Setup video
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(vmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
else while(VIDEO_GetNextField())
VIDEO_WaitVSync();
VIDEO_WaitVSync(); */
/* Set black and flush */
VIDEO_SetBlack(TRUE);

View File

@ -27,10 +27,10 @@
bool Nintendont_Installed();
bool Nintendont_GetLoader();
void Nintendont_BootDisc(u8 emuMC, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker);
void Nintendont_BootDisc(u8 emuMC, bool widescreen, bool cc_rumble, bool native_ctl, bool deflicker);
void Nintendont_SetOptions(const char *game, const char *gameID, char *CheatPath, char *NewCheatPath, const char *partition,
bool cheats, u8 emuMC, u8 videomode, bool widescreen, bool usb_hid, bool native_ctl, bool deflicker,
bool wiiu_widescreen, bool NIN_Debugger, bool tri_arcade);
bool cheats, u8 emuMC, u8 videomode, bool widescreen, bool led, bool native_ctl, bool deflicker, bool wiiu_widescreen,
bool NIN_Debugger, bool tri_arcade, bool cc_rumble, bool ipl);
void Nintendont_WriteOptions();
// Devolution

View File

@ -2,17 +2,18 @@
#ifndef __COMMON_CONFIG_H__
#define __COMMON_CONFIG_H__
#define NIN_CFG_VERSION 0x00000007
#define NIN_CFG_VERSION 0x00000008
#define NIN_CFG_MAXPAD 4
#define MEM_CARD_MAX (5)
#define MEM_CARD_CODE(x) (1<<(x+2))
#define MEM_CARD_SIZE(x) (1<<(x+19))
#define MEM_CARD_BLOCKS(x) ((1<<(x+6))-5)
// nin_cfg version does not match nintendont version
typedef struct NIN_CFG
{
unsigned int Magicbytes; // 0x01070CF6
unsigned int Version;
unsigned int Version; // v4 since v3.354, v5 since v3.358, v6 since v3.368, v7 since v4.424, v8 since v4.431
unsigned int Config;
unsigned int VideoMode;
unsigned int Language;
@ -23,6 +24,8 @@ typedef struct NIN_CFG
unsigned int MemCardBlocks;
} NIN_CFG;
// NIN_CFG_REMLIMIT is disc read speed limt enabled by default. It keeps loading speed at GC speed.
// disabling it may speed up loading times but cause other game issues.
enum ninconfig
{
NIN_CFG_CHEATS = (1<<0),
@ -33,15 +36,18 @@ enum ninconfig
NIN_CFG_FORCE_WIDE = (1<<5),
NIN_CFG_FORCE_PROG = (1<<6),
NIN_CFG_AUTO_BOOT = (1<<7),
NIN_CFG_HID = (1<<8),
NIN_CFG_HID = (1<<8), // Unused since v3.304
NIN_CFG_REMLIMIT = (1<<8), // v3.358 cfg version 5
NIN_CFG_OSREPORT = (1<<9),
NIN_CFG_USB = (1<<10),
NIN_CFG_LED = (1<<11),
NIN_CFG_LOG = (1<<12),
NIN_CFG_MC_MULTI = (1<<13),
NIN_CFG_NATIVE_SI = (1<<14),
NIN_CFG_WIIU_WIDE = (1<<15),
NIN_CFG_ARCADE_MODE = (1<<16),
NIN_CFG_USB = (1<<10), // r40
NIN_CFG_LED = (1<<11), // v1.45
NIN_CFG_LOG = (1<<12), // v1.109
NIN_CFG_MC_MULTI = (1<<13), // v1.135
NIN_CFG_NATIVE_SI = (1<<14), // v2.189 - only for Wii
NIN_CFG_WIIU_WIDE = (1<<15), // v2.258 - only for Wii U
NIN_CFG_ARCADE_MODE = (1<<16), // v4.424 cfg version 7
NIN_CFG_BIT_CC_RUMBLE = (1<<17), // v4.431 cfg version 8
NIN_CFG_SKIP_IPL = (1<<18), // v4.435 cfg version 8
};
enum ninvideomode
@ -60,7 +66,8 @@ enum ninvideomode
NIN_VID_FORCE_MASK = NIN_VID_FORCE_PAL50|NIN_VID_FORCE_PAL60|NIN_VID_FORCE_NTSC|NIN_VID_FORCE_MPAL,
NIN_VID_PROG = (1<<4), //important to prevent blackscreens
NIN_VID_PROG = (1<<4),
NIN_VID_PATCH_PAL50 = (1<<5), // v3.368 cfg version 6
};
enum ninlanguage
@ -78,12 +85,5 @@ enum ninlanguage
NIN_LAN_AUTO = -1,
};
enum VideoModes
{
GCVideoModeNone = 0,
GCVideoModePAL60 = 1,
GCVideoModeNTSC = 2,
GCVideoModePROG = 3,
};
#endif

View File

@ -482,8 +482,8 @@ private:
s16 m_gameSettingsLblWidescreen;
s16 m_gameSettingsBtnWidescreen;
s16 m_gameSettingsLblUSB_HID;
s16 m_gameSettingsBtnUSB_HID;
s16 m_gameSettingsLblCC_Rumble;
s16 m_gameSettingsBtnCC_Rumble;
s16 m_gameSettingsLblNATIVE_CTL;
s16 m_gameSettingsBtnNATIVE_CTL;
@ -494,6 +494,9 @@ private:
s16 m_gameSettingsLblArcade;
s16 m_gameSettingsBtnArcade;
s16 m_gameSettingsLblSkip_IPL;
s16 m_gameSettingsBtnSkip_IPL;
s16 m_gameSettingsLblGCLoader;
s16 m_gameSettingsLblGCLoader_Val;
s16 m_gameSettingsBtnGCLoader_P;

View File

@ -112,14 +112,16 @@ void CMenu::_hideGameSettingsPg(bool instant)
m_btnMgr.hide(m_gameSettingsLblGCLoader_Val, instant);
m_btnMgr.hide(m_gameSettingsBtnGCLoader_P, instant);
m_btnMgr.hide(m_gameSettingsBtnGCLoader_M, instant);
m_btnMgr.hide(m_gameSettingsLblUSB_HID, instant);
m_btnMgr.hide(m_gameSettingsBtnUSB_HID, instant);
m_btnMgr.hide(m_gameSettingsLblCC_Rumble, instant);
m_btnMgr.hide(m_gameSettingsBtnCC_Rumble, instant);
m_btnMgr.hide(m_gameSettingsLblNATIVE_CTL, instant);
m_btnMgr.hide(m_gameSettingsBtnNATIVE_CTL, instant);
m_btnMgr.hide(m_gameSettingsLblDeflicker, instant);
m_btnMgr.hide(m_gameSettingsBtnDeflicker, instant);
m_btnMgr.hide(m_gameSettingsLblArcade, instant);
m_btnMgr.hide(m_gameSettingsBtnArcade, instant);
m_btnMgr.hide(m_gameSettingsLblSkip_IPL, instant);
m_btnMgr.hide(m_gameSettingsBtnSkip_IPL, instant);
// Channels only
m_btnMgr.hide(m_gameSettingsLblApploader, instant);
m_btnMgr.hide(m_gameSettingsBtnApploader, instant);
@ -285,14 +287,18 @@ void CMenu::_showGameSettings(void)
{
if(GameHdr->type == TYPE_GC_GAME)
{
m_btnMgr.show(m_gameSettingsLblUSB_HID);
m_btnMgr.show(m_gameSettingsBtnUSB_HID);
m_btnMgr.show(m_gameSettingsLblCC_Rumble);
m_btnMgr.show(m_gameSettingsBtnCC_Rumble);
m_btnMgr.show(m_gameSettingsLblNATIVE_CTL);
m_btnMgr.show(m_gameSettingsBtnNATIVE_CTL);
m_btnMgr.show(m_gameSettingsBtnArcade);
m_btnMgr.show(m_gameSettingsLblArcade);
m_btnMgr.show(m_gameSettingsBtnSkip_IPL);
m_btnMgr.show(m_gameSettingsLblSkip_IPL);
}
else
{
@ -349,10 +355,11 @@ void CMenu::_showGameSettings(void)
m_btnMgr.setText(m_gameSettingsLblWidescreen, _t("cfgg36", L"Widescreen Patch"));
m_btnMgr.setText(m_gameSettingsBtnWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0)));
m_btnMgr.setText(m_gameSettingsBtnDevoMemcardEmu, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 2)));
m_btnMgr.setText(m_gameSettingsBtnUSB_HID, _optBoolToString(m_gcfg2.getOptBool(id, "usb_hid", 2)));
m_btnMgr.setText(m_gameSettingsBtnCC_Rumble, _optBoolToString(m_gcfg2.getOptBool(id, "cc_rumble", 2)));
m_btnMgr.setText(m_gameSettingsBtnNATIVE_CTL, _optBoolToString(m_gcfg2.getOptBool(id, "native_ctl", 2)));
m_btnMgr.setText(m_gameSettingsBtnDeflicker, _optBoolToString(m_gcfg2.getOptBool(id, "Deflicker", 0)));
m_btnMgr.setText(m_gameSettingsBtnDeflicker, _optBoolToString(m_gcfg2.getOptBool(id, "deflicker", 0)));
m_btnMgr.setText(m_gameSettingsBtnArcade, _optBoolToString(m_gcfg2.getOptBool(id, "triforce_arcade", 0)));
m_btnMgr.setText(m_gameSettingsBtnSkip_IPL, _optBoolToString(m_gcfg2.getOptBool(id, "skip_ipl", 0)));
i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u);
m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_GCvideoModes[i].id, CMenu::_GCvideoModes[i].text));
@ -362,7 +369,7 @@ void CMenu::_showGameSettings(void)
if(GCLoader == NINTENDONT)
{
m_btnMgr.setText(m_gameSettingsLblEmuMemCard, _t("cfgg47", L"Emulated MemCard"));
//m_btnMgr.setText(m_gameSettingsLblEmuMemCard, _t("cfgg47", L"Emulated MemCard"));
i = min((u32)m_gcfg2.getInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
m_btnMgr.setText(m_gameSettingsLblEmuMemCard_Val, _t(CMenu::_NinEmuCard[i].id, CMenu::_NinEmuCard[i].text));
if(IsOnWiiU())
@ -616,12 +623,12 @@ void CMenu::_gameSettings(void)
}
else if(m_btnMgr.selected(m_gameSettingsBtnDeflicker))
{
m_gcfg2.setBool(id, "Deflicker", !m_gcfg2.getBool(id, "Deflicker", 0));
m_gcfg2.setBool(id, "deflicker", !m_gcfg2.getBool(id, "deflicker", 0));
_showGameSettings();
}
else if(m_btnMgr.selected(m_gameSettingsBtnUSB_HID))
else if(m_btnMgr.selected(m_gameSettingsBtnCC_Rumble))
{
m_gcfg2.setOptBool(id, "usb_hid", loopNum(m_gcfg2.getOptBool(id, "usb_hid") + 1, 3));
m_gcfg2.setOptBool(id, "cc_rumble", loopNum(m_gcfg2.getOptBool(id, "cc_rumble") + 1, 3));
_showGameSettings();
}
else if(m_btnMgr.selected(m_gameSettingsBtnArcade))
@ -629,6 +636,11 @@ void CMenu::_gameSettings(void)
m_gcfg2.setBool(id, "triforce_arcade", !m_gcfg2.getBool(id, "triforce_arcade", 0));
_showGameSettings();
}
else if(m_btnMgr.selected(m_gameSettingsBtnSkip_IPL))
{
m_gcfg2.setBool(id, "skip_ipl", !m_gcfg2.getBool(id, "skip_ipl", 0));
_showGameSettings();
}
else if(m_btnMgr.selected(m_gameSettingsBtnPrivateServer))
{
m_gcfg2.setBool(id, "private_server", !m_gcfg2.getBool(id, "private_server", 0));
@ -773,8 +785,11 @@ void CMenu::_initGameSettingsMenu()
m_gameSettingsBtnLaunchNK = _addButton("GAME_SETTINGS/LAUNCHNEEK_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
//GC Nintendont Page 4
m_gameSettingsLblUSB_HID = _addLabel("GAME_SETTINGS/USB_HID", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnUSB_HID = _addButton("GAME_SETTINGS/USB_HID_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
//m_gameSettingsLblUSB_HID = _addLabel("GAME_SETTINGS/USB_HID", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
//m_gameSettingsBtnUSB_HID = _addButton("GAME_SETTINGS/USB_HID_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
m_gameSettingsLblCC_Rumble = _addLabel("GAME_SETTINGS/CC_RUMBLE", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnCC_Rumble = _addButton("GAME_SETTINGS/CC_RUMBLE_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
m_gameSettingsLblNATIVE_CTL = _addLabel("GAME_SETTINGS/NATIVE_CTL", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnNATIVE_CTL = _addButton("GAME_SETTINGS/NATIVE_CTL_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
@ -782,6 +797,9 @@ void CMenu::_initGameSettingsMenu()
m_gameSettingsLblArcade = _addLabel("GAME_SETTINGS/ARCADE", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnArcade = _addButton("GAME_SETTINGS/ARCADE_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
m_gameSettingsLblSkip_IPL = _addLabel("GAME_SETTINGS/SKIP_IPL", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnSkip_IPL = _addButton("GAME_SETTINGS/SKIP_IPL_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
//Page 5
m_gameSettingsLblLED = _addLabel("GAME_SETTINGS/LED", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnLED = _addButton("GAME_SETTINGS/LED_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
@ -854,8 +872,8 @@ void CMenu::_initGameSettingsMenu()
_setHideAnim(m_gameSettingsLblLED, "GAME_SETTINGS/LED", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnLED, "GAME_SETTINGS/LED_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblUSB_HID, "GAME_SETTINGS/USB_HID", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnUSB_HID, "GAME_SETTINGS/USB_HID_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblCC_Rumble, "GAME_SETTINGS/CC_RUMBLE", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnCC_Rumble, "GAME_SETTINGS/CC_RUMBLE_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblNATIVE_CTL, "GAME_SETTINGS/NATIVE_CTL", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnNATIVE_CTL, "GAME_SETTINGS/NATIVE_CTL_BTN", -50, 0, 1.f, 0.f);
@ -877,6 +895,9 @@ void CMenu::_initGameSettingsMenu()
_setHideAnim(m_gameSettingsLblArcade, "GAME_SETTINGS/ARCADE", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnArcade, "GAME_SETTINGS/ARCADE_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblSkip_IPL, "GAME_SETTINGS/SKIP_IPL", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnSkip_IPL, "GAME_SETTINGS/SKIP_IPL_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblGCLoader, "GAME_SETTINGS/GC_LOADER", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsLblGCLoader_Val, "GAME_SETTINGS/GC_LOADER_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsBtnGCLoader_P, "GAME_SETTINGS/GC_LOADER_PLUS", -50, 0, 1.f, 0.f);
@ -943,8 +964,9 @@ void CMenu::_textGameSettings(void)
m_btnMgr.setText(m_gameSettingsLblAspectRatio, _t("cfgg27", L"Aspect Ratio"));
m_btnMgr.setText(m_gameSettingsLblApploader, _t("cfgg37", L"Boot Apploader"));
m_btnMgr.setText(m_gameSettingsLblEmuMemCard, _t("cfgg47", L"Emulated MemCard"));
m_btnMgr.setText(m_gameSettingsLblUSB_HID, _t("cfgg42", L"USB-HID Controller"));
m_btnMgr.setText(m_gameSettingsLblCC_Rumble, _t("cfgg52", L"Wiimote CC Rumble"));
m_btnMgr.setText(m_gameSettingsLblNATIVE_CTL, _t("cfgg43", L"Native Control"));
m_btnMgr.setText(m_gameSettingsLblSkip_IPL, _t("cfgg53", L"Skip IPL BIOS"));
m_btnMgr.setText(m_gameSettingsLblArcade, _t("cfgg48", L"Triforce Arcade Mode"));
m_btnMgr.setText(m_gameSettingsLblEmulation, _t("cfgg24", L"NAND Emulation"));

View File

@ -1030,12 +1030,12 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
if(has_enabled_providers() && _initNetwork() == 0)
add_game_to_card(id);
u8 GClanguage = min((u32)m_gcfg2.getInt(id, "gc_language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
u8 GClanguage = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
GClanguage = (GClanguage == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "game_language", 0), ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1u) : GClanguage-1;
if(id[3] == 'E' || id[3] == 'J')
GClanguage = 1; //=english
u8 videoMode = min((u32)m_gcfg2.getInt(id, "gc_video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u);
u8 videoMode = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u);
videoMode = (videoMode == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalGCvideoModes) - 1u) : videoMode-1;
if(disc || videoMode == 0)
{
@ -1056,16 +1056,27 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
}
else if(loader == NINTENDONT)
{
u8 emuMC = min((u32)m_gcfg2.getInt(id, "emu_memcard", m_cfg.getInt(GC_DOMAIN, "emu_memcard", 2)), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
emuMC = (emuMC == 0) ? m_cfg.getInt(GC_DOMAIN, "emu_memcard", 2) : emuMC-1;
bool usb_hid = m_gcfg2.testOptBool(id, "usb_hid", m_cfg.getBool(GC_DOMAIN, "usb_hid", false));
u8 emuMC = min((u32)m_gcfg2.getInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
emuMC = (emuMC == 0) ? m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1) : emuMC - 1;
// these 2 settings have global defaults in wfl main config
bool cc_rumble = m_gcfg2.testOptBool(id, "cc_rumble", m_cfg.getBool(GC_DOMAIN, "cc_rumble", false));
bool native_ctl = m_gcfg2.testOptBool(id, "native_ctl", m_cfg.getBool(GC_DOMAIN, "native_ctl", false));
bool deflicker = m_gcfg2.getBool(id, "Deflicker", false);
bool deflicker = m_gcfg2.getBool(id, "deflicker", false);
bool tri_arcade = m_gcfg2.getBool(id, "triforce_arcade", false);
bool activity_led = m_gcfg2.getBool(id, "led", false);
bool ipl = m_gcfg2.getBool(id, "skip_ipl", false);
if(IsOnWiiU())
{
native_ctl = false;
activity_led = false;
}
if(disc == true)
{
//emuMC = m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1);
Nintendont_BootDisc(emuMC, widescreen, usb_hid, native_ctl, deflicker);
/*funny, in order for these settings to work they would have to be entered in gameconfig2 manually under the gameID
or the game will have to already be on USB or SD but then why launch via disc?*/
Nintendont_BootDisc(emuMC, widescreen, cc_rumble, native_ctl, deflicker);
}
else
{
@ -1089,7 +1100,8 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
snprintf(NewCheatPath, sizeof(NewCheatPath), "%s%s.gct",GC_Path,id);
Nintendont_SetOptions(path, id, CheatPath, NewCheatPath, DeviceName[currentPartition],
cheats, emuMC, videoMode, widescreen, usb_hid, native_ctl, deflicker, wiiu_widescreen, NIN_Debugger, tri_arcade);
cheats, emuMC, videoMode, widescreen, activity_led, native_ctl, deflicker, wiiu_widescreen,
NIN_Debugger, tri_arcade, cc_rumble, ipl);
}
}
/* configs no longer needed */

View File

@ -123,6 +123,8 @@ cfgg48=EmuNAND not on USB1!
cfgg49=Neek2o Not Found!
cfgg50=No save to extract!
cfgg51=No save to flash to real NAND!
cfgg52=Wiimote CC Rumble
cfgg53=Skip IPL BIOS
cfgg4=Patch country strings
cfgg5=Ocarina
cfgg6=