mirror of
https://github.com/nitraiolo/CfgUSBLoader.git
synced 2025-01-09 09:49:26 +01:00
Compilation - code cleanup to remove all compilation warnings
GC - updated nintendont config support to version 0x00000003 Internals - added Wii / vWii identification capability GC - fixed wide screen support in vWii for nintendont GC - added nintendont memory card sizing GC - added nintnedont shared memory card support Internals - added "mem_card_emu" and "mem_card_size" keys for games configs in "settings.cfg" Build - added revision number to version as suffix ".<rev>" (70r78.8)
This commit is contained in:
parent
a7a54c7439
commit
947c835269
@ -1242,6 +1242,9 @@ msgstr "Emu NAND:"
|
|||||||
msgid "NMM:"
|
msgid "NMM:"
|
||||||
msgstr "NMM:"
|
msgstr "NMM:"
|
||||||
|
|
||||||
|
msgid "MC size:"
|
||||||
|
msgstr "Dimensione MC:"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"NOTE: CIOS249 before rev10:\n"
|
"NOTE: CIOS249 before rev10:\n"
|
||||||
"Loading games from SDHC not supported!"
|
"Loading games from SDHC not supported!"
|
||||||
@ -1417,6 +1420,9 @@ msgstr "Corse Fuoristrada"
|
|||||||
msgid "On"
|
msgid "On"
|
||||||
msgstr "Attivato"
|
msgstr "Attivato"
|
||||||
|
|
||||||
|
msgid "Shared"
|
||||||
|
msgstr "Condiviso"
|
||||||
|
|
||||||
msgid "Online"
|
msgid "Online"
|
||||||
msgstr "Online"
|
msgstr "Online"
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -15,7 +15,7 @@ include $(DEVKITPPC)/wii_rules
|
|||||||
# SOURCES is a list of directories containing source code
|
# SOURCES is a list of directories containing source code
|
||||||
# INCLUDES is a list of directories containing extra header files
|
# INCLUDES is a list of directories containing extra header files
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
VERSION := 70r78
|
VERSION := 70r78.8
|
||||||
RELEASE := release
|
RELEASE := release
|
||||||
# to override RELEASE use: make announce RELEASE=beta
|
# to override RELEASE use: make announce RELEASE=beta
|
||||||
ifeq ($(findstring compat,$(VERSION)),compat)
|
ifeq ($(findstring compat,$(VERSION)),compat)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
//#include "NintendontVersion.h"
|
//#include "NintendontVersion.h"
|
||||||
//#include "Metadata.h"
|
//#include "Metadata.h"
|
||||||
|
|
||||||
#define NIN_CFG_VERSION 0x00000002
|
#define NIN_CFG_VERSION 0x00000003
|
||||||
|
|
||||||
#define NIN_CFG_MAXPAD 4
|
#define NIN_CFG_MAXPAD 4
|
||||||
|
|
||||||
@ -20,36 +20,88 @@ typedef struct NIN_CFG
|
|||||||
char CheatPath[255];
|
char CheatPath[255];
|
||||||
unsigned int MaxPads;
|
unsigned int MaxPads;
|
||||||
unsigned int GameID;
|
unsigned int GameID;
|
||||||
|
unsigned int MemCardBlocks;
|
||||||
} NIN_CFG;
|
} NIN_CFG;
|
||||||
|
|
||||||
|
enum ninconfigbitpos
|
||||||
|
{
|
||||||
|
NIN_CFG_BIT_CHEATS = (0),
|
||||||
|
NIN_CFG_BIT_DEBUGGER = (1), // Only for Wii Version
|
||||||
|
NIN_CFG_BIT_DEBUGWAIT = (2), // Only for Wii Version
|
||||||
|
NIN_CFG_BIT_MEMCARDEMU = (3),
|
||||||
|
NIN_CFG_BIT_CHEAT_PATH = (4),
|
||||||
|
NIN_CFG_BIT_FORCE_WIDE = (5),
|
||||||
|
NIN_CFG_BIT_FORCE_PROG = (6),
|
||||||
|
NIN_CFG_BIT_AUTO_BOOT = (7),
|
||||||
|
NIN_CFG_BIT_HID = (8),
|
||||||
|
NIN_CFG_BIT_OSREPORT = (9),
|
||||||
|
NIN_CFG_BIT_USB = (10),
|
||||||
|
NIN_CFG_BIT_LED = (11),
|
||||||
|
NIN_CFG_BIT_LOG = (12),
|
||||||
|
NIN_CFG_BIT_LAST = (13),
|
||||||
|
|
||||||
|
NIN_CFG_BIT_MC_MULTI = (13),
|
||||||
|
NIN_CFG_BIT_NATIVE_SI = (14),
|
||||||
|
NIN_CFG_BIT_WIIU_WIDE = (15),
|
||||||
|
};
|
||||||
|
|
||||||
enum ninconfig
|
enum ninconfig
|
||||||
{
|
{
|
||||||
NIN_CFG_CHEATS = (1<<0),
|
NIN_CFG_CHEATS = (1<<NIN_CFG_BIT_CHEATS),
|
||||||
NIN_CFG_DEBUGGER = (1<<1), // Only for Wii Version
|
NIN_CFG_DEBUGGER = (1<<NIN_CFG_BIT_DEBUGGER), // Only for Wii Version
|
||||||
NIN_CFG_DEBUGWAIT = (1<<2), // Only for Wii Version
|
NIN_CFG_DEBUGWAIT = (1<<NIN_CFG_BIT_DEBUGWAIT), // Only for Wii Version
|
||||||
NIN_CFG_MEMCARDEMU = (1<<3),
|
NIN_CFG_MEMCARDEMU = (1<<NIN_CFG_BIT_MEMCARDEMU),
|
||||||
NIN_CFG_CHEAT_PATH = (1<<4),
|
NIN_CFG_CHEAT_PATH = (1<<NIN_CFG_BIT_CHEAT_PATH),
|
||||||
NIN_CFG_FORCE_WIDE = (1<<5),
|
NIN_CFG_FORCE_WIDE = (1<<NIN_CFG_BIT_FORCE_WIDE),
|
||||||
NIN_CFG_FORCE_PROG = (1<<6),
|
NIN_CFG_FORCE_PROG = (1<<NIN_CFG_BIT_FORCE_PROG),
|
||||||
NIN_CFG_AUTO_BOOT = (1<<7),
|
NIN_CFG_AUTO_BOOT = (1<<NIN_CFG_BIT_AUTO_BOOT),
|
||||||
NIN_CFG_HID = (1<<8),
|
NIN_CFG_HID = (1<<NIN_CFG_BIT_HID),
|
||||||
NIN_CFG_OSREPORT = (1<<9),
|
NIN_CFG_OSREPORT = (1<<NIN_CFG_BIT_OSREPORT),
|
||||||
NIN_CFG_USB = (1<<10),
|
NIN_CFG_USB = (1<<NIN_CFG_BIT_USB),
|
||||||
NIN_CFG_LED = (1<<11),
|
NIN_CFG_LED = (1<<NIN_CFG_BIT_LED),
|
||||||
|
NIN_CFG_LOG = (1<<NIN_CFG_BIT_LOG),
|
||||||
|
NIN_CFG_MC_MULTI = (1<<NIN_CFG_BIT_MC_MULTI),
|
||||||
|
NIN_CFG_NATIVE_SI = (1<<NIN_CFG_BIT_NATIVE_SI),
|
||||||
|
NIN_CFG_WIIU_WIDE = (1<<NIN_CFG_BIT_WIIU_WIDE),
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ninextrasettings
|
||||||
|
{
|
||||||
|
NIN_SETTINGS_MAX_PADS = NIN_CFG_BIT_LAST,
|
||||||
|
NIN_SETTINGS_LANGUAGE,
|
||||||
|
NIN_SETTINGS_VIDEO,
|
||||||
|
NIN_SETTINGS_VIDEOMODE,
|
||||||
|
NIN_SETTINGS_MEMCARDBLOCKS,
|
||||||
|
NIN_SETTINGS_MEMCARDMULTI,
|
||||||
|
NIN_SETTINGS_NATIVE_SI,
|
||||||
|
NIN_SETTINGS_LAST,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ninvideomodeindex
|
||||||
|
{
|
||||||
|
NIN_VID_INDEX_AUTO = (0),
|
||||||
|
NIN_VID_INDEX_FORCE = (1),
|
||||||
|
NIN_VID_INDEX_NONE = (2),
|
||||||
|
NIN_VID_INDEX_FORCE_DF = (4),
|
||||||
|
NIN_VID_INDEX_FORCE_PAL50 = (0),
|
||||||
|
NIN_VID_INDEX_FORCE_PAL60 = (1),
|
||||||
|
NIN_VID_INDEX_FORCE_NTSC = (2),
|
||||||
|
NIN_VID_INDEX_FORCE_MPAL = (3),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ninvideomode
|
enum ninvideomode
|
||||||
{
|
{
|
||||||
NIN_VID_AUTO = (0<<16),
|
NIN_VID_AUTO = (NIN_VID_INDEX_AUTO <<16),
|
||||||
NIN_VID_FORCE = (1<<16),
|
NIN_VID_FORCE = (NIN_VID_INDEX_FORCE <<16),
|
||||||
NIN_VID_NONE = (2<<16),
|
NIN_VID_NONE = (NIN_VID_INDEX_NONE <<16),
|
||||||
|
NIN_VID_FORCE_DF = (NIN_VID_INDEX_FORCE_DF<<16),
|
||||||
|
|
||||||
NIN_VID_MASK = NIN_VID_AUTO|NIN_VID_FORCE|NIN_VID_NONE,
|
NIN_VID_MASK = NIN_VID_AUTO|NIN_VID_FORCE|NIN_VID_NONE|NIN_VID_FORCE_DF,
|
||||||
|
|
||||||
NIN_VID_FORCE_PAL50 = (1<<0),
|
NIN_VID_FORCE_PAL50 = (1<<NIN_VID_INDEX_FORCE_PAL50),
|
||||||
NIN_VID_FORCE_PAL60 = (1<<1),
|
NIN_VID_FORCE_PAL60 = (1<<NIN_VID_INDEX_FORCE_PAL60),
|
||||||
NIN_VID_FORCE_NTSC = (1<<2),
|
NIN_VID_FORCE_NTSC = (1<<NIN_VID_INDEX_FORCE_NTSC),
|
||||||
NIN_VID_FORCE_MPAL = (1<<3),
|
NIN_VID_FORCE_MPAL = (1<<NIN_VID_INDEX_FORCE_MPAL),
|
||||||
|
|
||||||
NIN_VID_FORCE_MASK = NIN_VID_FORCE_PAL50|NIN_VID_FORCE_PAL60|NIN_VID_FORCE_NTSC|NIN_VID_FORCE_MPAL,
|
NIN_VID_FORCE_MASK = NIN_VID_FORCE_PAL50|NIN_VID_FORCE_PAL60|NIN_VID_FORCE_NTSC|NIN_VID_FORCE_MPAL,
|
||||||
|
|
||||||
@ -65,6 +117,8 @@ enum ninlanguage
|
|||||||
NIN_LAN_ITALIAN = 4,
|
NIN_LAN_ITALIAN = 4,
|
||||||
NIN_LAN_DUTCH = 5,
|
NIN_LAN_DUTCH = 5,
|
||||||
|
|
||||||
|
NIN_LAN_FIRST = 0,
|
||||||
|
NIN_LAN_LAST = 6,
|
||||||
/* Auto will use English for E/P region codes and
|
/* Auto will use English for E/P region codes and
|
||||||
only other languages when these region codes are used: D/F/S/I/J */
|
only other languages when these region codes are used: D/F/S/I/J */
|
||||||
|
|
||||||
@ -79,7 +133,16 @@ enum VideoModes
|
|||||||
GCVideoModePROG = 3,
|
GCVideoModePROG = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NIN_RAW_MEMCARD_SIZE 2*1024*1024 //2MB
|
|
||||||
#define NIN_MEMCARD_BLOCKS 0x00000010 //251 Blocks
|
//Mem0059 = 0, 0x04, 0x0080000
|
||||||
|
//Mem0123 = 1, 0x08, 0x0100000
|
||||||
|
//Mem0251 = 2, 0x10, 0x0200000
|
||||||
|
//Mem0507 = 3, 0x20, 0x0400000
|
||||||
|
//Mem1019 = 4, 0x40, 0x0800000
|
||||||
|
//Mem2043 = 5, 0x80, 0x1000000
|
||||||
|
#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)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,11 +60,12 @@ const u8 es_set_ahbprot_patch[] = { 0x01 };
|
|||||||
|
|
||||||
u32 IOSPATCH_Apply() {
|
u32 IOSPATCH_Apply() {
|
||||||
u32 count = 0;
|
u32 count = 0;
|
||||||
s32 ret = 0;
|
//s32 ret = 0;
|
||||||
|
|
||||||
if (HAVE_AHBPROT) {
|
if (HAVE_AHBPROT) {
|
||||||
disable_memory_protection();
|
disable_memory_protection();
|
||||||
ret = apply_patch("es_set_ahbprot", es_set_ahbprot_pattern, sizeof(es_set_ahbprot_pattern), es_set_ahbprot_patch, sizeof(es_set_ahbprot_patch), 25);
|
//ret = apply_patch("es_set_ahbprot", es_set_ahbprot_pattern, sizeof(es_set_ahbprot_pattern), es_set_ahbprot_patch, sizeof(es_set_ahbprot_patch), 25);
|
||||||
|
apply_patch("es_set_ahbprot", es_set_ahbprot_pattern, sizeof(es_set_ahbprot_pattern), es_set_ahbprot_patch, sizeof(es_set_ahbprot_patch), 25);
|
||||||
}
|
}
|
||||||
//if (ret) {
|
//if (ret) {
|
||||||
// IOS_ReloadIOS(IOS_GetVersion());
|
// IOS_ReloadIOS(IOS_GetVersion());
|
||||||
|
19
source/cfg.c
19
source/cfg.c
@ -290,6 +290,17 @@ struct TextMap map_gc_boot[] =
|
|||||||
{ NULL, -1 }
|
{ NULL, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TextMap map_mem_card_size[] =
|
||||||
|
{
|
||||||
|
{ " 59 blocks", 0 }, // 512KB
|
||||||
|
{ " 123 blocks", 1 }, // 1MB
|
||||||
|
{ " 251 blocks", 2 }, // 2MB
|
||||||
|
{ " 507 blocks", 3 }, // 4MB
|
||||||
|
{ "1019 blocks", 4 }, // 8MB
|
||||||
|
{ "2043 blocks", 5 }, // 16MB
|
||||||
|
{ NULL, -1 }
|
||||||
|
};
|
||||||
|
|
||||||
struct playStat {
|
struct playStat {
|
||||||
char id[7];
|
char id[7];
|
||||||
s32 playCount;
|
s32 playCount;
|
||||||
@ -2272,6 +2283,8 @@ void cfg_set_game(char *name, char *val, struct Game_CFG *game_cfg)
|
|||||||
|
|
||||||
cfg_bool("vidtv", &game_cfg->vidtv);
|
cfg_bool("vidtv", &game_cfg->vidtv);
|
||||||
cfg_bool("country_patch", &game_cfg->country_patch);
|
cfg_bool("country_patch", &game_cfg->country_patch);
|
||||||
|
cfg_int_max("mem_card_emu", &game_cfg->mem_card_emu, 2);
|
||||||
|
cfg_int_max("mem_card_size", &game_cfg->mem_card_size, 5);
|
||||||
cfg_bool("clear_patches", &game_cfg->clean);
|
cfg_bool("clear_patches", &game_cfg->clean);
|
||||||
cfg_map("clear_patches", "all", &game_cfg->clean, CFG_CLEAN_ALL);
|
cfg_map("clear_patches", "all", &game_cfg->clean, CFG_CLEAN_ALL);
|
||||||
cfg_bool("fix_002", &game_cfg->fix_002);
|
cfg_bool("fix_002", &game_cfg->fix_002);
|
||||||
@ -3003,6 +3016,12 @@ bool CFG_Save_Settings(int verbose)
|
|||||||
SAVE_BOOL(ntsc_j_patch);
|
SAVE_BOOL(ntsc_j_patch);
|
||||||
SAVE_BOOL(nodisc);
|
SAVE_BOOL(nodisc);
|
||||||
SAVE_BOOL(screenshot);
|
SAVE_BOOL(screenshot);
|
||||||
|
if (game_cfg-> mem_card_emu == 2) {
|
||||||
|
SAVE_NUM(mem_card_emu);
|
||||||
|
} else {
|
||||||
|
SAVE_BOOL(mem_card_emu);
|
||||||
|
}
|
||||||
|
SAVE_NUM(mem_card_size);
|
||||||
SAVE_BOOL(country_patch);
|
SAVE_BOOL(country_patch);
|
||||||
SAVE_BOOL(fix_002);
|
SAVE_BOOL(fix_002);
|
||||||
s = ios_str(game_cfg->ios_idx);
|
s = ios_str(game_cfg->ios_idx);
|
||||||
|
@ -248,6 +248,8 @@ struct Game_CFG
|
|||||||
int nodisc;
|
int nodisc;
|
||||||
int screenshot;
|
int screenshot;
|
||||||
int country_patch;
|
int country_patch;
|
||||||
|
int mem_card_emu;
|
||||||
|
int mem_card_size;
|
||||||
int fix_002;
|
int fix_002;
|
||||||
int ios_idx;
|
int ios_idx;
|
||||||
int block_ios_reload;
|
int block_ios_reload;
|
||||||
@ -363,6 +365,7 @@ struct CFG
|
|||||||
int device;
|
int device;
|
||||||
char partition[16];
|
char partition[16];
|
||||||
int hide_header;
|
int hide_header;
|
||||||
|
int vwii_mode;
|
||||||
// simple variants:
|
// simple variants:
|
||||||
int confirm_start;
|
int confirm_start;
|
||||||
int hide_hddinfo;
|
int hide_hddinfo;
|
||||||
@ -724,6 +727,7 @@ extern struct TextMap map_ios[];
|
|||||||
extern struct TextMap map_nand_emu[];
|
extern struct TextMap map_nand_emu[];
|
||||||
extern struct TextMap map_channel_boot[];
|
extern struct TextMap map_channel_boot[];
|
||||||
extern struct TextMap map_gc_boot[];
|
extern struct TextMap map_gc_boot[];
|
||||||
|
extern struct TextMap map_mem_card_size[];
|
||||||
extern char *names_vpatch[CFG_VIDEO_PATCH_NUM];
|
extern char *names_vpatch[CFG_VIDEO_PATCH_NUM];
|
||||||
extern u8 cIOS_base[];
|
extern u8 cIOS_base[];
|
||||||
|
|
||||||
|
@ -653,15 +653,20 @@ void Nintendont_set_options(struct discHdr *header, char *CheatPath, char *NewCh
|
|||||||
|
|
||||||
ncfg.Magicbytes = 0x01070CF6;
|
ncfg.Magicbytes = 0x01070CF6;
|
||||||
ncfg.Version = NIN_CFG_VERSION;
|
ncfg.Version = NIN_CFG_VERSION;
|
||||||
|
ncfg.MemCardBlocks = CFG.game.mem_card_size;
|
||||||
|
|
||||||
if (CFG.game.ocarina)
|
if (CFG.game.ocarina)
|
||||||
ncfg.Config |= NIN_CFG_CHEATS;
|
ncfg.Config |= NIN_CFG_CHEATS;
|
||||||
if (CFG.game.country_patch) //country_patch contains NMM setting
|
if (CFG.game.mem_card_emu)
|
||||||
ncfg.Config |= NIN_CFG_MEMCARDEMU;
|
ncfg.Config |= NIN_CFG_MEMCARDEMU;
|
||||||
|
if (CFG.game.mem_card_emu == 2)
|
||||||
|
ncfg.Config |= NIN_CFG_MC_MULTI;
|
||||||
if (CFG.game.ocarina)
|
if (CFG.game.ocarina)
|
||||||
ncfg.Config |= NIN_CFG_CHEAT_PATH;
|
ncfg.Config |= NIN_CFG_CHEAT_PATH;
|
||||||
if (CFG.game.wide_screen)
|
if (CFG.game.wide_screen)
|
||||||
ncfg.Config |= NIN_CFG_FORCE_WIDE;
|
ncfg.Config |= NIN_CFG_FORCE_WIDE;
|
||||||
|
if (CFG.game.wide_screen && CFG.vwii_mode)
|
||||||
|
ncfg.Config |= NIN_CFG_WIIU_WIDE;
|
||||||
if (CFG.game.video == 4 || CFG.game.video == 5)
|
if (CFG.game.video == 4 || CFG.game.video == 5)
|
||||||
ncfg.Config |= NIN_CFG_FORCE_PROG;
|
ncfg.Config |= NIN_CFG_FORCE_PROG;
|
||||||
ncfg.Config |= NIN_CFG_AUTO_BOOT;
|
ncfg.Config |= NIN_CFG_AUTO_BOOT;
|
||||||
|
@ -457,6 +457,8 @@ struct W_GameCfg
|
|||||||
Widget *video_patch;
|
Widget *video_patch;
|
||||||
Widget *vidtv;
|
Widget *vidtv;
|
||||||
Widget *country_patch;
|
Widget *country_patch;
|
||||||
|
Widget *mem_card_emu;
|
||||||
|
Widget *mem_card_size;
|
||||||
Widget *ios_idx;
|
Widget *ios_idx;
|
||||||
Widget *block_ios_reload;
|
Widget *block_ios_reload;
|
||||||
Widget *fix_002;
|
Widget *fix_002;
|
||||||
@ -744,7 +746,8 @@ void update_gameopt_state()
|
|||||||
gameopt_inactive(cond, wgame.language, CFG_LANG_CONSOLE);
|
gameopt_inactive(cond, wgame.language, CFG_LANG_CONSOLE);
|
||||||
gameopt_inactive(cond, wgame.video, CFG_VIDEO_GAME);
|
gameopt_inactive(cond, wgame.video, CFG_VIDEO_GAME);
|
||||||
gameopt_inactive(cond, wgame.vidtv, 0);
|
gameopt_inactive(cond, wgame.vidtv, 0);
|
||||||
gameopt_inactive(cond, wgame.country_patch, 0);
|
gameopt_inactive(cond, wgame.mem_card_emu, 0);
|
||||||
|
gameopt_inactive(cond, wgame.mem_card_size, 0);
|
||||||
gameopt_inactive(cond, wgame.channel_boot, 0);
|
gameopt_inactive(cond, wgame.channel_boot, 0);
|
||||||
gameopt_inactive(cond, wgame.ocarina, 0);
|
gameopt_inactive(cond, wgame.ocarina, 0);
|
||||||
gameopt_inactive(cond, wgame.wide_screen, 0);
|
gameopt_inactive(cond, wgame.wide_screen, 0);
|
||||||
@ -974,6 +977,10 @@ void InitGameOptionsPage(Widget *pp, int bh)
|
|||||||
char *names_gc_boot[num_gc_boot];
|
char *names_gc_boot[num_gc_boot];
|
||||||
num_gc_boot = map_to_list(map_gc_boot, num_gc_boot, names_gc_boot);
|
num_gc_boot = map_to_list(map_gc_boot, num_gc_boot, names_gc_boot);
|
||||||
|
|
||||||
|
int num_mem_card_size = map_get_num(map_mem_card_size);
|
||||||
|
char *names_mem_card_size[num_mem_card_size];
|
||||||
|
num_mem_card_size = map_to_list(map_mem_card_size, num_mem_card_size, names_mem_card_size);
|
||||||
|
|
||||||
ww = wgui_add_game_opt(op, gt("Language:"), CFG_LANG_NUM, languages);
|
ww = wgui_add_game_opt(op, gt("Language:"), CFG_LANG_NUM, languages);
|
||||||
BIND_OPT(language);
|
BIND_OPT(language);
|
||||||
|
|
||||||
@ -984,8 +991,12 @@ void InitGameOptionsPage(Widget *pp, int bh)
|
|||||||
ww = wgui_add_game_opt(op, gt("Video Patch:"), 3, str_block);
|
ww = wgui_add_game_opt(op, gt("Video Patch:"), 3, str_block);
|
||||||
BIND_OPT(block_ios_reload);
|
BIND_OPT(block_ios_reload);
|
||||||
|
|
||||||
ww = wgui_add_game_opt(op, gt("NMM:"), 2, NULL);
|
char *str_nmm[3] = { gt("Off"), gt("On"), gt("Shared") };
|
||||||
BIND_OPT(country_patch);
|
ww = wgui_add_game_opt(op, gt("NMM:"), 3, str_nmm);
|
||||||
|
BIND_OPT(mem_card_emu);
|
||||||
|
|
||||||
|
ww = wgui_add_game_opt(op, gt("MC size:"), num_mem_card_size, names_mem_card_size);
|
||||||
|
BIND_OPT(mem_card_size);
|
||||||
|
|
||||||
ww = wgui_add_game_opt(op, gt("Wide Screen:"), 2, NULL);
|
ww = wgui_add_game_opt(op, gt("Wide Screen:"), 2, NULL);
|
||||||
BIND_OPT(wide_screen);
|
BIND_OPT(wide_screen);
|
||||||
@ -993,14 +1004,14 @@ void InitGameOptionsPage(Widget *pp, int bh)
|
|||||||
ww = wgui_add_game_opt(op, gt("Ocarina (cheats):"), 2, NULL);
|
ww = wgui_add_game_opt(op, gt("Ocarina (cheats):"), 2, NULL);
|
||||||
BIND_OPT(ocarina);
|
BIND_OPT(ocarina);
|
||||||
|
|
||||||
ww = wgui_add_game_opt(op, gt("Boot Method:"), num_gc_boot, names_gc_boot);
|
|
||||||
BIND_OPT(channel_boot);
|
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
|
|
||||||
op = wgui_add_page(pp, w_opt_page, pos_wh(SIZE_FULL, -bh), "opt");
|
op = wgui_add_page(pp, w_opt_page, pos_wh(SIZE_FULL, -bh), "opt");
|
||||||
op->render = NULL;
|
op->render = NULL;
|
||||||
|
|
||||||
|
ww = wgui_add_game_opt(op, gt("Boot Method:"), num_gc_boot, names_gc_boot);
|
||||||
|
BIND_OPT(channel_boot);
|
||||||
|
|
||||||
ww = wgui_add_game_opt(op, gt("PAD HOOK"), 2, NULL);
|
ww = wgui_add_game_opt(op, gt("PAD HOOK"), 2, NULL);
|
||||||
BIND_OPT(hooktype);
|
BIND_OPT(hooktype);
|
||||||
|
|
||||||
@ -1019,6 +1030,11 @@ void InitGameOptionsPage(Widget *pp, int bh)
|
|||||||
ww = wgui_add_game_opt(op, gt("Screenshot:"), 2, NULL);
|
ww = wgui_add_game_opt(op, gt("Screenshot:"), 2, NULL);
|
||||||
BIND_OPT(screenshot);
|
BIND_OPT(screenshot);
|
||||||
|
|
||||||
|
/////////////////
|
||||||
|
|
||||||
|
op = wgui_add_page(pp, w_opt_page, pos_wh(SIZE_FULL, -bh), "opt");
|
||||||
|
op->render = NULL;
|
||||||
|
|
||||||
ww = wgui_add_game_opt(op, gt("Alt Button Cfg:"), 2, NULL);
|
ww = wgui_add_game_opt(op, gt("Alt Button Cfg:"), 2, NULL);
|
||||||
BIND_OPT(alt_controller_cfg);
|
BIND_OPT(alt_controller_cfg);
|
||||||
|
|
||||||
|
@ -189,11 +189,21 @@ char *str_channel_boot[2] =
|
|||||||
char *str_gc_boot[4] =
|
char *str_gc_boot[4] =
|
||||||
{
|
{
|
||||||
gts("Default"),
|
gts("Default"),
|
||||||
gts("DIOS MIOS")
|
gts("DIOS MIOS"),
|
||||||
gts("Devolution")
|
gts("Devolution"),
|
||||||
gts("Nintendont")
|
gts("Nintendont")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char *str_mem_card_size[6] =
|
||||||
|
{
|
||||||
|
gts(" 59 blocks"),
|
||||||
|
gts(" 123 blocks"),
|
||||||
|
gts(" 251 blocks"),
|
||||||
|
gts(" 507 blocks"),
|
||||||
|
gts("1019 blocks"),
|
||||||
|
gts("2043 blocks")
|
||||||
|
};
|
||||||
|
|
||||||
int Menu_Global_Options();
|
int Menu_Global_Options();
|
||||||
int Menu_Game_Options();
|
int Menu_Game_Options();
|
||||||
void Switch_Favorites(bool enable);
|
void Switch_Favorites(bool enable);
|
||||||
@ -1818,7 +1828,7 @@ int Menu_Boot_Options(struct discHdr *header, bool disc) {
|
|||||||
int opt_saved;
|
int opt_saved;
|
||||||
//int opt_ios_reload;
|
//int opt_ios_reload;
|
||||||
int opt_language, opt_video, opt_video_patch, opt_vidtv, opt_padhook, opt_nand_emu;
|
int opt_language, opt_video, opt_video_patch, opt_vidtv, opt_padhook, opt_nand_emu;
|
||||||
int opt_country_patch, opt_anti_002, opt_ocarina, opt_wide_screen, opt_nodisc, opt_ntsc_j_patch, opt_screenshot;
|
int opt_mem_card_emu, opt_mem_card_size, opt_country_patch, opt_anti_002, opt_ocarina, opt_wide_screen, opt_nodisc, opt_ntsc_j_patch, opt_screenshot;
|
||||||
f32 size = 0.0;
|
f32 size = 0.0;
|
||||||
int redraw_cover = 0;
|
int redraw_cover = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -1865,7 +1875,7 @@ int Menu_Boot_Options(struct discHdr *header, bool disc) {
|
|||||||
|
|
||||||
struct Menu menu;
|
struct Menu menu;
|
||||||
int NUM_OPT = 19;
|
int NUM_OPT = 19;
|
||||||
if (header->magic == GC_GAME_ON_DRIVE) NUM_OPT = 16;
|
if (header->magic == GC_GAME_ON_DRIVE) NUM_OPT = 17;
|
||||||
if (header->magic == CHANNEL_MAGIC) NUM_OPT = 19;
|
if (header->magic == CHANNEL_MAGIC) NUM_OPT = 19;
|
||||||
char active[NUM_OPT];
|
char active[NUM_OPT];
|
||||||
menu_init(&menu, NUM_OPT);
|
menu_init(&menu, NUM_OPT);
|
||||||
@ -1898,6 +1908,8 @@ int Menu_Boot_Options(struct discHdr *header, bool disc) {
|
|||||||
opt_video_patch = game_cfg->video_patch;
|
opt_video_patch = game_cfg->video_patch;
|
||||||
opt_vidtv = game_cfg->vidtv;
|
opt_vidtv = game_cfg->vidtv;
|
||||||
opt_country_patch = game_cfg->country_patch;
|
opt_country_patch = game_cfg->country_patch;
|
||||||
|
opt_mem_card_emu = game_cfg->mem_card_emu;
|
||||||
|
opt_mem_card_size = game_cfg->mem_card_size;
|
||||||
opt_anti_002 = game_cfg->fix_002;
|
opt_anti_002 = game_cfg->fix_002;
|
||||||
opt_wide_screen = game_cfg->wide_screen;
|
opt_wide_screen = game_cfg->wide_screen;
|
||||||
opt_nodisc = game_cfg->nodisc;
|
opt_nodisc = game_cfg->nodisc;
|
||||||
@ -1913,6 +1925,8 @@ int Menu_Boot_Options(struct discHdr *header, bool disc) {
|
|||||||
opt_video_patch = CFG_VIDEO_PATCH_OFF;
|
opt_video_patch = CFG_VIDEO_PATCH_OFF;
|
||||||
opt_vidtv = 0;
|
opt_vidtv = 0;
|
||||||
opt_country_patch = 0;
|
opt_country_patch = 0;
|
||||||
|
opt_mem_card_emu = 0;
|
||||||
|
opt_mem_card_size = 2;
|
||||||
opt_anti_002 = 0;
|
opt_anti_002 = 0;
|
||||||
opt_ocarina = 0;
|
opt_ocarina = 0;
|
||||||
opt_ntsc_j_patch = 0;
|
opt_ntsc_j_patch = 0;
|
||||||
@ -2014,8 +2028,15 @@ int Menu_Boot_Options(struct discHdr *header, bool disc) {
|
|||||||
}
|
}
|
||||||
if (menu_window_mark(&menu))
|
if (menu_window_mark(&menu))
|
||||||
PRINT_OPT_B(gt("LED:"), opt_vidtv);
|
PRINT_OPT_B(gt("LED:"), opt_vidtv);
|
||||||
|
if (menu_window_mark(&menu)) {
|
||||||
|
if (opt_mem_card_emu == 2) {
|
||||||
|
PRINT_OPT_S(gt("NMM:"), gt("Shared"));
|
||||||
|
} else {
|
||||||
|
PRINT_OPT_B(gt("NMM:"), opt_mem_card_emu);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (menu_window_mark(&menu))
|
if (menu_window_mark(&menu))
|
||||||
PRINT_OPT_B(gt("NMM:"), opt_country_patch);
|
PRINT_OPT_S(gt("MC size::"), gt(str_mem_card_size[opt_mem_card_size]));
|
||||||
if (menu_window_mark(&menu))
|
if (menu_window_mark(&menu))
|
||||||
PRINT_OPT_B(gt("Ocarina (cheats):"), opt_ocarina);
|
PRINT_OPT_B(gt("Ocarina (cheats):"), opt_ocarina);
|
||||||
if (menu_window_mark(&menu))
|
if (menu_window_mark(&menu))
|
||||||
@ -2197,40 +2218,43 @@ int Menu_Boot_Options(struct discHdr *header, bool disc) {
|
|||||||
CHANGE(game_cfg->vidtv, 1);
|
CHANGE(game_cfg->vidtv, 1);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
CHANGE(game_cfg->country_patch, 1);
|
CHANGE(game_cfg->mem_card_emu, 2);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
CHANGE(game_cfg->ocarina, 1);
|
CHANGE(game_cfg->mem_card_size, 5);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
Menu_Cheats(header);
|
CHANGE(game_cfg->ocarina, 1);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
Menu_Cheats(header);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
Download_Cover((char*)header->id, change > 0, true);
|
Download_Cover((char*)header->id, change > 0, true);
|
||||||
Cache_Invalidate();
|
Cache_Invalidate();
|
||||||
Gui_DrawCover(header->id);
|
Gui_DrawCover(header->id);
|
||||||
Menu_PrintWait();
|
Menu_PrintWait();
|
||||||
break;
|
break;
|
||||||
case 9: // Wide Screen
|
case 10: // Wide Screen
|
||||||
CHANGE(game_cfg->wide_screen, 1);
|
CHANGE(game_cfg->wide_screen, 1);
|
||||||
break;
|
break;
|
||||||
case 10: // NoDisc+
|
case 11: // NoDisc+
|
||||||
CHANGE(game_cfg->ntsc_j_patch, 1);
|
CHANGE(game_cfg->ntsc_j_patch, 1);
|
||||||
break;
|
break;
|
||||||
case 11: // NoDisc+
|
case 12: // NoDisc+
|
||||||
CHANGE(game_cfg->nodisc, 1);
|
CHANGE(game_cfg->nodisc, 1);
|
||||||
break;
|
break;
|
||||||
case 12: // PAD HOOK)
|
case 13: // PAD HOOK)
|
||||||
CHANGE(game_cfg->hooktype, 1);
|
CHANGE(game_cfg->hooktype, 1);
|
||||||
break;
|
break;
|
||||||
case 13: // gc Boot Method
|
case 14: // gc Boot Method
|
||||||
CHANGE(game_cfg->channel_boot, 3);
|
CHANGE(game_cfg->channel_boot, 3);
|
||||||
break;
|
break;
|
||||||
case 14: // Screenshot
|
case 15: // Screenshot
|
||||||
CHANGE(game_cfg->screenshot, 1);
|
CHANGE(game_cfg->screenshot, 1);
|
||||||
break;
|
break;
|
||||||
case 15: // Alt Button Cfg
|
case 16: // Alt Button Cfg
|
||||||
CHANGE(game_cfg->alt_controller_cfg, 1);
|
CHANGE(game_cfg->alt_controller_cfg, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4863,7 +4887,7 @@ L_repaint:
|
|||||||
|
|
||||||
snprintf(devoPath, sizeof(devoPath), "%s/game.iso", header->path);
|
snprintf(devoPath, sizeof(devoPath), "%s/game.iso", header->path);
|
||||||
|
|
||||||
DEVO_SetOptions(devoPath, CFG.game.country_patch);
|
DEVO_SetOptions(devoPath, CFG.game.mem_card_emu);
|
||||||
|
|
||||||
snprintf(D_S(loaderPath), "%s/loader.bin", USBLOADER_PATH);
|
snprintf(D_S(loaderPath), "%s/loader.bin", USBLOADER_PATH);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@ -4914,10 +4938,10 @@ L_repaint:
|
|||||||
if (CFG.dml == CFG_DML_R51) {
|
if (CFG.dml == CFG_DML_R51) {
|
||||||
DML_Old_SetOptions(header->path, cheatPath, newCheatPath, CFG.game.ocarina);
|
DML_Old_SetOptions(header->path, cheatPath, newCheatPath, CFG.game.ocarina);
|
||||||
} else {
|
} else {
|
||||||
DML_New_SetOptions(header->path, cheatPath, newCheatPath, CFG.game.ocarina, false, CFG.game.country_patch, CFG.game.nodisc, CFG.game.vidtv, CFG.game.video, CFG.game.wide_screen, CFG.game.hooktype, CFG.game.block_ios_reload, CFG.game.screenshot);
|
DML_New_SetOptions(header->path, cheatPath, newCheatPath, CFG.game.ocarina, false, CFG.game.mem_card_emu, CFG.game.nodisc, CFG.game.vidtv, CFG.game.video, CFG.game.wide_screen, CFG.game.hooktype, CFG.game.block_ios_reload, CFG.game.screenshot);
|
||||||
}
|
}
|
||||||
} else if (CFG.dml >= CFG_DML_1_2) {
|
} else if (CFG.dml >= CFG_DML_1_2) {
|
||||||
DML_New_SetBootDiscOption(cheatPath, newCheatPath, CFG.game.ocarina, CFG.game.country_patch, CFG.game.vidtv, CFG.game.video);
|
DML_New_SetBootDiscOption(cheatPath, newCheatPath, CFG.game.ocarina, CFG.game.mem_card_emu, CFG.game.vidtv, CFG.game.video);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CFG.game.ntsc_j_patch)
|
if (CFG.game.ntsc_j_patch)
|
||||||
|
@ -639,7 +639,7 @@ int filter_search(struct discHdr *list, int cnt, char *search_field, bool notuse
|
|||||||
int kept_cnt = 0;
|
int kept_cnt = 0;
|
||||||
struct gameXMLinfo *g;
|
struct gameXMLinfo *g;
|
||||||
char temp_str[200];
|
char temp_str[200];
|
||||||
int search_int;
|
int search_int = 0;
|
||||||
int rec_int;
|
int rec_int;
|
||||||
bool keep_record;
|
bool keep_record;
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include "rcstub.h"
|
#include "rcstub.h"
|
||||||
|
|
||||||
|
#define HW_PROCESSOR ((vu32*)0xCD8005A0)
|
||||||
|
|
||||||
// libogc < 1.8.5 can hang if wiimote is initialized multiple times
|
// libogc < 1.8.5 can hang if wiimote is initialized multiple times
|
||||||
// (in case ios is reload 2x) so we delay wpad to later
|
// (in case ios is reload 2x) so we delay wpad to later
|
||||||
// libogc = 1.8.5 can crash if started with 2+ wiimotes
|
// libogc = 1.8.5 can crash if started with 2+ wiimotes
|
||||||
@ -89,6 +91,16 @@ int main(int argc, char **argv)
|
|||||||
mem_init();
|
mem_init();
|
||||||
Sys_Init();
|
Sys_Init();
|
||||||
|
|
||||||
|
/* Identify if we are on WII or WIIU in crediar way, Thanks! */
|
||||||
|
if((*HW_PROCESSOR >> 16) == 0xCAFE)
|
||||||
|
{
|
||||||
|
dbg_printf("vWii Mode\n");
|
||||||
|
CFG.vwii_mode = true;
|
||||||
|
} else {
|
||||||
|
dbg_printf("Legacy Wii Mode\n");
|
||||||
|
CFG.vwii_mode = false;
|
||||||
|
}
|
||||||
|
|
||||||
cfg_parsearg_early(argc, argv);
|
cfg_parsearg_early(argc, argv);
|
||||||
InitDebug();
|
InitDebug();
|
||||||
// reset in 60 seconds in case an exception (CODE DUMP) occurs
|
// reset in 60 seconds in case an exception (CODE DUMP) occurs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user