Index: Cleanup.bat
===================================================================
--- Cleanup.bat	(nonexistent)
+++ Cleanup.bat	(working copy)
@@ -0,0 +1,48 @@
+@echo off
+
+cd multidol
+echo.
+echo Cleaning Multi-DOL Loader
+echo.
+make windows=1 clean
+
+cd ..\kernel\asm
+echo.
+echo Cleaning asm files
+echo.
+make windows=1 clean
+
+cd ..\..\resetstub
+echo.
+echo Cleaning Reset Stub
+echo.
+make clean
+
+cd ..\kernel
+echo.
+echo Cleaning Nintendont Kernel
+echo.
+rm -f *.elf *.o *.bin *.d *.map lwbt/*.d lwbt/*.o
+
+cd ..\fatfs
+echo.
+echo Cleaning FATFS
+echo.
+rm -f *.o *.d
+cd ..\fatfs\option
+rm -f *.o *.d
+
+cd ..\..\loader\source\ppc
+echo.
+echo Cleaning Nintendont HID
+echo.
+
+cd ..\..\..\loader
+echo.
+echo Cleaning Nintendont Loader
+echo.
+make clean
+
+echo Done!
+echo.
+pause
\ No newline at end of file
Index: common/include/CommonConfigStrings.h
===================================================================
--- common/include/CommonConfigStrings.h	(revision 542)
+++ common/include/CommonConfigStrings.h	(working copy)
@@ -10,15 +10,15 @@
 	"Debugger Wait",
 	"Memcard Emulation",
 	"Cheat Path",
-	"Force Widescreen",
-	"Force Progressive",
-	"Auto Boot",
-	"Unlock Read Speed",
-	"OSReport",
-	"WiiU Widescreen", //Replaces USB
-	"Drive Access LED",
-	"Log",
-	
+	"Force Widescreen",
+	"Force Progressive",
+	"Auto Boot",
+	"Disable HDD Ping",
+	"OSReport",
+	"WiiU Widescreen",
+	"Drive Access LED",
+	"Log",
+	
 	"MaxPads",
 	"Language",
 	"Video",
Index: common/include/Metadata.h
===================================================================
--- common/include/Metadata.h	(revision 542)
+++ common/include/Metadata.h	(working copy)
@@ -1,14 +1,14 @@
 
-#ifndef __META_DATA_H__
-#define __META_DATA_H__
-
-#define META_NAME			"Nintendont"
-#define META_AUTHOR			"FIX94, crediar"
-
-#define META_LONG1			"Commiters: GerbilSoft, JoostinOnline, GreyRogue, Howard, Cyan \r\n\r\n Project website: https://github.com/FIX94/Nintendont "
-#define META_LONG2			"Nintendont allows you to run GameCube games on a Wii or Wii U from an SD or HDD device."
-#define META_SHORT			"Gamecube Loader"
-
-#define META_XML			"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\"?>"
-
+#ifndef __META_DATA_H__
+#define __META_DATA_H__
+
+#define META_NAME			"Nintendont Mastermod"
+#define META_AUTHOR			"FIX94, crediar"
+
+#define META_LONG1			"Commiters: GerbilSoft, JoostinOnline, GreyRogue, Howard, Cyan \r\n\r\n Project website: https://github.com/FIX94/Nintendont "
+#define META_LONG2			"Nintendont allows you to run GameCube games on a Wii or Wii U from an SD or HDD device."
+#define META_SHORT			"Themes Mod by Abz"
+
+#define META_XML			"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\"?>"
+
 #endif
Index: fatfs/ff_utf8.c
===================================================================
--- fatfs/ff_utf8.c	(revision 542)
+++ fatfs/ff_utf8.c	(working copy)
@@ -1,11 +1,11 @@
 // Nintendont: FatFs UTF-8 wrapper functions.
-#include "ff_utf8.h"
-#include <stdlib.h>
-#include <stdbool.h>
-
-// Temporary WCHAR buffer.
-// NOT REENTRANT OR THREAD-SAFE!
-// NOTE: wchar_t is 32-bit; WCHAR is 16-bit.
+#include "ff_utf8.h"
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+// Temporary WCHAR buffer.
+// NOT REENTRANT OR THREAD-SAFE!
+// NOTE: wchar_t is 32-bit; WCHAR is 16-bit.
 // Hence, we have to convert between the two
 // when using mbstowcs() and related functions.
 static union {
@@ -90,12 +90,18 @@
 FRESULT f_mkdir_char(const char* path)
 {
 	if (!char_to_wchar(path))
-		return FR_INVALID_NAME;
-	return f_mkdir(tmpwchar.u16);
-}
-#endif /* !_FS_READONLY */
-
-#if _FS_RPATH >= 1
+		return FR_INVALID_NAME;
+	return f_mkdir(tmpwchar.u16);
+}
+FRESULT f_unlink_char(const char* path)
+{
+	if (!char_to_wchar(path))
+		return FR_INVALID_NAME;
+	return f_unlink(tmpwchar.u16);
+}
+#endif /* !_FS_READONLY */
+
+#if _FS_RPATH >= 1
 #if _VOLUMES >= 2
 FRESULT f_chdrive_char(const char* path)
 {
@@ -110,12 +116,25 @@
 	if (!char_to_wchar(path))
 		return FR_INVALID_NAME;
 	return f_chdir(tmpwchar.u16);
-}
-#endif /* _FS_RPATH >= 1 */
-
-#if _FS_MINIMIZE <= 1
-FRESULT f_opendir_char(DIR* dp, const char* path)
-{
+}
+#endif /* _FS_RPATH >= 1 */
+
+#if _FS_MINIMIZE == 0
+FRESULT f_rename_char(const char *old_name, const char *new_name)
+{
+	WCHAR old16[1024];
+	if (!char_to_wchar(old_name))
+		return FR_INVALID_NAME;
+	memcpy(old16, tmpwchar.u16, sizeof(old16));
+	if (!char_to_wchar(new_name))
+		return FR_INVALID_NAME;
+	return f_rename(old16, tmpwchar.u16);
+}
+#endif /* _FS_MINIMIZE == 0 */
+
+#if _FS_MINIMIZE <= 1
+FRESULT f_opendir_char(DIR* dp, const char* path)
+{
 	if (!char_to_wchar(path))
 		return FR_INVALID_NAME;
 	return f_opendir(dp, tmpwchar.u16);
Index: fatfs/ff_utf8.h
===================================================================
--- fatfs/ff_utf8.h	(revision 542)
+++ fatfs/ff_utf8.h	(working copy)
@@ -28,14 +28,19 @@
 #if _VOLUMES >= 2
 FRESULT f_chdrive_char(const char* path);
 #endif /* _VOLUMES >= 2 */
-FRESULT f_chdir_char(const char* path);
-#endif /* _FS_RPATH >= 1 */
-
-#if _FS_MINIMIZE <= 1
-FRESULT f_opendir_char(DIR* dp, const char* path);
-#endif /* _FS_MINIMIZE <= 1 */
-
-#ifdef __cplusplus
+FRESULT f_chdir_char(const char* path);
+#endif /* _FS_RPATH >= 1 */
+
+#if _FS_MINIMIZE == 0
+FRESULT f_rename_char(const char *old_name, const char *new_name);
+#endif /* _FS_MINIMIZE == 0 */
+
+#if _FS_MINIMIZE <= 1
+FRESULT f_opendir_char(DIR* dp, const char* path);
+FRESULT f_unlink_char(const char *path);
+#endif /* _FS_MINIMIZE <= 1 */
+
+#ifdef __cplusplus
 }
 #endif
 
Index: kernel/BT.c
===================================================================
--- kernel/BT.c	(revision 542)
+++ kernel/BT.c	(working copy)
@@ -247,31 +247,31 @@
 		u32 prevButton = BTPad[chan].button;
 		BTPad[chan].button = ((R16((u32)((u8*)buffer+1))) & 0x1F9F) | ((~(*(((u8*)buffer)+21))&0x03)<<5);
 		if((prevButton & WM_BUTTON_TWO) && BTPad[chan].button & WM_BUTTON_TWO)	//wiimote button TWO held down
-		{
-			switch (BTPad[chan].button & ~WM_BUTTON_TWO)
-			{
-				case WM_BUTTON_LEFT:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 1);
-					break;
-				case WM_BUTTON_RIGHT:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 2);
-					break;
-				case WM_BUTTON_UP:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 3);
-					break;
-				case WM_BUTTON_DOWN:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 4);
-					break;
-				case WM_BUTTON_MINUS:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 5);
-					break;
-				case WM_BUTTON_ONE:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 6);
-					break;
-				case WM_BUTTON_PLUS:
-					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 7);
-					break;
-				case NUN_BUTTON_C:
+		{
+			switch (BTPad[chan].button & ~WM_BUTTON_TWO)
+			{
+				case WM_BUTTON_LEFT: //Abz
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 1);
+					break;
+				case WM_BUTTON_RIGHT: //Howards
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 2);
+					break;
+				case WM_BUTTON_UP: //Race1
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 3);
+					break;
+				case WM_BUTTON_DOWN: //Race 2
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 4);
+					break;
+				case WM_BUTTON_MINUS: //Troops
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 5);
+					break;
+				case WM_BUTTON_PLUS: // Naggers
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 6);
+					break;
+				case WM_BUTTON_ONE: // Exit
+					stat->controller = (stat->controller & ~(C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) | (C_NSWAP1 * 7);
+					break;
+				case NUN_BUTTON_C:
 					if(!(prevButton & NUN_BUTTON_C))
 						stat->controller = (stat->controller & C_SWAP) ? (stat->controller & ~C_SWAP) : (stat->controller | C_SWAP);
 					break;
@@ -587,13 +587,13 @@
 	u8 buf[3];
 
 	stat->channel = CHAN_NOT_SET;
-	stat->rumble = 0;
-
-	BTSetControllerState(stat->sock, LEDState[CHAN_NOT_SET]);
-
-	//wiimote extensions need some extra stuff first, start with getting its status
-	if(stat->transfertype == 0x34 || stat->transfertype == 0x37)
-	{
+	stat->rumble = 0;
+
+	BTSetControllerState(stat->sock, LEDState[CHAN_NOT_SET]);
+	
+	//wiimote extensions need some extra stuff first, start with getting its status
+	if(stat->transfertype == 0x34 || stat->transfertype == 0x37)
+	{
 		buf[0] = 0x12;	//set data reporting mode
 		buf[1] = 0x00;	//report only when data changes
 		buf[2] = 0x30; //get normal buttons once
@@ -769,14 +769,14 @@
 					CurRumble = BTMotor[j];
 					j++;
 					break;
-				}
-			}
+				}
+			}
+		}
+		else if(TimerDiffSeconds(BTPadConnected[i]->timeout) >= 5)
+		{
+			bte_disconnect(BTPadConnected[i]->sock);
+			break;
 		}
-		else if(TimerDiffSeconds(BTPadConnected[i]->timeout) >= 20)
-		{
-			bte_disconnect(BTPadConnected[i]->sock);
-			break;
-		}
 		if(CurRumble == 0)
 		{
 			if(LastRumble == 1)
Index: kernel/main.c
===================================================================
--- kernel/main.c	(revision 542)
+++ kernel/main.c	(working copy)
@@ -36,14 +36,16 @@
 #include "Patch.h"
 
 #include "diskio.h"
-#include "usbstorage.h"
-#include "SDI.h"
-#include "ff_utf8.h"
-
-//#undef DEBUG
-bool access_led = false;
-u32 USBReadTimer = 0;
-extern u32 s_size;
+#include "usbstorage.h"
+#include "SDI.h"
+#include "ff_utf8.h"
+#define DI_STACK_SIZE 0x400
+
+//#undef DEBUG
+
+bool access_led = false;
+u32 USBReadTimer = 0;
+extern u32 s_size;
 extern u32 s_cnt;
 
 static FATFS *fatfs = NULL;
@@ -211,13 +213,13 @@
 
 	BootStatus(10, s_size, s_cnt);
 
-	GCAMInit();
-
-	EXIInit();
-
-	BootStatus(11, s_size, s_cnt);
-
-	SIInit();
+	GCAMInit();
+
+	EXIInit();
+	
+	BootStatus(11, s_size, s_cnt);
+
+	SIInit();
 	StreamInit();
 
 	PatchInit();
@@ -249,13 +251,13 @@
 	if(access_led)
 	{
 		set32(HW_GPIO_ENABLE, GPIO_SLOT_LED);
-		clear32(HW_GPIO_DIR, GPIO_SLOT_LED);
-		clear32(HW_GPIO_OWNER, GPIO_SLOT_LED);
-	}
-
-	set32(HW_GPIO_ENABLE, GPIO_SENSOR_BAR);
-	clear32(HW_GPIO_DIR, GPIO_SENSOR_BAR);
-	clear32(HW_GPIO_OWNER, GPIO_SENSOR_BAR);
+		clear32(HW_GPIO_DIR, GPIO_SLOT_LED);
+		clear32(HW_GPIO_OWNER, GPIO_SLOT_LED);
+	}
+	
+	set32(HW_GPIO_ENABLE, GPIO_SENSOR_BAR);
+	clear32(HW_GPIO_DIR, GPIO_SENSOR_BAR);
+	clear32(HW_GPIO_OWNER, GPIO_SENSOR_BAR);
 	set32(HW_GPIO_OUT, GPIO_SENSOR_BAR);	//turn on sensor bar
 
 	write32( HW_PPCIRQMASK, (1<<30) );
@@ -285,14 +287,13 @@
 		if(TimerDiffTicks(loopPrintTimer) > 1898437)
 		{
 			dbgprintf("%08i\r\n",loopCnt);
-			loopPrintTimer = read32(HW_TIMER);
-			loopCnt = 0;
-		}
-#endif
-		//Does interrupts again if needed
-		if(TimerDiffTicks(InterruptTimer) > 15820) //about 120 times a second
-		{
-			sync_before_read((void*)INT_BASE, 0x80);
+			loopPrintTimer = read32(HW_TIMER);
+			loopCnt = 0;
+		}
+#endif		//Does interrupts again if needed
+		if(TimerDiffTicks(InterruptTimer) > 15820) //about 120 times a second
+		{
+			sync_before_read((void*)INT_BASE, 0x80);
 			if((read32(RSW_INT) & 2) || (read32(DI_INT) & 4) || 
 				(read32(SI_INT) & 8) || (read32(EXI_INT) & 0x10))
 				write32(HW_IPC_ARMCTRL, (1 << 0) | (1 << 4)); //throw irq
@@ -325,21 +326,26 @@
 			if(TimerDiffSeconds(Now) > 2) /* after 3 second earliest */
 			{
 				EXISaveCard();
-				SaveCard = false;
-			}
-		}
-		else if(UseUSB && TimerDiffSeconds(USBReadTimer) > 149) /* Read random sector every 2 mins 30 secs */
-		{
-			DIFinishAsync(); //if something is still running
-			DI_CallbackMsg.result = -1;
-			sync_after_write(&DI_CallbackMsg, 0x20);
+				SaveCard = false;
+			}
+		}
+		else if(UseUSB && TimerDiffSeconds(USBReadTimer) > 109) /* Read random sector every 1 min 50 secs */
+		{
+			if( ConfigGetConfig(NIN_CFG_HID) )
+		{}
+		else
+		{
+			DIFinishAsync(); //if something is still running
+			DI_CallbackMsg.result = -1;
+			sync_after_write(&DI_CallbackMsg, 0x20);
 			IOS_IoctlAsync( DI_Handle, 2, NULL, 0, NULL, 0, DI_MessageQueue, &DI_CallbackMsg );
-			DIFinishAsync();
-			USBReadTimer = read32(HW_TIMER);
-		}
-		else /* No device I/O so make sure this stays updated */
-			GetCurrentTime();
-		udelay(20); //wait for other threads
+			DIFinishAsync();
+			USBReadTimer = read32(HW_TIMER);
+		}
+		}
+		else /* No device I/O so make sure this stays updated */
+			GetCurrentTime();
+		udelay(20); //wait for other threads
 
 		if( WaitForRealDisc == 1 )
 		{
@@ -506,13 +512,12 @@
 	fatfs = NULL;
 
 	if(UseUSB)
-		USBStorage_Shutdown();
-	else
-		SDHCShutdown();
-
-//make sure drive led is off before quitting
-	if( access_led ) clear32(HW_GPIO_OUT, GPIO_SLOT_LED);
-
+		USBStorage_Shutdown();
+	else
+		SDHCShutdown();
+//make sure drive led is off before quitting
+	if( access_led ) clear32(HW_GPIO_OUT, GPIO_SLOT_LED);
+
 //make sure we set that back to the original
 	write32(HW_PPCSPEED, ori_ppcspeed);
 
Index: kernel/Patch.c
===================================================================
--- kernel/Patch.c	(revision 542)
+++ kernel/Patch.c	(working copy)
@@ -3360,14 +3360,13 @@
 	}
 	PatchStaticTimers();
 
-	sync_after_write( Buffer, Length );
-
-	UseReadLimit = 1;
-	if(RealDiscCMD != 0 || TRIGame != TRI_NONE || IsN64Emu 
-			|| ConfigGetConfig(NIN_CFG_REMLIMIT))
-		UseReadLimit = 0;
-}
-
+	sync_after_write( Buffer, Length );
+
+	UseReadLimit = 1;
+	if(RealDiscCMD != 0 || TRIGame != TRI_NONE || IsN64Emu)
+		UseReadLimit = 0;
+}
+
 void PatchInit()
 {
 	memcpy((void*)PATCH_OFFSET_ENTRY, FakeEntryLoad, FakeEntryLoad_size);
Index: loader/include/global.h
===================================================================
--- loader/include/global.h	(revision 542)
+++ loader/include/global.h	(working copy)
@@ -24,12 +24,13 @@
 #include <gctypes.h>
 #include <stdio.h>
 #include <ogc/ipc.h>
-#include "background_png.h"
-#include "Config.h"
-#include "grrlib.h"
-
-#ifndef HW_RVL
-#define HW_RVL
+#include "background_png.h"
+#include "Config.h"
+#include "grrlib.h"
+#include <ogc/lwp_watchdog.h>
+
+#ifndef HW_RVL
+#define HW_RVL
 #endif
 
 /*
@@ -63,14 +64,27 @@
 #define OLIVE				0x808000FF
 #define PURPLE				0x800080FF
 #define RED					0xFF0000FF
-#define SILVER				0xC0C0C0FF
-#define TEAL				0x008080FF
-#define WHITE				0xFFFFFFFF
-#define YELLOW				0xFFFF00FF
-
-#define		HW_REG_BASE		0xCD800000
-#define		HW_RESETS		(HW_REG_BASE + 0x194)
-
+#define SILVER				0xC0C0C0FF
+#define TEAL				0x008080FF
+#define WHITE				0xFFFFFFFF
+#define YELLOW				0xFFF380FF
+
+#define BLUED				0x0000A0FF
+#define GREEND				0x254117FF
+#define REDD				0x800517FF
+#define PURPLED				0x800080FF
+#define BROWND				0x2B1B17FF
+#define ROSED				0x307D7EFF
+#define GOLDEN				0x7F5217FF
+#define BLUEL				0x4EE2ECFF
+#define GREENL				0x99C68EFF
+#define REDL				0xF75D59FF
+#define PURPLEL				0xF3E5ABFF
+#define BROWNL				0x98FF98FF
+
+#define		HW_REG_BASE		0xCD800000
+#define		HW_RESETS		(HW_REG_BASE + 0x194)
+
 #define ALIGNED(x) __attribute__((aligned(x)))
 #define NORETURN __attribute__ ((noreturn))
 
@@ -84,12 +98,14 @@
 extern u32 POffset;
 extern NIN_CFG *ncfg;
 extern FILE *cfg;
-extern GRRLIB_ttfFont *myFont;
-extern GRRLIB_texImg *background;
-extern GRRLIB_texImg *screen_buffer;
-
-enum
-{
+extern GRRLIB_ttfFont *myFont;
+extern GRRLIB_texImg *background;
+extern GRRLIB_texImg *screen_buffer;
+extern int which_bg;
+extern int menumod;
+
+enum
+{
 	TRI_NONE = 0,
 	TRI_GP1,
 	TRI_GP2,
@@ -102,12 +118,22 @@
 {
 	CONTENT_REQUIRED=	(1<< 0),	// not sure
 	CONTENT_SHARED	=	(1<<15),
-	CONTENT_OPTIONAL=	(1<<14),
-};
-
-typedef struct
-{
-	u32 ID;				//	0	(0x1E4)
+	CONTENT_OPTIONAL=	(1<<14),
+};
+
+enum {
+	BG_NONE,
+	BG_LIGHT,
+	BG_DARK,
+	BG_BARS,
+	BG_NOBAR,
+	BG_LEGACY,
+	BG_BLACK,
+	BG_NO_INIT
+};
+typedef struct
+{
+	u32 ID;				//	0	(0x1E4)
 	u16 Index;			//	4	(0x1E8)
 	u16 Type;			//	6	(0x1EA)
 	u64 Size;			//	8	(0x1EC)
@@ -153,13 +179,12 @@
 /**
  * Load the configuration file from the root device.
  * @return True if loaded successfully; false if not.
- */
-bool LoadNinCFG(void);
-
-void UpdateNinCFG();
-bool IsGCGame(u8 *Buffer);
-int CreateNewFile(const char *Path, u32 size);
-
+ */
+bool LoadNinCFG(void);
+
+bool IsGCGame(u8 *Buffer);
+int CreateNewFile(const char *Path, u32 size);
+
 /**
  * Exit Nintendont and return to the loader.
  * @param ret Exit code.
@@ -170,12 +195,21 @@
 void CloseDevices();
 void hexdump(void *d, int len);
 void *memalign( u32 Align, u32 Size );
-void DrawBuffer(void);
-void UpdateScreen(void);
-void Screenshot(void);
-raw_irq_handler_t BeforeIOSReload();
-void AfterIOSReload(raw_irq_handler_t handle, u32 rev);
-
+void DrawBuffer(void);
+void UpdateScreen(void);
+void Screenshot(void);
+void CheckTheme();
+void BackTheme();
+void DeleteCustom();
+void FadeIt();
+void FadeOut();
+void UpdateNinCFG();
+void Preview();
+
+//void UpdateNinCFG();
+raw_irq_handler_t BeforeIOSReload();
+void AfterIOSReload(raw_irq_handler_t handle, u32 rev);
+
 /** Device mount/unmount. **/
 #include "integer.h"	/* for WCHAR */
 const WCHAR *MountDevice(BYTE pdrv);
Index: loader/include/menu.h
===================================================================
--- loader/include/menu.h	(revision 542)
+++ loader/include/menu.h	(working copy)
@@ -34,20 +34,24 @@
 	char *Name;		// Game name. (If NameAlloc, strdup()'d.)
 	char *Path;		// File path.
 } gameinfo;
-
-void HandleSTMEvent(u32 event);
-void HandleWiiMoteEvent(s32 chan);
-
-/**
- * Select the source device and game.
- * @return TRUE to save settings; FALSE if no settings have been changed.
+
+void HandleSTMEvent(u32 event);
+void HandleWiiMoteEvent(s32 chan);
+void CheckTheme();
+void BackTheme();
+void FadeIt();
+void FadeOut();
+void Credits();
+/**
+ * Select the source device and game.
+ * @return TRUE to save settings; FALSE if no settings have been changed.
+ */
+bool SelectDevAndGame(void);
+bool SelectGameList(void);
+/**
+ * Show a single message screen.
+ * @param msg Message.
  */
-bool SelectDevAndGame(void);
-
-/**
- * Show a single message screen.
- * @param msg Message.
- */
 void ShowMessageScreen(const char *msg);
 
 /**
Index: loader/include/update.h
===================================================================
--- loader/include/update.h	(revision 542)
+++ loader/include/update.h	(working copy)
@@ -20,8 +20,18 @@
 */
 
 #ifndef __UPDATE_H__
-#define __UPDATE_H__
-
-void UpdateNintendont(void);
-
-#endif
+#define __UPDATE_H__
+
+void UpdateNintendont(void);
+void UpdateLoader(void);
+void UpdateLegacy(void);
+void UpdateThemes(void);
+void UpdateBios(void);
+void UpdateOld(void);
+void UpdateOther(void);
+void SimpleBack(void);
+void SingleBack(void);
+void UpdateGrad(void);
+void DownloadGame(void);
+void GDMenu(void);
+#endif
Index: loader/Makeme.bat
===================================================================
--- loader/Makeme.bat	(nonexistent)
+++ loader/Makeme.bat	(working copy)
@@ -0,0 +1,2 @@
+make
+pause
\ No newline at end of file
Index: loader/source/global.c
===================================================================
--- loader/source/global.c	(revision 542)
+++ loader/source/global.c	(working copy)
@@ -31,20 +31,24 @@
 #include <ogc/wiilaunch.h>
 #include <stdio.h>
 #include <unistd.h>
-
 #include "ff_utf8.h"
 #include "diskio.h"
-
 #include "Config.h"
 #include "exi.h"
 #include "global.h"
 #include "font_zip.h"
 #include "dip.h"
+#include "ff_utf8.h"
+#include "diskio.h"
 #include "unzip/unzip.h"
 
+int which_bg = BG_NO_INIT;
+int selected = 0;
+
 GRRLIB_ttfFont *myFont;
 GRRLIB_texImg *background;
 GRRLIB_texImg *screen_buffer;
+GRRLIB_texImg *preview;
 
 u32 POffset;
 
@@ -148,8 +152,8 @@
 	
 	*(vu32*)0x8000315C = 0x81;
 }
-
-void unzip_data(const void *input, const u32 input_size, 
+	
+	void unzip_data(const void *input, const u32 input_size, 
 	void **output, u32 *output_size)
 {
 	char filepath[20]; //statically linked zip file
@@ -167,10 +171,8 @@
 
 static void *font_ttf = NULL;
 static u32 font_ttf_size = 0;
-
 void Initialise()
 {
-	int i;
 	AUDIO_Init(NULL);
 	DSP_Init();
 	AUDIO_StopDMA();
@@ -180,17 +182,9 @@
 	unzip_data(font_zip, font_zip_size, &font_ttf, &font_ttf_size);
 	gprintf("Decompressed font.ttf with %i bytes\r\n", font_ttf_size);
 	myFont = GRRLIB_LoadTTF(font_ttf, font_ttf_size);
-	background = GRRLIB_LoadTexturePNG(background_png);
 	screen_buffer = GRRLIB_CreateEmptyTexture(rmode->fbWidth, rmode->efbHeight);
-	for (i=0; i<255; i +=5) // Fade background image in from black screen
-	{
-		GRRLIB_DrawImg(0, 0, background, 0, 1, 1, RGBA(255, 255, 255, i)); // Opacity increases as i does
-		GRRLIB_Render();
-	}
-	ClearScreen();
 	gprintf("Initialize Finished\r\n");
 }
-
 static void (*stub)() = (void*)0x80001800;
 inline void DrawBuffer(void) {
 	GRRLIB_DrawImg(0, 0, screen_buffer, 0, 1, 1, 0xFFFFFFFF);
@@ -284,22 +278,36 @@
 	f_close(&cfg);
 
 	switch( ncfg->Version ) {
-		case 2:
-			if (BytesRead != 540)
-				ConfigLoaded = false;
+		{
+			ConfigLoaded = false;
 			break;
-
-		default:
-			if (BytesRead != sizeof(NIN_CFG))
+		}
+		case 2:	
+			if(BytesRead != 540)
 				ConfigLoaded = false;
-			break;
+		 break;
+		default: 
+		case 3:
+		case NIN_CFG_VERSION:
+			if(BytesRead != sizeof(NIN_CFG))
+				ConfigLoaded = false;
+		 break;
 	}
 
 	if (ncfg->Magicbytes != 0x01070CF6)
 		ConfigLoaded = false;
 
-	UpdateNinCFG();
-
+	if (ncfg->Version < 3)	//need to upgrade config from ver 2 to ver 3
+	{
+		ncfg->MemCardBlocks = 0x2;//251 blocks
+		ncfg->Version = 3;
+	}
+	if (ncfg->Version < 4)
+	{
+		ncfg->VideoScale = 0;
+		ncfg->VideoOffset = 0;
+		ncfg->Version = 4;
+	}
 	if (ncfg->Version != NIN_CFG_VERSION)
 		ConfigLoaded = false;
 
@@ -314,7 +322,10 @@
 
 inline void ClearScreen()
 {
-	GRRLIB_DrawImg(0, 0, background, 0, 1, 1, 0xFFFFFFFF);
+	//if(which_bg == BG_NO_INIT)
+	//	GRRLIB_FillScreen(BLACK);
+	//else
+		GRRLIB_DrawImg(0, 0, background, 0, 1, 1, 0xFFFFFFFF);
 }
 
 static inline char ascii(char s)
@@ -377,7 +388,7 @@
 	}
 	if (ncfg->Version == 4)
 	{	//Option got changed so not confuse it
-		ncfg->Config &= ~NIN_CFG_HID;
+		//ncfg->Config &= ~NIN_CFG_HID;
 		ncfg->Version = 5;
 	}
 	if (ncfg->Version == 5)
@@ -531,3 +542,39 @@
 		UnmountDevice(i);
 	}
 }
+void Preview(void) {
+			GRRLIB_FreeTexture(preview);
+			if (selected == 0)
+			preview = GRRLIB_LoadTextureFromFile("00.png");
+			else if (selected == 1)
+			preview = GRRLIB_LoadTextureFromFile("01.png");
+			else if (selected == 2)
+			preview = GRRLIB_LoadTextureFromFile("02.png");
+			else if (selected == 3)
+			preview = GRRLIB_LoadTextureFromFile("03.png");
+			else if (selected == 4)
+			preview = GRRLIB_LoadTextureFromFile("04.png");
+			else if (selected == 5)
+			preview = GRRLIB_LoadTextureFromFile("05.png");
+			else if (selected == 6)
+			preview = GRRLIB_LoadTextureFromFile("06.png");
+			else if (selected == 7)
+			preview = GRRLIB_LoadTextureFromFile("07.png");
+			else if (selected == 8)
+			preview = GRRLIB_LoadTextureFromFile("08.png");
+			else if (selected == 9)
+			preview = GRRLIB_LoadTextureFromFile("09.png");
+			else if (selected == 10)
+			preview = GRRLIB_LoadTextureFromFile("10.png");
+			else if (selected == 11)
+			preview = GRRLIB_LoadTextureFromFile("11.png");
+			else if (selected == 12)
+			preview = GRRLIB_LoadTextureFromFile("12.png");
+			else if (selected == 13)
+			preview = GRRLIB_LoadTextureFromFile("13.png");
+			else if (selected == 14)
+			preview = GRRLIB_LoadTextureFromFile("14.png");	
+			else if (selected == 15)
+			preview = GRRLIB_LoadTextureFromFile("15.png");		
+			GRRLIB_DrawImg(400, 120, preview, 0, 1, 1, 0xFFFFFFFF);
+}
\ No newline at end of file
Index: loader/source/grrlib.c
===================================================================
--- loader/source/grrlib.c	(revision 542)
+++ loader/source/grrlib.c	(working copy)
@@ -1538,7 +1538,6 @@
 bool  GRRLIB_ScrShot(const char* filename) {
 	IMGCTX  pngContext;
 	int     ret = -1;
-
 	if ( (pngContext = PNGU_SelectImageFromDevice(filename)) ) {
 		ret = PNGU_EncodeFromEFB( pngContext,
 								  rmode->fbWidth, rmode->efbHeight,
Index: loader/source/main.c
===================================================================
--- loader/source/main.c	(revision 542)
+++ loader/source/main.c	(working copy)
@@ -26,6 +26,7 @@
 #include <di/di.h>
 
 #include <unistd.h>
+#include <sys/stat.h>
 
 #include "exi.h"
 #include "dip.h"
@@ -67,8 +68,9 @@
 #define HW_DIFLAGS		0xD800180
 #define MEM_PROT		0xD8B420A
 
-#define IOCTL_ExecSuspendScheduler	1
-
+#define IOCTL_ExecSuspendScheduler 1
+ 	
+int intro = 0;
 static GXRModeObj *vmode = NULL;
 
 static const unsigned char Boot2Patch[] =
@@ -113,6 +115,8 @@
 
 extern vu32 FoundVersion;
 vu32 KernelLoaded = 0;
+int hid_count=0;
+int ExitBoot=0;
 u32 entrypoint = 0;
 char launch_dir[MAXPATHLEN] = {0};
 extern void __exception_closeall();
@@ -199,49 +203,48 @@
 {
 	f_chdrive(primaryDevice);
 	f_chdir_char("/");
+	f_mkdir_char("/apps");
+	f_mkdir_char("/apps/Nintendont");
 }
 
 int main(int argc, char **argv)
 {
-	// Exit after 10 seconds if there is an error
+// Exit after 10 seconds if there is an error
 	__exception_setreload(10);
 //	u64 timeout = 0;
 	CheckForGecko();
 	DCInvalidateRange(loader_stub, 0x1800);
 	memcpy(loader_stub, (void*)0x80001800, 0x1800);
-
 	RAMInit();
-
-	//Meh, doesnt do anything anymore anyways
-	//STM_RegisterEventHandler(HandleSTMEvent);
-
+	
+ 	//Meh, doesnt do anything anymore anyways
+	//STM_RegisterEventHandler(HandleSTMEvent);	
+	
 	Initialise();
-
 	// Initializing IOS58...
 	ShowMessageScreen("Initializing IOS58...");
-
-	u32 u;
-	//Disables MEMPROT for patches
+	
+ 	u32 u;
+ 	//Disables MEMPROT for patches
 	write16(MEM_PROT, 0);
 	//Patches FS access
 	for( u = 0x93A00000; u < 0x94000000; u+=2 )
 	{
-		if( memcmp( (void*)(u), FSAccessPattern, sizeof(FSAccessPattern) ) == 0 )
+	if( memcmp( (void*)(u), FSAccessPattern, sizeof(FSAccessPattern) ) == 0 )
 		{
-		//	gprintf("FSAccessPatch:%08X\r\n", u );
-			memcpy( (void*)u, FSAccessPatch, sizeof(FSAccessPatch) );
-			DCFlushRange((void*)u, sizeof(FSAccessPatch));
-			break;
-		}
+	// gprintf("FSAccessPatch:%08X\r\n", u );
+	memcpy( (void*)u, FSAccessPatch, sizeof(FSAccessPatch) );
+	DCFlushRange((void*)u, sizeof(FSAccessPatch));
+	break;
+		}		
 	}
-
-	//for BT.c
+ 	//for BT.c
 	CONF_GetPadDevices((conf_pads*)0x932C0000);
 	DCFlushRange((void*)0x932C0000, sizeof(conf_pads));
 	*(vu32*)0x932C0490 = CONF_GetIRSensitivity();
 	*(vu32*)0x932C0494 = CONF_GetSensorBarPosition();
 	DCFlushRange((void*)0x932C0490, 8);
-
+	
 	// Load and patch IOS58.
 	if (LoadKernel() < 0)
 	{
@@ -258,49 +261,47 @@
 		// Return to the loader.
 		ExitToLoader(1);
 	}
-
-	void *kernel_bin = NULL;
+	
+ 	void *kernel_bin = NULL;
 	u32 kernel_bin_size = 0;
 	unzip_data(kernel_zip, kernel_zip_size, &kernel_bin, &kernel_bin_size);
 	gprintf("Decompressed kernel.bin with %i bytes\r\n", kernel_bin_size);
 	InsertModule((char*)kernel_bin, kernel_bin_size);
 	free(kernel_bin);
-
+	
 	memset( (void*)0x92f00000, 0, 0x100000 );
 	DCFlushRange( (void*)0x92f00000, 0x100000 );
-
+	
 	DCInvalidateRange( (void*)0x939F02F0, 0x20 );
-
+	
 	memcpy( (void*)0x939F02F0, Boot2Patch, sizeof(Boot2Patch) );
-
+	
 	DCFlushRange( (void*)0x939F02F0, 0x20 );
-
-	//libogc still has that, lets close it
-	__ES_Close();
+ 	//libogc still has that, lets close it
+	__ES_Close();	
 	s32 fd = IOS_Open( "/dev/es", 0 );
-
-	memset( STATUS, 0xFFFFFFFF, 0x20  );
+	
+	memset( STATUS, 0xFFFFFFFF, 0x20 );
 	DCFlushRange( STATUS, 0x20 );
-
-	memset( (void*)0x91000000, 0xFFFFFFFF, 0x20  );
+	
+	memset( (void*)0x91000000, 0xFFFFFFFF, 0x20 );
 	DCFlushRange( (void*)0x91000000, 0x20 );
-
+	
 	*(vu32*)0xD3003420 = 0; //make sure kernel doesnt reload
-
+	
 	raw_irq_handler_t irq_handler = BeforeIOSReload();
 	IOS_IoctlvAsync( fd, 0x1F, 0, 0, &IOCTL_Buf, NULL, NULL );
 	AfterIOSReload( irq_handler, FoundVersion );
+        while(1)
+        {
+                DCInvalidateRange( STATUS, 0x20 );
+                if((STATUS_LOADING > 0 || abs(STATUS_LOADING) > 1) && STATUS_LOADING < 20)
+                {
+                        gprintf("Kernel sent signal\n");
+                        break;
+                }
+        }
 
-	while(1)
-	{
-		DCInvalidateRange( STATUS, 0x20 );
-		if((STATUS_LOADING > 0 || abs(STATUS_LOADING) > 1) && STATUS_LOADING < 20)
-		{
-			gprintf("Kernel sent signal\n");
-			break;
-		}
-	}
-
 	// Checking for storage devices...
 	ShowMessageScreen("Checking storage devices...");
 
@@ -331,18 +332,18 @@
 		ExitToLoader(1);
 	}
 
-	gprintf("Nintendont at your service!\r\n%s\r\n", NIN_BUILD_STRING);
-	KernelLoaded = 1;
+ 	gprintf("Nintendont at your service!\r\n%s\r\n", NIN_BUILD_STRING);
+ 	KernelLoaded = 1;
 
 	char* first_slash = strrchr(argv[0], '/');
 	if (first_slash != NULL) strncpy(launch_dir, argv[0], first_slash-argv[0]+1);
 	gprintf("launch_dir = %s\r\n", launch_dir);
-
 	// Initialize controllers.
 	// FIXME: Initialize before storage devices.
 	// Doing that right now causes usbstorage to fail...
 	FPAD_Init();
-	FPAD_Update();
+	FPAD_Update();	
+	f_chdir_char("/apps/Nintendont");
 
 	/* Read IPL Font before doing any patches */
 	void *fontbuffer = memalign(32, 0x50000);
@@ -351,18 +352,19 @@
 	DCInvalidateRange( (void*)0x93100000, 0x50000 );
 	free(fontbuffer);
 	//gprintf("Font: 0x1AFF00 starts with %.4s, 0x1FCF00 with %.4s\n", (char*)0x93100000, (char*)0x93100000 + 0x4D000);
-
+	
 	// Update meta.xml.
 	updateMetaXml();
 
 	// Load titles.txt.
 	LoadTitles();
+	memset((void*)ncfg, 0, sizeof(NIN_CFG));
+	 
 
-	memset((void*)ncfg, 0, sizeof(NIN_CFG));
 	bool argsboot = false;
 	if(argc > 1) //every 0x00 gets counted as one arg so just make sure its more than the path and copy
-	{
-		memcpy(ncfg, argv[1], sizeof(NIN_CFG));
+	{	
+		memcpy(ncfg, argv[1], sizeof(NIN_CFG));	
 		UpdateNinCFG(); //support for old versions with this
 		if(ncfg->Magicbytes == 0x01070CF6 && ncfg->Version == NIN_CFG_VERSION && ncfg->MaxPads <= NIN_CFG_MAXPAD)
 		{
@@ -372,9 +374,62 @@
 				argsboot = true;
 			}
 		}
+		GRRLIB_FreeTexture(background);
+		CheckTheme();
+		FadeIt();
+		// Prevent autobooting if B is pressed
+		int i = 0;
+		while((ncfg->Config & NIN_CFG_AUTO_BOOT) && (i < 500000)) // wait for wiimote re-sync
+		{	
+			if (i == 0) {
+				PrintInfo();
+        if (which_bg == BG_NONE)
+        {
+           PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 320 - 90, MENU_POS_Y + 20*10, "B: Cancel Autoboot");
+           GRRLIB_Render();
+           ClearScreen();
+        }
+        else if (which_bg == BG_LEGACY)
+        {
+           PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 320 - 90, MENU_POS_Y + 20*10, "B: Cancel Autoboot");
+           GRRLIB_Render();
+           ClearScreen();
+        }
+        else if (which_bg == BG_BLACK)
+        {
+           GRRLIB_Render();
+           ClearScreen();
+        }
+        else
+        {
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 406, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 410, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 408, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 408, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 406, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 410, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 410, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 406, "B: Cancel Autoboot"); 
+        PrintFormat(DEFAULT_SIZE, WHITE, 230, MENU_POS_Y + 408, "B: Cancel Autoboot");
+		GRRLIB_Render();
+		ClearScreen();
+        }
+		}
+		FPAD_Update();
+			if (FPAD_Cancel(0)) {
+				ncfg->Config &= ~NIN_CFG_AUTO_BOOT;
+				ExitBoot=1;
+				FadeOut();
+				BackTheme();
+				break;
+			}
+			i++;
+		}
 	}
+
 	if(argsboot == false)
-	{
+	{			
+		//UpdateNinCFG(); //support for old versions with this
 		if (LoadNinCFG() == false)
 		{
 			memset(ncfg, 0, sizeof(NIN_CFG));
@@ -385,31 +440,64 @@
 			ncfg->MaxPads = NIN_CFG_MAXPAD;
 			ncfg->MemCardBlocks = 0x2;//251 blocks
 		}
-
+		// Use Custom Width 0 scale gives 600 width 120 scale gives 720
+		//ncfg->VideoScale = 120;
+		//
 		// Prevent autobooting if B is pressed
+			GRRLIB_FreeTexture(background);
+			CheckTheme();
+			FadeIt();
 		int i = 0;
-		while((ncfg->Config & NIN_CFG_AUTO_BOOT) && i < 1000000) // wait for wiimote re-synch
-		{
+		while((ncfg->Config & NIN_CFG_AUTO_BOOT) && (i < 500000)) // wait for wiimote re-sync
+		{	
 			if (i == 0) {
-				PrintInfo();
-				PrintFormat(DEFAULT_SIZE, BLACK, 320 - 90, MENU_POS_Y + 20*10, "B: Cancel Autoboot");
-				GRRLIB_Render();
-				ClearScreen();
-			}
-			
+				PrintInfo();		
+        if (which_bg == BG_NONE)
+        {
+            PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 320 - 90, MENU_POS_Y + 20*10, "B: Cancel Autoboot");
+            GRRLIB_Render();
+			ClearScreen();
+        }
+        else if (which_bg == BG_LEGACY)
+        {
+           PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 320 - 90, MENU_POS_Y + 20*10, "B: Cancel Autoboot");
+           GRRLIB_Render();
+           ClearScreen();
+        }
+        else if (which_bg == BG_BLACK)
+        {
+           GRRLIB_Render();
+           ClearScreen();
+        }
+        else
+        {
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 406, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 410, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 408, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 408, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 406, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 410, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 410, "B: Cancel Autoboot");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 406, "B: Cancel Autoboot"); 
+        PrintFormat(DEFAULT_SIZE, WHITE, 230, MENU_POS_Y + 408, "B: Cancel Autoboot");
+		GRRLIB_Render();
+		ClearScreen();
+        }
+		}
 			FPAD_Update();
-
 			if (FPAD_Cancel(0)) {
-				ncfg->Config &= ~NIN_CFG_AUTO_BOOT;
+			ncfg->Config &= ~NIN_CFG_AUTO_BOOT;
+			ExitBoot=1;
+			FadeOut();
+			BackTheme();
 				break;
 			}
-
 			i++;
 		}
 	}
+
 	ReconfigVideo(rmode);
 	UseSD = (ncfg->Config & NIN_CFG_USB) == 0;
-
 	bool progressive = (CONF_GetProgressiveScan() > 0) && VIDEO_HaveComponentCable();
 	if(progressive) //important to prevent blackscreens
 		ncfg->VideoMode |= NIN_VID_PROG;
@@ -418,10 +506,11 @@
 
 	bool SaveSettings = false;
 	if(!(ncfg->Config & NIN_CFG_AUTO_BOOT))
-	{
-		// Not autobooting.
-		// Prompt the user to select a device and game.
-		SaveSettings = SelectDevAndGame();
+	{	
+		BackTheme();
+		GRRLIB_Render();
+		//FadeIt();
+		SaveSettings = SelectGameList(); //SelectDevAndGame();
 	}
 	else
 	{
@@ -436,7 +525,29 @@
 	u32 CurDICMD = 0;
 	if( memcmp(ncfg->GamePath, "di", 3) == 0 )
 	{
-		ShowLoadingScreen();
+		ClearScreen();
+		if (which_bg == BG_NONE)
+		{
+		PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Loading, please wait...");
+		}
+		else if (which_bg == BG_LEGACY)
+		{
+		PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Loading, please wait...");
+		}
+		else
+		{
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 406, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 410, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 408, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 408, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 406, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 410, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 410, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 406, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, WHITE, 230, MENU_POS_Y + 408, "Loading, please wait...");		
+		}
+		GRRLIB_Render();
+		ClearScreen();
 
 		DI_UseCache(false);
 		DI_Init();
@@ -445,10 +556,12 @@
 			usleep(20000);
 		if(!(DI_GetStatus() & DVD_READY))
 		{
-			ShowMessageScreenAndExit("The Disc Drive could not be initialized!", 1);
+			ClearScreen();
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, 232, "The Disc Drive could not be initialized!" );
+			ExitToLoader(1);
 		}
 		DI_Close();
-
+		
 		u8 *DIBuf = memalign(32,0x800);
 		memset(DIBuf, 0, 0x20);
 		DCFlushRange(DIBuf, 0x20);
@@ -463,7 +576,9 @@
 			if( IsGCGame(DIBuf) == false )
 			{
 				free(DIBuf);
-				ShowMessageScreenAndExit("The Disc in the Drive is not a GC Disc!", 1);
+				ClearScreen();
+				PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, 232, "The Disc in the Drive is not a GC Disc!" );
+				ExitToLoader(1);
 			}
 		}
 		memcpy(&(ncfg->GameID), DIBuf, 4);
@@ -487,7 +602,7 @@
 		// Write config to the game device, used by the Nintendont kernel.
 		char ConfigPath[20];
 		snprintf(ConfigPath, sizeof(ConfigPath), "%s:/nincfg.bin", GetRootDevice());
-		if (f_open_char(&cfg, ConfigPath, FA_WRITE|FA_OPEN_ALWAYS) == FR_OK)
+		if (f_open_char(&cfg, ConfigPath, FA_WRITE|FA_OPEN_ALWAYS) == FR_OK)		
 		{
 			UINT wrote;
 			f_write(&cfg, ncfg, sizeof(NIN_CFG), &wrote);
@@ -494,12 +609,14 @@
 			f_close(&cfg);
 		}
 	}
-
 	// Check for multi-game disc images.
 	u32 ISOShift = 0;
 	if(memcmp(&(ncfg->GameID), "COBR", 4) == 0 || memcmp(&(ncfg->GameID), "GGCO", 4) == 0
-		|| memcmp(&(ncfg->GameID), "GCO", 3) == 0 || memcmp(&(ncfg->GameID), "RGCO", 4) == 0)
-	{
+	|| memcmp(&(ncfg->GameID), "GCO", 3) == 0 || memcmp(&(ncfg->GameID), "RGCO", 4) == 0)
+		{
+		which_bg = BG_NONE;
+		BackTheme();
+
 		u32 i, j = 0;
 		u32 Offsets[15];
 		gameinfo gi[15];
@@ -508,7 +625,7 @@
 		FIL f;
 		UINT read;
 		FRESULT fres = FR_DISK_ERR;
-
+		
 		if(CurDICMD)
 		{
 			ReadRealDisc(MultiHdr, 0, 0x800, CurDICMD);
@@ -521,8 +638,7 @@
 			if (fres == FR_OK)
 				f_read(&f, MultiHdr, 0x800, &read);
 		}
-
-		//Damn you COD for sharing this ID!
+//Damn you COD for sharing this ID!
 		if (fres != FR_OK || (memcmp(MultiHdr, "GCO", 3) == 0 && memcmp(MultiHdr+4, "52", 3) == 0))
 		{
 			free(MultiHdr);
@@ -558,9 +674,7 @@
 				}
 			}
 			free(GameHdr);
-			free(MultiHdr);
 			f_close(&f);
-
 			bool redraw = 1;
 			ClearScreen();
 			u32 PosX = 0;
@@ -596,21 +710,27 @@
 				else
 					UpHeld = 0;
 				if( redraw )
-				{
-					PrintInfo();
-					for( i=0; i < j; ++i )
-						PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*4 + i * 20, "%50.50s [%.6s]%s", 
-							gi[i].Name, gi[i].ID, i == PosX ? ARROW_LEFT : " " );
-					GRRLIB_Render();
-					Screenshot();
-					ClearScreen();
-					redraw = false;
-				}
+			{
+				PrintInfo();
+				for( i=0; i < j; ++i )
+		if (which_bg == BG_NONE)
+		{
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*5 + i * 20, "%50.50s [%.6s]%s", gi[i].Name, gi[i].ID, i == PosX ? ARROW_LEFT : " " );
+		}
+		else if (which_bg == BG_LEGACY)
+		{
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*5 + i * 20, "%50.50s [%.6s]%s", gi[i].Name, gi[i].ID, i == PosX ? ARROW_LEFT : " " );
+		}
+				GRRLIB_Render();
+				Screenshot();
+				ClearScreen();
+				redraw = false;
 			}
-			ISOShift = Offsets[PosX];
-			memcpy(&(ncfg->GameID), gi[PosX].ID, 4);
 		}
+		ISOShift = Offsets[PosX];
+		memcpy(&(ncfg->GameID), gi[PosX].ID, 4);
 	}
+	}
 //multi-iso game hack
 	*(vu32*)0xD300300C = ISOShift;
 
@@ -640,17 +760,20 @@
 		}
 	}
 
+	u32 IsTRIGame = 0;
+	if (ncfg->GameID != 0x47545050) //Damn you Knights Of The Temple!
+	IsTRIGame = TRISetupGames(ncfg->GamePath, CurDICMD, ISOShift);
+
 	if(ncfg->Config & NIN_CFG_MEMCARDEMU)
-	{
+		{
 		// Memory card emulation is enabled.
 		// Set up the memory card file.
 		char BasePath[20];
 		snprintf(BasePath, sizeof(BasePath), "%s:/saves", GetRootDevice());
 		f_mkdir_char(BasePath);
-
 		char MemCardName[8];
 		memset(MemCardName, 0, 8);
-		if ( ncfg->Config & NIN_CFG_MC_MULTI )
+		if (( ncfg->Config & NIN_CFG_MC_MULTI ) && (IsTRIGame == 0)) //(TRIGame == TRI_NONE)
 		{
 			// "Multi" mode enabled.
 			// Use one memory card for USA/PAL games,
@@ -660,9 +783,11 @@
 			else
 				memcpy(MemCardName, "ninmem", 6);
 		}
+		else if(IsTRIGame != 0) //if((IsTRIGame(ncfg->GamePath, CurDICMD, ISOShift) != 0))  
+			ncfg->Config &= ~NIN_CFG_MEMCARDEMU;
 		else
 		{
-			// One card per game.
+			// One card per game.		
 			memcpy(MemCardName, &(ncfg->GameID), 4);
 		}
 
@@ -676,7 +801,8 @@
 			if(GenerateMemCard(MemCard) == false)
 			{
 				ClearScreen();
-				ShowMessageScreenAndExit("Failed to create Memory Card File!", 1);
+				PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, 232, "Failed to create Memory Card File!" );
+				ExitToLoader(1);
 			}
 		}
 		else
@@ -685,17 +811,6 @@
 			f_close(&f);
 		}
 	}
-	else
-	{
-		// Using real memory card slots. (Wii only)
-		// Setup real SRAM language.
-		syssram *sram;
-		sram = __SYS_LockSram();
-		sram->lang = ncfg->Language;
-		__SYS_UnlockSram(1); // 1 -> write changes
-		while(!__SYS_SyncSram());
-	}
-
 	#define GCN_IPL_SIZE 2097152
 	#define TRI_IPL_SIZE 1048576
 	void *iplbuf = NULL;
@@ -702,14 +817,8 @@
 	bool useipl = false;
 	bool useipltri = false;
 
-	//Check if game is Triforce game
-	u32 IsTRIGame = 0;
-	if (ncfg->GameID != 0x47545050) //Damn you Knights Of The Temple!
-		IsTRIGame = TRISetupGames(ncfg->GamePath, CurDICMD, ISOShift);
-
 	if(IsTRIGame == 0)
 	{
-		// Attempt to load the GameCube IPL.
 		char iplchar[32];
 		iplchar[0] = 0;
 		switch (ncfg->GameID & 0xFF)
@@ -745,7 +854,6 @@
 	}
 	else
 	{
-		// Attempt to load the Triforce IPL. (segaboot)
 		char iplchar[32];
 		snprintf(iplchar, sizeof(iplchar), "%s:/segaboot.bin", GetRootDevice());
 		FIL f;
@@ -762,8 +870,17 @@
 			f_close(&f);
 		}
 	}
+	if((ncfg->Config & NIN_CFG_AUTO_BOOT) == 0)
+	{	
+	// Load Custom Background
+	GRRLIB_FreeTexture(background);
+	CheckTheme();
+	//GRRLIB_Render();
+	FadeIt();
+	sleep(1);
+	}
 
-	//sync changes
+//sync changes
 	CloseDevices();
 
 	WPAD_Disconnect(0);
@@ -773,6 +890,7 @@
 
 	WUPC_Shutdown();
 	WPAD_Shutdown();
+	
 
 	//before flushing do game specific patches
 	if(ncfg->Config & NIN_CFG_FORCE_PROG &&
@@ -782,34 +900,35 @@
 		gprintf("Disabling Force Progressive for this game\r\n");
 		ncfg->Config &= ~NIN_CFG_FORCE_PROG;
 	}
-
+	
 	//make sure the cfg gets to the kernel
 	DCStoreRange((void*)ncfg, sizeof(NIN_CFG));
-
-//set current time
+	//set current time
 	u32 bias = 0, cur_time = 0;
 	__SYS_GetRTC(&cur_time);
 	if(CONF_GetCounterBias(&bias) >= 0)
 		cur_time += bias;
 	settime(secs_to_ticks(cur_time));
-//hand over approx time passed since 1970
+	//hand over approx time passed since 1970
 	*(vu32*)0xD3003424 = (cur_time+946684800);
 
-//set status for kernel to start running
+	//set status for kernel to start running
 	*(vu32*)0xD3003420 = 0x0DEA;
+    if (which_bg == BG_NONE)
+    {
 	while(1)
 	{
 		DCInvalidateRange( STATUS, 0x20 );
 		if( STATUS_LOADING == 0xdeadbeef )
 			break;
-
+		
 		PrintInfo();
-
+		
 		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*6, "Loading patched kernel... %d", STATUS_LOADING);
 		if(STATUS_LOADING == 0)
 		{
 			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*7, "ES_Init...");
-			// Cleans the -1 when it's past it to avoid confusion if another error happens. e.g. before it showed "81" instead of "8" if the controller was unplugged.
+		// Cleans the -1 when it's past it to avoid confusion if another error happens. e.g. before it showed "81" instead of "8" if the controller was unplugged.
 			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 163, MENU_POS_Y + 20*6, " ");
 		}
 		if((STATUS_LOADING > 0 || abs(STATUS_LOADING) > 1) && STATUS_LOADING < 20)
@@ -827,7 +946,7 @@
 		if(STATUS_LOADING == -3)
 			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
 		if(STATUS_LOADING == 5) {
-/* 			if (timeout == 0)
+/*			if (timeout == 0)
 				timeout = ticks_to_secs(gettime()) + 20; // Set timer for 20 seconds
 			else if (timeout <= ticks_to_secs(gettime())) {
 				STATUS_ERROR = -7;
@@ -836,7 +955,7 @@
 				//memset( (void*)0x92f00000, 0, 0x100000 );
 				//DCFlushRange( (void*)0x92f00000, 0x100000 );
 				//ExitToLoader(1);
-			}*/
+			}*/		
 			PrintFormat(DEFAULT_SIZE, (STATUS_ERROR == -7) ? MAROON:BLACK, MENU_POS_X, MENU_POS_Y + 20*10, (STATUS_ERROR == -7) ? "Checking FS... Timeout!" : "Checking FS...");
 		}
 		if(abs(STATUS_LOADING) > 5 && abs(STATUS_LOADING) < 20)
@@ -856,31 +975,300 @@
 			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*13, "Loading config...");
 		if(abs(STATUS_LOADING) > 7 && abs(STATUS_LOADING) < 20)
 			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*13, "Loading config... Done!");
-		/*if(STATUS_LOADING == 8)
+		if(STATUS_LOADING == 9)
+			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init DI... %40s", " ");
+		if(abs(STATUS_LOADING) > 9 && abs(STATUS_LOADING) < 20)
+			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init DI... Done! %35s", " ");
+		if(STATUS_LOADING == 10)
+			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "Init CARD...");
+		if(abs(STATUS_LOADING) > 10 && abs(STATUS_LOADING) < 20)
+			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "Init CARD... Done!");
+		GRRLIB_Screen2Texture(0, 0, screen_buffer, GX_FALSE); // Copy all status messages
+		GRRLIB_Render();
+		ClearScreen();
+ 	while((STATUS_LOADING < -1) && (STATUS_LOADING > -20)) //displaying a fatal error
+	;} //do nothing wait for shutdown	
+	DrawBuffer(); // Draw all status messages
+	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*16, "Nintendont kernel looping, loading game...");
+	GRRLIB_Render();
+	DrawBuffer(); // Draw all status messages
+}
+
+ //custom purple progress bar for light background bar
+	else if (which_bg == BG_LIGHT)
+	{ while(1)
+    {
+    	DCInvalidateRange( STATUS, 0x20 );
+		if( STATUS_LOADING == 0xdeadbeef )
+		break;
+		
+        PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 0)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 90*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 0 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 110*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 2)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 130*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 2 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 150*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -2)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*8, "Init USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 3)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 170*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 3 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 190*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+         if(STATUS_LOADING == -3)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 4)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 210*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 4 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == 5) 
+			{ PrintFormat(DEFAULT_SIZE, (STATUS_ERROR == -7) ? MAROON:0x45587C00, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, (STATUS_ERROR == -7) ? "Checking FS... Timeout!" : "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");}
+        if(STATUS_LOADING > 5 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 270*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -5)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*10, "Checking FS... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 6)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 290*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 6 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 310*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -6)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 7)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 330*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 7 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 350*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 8)
+        {
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 370*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+			hid_count++;
+			if ( (STATUS_ERROR) == 1 && (hid_count > 15))
+			{
+				PrintFormat(DEFAULT_SIZE, 0xFFD70000, MENU_POS_X, MENU_POS_Y + 17*24, "          Make sure the Controller is plugged in");
+			}			else
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "%50s", " ");	
+		}
+        if(STATUS_LOADING > 8 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 390*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -8)
 		{
-			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... ");
-			if ( STATUS_ERROR == 1)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Failed! Shutting down");
+			switch (STATUS_ERROR)
 			{
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "          Make sure the Controller is plugged in");
+				case -1:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "No Controller plugged in! %25s", " ");
+					break;	
+				case -2:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Missing %s:/controller.ini %20s", GetRootDevice(), " ");
+					break;	
+				case -3:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Controller does not match %s:/controller.ini %6s", GetRootDevice(), " ");
+					break;	
+				case -4:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid Polltype in %s:/controller.ini %12s", GetRootDevice(), " ");
+					break;	
+				case -5:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid DPAD value in %s:/controller.ini %9s", GetRootDevice(), " ");
+					break;	
+				case -6:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "PS3 controller init error %25s", " ");
+					break;	
+				case -7:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Gamecube adapter for Wii u init error %13s", " ");
+					break;	
+				default:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Unknown error %d %35s", STATUS_ERROR, " ");
+					break;	
 			}
-			else
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "%50s", " ");
 		}
-		if(abs(STATUS_LOADING) > 8 && abs(STATUS_LOADING) < 20)
+        if(STATUS_LOADING == 9)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 410*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 9 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 430*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 10)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 450*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 10 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 470*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        GRRLIB_Screen2Texture(0, 0, screen_buffer, GX_FALSE); // Copy all status messages
+        GRRLIB_Render();
+        ClearScreen();
+        PrintInfo();
+    }
+ 
+    //gprintf("Nintendont at your service!\r\n");
+ 
+    GRRLIB_DrawImg(0, 0, screen_buffer, 0, 1, 1, 0xFFFFFFFF); // Draw all status messages
+            PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 490*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+    GRRLIB_Render();
+}
+
+ //silver progress bar for dark background bar
+	else if (which_bg == BG_DARK)
+	{    while(1)
+    {
+    	DCInvalidateRange( STATUS, 0x20 );
+		if( STATUS_LOADING == 0xdeadbeef )
+		break;
+		
+        PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 0)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 90*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 0 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 110*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 2)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 130*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 2 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 150*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -2)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*8, "Init USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 3)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 170*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 3 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 190*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+         if(STATUS_LOADING == -3)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 4)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 210*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 4 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+ 		if(STATUS_LOADING == 5) 
+			{ PrintFormat(DEFAULT_SIZE, (STATUS_ERROR == -7) ? MAROON:0xC0C0C000, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, (STATUS_ERROR == -7) ? "Checking FS... Timeout!" : "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");}
+        if(STATUS_LOADING > 5 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 270*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -5)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*10, "Checking FS... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 6)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 290*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 6 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 310*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -6)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 7)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 330*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 7 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 350*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 8)
+        {
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 370*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+			hid_count++;
+			if ( (STATUS_ERROR) == 1 && (hid_count > 15))
+			{
+				PrintFormat(DEFAULT_SIZE, 0xFFD70000, MENU_POS_X, MENU_POS_Y + 17*24, "          Make sure the Controller is plugged in");
+			}			else
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "%50s", " ");		
+		}
+        if(STATUS_LOADING > 8 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 390*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+		if(STATUS_LOADING == -8)
 		{
-			if (ncfg->Config & NIN_CFG_NATIVE_SI)
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Using ONLY NATIVE Gamecube Ports");
-			else if ((ncfg->MaxPads == 1) && (ncfg->Config & NIN_CFG_HID))
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Using Gamecube and HID Ports");
-			else if ((ncfg->MaxPads > 0) && (ncfg->Config & NIN_CFG_HID))
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Using Gamecube, HID, and BT Ports");
-			else if (ncfg->MaxPads > 0)
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Using Gamecube and BT Ports");
-			else if (ncfg->Config & NIN_CFG_HID)
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Using HID and Bluetooth Ports");
-			else
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Using Bluetooth Ports... Done!");
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Failed! Shutting down");
+			switch (STATUS_ERROR)
+			{
+				case -1:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "No Controller plugged in! %25s", " ");
+					break;	
+				case -2:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Missing %s:/controller.ini %20s", GetRootDevice(), " ");
+					break;	
+				case -3:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Controller does not match %s:/controller.ini %6s", GetRootDevice(), " ");
+					break;	
+				case -4:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid Polltype in %s:/controller.ini %12s", GetRootDevice(), " ");
+					break;	
+				case -5:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid DPAD value in %s:/controller.ini %9s", GetRootDevice(), " ");
+					break;	
+				case -6:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "PS3 controller init error %25s", " ");
+					break;	
+				case -7:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Gamecube adapter for Wii u init error %13s", " ");
+					break;	
+				default:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Unknown error %d %35s", STATUS_ERROR, " ");
+					break;	
+			}
 		}
+        if(STATUS_LOADING == 9)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 410*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 9 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 430*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING == 10)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 450*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        if(STATUS_LOADING > 10 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 470*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+        GRRLIB_Screen2Texture(0, 0, screen_buffer, GX_FALSE); // Copy all status messages
+        GRRLIB_Render();
+        ClearScreen();
+        PrintInfo();
+    }
+ 
+    //gprintf("Nintendont at your service!\r\n");
+ 
+    GRRLIB_DrawImg(0, 0, screen_buffer, 0, 1, 1, 0xFFFFFFFF); // Draw all status messages
+            PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 490*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88");
+    GRRLIB_Render();
+}	
+	
+ //white loading bars
+	else if (which_bg == BG_BARS)
+	{     while(1)
+    {
+    	DCInvalidateRange( STATUS, 0x20 );
+		if( STATUS_LOADING == 0xdeadbeef )
+		break;
+		
+        PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING == 0)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 90*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 0 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 110*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING == 2)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 130*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 2 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 150*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+		if(STATUS_LOADING == -2)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*8, "Init USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 3)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 170*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 3 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 190*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+         if(STATUS_LOADING == -3)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 4)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 210*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 4 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+ 		if(STATUS_LOADING == 5) 
+			{ PrintFormat(DEFAULT_SIZE, (STATUS_ERROR == -7) ? MAROON:WHITE, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, (STATUS_ERROR == -7) ? "Checking FS... Timeout!" : "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");}
+        if(STATUS_LOADING > 5 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 270*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+		if(STATUS_LOADING == -5)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*10, "Checking FS... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 6)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 290*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 6 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 310*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+		if(STATUS_LOADING == -6)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 7)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 330*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 7 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 350*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING == 8)
+        {
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 370*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+			hid_count++;
+			if ( (STATUS_ERROR) == 1 && (hid_count > 15))
+			{
+				PrintFormat(DEFAULT_SIZE, 0xFFD70000, MENU_POS_X, MENU_POS_Y + 17*24, "          Make sure the Controller is plugged in");
+			}			else
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "%50s", " ");	
+		}
+        if(STATUS_LOADING > 8 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 390*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
 		if(STATUS_LOADING == -8)
 		{
 			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Failed! Shutting down");
@@ -888,54 +1276,204 @@
 			{
 				case -1:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "No Controller plugged in! %25s", " ");
-					break;
+					break;	
 				case -2:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Missing %s:/controller.ini %20s", GetRootDevice(), " ");
-					break;
+					break;	
 				case -3:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Controller does not match %s:/controller.ini %6s", GetRootDevice(), " ");
-					break;
+					break;	
 				case -4:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid Polltype in %s:/controller.ini %12s", GetRootDevice(), " ");
-					break;
+					break;	
 				case -5:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid DPAD value in %s:/controller.ini %9s", GetRootDevice(), " ");
-					break;
+					break;	
 				case -6:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "PS3 controller init error %25s", " ");
-					break;
+					break;	
 				case -7:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Gamecube adapter for Wii u init error %13s", " ");
-					break;
+					break;	
 				default:
 					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Unknown error %d %35s", STATUS_ERROR, " ");
-					break;
+					break;	
 			}
-		}*/
+		}
+        if(STATUS_LOADING == 9)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 410*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 9 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING == 10)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 450*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        if(STATUS_LOADING > 10 && STATUS_LOADING < 20)
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 470*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+        GRRLIB_Screen2Texture(0, 0, screen_buffer, GX_FALSE); // Copy all status messages
+        GRRLIB_Render();
+        ClearScreen();
+        PrintInfo();
+    }
+ 
+    //gprintf("Nintendont at your service!\r\n");
+ 
+    GRRLIB_DrawImg(0, 0, screen_buffer, 0, 1, 1, 0xFFFFFFFF); // Draw all status messages
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 490*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83");
+    GRRLIB_Render();
+}	
+	
+ //white no loading bar
+	else if ((which_bg == BG_NOBAR) || (which_bg == BG_BLACK))
+	{     while(1)
+    {
+    	DCInvalidateRange( STATUS, 0x20 );
+		if( STATUS_LOADING == 0xdeadbeef )
+		break;
+		
+		if(STATUS_LOADING == -2)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*8, "Init USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+         if(STATUS_LOADING == -3)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+ 		if(STATUS_LOADING == 5) 
+			{ PrintFormat(DEFAULT_SIZE, (STATUS_ERROR == -7) ? MAROON:WHITE, MENU_POS_X + 230*1, MENU_POS_Y + 20*19, (STATUS_ERROR == -7) ? "Checking FS... Timeout!" : " ");}
+		if(STATUS_LOADING == -5)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*10, "Checking FS... Error! %d Shutting down", STATUS_ERROR);
+		if(STATUS_LOADING == -6)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules... Error! %d Shutting down", STATUS_ERROR);
+        if(STATUS_LOADING == 8)
+        {
+            PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 370*1, MENU_POS_Y + 20*19, " ");
+			hid_count++;
+			if ( (STATUS_ERROR) == 1 && (hid_count > 15))
+			{
+				PrintFormat(DEFAULT_SIZE, 0xFFD70000, MENU_POS_X, MENU_POS_Y + 17*24, "          Make sure the Controller is plugged in");
+			}			else
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "%50s", " ");	
+		}
+		if(STATUS_LOADING == -8)
+		{
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*14, "Init HID devices... Failed! Shutting down");
+			switch (STATUS_ERROR)
+			{
+				case -1:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "No Controller plugged in! %25s", " ");
+					break;	
+				case -2:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Missing %s:/controller.ini %20s", GetRootDevice(), " ");
+					break;	
+				case -3:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Controller does not match %s:/controller.ini %6s", GetRootDevice(), " ");
+					break;	
+				case -4:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid Polltype in %s:/controller.ini %12s", GetRootDevice(), " ");
+					break;	
+				case -5:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Invalid DPAD value in %s:/controller.ini %9s", GetRootDevice(), " ");
+					break;	
+				case -6:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "PS3 controller init error %25s", " ");
+					break;	
+				case -7:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Gamecube adapter for Wii u init error %13s", " ");
+					break;	
+				default:
+					PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*15, "Unknown error %d %35s", STATUS_ERROR, " ");
+					break;	
+			}
+		}
+        GRRLIB_Screen2Texture(0, 0, screen_buffer, GX_FALSE); // Copy all status messages
+        GRRLIB_Render();
+        ClearScreen();
+        PrintInfo();
+    }
+ 
+    //gprintf("Nintendont at your service!\r\n");
+ 
+    GRRLIB_DrawImg(0, 0, screen_buffer, 0, 1, 1, 0xFFFFFFFF); // Draw all status messages
+    GRRLIB_Render();
+}	
+	
+	//Dark Background & White text
+    else if (which_bg == BG_LEGACY)
+    {
+	while(1)
+	{
+		DCInvalidateRange( STATUS, 0x20 );
+		if( STATUS_LOADING == 0xdeadbeef )
+			break;
+		
+		PrintInfo();
+		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*6, "Loading patched kernel... %d", STATUS_LOADING);
+		if(STATUS_LOADING == 0)
+		{
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*7, "ES_Init...");
+		// Cleans the -1 when it's past it to avoid confusion if another error happens. e.g. before it showed "81" instead of "8" if the controller was unplugged.
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 163, MENU_POS_Y + 20*6, " ");
+		}
+		if((STATUS_LOADING > 0 || abs(STATUS_LOADING) > 1) && STATUS_LOADING < 20)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*7, "ES_Init... Done!");
+		if(STATUS_LOADING == 2)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*8, "Initing storage devices...");
+		if(abs(STATUS_LOADING) > 2 && abs(STATUS_LOADING) < 20)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*8, "Initing storage devices... Done!");
+		if(STATUS_LOADING == -2)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*8, "Initing storage devices... Error! %d  Shutting down", STATUS_ERROR);
+		if(STATUS_LOADING == 3)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device...");
+		if(abs(STATUS_LOADING) > 3 && abs(STATUS_LOADING) < 20)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Done!");
+		if(STATUS_LOADING == -3)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*9, "Mounting USB/SD device... Error! %d  Shutting down", STATUS_ERROR);
+		if(STATUS_LOADING == 5) {
+			PrintFormat(DEFAULT_SIZE, (STATUS_ERROR == -7) ? MAROON:WHITE, MENU_POS_X, MENU_POS_Y + 20*10, (STATUS_ERROR == -7) ? "Checking FS... Timeout!" : "Checking FS...");
+		}
+		if(abs(STATUS_LOADING) > 5 && abs(STATUS_LOADING) < 20)
+		{
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Checking FS... Done!");
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*11, "Drive size: %.02f%s Sector size: %d", STATUS_DRIVE, STATUS_GB_MB ? "GB" : "MB", STATUS_SECTOR);
+		}
+		if(STATUS_LOADING == -5)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*10, "Checking FS... Error! %d Shutting down", STATUS_ERROR);
+		if(STATUS_LOADING == 6)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules...");
+		if(abs(STATUS_LOADING) > 6 && abs(STATUS_LOADING) < 20)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules... Done!");
+		if(STATUS_LOADING == -6)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*12, "ES_LoadModules... Error! %d Shutting down", STATUS_ERROR);
+		if(STATUS_LOADING == 7)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*13, "Loading config...");
+		if(abs(STATUS_LOADING) > 7 && abs(STATUS_LOADING) < 20)
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*13, "Loading config... Done!");
 		if(STATUS_LOADING == 9)
-			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init DI... %40s", " ");
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*14, "Init DI... %40s", " ");
 		if(abs(STATUS_LOADING) > 9 && abs(STATUS_LOADING) < 20)
-			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, "Init DI... Done! %35s", " ");
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*14, "Init DI... Done! %35s", " ");
 		if(STATUS_LOADING == 10)
-			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "Init CARD...");
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*15, "Init CARD...");
 		if(abs(STATUS_LOADING) > 10 && abs(STATUS_LOADING) < 20)
-			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*15, "Init CARD... Done!");
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*15, "Init CARD... Done!");
 		GRRLIB_Screen2Texture(0, 0, screen_buffer, GX_FALSE); // Copy all status messages
 		GRRLIB_Render();
 		ClearScreen();
-		while((STATUS_LOADING < -1) && (STATUS_LOADING > -20)) //displaying a fatal error
-				; //do nothing wait for shutdown
+		while ((STATUS_LOADING < -1) && (STATUS_LOADING > -20))	//displaying a fatal error
+			{ }	//do nothing wait for shutdown
 	}
+
+	gprintf("Nintendont at your service!\r\n");
+
 	DrawBuffer(); // Draw all status messages
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*17, "Nintendont kernel looping, loading game...");
+	PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*16, "Nintendont kernel looping, loading game...");
 	GRRLIB_Render();
 	DrawBuffer(); // Draw all status messages
-//	memcpy( (void*)0x80000000, (void*)0x90140000, 0x1200000 );
+}	
+
+	else{}
+
 	GRRLIB_FreeTexture(background);
 	GRRLIB_FreeTexture(screen_buffer);
 	GRRLIB_FreeTTF(myFont);
 	GRRLIB_Exit();
-
+	
 	gprintf("GameRegion:");
 
 	u32 vidForce = (ncfg->VideoMode & NIN_VID_FORCE);
@@ -958,6 +1496,7 @@
 		case 'X':
 		case 'Y':
 		case 'Z':
+
 			if(progressive || (vidForce && (vidForceMode == NIN_VID_FORCE_PAL60 ||
 				vidForceMode == NIN_VID_FORCE_MPAL || vidForceMode == NIN_VID_FORCE_NTSC)))
 				*(vu32*)0x800000CC = 5;
@@ -993,8 +1532,8 @@
 	{
 		switch(vidForceMode)
 		{
-			case NIN_VID_FORCE_PAL50:
-				vmode = &TVPal528IntDf;
+		case NIN_VID_FORCE_PAL50:
+			vmode = &TVPal528IntDf;
 				break;
 			case NIN_VID_FORCE_PAL60:
 				vmode = &TVEurgb60Hz480IntDf;
@@ -1008,8 +1547,11 @@
 				break;
 		}
 	}
+	
 	if((ncfg->Config & NIN_CFG_MEMCARDEMU) == 0) //setup real sram video
 	{
+		// Using real memory card slots. (Wii only)
+		// Setup real SRAM language.		
 		syssram *sram;
 		sram = __SYS_LockSram();
 		sram->display_offsetH = 0;	// Clear Offset
@@ -1043,7 +1585,7 @@
 		VIDEO_WaitVSync();
 	else while(VIDEO_GetNextField())
 		VIDEO_WaitVSync();
-
+	
 	*(u16*)(0xCC00501A) = 156;	// DSP refresh rate
 	/* from libogc, get all gc pads to work */
 	u32 buf[2];
@@ -1088,30 +1630,30 @@
 	//0x9300300C is already used for multi-iso
 	memset((void*)0x93003010, 0, 0x10); //disable rumble on bootup
 	DCFlushRange((void*)0x93003000, 0x20);
-
-	//lets prevent weird events
-	__STM_Close();
-
-	//THIS thing right here, it interrupts some games and breaks them
-	//To fix that, call ExecSuspendScheduler so WC24 just sleeps
-	u32 out = 0;
-	fd = IOS_Open("/dev/net/kd/request", 0);
-	IOS_Ioctl(fd, IOCTL_ExecSuspendScheduler, NULL, 0, &out, 4);
-	IOS_Close(fd);
-
+	
+ 	//lets prevent weird events
+ 	__STM_Close();
+ 	
+ 	//THIS thing right here, it interrupts some games and breaks them
+ 	//To fix that, call ExecSuspendScheduler so WC24 just sleeps
+ 	u32 out = 0;
+ 	fd = IOS_Open("/dev/net/kd/request", 0);
+ 	IOS_Ioctl(fd, IOCTL_ExecSuspendScheduler, NULL, 0, &out, 4);
+ 	IOS_Close(fd);
+ 	
 	write16(0xD8B420A, 0); //disable MEMPROT again after reload
 	//u32 level = IRQ_Disable();
 	__exception_closeall();
 	__lwp_thread_closeall();
 
-	DVDStartCache(); //waits for kernel start
+ 	DVDStartCache(); //waits for kernel start
 	DCInvalidateRange((void*)0x90000000, 0x1000000);
 	memset((void*)(void*)0x90000000, 0, 0x1000000); //clear ARAM
 	DCFlushRange((void*)0x90000000, 0x1000000);
 
 	gprintf("Game Start\n");
-
-	if(useipl)
+	
+	if((useipl) && (memcmp(&(ncfg->GameID), "RELS", 4) != 0) && (memcmp(&(ncfg->GameID), "D4", 2) != 0)) //&& (ncfg->Config & NIN_CFG_MEMCARDEMU)
 	{
 		load_ipl(iplbuf);
 		*(vu32*)0xD3003420 = 0x5DEA;
@@ -1144,6 +1686,6 @@
 		"blr\n"
 	);
 	//IRQ_Restore(level);
-
 	return 0;
 }
+
Index: loader/source/menu.c
===================================================================
--- loader/source/menu.c	(revision 542)
+++ loader/source/menu.c	(working copy)
@@ -32,18 +32,18 @@
 #include <unistd.h>
 #include <ogc/stm.h>
 #include <ogc/video.h>
-#include <ogc/video_types.h>
-#include <ogc/consol.h>
-#include <ogc/system.h>
-//#include <fat.h>
-#include <di/di.h>
-#include "menu.h"
-#include "../../common/include/CommonConfigStrings.h"
-
-#include "ff_utf8.h"
-
-// Device state.
-typedef enum {
+#include <ogc/video_types.h>
+#include <ogc/consol.h>
+#include <ogc/system.h>
+#include <fat.h>
+#include <di/di.h>
+#include "../../common/include/CommonConfigStrings.h"
+#include "menu.h"
+#include "ff_utf8.h"
+#include "diskio.h"
+
+// Device state.
+typedef enum {
 	// Device is open and has a "games" directory.
 	DEV_OK = 0,
 	// Device could not be opened.
@@ -57,12 +57,14 @@
  * Print information about the selected device.
  */
 static void PrintDevInfo(void);
-
-extern NIN_CFG* ncfg;
-
-u32 Shutdown = 0;
-extern char *launch_dir;
-
+
+extern NIN_CFG* ncfg;
+
+extern int ExitBoot;
+
+u32 Shutdown = 0;
+extern char *launch_dir;
+
 inline u32 SettingY(u32 row)
 {
 	return 127 + 16 * row;
@@ -115,27 +117,28 @@
  * @return DevState value:
  * - DEV_OK: Device opened and has a "games/" directory.
  * - DEV_NO_OPEN: Could not open the storage device.
- * - DEV_NO_GAMES: No "games/" directory was found.
- */
-static DevState LoadGameList(gameinfo *gi, u32 sz, u32 *pGameCount)
-{
-	// Create a list of games
-	char filename[MAXPATHLEN];	// Current filename.
-	char gamename[65];		// Game title.
-	char buf[0x100];		// Disc header.
-	int gamecount = 0;		// Current game count.
-
-	if( !IsWiiU() )
-	{
-		// Pseudo game for booting a GameCube disc on Wii.
+ * - DEV_NO_GAMES: No "games/" directory was found.
+ */
+static DevState LoadGameList(gameinfo *gi, u32 sz, u32 *pGameCount)
+{	
+	// Create a list of games
+	char filename[MAXPATHLEN];	// Current filename.
+	char gamename[65];		// Game title.
+	char buf[0x100];		// Disc header.
+	int gamecount = 0;		// Current game count.
+
+
+	if( !IsWiiU() )
+	{
+		// Pseudo game for booting a GameCube disc on Wii.
 		gi[0].ID[0] = 'D',gi[0].ID[1] = 'I',gi[0].ID[2] = 'S';
-		gi[0].ID[3] = 'C',gi[0].ID[4] = '0',gi[0].ID[5] = '1';
-		gi[0].Name = "Boot GC Disc in Drive";
-		gi[0].NameAlloc = 0;
-		gi[0].DiscNumber = 0;
-		gi[0].Path = strdup("di:di");
-		gamecount++;
-	}
+		gi[0].ID[3] = 'C',gi[0].ID[4] = '0',gi[0].ID[5] = '1';
+		gi[0].Name = "Boot GC Disc in Drive";
+		gi[0].NameAlloc = 0;
+		gi[0].DiscNumber = 0;		
+		gi[0].Path = strdup("di:di");
+		gamecount++;
+	}
 
 	DIR pdir;
 	snprintf(filename, sizeof(filename), "%s:/games", GetRootDevice());
@@ -159,20 +162,20 @@
 		f_closedir(&pdir);
 		if (pGameCount)
 			*pGameCount = gamecount;
-		return DEV_NO_GAMES;
-	}
-
-	// Process the directory.
-	// TODO: chdir into /games/?
-	FILINFO fInfo;
-	FIL in;
-	while (f_readdir(&pdir, &fInfo) == FR_OK && fInfo.fname[0] != '\0')
-	{
-		// Game layout should be: /games/GAMEID/game.iso
-		// Search for subdirectories.
-		if (fInfo.fattrib & AM_DIR)
-		{
-			// Skip "." and "..".
+		return DEV_NO_GAMES;
+	}
+
+	// Process the directory.	
+	// TODO: chdir into /games/?
+	FILINFO fInfo;
+	FIL in;
+	while (f_readdir(&pdir, &fInfo) == FR_OK && fInfo.fname[0] != '\0')
+	{
+		// Game layout should be: /games/GAMEID/game.iso
+		// Search for subdirectories.	
+		if (fInfo.fattrib & AM_DIR)
+		{
+			// Skip "." and "..".
 			// This will also skip "hidden" directories.
 			if (fInfo.fname[0] == '.')
 				continue;
@@ -182,21 +185,21 @@
 			// NOTE: fInfo.fname[] is UTF-16.
 			const char *filename_utf8 = wchar_to_char(fInfo.fname);
 			int fnlen = snprintf(filename, sizeof(filename), "%s:/games/%s/",
-					     GetRootDevice(), filename_utf8);
-
-			//Test if game.iso exists and add to list
-			bool found = false;
-			u32 DiscNumber;
-			for (DiscNumber = 0; DiscNumber < 2; DiscNumber++)
+					     GetRootDevice(), filename_utf8);
+
+			//Test if game.iso exists and add to list
+
+			bool found = false;
+			u32 DiscNumber;
+			for (DiscNumber = 0; DiscNumber < 2; DiscNumber++)
 			{
 				if (DiscNumber)
-					memcpy(&filename[fnlen], "disc2.iso", 10);
-				else
-					memcpy(&filename[fnlen], "game.iso", 9);
-
-				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
-				{
-					// Read the disc header
+					memcpy(&filename[fnlen], "disc2.iso", 10);
+				else
+					memcpy(&filename[fnlen], "game.iso", 9);
+				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
+				{
+					// Read the disc header
 					//gprintf("(%s) ok\n", filename );
 					UINT read;
 					f_read(&in, buf, 0x100, &read);
@@ -235,52 +238,50 @@
 			// If game.iso wasn't found, check for FST format.
 			if (!found)
 			{
-				memcpy(&filename[fnlen], "sys/boot.bin", 13);
-				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
-				{
-					//gprintf("(%s) ok\n", filename );
-					UINT read;
-					f_read(&in, buf, 0x100, &read);
-					f_close(&in);
+				memcpy(&filename[fnlen], "sys/boot.bin", 13);
+				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
+				{
+				//	gprintf("(%s) ok\n", filename );
+					UINT read;
+					f_read(&in, buf, 0x100, &read);
+					f_close(&in);
 
 					if (read == 0x100 && IsGCGame((u8*)buf))	// Must be GC game
-					{
-						// Terminate the filename at the game's base directory.
-						filename[fnlen] = 0;
-
-						memcpy(gi[gamecount].ID, buf, 6); //ID for EXI
-						gi[gamecount].DiscNumber = DiscNumber;
-
+					{
+						// Terminate the filename at the game's base directory.
+						filename[fnlen] = 0;
+ 
+						memcpy(gi[gamecount].ID, buf, 6); //ID for EXI
+						gi[gamecount].DiscNumber = DiscNumber;
+
 						// TODO: Check titles.txt?
 						strncpy(gamename, buf + 0x20, sizeof(gamename)-1);
-						gamename[sizeof(gamename)-1] = 0;
-						gi[gamecount].Name = strdup(gamename);
-						gi[gamecount].NameAlloc = 1;
-
-						gi[gamecount].Path = strdup( filename );
-						gamecount++;
-					}
+						gamename[sizeof(gamename)-1] = 0;
+						gi[gamecount].Name = strdup(gamename);
+						gi[gamecount].NameAlloc = 1;
+						
+						gi[gamecount].Path = strdup( filename );
+						gamecount++;
+					}
 				}
 			}
 		}
 
 		if (gamecount >= sz)	//if array is full
-			break;
-	}
-	f_closedir(&pdir);
+			break;
+	}
+	f_closedir(&pdir);
+	// Sort the list alphabetically.
+	// On Wii, the pseudo-entry for GameCube discs is always
+	// kept at the top.	
+	if( IsWiiU() )
+		qsort(gi, gamecount, sizeof(gameinfo), compare_names);
+	else if( gamecount > 1 )
+		qsort(&gi[1], gamecount-1, sizeof(gameinfo), compare_names);
+	// Save the game count.
+	if (pGameCount)
+		*pGameCount = gamecount;
 
-	// Sort the list alphabetically.
-	// On Wii, the pseudo-entry for GameCube discs is always
-	// kept at the top.
-	if( IsWiiU() )
-		qsort(gi, gamecount, sizeof(gameinfo), compare_names);
-	else if( gamecount > 1 )
-		qsort(&gi[1], gamecount-1, sizeof(gameinfo), compare_names);
-
-	// Save the game count.
-	if (pGameCount)
-		*pGameCount = gamecount;
-
 	return DEV_OK;
 }
 
@@ -296,13 +297,38 @@
 {
 	// Create a list of games
 	char filename[MAXPATHLEN];
-
-	// Depending on how many games are on the storage device,
-	// this could take a while.
-	ShowLoadingScreen();
-
-	// Load the game list.
-	u32 gamecount = 0;
+
+	// Depending on how many games are on the storage device,
+	// this could take a while.
+	//ShowLoadingScreen();
+		ClearScreen();
+		BackTheme();
+		if (which_bg == BG_NONE)
+		{
+		PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Loading, please wait...");
+		}
+		else if (which_bg == BG_LEGACY)
+		{
+		PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Loading, please wait...");
+		}
+		else
+		{
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 406, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 230, MENU_POS_Y + 410, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 408, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 408, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 406, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 410, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 228, MENU_POS_Y + 410, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, BLACK, 232, MENU_POS_Y + 406, "Loading, please wait...");
+		PrintFormat(DEFAULT_SIZE, WHITE, 230, MENU_POS_Y + 408, "Loading, please wait...");		
+		}
+		GRRLIB_Render();
+		sleep (1);
+		ClearScreen();
+
+	// Load the game list.
+	u32 gamecount = 0;
 	gameinfo gi[MAX_GAMES];
 
 	devState = LoadGameList(&gi[0], MAX_GAMES, &gamecount);
@@ -343,13 +369,13 @@
 
 	u32 ListMax = gamecount;
 	if( ListMax > 15 )
-		ListMax = 15;
-	bool SaveSettings = false;
-
-	// set default game to game that currently set in configuration
-	for (i = 0; i < gamecount; ++i)
-	{
-		if (strcasecmp(strchr(gi[i].Path,':')+1, ncfg->GamePath) == 0)
+		ListMax = 15;
+	bool SaveSettings = false;
+
+//	set default game to game that currently set in configuration
+	for (i = 0; i < gamecount; ++i)
+	{
+		if (strcasecmp(strchr(gi[i].Path,':')+1, ncfg->GamePath) == 0)
 		{
 			if( i >= ListMax )
 			{
@@ -358,25 +384,27 @@
 			} else {
 				PosX = i;
 			}
-			break;
-		}
-	}
-
-	u32 UpHeld = 0, DownHeld = 0;
-	while(1)
-	{
+			break;
+		}
+	}
+	UpdateScreen();
+	u32 UpHeld = 0, DownHeld = 0;
+	while(1)
+	{
 		VIDEO_WaitVSync();
 		FPAD_Update();
 
 		if( FPAD_Start(1) )
+		{
+			// Go back to the Settings menu.
+			selected = false;
+			//break;
+			ExitBoot = 0;
+			SelectDevAndGame();	
+		}
+
+		if( FPAD_Cancel(0) )
 		{
-			// Go back to the Settings menu.
-			selected = false;
-			break;
-		}
-
-		if( FPAD_Cancel(0) )
-		{
 			MenuMode ^= 1;
 
 			if( MenuMode == 0 )
@@ -386,13 +414,13 @@
 					ListMax = 15;
 				PosX = prevPosX;
 				ScrollX = prevScrollX;
-			}
-			else
-			{
-				ListMax = NIN_SETTINGS_LAST;
-
-				prevPosX = PosX;
-				PosX	= 0;
+			}
+			else
+			{
+				ListMax = (NIN_SETTINGS_LAST - 1);
+
+				prevPosX = PosX;
+				PosX	= 0;
 				prevScrollX = ScrollX;
 				ScrollX = 0;
 				settingPart = 0;
@@ -402,18 +430,32 @@
 		}
 
 	//	gprintf("\rS:%u P:%u G:%u M:%u    ", ScrollX, PosX, gamecount, ListMax );
-
-		if( MenuMode == 0 )		//game select menu
-		{
-			if( FPAD_Down(1) )
-			{
-				if(DownHeld == 0 || DownHeld > 10)
-				{
-					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
-
-					if( PosX + 1 >= ListMax )
-					{
-						if( PosX + 1 + ScrollX < gamecount)
+
+		if( MenuMode == 0 )		//game select menu
+		{
+			if(FPAD_X(0)) {				
+				UpdateNintendont();
+				redraw = 1;
+			}
+			if(FPAD_Y(0)) {
+				Credits();
+				redraw = 1;
+			}			
+			if( FPAD_Down(1) )
+			{
+				if(DownHeld == 0 || DownHeld > 10)
+				{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}					
+					if( PosX + 1 >= ListMax )
+					{
+						if( PosX + 1 + ScrollX < gamecount)
 							ScrollX++;
 						else {
 							PosX	= 0;
@@ -431,14 +473,20 @@
 				DownHeld++;
 			}
 			else
-				DownHeld = 0;
-			if( FPAD_Right(0) )
-			{
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
-
-				if( PosX == ListMax - 1 )
-				{
-					if( PosX + ListMax + ScrollX < gamecount)
+				DownHeld = 0;
+			if( FPAD_Right(0) )
+			{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}	
+				if( PosX == ListMax - 1 )
+				{
+					if( PosX + ListMax + ScrollX < gamecount)
 						ScrollX = ScrollX + ListMax;
 					else
 					if( PosX + ScrollX != gamecount -1)
@@ -453,18 +501,24 @@
 			
 				if((ncfg->Config & NIN_CFG_CHEATS) && (ncfg->Config & NIN_CFG_CHEAT_PATH))	//if cheat path being used
 					ncfg->Config = ncfg->Config & ~(NIN_CFG_CHEATS | NIN_CFG_CHEAT_PATH);		//clear it beacuse it cant be correct for a different game
-				redraw=1;
-				SaveSettings = true;
-			}
-			else if( FPAD_Up(1) )
-			{
-				if(UpHeld == 0 || UpHeld > 10)
-				{
-					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
-
-					if( PosX <= 0 )
-					{
-						if( ScrollX > 0 )
+				redraw=1;
+				SaveSettings = true;
+			}
+			if( FPAD_Up(1) )
+			{
+				if(UpHeld == 0 || UpHeld > 10)
+				{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}	
+					if( PosX <= 0 )
+					{
+						if( ScrollX > 0 )
 							ScrollX--;
 						else {
 							PosX	= ListMax - 1;
@@ -482,14 +536,20 @@
 				UpHeld++;
 			}
 			else
-				UpHeld = 0;
-			if( FPAD_Left(0) )
-			{
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
-
-				if( PosX == 0 )
-				{
-					if( ScrollX - (s32)ListMax >= 0 )
+				UpHeld = 0;
+			if( FPAD_Left(0) )
+			{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " ");
+					}	
+				if( PosX == 0 )
+				{
+					if( ScrollX - (s32)ListMax >= 0 )
 						ScrollX = ScrollX - ListMax;
 					else
 					if( ScrollX != 0 )
@@ -506,24 +566,40 @@
 				redraw=1;
 				SaveSettings = true;
 			}
-
-			if( FPAD_OK(0) )
-			{
-				// User selected a game.
-				selected = true;
-				break;
-			}
-
-			if( redraw )
-			{
-				PrintInfo();
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*0, "Home: Go Back");
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "A   : %s", MenuMode ? "Modify" : "Select");
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "B   : %s", MenuMode ? "Game List" : "Settings ");
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*3, MenuMode ? "X/1 : Update" : "");
-				PrintDevInfo();
-
-				// Starting position.
+
+			if( FPAD_OK(0) )
+			{
+				{
+				GRRLIB_FillScreen (BLACK);
+				// User selected a game.
+				selected = true;
+				break;
+				}
+			}
+
+			if( redraw )
+			{
+				PrintInfo();
+					if (which_bg == BG_NONE)
+					{
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Device");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : %s", MenuMode ? "Modify" : "Select");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : %s", MenuMode ? "Game List" : "Settings ");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "X / 1 : Updates & Themes");
+				PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Device");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : %s", MenuMode ? "Modify" : "Select");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : %s", MenuMode ? "Game List" : "Settings ");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "X / 1 : Updates & Themes");
+				PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");
+					}		
+								
+				PrintDevInfo();
+
+				// Starting position.
 				int gamelist_y = MENU_POS_Y + 20*4;
 				if (devState != DEV_OK)
 				{
@@ -537,72 +613,117 @@
 					// FIXME: Print all 64 characters of the game name?
 					// Currently truncated to 50.
 					const gameinfo *cur_gi = &gi[i+ScrollX];
-					if (cur_gi->DiscNumber == 0)
-					{
-						// Disc 1.
-						PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, gamelist_y,
-							    "%50.50s [%.6s]%s",
-							    cur_gi->Name, cur_gi->ID,
-							    i == PosX ? ARROW_LEFT : " ");
-					}
-					else
-					{
-						// Disc 2 or higher.
-						PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, gamelist_y,
-							    "%46.46s (%d) [%.6s]%s",
-							    cur_gi->Name, cur_gi->DiscNumber+1, cur_gi->ID,
-							    i == PosX ? ARROW_LEFT : " ");
-					}
-				}
-				GRRLIB_Render();
-				Screenshot();
+					if (cur_gi->DiscNumber == 0)
+					{
+						// Disc 1.
+					if (which_bg == BG_NONE)
+					{
+			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, gamelist_y,
+							    "%50.50s [%.6s]%s",
+							    cur_gi->Name, cur_gi->ID,
+							    i == PosX ? ARROW_LEFT : " ");			
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, gamelist_y,
+								"%50.50s [%.6s]%s",
+							    cur_gi->Name, cur_gi->ID,
+							    i == PosX ? ARROW_LEFT : " ");	
+					}
+					}
+					else
+					{
+						// Disc 2 or higher.
+					if (which_bg == BG_NONE)
+					{
+						PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, gamelist_y,
+							    "%46.46s (%d) [%.6s]%s",
+							    cur_gi->Name, cur_gi->DiscNumber+1, cur_gi->ID,
+							    i == PosX ? ARROW_LEFT : " ");		
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+						PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, gamelist_y,
+							    "%46.46s (%d) [%.6s]%s",
+							    cur_gi->Name, cur_gi->DiscNumber+1, cur_gi->ID,
+							    i == PosX ? ARROW_LEFT : " ");	
+					}
+					}
+				}
+				GRRLIB_Render();
+				Screenshot();
 				ClearScreen();
-				redraw = 0;
-			}
-
-		} else {	//settings menu
-			
-			if(FPAD_X(0)) {
-				UpdateNintendont();
-				redraw = 1;
-			}
-
-			if( FPAD_Down(0) )
-			{
-				if(settingPart == 0)
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+30, SettingY(PosX), " " );
-				else
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+300, SettingY(PosX), " " );
-				PosX++;
-				if(settingPart == 0)
-				{
+				redraw = 0;
+			}
+
+		} else {	//settings menu	
+			if(FPAD_X(0)) {
+				UpdateNintendont();
+				redraw = 1;
+			}
+			if(FPAD_Y(0)) {
+				Credits();
+				redraw = 1;
+			}
+			if( FPAD_Down(0) )
+			{
+					if (which_bg == BG_NONE)
+					{
+				if(settingPart == 0)
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+30, SettingY(PosX), " ");
+				else
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+300, SettingY(PosX), " ");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+				if(settingPart == 0)
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+30, SettingY(PosX), " ");
+				else
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+300, SettingY(PosX), " ");
+					}			
+
+				PosX++;
+				if(settingPart == 0)
+				{
 					if (((ncfg->VideoMode & NIN_VID_FORCE) == 0) && (PosX == NIN_SETTINGS_VIDEOMODE))
 						PosX++;
 					if ((!(ncfg->Config & NIN_CFG_MEMCARDEMU)) && (PosX == NIN_SETTINGS_MEMCARDBLOCKS))
-						PosX++;
-					if ((!(ncfg->Config & NIN_CFG_MEMCARDEMU)) && (PosX == NIN_SETTINGS_MEMCARDMULTI))
-						PosX++;
-				}
-				if ((settingPart == 0 && PosX >= ListMax)
-					|| (settingPart == 1 && PosX >= 3))
+						PosX++;
+					if ((!(ncfg->Config & NIN_CFG_MEMCARDEMU)) && (PosX == NIN_SETTINGS_MEMCARDMULTI))
+						PosX++;
+					//if(PosX == NIN_CFG_BIT_HID) //not needed anymore
+					//	PosX++;
+				}
+				if ((settingPart == 0 && PosX >= ListMax)
+					|| (settingPart == 1 && PosX >= 3))
 				{
 					ScrollX = 0;
 					PosX	= 0;
 					settingPart ^= 1;
 				}
-			
-				redraw=1;
-
-			}
-			else if( FPAD_Up(0) )
-			{
-				if(settingPart == 0)
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+30, SettingY(PosX), " " );
-				else
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+300, SettingY(PosX), " " );
-
-				PosX--;
-
+			
+				redraw=1;
+
+			} 
+			if( FPAD_Up(0) )
+			{
+					if (which_bg == BG_NONE)
+					{
+				if(settingPart == 0)
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+30, SettingY(PosX), " ");
+				else
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+300, SettingY(PosX), " ");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+				if(settingPart == 0)
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+30, SettingY(PosX), " ");
+				else
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+300, SettingY(PosX), " ");
+					}
+
+				PosX--;
+
 				if (PosX < 0)
 				{
 					settingPart ^= 1;
@@ -616,12 +737,14 @@
 					if ((!(ncfg->Config & NIN_CFG_MEMCARDEMU)) && (PosX == NIN_SETTINGS_MEMCARDMULTI))
 						PosX--;
 					if ((!(ncfg->Config & NIN_CFG_MEMCARDEMU)) && (PosX == NIN_SETTINGS_MEMCARDBLOCKS))
-						PosX--;
-					if (((ncfg->VideoMode & NIN_VID_FORCE) == 0) && (PosX == NIN_SETTINGS_VIDEOMODE))
-						PosX--;
-				}
-				redraw=1;
-			}
+						PosX--;
+					if (((ncfg->VideoMode & NIN_VID_FORCE) == 0) && (PosX == NIN_SETTINGS_VIDEOMODE))
+						PosX--;
+					//if(PosX == NIN_CFG_BIT_HID) //not needed anymore
+					//	PosX--;
+				}
+				redraw=1;
+			}
 
 			if( FPAD_Left(0) )
 			{
@@ -671,14 +794,14 @@
 					}
 					else if(PosX == 1)
 					{
-						ncfg->VideoOffset++;
-						if(ncfg->VideoOffset < -20 || ncfg->VideoOffset > 20)
-							ncfg->VideoOffset = -20;
-						ReconfigVideo(rmode);
-						redraw = 1;
-					}
-				}
-			}
+						ncfg->VideoOffset++;
+						if(ncfg->VideoOffset < -20 || ncfg->VideoOffset > 20)
+							ncfg->VideoOffset = -20;
+					ReconfigVideo(rmode);
+					redraw = 1;					
+					}
+				}
+			}
 
 			if( FPAD_OK(0) )
 			{
@@ -725,13 +848,21 @@
 									Video = NIN_VID_AUTO;
 									break;
 							}
-							ncfg->VideoMode &= ~NIN_VID_MASK;
-							ncfg->VideoMode |= Video;
-							if ((Video & NIN_VID_FORCE) == 0)
-								PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(NIN_SETTINGS_VIDEOMODE), "%29s", "" );
-						} break;
-						case NIN_SETTINGS_VIDEOMODE:
-						{
+							ncfg->VideoMode &= ~NIN_VID_MASK;
+							ncfg->VideoMode |= Video;
+							if ((Video & NIN_VID_FORCE) == 0)
+					{			
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(NIN_SETTINGS_VIDEOMODE), "%29s", "");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(NIN_SETTINGS_VIDEOMODE), "%29s", "");
+					}}
+						} break;
+						case NIN_SETTINGS_VIDEOMODE:
+						{
 							u32 Video = (ncfg->VideoMode & NIN_VID_FORCE_MASK);
 							Video = Video << 1;
 							if (Video > NIN_VID_FORCE_MPAL)
@@ -753,15 +884,23 @@
 						{
 							ncfg->Config ^= (NIN_CFG_NATIVE_SI);
 						} break;
-					}
-					if (!(ncfg->Config & NIN_CFG_MEMCARDEMU))
-					{
-						PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(NIN_SETTINGS_MEMCARDBLOCKS), "%29s", "");
-						PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(NIN_SETTINGS_MEMCARDMULTI), "%29s", "");
-					}
-					redraw = 1;
-				}
-				else if(settingPart == 1)
+					}
+					if (!(ncfg->Config & NIN_CFG_MEMCARDEMU))
+					{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(NIN_SETTINGS_MEMCARDBLOCKS), "%29s", "");
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(NIN_SETTINGS_MEMCARDMULTI), "%29s", "");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 50, SettingY(NIN_SETTINGS_MEMCARDBLOCKS), "%29s", "");
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 50, SettingY(NIN_SETTINGS_MEMCARDMULTI), "%29s", "");
+					}
+					}
+					redraw = 1;
+				}
+				else if(settingPart == 1)
 				{
 					if(PosX == 2)
 					{
@@ -768,30 +907,57 @@
 						SaveSettings = true;
 						ncfg->VideoMode ^= (NIN_VID_PATCH_PAL50);
 						redraw = 1;
-					}
-				}
-			}
-
-			if( redraw )
-			{
-				u32 ListLoopIndex = 0;
-				for (ListLoopIndex = 0; ListLoopIndex < NIN_CFG_BIT_LAST; ListLoopIndex++)
-				{
-					if(ListLoopIndex == NIN_CFG_BIT_USB) //Option gets replaced
-						PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%s", OptionStrings[ListLoopIndex], (ncfg->Config & (NIN_CFG_WIIU_WIDE)) ? "On " : "Off");
-					else
-						PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%s", OptionStrings[ListLoopIndex], (ncfg->Config & (1 << ListLoopIndex)) ? "On " : "Off" );
-				}
-				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%d", OptionStrings[ListLoopIndex], (ncfg->MaxPads));
-				ListLoopIndex++;
-
-				u32 LanIndex = ncfg->Language;
-				if (( LanIndex >= NIN_LAN_LAST ) ||  ( LanIndex < NIN_LAN_FIRST ))
-					LanIndex = NIN_LAN_LAST; //Auto
-				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-4s", OptionStrings[ListLoopIndex], LanguageStrings[LanIndex] );
-				ListLoopIndex++;
-
-				u32 VideoModeIndex;
+					}
+				}
+			}
+			if( redraw )
+			{
+				u32 ListLoopIndex = 0;
+				for (ListLoopIndex = 0; ListLoopIndex < NIN_CFG_BIT_LAST; ListLoopIndex++)
+				{
+					//if(ListLoopIndex == NIN_CFG_BIT_HID) //not needed anymore
+					//	continue;
+					if(ListLoopIndex == NIN_CFG_BIT_USB) //Option gets replaced
+						{					if (which_bg == BG_NONE)
+					{
+PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%s", OptionStrings[ListLoopIndex], (ncfg->Config & (NIN_CFG_WIIU_WIDE)) ? "On " : "Off");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%s", OptionStrings[ListLoopIndex], (ncfg->Config & (NIN_CFG_WIIU_WIDE)) ? "On " : "Off");
+					}}
+					else
+						{					if (which_bg == BG_NONE)
+					{
+PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%s", OptionStrings[ListLoopIndex], (ncfg->Config & (1 << ListLoopIndex)) ? "On " : "Off");					}
+					else if (which_bg == BG_LEGACY)
+					{
+PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%s", OptionStrings[ListLoopIndex], (ncfg->Config & (1 << ListLoopIndex)) ? "On " : "Off");					}}
+				}
+									if (which_bg == BG_NONE)
+					{
+PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%d", OptionStrings[ListLoopIndex], (ncfg->MaxPads));
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(ListLoopIndex), "%-18s:%d", OptionStrings[ListLoopIndex], (ncfg->MaxPads));
+					}
+				ListLoopIndex++;
+
+				u32 LanIndex = ncfg->Language;
+				if (( LanIndex >= NIN_LAN_LAST ) ||  ( LanIndex < NIN_LAN_FIRST ))
+					LanIndex = NIN_LAN_LAST; //Auto
+										if (which_bg == BG_NONE)
+					{
+PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-4s", OptionStrings[ListLoopIndex], LanguageStrings[LanIndex] );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-4s", OptionStrings[ListLoopIndex], LanguageStrings[LanIndex] );
+					}
+				ListLoopIndex++;
+
+				u32 VideoModeIndex;
 				u32 VideoModeVal = ncfg->VideoMode & NIN_VID_MASK;
 				switch (VideoModeVal)
 				{
@@ -809,13 +975,21 @@
 						break;
 					default:
 						ncfg->VideoMode &= ~NIN_VID_MASK;
-						ncfg->VideoMode |= NIN_VID_AUTO;
-						VideoModeIndex = NIN_VID_INDEX_AUTO;
-				}
-				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-18s", OptionStrings[ListLoopIndex], VideoStrings[VideoModeIndex] );
-				ListLoopIndex++;
-
-				if( ncfg->VideoMode & NIN_VID_FORCE )
+						ncfg->VideoMode |= NIN_VID_AUTO;
+						VideoModeIndex = NIN_VID_INDEX_AUTO;
+				}
+					if (which_bg == BG_NONE)
+					{
+PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-18s", OptionStrings[ListLoopIndex], VideoStrings[VideoModeIndex] );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-18s", OptionStrings[ListLoopIndex], VideoStrings[VideoModeIndex] );
+					}
+				
+				ListLoopIndex++;
+
+				if( ncfg->VideoMode & NIN_VID_FORCE )
 				{
 					VideoModeVal = ncfg->VideoMode & NIN_VID_FORCE_MASK;
 					u32 VideoTestVal = NIN_VID_FORCE_PAL50;
@@ -824,59 +998,99 @@
 					if ( VideoModeVal < VideoTestVal )
 					{
 						ncfg->VideoMode &= ~NIN_VID_FORCE_MASK;
-						ncfg->VideoMode |= NIN_VID_FORCE_NTSC;
-						VideoModeIndex = NIN_VID_INDEX_FORCE_NTSC;
-					}
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-5s", OptionStrings[ListLoopIndex], VideoModeStrings[VideoModeIndex] );
-				}
-				ListLoopIndex++;
-
+						ncfg->VideoMode |= NIN_VID_FORCE_NTSC;
+						VideoModeIndex = NIN_VID_INDEX_FORCE_NTSC;
+					}
+					if (which_bg == BG_NONE)
+					{
+PrintFormat(MENU_SIZE, BLACK, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-5s", OptionStrings[ListLoopIndex], VideoModeStrings[VideoModeIndex] );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+PrintFormat(MENU_SIZE, WHITE, MENU_POS_X+50, SettingY(ListLoopIndex),"%-18s:%-5s", OptionStrings[ListLoopIndex], VideoModeStrings[VideoModeIndex] );
+					}
+				}
+				ListLoopIndex++;
+
 				if ((ncfg->Config & NIN_CFG_MEMCARDEMU) == NIN_CFG_MEMCARDEMU)
 				{
-					u32 MemCardBlocksVal = ncfg->MemCardBlocks;
-					if (MemCardBlocksVal > MEM_CARD_MAX)
-						MemCardBlocksVal = 0;
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(ListLoopIndex), "%-18s:%-4d%s", OptionStrings[ListLoopIndex], MEM_CARD_BLOCKS(MemCardBlocksVal), MemCardBlocksVal > 2 ? "Unstable" : "");
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(ListLoopIndex+1), "%-18s:%-4s", OptionStrings[ListLoopIndex+1], (ncfg->Config & (NIN_CFG_MC_MULTI)) ? "On " : "Off");
-				}
-				ListLoopIndex+=2;
-
-				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(ListLoopIndex), "%-18s:%-4s", OptionStrings[ListLoopIndex], (ncfg->Config & (NIN_CFG_NATIVE_SI)) ? "On " : "Off");
-				ListLoopIndex++;
-
-				char vidWidth[10];
-				if(ncfg->VideoScale < 40 || ncfg->VideoScale > 120)
-				{
+					u32 MemCardBlocksVal = ncfg->MemCardBlocks;
+					if (MemCardBlocksVal > MEM_CARD_MAX)
+						MemCardBlocksVal = 0;
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(ListLoopIndex), "%-18s:%-4d%s", OptionStrings[ListLoopIndex], MEM_CARD_BLOCKS(MemCardBlocksVal), MemCardBlocksVal > 2 ? "Unstable" : "");
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 50, SettingY(ListLoopIndex+1), "%-18s:%-4s", OptionStrings[ListLoopIndex+1], (ncfg->Config & (NIN_CFG_MC_MULTI)) ? "On " : "Off");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 50, SettingY(ListLoopIndex), "%-18s:%-4d%s", OptionStrings[ListLoopIndex], MEM_CARD_BLOCKS(MemCardBlocksVal), MemCardBlocksVal > 2 ? "Unstable" : "");
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 50, SettingY(ListLoopIndex+1), "%-18s:%-4s", OptionStrings[ListLoopIndex+1], (ncfg->Config & (NIN_CFG_MC_MULTI)) ? "On " : "Off");
+					}						
+				}
+				ListLoopIndex+=2;
+				char vidWidth[10];
+				if(ncfg->VideoScale < 40 || ncfg->VideoScale > 120)
+				{
 					ncfg->VideoScale = 0;
 					snprintf(vidWidth, sizeof(vidWidth), "Auto");
-				}	
-				else
-					snprintf(vidWidth, sizeof(vidWidth), "%i", ncfg->VideoScale + 600);
-
-				char vidOffset[10];
-				if(ncfg->VideoOffset < -20 || ncfg->VideoOffset > 20)
-					ncfg->VideoOffset = 0;
-				snprintf(vidOffset, sizeof(vidOffset), "%i", ncfg->VideoOffset);
-
-				ListLoopIndex = 0; //reset on other side
-				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Video Width", vidWidth);
-				ListLoopIndex++;
+				}	
+				else
+					snprintf(vidWidth, sizeof(vidWidth), "%i", ncfg->VideoScale + 600);
+				char vidOffset[10];
+				if(ncfg->VideoOffset < -20 || ncfg->VideoOffset > 20)
+					ncfg->VideoOffset = 0;
+				snprintf(vidOffset, sizeof(vidOffset), "%i", ncfg->VideoOffset);	
+				if (which_bg == BG_NONE)
+				{				
+				ListLoopIndex = 0; //reset on other side
+				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Video Width", vidWidth);
+				ListLoopIndex++;
 				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Screen Position", vidOffset);
-				ListLoopIndex++;
-				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Patch PAL50", (ncfg->VideoMode & (NIN_VID_PATCH_PAL50)) ? "On " : "Off");
-				ListLoopIndex++;
-				if(settingPart == 0)
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 30, SettingY(PosX), ARROW_RIGHT);
-				else
-					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 300, SettingY(PosX), ARROW_RIGHT);
-				PrintInfo();
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*0, "Home: Go Back");
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "A   : %s", MenuMode ? "Modify" : "Select");
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "B   : %s", MenuMode ? "Game List" : "Settings ");
-				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*3, MenuMode ? "X/1 : Update" : "");
-				if (devState == DEV_OK)
-				{
-					// FIXME: If devState != DEV_OK,
+				ListLoopIndex++;
+				PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Patch PAL50", (ncfg->VideoMode & (NIN_VID_PATCH_PAL50)) ? "On " : "Off");
+				ListLoopIndex++;
+				}
+				else if (which_bg == BG_LEGACY)
+				{				
+				ListLoopIndex = 0; //reset on other side
+				PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Video Width", vidWidth);
+				ListLoopIndex++;
+				PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Screen Position", vidOffset);
+				ListLoopIndex++;
+				PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 320, SettingY(ListLoopIndex), "%-18s:%-4s", "Patch PAL50", (ncfg->VideoMode & (NIN_VID_PATCH_PAL50)) ? "On " : "Off");
+				ListLoopIndex++;
+				}
+				if(settingPart == 0) {
+				if (which_bg == BG_NONE){
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 30, SettingY(PosX), ARROW_RIGHT);}
+				else if (which_bg == BG_LEGACY){
+					PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 30, SettingY(PosX), ARROW_RIGHT);}}
+				else {
+				if (which_bg == BG_NONE){
+					PrintFormat(MENU_SIZE, BLACK, MENU_POS_X + 300, SettingY(PosX), ARROW_RIGHT);}
+				else if (which_bg == BG_LEGACY){
+				PrintFormat(MENU_SIZE, WHITE, MENU_POS_X + 300, SettingY(PosX), ARROW_RIGHT);}}
+				PrintInfo();
+					if (which_bg == BG_NONE)
+					{
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Device");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : %s", MenuMode ? "Modify" : "Select");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : %s", MenuMode ? "Game List" : "Settings ");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "X / 1 : Updates & Themes");
+				PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Device");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : %s", MenuMode ? "Modify" : "Select");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : %s", MenuMode ? "Game List" : "Settings ");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "X / 1 : Updates & Themes");
+				PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");
+					}
+				if (devState == DEV_OK)
+				{
+					// FIXME: If devState != DEV_OK,
 					// the device info overlaps with the settings menu.
 					PrintDevInfo();
 				}
@@ -884,13 +1098,17 @@
 				Screenshot();
 				ClearScreen();
 				redraw = 0;
-			}
-		}
-	}
-
-	u32 SelectedGame = PosX + ScrollX;
-	char* StartChar = gi[SelectedGame].Path + 3;
-	if (StartChar[0] == ':')
+			}
+		}
+	}
+	ExitBoot = 0;
+	//GRRLIB_FillScreen (BLACK);
+	ClearScreen();	
+	FadeOut();
+	GRRLIB_Render();
+	u32 SelectedGame = PosX + ScrollX;
+	char* StartChar = gi[SelectedGame].Path + 3;
+	if (StartChar[0] == ':')
 		StartChar++;
 	memcpy(ncfg->GamePath, StartChar, strlen(gi[SelectedGame].Path));
 	memcpy(&(ncfg->GameID), gi[SelectedGame].ID, 4);
@@ -906,55 +1124,92 @@
 
 	if (!selected)
 	{
-		// No game selected.
-		return 0;
-	}
-
-	// Game is selected.
-	// TODO: Return an enum.
-	return (SaveSettings ? 3 : 1);
+		// No game selected.
+		return 0;
+	}
+	
+	// Game is selected.
+	// TODO: Return an enum.
+	return (SaveSettings ? 3 : 1);
 }
 
 /**
- * Select the source device and game.
- * @return TRUE to save settings; FALSE if no settings have been changed.
- */
-bool SelectDevAndGame(void)
-{
-	// Select the source device. (SD or USB)
+ * Select the source device and game.
+ * @return TRUE to save settings; FALSE if no settings have been changed.
+ */
+ 
+bool SelectGameList(void)
+{
+		bool SaveSettings = false;
+	while (1)
+	{
+		if (ExitBoot == 1)
+		SelectGame();
+		else
+		SelectDevAndGame();	
+		break;
+	}
+	return SaveSettings;
+}
+
+bool SelectDevAndGame(void)
+{
+	// Select the source device. (SD or USB)
 	bool SaveSettings = false;
 	while (1)
-	{
-		VIDEO_WaitVSync();
-		FPAD_Update();
-
-		UseSD = (ncfg->Config & NIN_CFG_USB) == 0;
-		PrintInfo();
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*0, "Home: Exit");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "A   : Select");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 53 * 6 - 8, MENU_POS_Y + 20 * 6, UseSD ? ARROW_LEFT : "");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 53 * 6 - 8, MENU_POS_Y + 20 * 7, UseSD ? "" : ARROW_LEFT);
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 47 * 6 - 8, MENU_POS_Y + 20 * 6, " SD  ");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 47 * 6 - 8, MENU_POS_Y + 20 * 7, "USB  ");
-
-		// Render the screen here to prevent a blank frame
-		// when returning from SelectGame().
-		GRRLIB_Render();
-		ClearScreen();
-
-		if (FPAD_OK(0))
-		{
-			// Select a game from the specified device.
-			int ret = SelectGame();
-			if (ret & 2) SaveSettings = true;
-			if (ret & 1) break;
-		}
-		else if (FPAD_Start(0))
-		{
-			ShowMessageScreenAndExit("Returning to loader...", 0);
-		}
-		else if (FPAD_Down(0))
-		{
+	{
+		VIDEO_WaitVSync();
+		FPAD_Update();
+		
+		UseSD = (ncfg->Config & NIN_CFG_USB) == 0;
+		PrintInfo();
+						if (which_bg == BG_NONE)
+					{
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*0, "Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 53 * 6 - 8, MENU_POS_Y + 20 * 6, UseSD ? ARROW_LEFT : "");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 53 * 6 - 8, MENU_POS_Y + 20 * 7, UseSD ? "" : ARROW_LEFT);
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 47 * 6 - 8, MENU_POS_Y + 20 * 6, " SD  ");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 47 * 6 - 8, MENU_POS_Y + 20 * 7, "USB  ");
+		PrintFormat(15, BLACK, MENU_POS_X + 225, MENU_POS_Y + 20*21, "MASTERMOD\xc2\xa9MMXVI");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*0, "Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 53 * 6 - 8, MENU_POS_Y + 20 * 6, UseSD ? ARROW_LEFT : "");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 53 * 6 - 8, MENU_POS_Y + 20 * 7, UseSD ? "" : ARROW_LEFT);
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 47 * 6 - 8, MENU_POS_Y + 20 * 6, " SD  ");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 47 * 6 - 8, MENU_POS_Y + 20 * 7, "USB  ");
+		PrintFormat(15, WHITE, MENU_POS_X + 225, MENU_POS_Y + 20*21, "MASTERMOD\xc2\xa9MMXVI");
+					}	
+		// Render the screen here to prevent a blank frame
+		// when returning from SelectGame().
+		GRRLIB_Render();
+		ClearScreen();
+		
+		
+		if (FPAD_OK(0))
+		{
+			// Select a game from the specified device.
+			int ret = SelectGame();
+			if (ret & 2) 
+			SaveSettings = true;
+			if (ret & 1) 
+			break;
+			
+		}
+		else if (FPAD_Start(0))
+		{
+		//	ShowMessageScreenAndExit("Returning to loader...", 0);
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+					ExitToLoader(0);
+		}
+		else if (FPAD_Down(0))
+		{
 			ncfg->Config = ncfg->Config | NIN_CFG_USB;
 		}
 		else if (FPAD_Up(0))
@@ -974,14 +1229,21 @@
 {
 	const int len = strlen(msg);
 	const int x = (640 - (len*10)) / 2;
+
+	ClearScreen();
+	PrintInfo();
+					if (which_bg == BG_NONE)
+					{
+	PrintFormat(DEFAULT_SIZE, BLACK, x, 232, "%s", msg);
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+	PrintFormat(DEFAULT_SIZE, WHITE, x, 232, "%s", msg);
+					}		
+	GRRLIB_Render();
+	ClearScreen();
+}
 
-	ClearScreen();
-	PrintInfo();
-	PrintFormat(DEFAULT_SIZE, BLACK, x, 232, "%s", msg);
-	GRRLIB_Render();
-	ClearScreen();
-}
-
 /**
  * Show a single message screen and then exit to loader..
  * @param msg Message.
@@ -994,30 +1256,44 @@
 	const u32 color = (ret == 0 ? BLACK : MAROON);
 
 	ClearScreen();
-	PrintInfo();
-	PrintFormat(DEFAULT_SIZE, color, x, 232, "%s", msg);
-	ExitToLoader(ret);
-}
-
-/**
+	PrintInfo();
+	PrintFormat(DEFAULT_SIZE, color, x, 232, "%s", msg);
+	ExitToLoader(ret);
+
+}
+
+/**
  * Print Nintendont version and system hardware information.
- */
-void PrintInfo(void)
-{
-#ifdef NIN_SPECIAL_VERSION
-	// "Special" version with customizations. (Not mainline!)
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*0, "Nintendont Loader v%u.%u" NIN_SPECIAL_VERSION " (%s)",
+ */
+void PrintInfo(void)
+{
+	if (which_bg == BG_NONE)
+	{
+#ifdef NIN_SPECIAL_VERSION
+	// "Special" version with customizations. (Not mainline!)
+	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*0, "Nintendont Loader v%u.%u" NIN_SPECIAL_VERSION " (%s)",
 		    NIN_VERSION>>16, NIN_VERSION&0xFFFF, IsWiiU() ? "Wii U" : "Wii");
 #else
 	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*0, "Nintendont Loader v%u.%u (%s)",
-		    NIN_VERSION>>16, NIN_VERSION&0xFFFF, IsWiiU() ? "Wii U" : "Wii");
-#endif
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*1, "Built   : " __DATE__ " " __TIME__);
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Firmware: %u.%u.%u",
-		    *(vu16*)0x80003140, *(vu8*)0x80003142, *(vu8*)0x80003143);
-}
-
-/**
+		    NIN_VERSION>>16, NIN_VERSION&0xFFFF, IsWiiU() ? "Wii U" : "Wii");
+#endif
+	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*1, "Built   : " __DATE__ " " __TIME__);
+	}
+	else if (which_bg == BG_LEGACY)
+	{
+#ifdef NIN_SPECIAL_VERSION
+	// "Special" version with customizations. (Not mainline!)
+	PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*0, "Nintendont Loader v%u.%u" NIN_SPECIAL_VERSION " (%s)",
+		    NIN_VERSION>>16, NIN_VERSION&0xFFFF, IsWiiU() ? "Wii U" : "Wii");
+#else
+	PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*0, "Nintendont Loader v%u.%u (%s)",
+		    NIN_VERSION>>16, NIN_VERSION&0xFFFF, IsWiiU() ? "Wii U" : "Wii");
+#endif
+	PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*1, "Built   : " __DATE__ " " __TIME__);
+	}
+}
+
+/**
  * Print information about the selected device.
  */
 static void PrintDevInfo(void)
@@ -1132,6 +1408,1418 @@
 		case LKERR_IOS_Read_IOS58_kernel:
 			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*5, "IOS_Read(IOS58 kernel) returned %d.", err);
 			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*7, "WARNING: IOS58 may be corrupted.");
-			break;
-	}
-}
+			break;
+	}
+}
+void CheckTheme()
+{
+	char myid3x[8];
+	char GETID4[8];
+	memset(GETID4, 0, 8);
+	memcpy(GETID4, &(ncfg->GameID), 3);
+	sprintf(myid3x, "%sX.png", GETID4);
+	char myid3[8];	
+	char GETID3[8];
+	memset(GETID3, 0, 8);
+	memcpy(GETID3, &(ncfg->GameID), 3);
+	sprintf(myid3, "%s.png", GETID3);
+	GRRLIB_FreeTexture(background);
+	f_chdir_char("/apps/Nintendont");
+	if ((background = GRRLIB_LoadTextureFromFile("NinBlack.png")))
+		{ 
+			which_bg = BG_BLACK;   
+		}
+	else if ((background = GRRLIB_LoadTextureFromFile("NinBackLight.png")))
+		{ 
+			which_bg = BG_LIGHT;	
+		}
+	else if ((background = GRRLIB_LoadTextureFromFile("NinBackDark.png")))
+		{ 
+			which_bg = BG_DARK;
+		}
+	else if ((background = GRRLIB_LoadTextureFromFile("NinBackBars.png")))
+		{ 
+			which_bg = BG_BARS;
+		}		
+	else if ((background = GRRLIB_LoadTextureFromFile("NinBackNoBar.png")))
+		{ 
+			which_bg = BG_NOBAR;   
+		}		
+	else if ((background = GRRLIB_LoadTextureFromFile(myid3x)))
+		{
+			which_bg = BG_LIGHT;
+		}
+	else if ((background = GRRLIB_LoadTextureFromFile(myid3)))
+		{
+			which_bg = BG_NOBAR;
+		}
+	else {
+			background = GRRLIB_LoadTextureFromFile("NinLegacy.png");
+			if (background != NULL)
+			{
+			which_bg = BG_LEGACY;
+			}
+			else
+			{
+			which_bg = BG_NONE;
+			background = GRRLIB_LoadTextureFromFile("NinBack.png");
+			if (background == NULL)
+			background = GRRLIB_LoadTexturePNG(background_png);
+			}
+		}
+}
+int k = 0;
+void FadeIt()
+{
+	for (k=0; k<255; k +=5) // Fade background image in from black screen
+	{
+		GRRLIB_DrawImg(0, 0, background, 0, 1, 1, RGBA(255, 255, 255, k)); // Opacity increases as k does
+		GRRLIB_Render();
+	}
+	GRRLIB_DrawImg(0, 0, background, 0, 1, 1, 0xFFFFFFFF);
+}
+int z = 255;
+void FadeOut()
+{
+	GRRLIB_DrawImg(0, 0, background, 0, 1, 1, 0xFFFFFFFF);
+	for (z=255; z>0; z -=5) // Fade background image out to black screen
+	{
+		GRRLIB_DrawImg(0, 0, background, 0, 1, 1, RGBA(255, 255, 255, z)); // Opacity increases as i does
+		GRRLIB_Render();
+	}
+}
+void BackTheme()
+{
+			GRRLIB_FreeTexture(background);
+			f_chdir_char("/apps/Nintendont");
+			background = GRRLIB_LoadTextureFromFile("NinLegacy.png");
+			if (background != NULL)
+			{
+			which_bg = BG_LEGACY;
+			}
+			else
+			{
+			which_bg = BG_NONE;
+			background = GRRLIB_LoadTextureFromFile("NinBack.png");
+			if (background == NULL)
+			background = GRRLIB_LoadTexturePNG(background_png);
+			}
+}
+
+void DeleteCustom()
+{
+f_chdir_char("/apps/Nintendont");
+f_unlink_char("./test.png");
+f_unlink_char("./D42X.png");
+f_unlink_char("./D43X.png");
+f_unlink_char("./D44X.png");
+f_unlink_char("./D45X.png");
+f_unlink_char("./D4LX.png");
+f_unlink_char("./D56X.png");
+f_unlink_char("./G2BX.png");
+f_unlink_char("./G2CX.png");
+f_unlink_char("./G2FX.png");
+f_unlink_char("./G2GX.png");
+f_unlink_char("./G2KX.png");
+f_unlink_char("./G2MX.png");
+f_unlink_char("./G2OX.png");
+f_unlink_char("./G2PX.png");
+f_unlink_char("./G2RX.png");
+f_unlink_char("./G2SX.png");
+f_unlink_char("./G2TX.png");
+f_unlink_char("./G2VX.png");
+f_unlink_char("./G2XX.png");
+f_unlink_char("./G3AX.png");
+f_unlink_char("./G3BX.png");
+f_unlink_char("./G3DX.png");
+f_unlink_char("./G3EX.png");
+f_unlink_char("./G3FX.png");
+f_unlink_char("./G3JX.png");
+f_unlink_char("./G3LX.png");
+f_unlink_char("./G3MX.png");
+f_unlink_char("./G3NX.png");
+f_unlink_char("./G3QX.png");
+f_unlink_char("./G3RX.png");
+f_unlink_char("./G3SX.png");
+f_unlink_char("./G3VX.png");
+f_unlink_char("./G3XX.png");
+f_unlink_char("./G3YX.png");
+f_unlink_char("./G4AX.png");
+f_unlink_char("./G4BX.png");
+f_unlink_char("./G4CX.png");
+f_unlink_char("./G4FX.png");
+f_unlink_char("./G4GX.png");
+f_unlink_char("./G4IX.png");
+f_unlink_char("./G4MX.png");
+f_unlink_char("./G4NX.png");
+f_unlink_char("./G4OX.png");
+f_unlink_char("./G4QX.png");
+f_unlink_char("./G4SX.png");
+f_unlink_char("./G4ZX.png");
+f_unlink_char("./G5BX.png");
+f_unlink_char("./G5DX.png");
+f_unlink_char("./G5NX.png");
+f_unlink_char("./G5SX.png");
+f_unlink_char("./G5TX.png");
+f_unlink_char("./G62X.png");
+f_unlink_char("./G63X.png");
+f_unlink_char("./G6FX.png");
+f_unlink_char("./G6MX.png");
+f_unlink_char("./G6NX.png");
+f_unlink_char("./G6QX.png");
+f_unlink_char("./G6SX.png");
+f_unlink_char("./G6TX.png");
+f_unlink_char("./G6WX.png");
+f_unlink_char("./G7MX.png");
+f_unlink_char("./G89X.png");
+f_unlink_char("./G8FX.png");
+f_unlink_char("./G8MX.png");
+f_unlink_char("./G8SX.png");
+f_unlink_char("./G8WX.png");
+f_unlink_char("./G9BX.png");
+f_unlink_char("./G9RX.png");
+f_unlink_char("./G9SX.png");
+f_unlink_char("./G9TX.png");
+f_unlink_char("./GA2X.png");
+f_unlink_char("./GA3X.png");
+f_unlink_char("./GA4X.png");
+f_unlink_char("./GA7X.png");
+f_unlink_char("./GAAX.png");
+f_unlink_char("./GABX.png");
+f_unlink_char("./GACX.png");
+f_unlink_char("./GAFX.png");
+f_unlink_char("./GAGX.png");
+f_unlink_char("./GAHX.png");
+f_unlink_char("./GAKX.png");
+f_unlink_char("./GALX.png");
+f_unlink_char("./GAMX.png");
+f_unlink_char("./GANX.png");
+f_unlink_char("./GAPX.png");
+f_unlink_char("./GAQX.png");
+f_unlink_char("./GARX.png");
+f_unlink_char("./GATX.png");
+f_unlink_char("./GAUX.png");
+f_unlink_char("./GAVX.png");
+f_unlink_char("./GAXX.png");
+f_unlink_char("./GAYX.png");
+f_unlink_char("./GAZX.png");
+f_unlink_char("./GB2X.png");
+f_unlink_char("./GB3X.png");
+f_unlink_char("./GB4X.png");
+f_unlink_char("./GBAX.png");
+f_unlink_char("./GBDX.png");
+f_unlink_char("./GBFX.png");
+f_unlink_char("./GBGX.png");
+f_unlink_char("./GBHX.png");
+f_unlink_char("./GBIX.png");
+f_unlink_char("./GBKX.png");
+f_unlink_char("./GBLX.png");
+f_unlink_char("./GBMX.png");
+f_unlink_char("./GBNX.png");
+f_unlink_char("./GBOX.png");
+f_unlink_char("./GBQX.png");
+f_unlink_char("./GBSX.png");
+f_unlink_char("./GBTX.png");
+f_unlink_char("./GBVX.png");
+f_unlink_char("./GBWX.png");
+f_unlink_char("./GBXX.png");
+f_unlink_char("./GBYX.png");
+f_unlink_char("./GBZX.png");
+f_unlink_char("./GC2X.png");
+f_unlink_char("./GC3X.png");
+f_unlink_char("./GC4X.png");
+f_unlink_char("./GC5X.png");
+f_unlink_char("./GC6X.png");
+f_unlink_char("./GC7X.png");
+f_unlink_char("./GC9X.png");
+f_unlink_char("./GCAX.png");
+f_unlink_char("./GCBX.png");
+f_unlink_char("./GCCX.png");
+f_unlink_char("./GCDX.png");
+f_unlink_char("./GCEX.png");
+f_unlink_char("./GCFX.png");
+f_unlink_char("./GCGX.png");
+f_unlink_char("./GCHX.png");
+f_unlink_char("./GCJX.png");
+f_unlink_char("./GCLX.png");
+f_unlink_char("./GCNX.png");
+f_unlink_char("./GCOX.png");
+f_unlink_char("./GCPX.png");
+f_unlink_char("./GCQX.png");
+f_unlink_char("./GCSX.png");
+f_unlink_char("./GCTX.png");
+f_unlink_char("./GCUX.png");
+f_unlink_char("./GCVX.png");
+f_unlink_char("./GCWX.png");
+f_unlink_char("./GCZX.png");
+f_unlink_char("./GD4X.png");
+f_unlink_char("./GD5X.png");
+f_unlink_char("./GD6X.png");
+f_unlink_char("./GD7X.png");
+f_unlink_char("./GD9X.png");
+f_unlink_char("./GDCX.png");
+f_unlink_char("./GDDX.png");
+f_unlink_char("./GDEX.png");
+f_unlink_char("./GDFX.png");
+f_unlink_char("./GDGX.png");
+f_unlink_char("./GDIX.png");
+f_unlink_char("./GDJX.png");
+f_unlink_char("./GDKX.png");
+f_unlink_char("./GDLX.png");
+f_unlink_char("./GDMX.png");
+f_unlink_char("./GDOX.png");
+f_unlink_char("./GDPX.png");
+f_unlink_char("./GDQX.png");
+f_unlink_char("./GDRX.png");
+f_unlink_char("./GDSX.png");
+f_unlink_char("./GDTX.png");
+f_unlink_char("./GDVX.png");
+f_unlink_char("./GDWX.png");
+f_unlink_char("./GDXX.png");
+f_unlink_char("./GE3X.png");
+f_unlink_char("./GE4X.png");
+f_unlink_char("./GE5X.png");
+f_unlink_char("./GE9X.png");
+f_unlink_char("./GEAX.png");
+f_unlink_char("./GEBX.png");
+f_unlink_char("./GEDX.png");
+f_unlink_char("./GEMX.png");
+f_unlink_char("./GENX.png");
+f_unlink_char("./GEOX.png");
+f_unlink_char("./GESX.png");
+f_unlink_char("./GEVX.png");
+f_unlink_char("./GEWX.png");
+f_unlink_char("./GEXX.png");
+f_unlink_char("./GEYX.png");
+f_unlink_char("./GEZX.png");
+f_unlink_char("./GF2X.png");
+f_unlink_char("./GF3X.png");
+f_unlink_char("./GF4X.png");
+f_unlink_char("./GF5X.png");
+f_unlink_char("./GF6X.png");
+f_unlink_char("./GF7X.png");
+f_unlink_char("./GFAX.png");
+f_unlink_char("./GFBX.png");
+f_unlink_char("./GFDX.png");
+f_unlink_char("./GFEX.png");
+f_unlink_char("./GFFX.png");
+f_unlink_char("./GFGX.png");
+f_unlink_char("./GFHX.png");
+f_unlink_char("./GFIX.png");
+f_unlink_char("./GFKX.png");
+f_unlink_char("./GFNX.png");
+f_unlink_char("./GFOX.png");
+f_unlink_char("./GFPX.png");
+f_unlink_char("./GFQX.png");
+f_unlink_char("./GFSX.png");
+f_unlink_char("./GFTX.png");
+f_unlink_char("./GFUX.png");
+f_unlink_char("./GFVX.png");
+f_unlink_char("./GFWX.png");
+f_unlink_char("./GFXX.png");
+f_unlink_char("./GFYX.png");
+f_unlink_char("./GFZX.png");
+f_unlink_char("./GG2X.png");
+f_unlink_char("./GG4X.png");
+f_unlink_char("./GG5X.png");
+f_unlink_char("./GGAX.png");
+f_unlink_char("./GGCX.png");
+f_unlink_char("./GGEX.png");
+f_unlink_char("./GGNX.png");
+f_unlink_char("./GGPX.png");
+f_unlink_char("./GGRX.png");
+f_unlink_char("./GGSX.png");
+f_unlink_char("./GGTX.png");
+f_unlink_char("./GGVX.png");
+f_unlink_char("./GGYX.png");
+f_unlink_char("./GGZX.png");
+f_unlink_char("./GH2X.png");
+f_unlink_char("./GH3X.png");
+f_unlink_char("./GH4X.png");
+f_unlink_char("./GH5X.png");
+f_unlink_char("./GH6X.png");
+f_unlink_char("./GH7X.png");
+f_unlink_char("./GH9X.png");
+f_unlink_char("./GHAX.png");
+f_unlink_char("./GHBX.png");
+f_unlink_char("./GHCX.png");
+f_unlink_char("./GHEX.png");
+f_unlink_char("./GHFX.png");
+f_unlink_char("./GHGX.png");
+f_unlink_char("./GHKX.png");
+f_unlink_char("./GHLX.png");
+f_unlink_char("./GHMX.png");
+f_unlink_char("./GHNX.png");
+f_unlink_char("./GHPX.png");
+f_unlink_char("./GHQX.png");
+f_unlink_char("./GHRX.png");
+f_unlink_char("./GHSX.png");
+f_unlink_char("./GHUX.png");
+f_unlink_char("./GHVX.png");
+f_unlink_char("./GHWX.png");
+f_unlink_char("./GHYX.png");
+f_unlink_char("./GHZX.png");
+f_unlink_char("./GIAX.png");
+f_unlink_char("./GIBX.png");
+f_unlink_char("./GICX.png");
+f_unlink_char("./GIGX.png");
+f_unlink_char("./GIHX.png");
+f_unlink_char("./GIJX.png");
+f_unlink_char("./GIKX.png");
+f_unlink_char("./GILX.png");
+f_unlink_char("./GINX.png");
+f_unlink_char("./GIPX.png");
+f_unlink_char("./GIQX.png");
+f_unlink_char("./GISX.png");
+f_unlink_char("./GITX.png");
+f_unlink_char("./GIVX.png");
+f_unlink_char("./GIZX.png");
+f_unlink_char("./GJ2X.png");
+f_unlink_char("./GJ3X.png");
+f_unlink_char("./GJBX.png");
+f_unlink_char("./GJCX.png");
+f_unlink_char("./GJDX.png");
+f_unlink_char("./GJFX.png");
+f_unlink_char("./GJKX.png");
+f_unlink_char("./GJNX.png");
+f_unlink_char("./GJSX.png");
+f_unlink_char("./GJUX.png");
+f_unlink_char("./GJWX.png");
+f_unlink_char("./GJXX.png");
+f_unlink_char("./GJYX.png");
+f_unlink_char("./GJZX.png");
+f_unlink_char("./GK2X.png");
+f_unlink_char("./GK3X.png");
+f_unlink_char("./GK4X.png");
+f_unlink_char("./GK5X.png");
+f_unlink_char("./GK7X.png");
+f_unlink_char("./GK9X.png");
+f_unlink_char("./GKAX.png");
+f_unlink_char("./GKBX.png");
+f_unlink_char("./GKDX.png");
+f_unlink_char("./GKFX.png");
+f_unlink_char("./GKGX.png");
+f_unlink_char("./GKHX.png");
+f_unlink_char("./GKJX.png");
+f_unlink_char("./GKKX.png");
+f_unlink_char("./GKLX.png");
+f_unlink_char("./GKMX.png");
+f_unlink_char("./GKNX.png");
+f_unlink_char("./GKOX.png");
+f_unlink_char("./GKQX.png");
+f_unlink_char("./GKRX.png");
+f_unlink_char("./GKSX.png");
+f_unlink_char("./GKTX.png");
+f_unlink_char("./GKUX.png");
+f_unlink_char("./GKWX.png");
+f_unlink_char("./GKYX.png");
+f_unlink_char("./GKZX.png");
+f_unlink_char("./GL2X.png");
+f_unlink_char("./GL5X.png");
+f_unlink_char("./GL7X.png");
+f_unlink_char("./GL8X.png");
+f_unlink_char("./GLBX.png");
+f_unlink_char("./GLCX.png");
+f_unlink_char("./GLEX.png");
+f_unlink_char("./GLGX.png");
+f_unlink_char("./GLHX.png");
+f_unlink_char("./GLLX.png");
+f_unlink_char("./GLMX.png");
+f_unlink_char("./GLMEX.png");
+f_unlink_char("./GLNX.png");
+f_unlink_char("./GLOX.png");
+f_unlink_char("./GLQX.png");
+f_unlink_char("./GLRX.png");
+f_unlink_char("./GLSX.png");
+f_unlink_char("./GLUX.png");
+f_unlink_char("./GLVX.png");
+f_unlink_char("./GLWX.png");
+f_unlink_char("./GLYX.png");
+f_unlink_char("./GLZX.png");
+f_unlink_char("./GM2X.png");
+f_unlink_char("./GM3X.png");
+f_unlink_char("./GM4X.png");
+f_unlink_char("./GM5X.png");
+f_unlink_char("./GM6X.png");
+f_unlink_char("./GM8X.png");
+f_unlink_char("./GM9X.png");
+f_unlink_char("./GMAX.png");
+f_unlink_char("./GMBX.png");
+f_unlink_char("./GMDX.png");
+f_unlink_char("./GMEX.png");
+f_unlink_char("./GMFX.png");
+f_unlink_char("./GMHX.png");
+f_unlink_char("./GMIX.png");
+f_unlink_char("./GMJX.png");
+f_unlink_char("./GMKX.png");
+f_unlink_char("./GMLX.png");
+f_unlink_char("./GMNX.png");
+f_unlink_char("./GMOX.png");
+f_unlink_char("./GMPX.png");
+f_unlink_char("./GMQX.png");
+f_unlink_char("./GMRX.png");
+f_unlink_char("./GMSX.png");
+f_unlink_char("./GMTX.png");
+f_unlink_char("./GMUX.png");
+f_unlink_char("./GMWX.png");
+f_unlink_char("./GMXX.png");
+f_unlink_char("./GMYX.png");
+f_unlink_char("./GMZX.png");
+f_unlink_char("./GN2X.png");
+f_unlink_char("./GN3X.png");
+f_unlink_char("./GN4X.png");
+f_unlink_char("./GN5X.png");
+f_unlink_char("./GN6X.png");
+f_unlink_char("./GN7X.png");
+f_unlink_char("./GN8X.png");
+f_unlink_char("./GN9X.png");
+f_unlink_char("./GNAX.png");
+f_unlink_char("./GNBX.png");
+f_unlink_char("./GNCX.png");
+f_unlink_char("./GNDX.png");
+f_unlink_char("./GNEX.png");
+f_unlink_char("./GNFX.png");
+f_unlink_char("./GNGX.png");
+f_unlink_char("./GNHX.png");
+f_unlink_char("./GNIX.png");
+f_unlink_char("./GNJX.png");
+f_unlink_char("./GNKX.png");
+f_unlink_char("./GNNX.png");
+f_unlink_char("./GNOX.png");
+f_unlink_char("./GNPX.png");
+f_unlink_char("./GNQX.png");
+f_unlink_char("./GNRX.png");
+f_unlink_char("./GNSX.png");
+f_unlink_char("./GNUX.png");
+f_unlink_char("./GNVX.png");
+f_unlink_char("./GNWX.png");
+f_unlink_char("./GNXX.png");
+f_unlink_char("./GNZX.png");
+f_unlink_char("./GO2X.png");
+f_unlink_char("./GO3X.png");
+f_unlink_char("./GO7X.png");
+f_unlink_char("./GOAX.png");
+f_unlink_char("./GOBX.png");
+f_unlink_char("./GOCX.png");
+f_unlink_char("./GOFX.png");
+f_unlink_char("./GOGX.png");
+f_unlink_char("./GOMX.png");
+f_unlink_char("./GONX.png");
+f_unlink_char("./GOOX.png");
+f_unlink_char("./GOPX.png");
+f_unlink_char("./GOQX.png");
+f_unlink_char("./GOSX.png");
+f_unlink_char("./GOWX.png");
+f_unlink_char("./GOYX.png");
+f_unlink_char("./GP2X.png");
+f_unlink_char("./GP3X.png");
+f_unlink_char("./GP4X.png");
+f_unlink_char("./GP5X.png");
+f_unlink_char("./GP6X.png");
+f_unlink_char("./GP7X.png");
+f_unlink_char("./GP8X.png");
+f_unlink_char("./GP9X.png");
+f_unlink_char("./GPAX.png");
+f_unlink_char("./GPDX.png");
+f_unlink_char("./GPEX.png");
+f_unlink_char("./GPHX.png");
+f_unlink_char("./GPIX.png");
+f_unlink_char("./GPKX.png");
+f_unlink_char("./GPLX.png");
+f_unlink_char("./GPMX.png");
+f_unlink_char("./GPNX.png");
+f_unlink_char("./GPOX.png");
+f_unlink_char("./GPQX.png");
+f_unlink_char("./GPRX.png");
+f_unlink_char("./GPSX.png");
+f_unlink_char("./GPTX.png");
+f_unlink_char("./GPUX.png");
+f_unlink_char("./GPVX.png");
+f_unlink_char("./GPWX.png");
+f_unlink_char("./GPXX.png");
+f_unlink_char("./GPYX.png");
+f_unlink_char("./GPZX.png");
+f_unlink_char("./GQ4X.png");
+f_unlink_char("./GQ8X.png");
+f_unlink_char("./GQBX.png");
+f_unlink_char("./GQCX.png");
+f_unlink_char("./GQLX.png");
+f_unlink_char("./GQNX.png");
+f_unlink_char("./GQPX.png");
+f_unlink_char("./GQQX.png");
+f_unlink_char("./GQRX.png");
+f_unlink_char("./GQSX.png");
+f_unlink_char("./GQTX.png");
+f_unlink_char("./GQWX.png");
+f_unlink_char("./GQXX.png");
+f_unlink_char("./GR2X.png");
+f_unlink_char("./GR3X.png");
+f_unlink_char("./GR4X.png");
+f_unlink_char("./GR5X.png");
+f_unlink_char("./GR6X.png");
+f_unlink_char("./GR8X.png");
+f_unlink_char("./GRAX.png");
+f_unlink_char("./GRBX.png");
+f_unlink_char("./GREX.png");
+f_unlink_char("./GRFX.png");
+f_unlink_char("./GRHX.png");
+f_unlink_char("./GRJX.png");
+f_unlink_char("./GRLX.png");
+f_unlink_char("./GRMX.png");
+f_unlink_char("./GRNX.png");
+f_unlink_char("./GROX.png");
+f_unlink_char("./GRQX.png");
+f_unlink_char("./GRRX.png");
+f_unlink_char("./GRSX.png");
+f_unlink_char("./GRUX.png");
+f_unlink_char("./GRVX.png");
+f_unlink_char("./GRWX.png");
+f_unlink_char("./GRYX.png");
+f_unlink_char("./GS2X.png");
+f_unlink_char("./GS3X.png");
+f_unlink_char("./GS7X.png");
+f_unlink_char("./GS8X.png");
+f_unlink_char("./GS9X.png");
+f_unlink_char("./GSAX.png");
+f_unlink_char("./GSBX.png");
+f_unlink_char("./GSCX.png");
+f_unlink_char("./GSDX.png");
+f_unlink_char("./GSEX.png");
+f_unlink_char("./GSGX.png");
+f_unlink_char("./GSHX.png");
+f_unlink_char("./GSKX.png");
+f_unlink_char("./GSMX.png");
+f_unlink_char("./GSNX.png");
+f_unlink_char("./GSOX.png");
+f_unlink_char("./GSPX.png");
+f_unlink_char("./GSQX.png");
+f_unlink_char("./GSRX.png");
+f_unlink_char("./GSSX.png");
+f_unlink_char("./GSTX.png");
+f_unlink_char("./GSUX.png");
+f_unlink_char("./GSVX.png");
+f_unlink_char("./GSWX.png");
+f_unlink_char("./GSXX.png");
+f_unlink_char("./GSYX.png");
+f_unlink_char("./GSZX.png");
+f_unlink_char("./GT3X.png");
+f_unlink_char("./GT4X.png");
+f_unlink_char("./GT5X.png");
+f_unlink_char("./GT6X.png");
+f_unlink_char("./GT7X.png");
+f_unlink_char("./GT8X.png");
+f_unlink_char("./GTAX.png");
+f_unlink_char("./GTCX.png");
+f_unlink_char("./GTDX.png");
+f_unlink_char("./GTEX.png");
+f_unlink_char("./GTFX.png");
+f_unlink_char("./GTGX.png");
+f_unlink_char("./GTIX.png");
+f_unlink_char("./GTJX.png");
+f_unlink_char("./GTKX.png");
+f_unlink_char("./GTLX.png");
+f_unlink_char("./GTNX.png");
+f_unlink_char("./GTPX.png");
+f_unlink_char("./GTQX.png");
+f_unlink_char("./GTRX.png");
+f_unlink_char("./GTSX.png");
+f_unlink_char("./GTUX.png");
+f_unlink_char("./GTVX.png");
+f_unlink_char("./GTWX.png");
+f_unlink_char("./GTYX.png");
+f_unlink_char("./GTZX.png");
+f_unlink_char("./GU2X.png");
+f_unlink_char("./GU3X.png");
+f_unlink_char("./GU4X.png");
+f_unlink_char("./GU6X.png");
+f_unlink_char("./GUBX.png");
+f_unlink_char("./GUCX.png");
+f_unlink_char("./GUFX.png");
+f_unlink_char("./GUGX.png");
+f_unlink_char("./GUMX.png");
+f_unlink_char("./GUNX.png");
+f_unlink_char("./GUPX.png");
+f_unlink_char("./GUSX.png");
+f_unlink_char("./GUTX.png");
+f_unlink_char("./GUVX.png");
+f_unlink_char("./GUZX.png");
+f_unlink_char("./GV3X.png");
+f_unlink_char("./GV4X.png");
+f_unlink_char("./GVCX.png");
+f_unlink_char("./GVDX.png");
+f_unlink_char("./GVHX.png");
+f_unlink_char("./GVJX.png");
+f_unlink_char("./GVKX.png");
+f_unlink_char("./GVLX.png");
+f_unlink_char("./GVMX.png");
+f_unlink_char("./GVOX.png");
+f_unlink_char("./GVPX.png");
+f_unlink_char("./GVRX.png");
+f_unlink_char("./GVSX.png");
+f_unlink_char("./GW2X.png");
+f_unlink_char("./GW3X.png");
+f_unlink_char("./GW4X.png");
+f_unlink_char("./GW5X.png");
+f_unlink_char("./GW6X.png");
+f_unlink_char("./GW7X.png");
+f_unlink_char("./GW8X.png");
+f_unlink_char("./GW9X.png");
+f_unlink_char("./GWAX.png");
+f_unlink_char("./GWBX.png");
+f_unlink_char("./GWEX.png");
+f_unlink_char("./GWGX.png");
+f_unlink_char("./GWHX.png");
+f_unlink_char("./GWJX.png");
+f_unlink_char("./GWKX.png");
+f_unlink_char("./GWLX.png");
+f_unlink_char("./GWMX.png");
+f_unlink_char("./GWOX.png");
+f_unlink_char("./GWPX.png");
+f_unlink_char("./GWQX.png");
+f_unlink_char("./GWRX.png");
+f_unlink_char("./GWSX.png");
+f_unlink_char("./GWTX.png");
+f_unlink_char("./GWUX.png");
+f_unlink_char("./GWVX.png");
+f_unlink_char("./GWWX.png");
+f_unlink_char("./GWYX.png");
+f_unlink_char("./GWZX.png");
+f_unlink_char("./GX2X.png");
+f_unlink_char("./GX3X.png");
+f_unlink_char("./GXAX.png");
+f_unlink_char("./GXBX.png");
+f_unlink_char("./GXCX.png");
+f_unlink_char("./GXEX.png");
+f_unlink_char("./GXFX.png");
+f_unlink_char("./GXGX.png");
+f_unlink_char("./GXLX.png");
+f_unlink_char("./GXMX.png");
+f_unlink_char("./GXNX.png");
+f_unlink_char("./GXOX.png");
+f_unlink_char("./GXPX.png");
+f_unlink_char("./GXQX.png");
+f_unlink_char("./GXRX.png");
+f_unlink_char("./GXSX.png");
+f_unlink_char("./GXUX.png");
+f_unlink_char("./GXXX.png");
+f_unlink_char("./GY2X.png");
+f_unlink_char("./GY3X.png");
+f_unlink_char("./GYAX.png");
+f_unlink_char("./GYBX.png");
+f_unlink_char("./GYFX.png");
+f_unlink_char("./GYKX.png");
+f_unlink_char("./GYQX.png");
+f_unlink_char("./GYRX.png");
+f_unlink_char("./GYTX.png");
+f_unlink_char("./GYWX.png");
+f_unlink_char("./GZ2X.png");
+f_unlink_char("./GZ3X.png");
+f_unlink_char("./GZCX.png");
+f_unlink_char("./GZDX.png");
+f_unlink_char("./GZEX.png");
+f_unlink_char("./GZHX.png");
+f_unlink_char("./GZLX.png");
+f_unlink_char("./GZMX.png");
+f_unlink_char("./GZOX.png");
+f_unlink_char("./GZPX.png");
+f_unlink_char("./GZQX.png");
+f_unlink_char("./GZSX.png");
+f_unlink_char("./GZVX.png");
+f_unlink_char("./GZWX.png");
+f_unlink_char("./P2MX.png");
+f_unlink_char("./PC6X.png");
+f_unlink_char("./PM4X.png");
+f_unlink_char("./PRJX.png");
+f_unlink_char("./PZLX.png");
+f_unlink_char("./D42.png");
+f_unlink_char("./D43.png");
+f_unlink_char("./D44.png");
+f_unlink_char("./D45.png");
+f_unlink_char("./D4L.png");
+f_unlink_char("./D56.png");
+f_unlink_char("./G2B.png");
+f_unlink_char("./G2C.png");
+f_unlink_char("./G2F.png");
+f_unlink_char("./G2G.png");
+f_unlink_char("./G2K.png");
+f_unlink_char("./G2M.png");
+f_unlink_char("./G2O.png");
+f_unlink_char("./G2P.png");
+f_unlink_char("./G2R.png");
+f_unlink_char("./G2S.png");
+f_unlink_char("./G2T.png");
+f_unlink_char("./G2V.png");
+f_unlink_char("./G2X.png");
+f_unlink_char("./G3A.png");
+f_unlink_char("./G3B.png");
+f_unlink_char("./G3D.png");
+f_unlink_char("./G3E.png");
+f_unlink_char("./G3F.png");
+f_unlink_char("./G3J.png");
+f_unlink_char("./G3L.png");
+f_unlink_char("./G3M.png");
+f_unlink_char("./G3N.png");
+f_unlink_char("./G3Q.png");
+f_unlink_char("./G3R.png");
+f_unlink_char("./G3S.png");
+f_unlink_char("./G3V.png");
+f_unlink_char("./G3X.png");
+f_unlink_char("./G3Y.png");
+f_unlink_char("./G4A.png");
+f_unlink_char("./G4B.png");
+f_unlink_char("./G4C.png");
+f_unlink_char("./G4F.png");
+f_unlink_char("./G4G.png");
+f_unlink_char("./G4I.png");
+f_unlink_char("./G4M.png");
+f_unlink_char("./G4N.png");
+f_unlink_char("./G4O.png");
+f_unlink_char("./G4Q.png");
+f_unlink_char("./G4S.png");
+f_unlink_char("./G4Z.png");
+f_unlink_char("./G5B.png");
+f_unlink_char("./G5D.png");
+f_unlink_char("./G5N.png");
+f_unlink_char("./G5S.png");
+f_unlink_char("./G5T.png");
+f_unlink_char("./G62.png");
+f_unlink_char("./G63.png");
+f_unlink_char("./G6F.png");
+f_unlink_char("./G6M.png");
+f_unlink_char("./G6N.png");
+f_unlink_char("./G6Q.png");
+f_unlink_char("./G6S.png");
+f_unlink_char("./G6T.png");
+f_unlink_char("./G6W.png");
+f_unlink_char("./G7M.png");
+f_unlink_char("./G89.png");
+f_unlink_char("./G8F.png");
+f_unlink_char("./G8M.png");
+f_unlink_char("./G8S.png");
+f_unlink_char("./G8W.png");
+f_unlink_char("./G9B.png");
+f_unlink_char("./G9R.png");
+f_unlink_char("./G9S.png");
+f_unlink_char("./G9T.png");
+f_unlink_char("./GA2.png");
+f_unlink_char("./GA3.png");
+f_unlink_char("./GA4.png");
+f_unlink_char("./GA7.png");
+f_unlink_char("./GAA.png");
+f_unlink_char("./GAB.png");
+f_unlink_char("./GAC.png");
+f_unlink_char("./GAF.png");
+f_unlink_char("./GAG.png");
+f_unlink_char("./GAH.png");
+f_unlink_char("./GAK.png");
+f_unlink_char("./GAL.png");
+f_unlink_char("./GAM.png");
+f_unlink_char("./GAN.png");
+f_unlink_char("./GAP.png");
+f_unlink_char("./GAQ.png");
+f_unlink_char("./GAR.png");
+f_unlink_char("./GAT.png");
+f_unlink_char("./GAU.png");
+f_unlink_char("./GAV.png");
+f_unlink_char("./GAX.png");
+f_unlink_char("./GAY.png");
+f_unlink_char("./GAZ.png");
+f_unlink_char("./GB2.png");
+f_unlink_char("./GB3.png");
+f_unlink_char("./GB4.png");
+f_unlink_char("./GBA.png");
+f_unlink_char("./GBD.png");
+f_unlink_char("./GBF.png");
+f_unlink_char("./GBG.png");
+f_unlink_char("./GBH.png");
+f_unlink_char("./GBI.png");
+f_unlink_char("./GBK.png");
+f_unlink_char("./GBL.png");
+f_unlink_char("./GBM.png");
+f_unlink_char("./GBN.png");
+f_unlink_char("./GBO.png");
+f_unlink_char("./GBQ.png");
+f_unlink_char("./GBS.png");
+f_unlink_char("./GBT.png");
+f_unlink_char("./GBV.png");
+f_unlink_char("./GBW.png");
+f_unlink_char("./GBX.png");
+f_unlink_char("./GBY.png");
+f_unlink_char("./GBZ.png");
+f_unlink_char("./GC2.png");
+f_unlink_char("./GC3.png");
+f_unlink_char("./GC4.png");
+f_unlink_char("./GC5.png");
+f_unlink_char("./GC6.png");
+f_unlink_char("./GC7.png");
+f_unlink_char("./GC9.png");
+f_unlink_char("./GCA.png");
+f_unlink_char("./GCB.png");
+f_unlink_char("./GCC.png");
+f_unlink_char("./GCD.png");
+f_unlink_char("./GCE.png");
+f_unlink_char("./GCF.png");
+f_unlink_char("./GCG.png");
+f_unlink_char("./GCH.png");
+f_unlink_char("./GCJ.png");
+f_unlink_char("./GCL.png");
+f_unlink_char("./GCN.png");
+f_unlink_char("./GCO.png");
+f_unlink_char("./GCP.png");
+f_unlink_char("./GCQ.png");
+f_unlink_char("./GCS.png");
+f_unlink_char("./GCT.png");
+f_unlink_char("./GCU.png");
+f_unlink_char("./GCV.png");
+f_unlink_char("./GCW.png");
+f_unlink_char("./GCZ.png");
+f_unlink_char("./GD4.png");
+f_unlink_char("./GD5.png");
+f_unlink_char("./GD6.png");
+f_unlink_char("./GD7.png");
+f_unlink_char("./GD9.png");
+f_unlink_char("./GDC.png");
+f_unlink_char("./GDD.png");
+f_unlink_char("./GDE.png");
+f_unlink_char("./GDF.png");
+f_unlink_char("./GDG.png");
+f_unlink_char("./GDI.png");
+f_unlink_char("./GDJ.png");
+f_unlink_char("./GDK.png");
+f_unlink_char("./GDL.png");
+f_unlink_char("./GDM.png");
+f_unlink_char("./GDO.png");
+f_unlink_char("./GDP.png");
+f_unlink_char("./GDQ.png");
+f_unlink_char("./GDR.png");
+f_unlink_char("./GDS.png");
+f_unlink_char("./GDT.png");
+f_unlink_char("./GDV.png");
+f_unlink_char("./GDW.png");
+f_unlink_char("./GDX.png");
+f_unlink_char("./GE3.png");
+f_unlink_char("./GE4.png");
+f_unlink_char("./GE5.png");
+f_unlink_char("./GE9.png");
+f_unlink_char("./GEA.png");
+f_unlink_char("./GEB.png");
+f_unlink_char("./GED.png");
+f_unlink_char("./GEM.png");
+f_unlink_char("./GEN.png");
+f_unlink_char("./GEO.png");
+f_unlink_char("./GES.png");
+f_unlink_char("./GEV.png");
+f_unlink_char("./GEW.png");
+f_unlink_char("./GEX.png");
+f_unlink_char("./GEY.png");
+f_unlink_char("./GEZ.png");
+f_unlink_char("./GF2.png");
+f_unlink_char("./GF3.png");
+f_unlink_char("./GF4.png");
+f_unlink_char("./GF5.png");
+f_unlink_char("./GF6.png");
+f_unlink_char("./GF7.png");
+f_unlink_char("./GFA.png");
+f_unlink_char("./GFB.png");
+f_unlink_char("./GFD.png");
+f_unlink_char("./GFE.png");
+f_unlink_char("./GFF.png");
+f_unlink_char("./GFG.png");
+f_unlink_char("./GFH.png");
+f_unlink_char("./GFI.png");
+f_unlink_char("./GFK.png");
+f_unlink_char("./GFN.png");
+f_unlink_char("./GFO.png");
+f_unlink_char("./GFP.png");
+f_unlink_char("./GFQ.png");
+f_unlink_char("./GFS.png");
+f_unlink_char("./GFT.png");
+f_unlink_char("./GFU.png");
+f_unlink_char("./GFV.png");
+f_unlink_char("./GFW.png");
+f_unlink_char("./GFX.png");
+f_unlink_char("./GFY.png");
+f_unlink_char("./GFZ.png");
+f_unlink_char("./GG2.png");
+f_unlink_char("./GG4.png");
+f_unlink_char("./GG5.png");
+f_unlink_char("./GGA.png");
+f_unlink_char("./GGC.png");
+f_unlink_char("./GGE.png");
+f_unlink_char("./GGN.png");
+f_unlink_char("./GGP.png");
+f_unlink_char("./GGR.png");
+f_unlink_char("./GGS.png");
+f_unlink_char("./GGT.png");
+f_unlink_char("./GGV.png");
+f_unlink_char("./GGY.png");
+f_unlink_char("./GGZ.png");
+f_unlink_char("./GH2.png");
+f_unlink_char("./GH3.png");
+f_unlink_char("./GH4.png");
+f_unlink_char("./GH5.png");
+f_unlink_char("./GH6.png");
+f_unlink_char("./GH7.png");
+f_unlink_char("./GH9.png");
+f_unlink_char("./GHA.png");
+f_unlink_char("./GHB.png");
+f_unlink_char("./GHC.png");
+f_unlink_char("./GHE.png");
+f_unlink_char("./GHF.png");
+f_unlink_char("./GHG.png");
+f_unlink_char("./GHK.png");
+f_unlink_char("./GHL.png");
+f_unlink_char("./GHM.png");
+f_unlink_char("./GHN.png");
+f_unlink_char("./GHP.png");
+f_unlink_char("./GHQ.png");
+f_unlink_char("./GHR.png");
+f_unlink_char("./GHS.png");
+f_unlink_char("./GHU.png");
+f_unlink_char("./GHV.png");
+f_unlink_char("./GHW.png");
+f_unlink_char("./GHY.png");
+f_unlink_char("./GHZ.png");
+f_unlink_char("./GIA.png");
+f_unlink_char("./GIB.png");
+f_unlink_char("./GIC.png");
+f_unlink_char("./GIG.png");
+f_unlink_char("./GIH.png");
+f_unlink_char("./GIJ.png");
+f_unlink_char("./GIK.png");
+f_unlink_char("./GIL.png");
+f_unlink_char("./GIN.png");
+f_unlink_char("./GIP.png");
+f_unlink_char("./GIQ.png");
+f_unlink_char("./GIS.png");
+f_unlink_char("./GIT.png");
+f_unlink_char("./GIV.png");
+f_unlink_char("./GIZ.png");
+f_unlink_char("./GJ2.png");
+f_unlink_char("./GJ3.png");
+f_unlink_char("./GJB.png");
+f_unlink_char("./GJC.png");
+f_unlink_char("./GJD.png");
+f_unlink_char("./GJF.png");
+f_unlink_char("./GJK.png");
+f_unlink_char("./GJN.png");
+f_unlink_char("./GJS.png");
+f_unlink_char("./GJU.png");
+f_unlink_char("./GJW.png");
+f_unlink_char("./GJX.png");
+f_unlink_char("./GJY.png");
+f_unlink_char("./GJZ.png");
+f_unlink_char("./GK2.png");
+f_unlink_char("./GK3.png");
+f_unlink_char("./GK4.png");
+f_unlink_char("./GK5.png");
+f_unlink_char("./GK7.png");
+f_unlink_char("./GK9.png");
+f_unlink_char("./GKA.png");
+f_unlink_char("./GKB.png");
+f_unlink_char("./GKD.png");
+f_unlink_char("./GKF.png");
+f_unlink_char("./GKG.png");
+f_unlink_char("./GKH.png");
+f_unlink_char("./GKJ.png");
+f_unlink_char("./GKK.png");
+f_unlink_char("./GKL.png");
+f_unlink_char("./GKM.png");
+f_unlink_char("./GKN.png");
+f_unlink_char("./GKO.png");
+f_unlink_char("./GKQ.png");
+f_unlink_char("./GKR.png");
+f_unlink_char("./GKS.png");
+f_unlink_char("./GKT.png");
+f_unlink_char("./GKU.png");
+f_unlink_char("./GKW.png");
+f_unlink_char("./GKY.png");
+f_unlink_char("./GKZ.png");
+f_unlink_char("./GL2.png");
+f_unlink_char("./GL5.png");
+f_unlink_char("./GL7.png");
+f_unlink_char("./GL8.png");
+f_unlink_char("./GLB.png");
+f_unlink_char("./GLC.png");
+f_unlink_char("./GLE.png");
+f_unlink_char("./GLG.png");
+f_unlink_char("./GLH.png");
+f_unlink_char("./GLL.png");
+f_unlink_char("./GLM.png");
+f_unlink_char("./GLME.png");
+f_unlink_char("./GLN.png");
+f_unlink_char("./GLO.png");
+f_unlink_char("./GLQ.png");
+f_unlink_char("./GLR.png");
+f_unlink_char("./GLS.png");
+f_unlink_char("./GLU.png");
+f_unlink_char("./GLV.png");
+f_unlink_char("./GLW.png");
+f_unlink_char("./GLY.png");
+f_unlink_char("./GLZ.png");
+f_unlink_char("./GM2.png");
+f_unlink_char("./GM3.png");
+f_unlink_char("./GM4.png");
+f_unlink_char("./GM5.png");
+f_unlink_char("./GM6.png");
+f_unlink_char("./GM8.png");
+f_unlink_char("./GM9.png");
+f_unlink_char("./GMA.png");
+f_unlink_char("./GMB.png");
+f_unlink_char("./GMD.png");
+f_unlink_char("./GME.png");
+f_unlink_char("./GMF.png");
+f_unlink_char("./GMH.png");
+f_unlink_char("./GMI.png");
+f_unlink_char("./GMJ.png");
+f_unlink_char("./GMK.png");
+f_unlink_char("./GML.png");
+f_unlink_char("./GMN.png");
+f_unlink_char("./GMO.png");
+f_unlink_char("./GMP.png");
+f_unlink_char("./GMQ.png");
+f_unlink_char("./GMR.png");
+f_unlink_char("./GMS.png");
+f_unlink_char("./GMT.png");
+f_unlink_char("./GMU.png");
+f_unlink_char("./GMW.png");
+f_unlink_char("./GMX.png");
+f_unlink_char("./GMY.png");
+f_unlink_char("./GMZ.png");
+f_unlink_char("./GN2.png");
+f_unlink_char("./GN3.png");
+f_unlink_char("./GN4.png");
+f_unlink_char("./GN5.png");
+f_unlink_char("./GN6.png");
+f_unlink_char("./GN7.png");
+f_unlink_char("./GN8.png");
+f_unlink_char("./GN9.png");
+f_unlink_char("./GNA.png");
+f_unlink_char("./GNB.png");
+f_unlink_char("./GNC.png");
+f_unlink_char("./GND.png");
+f_unlink_char("./GNE.png");
+f_unlink_char("./GNF.png");
+f_unlink_char("./GNG.png");
+f_unlink_char("./GNH.png");
+f_unlink_char("./GNI.png");
+f_unlink_char("./GNJ.png");
+f_unlink_char("./GNK.png");
+f_unlink_char("./GNN.png");
+f_unlink_char("./GNO.png");
+f_unlink_char("./GNP.png");
+f_unlink_char("./GNQ.png");
+f_unlink_char("./GNR.png");
+f_unlink_char("./GNS.png");
+f_unlink_char("./GNU.png");
+f_unlink_char("./GNV.png");
+f_unlink_char("./GNW.png");
+f_unlink_char("./GNX.png");
+f_unlink_char("./GNZ.png");
+f_unlink_char("./GO2.png");
+f_unlink_char("./GO3.png");
+f_unlink_char("./GO7.png");
+f_unlink_char("./GOA.png");
+f_unlink_char("./GOB.png");
+f_unlink_char("./GOC.png");
+f_unlink_char("./GOF.png");
+f_unlink_char("./GOG.png");
+f_unlink_char("./GOM.png");
+f_unlink_char("./GON.png");
+f_unlink_char("./GOO.png");
+f_unlink_char("./GOP.png");
+f_unlink_char("./GOQ.png");
+f_unlink_char("./GOS.png");
+f_unlink_char("./GOW.png");
+f_unlink_char("./GOY.png");
+f_unlink_char("./GP2.png");
+f_unlink_char("./GP3.png");
+f_unlink_char("./GP4.png");
+f_unlink_char("./GP5.png");
+f_unlink_char("./GP6.png");
+f_unlink_char("./GP7.png");
+f_unlink_char("./GP8.png");
+f_unlink_char("./GP9.png");
+f_unlink_char("./GPA.png");
+f_unlink_char("./GPD.png");
+f_unlink_char("./GPE.png");
+f_unlink_char("./GPH.png");
+f_unlink_char("./GPI.png");
+f_unlink_char("./GPK.png");
+f_unlink_char("./GPL.png");
+f_unlink_char("./GPM.png");
+f_unlink_char("./GPN.png");
+f_unlink_char("./GPO.png");
+f_unlink_char("./GPQ.png");
+f_unlink_char("./GPR.png");
+f_unlink_char("./GPS.png");
+f_unlink_char("./GPT.png");
+f_unlink_char("./GPU.png");
+f_unlink_char("./GPV.png");
+f_unlink_char("./GPW.png");
+f_unlink_char("./GPX.png");
+f_unlink_char("./GPY.png");
+f_unlink_char("./GPZ.png");
+f_unlink_char("./GQ4.png");
+f_unlink_char("./GQ8.png");
+f_unlink_char("./GQB.png");
+f_unlink_char("./GQC.png");
+f_unlink_char("./GQL.png");
+f_unlink_char("./GQN.png");
+f_unlink_char("./GQP.png");
+f_unlink_char("./GQQ.png");
+f_unlink_char("./GQR.png");
+f_unlink_char("./GQS.png");
+f_unlink_char("./GQT.png");
+f_unlink_char("./GQW.png");
+f_unlink_char("./GQX.png");
+f_unlink_char("./GR2.png");
+f_unlink_char("./GR3.png");
+f_unlink_char("./GR4.png");
+f_unlink_char("./GR5.png");
+f_unlink_char("./GR6.png");
+f_unlink_char("./GR8.png");
+f_unlink_char("./GRA.png");
+f_unlink_char("./GRB.png");
+f_unlink_char("./GRE.png");
+f_unlink_char("./GRF.png");
+f_unlink_char("./GRH.png");
+f_unlink_char("./GRJ.png");
+f_unlink_char("./GRL.png");
+f_unlink_char("./GRM.png");
+f_unlink_char("./GRN.png");
+f_unlink_char("./GRO.png");
+f_unlink_char("./GRQ.png");
+f_unlink_char("./GRR.png");
+f_unlink_char("./GRS.png");
+f_unlink_char("./GRU.png");
+f_unlink_char("./GRV.png");
+f_unlink_char("./GRW.png");
+f_unlink_char("./GRY.png");
+f_unlink_char("./GS2.png");
+f_unlink_char("./GS3.png");
+f_unlink_char("./GS7.png");
+f_unlink_char("./GS8.png");
+f_unlink_char("./GS9.png");
+f_unlink_char("./GSA.png");
+f_unlink_char("./GSB.png");
+f_unlink_char("./GSC.png");
+f_unlink_char("./GSD.png");
+f_unlink_char("./GSE.png");
+f_unlink_char("./GSG.png");
+f_unlink_char("./GSH.png");
+f_unlink_char("./GSK.png");
+f_unlink_char("./GSM.png");
+f_unlink_char("./GSN.png");
+f_unlink_char("./GSO.png");
+f_unlink_char("./GSP.png");
+f_unlink_char("./GSQ.png");
+f_unlink_char("./GSR.png");
+f_unlink_char("./GSS.png");
+f_unlink_char("./GST.png");
+f_unlink_char("./GSU.png");
+f_unlink_char("./GSV.png");
+f_unlink_char("./GSW.png");
+f_unlink_char("./GSX.png");
+f_unlink_char("./GSY.png");
+f_unlink_char("./GSZ.png");
+f_unlink_char("./GT3.png");
+f_unlink_char("./GT4.png");
+f_unlink_char("./GT5.png");
+f_unlink_char("./GT6.png");
+f_unlink_char("./GT7.png");
+f_unlink_char("./GT8.png");
+f_unlink_char("./GTA.png");
+f_unlink_char("./GTC.png");
+f_unlink_char("./GTD.png");
+f_unlink_char("./GTE.png");
+f_unlink_char("./GTF.png");
+f_unlink_char("./GTG.png");
+f_unlink_char("./GTI.png");
+f_unlink_char("./GTJ.png");
+f_unlink_char("./GTK.png");
+f_unlink_char("./GTL.png");
+f_unlink_char("./GTN.png");
+f_unlink_char("./GTP.png");
+f_unlink_char("./GTQ.png");
+f_unlink_char("./GTR.png");
+f_unlink_char("./GTS.png");
+f_unlink_char("./GTU.png");
+f_unlink_char("./GTV.png");
+f_unlink_char("./GTW.png");
+f_unlink_char("./GTY.png");
+f_unlink_char("./GTZ.png");
+f_unlink_char("./GU2.png");
+f_unlink_char("./GU3.png");
+f_unlink_char("./GU4.png");
+f_unlink_char("./GU6.png");
+f_unlink_char("./GUB.png");
+f_unlink_char("./GUC.png");
+f_unlink_char("./GUF.png");
+f_unlink_char("./GUG.png");
+f_unlink_char("./GUM.png");
+f_unlink_char("./GUN.png");
+f_unlink_char("./GUP.png");
+f_unlink_char("./GUS.png");
+f_unlink_char("./GUT.png");
+f_unlink_char("./GUV.png");
+f_unlink_char("./GUZ.png");
+f_unlink_char("./GV3.png");
+f_unlink_char("./GV4.png");
+f_unlink_char("./GVC.png");
+f_unlink_char("./GVD.png");
+f_unlink_char("./GVH.png");
+f_unlink_char("./GVJ.png");
+f_unlink_char("./GVK.png");
+f_unlink_char("./GVL.png");
+f_unlink_char("./GVM.png");
+f_unlink_char("./GVO.png");
+f_unlink_char("./GVP.png");
+f_unlink_char("./GVR.png");
+f_unlink_char("./GVS.png");
+f_unlink_char("./GW2.png");
+f_unlink_char("./GW3.png");
+f_unlink_char("./GW4.png");
+f_unlink_char("./GW5.png");
+f_unlink_char("./GW6.png");
+f_unlink_char("./GW7.png");
+f_unlink_char("./GW8.png");
+f_unlink_char("./GW9.png");
+f_unlink_char("./GWA.png");
+f_unlink_char("./GWB.png");
+f_unlink_char("./GWE.png");
+f_unlink_char("./GWG.png");
+f_unlink_char("./GWH.png");
+f_unlink_char("./GWJ.png");
+f_unlink_char("./GWK.png");
+f_unlink_char("./GWL.png");
+f_unlink_char("./GWM.png");
+f_unlink_char("./GWO.png");
+f_unlink_char("./GWP.png");
+f_unlink_char("./GWQ.png");
+f_unlink_char("./GWR.png");
+f_unlink_char("./GWS.png");
+f_unlink_char("./GWT.png");
+f_unlink_char("./GWU.png");
+f_unlink_char("./GWV.png");
+f_unlink_char("./GWW.png");
+f_unlink_char("./GWY.png");
+f_unlink_char("./GWZ.png");
+f_unlink_char("./GX2.png");
+f_unlink_char("./GX3.png");
+f_unlink_char("./GXA.png");
+f_unlink_char("./GXB.png");
+f_unlink_char("./GXC.png");
+f_unlink_char("./GXE.png");
+f_unlink_char("./GXF.png");
+f_unlink_char("./GXG.png");
+f_unlink_char("./GXL.png");
+f_unlink_char("./GXM.png");
+f_unlink_char("./GXN.png");
+f_unlink_char("./GXO.png");
+f_unlink_char("./GXP.png");
+f_unlink_char("./GXQ.png");
+f_unlink_char("./GXR.png");
+f_unlink_char("./GXS.png");
+f_unlink_char("./GXU.png");
+f_unlink_char("./GXX.png");
+f_unlink_char("./GY2.png");
+f_unlink_char("./GY3.png");
+f_unlink_char("./GYA.png");
+f_unlink_char("./GYB.png");
+f_unlink_char("./GYF.png");
+f_unlink_char("./GYK.png");
+f_unlink_char("./GYQ.png");
+f_unlink_char("./GYR.png");
+f_unlink_char("./GYT.png");
+f_unlink_char("./GYW.png");
+f_unlink_char("./GZ2.png");
+f_unlink_char("./GZ3.png");
+f_unlink_char("./GZC.png");
+f_unlink_char("./GZD.png");
+f_unlink_char("./GZE.png");
+f_unlink_char("./GZH.png");
+f_unlink_char("./GZL.png");
+f_unlink_char("./GZM.png");
+f_unlink_char("./GZO.png");
+f_unlink_char("./GZP.png");
+f_unlink_char("./GZQ.png");
+f_unlink_char("./GZS.png");
+f_unlink_char("./GZV.png");
+f_unlink_char("./GZW.png");
+f_unlink_char("./P2M.png");
+f_unlink_char("./PC6.png");
+f_unlink_char("./PM4.png");
+f_unlink_char("./PRJ.png");
+f_unlink_char("./PZL.png");
+f_unlink_char("./test.png");	
+}
+
+void Credits(void) {
+	while(true) {
+		ClearScreen();
+		if (which_bg == BG_NONE)
+					{
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		//PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  B   : Back");	
+		PrintFormat(22, BLACK, MENU_POS_X + 4, MENU_POS_Y + 60, "CREDITS");		
+		PrintFormat(15, BLACK, MENU_POS_X + 225, MENU_POS_Y + 20*21, "MASTERMOD\xc2\xa9MMXVI");
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*5, "Coder         : Crediar");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*6, "Main Dev      : Fix94");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*7, "Commiters     : Gerbilsoft, Howard, Joostin, Greyrogue, Cyan");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*8, "Themes Dev    : A\xc6\x81Z");
+		PrintFormat(15, BLACK, MENU_POS_X + 5, MENU_POS_Y + 84, "\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94");				
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*10, "Main Tester   : Pedro702");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*11, "More Testers  : VinsCool, Adeka, OriginalHamster, ned");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*12, "                ShadowOne333, TotalInsanity4, ccfman2004");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*13, "Mods Testers  : Troopage, Drak0rex, Nakata6790");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*14, "Special Thanks: Anyone who has donated or contributed");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*15, " ");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*16, "Website       : https://github.com/FIX94/Nintendont ");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*18, "Forum         : http://gbatemp.net/");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*17, "Compatibility : http://wiki.gbatemp.net/wiki/");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 5, MENU_POS_Y + 20*19, " ");	
+		}
+					else if (which_bg == BG_LEGACY)
+					{		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		//PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  B   : Back");	
+		PrintFormat(22, WHITE, MENU_POS_X + 4, MENU_POS_Y + 60, "CREDITS");		
+		PrintFormat(15, WHITE, MENU_POS_X + 225, MENU_POS_Y + 20*21, "MASTERMOD\xc2\xa9MMXVI");
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*5, "Coder         : Crediar");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*6, "Main Dev      : Fix94");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*7, "Commiters     : GerbilSoft, Howard, Joostin, Greyrogue, Cyan");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*8, "Themes Dev    : A\xc6\x81Z");
+		PrintFormat(15, WHITE, MENU_POS_X + 5, MENU_POS_Y + 84, "\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94\xe2\x96\x94");				
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*10, "Main Tester   : Pedro702");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*11, "More Testers  : VinsCool, Adeka, OriginalHamster, ned");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*12, "                ShadowOne333, TotalInsanity4, ccfman2004");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*13, "Mods Testers  : Troopage, Drak0rex, Nakata6790");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*14, "Special Thanks: Anyone who has donated or contributed");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*15, " ");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*16, "Website       : https://github.com/FIX94/Nintendont ");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*18, "Forum         : http://gbatemp.net/");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*17, "Compatibility : http://wiki.gbatemp.net/wiki/");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 5, MENU_POS_Y + 20*19, " ");		
+		}
+
+		GRRLIB_Render();
+		FPAD_Update();
+		if (FPAD_Start(1)) {
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+		if (FPAD_Cancel(1)) {
+			break;}
+	}
+	ClearScreen();
+	return;
+}
Index: loader/source/ppc/PADReadGC.c
===================================================================
--- loader/source/ppc/PADReadGC.c	(revision 542)
+++ loader/source/ppc/PADReadGC.c	(working copy)
@@ -214,15 +214,14 @@
 		_siReg[14] |= (1<<31);
 		while(_siReg[14] & (1<<31));
 	}
-	u32 HIDMemPrep = 0;
-	if (HIDPad == HID_PAD_NOT_SET)
-		HIDPad = MaxPads;
-
-	for (chan = HIDPad; (chan < HID_PAD_NONE); (HID_CTRL->MultiIn == 3) ? (++chan) : (chan = HID_PAD_NONE)) // Run once unless MultiIn == 3
-	{
-		if(HIDMemPrep == 0) // first run
-		{
-			HID_Packet = (u8*)0x930050F0; // reset back to default offset
+	u32 HIDMemPrep = 0;
+	if (HIDPad == HID_PAD_NOT_SET)
+		HIDPad = MaxPads;
+		for (chan = HIDPad; (chan < HID_PAD_NONE); (HID_CTRL->MultiIn == 3) ? (++chan) : (chan = HID_PAD_NONE)) // Run once unless MultiIn == 3
+		{
+		if(HIDMemPrep == 0) // first run
+		{
+			HID_Packet = (u8*)0x930050F0; // reset back to default offset
 			memInvalidate = (u32)HID_Packet; // prepare memory
 			asm volatile("dcbi 0,%0; sync" : : "b"(memInvalidate) : "memory");
 			HIDMemPrep = memInvalidate;
@@ -658,14 +657,14 @@
 		
 // Nunchuck Buttons
 		if((BTPad[chan].used & C_NUN) && !(BTPad[chan].button & WM_BUTTON_TWO))	//nunchuck not being configured
-		{
-			switch ((BTPad[chan].used & (C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) >> 5)
-			{
-				case 0:	// (2)
-				default:
-				{	//Howards general config 
-					//A=A B=B Z=Z +=X -=Y Dpad=Standard
-					//C not pressed L R tilt tied to L R analog triggers.
+		{
+			switch ((BTPad[chan].used & (C_NSWAP1 | C_NSWAP2 | C_NSWAP3)) >> 5)
+			{
+				case 2:	// (2 & right)
+				//default:
+				{	//Howards general config 
+					//A=A B=B Z=Z +=X -=Y Dpad=Standard
+					//C not pressed L R tilt tied to L R analog triggers.
 					//C		pressed tilt control the cStick
 					if((BTPad[chan].button & NUN_BUTTON_C)	//tilt as camera control
 					 && !(BTPad[chan].used & C_ISWAP))
@@ -774,28 +773,28 @@
 						button |= PAD_TRIGGER_R;
 						Pad[chan].triggerRight = 0xFF;
 					}
-					else
-						Pad[chan].triggerRight = 0;
-				}break;
-				case 2:	// (2 & right)
-				{	//config asked for by naggers
-					//A=A 
-					//C not pressed U=Z D=B R=X L=Y B=R Z=L
-					//C		pressed Dpad=Standard B=R1/2 Z=L1/2 tilt controls cStick
-					if((BTPad[chan].button & NUN_BUTTON_Z) &&
+					else
+						Pad[chan].triggerRight = 0;
+				}break;
+				case 6:	// (2 & plus)
+				{	//config asked for by naggers
+					//A=A +=R1/2 -=L1/2
+					//C not pressed U=Z D=B R=X L=Y B=R Z=L
+					//C		pressed Dpad=Standard B=R1/2 Z=L1/2 tilt controls cStick
+					if((BTPad[chan].button & NUN_BUTTON_Z) &&
 					   (BTPad[chan].button & NUN_BUTTON_C))
 						Pad[chan].triggerLeft = 0x7F;
 					else
 					if(BTPad[chan].button & NUN_BUTTON_Z)
 					{
-						button |= PAD_TRIGGER_L;
-						Pad[chan].triggerLeft = 0xFF;
-					}
-//					else if(BTPad[chan].button & WM_BUTTON_MINUS)
-//						Pad[chan].triggerLeft = 0x7F; 
-					else
-						Pad[chan].triggerLeft = 0;
-
+						button |= PAD_TRIGGER_L;
+						Pad[chan].triggerLeft = 0xFF;
+					}
+					else if(BTPad[chan].button & WM_BUTTON_MINUS)
+						Pad[chan].triggerLeft = 0x7F; 
+					else
+						Pad[chan].triggerLeft = 0;
+
 					if((BTPad[chan].button & WM_BUTTON_B) &&
 					   (BTPad[chan].button & NUN_BUTTON_C))
 						Pad[chan].triggerRight = 0x7F;
@@ -802,14 +801,14 @@
 					else
 					if(BTPad[chan].button & WM_BUTTON_B)
 					{
-						button |= PAD_TRIGGER_R;
-						Pad[chan].triggerRight = 0xFF;
-					}
-//					else if(BTPad[chan].button & WM_BUTTON_PLUS)
-//						Pad[chan].triggerRight = 0x7F;
-					else
-						Pad[chan].triggerRight = 0;
-					
+						button |= PAD_TRIGGER_R;
+						Pad[chan].triggerRight = 0xFF;
+					}
+					else if(BTPad[chan].button & WM_BUTTON_PLUS)
+						Pad[chan].triggerRight = 0x7F;
+					else
+						Pad[chan].triggerRight = 0;
+					
 					if(BTPad[chan].button & WM_BUTTON_A)
 						button |= PAD_BUTTON_A;
 					
@@ -1090,101 +1089,119 @@
 					else
 						Pad[chan].triggerRight = 0;
 
-					if(BTPad[chan].button & WM_BUTTON_A)
-						button |= PAD_BUTTON_A;
-				}break;	
-				case 6:	// (2 & 1)
-				{	//FPS using IR as cStick alt based on naggers
-					//A=A B=R Z=L +=R1/2 -=L1/2
-					//C not pressed U=Z D=B R=X L=Y
-					//C		pressed Dpad=Standard, L R tilt tied to L R analog triggers.
-					//IR controls the cStick
-					
-					if(BTPad[chan].button & NUN_BUTTON_Z)
-					{
-						button |= PAD_TRIGGER_L;
-						Pad[chan].triggerLeft = 0xFF;
-					}
-					else if(BTPad[chan].button & WM_BUTTON_MINUS)
-						Pad[chan].triggerLeft = 0x7F; 
-					else if(BTPad[chan].button & NUN_BUTTON_C)
-					{
-						//	use tilt as AnalogL
-						/* xAccel  L=300 C=512 R=740 */
-						if(BTPad[chan].xAccel < 340)
-						{
-							button |= PAD_TRIGGER_L;
-							Pad[chan].triggerLeft = 0xFF;
-						}
-						else if(BTPad[chan].xAccel < 475)
-							Pad[chan].triggerLeft = (475 - BTPad[chan].xAccel) * 0xF0 / (475 - 340);
-						else
-							Pad[chan].triggerLeft = 0;
-					}
-					else
-						Pad[chan].triggerLeft = 0;
-					
-					if(BTPad[chan].button & WM_BUTTON_B)
-					{
-						button |= PAD_TRIGGER_R;
-						Pad[chan].triggerRight = 0xFF;
-					}
-					else if(BTPad[chan].button & WM_BUTTON_PLUS)
-						Pad[chan].triggerRight = 0x7F;
-					else if(BTPad[chan].button & NUN_BUTTON_C)
-					{
-						//	use tilt as AnalogR
-						/* xAccel  L=300 C=512 R=740 */
-						if(BTPad[chan].xAccel > 670)
-						{
-							button |= PAD_TRIGGER_R;
-							Pad[chan].triggerRight = 0xFF;
-						}
-						else if(BTPad[chan].xAccel > 550)
-							Pad[chan].triggerRight = (BTPad[chan].xAccel - 550) * 0xF0 / (670 - 550); 
-						else
-							Pad[chan].triggerRight = 0;
-					}
-					else
-						Pad[chan].triggerRight = 0;
-	
-					if(BTPad[chan].button & WM_BUTTON_A)
-						button |= PAD_BUTTON_A;
-
-					if(BTPad[chan].button & NUN_BUTTON_C)
-					{
-						if(BTPad[chan].button & WM_BUTTON_LEFT)
-							button |= PAD_BUTTON_LEFT;
-						if(BTPad[chan].button & WM_BUTTON_RIGHT)
-							button |= PAD_BUTTON_RIGHT;
+					if(BTPad[chan].button & WM_BUTTON_A)
+						button |= PAD_BUTTON_A;
+				}break;	
+				case 0:	// (2)
+				default:
+				//Alt Naggers c+DPAD as C-Stick
+				//A=A B+Dpad=GC-Dpad
+				//C not pressed U=Z D=B R=X L=Y B=R Z=L -=L1/2 +=R1/2
+				//C		pressed Dpad=C-Stick B=R1/2 Z=L1/2 
+				//in IR Mode c+Dpad=GC-Dpad 
+					{
+					if((BTPad[chan].button & NUN_BUTTON_Z) && (BTPad[chan].button & NUN_BUTTON_C))
+						Pad[chan].triggerLeft = 0x7F;
+					else if(BTPad[chan].button & NUN_BUTTON_Z)
+					{
+						button |= PAD_TRIGGER_L;
+						Pad[chan].triggerLeft = 0xFF;
+					}
+					else if(BTPad[chan].button & WM_BUTTON_MINUS)
+						Pad[chan].triggerLeft = 0x7F; 
+					else
+						Pad[chan].triggerLeft = 0;
+
+					if((BTPad[chan].button & WM_BUTTON_B) && (BTPad[chan].button & NUN_BUTTON_C))
+						Pad[chan].triggerRight = 0x7F;
+					else if(BTPad[chan].button & WM_BUTTON_B)
+					{
+						button |= PAD_TRIGGER_R;
+						Pad[chan].triggerRight = 0xFF;
+					}
+					else if(BTPad[chan].button & WM_BUTTON_PLUS)
+						Pad[chan].triggerRight = 0x7F;
+					else
+						Pad[chan].triggerRight = 0;
+										
+					if(BTPad[chan].button & WM_BUTTON_A)
+						button |= PAD_BUTTON_A;
+												
+					if(!(BTPad[chan].used & C_ISWAP))	//not using IR 
+					{
+						if (BTPad[chan].button & NUN_BUTTON_C)
+					{
+						Pad[chan].substickX = 0;
+						Pad[chan].substickY = 0;
+					 // c+dpad as c-stick
+						if(BTPad[chan].button & WM_BUTTON_LEFT)
+							Pad[chan].substickX = -0x78;
+						else if(BTPad[chan].button & WM_BUTTON_RIGHT)
+							Pad[chan].substickX = 0x78;
+						else
+							Pad[chan].substickX = 0;
+	
+						if(BTPad[chan].button & WM_BUTTON_DOWN)
+							Pad[chan].substickY = -0x78;
+						else if(BTPad[chan].button & WM_BUTTON_UP)
+							Pad[chan].substickY = 0x78;
+						else
+							Pad[chan].substickY = 0;
+					}
+						else if (BTPad[chan].button & WM_BUTTON_B)
+					{
+						if(BTPad[chan].button & WM_BUTTON_LEFT)
+							button |= PAD_BUTTON_LEFT;
+						if(BTPad[chan].button & WM_BUTTON_RIGHT)
+							button |= PAD_BUTTON_RIGHT;
 						if(BTPad[chan].button & WM_BUTTON_DOWN)
 							button |= PAD_BUTTON_DOWN;
-						if(BTPad[chan].button & WM_BUTTON_UP)
-							button |= PAD_BUTTON_UP;
-					}
-					else
-					{
-						if(BTPad[chan].button & WM_BUTTON_UP)
-							button |= PAD_TRIGGER_Z;
-						if(BTPad[chan].button & WM_BUTTON_DOWN)
+						if(BTPad[chan].button & WM_BUTTON_UP)
+							button |= PAD_BUTTON_UP;
+					}
+						else
+						{
+						if(BTPad[chan].button & WM_BUTTON_UP)
+							button |= PAD_TRIGGER_Z;
+						if(BTPad[chan].button & WM_BUTTON_DOWN)
+							button |= PAD_BUTTON_B;
+						if(BTPad[chan].button & WM_BUTTON_RIGHT)
+							button |= PAD_BUTTON_X;
+						if(BTPad[chan].button & WM_BUTTON_LEFT)
+							button |= PAD_BUTTON_Y;}}
+					else if(BTPad[chan].used & C_ISWAP)
+						{
+						if (BTPad[chan].button & NUN_BUTTON_C)
+						{
+						if(BTPad[chan].button & WM_BUTTON_LEFT)
+							button |= PAD_BUTTON_LEFT;
+						if(BTPad[chan].button & WM_BUTTON_RIGHT)
+							button |= PAD_BUTTON_RIGHT;
+						if(BTPad[chan].button & WM_BUTTON_DOWN)
+							button |= PAD_BUTTON_DOWN;
+						if(BTPad[chan].button & WM_BUTTON_UP)
+							button |= PAD_BUTTON_UP;
+						}	
+					else
+						{
+						if(BTPad[chan].button & WM_BUTTON_UP)
+							button |= PAD_TRIGGER_Z;
+						if(BTPad[chan].button & WM_BUTTON_DOWN)
 							button |= PAD_BUTTON_B;
-						if(BTPad[chan].button & WM_BUTTON_RIGHT)
-							button |= PAD_BUTTON_X;
-						if(BTPad[chan].button & WM_BUTTON_LEFT)
-							button |= PAD_BUTTON_Y;
-					}
-				}break;
-//				case 7:	// (2 & plus)
-//				{
-//				}break;
-			}
-			if(BTPad[chan].button & WM_BUTTON_ONE)
-				button |= PAD_BUTTON_START;	
-			if(BTPad[chan].button & WM_BUTTON_HOME)
-				goto Shutdown;
-		}	//end nunchuck configs
-
-		if(BTPad[chan].used & (C_CC | C_CCP))
+						if(BTPad[chan].button & WM_BUTTON_RIGHT)
+							button |= PAD_BUTTON_X;
+						if(BTPad[chan].button & WM_BUTTON_LEFT)
+							button |= PAD_BUTTON_Y;}}		
+				}break;	
+				case 7:	// (2 & 1)
+				{goto Shutdown;
+				}break;
+			}
+			if(BTPad[chan].button & WM_BUTTON_HOME)
+				button |= PAD_BUTTON_START;	
+		}	//end nunchuck configs
+
+		if(BTPad[chan].used & (C_CC | C_CCP))
 		{
 			if(BTPad[chan].used & C_SWAP)
 			{	/* turn buttons quarter clockwise */
@@ -1299,13 +1316,13 @@
 	_dspReg[27] = (_dspReg[27]&~0x8000);
 	/* disable dcache and icache */
 	asm volatile("sync ; isync ; mfspr 3,1008 ; rlwinm 3,3,0,18,15 ; mtspr 1008,3");
-	/* disable memory protection */
-	_memReg[15] = 0xF;
-	_memReg[16] = 0;
-	_memReg[8] = 0xFF;
-	/* reset status 1 */
-	*RESET_STATUS = 0x1DEA;
-	while(*RESET_STATUS == 0x1DEA) ;
+	/* disable memory protection */
+	_memReg[15] = 0xF;
+	_memReg[16] = 0;
+	_memReg[8] = 0xFF;	
+	/* reset status 1 */
+	*RESET_STATUS = 0x1DEA;
+	while(*RESET_STATUS == 0x1DEA) ;
 	/* load in stub */
 	do {
 		*stubdest++ = *stubsrc++;
Index: loader/source/titles.c
===================================================================
--- loader/source/titles.c	(revision 542)
+++ loader/source/titles.c	(working copy)
@@ -39,7 +39,7 @@
 #define MAX_ELEMENTS(x) ((sizeof((x))) / (sizeof((x)[0])))
 
 extern char launch_dir[MAXPATHLEN];
-
+extern void changeToDefaultDrive();
 typedef struct {
 	const char titleID[6];
 	const char titleName[LINE_LENGTH];
@@ -86,9 +86,8 @@
 	// If loaded from network, launch_dir[] is empty,
 	// so use /apps/Nintendont/ as a fallback.
 	char filepath[MAXPATHLEN];
-	snprintf(filepath, sizeof(filepath), "%stitles.txt",
-		 launch_dir[0] != 0 ? launch_dir : "/apps/Nintendont/");
-
+	changeToDefaultDrive();
+	snprintf(filepath, sizeof(filepath), "/apps/Nintendont/titles.txt");
 	FIL titles_txt;
 	if (f_open_char(&titles_txt, filepath, FA_READ|FA_OPEN_EXISTING) != FR_OK)
 		return 0;
Index: loader/source/update-bios.c
===================================================================
--- loader/source/update-bios.c	(nonexistent)
+++ loader/source/update-bios.c	(working copy)
@@ -0,0 +1,570 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+#include "../../common/include/NintendontVersion.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_TITLES,
+	DOWNLOAD_CONTROLLERS,
+	DOWNLOAD_THEMES,
+	DOWNLOAD_CLASSIC,
+	DOWNLOAD_AAA,
+	DOWNLOAD_BBB,	
+	DOWNLOAD_CCC,
+	DOWNLOAD_D1,
+	DOWNLOAD_D2,
+	DOWNLOAD_D3,
+	DOWNLOAD_D4,	
+	DOWNLOAD_D5	
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://nintendont.gxarena.com/themes/titles.zip", "Updating titles.txt", "titles.zip", 0x80000}, // 512KB
+	{"http://nintendont.gxarena.com/themes/controllers.zip", "Updating controllers.zip", "controllers.zip", 0x8000}, // 32KB
+	{"http://send0r.de/Nintendont/MasterMod/iplall.zip", "Downloading Bios", "iplall.zip", 0x800000}, // 8MB
+	{"http://send0r.de/Nintendont/MasterMod/iplusa.zip", "Downloading Bios", "iplusa.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/iplpal.zip", "Downloading Bios", "iplpal.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/ipljap.zip", "Downloading Bios", "ipljap.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/segaboot.zip", "Downloading Bios", "segaboot.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/iplall.zip", "Downloading Bios", "iplall.zip", 0x800000}, // 8MB
+	{"http://send0r.de/Nintendont/MasterMod/iplusa.zip", "Downloading Bios", "iplusa.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/iplpal.zip", "Downloading Bios", "iplpal.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/ipljap.zip", "Downloading Bios", "ipljap.zip", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/MasterMod/segaboot.zip", "Downloading Bios", "segaboot.zip", 0x400000}, // 4MB	
+};
+
+static int UnzipTitles(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_TITLES].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_TITLES].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_TITLES].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipControllers(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/controllers";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CONTROLLERS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CONTROLLERS].filename);
+	
+	f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_mkdir_char(unzip_directory); // attempt to make dir
+	if (f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CONTROLLERS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipThemes(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_THEMES].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_THEMES].filename);
+	
+	f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_THEMES].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSIC].filename);
+	
+	f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipAaa(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_AAA].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_AAA].filename);
+	
+	f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_AAA].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBbb(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BBB].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BBB].filename);
+	
+	f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BBB].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipCcc(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CCC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CCC].filename);
+	
+	f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CCC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/", Downloads[download_number].filename);
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+	}
+				// Write the file to disk.	
+		if (download_number == DOWNLOAD_TITLES) {ret = UnzipTitles(outbuf, filesize);}		
+		else if (download_number == DOWNLOAD_CONTROLLERS) {ret = UnzipControllers(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_THEMES) {ret = UnzipThemes(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSIC) {ret = UnzipClassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_AAA) {ret = UnzipAaa(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BBB) {ret = UnzipBbb(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CCC) {ret = UnzipCcc(outbuf, filesize);}
+		else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+		}
+			else if ((download_number == DOWNLOAD_TITLES) || (download_number == DOWNLOAD_CONTROLLERS))
+			{
+			if (which_bg == BG_NONE)
+			{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}
+			}	
+			else {
+	if (which_bg == BG_NONE)
+	{PrintFormat(31, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "GameCube Bios Download Complete");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(31, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "GameCube Bios Download Complete");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(2);
+	return ret;
+}
+
+void UpdateBios(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+					if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Nintendont Extras Download Menu");
+		PrintFormat(27, BLACK, MENU_POS_X, MENU_POS_Y + 20*19, "PAL Bios is not compatible with WiiU");		
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Game Titles File");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download HID Controllers Pack");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download All Bios Files");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download USA Bios Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download PAL Bios Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download JAP BIOS Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Triforce BIOS Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Delete All Bios Files");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Delete USA Bios Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Delete PAL Bios Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Delete JAP BIOS Only");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Delete Triforce BIOS Only");			
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Return to Update Menu");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Nintendont Extras Download Menu");	
+		PrintFormat(27, WHITE, MENU_POS_X, MENU_POS_Y + 20*19, "PAL Bios is not compatible with WiiU");		
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");		
+		PrintInfo();
+		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Game Titles File");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download HID Controllers Pack");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download All Bios Files");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download USA Bios Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download PAL Bios Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download JAP BIOS Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Triforce BIOS Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Delete All Bios Files");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Delete USA Bios Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Delete PAL Bios Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Delete JAP BIOS Only");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Delete Triforce BIOS Only");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Return to Update Menu");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/bios") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+						if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+			if (FPAD_OK(1)) {
+			f_chdir_char("/");
+			if (selected <= (DOWNLOAD_CCC))
+			Download(selected);
+			else if (selected == (DOWNLOAD_D1))
+				{
+				if (UseSD) {
+				f_unlink_char( "sd:/iplpal.bin" );
+				f_unlink_char( "sd:/iplusa.bin" );
+				f_unlink_char( "sd:/ipljap.bin" );
+				f_unlink_char( "sd:/segaboot.bin" );}
+				else {
+				f_unlink_char( "usb:/iplpal.bin" );
+				f_unlink_char( "usb:/iplusa.bin" );
+				f_unlink_char( "usb:/ipljap.bin" );
+				f_unlink_char( "usb:/segaboot.bin" );}
+				ClearScreen();
+			//BackTheme();
+			if (which_bg == BG_NONE)
+			{PrintFormat(31, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Bios Files Successfully Deleted");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(31, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Bios Files Successfully Deleted");}
+			UpdateScreen();
+			sleep (2);
+			UpdateBios();}
+			else if (selected == (DOWNLOAD_D2))
+				{
+				if (UseSD) {
+				f_unlink_char( "sd:/iplusa.bin" );}
+				else {
+				f_unlink_char( "usb:/iplusa.bin" );}
+				ClearScreen();
+			//BackTheme();
+			if (which_bg == BG_NONE)
+			{PrintFormat(31, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(31, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			UpdateScreen();
+			sleep (2);
+			UpdateBios();}
+			else if (selected == (DOWNLOAD_D3))
+				{
+				if (UseSD) {
+				f_unlink_char( "sd:/iplpal.bin" );}
+				else {
+				f_unlink_char( "usb:/iplpal.bin" );}
+				ClearScreen();
+			//BackTheme();
+			if (which_bg == BG_NONE)
+			{PrintFormat(31, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(31, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			UpdateScreen();
+			sleep (2);
+			UpdateBios();}
+			else if (selected == (DOWNLOAD_D4))
+				{
+				if (UseSD) {
+				f_unlink_char( "sd:/ipljap.bin" );}
+				else {
+				f_unlink_char( "usb:/ipljap.bin" );}
+				ClearScreen();
+			//BackTheme();
+			if (which_bg == BG_NONE)
+			{PrintFormat(31, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(31, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			UpdateScreen();
+			sleep (2);
+			UpdateBios();}
+			else if (selected == (DOWNLOAD_D5))
+				{
+				if (UseSD) {
+				f_unlink_char( "sd:/segaboot.bin" );}
+				else {
+				f_unlink_char( "usb:/segaboot.bin" );}
+				ClearScreen();
+			//BackTheme();
+			if (which_bg == BG_NONE)
+			{PrintFormat(31, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(31, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Bios File Successfully Deleted");}
+			UpdateScreen();
+			sleep (2);
+			UpdateBios();}			
+			else
+				break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 12) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 12;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
\ No newline at end of file
Index: loader/source/update-custom.c
===================================================================
--- loader/source/update-custom.c	(nonexistent)
+++ loader/source/update-custom.c	(working copy)
@@ -0,0 +1,1105 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include "font.h"
+#include "exi.h"
+#include "global.h"
+#include "FPad.h"
+#include "Config.h"
+#include "update.h"
+#include "titles.h"
+#include "dip.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <ogc/stm.h>
+#include <ogc/video.h>
+#include <ogc/video_types.h>
+#include <ogc/consol.h>
+#include <ogc/system.h>
+//#include <fat.h>
+#include <di/di.h>
+#include "menu.h"
+
+#include "ff_utf8.h"
+#include "ssl.h"
+#include "http.h"
+#include <network.h>
+
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+extern GRRLIB_texImg *preview;
+int menumod = 0;
+char GETID3[8];
+char filenamez[30];
+char urlz[96];
+u32 miss=0;
+char missing[3];
+u32 redraw = 1;
+int empty = 0;
+int del = 0;
+int retry =0;
+
+typedef struct {
+	const char url[96];
+	const char text[36];
+	const char filenamez[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_CUSTOM,
+} DOWNLOADS;
+
+typedef enum {
+	DOWNLOAD_01,
+	DOWNLOAD_02,
+	DOWNLOAD_03,
+	DOWNLOAD_04,
+	DOWNLOAD_05,
+	DOWNLOAD_06,	
+	DOWNLOAD_07
+} DOWNLOADZ;
+ 
+static const downloads_t Downloads[] = {
+	{"http://nintendont.gxarena.com/themes/test.png", "Downloading Custom Game Theme", "test.png", 0x400000}, // 4MB
+};
+
+extern NIN_CFG* ncfg;
+
+int compare_names2(const void *a, const void *b)
+{
+	const gameinfo *da = (const gameinfo *) a;
+	const gameinfo *db = (const gameinfo *) b;
+
+	return strcasecmp(da->Name, db->Name);
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+
+	ClearScreen();
+	UpdateScreen();
+	//f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/apps/Nintendont");
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	//bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "/apps/Nintendont/%s", filenamez);
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[0].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[0].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(urlz, 0x400000);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+	UpdateScreen();
+	line++;
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+		}
+	end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+		UpdateScreen();
+		sleep(3);
+		}
+	else
+	{									if (which_bg == BG_NONE)
+	{
+	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Custom Game Loader Theme Downloaded Successfully");
+	PrintFormat(27, BLACK, MENU_POS_X, MENU_POS_Y + 20*(line+15), "You'll Watch a 3 Seconds Preview Now");
+	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Custom Game Loader Theme Downloaded Successfully");
+	PrintFormat(27, BLACK, MENU_POS_X, MENU_POS_Y + 20*(line+15), "You'll Watch a 3 Seconds Preview Now");
+	}
+	else if (which_bg == BG_LEGACY)
+	{
+	PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Custom Game Loader Theme Downloaded Successfully");
+	PrintFormat(27, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "You'll Watch a 3 Seconds Preview Now");
+	PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Custom Game Loader Theme Downloaded Successfully");
+	PrintFormat(27, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "You'll Watch a 3 Seconds Preview Now");					
+	}	
+	UpdateScreen();
+	sleep(3);
+	//f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/apps/Nintendont");
+	f_rename_char("./test.png", filenamez);
+	f_unlink_char( "./NinBackLight.old" );
+	f_unlink_char( "./NinBackDark.old" );
+	f_unlink_char( "./NinBackBars.old" );
+	f_unlink_char( "./NinBackNoBar.old" );
+	f_unlink_char( "./NinBlack.old" );	
+	GRRLIB_FreeTexture(background);
+	background = GRRLIB_LoadTextureFromFile(filenamez);
+	FadeIt();
+	sleep(3);
+	}
+	if (outbuf != NULL) 
+	free(outbuf);
+	net_deinit();
+	BackTheme();
+	UpdateScreen();
+	return (ret-1);
+}	
+
+
+static s32 DownloadAll(DOWNLOADS download_number)  {
+
+	char firstfile[8];
+	char firstfilez[8];
+//	char otherone[8];
+	char filename[MAXPATHLEN];
+	char gamename[MAXPATHLEN];
+	u32 gamecount = 0;
+	u32 i;
+	s32 ScrollX = 0;
+	char buf[0x100];
+	gameinfo gi[MAX_GAMES];
+	DIR pdir;
+	//start:
+	sprintf(filename, "%s:/games", GetRootDevice());
+	if (f_opendir_char(&pdir, filename) != FR_OK)
+	{
+		ClearScreen();
+		gprintf("No FAT device found, or missing %s dir!\n", filename);
+		PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, 232, "No FAT device found, or missing %s dir!", filename );
+		ExitToLoader(1);
+	}
+	memset( gi, 0, sizeof(gameinfo) * MAX_GAMES );
+/*	if( !IsWiiU() )
+	{
+		gi[0].Name = strdup("Boot GC Disc in Drive");
+		gi[0].ID[0] = 'D',gi[0].ID[1] = 'I',gi[0].ID[2] = 'S';
+		gi[0].ID[3] = 'C',gi[0].ID[4] = '0',gi[0].ID[5] = '1';
+		gi[0].Path = strdup("di:di");
+		gamecount++;
+	}*/
+	// TODO: chdir into /games/?
+	FILINFO fInfo;
+	FIL in;
+	while (f_readdir(&pdir, &fInfo) == FR_OK && fInfo.fname[0] != '\0')
+	{
+		if (fInfo.fattrib & AM_DIR)
+		{
+			if (fInfo.fname[0] == '.')	//skip current and previous directories
+				continue;
+
+// NOTE: fInfo.fname[] is UTF-16.
+			const char *filename_utf8 = wchar_to_char(fInfo.fname);
+			int fnlen = snprintf(filename, sizeof(filename), "%s:/games/%s/",
+					     GetRootDevice(), filename_utf8);
+
+			//Test if game.iso exists and add to list
+
+		bool found = false;
+			u32 DiscNumber;
+			for (DiscNumber = 0; DiscNumber < 2; DiscNumber++)
+			{
+				if (DiscNumber)
+					memcpy(&filename[fnlen], "disc2.iso", 10);
+				else
+					memcpy(&filename[fnlen], "game.iso", 9);
+
+				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
+				{
+					// Read the disc header
+					//gprintf("(%s) ok\n", filename );
+					UINT read;
+					f_read(&in, buf, 0x100, &read);
+					f_close(&in);
+
+					if (read == 0x100 && IsGCGame((u8*)buf))	// Must be GC game
+					{
+						memcpy(gi[gamecount].ID, buf, 6); //ID for EXI
+						gi[gamecount].DiscNumber = DiscNumber;
+
+						// Check if this title is in titles.txt.
+						const char *dbTitle = SearchTitles(gi[gamecount].ID);
+						if (dbTitle)
+						{
+							// Title found.
+							gi[gamecount].Name = (char*)dbTitle;
+							gi[gamecount].NameAlloc = 0;
+						}
+						else
+						{
+							// Title not found.
+							// Use the title from the disc header.
+							strncpy(gamename, buf + 0x20, sizeof(gamename)-1);
+							gamename[sizeof(gamename)-1] = 0;
+							gi[gamecount].Name = strdup(gamename);
+							gi[gamecount].NameAlloc = 1;
+						}
+
+						gi[gamecount].Path = strdup( filename );
+						gamecount++;
+						found = true;
+					}
+				}
+			}
+			if (!found)
+			{
+				memcpy(&filename[fnlen], "sys/boot.bin", 13);
+				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
+				{
+					//gprintf("(%s) ok\n", filename );
+					UINT read;
+					f_read(&in, buf, 0x100, &read);
+					f_close(&in);
+
+					if (read == 0x100 && IsGCGame((u8*)buf))	// Must be GC game
+					{
+						// Terminate the filename at the game's base directory.
+						filename[fnlen] = 0;
+
+						memcpy(gi[gamecount].ID, buf, 6); //ID for EXI
+						gi[gamecount].DiscNumber = DiscNumber;
+
+						// TODO: Check titles.txt?
+						strncpy(gamename, buf + 0x20, sizeof(gamename)-1);
+						gamename[sizeof(gamename)-1] = 0;
+						gi[gamecount].Name = strdup(gamename);
+						gi[gamecount].NameAlloc = 1;
+
+						gi[gamecount].Path = strdup( filename );
+						gamecount++;
+					}
+				}
+			}
+		}
+		if (gamecount >= MAX_GAMES)	//if array is full
+			break;
+	}
+
+	//if( IsWiiU() )
+		qsort(gi, gamecount, sizeof(gameinfo), compare_names2);
+	/*else if( gamecount > 1 )
+		qsort(&gi[1], gamecount-1, sizeof(gameinfo), compare_names2);*/
+	
+	//f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/apps/Nintendont");
+	f_unlink_char( "./NinBackLight.png");
+	f_unlink_char( "./NinBackDark.png");
+	f_unlink_char( "./NinBackBars.png");
+	f_unlink_char( "./NinBackNoBar.png");
+	f_unlink_char( "./NinBlack.png");	
+	
+	ClearScreen();
+	UpdateScreen();
+	
+	int line = 1;
+	int retd;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	//bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "/apps/Nintendont/%s", filenamez);
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading Custom Game Themes");
+					line++;
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Current Game Themes Will be Deleted");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading Custom Game Themes");
+					line++;
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Current Game Themes Will be Deleted");}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	retd = net_init();
+	if(retd < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");
+					 PrintFormat(15, BLACK, MENU_POS_X + 225, MENU_POS_Y + 20*21, "Please Wait...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");
+					 PrintFormat(15, WHITE, MENU_POS_X + 225, MENU_POS_Y + 20*21, "Please Wait...");}
+	UpdateScreen();
+	
+	//f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/apps/Nintendont");
+	DeleteCustom();
+/////////////////////////////////////////////////////////////////////////////////////////
+	for( i=0; i <= (gamecount); ++i)
+	{
+	int redraw;
+	char current[3];
+	char total[3];
+	
+	sprintf (current,"%d",(i+1));
+	sprintf (total,"%d",gamecount);
+	sprintf (missing,"%d",miss);
+	memcpy(&(ncfg->GameID), gi[i+ScrollX].ID, 3);
+	memset(GETID3, 0, 8);
+	memcpy(GETID3, &(ncfg->GameID), 3);
+	memset(firstfile, 0, 8);
+	memset(firstfilez, 0, 8);	
+	memcpy(firstfile, gi[0+ScrollX].ID, 3);
+	
+	VIDEO_WaitVSync();
+	redraw=1;
+	if (retry==3) goto out;		
+	if(menumod == 5) {
+	sprintf(firstfilez, "%sX.png", firstfile);
+	sprintf(filenamez, "%sX.png", GETID3);
+	sprintf(urlz, "http://nintendont.gxarena.com/themes/%sX.png", GETID3);
+	}
+	
+	else if(menumod == 4) {
+	sprintf(firstfilez, "%s.png", firstfile);
+	sprintf(filenamez, "%s.png", GETID3);
+	sprintf(urlz, "http://nintendont.gxarena.com/themes/%s.png", GETID3);
+	}	
+		int x;
+		for (x = 0; x <= 10; x++) {
+		retd = http_request(urlz, 0x400000);
+		if (retd) break;
+		if (x == 10) {
+			gprintf("Error making http request\r\n");
+			retd = -1;
+			++miss;
+			sprintf (missing,"%d",miss);
+			if (i == 0)
+			{
+			char SaveFile[10];
+			snprintf(SaveFile, sizeof(SaveFile), "%s", firstfilez);
+			CreateNewFile(SaveFile, 0x0);
+			empty = 1;
+			}
+			}
+		}
+
+	retd = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		retd = -2;
+		goto end;
+	}
+		if (filesize == 0)	
+		del =1;
+		else 
+		del =0;
+		
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			retd = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			retd = 1;			
+			}
+			
+			if (i == 0)
+			f_rename_char(firstfilez, "./test.png");
+			
+			if (del == 0)
+			f_rename_char(firstfilez, filenamez);
+			else if (del ==1)
+			f_unlink_char(firstfilez);
+			
+			ClearScreen();
+			if (redraw) {
+			if (which_bg == BG_NONE)
+			{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*(line-2), Downloads[0].text);
+			 PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");
+			 PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*(line-1), "Current Game Themes Will be Deleted");
+			 //PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + (i+10*i), MENU_POS_Y + (20*19), "\xe2\x96\x88\xe2\x96\x88");
+			 PrintFormat(15, BLACK, MENU_POS_X + 225, MENU_POS_Y + 20*20, "Progress %s/%s", current, total);
+			 PrintFormat(15, BLACK, MENU_POS_X + 225, MENU_POS_Y + 20*21, "Missing  %s/%s", missing, total);}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line-2), Downloads[0].text);
+			 PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");
+			 PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line-1), "Current Game Themes Will be Deleted");
+			 //PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + (i+10*i), MENU_POS_Y + (20*19), "\xe2\x96\x88\xe2\x96\x88");
+			 PrintFormat(15, WHITE, MENU_POS_X + 225, MENU_POS_Y + 20*20, "Progress %s/%s", current, total);
+			 PrintFormat(15, WHITE, MENU_POS_X + 225, MENU_POS_Y + 20*21, "Missing  %s/%s", missing, total);}
+			UpdateScreen();
+			}
+			redraw=0;
+			
+			if (outbuf != NULL) 
+			free(outbuf);
+	
+			if (i == (gamecount-1)) {
+			if (empty ==0)
+			f_rename_char("./test.png", firstfilez);
+			else
+			f_unlink_char("./test.png");
+			goto out;}
+		}	
+	out:
+//////////////////////////////////////////////////////////////////////////////////	
+	line++;
+	if (retd == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+		sleep(3);
+		}	
+	end:
+	if (retd != 1)
+		{
+			if (retd == -3) 
+			{
+			miss=0;
+			++retry;
+			DownloadAll(0);
+			goto there;}
+			if (which_bg == BG_NONE)
+			{PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+2), "Update Error: %i", retd);
+			//PrintFormat(15, BLACK, MENU_POS_X + 222, MENU_POS_Y + 20*17, "%s Missing Covers", missing);
+			}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+2), "Update Error: %i", retd);
+			//PrintFormat(15, YELLOW, MENU_POS_X + 222, MENU_POS_Y + 20*17, "%s Missing Covers", missing);
+			}
+			/*if (retd == -3) 
+			{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+3), "Please Try Again");
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+3), "Please Try Again");
+			}*/
+			there:
+		UpdateScreen();
+		sleep(3);
+		}
+	else
+	{	
+	ClearScreen();								
+	if (which_bg == BG_NONE)
+	{
+	PrintFormat(20, BLACK, MENU_POS_X, MENU_POS_Y + 20*14, " All Game Loader Themes Downloaded Successfully");
+	PrintFormat(15, BLACK, MENU_POS_X + 222, MENU_POS_Y + 20*17, "%s Missing Covers", missing);
+	PrintFormat(27, BLACK, MENU_POS_X, MENU_POS_Y + 20*20, "           Have a nice day");
+	}
+	else if (which_bg == BG_LEGACY)
+	{
+	PrintFormat(20, WHITE, MENU_POS_X, MENU_POS_Y + 20*14, " All Game Loader Themes Downloaded Successfully");
+	PrintFormat(15, WHITE, MENU_POS_X + 222, MENU_POS_Y + 20*17, "%s Missing Covers", missing);
+	PrintFormat(27, WHITE, MENU_POS_X, MENU_POS_Y + 20*20, "           Have a nice day");				
+	}	
+	UpdateScreen();
+	sleep(3);
+	}
+	net_deinit();
+	BackTheme();
+	UpdateScreen();
+	return (retd-1);
+}
+
+void DownloadGame(void)
+{ 
+//Create a list of games
+	char filename[MAXPATHLEN];
+	char gamename[MAXPATHLEN];
+	u32 gamecount = 0;
+	char buf[0x100];
+	gameinfo gi[MAX_GAMES];
+	DIR pdir;
+	//start:
+	sprintf(filename, "%s:/games", GetRootDevice());
+	if (f_opendir_char(&pdir, filename) != FR_OK)
+	{
+		ClearScreen();
+		gprintf("No FAT device found, or missing %s dir!\n", filename);
+		PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, 232, "No FAT device found, or missing %s dir!", filename );
+		ExitToLoader(1);
+	}
+	memset( gi, 0, sizeof(gameinfo) * MAX_GAMES );
+/*	if( !IsWiiU() )
+	{
+		gi[0].Name = strdup("Boot GC Disc in Drive");
+		gi[0].ID[0] = 'D',gi[0].ID[1] = 'I',gi[0].ID[2] = 'S';
+		gi[0].ID[3] = 'C',gi[0].ID[4] = '0',gi[0].ID[5] = '1';
+		gi[0].Path = strdup("di:di");
+		gamecount++;
+	}*/
+	// TODO: chdir into /games/?
+	FILINFO fInfo;
+	FIL in;
+	while (f_readdir(&pdir, &fInfo) == FR_OK && fInfo.fname[0] != '\0')
+	{
+		if (fInfo.fattrib & AM_DIR)
+		{
+			if (fInfo.fname[0] == '.')	//skip current and previous directories
+				continue;
+
+// NOTE: fInfo.fname[] is UTF-16.
+			const char *filename_utf8 = wchar_to_char(fInfo.fname);
+			int fnlen = snprintf(filename, sizeof(filename), "%s:/games/%s/",
+					     GetRootDevice(), filename_utf8);
+
+			//Test if game.iso exists and add to list
+
+		bool found = false;
+			u32 DiscNumber;
+			for (DiscNumber = 0; DiscNumber < 2; DiscNumber++)
+			{
+				if (DiscNumber)
+					memcpy(&filename[fnlen], "disc2.iso", 10);
+				else
+					memcpy(&filename[fnlen], "game.iso", 9);
+
+				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
+				{
+					// Read the disc header
+					//gprintf("(%s) ok\n", filename );
+					UINT read;
+					f_read(&in, buf, 0x100, &read);
+					f_close(&in);
+
+					if (read == 0x100 && IsGCGame((u8*)buf))	// Must be GC game
+					{
+						memcpy(gi[gamecount].ID, buf, 6); //ID for EXI
+						gi[gamecount].DiscNumber = DiscNumber;
+
+						// Check if this title is in titles.txt.
+						const char *dbTitle = SearchTitles(gi[gamecount].ID);
+						if (dbTitle)
+						{
+							// Title found.
+							gi[gamecount].Name = (char*)dbTitle;
+							gi[gamecount].NameAlloc = 0;
+						}
+						else
+						{
+							// Title not found.
+							// Use the title from the disc header.
+							strncpy(gamename, buf + 0x20, sizeof(gamename)-1);
+							gamename[sizeof(gamename)-1] = 0;
+							gi[gamecount].Name = strdup(gamename);
+							gi[gamecount].NameAlloc = 1;
+						}
+
+						gi[gamecount].Path = strdup( filename );
+						gamecount++;
+						found = true;
+					}
+				}
+			}
+			if (!found)
+			{
+				memcpy(&filename[fnlen], "sys/boot.bin", 13);
+				if (f_open_char(&in, filename, FA_READ|FA_OPEN_EXISTING) == FR_OK)
+				{
+					//gprintf("(%s) ok\n", filename );
+					UINT read;
+					f_read(&in, buf, 0x100, &read);
+					f_close(&in);
+
+					if (read == 0x100 && IsGCGame((u8*)buf))	// Must be GC game
+					{
+						// Terminate the filename at the game's base directory.
+						filename[fnlen] = 0;
+
+						memcpy(gi[gamecount].ID, buf, 6); //ID for EXI
+						gi[gamecount].DiscNumber = DiscNumber;
+
+						// TODO: Check titles.txt?
+						strncpy(gamename, buf + 0x20, sizeof(gamename)-1);
+						gamename[sizeof(gamename)-1] = 0;
+						gi[gamecount].Name = strdup(gamename);
+						gi[gamecount].NameAlloc = 1;
+
+						gi[gamecount].Path = strdup( filename );
+						gamecount++;
+					}
+				}
+			}
+		}
+		if (gamecount >= MAX_GAMES)	//if array is full
+			break;
+	}
+
+	//if( IsWiiU() )
+		qsort(gi, gamecount, sizeof(gameinfo), compare_names2);
+	/*else if( gamecount > 1 )
+		qsort(&gi[1], gamecount-1, sizeof(gameinfo), compare_names2);*/
+
+	u32 i;
+	s32 PosX = 0;
+	s32 ScrollX = 0;
+	u32 MenuMode = 0;
+
+	u32 ListMax = gamecount;
+	if( ListMax > 15 )
+		ListMax = 15;
+	FadeIt();
+//	set default game to game that currently set in configuration
+	for (i = 0; i < gamecount; ++i)
+	{
+		if (strcasecmp(strchr(gi[i].Path,':')+1, ncfg->GamePath) == 0)
+		{
+			if( i >= ListMax )
+			{
+				PosX	= ListMax - 1;
+				ScrollX = i - ListMax + 1;
+			} else {
+				PosX = i;
+			}
+			break;
+		}
+	}
+	UpdateScreen();
+	u32 UpHeld = 0, DownHeld = 0;
+	while(1)
+	{
+		VIDEO_WaitVSync();
+		FPAD_Update();
+		if( FPAD_Start(1) )
+		{
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader..." );	}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader..." );	}
+			ExitToLoader(0);
+		}
+
+		if( FPAD_Cancel(0) )
+		{
+			return;
+			redraw = 1;
+		}
+
+	//	gprintf("\rS:%u P:%u G:%u M:%u    ", ScrollX, PosX, gamecount, ListMax );
+
+		if( MenuMode == 0 )		//game select menu
+		{
+			if(FPAD_X(0)) {				
+				UpdateNintendont();
+				redraw = 1;
+			}
+			if(FPAD_Y(0)) {
+				Credits();
+				redraw = 1;
+			}			
+			if( FPAD_Down(1) )
+			{
+				if(DownHeld == 0 || DownHeld > 10)
+				{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}					
+					if( PosX + 1 >= ListMax )
+					{
+						if( PosX + 1 + ScrollX < gamecount)
+							ScrollX++;
+						else {
+							PosX	= 0;
+							ScrollX = 0;
+						}
+					} else {
+						PosX++;
+					}
+					redraw=1;
+					}
+				DownHeld++;
+			}
+			else
+				DownHeld = 0;
+			if( FPAD_Right(0) )
+			{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}	
+				if( PosX == ListMax - 1 )
+				{
+					if( PosX + ListMax + ScrollX < gamecount)
+						ScrollX = ScrollX + ListMax;
+					else
+					if( PosX + ScrollX != gamecount -1)
+						ScrollX = gamecount - ListMax;
+					else {
+						PosX	= 0;
+						ScrollX = 0;
+					}
+				} else {
+					PosX = ListMax - 1;
+				}
+				redraw=1;
+			}
+			if( FPAD_Up(1) )
+			{
+				if(UpHeld == 0 || UpHeld > 10)
+				{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}	
+					if( PosX <= 0 )
+					{
+						if( ScrollX > 0 )
+							ScrollX--;
+						else {
+							PosX	= ListMax - 1;
+							ScrollX = gamecount - ListMax;
+						}
+					} else {
+						PosX--;
+					}
+					redraw=1;
+				}
+				UpHeld++;
+			}
+			else
+				UpHeld = 0;
+			if( FPAD_Left(0) )
+			{
+					if (which_bg == BG_NONE)
+					{
+					PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+					PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
+					}	
+				if( PosX == 0 )
+				{
+					if( ScrollX - (s32)ListMax >= 0 )
+						ScrollX = ScrollX - ListMax;
+					else
+					if( ScrollX != 0 )
+						ScrollX = 0;
+					else {
+						ScrollX = gamecount - ListMax;
+					}
+				} else {
+					PosX = 0;
+				}
+				redraw=1;
+			}
+
+			if( FPAD_OK(0) )
+			{
+			break;
+			}
+
+			if( redraw )
+			{
+				PrintInfo();
+					if (which_bg == BG_NONE)
+					{
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+				if (menumod == 3)
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Delete");
+				else 
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Download");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Game List");
+				PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Custom Game Themes Manager");
+				PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+				if (menumod == 3)
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Delete");
+				else 
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Download");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Game List");
+				PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Custom Game Themes Manager");
+				PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");
+					}					
+
+				for( i=0; i < ListMax; ++i )
+					if (which_bg == BG_NONE)
+					{
+			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*5 + i * 20, "%s[%.6s] %50.50s", i == PosX ? ARROW_RIGHT : " ", gi[i+ScrollX].ID, gi[i+ScrollX].Name);
+					}
+					else if (which_bg == BG_LEGACY)
+					{
+			PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*5 + i * 20, "%s[%.6s] %50.50s", i == PosX ? ARROW_RIGHT : " ", gi[i+ScrollX].ID, gi[i+ScrollX].Name);
+					}	
+				GRRLIB_Render();
+				Screenshot();
+				ClearScreen();
+				redraw = 0;
+			}
+
+		}
+	}
+	u32 SelectedGame = PosX + ScrollX;
+	char* StartChar = gi[SelectedGame].Path + 3;
+	if (StartChar[0] == ':')
+		StartChar++;
+	memcpy(&(ncfg->GameID), gi[SelectedGame].ID, 3);
+	memset(GETID3, 0, 8);
+	char fileid4[8];
+	memset(fileid4, 0, 8);	
+	memcpy(GETID3, &(ncfg->GameID), 3);
+	//f_chdrive_char(UseSD ? "sd:" : "usb:");
+	f_chdir_char("/apps/Nintendont");
+	
+	if (menumod == 3) {
+	BackTheme();
+	sprintf(filenamez, "%s.png", GETID3);
+	sprintf(fileid4, "%sX.png", GETID3);
+	f_unlink_char(filenamez);
+	f_unlink_char(fileid4);
+	if (which_bg == BG_NONE)
+	{PrintFormat(30, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Game Theme Successfully Deleted");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(30, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Game Theme Successfully Deleted");}
+	UpdateScreen();
+	sleep (2);
+	redraw = 1;
+	return;
+	}
+	
+	else if(menumod == 2) {
+	sprintf(filenamez, "%sX.png", GETID3);
+	sprintf(fileid4, "%sX.png", GETID3);
+	sprintf(urlz, "http://nintendont.gxarena.com/themes/%sX.png", GETID3);
+	f_unlink_char(filenamez);
+	f_unlink_char(fileid4);
+	f_rename_char( "./NinBackLight.png", "./NinBackLight.old");
+	f_rename_char( "./NinBackDark.png", "./NinBackDark.old");
+	f_rename_char( "./NinBackBars.png", "./NinBackBars.old");
+	f_rename_char( "./NinBackNoBar.png", "./NinBackNoBar.old");
+	f_rename_char( "./NinBlack.png", "./NinBlack.old");
+	Download(0);
+	}
+	
+	else if(menumod == 1) {
+	sprintf(filenamez, "%s.png", GETID3);
+	sprintf(fileid4, "%sX.png", GETID3);
+	sprintf(urlz, "http://nintendont.gxarena.com/themes/%s.png", GETID3);
+	f_unlink_char(filenamez);
+	f_unlink_char(fileid4);
+	f_rename_char( "./NinBackLight.png", "./NinBackLight.old");
+	f_rename_char( "./NinBackDark.png", "./NinBackDark.old");
+	f_rename_char( "./NinBackBars.png", "./NinBackBars.old");
+	f_rename_char( "./NinBackNoBar.png", "./NinBackNoBar.old");
+	f_rename_char( "./NinBlack.png", "./NinBlack.old");
+	Download(0);
+	}
+	for (i = 0; i < gamecount; ++i)
+	{
+		if (gi[i].NameAlloc)
+			free(gi[i].Name);
+		free(gi[i].Path);
+	}
+	redraw = 1;
+	return;
+}
+
+void GDMenu(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Custom Game Themes Menu");	
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Manually Download a Game Theme  (Without Progress Bar)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download All Custom Game Themes (Without Progress Bar)");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Manually Download a Game Theme  (With Progress Bar)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download All Custom Game Themes (With Progress Bar)");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Manually Delete Individual Custom Game Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Automatically Delete All Custom Game Themes!");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Return to Update Menu");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Custom Game Themes Menu");		
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Manually Download a Game Theme  (Without Progress Bar)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download All Custom Game Themes (Without Progress Bar)");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Manually Download a Game Theme  (With Progress Bar)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download All Custom Game Themes (With Progress Bar)");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Manually Delete Individual Custom Game Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Automatically Delete All Custom Game Themes!");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Return to Update Menu");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/game") == FR_OK){
+		
+			GRRLIB_FreeTexture(preview);
+			if (selected == 0)
+			preview = GRRLIB_LoadTextureFromFile("00.png");
+			else if (selected == 1)
+			preview = GRRLIB_LoadTextureFromFile("01.png");
+			else if (selected == 2)
+			preview = GRRLIB_LoadTextureFromFile("02.png");
+			else if (selected == 3)
+			preview = GRRLIB_LoadTextureFromFile("03.png");
+			else if (selected == 4)
+			preview = GRRLIB_LoadTextureFromFile("04.png");
+			else if (selected == 5)
+			preview = GRRLIB_LoadTextureFromFile("05.png");
+			else if (selected == 6)
+			preview = GRRLIB_LoadTextureFromFile("06.png");	
+			GRRLIB_DrawImg(220, 282, preview, 0, 1, 1, 0xFFFFFFFF);
+		}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+		if (FPAD_OK(1)) {
+			//f_chdrive_char(UseSD ? "sd:" : "usb:");
+			f_chdir_char("/apps/Nintendont");
+			if (selected == (DOWNLOAD_01))
+			{menumod = 1;
+			DownloadGame();}
+			if (selected == (DOWNLOAD_02))
+			{menumod = 4;
+			DownloadAll(0);}
+			if (selected == (DOWNLOAD_03))
+			{menumod = 2;
+			DownloadGame();}
+			if (selected == (DOWNLOAD_04))
+			{menumod = 5;
+			DownloadAll(0);}
+			if (selected == (DOWNLOAD_05))
+			{menumod = 3;
+			DownloadGame();}			
+			if (selected == (DOWNLOAD_06)) 
+			{
+			DeleteCustom();
+			ClearScreen();
+			BackTheme();
+			if (which_bg == BG_NONE)
+			{PrintFormat(30, BLACK, MENU_POS_X, MENU_POS_Y + 20*10, "Game Themes Successfully Deleted");}
+			else if (which_bg == BG_LEGACY)
+			{PrintFormat(30, WHITE, MENU_POS_X, MENU_POS_Y + 20*10, "Game Themes Successfully Deleted");}
+			UpdateScreen();
+			sleep (2);
+			redraw = 1;
+			return;}
+			if (selected == (DOWNLOAD_07)) 
+			break;
+			else
+				break;}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 6) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 6;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}				
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
Index: loader/source/update-dark.c
===================================================================
--- loader/source/update-dark.c	(nonexistent)
+++ loader/source/update-dark.c	(working copy)
@@ -0,0 +1,788 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+#include "../../common/include/NintendontVersion.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+			
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_THEMES,
+	DOWNLOAD_CLASSIC,
+	DOWNLOAD_CLASSICWII,
+	DOWNLOAD_DISCS,
+	DOWNLOAD_GCNS,
+	DOWNLOAD_MMBLUE,
+	DOWNLOAD_MMCLASSIC,
+	DOWNLOAD_MMDARK1,
+	DOWNLOAD_MMDARK2,
+	DOWNLOAD_ORANGE,
+	DOWNLOAD_PURPLE,
+	DOWNLOAD_SMASH,
+	DOWNLOAD_BARS,
+	DOWNLOAD_AAA,
+	DOWNLOAD_BBB,
+	DOWNLOAD_CCC	
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/legacy00.zip", "Downloading Theme", "legacy00.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy01.zip", "Downloading Theme", "legacy01.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy02.zip", "Downloading Theme", "legacy02.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy03.zip", "Downloading Theme", "legacy03.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy04.zip", "Downloading Theme", "legacy04.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy05.zip", "Downloading Theme", "legacy05.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/legacy06.zip", "Downloading Theme", "legacy06.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy07.zip", "Downloading Theme", "legacy07.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy08.zip", "Downloading Theme", "legacy08.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/legacy09.zip", "Downloading Theme", "legacy09.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy10.zip", "Downloading Theme", "legacy10.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy11.zip", "Downloading Theme", "legacy11.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy12.zip", "Downloading Theme", "legacy12.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/legacy13.zip", "Downloading Theme", "legacy13.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy14.zip", "Downloading Theme", "legacy14.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/legacy15.zip", "Downloading Theme", "legacy15.zip", 0x80000}, // 512KB		
+};
+
+static int UnzipThemes(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_THEMES].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_THEMES].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_THEMES].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassicwii(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSICWII].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDiscs(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DISCS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DISCS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DISCS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipGcns(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_GCNS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_GCNS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_GCNS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmblue(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMBLUE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMBLUE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMBLUE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmclassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMCLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark1(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK1].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK1].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK1].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark2(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK2].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK2].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK2].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipOrange(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_ORANGE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_ORANGE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_ORANGE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipPurple(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_PURPLE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_PURPLE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_PURPLE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipSmash(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_SMASH].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_SMASH].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_SMASH].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBars(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BARS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BARS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BARS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipAaa(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_AAA].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_AAA].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_AAA].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBbb(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BBB].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BBB].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BBB].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipCcc(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CCC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CCC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CCC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+		if (download_number == DOWNLOAD_THEMES) {ret = UnzipThemes(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSIC) {ret = UnzipClassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSICWII) {ret = UnzipClassicwii(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DISCS) {ret = UnzipDiscs(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_GCNS) {ret = UnzipGcns(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMBLUE) {ret = UnzipMmblue(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMCLASSIC) {ret = UnzipMmclassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK1) {ret = UnzipMmdark1(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK2) {ret = UnzipMmdark2(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_ORANGE) {ret = UnzipOrange(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_PURPLE) {ret = UnzipPurple(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_SMASH) {ret = UnzipSmash(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BARS) {ret = UnzipBars(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_AAA) {ret = UnzipAaa(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BBB) {ret = UnzipBbb(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CCC) {ret = UnzipCcc(outbuf, filesize);}	
+else 
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			f_chdir_char("/apps/Nintendont");
+			f_rename_char( "./NinBack.old", "./NinBack.png");
+			f_rename_char( "./NinBlack.old", "./NinBlack.png");
+			f_rename_char( "./NinLegacy.old", "./NinLegacy.png");
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(2);
+			return ret;		
+		}
+	else {
+	if (which_bg == BG_NONE)
+	{PrintFormat(37, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(37, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(2);
+	BackTheme();
+	return ret;
+}
+
+void UpdateLegacy(void) {
+	selected=0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		BackTheme();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Dark Themes Download Menu");		
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Doomy Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Carbonix Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Orchid Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Oily Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Stripes Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Dark Planet Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Rusty Hell Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Infinite Flower Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Cosmic Puzzle Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Chirpy Red Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Cloudy Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Nintendo Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Magical Cube Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download GC Logo Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download Alone in The Dark Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Dark Forest Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Dark Themes Download Menu");
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Doomy Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Carbonix Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Orchid Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Oily Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Stripes Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Dark Planet Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Rusty Hell Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Infinite Flower Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Cosmic Puzzle Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Chirpy Red Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Cloudy Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Nintendo Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Magical Cube Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download GC Logo Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download Alone in The Dark Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Dark Forest Theme");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/dark") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+			if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+			if (FPAD_OK(1)) {
+			f_chdir_char("/apps/Nintendont");
+			if (selected <= (DOWNLOAD_CCC))
+			{
+			f_rename_char( "./NinBack.png", "./NinBack.old");
+			f_rename_char( "./NinBlack.png", "./NinBlack.old");
+			f_rename_char( "./NinLegacy.png", "./NinLegacy.old");
+			Download(selected);
+			f_unlink_char( "./NinBack.old" );
+			f_unlink_char( "./NinBlack.old" );
+			f_unlink_char( "./NinLegacy.old" );
+			GRRLIB_FreeTexture(background);
+			which_bg = BG_LEGACY;
+			background = GRRLIB_LoadTextureFromFile("NinLegacy.png");	
+			if (background == NULL)
+			background = GRRLIB_LoadTexturePNG(background_png);
+			FadeIt();}
+			else
+				break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 15) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 15;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
Index: loader/source/update-grad.c
===================================================================
--- loader/source/update-grad.c	(nonexistent)
+++ loader/source/update-grad.c	(working copy)
@@ -0,0 +1,783 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+#include "../../common/include/NintendontVersion.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_THEMES,
+	DOWNLOAD_CLASSIC,
+	DOWNLOAD_CLASSICWII,
+	DOWNLOAD_DISCS,
+	DOWNLOAD_GCNS,
+	DOWNLOAD_MMBLUE,
+	DOWNLOAD_MMCLASSIC,
+	DOWNLOAD_MMDARK1,
+	DOWNLOAD_MMDARK2,
+	DOWNLOAD_ORANGE,
+	DOWNLOAD_PURPLE,
+	DOWNLOAD_SMASH,
+	DOWNLOAD_BARS,
+	DOWNLOAD_AAA,
+	DOWNLOAD_BBB,
+	DOWNLOAD_CCC	
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/grad00.zip", "Downloading Theme", "grad00.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad01.zip", "Downloading Theme", "grad01.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad02.zip", "Downloading Theme", "grad02.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad03.zip", "Downloading Theme", "grad03.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad04.zip", "Downloading Theme", "grad04.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad05.zip", "Downloading Theme", "grad05.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/grad06.zip", "Downloading Theme", "grad06.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad07.zip", "Downloading Theme", "grad07.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad08.zip", "Downloading Theme", "grad08.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/grad09.zip", "Downloading Theme", "grad09.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad10.zip", "Downloading Theme", "grad10.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad11.zip", "Downloading Theme", "grad11.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad12.zip", "Downloading Theme", "grad12.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/grad13.zip", "Downloading Theme", "grad13.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad14.zip", "Downloading Theme", "grad14.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/grad15.zip", "Downloading Theme", "grad15.zip", 0x80000}, // 512KB		
+};
+
+static int UnzipThemes(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_THEMES].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_THEMES].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_THEMES].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassicwii(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSICWII].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDiscs(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DISCS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DISCS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DISCS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipGcns(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_GCNS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_GCNS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_GCNS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmblue(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMBLUE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMBLUE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMBLUE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmclassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMCLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark1(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK1].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK1].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK1].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark2(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK2].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK2].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK2].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipOrange(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_ORANGE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_ORANGE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_ORANGE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipPurple(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_PURPLE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_PURPLE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_PURPLE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipSmash(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_SMASH].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_SMASH].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_SMASH].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBars(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BARS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BARS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BARS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipAaa(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_AAA].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_AAA].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_AAA].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBbb(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BBB].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BBB].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BBB].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipCcc(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CCC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CCC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CCC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+		if (download_number == DOWNLOAD_THEMES) {ret = UnzipThemes(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSIC) {ret = UnzipClassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSICWII) {ret = UnzipClassicwii(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DISCS) {ret = UnzipDiscs(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_GCNS) {ret = UnzipGcns(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMBLUE) {ret = UnzipMmblue(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMCLASSIC) {ret = UnzipMmclassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK1) {ret = UnzipMmdark1(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK2) {ret = UnzipMmdark2(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_ORANGE) {ret = UnzipOrange(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_PURPLE) {ret = UnzipPurple(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_SMASH) {ret = UnzipSmash(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BARS) {ret = UnzipBars(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_AAA) {ret = UnzipAaa(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BBB) {ret = UnzipBbb(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CCC) {ret = UnzipCcc(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+	end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			f_rename_char( "./NinBack.old", "./NinBack.png");
+			f_rename_char( "./NinBlack.old", "./NinBlack.png");
+			f_rename_char( "./NinLegacy.old", "./NinLegacy.png");
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(2);
+			return ret;
+		}
+	else {
+	if (which_bg == BG_NONE)
+	{PrintFormat(37, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(37, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(2);
+	BackTheme();
+	return ret;
+}
+
+void UpdateGrad(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		BackTheme();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Gradient Themes Download Menu");	
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Amazon Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Forest Sun Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Blue Dream Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Rainbow Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Sandy Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Golden Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Paradise Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Pharao Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download No Fear Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Magic Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Mighty Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Greenies Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Focus Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download Highlight Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download No return Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Zombie Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Gradient Themes Download Menu");	
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Amazon Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Forest Sun Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Blue Dream Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Rainbow Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Sandy Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Golden Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Paradise Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Pharao Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download No Fear Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Magic Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Mighty Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Greenies Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Focus Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download Highlight Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download No return Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Zombie Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/grad") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+			if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+			if (FPAD_OK(1)) {
+			f_chdir_char("/apps/Nintendont");
+			if (selected <= (DOWNLOAD_CCC))
+			{
+			f_rename_char( "./NinBack.png", "./NinBack.old");
+			f_rename_char( "./NinBlack.png", "./NinBlack.old");
+			f_rename_char( "./NinLegacy.png", "./NinLegacy.old");
+			Download(selected);
+			f_unlink_char( "./NinBack.old" );
+			f_unlink_char( "./NinBlack.old" );
+			f_unlink_char( "./NinLegacy.old" );
+			BackTheme();
+			FadeIt();
+			}
+			else
+				break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 15) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 15;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
Index: loader/source/update-light.c
===================================================================
--- loader/source/update-light.c	(nonexistent)
+++ loader/source/update-light.c	(working copy)
@@ -0,0 +1,787 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+#include "../../common/include/NintendontVersion.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_THEMES,
+	DOWNLOAD_CLASSIC,
+	DOWNLOAD_CLASSICWII,
+	DOWNLOAD_DISCS,
+	DOWNLOAD_GCNS,
+	DOWNLOAD_MMBLUE,
+	DOWNLOAD_MMCLASSIC,
+	DOWNLOAD_MMDARK1,
+	DOWNLOAD_MMDARK2,
+	DOWNLOAD_ORANGE,
+	DOWNLOAD_PURPLE,
+	DOWNLOAD_SMASH,
+	DOWNLOAD_BARS,
+	DOWNLOAD_AAA,
+	DOWNLOAD_BBB,
+	DOWNLOAD_CCC	
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/back00.zip", "Downloading Theme", "back00.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back01.zip", "Downloading Theme", "back01.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back02.zip", "Downloading Theme", "back02.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back03.zip", "Downloading Theme", "back03.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back04.zip", "Downloading Theme", "back04.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back05.zip", "Downloading Theme", "back05.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/back06.zip", "Downloading Theme", "back06.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back07.zip", "Downloading Theme", "back07.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back08.zip", "Downloading Theme", "back08.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/back09.zip", "Downloading Theme", "back09.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back10.zip", "Downloading Theme", "back10.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back11.zip", "Downloading Theme", "back11.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back12.zip", "Downloading Theme", "back12.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/back13.zip", "Downloading Theme", "back13.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back14.zip", "Downloading Theme", "back14.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/back15.zip", "Downloading Theme", "back15.zip", 0x80000}, // 512KB		
+};
+
+static int UnzipThemes(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_THEMES].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_THEMES].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_THEMES].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassicwii(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSICWII].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDiscs(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DISCS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DISCS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DISCS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipGcns(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_GCNS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_GCNS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_GCNS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmblue(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMBLUE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMBLUE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMBLUE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmclassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMCLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark1(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK1].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK1].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK1].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark2(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK2].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK2].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK2].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipOrange(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_ORANGE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_ORANGE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_ORANGE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipPurple(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_PURPLE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_PURPLE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_PURPLE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipSmash(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_SMASH].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_SMASH].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_SMASH].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBars(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BARS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BARS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BARS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipAaa(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_AAA].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_AAA].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_AAA].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBbb(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BBB].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BBB].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BBB].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipCcc(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CCC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CCC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CCC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+		if (download_number == DOWNLOAD_THEMES) {ret = UnzipThemes(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSIC) {ret = UnzipClassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSICWII) {ret = UnzipClassicwii(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DISCS) {ret = UnzipDiscs(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_GCNS) {ret = UnzipGcns(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMBLUE) {ret = UnzipMmblue(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMCLASSIC) {ret = UnzipMmclassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK1) {ret = UnzipMmdark1(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK2) {ret = UnzipMmdark2(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_ORANGE) {ret = UnzipOrange(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_PURPLE) {ret = UnzipPurple(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_SMASH) {ret = UnzipSmash(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BARS) {ret = UnzipBars(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_AAA) {ret = UnzipAaa(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BBB) {ret = UnzipBbb(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CCC) {ret = UnzipCcc(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			f_rename_char( "./NinBack.old", "./NinBack.png");
+			f_rename_char( "./NinBlack.old", "./NinBlack.png");
+			f_rename_char( "./NinLegacy.old", "./NinLegacy.png");
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(2);
+			return ret;
+		}
+	else {
+	if (which_bg == BG_NONE)
+	{PrintFormat(37, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(37, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(2);
+	BackTheme();
+	return ret;
+}
+
+void UpdateThemes(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		BackTheme();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Light Themes Download Menu");	
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Orchid Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Aqua Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Sunshine Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Shroom Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Triforce Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download GC Logo Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Rays Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Carbonix Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Arcadia Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Zelda OoT Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Double-Dash Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Bright Sky Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Wii Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download Kirby Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download Controller Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Luigi Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Light Themes Download Menu");	
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Orchid Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Aqua Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Sunshine Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Shroom Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Triforce Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download GC Logo Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Rays Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Carbonix Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Arcadia Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Zelda OoT Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Double-Dash Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Bright Sky Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Wii Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download Kirby Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download Controller Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Luigi Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/light") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+			if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+			if (FPAD_OK(1)) {
+			f_chdir_char("/apps/Nintendont");
+			if (selected <= (DOWNLOAD_CCC))
+			{
+			f_rename_char( "./NinBack.png", "./NinBack.old");
+			f_rename_char( "./NinBlack.png", "./NinBlack.old");
+			f_rename_char( "./NinLegacy.png", "./NinLegacy.old");
+			Download(selected);
+			f_unlink_char( "./NinBack.old" );
+			f_unlink_char( "./NinBlack.old" );
+			f_unlink_char( "./NinLegacy.old" );
+			GRRLIB_FreeTexture(background);
+			which_bg = BG_NONE;
+			background = GRRLIB_LoadTextureFromFile("NinBack.png");	
+			if (background == NULL)
+			background = GRRLIB_LoadTexturePNG(background_png);
+			FadeIt();
+			}
+			else
+				break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 15) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 15;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
Index: loader/source/update-loader.c
===================================================================
--- loader/source/update-loader.c	(nonexistent)
+++ loader/source/update-loader.c	(working copy)
@@ -0,0 +1,839 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+#include "../../common/include/NintendontVersion.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_THEMES,
+	DOWNLOAD_CLASSIC,
+	DOWNLOAD_CLASSICWII,
+	DOWNLOAD_DISCS,
+	DOWNLOAD_GCNS,
+	DOWNLOAD_MMBLUE,
+	DOWNLOAD_MMCLASSIC,
+	DOWNLOAD_MMDARK1,
+	DOWNLOAD_MMDARK2,
+	DOWNLOAD_ORANGE,
+	DOWNLOAD_PURPLE,
+	DOWNLOAD_SMASH,
+	DOWNLOAD_AAA,
+	DOWNLOAD_BBB,
+	DOWNLOAD_CCC,
+	DOWNLOAD_BARS	
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/l00.zip", "Downloading Theme", "theme0.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l01.zip", "Downloading Theme", "classic.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l02.zip", "Downloading Theme", "classicwii.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l03.zip", "Downloading Theme", "discs.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l04.zip", "Downloading Theme", "gcns.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l05.zip", "Downloading Theme", "mmblue.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/l06.zip", "Downloading Theme", "mmclassic.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l07.zip", "Downloading Theme", "mmdark1.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l08.zip", "Downloading Theme", "mmdark2.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/l09.zip", "Downloading Theme", "orange.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l10.zip", "Downloading Theme", "purple.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l11.zip", "Downloading Theme", "smash.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l12.zip", "Downloading Theme", "aaa.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l13.zip", "Downloading Theme", "bbb.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l14.zip", "Downloading Theme", "ccc.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/l15.zip", "Downloading Theme", "bars.zip", 0x80000}, // 512KB	
+};
+
+static int UnzipThemes(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_THEMES].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_THEMES].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_THEMES].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipClassicwii(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CLASSICWII].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CLASSICWII].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDiscs(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DISCS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DISCS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DISCS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipGcns(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_GCNS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_GCNS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_GCNS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmblue(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMBLUE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMBLUE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMBLUE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmclassic(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMCLASSIC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMCLASSIC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark1(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK1].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK1].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK1].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipMmdark2(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_MMDARK2].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_MMDARK2].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_MMDARK2].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipOrange(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_ORANGE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_ORANGE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_ORANGE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipPurple(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_PURPLE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_PURPLE].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_PURPLE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipSmash(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_SMASH].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_SMASH].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_SMASH].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipAaa(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_AAA].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_AAA].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_AAA].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBbb(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BBB].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BBB].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BBB].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipCcc(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CCC].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_CCC].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_CCC].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipBars(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BARS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BARS].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BARS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+						if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+
+		if (download_number == DOWNLOAD_THEMES) {ret = UnzipThemes(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSIC) {ret = UnzipClassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CLASSICWII) {ret = UnzipClassicwii(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DISCS) {ret = UnzipDiscs(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_GCNS) {ret = UnzipGcns(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMBLUE) {ret = UnzipMmblue(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMCLASSIC) {ret = UnzipMmclassic(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK1) {ret = UnzipMmdark1(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_MMDARK2) {ret = UnzipMmdark2(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_ORANGE) {ret = UnzipOrange(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_PURPLE) {ret = UnzipPurple(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_SMASH) {ret = UnzipSmash(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_AAA) {ret = UnzipAaa(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BBB) {ret = UnzipBbb(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_CCC) {ret = UnzipCcc(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_BARS) {ret = UnzipBars(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			f_chdir_char("/apps/Nintendont");
+			f_rename_char( "./NinBackLight.old", "./NinBackLight.png");
+			f_rename_char( "./NinBackDark.old", "./NinBackDark.png");
+			f_rename_char( "./NinBackBars.old", "./NinBackBars.png");
+			f_rename_char( "./NinBackNoBar.old", "./NinBackNoBar.png");
+			f_rename_char( "./NinBlack.old", "./NinBlack.png");
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep (2);	
+			return ret;
+		}
+	else
+		if (which_bg == BG_NONE)
+					{		PrintFormat(27, 0x80000000, MENU_POS_X + 130, MENU_POS_Y + 20*(line+4), "Autoboot Nintendont ");
+		PrintFormat(27, 0x80000000, MENU_POS_X + 135, MENU_POS_Y + 20*(line+6), "Using a USB Loader");	
+		PrintFormat(27, 0x80000000, MENU_POS_X + 125, MENU_POS_Y + 20*(line+8), "To Use The New Theme");			
+		PrintFormat(27, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "You'll Watch a 3 Seconds Preview Now");}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(27, WHITE, MENU_POS_X + 130, MENU_POS_Y + 20*(line+4), "Autoboot Nintendont ");
+		PrintFormat(27, WHITE, MENU_POS_X + 135, MENU_POS_Y + 20*(line+6), "Using a USB Loader");	
+		PrintFormat(27, WHITE, MENU_POS_X + 125, MENU_POS_Y + 20*(line+8), "To Use The New Theme");			
+		PrintFormat(27, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "You'll Watch a 3 Seconds Preview Now");}		
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep (3);		
+		f_chdir_char("/apps/Nintendont");
+		GRRLIB_FreeTexture(background);
+		background = GRRLIB_LoadTextureFromFile("NinBackLight.png");
+		if (background != NULL)
+		{
+		ClearScreen();
+		PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88 ");
+		PrintFormat(DEFAULT_SIZE, 0x45587C00, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88 ");
+		UpdateScreen();
+		sleep(3);
+		BackTheme();
+		goto endy;		
+		}
+		else background = GRRLIB_LoadTextureFromFile("NinBackDark.png");
+		if (background != NULL)
+		{
+		ClearScreen();
+		PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88 ");
+		PrintFormat(DEFAULT_SIZE, 0xC0C0C000, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88\xe2\x96\x88 ");
+		UpdateScreen();
+		sleep(3);
+		BackTheme();
+		goto endy;		
+		}
+		else background = GRRLIB_LoadTextureFromFile("NinBackBars.png");
+		if (background != NULL)
+		{
+		ClearScreen();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83 ");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50*1, MENU_POS_Y + 20*19, "\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83\xe2\x95\x83 ");
+		UpdateScreen();
+		sleep(3);
+		BackTheme();
+		goto endy;		
+		}
+		else background = GRRLIB_LoadTextureFromFile("NinBackNoBar.png");
+		if (background != NULL)
+		{
+		ClearScreen();
+		UpdateScreen();
+		sleep(3);
+		BackTheme();
+		goto endy;		
+		}
+		endy:
+		return ret;}
+
+void UpdateLoader(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		BackTheme();
+			if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Loader Themes Download Menu");		
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");		
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Controller Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Classic Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Wanna-Play Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Warning Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download GameCubes Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download MasterMod Blue Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download MasterMod Classic Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download MasterMod Dark Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Mario Link Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Kids Power Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Purple Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Carbonix Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Sexy Black Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download GC Controller Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download Rainbow Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Mr Luigi Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Loader Themes Download Menu");
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Controller Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Classic Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Wanna-Play Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Warning Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download GameCubes Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download MasterMod Blue Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download MasterMod Classic Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download MasterMod Dark Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Mario Link Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Kids Power Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Download Purple Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Carbonix Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Download Sexy Black Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Download GC Controller Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Download Rainbow Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Download Mr Luigi Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/loader") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+			if (FPAD_OK(1)) {
+			f_chdir_char("/apps/Nintendont");
+			if (selected <= (DOWNLOAD_BARS))
+		{	
+			f_rename_char( "./NinBackLight.png", "./NinBackLight.old");
+			f_rename_char( "./NinBackDark.png", "./NinBackDark.old");
+			f_rename_char( "./NinBackBars.png", "./NinBackBars.old");
+			f_rename_char( "./NinBackNoBar.png", "./NinBackNoBar.old");
+			f_rename_char( "./NinBlack.png", "./NinBlack.old");
+			Download(selected);
+			f_unlink_char( "./NinBackLight.old" );
+			f_unlink_char( "./NinBackDark.old" );
+			f_unlink_char( "./NinBackBars.old" );
+			f_unlink_char( "./NinBackNoBar.old" );
+			f_unlink_char( "./NinBlack.old" );		
+			BackTheme();
+			FadeIt();}
+		else
+			break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 15) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 15;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
\ No newline at end of file
Index: loader/source/update-old.c
===================================================================
--- loader/source/update-old.c	(nonexistent)
+++ loader/source/update-old.c	(working copy)
@@ -0,0 +1,517 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+
+#include "../../common/include/NintendontVersion.h"
+
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_DSX,
+	DOWNLOAD_DS0,
+	DOWNLOAD_DS1,
+	DOWNLOAD_DS2,
+	DOWNLOAD_DS4,
+	DOWNLOAD_DSS,
+	DOWNLOAD_DS3,
+	DOWNLOAD_STABLE,
+	DOWNLOAD_INITDI	
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = { 
+	{"http://send0r.de/Nintendont/MasterMod/419.zip", "Downloading Nintendont v4.419", "419.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/405.zip", "Downloading Nintendont v3.405", "405.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/397.zip", "Downloading Nintendont v3.397", "397.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/353.zip", "Downloading Nintendont v3.353", "353.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/321.zip", "Downloading Nintendont v3.321", "321.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/319.zip", "Downloading Nintendont v3.319", "319.zip", 0x400000}, // 4MB		
+	{"http://send0r.de/Nintendont/MasterMod/296.zip", "Downloading Nintendont v2.296", "296.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/stable.zip", "Downloading Nintendont v3.406", "stable.zip", 0x400000}, // 4MB	
+	{"http://send0r.de/Nintendont/MasterMod/229.zip", "Downloading Nintendont v2.229", "229.zip", 0x400000}, // 4MB	
+};
+
+static int UnzipDsx(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DSX].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DSX].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DSX].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDs0(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DS0].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DS0].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DS0].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDs1(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DS1].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DS1].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DS1].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDs2(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DS2].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DS2].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DS2].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDs4(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DS4].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DS4].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DS4].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDss(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DSS].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DSS].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DSS].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipDs3(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DS3].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DS3].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DS3].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipStable(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_STABLE].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_STABLE].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_STABLE].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipInitdi(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_INITDI].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_INITDI].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_INITDI].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+				if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+			 if (download_number == DOWNLOAD_DSX) {ret = UnzipDsx(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DS0) {ret = UnzipDs0(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DS1) {ret = UnzipDs1(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DS2) {ret = UnzipDs2(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DS4) {ret = UnzipDs4(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_DSS) {ret = UnzipDss(outbuf, filesize);}		
+		else if (download_number == DOWNLOAD_DS3) {ret = UnzipDs3(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_STABLE) {ret = UnzipStable(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_INITDI) {ret = UnzipInitdi(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+
+		}
+	else
+	{									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(3);
+	BackTheme();
+	return ret;
+}
+
+void UpdateOld(void) {
+	int selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+					if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Older Nintendont Download Menu");	
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");			
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Nintendont MasterMod (v4.419)");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont MasterMod (v3.405)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Nintendont MasterMod (v3.397)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Nintendont MasterMod (v3.353)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Nintendont MasterMod (v3.321)");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Nintendont MasterMod (v3.319)");			
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Nintendont MasterMod (v2.296)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Nintendont MasterMod (v2.275)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Nintendont MasterMod (v2.229)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Return to Update Menu");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Older Nintendont Download Menu");	
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Nintendont MasterMod (v4.419)");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont MasterMod (v3.405)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Nintendont MasterMod (v3.397)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download Nintendont MasterMod (v3.353)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Nintendont MasterMod (v3.321)");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Nintendont MasterMod (v3.319)");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Nintendont MasterMod (v2.296)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Nintendont MasterMod (v2.275)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Nintendont MasterMod (v2.229)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Return to Update Menu");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+						if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+			if (FPAD_OK(1)) {
+			f_chdir_char("/apps/Nintendont");
+			if (selected <= (DOWNLOAD_INITDI))
+			Download(selected);
+			else
+				break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 9) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 9;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}	
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
Index: loader/source/update-other.c
===================================================================
--- loader/source/update-other.c	(nonexistent)
+++ loader/source/update-other.c	(working copy)
@@ -0,0 +1,368 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+#include "ssl.h"
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+
+#include "../../common/include/NintendontVersion.h"
+
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_NINTENDONT = 0,
+	DOWNLOAD_DS2,
+	DOWNLOAD_DS3
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"https://raw.githubusercontent.com/FIX94/Nintendont/master/loader/loader.dol", "Updating Nintendont", "boot.dol", 0x400000}, // 4MB
+	{"http://send0r.de/Nintendont/boot.zip", "Updating Nintendont", "boot.zip", 0x800000}, // 8MB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB	
+};
+
+static int UnzipDs2(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_DS2].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_DS2].filename);
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_DS2].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static inline bool LatestVersion(int *major, int *minor, int *current_line) {
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	int line = *current_line;
+				//	if (which_bg == BG_NONE)
+				//	{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[DOWNLOAD_VERSION].text);}
+				//	else if (which_bg == BG_LEGACY)
+				//	{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[DOWNLOAD_VERSION].text);}
+	UpdateScreen();
+	//line++;
+	/*if(!http_request(Downloads[DOWNLOAD_VERSION].url, Downloads[DOWNLOAD_VERSION].max_size)) {
+						if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Failed to retrieve version");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Failed to retrieve version");}
+		UpdateScreen();
+		*current_line = line;
+		return true; //false;
+	}*/
+
+	http_get_result(&http_status, &outbuf, &filesize);
+	
+	if (((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		if (outbuf != NULL) free(outbuf);
+		*current_line = line;
+		return false;
+	}
+//	sscanf((char*)outbuf, " #ifndef %*s #define %*s #define NIN_MAJOR_VERSION %i #define NIN_MINOR_VERSION %i", major, minor);
+//	gprintf("major = %i, minor = %i\r\n", *major, *minor);
+	*major=3;
+	*minor=999;
+	if (outbuf != NULL) free(outbuf);
+	/*if ((*major <= NIN_MAJOR_VERSION) && (*minor <= NIN_MINOR_VERSION)) {
+		bool still_download = true;
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "You already have the latest version");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "You already have the latest version");}
+		line++;
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download anyway? (A: Yes, B: No)");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Download anyway? (A: Yes, B: No)");}
+		line++;
+		UpdateScreen();
+		while(true) {
+			DrawBuffer();
+			FPAD_Update();
+			if (FPAD_Cancel(0)) {
+				gprintf("Cancelling download\n");
+				still_download = false;
+				break;
+			}
+			if (FPAD_OK(0)) {
+				gprintf("okay\n");
+				break;
+			}
+			GRRLIB_Render();
+		}
+		if(!still_download) {
+			*current_line = line;
+			return false;
+		}
+	} */
+	*current_line = line;
+	return (*major + *minor) > 0;
+
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret, major = 0, minor = 0;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	if (download_number == 0)
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	else
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "./", Downloads[download_number].filename);
+	
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	ssl_init(); //only once needed
+	line++;
+	if (download_number == DOWNLOAD_NINTENDONT) {
+		ret = LatestVersion(&major, &minor, &line);
+		if (!ret) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Download Cancelled");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Download Cancelled");}
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(4);
+			return 0;
+		}
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading Nintendont");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading Nintendont");}
+		UpdateScreen();
+		line++;
+	}
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Download Complete");}
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps");
+		f_mkdir_char("/apps/Nintendont");
+	}
+
+	// Write the file to disk.		
+if (download_number == DOWNLOAD_DS2) {ret = UnzipDs2(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*line, "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*line, "Update Error: %i", ret);
+		}
+	else
+	{									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}}
+		
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(3);
+	//BackTheme();
+	return ret;
+}
+
+
+void UpdateOther(void) {
+	int selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Updates & Themes Menu");
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");		
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Official Nintendont (Latest Revision)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont Mysterio's Mod by Sendor");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Nintendont MasterMod (Stable Revisions)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Return to Update Menu");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Updates & Themes Menu");
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");		
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Official Nintendont (Latest Revision)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont Mysterio's Mod by Sendor");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Nintendont MasterMod (Stable Revisions)");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Return to Update Menu");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+		if (FPAD_OK(1)) {		
+			f_chdir_char("/apps/Nintendont");
+			if (selected <= (DOWNLOAD_DS2))
+			Download(selected);
+			else if (selected == (DOWNLOAD_DS3))
+			UpdateOld();
+			else
+				break;
+		}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 3) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 3;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
Index: loader/source/update-simple.c
===================================================================
--- loader/source/update-simple.c	(nonexistent)
+++ loader/source/update-simple.c	(working copy)
@@ -0,0 +1,786 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "../../common/include/NintendontVersion.h"
+
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_00,
+	DOWNLOAD_01,
+	DOWNLOAD_02,
+	DOWNLOAD_03,
+	DOWNLOAD_04,
+	DOWNLOAD_05,
+	DOWNLOAD_06,
+	DOWNLOAD_07,
+	DOWNLOAD_08,
+	DOWNLOAD_09,
+	DOWNLOAD_10,
+	DOWNLOAD_11,
+	DOWNLOAD_12,
+	DOWNLOAD_13,
+	DOWNLOAD_14,
+	DOWNLOAD_15
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/000.zip", "Downloading Black Theme", "000.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/001.zip", "Downloading Black Theme", "001.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/002.zip", "Downloading Black Theme", "002.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/003.zip", "Downloading Black Theme", "003.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/004.zip", "Downloading Black Theme", "004.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/005.zip", "Downloading Black Theme", "005.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/006.zip", "Downloading Black Theme", "006.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/007.zip", "Downloading Black Theme", "007.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/008.zip", "Downloading Black Theme", "008.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/009.zip", "Downloading Black Theme", "009.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/010.zip", "Downloading Black Theme", "010.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/011.zip", "Downloading Black Theme", "011.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/012.zip", "Downloading Black Theme", "012.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/013.zip", "Downloading Black Theme", "013.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/014.zip", "Downloading Black Theme", "014.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/015.zip", "Downloading Black Theme", "015.zip", 0x80000}, // 512KB
+};
+
+static int Unzip00(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_00].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_00].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_00].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip01(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_01].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_01].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_01].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip02(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_02].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_02].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_02].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip03(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_03].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_03].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_03].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip04(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_04].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_04].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_04].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip05(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_05].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_05].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_05].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip06(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_06].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_06].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_06].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip07(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_07].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_07].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_07].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip08(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_08].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_08].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_08].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip09(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_09].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_09].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_09].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip10(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_10].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_10].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_10].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip11(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_11].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_11].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_11].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip12(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_12].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_12].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_12].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip13(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_13].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_13].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_13].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip14(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_14].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_14].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_14].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip15(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_15].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_15].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_15].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+		if (download_number == DOWNLOAD_00) {ret = Unzip00(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_01) {ret = Unzip01(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_02) {ret = Unzip02(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_03) {ret = Unzip03(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_04) {ret = Unzip04(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_05) {ret = Unzip05(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_06) {ret = Unzip06(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_07) {ret = Unzip07(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_08) {ret = Unzip08(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_09) {ret = Unzip09(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_10) {ret = Unzip10(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_11) {ret = Unzip11(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_12) {ret = Unzip12(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_13) {ret = Unzip13(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_14) {ret = Unzip14(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_15) {ret = Unzip15(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+	end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			f_rename_char( "./NinBack.old", "./NinBack.png");
+			f_rename_char( "./NinBlack.old", "./NinBlack.png");
+			f_rename_char( "./NinLegacy.old", "./NinLegacy.png");
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(2);
+			return ret;
+		}
+	else {
+	if (which_bg == BG_NONE)
+	{PrintFormat(37, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(37, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(2);
+	BackTheme();
+	return ret;
+}
+
+void SimpleBack(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+	end:
+		ClearScreen();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Black Themes Menu");	
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Stormy Night Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Dark Fog Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "No Hope Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Versace Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Old As Hell Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "No Escape Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Mild Hope Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Lonely Flowers Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Power Grid Theme");			
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Future Door Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Old Paper Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Doom's Hive Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Crazy Wall Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Classic Curves Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Super Nova Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Mosaic Theme");
+	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Black Themes Menu");		
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Stormy Night Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Dark Fog Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "No Hope Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Versace Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Old As Hell Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "No Escape Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Mild Hope Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Lonely Flowers Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Power Grid Theme");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Future Door Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Old Paper Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Doom's Hive Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Crazy Wall Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Classic Curves Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Super Nova Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*19, "Mosaic Theme");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/black") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+		if (FPAD_OK(1)) {
+		if (selected <= (DOWNLOAD_15))
+			{
+			f_rename_char( "./NinBack.png", "./NinBack.old");
+			f_rename_char( "./NinBlack.png", "./NinBlack.old");
+			f_rename_char( "./NinLegacy.png", "./NinLegacy.old");
+			Download(selected);
+			f_unlink_char( "./NinBack.old" );
+			f_unlink_char( "./NinBlack.old" );
+			f_unlink_char( "./NinLegacy.old" );
+			BackTheme();
+			FadeIt();
+			goto end;
+			}
+			else
+			break;
+			}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 15) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 15;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}				
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
\ No newline at end of file
Index: loader/source/update-single.c
===================================================================
--- loader/source/update-single.c	(nonexistent)
+++ loader/source/update-single.c	(working copy)
@@ -0,0 +1,777 @@
+/*
+
+Nintendont (Loader) - Playing Gamecubes in Wii mode on a Wii U
+
+Copyright (C) 2014  JoostinOnline
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+*/
+
+#include <gccore.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "../../common/include/NintendontVersion.h"
+
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+extern void changeToDefaultDrive();
+extern char launch_dir[MAXPATHLEN];
+extern int selected;
+typedef struct {
+	const char url[96];
+	const char text[30];
+	const char filename[30];
+	const u32 max_size;
+} downloads_t;
+
+typedef enum {
+	DOWNLOAD_00,
+	DOWNLOAD_01,
+	DOWNLOAD_02,
+	DOWNLOAD_03,
+	DOWNLOAD_04,
+	DOWNLOAD_05,
+	DOWNLOAD_06,
+	DOWNLOAD_07,
+	DOWNLOAD_08,
+	DOWNLOAD_09,
+	DOWNLOAD_10,
+	DOWNLOAD_11,
+	DOWNLOAD_12,
+	DOWNLOAD_13,
+	DOWNLOAD_14,
+	DOWNLOAD_15
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/00.zip", "Downloading Simple Theme", "00.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/01.zip", "Downloading Simple Theme", "01.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/02.zip", "Downloading Simple Theme", "02.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/03.zip", "Downloading Simple Theme", "03.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/04.zip", "Downloading Simple Theme", "04.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/05.zip", "Downloading Simple Theme", "05.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/06.zip", "Downloading Simple Theme", "06.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/07.zip", "Downloading Simple Theme", "07.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/08.zip", "Downloading Simple Theme", "08.zip", 0x80000}, // 512KB	
+	{"http://send0r.de/Nintendont/MasterMod/09.zip", "Downloading Simple Theme", "09.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/10.zip", "Downloading Simple Theme", "10.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/11.zip", "Downloading Simple Theme", "11.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/12.zip", "Downloading Simple Theme", "12.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/13.zip", "Downloading Simple Theme", "13.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/14.zip", "Downloading Simple Theme", "14.zip", 0x80000}, // 512KB
+	{"http://send0r.de/Nintendont/MasterMod/15.zip", "Downloading Simple Theme", "15.zip", 0x80000}, // 512KB
+};
+
+static int Unzip00(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_00].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_00].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_00].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip01(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_01].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_01].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_01].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip02(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_02].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_02].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_02].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip03(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_03].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_03].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_03].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip04(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_04].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_04].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_04].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip05(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_05].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_05].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_05].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip06(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_06].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_06].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_06].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip07(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_07].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_07].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_07].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip08(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_08].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_08].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_08].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip09(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_09].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_09].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_09].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip10(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_10].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_10].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_10].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip11(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_11].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_11].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_11].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip12(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_12].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_12].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_12].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip13(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_13].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_13].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_13].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip14(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_14].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_14].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_14].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int Unzip15(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	 static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_15].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_15].filename);
+	
+	changeToDefaultDrive();
+	f_chdir_char("/apps/Nintendont");
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_15].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static s32 Download(DOWNLOADS download_number)  {
+	ClearScreen();
+	
+	int line = 1;
+	int ret;
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+	if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+		if (ret) break;
+		if (i == 10) {
+			gprintf("Error making http request\r\n");
+			ret = -1;
+			goto end;
+		}
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
+		gprintf("Creating new directory\r\n");
+		f_mkdir_char("/apps/Nintendont");
+	}
+		if (download_number == DOWNLOAD_00) {ret = Unzip00(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_01) {ret = Unzip01(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_02) {ret = Unzip02(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_03) {ret = Unzip03(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_04) {ret = Unzip04(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_05) {ret = Unzip05(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_06) {ret = Unzip06(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_07) {ret = Unzip07(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_08) {ret = Unzip08(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_09) {ret = Unzip09(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_10) {ret = Unzip10(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_11) {ret = Unzip11(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_12) {ret = Unzip12(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_13) {ret = Unzip13(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_14) {ret = Unzip14(outbuf, filesize);}
+		else if (download_number == DOWNLOAD_15) {ret = Unzip15(outbuf, filesize);}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+			gprintf("File Error\r\n");
+			ret = -3;
+			goto end;
+		} else {
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+	end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Update Error: %i", ret);
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(2);
+			return ret;
+		}
+	else {
+	if (which_bg == BG_NONE)
+	{PrintFormat(37, 0x80000000, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}
+	else if (which_bg == BG_LEGACY)
+	{PrintFormat(37, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+15), "Applying The New Theme Now");}}
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(2);
+	BackTheme();
+	FadeIt();
+	return ret;
+}
+
+void SingleBack(void) {
+	selected = 0;
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Simple Themes Menu");	
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Black Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Earth Blue Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Dark Forest Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Fire Brick Theme");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Dark Purple Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Midnight Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Greenish Blue Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Golden Dirt Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Blue Diamond Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Frog Green Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Bean Red Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Vanilla Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Mint Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Corn Yellow Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Silver Theme");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*19, "White Theme");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Simple Themes Menu");		
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");	
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Black Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Earth Blue Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Dark Forest Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Fire Brick Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Dark Purple Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Midnight Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Greenish Blue Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Golden Dirt Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Blue Diamond Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Frog Green Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Bean Red Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Vanilla Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Mint Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Corn Yellow Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Silver Theme");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*19, "White Theme");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+		//////////
+		if (f_chdir_char("/apps/Nintendont/Preview/single") == FR_OK){
+		Preview();}
+		//////////
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+		if (FPAD_OK(1)) {
+		if (selected <= (DOWNLOAD_15))
+			{
+			changeToDefaultDrive();
+			f_chdir_char("/apps/Nintendont");
+			f_unlink_char( "./NinBack.png" );
+			f_unlink_char( "./NinBlack.png" );
+			f_unlink_char( "./NinLegacy.png" );
+			Download(selected);
+			}
+			else
+			break;
+			}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 15) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 15;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}				
+		if (FPAD_Cancel(1)) {
+			break;
+		}
+	}
+	ClearScreen();
+	UpdateNintendont();
+}
\ No newline at end of file
Index: loader/source/update.c
===================================================================
--- loader/source/update.c	(revision 542)
+++ loader/source/update.c	(working copy)
@@ -23,115 +23,205 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <network.h>
-#include <zlib.h>
-#include <ogc/lwp_watchdog.h>
-
-#include "exi.h"
-#include "FPad.h"
-#include "font.h"
-#include "global.h"
-#include "http.h"
-#include "ssl.h"
-#include "menu.h"
-#include "update.h"
-#include "../../common/include/NintendontVersion.h"
-
-#include "ff_utf8.h"
-#include "unzip/miniunz.h"
-#include "unzip/ioapi.h"
-
-extern char launch_dir[MAXPATHLEN];
-
-typedef struct {
-	const char url[96];
+#include <unistd.h>
+#include <malloc.h>
+#include <network.h>
+
+#include <zlib.h>
+#include <ogc/lwp_watchdog.h>
+#include "ssl.h"
+#include "exi.h"
+#include "FPad.h"
+#include "font.h"
+#include "global.h"
+#include "http.h"
+#include "menu.h"
+#include "update.h"
+#include "ff_utf8.h"
+#include "unzip/miniunz.h"
+#include "unzip/ioapi.h"
+#include "../../common/include/NintendontVersion.h"
+
+extern char launch_dir[MAXPATHLEN];
+extern void changeToDefaultDrive();
+extern int ExitBoot;
+bool prev;
+
+typedef struct {
+	const char url[96];
 	const char text[30];
 	const char filename[30];
 	const u32 max_size;
 } downloads_t;
+
+typedef enum {
+	DOWNLOAD_NINTENDONT = 0,
+	DOWNLOAD_OTHER,
+	DOWNLOAD_BIOS,
+	DOWNLOAD_GAME,		
+	DOWNLOAD_LOADERTHEME,
+	DOWNLOAD_LEGACYTHEME,		
+	DOWNLOAD_APPTHEME,
+	DOWNLOAD_GRAD,
+	DOWNLOAD_SIMPLE,
+	DOWNLOAD_SINGLE,
+	DOWNLOAD_BLACK,		
+	DOWNLOAD_OLD,
+	DOWNLOAD_NOOLD,
+	DOWNLOAD_DEFAULTTHEME,
+	DOWNLOAD_VERSION
+} DOWNLOADS;
+
+static const downloads_t Downloads[] = {
+	{"http://send0r.de/Nintendont/MasterMod/boot.zip", "Updating Nintendont", "boot.zip", 0x400000}, // 4MB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB	
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB	
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"http://send0r.de/Nintendont/MasterMod/NinBlack.zip", "Downloading Black Boot Screen", "", 0x8000}, // 32KB
+	{"http://send0r.de/Nintendont/MasterMod/Preview.zip", "Downloading Preview Pack", "Preview.zip", 0x400000}, // 4MB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400}, // 1KB
+	{"https://dl.dropboxusercontent.com/u/101209384/NintendontVersion.h", "Checking Latest Version", "", 0x400} // 1KB
+};
 
-typedef enum {
-	DOWNLOAD_NINTENDONT = 0,
-	DOWNLOAD_TITLES,
-	DOWNLOAD_CONTROLLERS,
-	DOWNLOAD_VERSION
-} DOWNLOADS;
-
-static const downloads_t Downloads[] = {
-	{"https://raw.githubusercontent.com/FIX94/Nintendont/master/loader/loader.dol", "Updating Nintendont", "boot.dol", 0x400000}, // 4MB
-	{"https://raw.githubusercontent.com/FIX94/Nintendont/master/nintendont/titles.txt", "Updating titles.txt", "titles.txt", 0x80000}, // 512KB
-	{"https://raw.githubusercontent.com/FIX94/Nintendont/master/controllerconfigs/controllers.zip", "Updating controllers.zip", "controllers.zip", 0x8000}, // 32KB
-	{"https://raw.githubusercontent.com/FIX94/Nintendont/master/common/include/NintendontVersion.h", "Checking Latest Version", "", 0x400} // 1KB
-};
-
-extern void changeToDefaultDrive();
-static int UnzipControllers(const void *buf, size_t fSize) {
-	char filepath[20];
-	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
-	static const char *unzip_directory = "/controllers";
-	unzFile uf = unzOpen(filepath);
-	if (!uf) {
-		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_CONTROLLERS].filename);
-		return -1;
-	}
-	gprintf("%s opened\n", Downloads[DOWNLOAD_CONTROLLERS].filename);
-	f_chdrive_char(UseSD ? "sd:" : "usb:");
-	f_mkdir_char(unzip_directory); // attempt to make dir
-	if (f_chdir_char(unzip_directory) != FR_OK) {
-		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
-		return -2;
-	}
-
-	if (extractZip(uf, 0, 1, 0)) {
-		gprintf("Failed to extract %s\r\n", filepath);
-		return -3;
-	}
-
-	unzCloseCurrentFile(uf);
-	unzClose(uf);
-	remove(Downloads[DOWNLOAD_CONTROLLERS].filename);
-	changeToDefaultDrive();
-	return 1;
+static int UnzipNintendont(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_NINTENDONT].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_NINTENDONT].filename);
+	//changeToDefaultDrive();
+	f_mkdir_char(unzip_directory); // attempt to make dir
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_NINTENDONT].filename);
+	changeToDefaultDrive();
+	return 1;
 }
-
-static inline bool LatestVersion(int *major, int *minor, int *current_line) {
-	u32 http_status = 0;
-	u8* outbuf = NULL;
-	u32 filesize;
-	int line = *current_line;
-
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[DOWNLOAD_VERSION].text);
-	UpdateScreen();
-	line++;
-	if(!http_request(Downloads[DOWNLOAD_VERSION].url, Downloads[DOWNLOAD_VERSION].max_size)) {
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Failed to retrieve version");
-		UpdateScreen();
-		*current_line = line;
-		return false;
-	}
-	
-
-	http_get_result(&http_status, &outbuf, &filesize);
-	
+
+static int UnzipBlack(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_BLACK].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_BLACK].filename);
+	changeToDefaultDrive();
+	f_mkdir_char(unzip_directory); // attempt to make dir
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_BLACK].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static int UnzipPreview(const void *buf, size_t fSize) {
+	char filepath[20];
+	snprintf(filepath,20,"%x+%x",(u32)buf,(u32)fSize);
+	static const char *unzip_directory = "/apps/Nintendont";
+	unzFile uf = unzOpen(filepath);
+	if (!uf) {
+		gprintf("Cannot open %s, aborting\r\n", Downloads[DOWNLOAD_OLD].filename);
+		return -1;
+	}
+	gprintf("%s opened\n", Downloads[DOWNLOAD_OLD].filename);
+	changeToDefaultDrive();
+	f_mkdir_char(unzip_directory); // attempt to make dir
+	if(f_chdir_char(unzip_directory) != FR_OK) {
+		gprintf("Error changing into %s, aborting\r\n", unzip_directory);
+		return -2;
+	}
+
+	if (extractZip(uf,0,1,0)) {
+		gprintf("Failed to extract %s\r\n", filepath);
+		return -3;
+	}
+
+	unzCloseCurrentFile(uf);
+	f_unlink_char(Downloads[DOWNLOAD_OLD].filename);
+	changeToDefaultDrive();
+	return 1;
+}
+
+static inline bool LatestVersion(int *major, int *minor, int *current_line) {
+	u32 http_status = 0;
+	u8* outbuf = NULL;
+	u32 filesize;
+	int line = *current_line;
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[DOWNLOAD_VERSION].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[DOWNLOAD_VERSION].text);}
+	UpdateScreen();
+	line++;
+	if(!http_request(Downloads[DOWNLOAD_VERSION].url, Downloads[DOWNLOAD_VERSION].max_size)) {
+				//		if (which_bg == BG_NONE)
+				//	{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Failed to retrieve version");}
+				//	else if (which_bg == BG_LEGACY)
+				//	{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Failed to retrieve version");}
+		UpdateScreen();
+		*current_line = line;
+		return true; //false;
+	}
+
+	http_get_result(&http_status, &outbuf, &filesize);
+	
 	if (((int)*outbuf & 0xF0000000) == 0xF0000000) 
 	{
 		if (outbuf != NULL) free(outbuf);
-		*current_line = line;
-		return false;
-	}
-	sscanf((char*)outbuf, " #ifndef %*s #define %*s #define NIN_MAJOR_VERSION %i #define NIN_MINOR_VERSION %i", major, minor);
-	gprintf("major = %i, minor = %i\r\n", *major, *minor);
-	if (outbuf != NULL) free(outbuf);
-	if ((*major <= NIN_MAJOR_VERSION) && (*minor <= NIN_MINOR_VERSION)) {
-		bool still_download = true;
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "You already have the latest version");
-		line++;
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download anyway? (A: Yes, B: No)");
-		line++;
-		UpdateScreen();
-		while(true) {
+		*current_line = line;
+		return false;
+	}
+//	sscanf((char*)outbuf, " #ifndef %*s #define %*s #define NIN_MAJOR_VERSION %i #define NIN_MINOR_VERSION %i", major, minor);
+//	gprintf("major = %i, minor = %i\r\n", *major, *minor);
+	*major=3;
+	*minor=999;
+	if (outbuf != NULL) free(outbuf);
+	/*if ((*major <= NIN_MAJOR_VERSION) && (*minor <= NIN_MINOR_VERSION)) {
+		bool still_download = true;
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "You already have the latest version");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "You already have the latest version");}
+		line++;
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download anyway? (A: Yes, B: No)");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Download anyway? (A: Yes, B: No)");}
+		line++;
+		UpdateScreen();
+		while(true) {
 			DrawBuffer();
 			FPAD_Update();
 			if (FPAD_Cancel(0)) {
@@ -146,13 +236,13 @@
 			GRRLIB_Render();
 		}
 		if(!still_download) {
-			*current_line = line;
-			return false;
-		}
-	}
-	*current_line = line;
-	return (*major + *minor) > 0;
-
+			*current_line = line;
+			return false;
+		}
+	} */
+	*current_line = line;
+	return (*major + *minor) > 0;
+
 }
 
 static s32 Download(DOWNLOADS download_number)  {
@@ -162,48 +252,58 @@
 	int ret, major = 0, minor = 0;
 	u32 http_status = 0;
 	u8* outbuf = NULL;
-	u32 filesize;
-	char filepath[MAXPATHLEN];
-	bool dir_argument_exists = strlen(launch_dir);
-
-	snprintf(filepath, sizeof(filepath), "%s%s",
-		dir_argument_exists ? launch_dir : "/apps/Nintendont/",
-		Downloads[download_number].filename);
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);
-	UpdateScreen();
-
-	// TODO: Use ioapi mem and skip writing the ZIP file to disk.
-	line++;
-	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
-	ret = net_init();
-	if (ret < 0) {
-		gprintf("Failed to init network\r\n");
-		goto end;
-	}
-	gprintf("Network Initialized\r\n");
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");
-	UpdateScreen();
-	ssl_init(); //only once needed
-	line++;
-	if (download_number == DOWNLOAD_NINTENDONT) {
-		ret = LatestVersion(&major, &minor, &line);
-		if (!ret) {
-			PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download Cancelled");
-			UpdateScreen();
-			if (outbuf != NULL) free(outbuf);
-			net_deinit();
-			sleep(4);
-			return 0;
-		}
-
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading Nintendont v%i.%i", major, minor);
-		UpdateScreen();
-		line++;
-	}
-
-	int i;
-	for (i = 0; i <= 10; i++) {
-		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
+	u32 filesize;
+	char filepath[MAXPATHLEN];
+	bool dir_argument_exists = strlen(launch_dir);
+	if (download_number == 0)
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "/apps/Nintendont/", Downloads[download_number].filename);
+	else
+	snprintf(filepath, sizeof(filepath), "%s%s", dir_argument_exists ? launch_dir : "./", Downloads[download_number].filename);
+	
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, Downloads[download_number].text);}
+	UpdateScreen();
+	
+	line++;
+	gprintf("Downloading %s to %s\r\n", Downloads[download_number].url, filepath);
+	ret = net_init();
+	if(ret < 0) {
+		gprintf("Failed to init network\r\n");
+		goto end;
+	}
+	gprintf("Network Initialized\r\n");
+									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Network Initialized");}
+	UpdateScreen();
+	ssl_init(); //only once needed
+	line++;
+	if (download_number == DOWNLOAD_NINTENDONT) {
+		ret = LatestVersion(&major, &minor, &line);
+		if (!ret) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Download Cancelled");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*(line+1), "Download Cancelled");}
+			UpdateScreen();
+			if (outbuf != NULL) free(outbuf);
+			net_deinit();
+			sleep(4);
+			return 0;
+		}
+								if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading MasterMod");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Downloading MasterMod");}
+		UpdateScreen();
+		line++;
+	}
+	int i;
+	for (i = 0; i <= 10; i++) {
+		ret = http_request(Downloads[download_number].url, Downloads[download_number].max_size);
 		if (ret) break;
 		if (i == 10) {
 			gprintf("Error making http request\r\n");
@@ -210,97 +310,236 @@
 			ret = -1;
 			goto end;
 		}
-	}
-
-	ret = http_get_result(&http_status, &outbuf, &filesize); 
-	if (((int)*outbuf & 0xF0000000) == 0xF0000000) {
-		ret = -2;
-		goto end;
-	}
-
-	PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download Complete");
-	UpdateScreen();
-	line++;
-	if (!dir_argument_exists) {
+	}
+
+	ret = http_get_result(&http_status, &outbuf, &filesize); 
+	if(((int)*outbuf & 0xF0000000) == 0xF0000000) 
+	{
+		ret = -2;
+		goto end;
+	}
+									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Download Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Download Complete");}
+	UpdateScreen();
+	line++;
+	if (!dir_argument_exists) {
 		gprintf("Creating new directory\r\n");
 		f_mkdir_char("/apps");
-		f_mkdir_char("/apps/Nintendont");
-	}
-
-	// Write the file to disk.
-	if (download_number == DOWNLOAD_CONTROLLERS) {
-		// controllers.zip needs to be decompressed.
-		ret = UnzipControllers(outbuf, filesize);
-	}
-	else
-	{
-		FIL file;
-		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
+		f_mkdir_char("/apps/Nintendont");
+	}
+	 if (download_number == DOWNLOAD_NINTENDONT) {ret = UnzipNintendont(outbuf, filesize);}
+else if (download_number == DOWNLOAD_BLACK) {ret = UnzipBlack(outbuf, filesize);}
+else if (download_number == DOWNLOAD_OLD) {
+		changeToDefaultDrive();
+		f_chdir_char("/");
+		f_mkdir_char("/apps");
+		f_mkdir_char("/apps/Nintendont");
+		f_rename_char( "/apps/Nintendont/Previewz", "/apps/Nintendont/Preview");
+		f_mkdir_char("/apps/Nintendont/Preview");
+		f_mkdir_char("/apps/Nintendont/Preview/bios");
+		f_mkdir_char("/apps/Nintendont/Preview/black");
+		f_mkdir_char("/apps/Nintendont/Preview/dark");
+		f_mkdir_char("/apps/Nintendont/Preview/game");
+		f_mkdir_char("/apps/Nintendont/Preview/grad");
+		f_mkdir_char("/apps/Nintendont/Preview/light");
+		f_mkdir_char("/apps/Nintendont/Preview/loader");
+		f_mkdir_char("/apps/Nintendont/Preview/single");
+		ret = UnzipPreview(outbuf, filesize);
+	}
+else
+	{
+		FIL file;
+		if (f_open_char(&file, filepath, FA_WRITE|FA_CREATE_ALWAYS) != FR_OK) {
 			gprintf("File Error\r\n");
 			ret = -3;
 			goto end;
 		} else {
-			UINT wrote;
-			f_write(&file, outbuf, filesize, &wrote);
-			f_close(&file);
-			ret = 1;
-		}
-	}
-	if (ret == 1) {
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");
-		UpdateScreen();
-		line++;
-	}
-
-end:
-	if (ret != 1)
-		PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*line, "Update Error: %i", ret);
-	else
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");
-	UpdateScreen();
-	if (outbuf != NULL) free(outbuf);
-	net_deinit();
-	sleep(4);
-	return ret;
-}
-
+			UINT wrote;
+			f_write(&file, outbuf, filesize, &wrote);
+			f_close(&file);
+			ret = 1;			
+		}
+	}
+	if (ret == 1) {
+										if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Update Complete");}
+		UpdateScreen();
+		line++;
+	}
+end:
+	if (ret != 1)
+		{
+			if (which_bg == BG_NONE)
+			PrintFormat(DEFAULT_SIZE, MAROON, MENU_POS_X, MENU_POS_Y + 20*line, "Update Error: %i", ret);
+			else if (which_bg == BG_LEGACY)
+			PrintFormat(DEFAULT_SIZE, YELLOW, MENU_POS_X, MENU_POS_Y + 20*line, "Update Error: %i", ret);
+		}
+	else if (download_number == DOWNLOAD_NINTENDONT)
+	{									if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*line, "Restart Nintendont to complete update");}}
+	else {}	
+	UpdateScreen();
+	if (outbuf != NULL) free(outbuf);
+	net_deinit();
+	sleep(3);
+	return ret;
+}
+
 void UpdateNintendont(void) {
 	int selected = 0;
-	u64 delay = ticks_to_millisecs(gettime()) + 500;
-	while(true) {
-		ClearScreen();
-		PrintInfo();
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download titles.txt");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download controllers.zip");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Return to Settings");
-		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(5+selected), ARROW_RIGHT);
-		GRRLIB_Render();
-		FPAD_Update();
-		if (delay > ticks_to_millisecs(gettime())) continue;
-		if (FPAD_Start(1)) {
-			ShowMessageScreenAndExit("Returning to loader...", 0);
-		}
-		if (FPAD_OK(1)) {
-			if (selected <= DOWNLOAD_CONTROLLERS)
-				Download(selected);
-			else
-				break;
-		}
-		if (FPAD_Down(1)) {
-			delay = ticks_to_millisecs(gettime()) + 150;
-			selected++;
-			if (selected > 3) selected = 0;
-		}
-		if (FPAD_Up(1)) {
-			delay = ticks_to_millisecs(gettime()) + 150;
-			selected--;
-			if (selected < 0) selected = 3;
-		}
-		if (FPAD_Cancel(1)) {
-			break;
-		}
-	}
-	ClearScreen();
-	return;
-}
+	u64 delay = ticks_to_millisecs(gettime()) + 500;
+	while(true) {
+		ClearScreen();
+		if (f_chdir_char("/apps/Nintendont/Preview") == FR_OK)
+		prev = true;
+		else 
+		prev = false;
+		if (which_bg == BG_NONE)
+					{		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");		
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X, MENU_POS_Y + 20*2, "Updates & Themes Menu");
+		PrintFormat(15, BLACK, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");		
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Nintendont MasterMod (Latest Revision)");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont (Official & Other Mods)");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Extras (Titles, Controllers & Bios)");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download/Delete Custom Game Loader Themes");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Nintendont Loader Themes");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Nintendont Dark Themes");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Nintendont Light Themes");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Nintendont Gradient Themes");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Nintendont Black Themes");								
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Nintendont Unicolor Themes");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Use Black Screen on Game Boot");			
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Mastermod Preview Pack");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Mastermod Preview Pack: %s", prev ? "Enabled" : "Disabled");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Restore Default Theme");	
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Exit Updates & Themes Menu");
+		PrintFormat(DEFAULT_SIZE, BLACK, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+					else if (which_bg == BG_LEGACY)
+					{		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y, "  Home: Exit");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*1, "  A   : Select");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 430, MENU_POS_Y + 20*2, "  B   : Back");		
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X, MENU_POS_Y + 20*2, "Updates & Themes Menu");
+		PrintFormat(15, WHITE, MENU_POS_X + 235, MENU_POS_Y + 20*21, "Y/2: Credits");		
+		PrintInfo();
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*4, "Download Nintendont MasterMod (Latest Revision)");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*5, "Download Nintendont (Official & Other Mods)");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*6, "Download Extras (Titles, Controllers & Bios)");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*7, "Download/Delete Custom Game Loader Themes");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*8, "Download Nintendont Loader Themes");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*9, "Download Nintendont Dark Themes");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*10, "Download Nintendont Light Themes");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*11, "Download Nintendont Gradient Themes");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*12, "Download Nintendont Black Themes");								
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*13, "Download Nintendont Unicolor Themes");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*14, "Use Black Screen on Game Boot");			
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*15, "Download Mastermod Preview Pack");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*16, "Mastermod Preview Pack: %s", prev ? "Enabled" : "Disabled");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*17, "Restore Default Theme");	
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 50, MENU_POS_Y + 20*18, "Exit Updates & Themes Menu");
+		PrintFormat(DEFAULT_SIZE, WHITE, MENU_POS_X + 35, MENU_POS_Y + 20*(4+selected), ARROW_RIGHT);}
+
+		GRRLIB_Render();
+		FPAD_Update();
+		if (delay > ticks_to_millisecs(gettime())) continue;
+		if (FPAD_Start(1)) {
+			ClearScreen();
+					if (which_bg == BG_NONE)
+					{PrintFormat(DEFAULT_SIZE, BLACK, 212, 232, "Returning to loader...");}
+					else if (which_bg == BG_LEGACY)
+					{PrintFormat(DEFAULT_SIZE, WHITE, 212, 232, "Returning to loader...");}
+			ExitToLoader(0);
+		}
+		if (FPAD_OK(1)) {
+			f_chdir_char("/apps/Nintendont");
+			if (selected == (DOWNLOAD_APPTHEME))
+				UpdateThemes();
+			if (selected == (DOWNLOAD_LOADERTHEME))
+				UpdateLoader();	
+			if (selected == (DOWNLOAD_LEGACYTHEME))
+				UpdateLegacy();	
+			if (selected == (DOWNLOAD_DEFAULTTHEME))
+				{f_unlink_char("./NinBackLight.png");
+				f_unlink_char("./NinBackDark.png");
+				f_unlink_char("./NinBackBars.png");
+				f_unlink_char("./NinBackNoBar.png");
+				f_unlink_char("./NinLegacy.png");				
+				f_unlink_char("./NinBack.png");
+				f_unlink_char("./NinBlack.png");
+				background = GRRLIB_LoadTexturePNG(background_png);
+				which_bg = BG_NONE;
+				UpdateNintendont();}	
+			if (selected == (DOWNLOAD_BIOS))
+				UpdateBios();
+			if (selected == (DOWNLOAD_OTHER))
+				UpdateOther();	
+			if (selected == (DOWNLOAD_SIMPLE))
+				SimpleBack();	
+			if (selected == (DOWNLOAD_SINGLE))
+				SingleBack();
+			if (selected == (DOWNLOAD_GRAD))
+				UpdateGrad();
+			if (selected == (DOWNLOAD_GAME))
+				GDMenu();
+			if (selected == (DOWNLOAD_BLACK))
+			{f_chdir_char("/apps/Nintendont");
+			f_unlink_char("./NinBackLight.png");
+			f_unlink_char("./NinBackDark.png");
+			f_unlink_char("./NinBackBars.png");
+			f_unlink_char("./NinBackNoBar.png");
+			f_unlink_char("./NinBlack.png");
+			Download(selected);
+			ClearScreen();		
+			if (which_bg == BG_NONE)
+			{
+			PrintFormat(25, BLACK, MENU_POS_X, MENU_POS_Y + 20*9, "Games Will Boot into a Black Screen Now");
+			PrintFormat(25, BLACK, MENU_POS_X, MENU_POS_Y + 20*11, "All Boot Messages & Info Will Be Hidden");
+			}
+			else if (which_bg == BG_LEGACY)
+			{
+			PrintFormat(25, WHITE, MENU_POS_X, MENU_POS_Y + 20*9, "Games Will Boot into a Black Screen Now");
+			PrintFormat(25, WHITE, MENU_POS_X, MENU_POS_Y + 20*11, "All Boot Messages & Info Will Be Hidden");
+			}
+			UpdateScreen();
+			sleep (5);
+			UpdateNintendont();}	
+			if (selected == (DOWNLOAD_VERSION))
+			{ExitBoot = 1;
+			return;}
+			if ((selected == (DOWNLOAD_OLD)) || (selected == (DOWNLOAD_NINTENDONT)))
+			{Download(selected);}
+			if (selected == (DOWNLOAD_NOOLD)){
+			if (prev == true)
+			f_rename_char( "/apps/Nintendont/Preview", "/apps/Nintendont/Previewz");
+			else
+			f_rename_char( "/apps/Nintendont/Previewz", "/apps/Nintendont/Preview");}		
+			else
+				break;}
+		if (FPAD_Down(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected++;
+			if (selected > 14) selected = 0;
+		}
+		if (FPAD_Up(1)) {
+			delay = ticks_to_millisecs(gettime()) + 150;
+			selected--;
+			if (selected < 0) selected = 14;
+		}
+		if(FPAD_Y(0)) {
+				Credits();
+		}
+		if (FPAD_Cancel(1)) 
+		{ExitBoot = 1;
+		break;}
+	}
+	ClearScreen();
+	return;
+}
\ No newline at end of file
 