-tiny changes on port 1 usage and game boot

This commit is contained in:
fix94.1 2013-03-24 12:10:21 +00:00
parent 648d319925
commit ceb91ca17b
2 changed files with 5 additions and 29 deletions

View File

@ -24,38 +24,16 @@
#include "dip_plugin_249.h"
#include "mload_modules.h"
u8 use_port1 = 0;
static int load_ehc_module_ex(void)
{
u8 *ehc_cfg = search_for_ehcmodule_cfg((u8 *)ehcmodule_5, size_ehcmodule_5);
if(ehc_cfg)
{
ehc_cfg += 12;
ehc_cfg[0] = use_port1;
ehc_cfg[0] = currentPort;
gprintf("EHC Port info = %i\n", ehc_cfg[0]);
DCFlushRange((void *) (((u32)ehc_cfg[0]) & ~31), 32);
}
if(use_port1) // release port 0 and use port 1
{
u32 dat=0;
u32 addr;
// get EHCI base registers
mload_getw((void *) 0x0D040000, &addr);
addr&=0xff;
addr+=0x0D040000;
mload_getw((void *) (addr+0x44), &dat);
if((dat & 0x2001)==1)
mload_setw((void *) (addr+0x44), 0x2000);
mload_getw((void *) (addr+0x48), &dat);
if((dat & 0x2000)==0x2000)
mload_setw((void *) (addr+0x48), 0x1001);
}
load_ehc_module();
return 0;
}

View File

@ -628,23 +628,22 @@ void CMenu::_game(bool launch)
}
currentPartition = SD;
}
// Get banner_title
/* Get Banner Title for Playlog */
CurrentBanner.ClearBanner();
if(hdr->type == TYPE_CHANNEL)
_extractChannelBnr(chantitle);
else if(hdr->type == TYPE_WII_GAME)
_extractBnr(hdr);
if(CurrentBanner.IsValid())
{
_extractBannerTitle(GetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str()));
CurrentBanner.ClearBanner();
}
if(hdr->type != TYPE_HOMEBREW && hdr->type != TYPE_PLUGIN)
{
if(Playlog_Update(hdr->id, banner_title) < 0)
Playlog_Delete();
}
gprintf("Launching game %s\n", hdr->id);
CurrentBanner.ClearBanner();
/* Finally boot it */
_launch(hdr);
if(m_exit)
@ -799,7 +798,6 @@ void CMenu::_launchShutdown()
CoverFlow.clear();
_showWaitMessage();
exitHandler(PRIILOADER_DEF); //Making wiiflow ready to boot something
CurrentBanner.ClearBanner();
}
void CMenu::_launch(dir_discHdr *hdr)