diff --git a/hbc/meta.xml b/hbc/meta.xml
index 7508f93..8401620 100644
--- a/hbc/meta.xml
+++ b/hbc/meta.xml
@@ -2,8 +2,9 @@
FCE Ultra GX
Tantric
- 3.2.1
- 20100722
+ 3.2.2
+ 20100814
Nintendo Emulator
A port of FCE Ultra to the Wii.
+
diff --git a/readme.txt b/readme.txt
index 55aa0cf..1d41f54 100644
--- a/readme.txt
+++ b/readme.txt
@@ -32,6 +32,12 @@ Wii/GameCube.
|0Oื๘oท UPDATE HISTORY ทo๘ืO0|
`จจจจจจ จจจจจจจจจจจจจจจจ จจจจจจจจจจจจจจจ จจจจจจจจจจจจจจจจจจจจ จจจจจจจจจจจจจ'
+[3.2.2 - August 14, 2010]
+
+* IOS 202 support removed
+* USB 2.0 support via IOS 58 added - requires that IOS58 be pre-installed
+* DVD support via AHBPROT - requires latest HBC
+
[3.2.1 - July 22, 2010]
* Fixed broken auto-update
diff --git a/source/fceugx.cpp b/source/fceugx.cpp
index 1c7c4f8..cb07528 100644
--- a/source/fceugx.cpp
+++ b/source/fceugx.cpp
@@ -191,51 +191,12 @@ static void ipl_set_config(unsigned char c)
* IOS Check
***************************************************************************/
#ifdef HW_RVL
-static bool FindIOS(u32 ios)
-{
- s32 ret;
- u32 n;
-
- u64 *titles = NULL;
- u32 num_titles=0;
-
- ret = ES_GetNumTitles(&num_titles);
- if (ret < 0)
- return false;
-
- if(num_titles < 1)
- return false;
-
- titles = (u64 *)memalign(32, num_titles * sizeof(u64) + 32);
- if (!titles)
- return false;
-
- ret = ES_GetTitles(titles, num_titles);
- if (ret < 0)
- {
- free(titles);
- return false;
- }
-
- for(n=0; n < num_titles; n++)
- {
- if((titles[n] & 0xFFFFFFFF)==ios)
- {
- free(titles);
- return true;
- }
- }
- free(titles);
- return false;
-}
-
bool SaneIOS()
{
bool res = false;
u32 num_titles=0;
u32 tmd_size;
u32 ios = IOS_GetVersion();
- u32 tmdbuffer[MAX_SIGNED_TMD_SIZE] ATTRIBUTE_ALIGN(32);
if(ios > 200)
return false;
@@ -247,12 +208,23 @@ bool SaneIOS()
return false;
u64 *titles = (u64 *)memalign(32, num_titles * sizeof(u64) + 32);
+
+ if(!titles)
+ return false;
if (ES_GetTitles(titles, num_titles) < 0)
{
free(titles);
return false;
}
+
+ u32 *tmdbuffer = (u32 *)memalign(32, MAX_SIGNED_TMD_SIZE);
+
+ if(!tmdbuffer)
+ {
+ free(titles);
+ return false;
+ }
for(u32 n=0; n < num_titles; n++)
{
@@ -274,6 +246,7 @@ bool SaneIOS()
break;
}
}
+ free(tmdbuffer);
free(titles);
return res;
}
@@ -349,14 +322,11 @@ int main(int argc, char *argv[])
#ifdef HW_RVL
// only reload IOS if AHBPROT is not enabled
u32 version = IOS_GetVersion();
-
- if(version != 58 && __di_check_ahbprot() != 1)
- {
- if(FindIOS(58))
- IOS_ReloadIOS(58);
- else if((version < 61 || version >= 200) && FindIOS(61))
- IOS_ReloadIOS(61);
- }
+ s32 preferred = IOS_GetPreferredVersion();
+
+ if(version != 58 && preferred > 0 && version != (u32)preferred && __di_check_ahbprot() != 1)
+ IOS_ReloadIOS(preferred);
+
DI_Init();
#endif
diff --git a/source/fceugx.h b/source/fceugx.h
index 621b7bb..01c82a9 100644
--- a/source/fceugx.h
+++ b/source/fceugx.h
@@ -17,7 +17,7 @@
#include "fceultra/driver.h"
#define APPNAME "FCE Ultra GX"
-#define APPVERSION "3.2.1"
+#define APPVERSION "3.2.2"
#define APPFOLDER "fceugx"
#define PREF_FILE_NAME "settings.xml"
diff --git a/source/preferences.cpp b/source/preferences.cpp
index 4aa358e..eeb8687 100644
--- a/source/preferences.cpp
+++ b/source/preferences.cpp
@@ -471,13 +471,21 @@ SavePrefs (bool silent)
sprintf(filepath, "%s%s", pathPrefix[device], APPFOLDER);
- if (!diropen(filepath))
+ DIR_ITER *dir = diropen(filepath);
+ if (!dir)
{
- mkdir(filepath, 0777);
+ if(mkdir(filepath, 0777) != 0)
+ return false;
sprintf(filepath, "%s%s/roms", pathPrefix[device], APPFOLDER);
- mkdir(filepath, 0777);
+ if(mkdir(filepath, 0777) != 0)
+ return false;
sprintf(filepath, "%s%s/saves", pathPrefix[device], APPFOLDER);
- mkdir(filepath, 0777);
+ if(mkdir(filepath, 0777) != 0)
+ return false;
+ }
+ else
+ {
+ dirclose(dir);
}
sprintf(filepath, "%s%s/%s", pathPrefix[device], APPFOLDER, PREF_FILE_NAME);
sprintf(prefpath, "%s%s", pathPrefix[device], APPFOLDER);
diff --git a/update.xml b/update.xml
index 1350e72..52d8cdd 100644
--- a/update.xml
+++ b/update.xml
@@ -1,4 +1,4 @@
-
-
+
+