Games - added ios 252 support (to allow a dx2 installation schema like the one in the wiiflow pack)

This commit is contained in:
Nitraiolo 2015-01-17 11:43:24 +00:00
parent 00d753988d
commit cc9fe8e1ca
3 changed files with 35 additions and 25 deletions

View File

@ -149,6 +149,7 @@ struct TextMap map_ios[] =
{ "249", CFG_IOS_249 },
{ "250", CFG_IOS_250 },
{ "251", CFG_IOS_251 },
{ "252", CFG_IOS_252 },
{ "222-mload", CFG_IOS_222_MLOAD },
{ "223-mload", CFG_IOS_223_MLOAD },
{ "224-mload", CFG_IOS_224_MLOAD },
@ -158,7 +159,7 @@ struct TextMap map_ios[] =
{ NULL, -1 }
};
u8 cIOS_base[10];
u8 cIOS_base[11];
struct TextMap map_gui_style[] =
{
@ -2095,15 +2096,17 @@ void set_recommended_cIOS_idx(u8 ios, bool onlyD2x) {
cfg_ios_set_idx(CFG_IOS_250);
} else if (ios == cIOS_base[6]) {
cfg_ios_set_idx(CFG_IOS_251);
} else if (ios == cIOS_base[7] && !onlyD2x) {
cfg_ios_set_idx(CFG_IOS_222_MLOAD);
} else if (ios == cIOS_base[7]) {
cfg_ios_set_idx(CFG_IOS_252);
} else if (ios == cIOS_base[8] && !onlyD2x) {
cfg_ios_set_idx(CFG_IOS_223_MLOAD);
cfg_ios_set_idx(CFG_IOS_222_MLOAD);
} else if (ios == cIOS_base[9] && !onlyD2x) {
cfg_ios_set_idx(CFG_IOS_223_MLOAD);
} else if (ios == cIOS_base[10] && !onlyD2x) {
cfg_ios_set_idx(CFG_IOS_224_MLOAD);
} else {
int i = 0;
for (i = 0; i < 10; i++) {
for (i = 0; i < 11; i++) {
if (cIOS_base[i] == 56) {
cfg_ios_set_idx(i);
return;
@ -2141,6 +2144,9 @@ void cfg_ios_set_idx(int ios_idx)
case CFG_IOS_251:
CFG.ios = 251;
break;
case CFG_IOS_252:
CFG.ios = 252;
break;
case CFG_IOS_222_MLOAD:
CFG.ios = 222;
CFG.ios_yal = 1;
@ -2225,6 +2231,7 @@ int get_ios_idx_type(int ios_idx)
case CFG_IOS_249:
case CFG_IOS_250:
case CFG_IOS_251:
case CFG_IOS_252:
return IOS_TYPE_WANIN;
case CFG_IOS_222_MLOAD:
case CFG_IOS_223_MLOAD:

View File

@ -28,12 +28,13 @@ typedef struct RectCoords
#define CFG_IOS_249 4
#define CFG_IOS_250 5
#define CFG_IOS_251 6
#define CFG_IOS_222_MLOAD 7
#define CFG_IOS_223_MLOAD 8
#define CFG_IOS_224_MLOAD 9
#define CFG_IOS_222_YAL 10
#define CFG_IOS_223_YAL 11
#define CFG_IOS_AUTO 12
#define CFG_IOS_252 7
#define CFG_IOS_222_MLOAD 8
#define CFG_IOS_223_MLOAD 9
#define CFG_IOS_224_MLOAD 10
#define CFG_IOS_222_YAL 11
#define CFG_IOS_223_YAL 12
#define CFG_IOS_AUTO 13
extern int CFG_IOS_MAX;
extern int CURR_IOS_IDX;

View File

@ -1129,6 +1129,7 @@ int get_ios_type()
case 249:
case 250:
case 251:
case 252:
return IOS_TYPE_WANIN;
case 222:
case 223:
@ -1600,7 +1601,7 @@ retry:;
goto retry;
}
// patch title id, so hash matches
if (ios_slot >= 245 && ios_slot <= 251) {
if (ios_slot >= 245 && ios_slot <= 252) {
if (t->title_id != TITLE_ID(1, 249)) {
t->title_id = TITLE_ID(1, 249);
goto retry;
@ -1724,7 +1725,7 @@ retry:;
goto retry;
}
// patch title id, so hash matches
if (ios_slot >= 245 && ios_slot <= 251) {
if (ios_slot >= 245 && ios_slot <= 252) {
if (t->title_id != TITLE_ID(1, 249)) {
t->title_id = TITLE_ID(1, 249);
goto retry;
@ -1768,7 +1769,7 @@ void fill_base_array() {
ISFS_Initialize();
for (i = 0; i < 10; i++) {
for (i = 0; i < 11; i++) {
cIOS_base[i] = 0;
}
@ -1779,9 +1780,10 @@ void fill_base_array() {
cIOS_base[4] = get_base_ios_from_tmd(249, NULL);// CFG_IOS_249
cIOS_base[5] = get_base_ios_from_tmd(250, NULL);// CFG_IOS_250
cIOS_base[6] = get_base_ios_from_tmd(251, NULL);// CFG_IOS_251
cIOS_base[7] = get_base_ios_from_tmd(222, NULL);// CFG_IOS_222
cIOS_base[8] = get_base_ios_from_tmd(223, NULL);// CFG_IOS_223
cIOS_base[9] = get_base_ios_from_tmd(224, NULL);// CFG_IOS_224
cIOS_base[7] = get_base_ios_from_tmd(252, NULL);// CFG_IOS_252
cIOS_base[8] = get_base_ios_from_tmd(222, NULL);// CFG_IOS_222
cIOS_base[9] = get_base_ios_from_tmd(223, NULL);// CFG_IOS_223
cIOS_base[10] = get_base_ios_from_tmd(224, NULL);// CFG_IOS_224
}
char* get_ios_info_from_tmd()
@ -1794,7 +1796,7 @@ void get_all_ios_info_str(char *str, int size)
int i;
char *info;
int ret;
for (i=222; i<=251; i++) {
for (i=222; i<=252; i++) {
if (i > 224 && i < 245) continue;
snprintf(str, size, "IOS%d ", i);
str_seek_end(&str, &size);