From 1f83078b5f1b00beff173510838b64be5b0434fa Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 17:36:02 -0700 Subject: [PATCH 1/9] add some new game inis --- Data/User/GameConfig/G3LE8P.ini | 15 +++++++++++++++ Data/User/GameConfig/GP8EAF.ini | 15 +++++++++++++++ Data/User/GameConfig/JAEE01.ini | 9 +++++++++ Data/User/GameConfig/JBKP01.ini | 15 +++++++++++++++ Data/User/GameConfig/R8XE52.ini | 15 +++++++++++++++ Data/User/GameConfig/R9IE01.ini | 15 +++++++++++++++ Data/User/GameConfig/RBME5G.ini | 15 +++++++++++++++ Data/User/GameConfig/RGHE52.ini | 16 ++++++++++++++++ Data/User/GameConfig/RLBEWR.ini | 15 +++++++++++++++ Data/User/GameConfig/RS8J8N.ini | 15 +++++++++++++++ Data/User/GameConfig/SDFE4Q.ini | 15 +++++++++++++++ Data/User/GameConfig/SS3EWR.ini | 15 +++++++++++++++ Data/User/GameConfig/STEETR.ini | 15 +++++++++++++++ Data/User/GameConfig/WBME01.ini | 15 +++++++++++++++ Data/User/GameConfig/WPPJJF.ini | 15 +++++++++++++++ 15 files changed, 220 insertions(+) create mode 100644 Data/User/GameConfig/G3LE8P.ini create mode 100644 Data/User/GameConfig/GP8EAF.ini create mode 100644 Data/User/GameConfig/JAEE01.ini create mode 100644 Data/User/GameConfig/JBKP01.ini create mode 100644 Data/User/GameConfig/R8XE52.ini create mode 100644 Data/User/GameConfig/R9IE01.ini create mode 100644 Data/User/GameConfig/RBME5G.ini create mode 100644 Data/User/GameConfig/RGHE52.ini create mode 100644 Data/User/GameConfig/RLBEWR.ini create mode 100644 Data/User/GameConfig/RS8J8N.ini create mode 100644 Data/User/GameConfig/SDFE4Q.ini create mode 100644 Data/User/GameConfig/SS3EWR.ini create mode 100644 Data/User/GameConfig/STEETR.ini create mode 100644 Data/User/GameConfig/WBME01.ini create mode 100644 Data/User/GameConfig/WPPJJF.ini diff --git a/Data/User/GameConfig/G3LE8P.ini b/Data/User/GameConfig/G3LE8P.ini new file mode 100644 index 0000000000..88222a8531 --- /dev/null +++ b/Data/User/GameConfig/G3LE8P.ini @@ -0,0 +1,15 @@ +# G3LE8P - Super Monkey Ball Adventures (TM) +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/GP8EAF.ini b/Data/User/GameConfig/GP8EAF.ini new file mode 100644 index 0000000000..3a93ca340c --- /dev/null +++ b/Data/User/GameConfig/GP8EAF.ini @@ -0,0 +1,15 @@ +# GP8EAF - Pac-Man World 3 +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/JAEE01.ini b/Data/User/GameConfig/JAEE01.ini new file mode 100644 index 0000000000..136ba5f4b8 --- /dev/null +++ b/Data/User/GameConfig/JAEE01.ini @@ -0,0 +1,9 @@ +# JAEE01 - Donkey Kong Country +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +[Gecko] diff --git a/Data/User/GameConfig/JBKP01.ini b/Data/User/GameConfig/JBKP01.ini new file mode 100644 index 0000000000..28a848d52d --- /dev/null +++ b/Data/User/GameConfig/JBKP01.ini @@ -0,0 +1,15 @@ +# JBKP01 - +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/R8XE52.ini b/Data/User/GameConfig/R8XE52.ini new file mode 100644 index 0000000000..d5bddaa3fb --- /dev/null +++ b/Data/User/GameConfig/R8XE52.ini @@ -0,0 +1,15 @@ +# R8XE52 - Jurassic: The Hunted +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/R9IE01.ini b/Data/User/GameConfig/R9IE01.ini new file mode 100644 index 0000000000..c35e5b3d74 --- /dev/null +++ b/Data/User/GameConfig/R9IE01.ini @@ -0,0 +1,15 @@ +# R9IE01 - PIKMIN1 for Wii +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/RBME5G.ini b/Data/User/GameConfig/RBME5G.ini new file mode 100644 index 0000000000..d19e1189ba --- /dev/null +++ b/Data/User/GameConfig/RBME5G.ini @@ -0,0 +1,15 @@ +# RBME5G - Bust-a-Move BASH! +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/RGHE52.ini b/Data/User/GameConfig/RGHE52.ini new file mode 100644 index 0000000000..19739a552b --- /dev/null +++ b/Data/User/GameConfig/RGHE52.ini @@ -0,0 +1,16 @@ +# RGHE52 - Sample Game Name +[Core] Values set here will override the main dolphin settings. +FastDiscSpeed = 0 +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/RLBEWR.ini b/Data/User/GameConfig/RLBEWR.ini new file mode 100644 index 0000000000..b935a961b3 --- /dev/null +++ b/Data/User/GameConfig/RLBEWR.ini @@ -0,0 +1,15 @@ +# RLBEWR - LEGO Batman +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/RS8J8N.ini b/Data/User/GameConfig/RS8J8N.ini new file mode 100644 index 0000000000..156babedd9 --- /dev/null +++ b/Data/User/GameConfig/RS8J8N.ini @@ -0,0 +1,15 @@ +# RS8J8N - SHANGHAI +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/SDFE4Q.ini b/Data/User/GameConfig/SDFE4Q.ini new file mode 100644 index 0000000000..70292b9974 --- /dev/null +++ b/Data/User/GameConfig/SDFE4Q.ini @@ -0,0 +1,15 @@ +# SDFE4Q - Disney Sing It: Family Hits +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/SS3EWR.ini b/Data/User/GameConfig/SS3EWR.ini new file mode 100644 index 0000000000..185bc0b34d --- /dev/null +++ b/Data/User/GameConfig/SS3EWR.ini @@ -0,0 +1,15 @@ +# SS3EWR - Elmo's A to Zoo Adventure +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 5 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/STEETR.ini b/Data/User/GameConfig/STEETR.ini new file mode 100644 index 0000000000..e83497c5d9 --- /dev/null +++ b/Data/User/GameConfig/STEETR.ini @@ -0,0 +1,15 @@ +# STEETR - Tetris Party Deluxe +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/WBME01.ini b/Data/User/GameConfig/WBME01.ini new file mode 100644 index 0000000000..770a1b6b9e --- /dev/null +++ b/Data/User/GameConfig/WBME01.ini @@ -0,0 +1,15 @@ +# WBME01 - My Pokémon Ranch +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] diff --git a/Data/User/GameConfig/WPPJJF.ini b/Data/User/GameConfig/WPPJJF.ini new file mode 100644 index 0000000000..4ecb121356 --- /dev/null +++ b/Data/User/GameConfig/WPPJJF.ini @@ -0,0 +1,15 @@ +# WPPJJF - JM‰OÔóÝóWii +[Core] Values set here will override the main dolphin settings. +[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set. +EmulationStateId = 0 +EmulationIssues = +[OnFrame] Add memory patches to be applied every frame here. +[ActionReplay] Add action replay cheats here. +[Video] +ProjectionHack = 0 +PH_SZNear = 0 +PH_SZFar = 0 +PH_ExtraParam = 0 +PH_ZNear = +PH_ZFar = +[Gecko] From 3fb42f6bb618aa70c5879806885d838e920611cf Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 18:20:22 -0700 Subject: [PATCH 2/9] split adding the ticket to its own function (installing a wad) --- Source/Core/DiscIO/Src/NANDContentLoader.cpp | 28 ++++++++++++-------- Source/Core/DiscIO/Src/NANDContentLoader.h | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp index c8e409636b..3e799ffd8b 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp @@ -536,20 +536,14 @@ u64 CNANDContentManager::Install_WiiWAD(std::string &fileName) pTMDFile.Close(); + + + //Extract and copy WAD's ticket to ticket directory - std::string TicketFileName = Common::GetTicketFileName(TitleID); - - File::CreateFullPath(TicketFileName); - File::IOFile pTicketFile(TicketFileName, "wb"); - if (!pTicketFile) + if (!Add_Ticket(TitleID, ContentLoader.GetTIK(), ContentLoader.GetTIKSize())) { - PanicAlertT("WAD installation failed: error creating %s", TicketFileName.c_str()); + PanicAlertT("WAD installation failed: error creating ticket"); return 0; - } - - if (ContentLoader.GetTIK()) - { - pTicketFile.WriteBytes(ContentLoader.GetTIK(), ContentLoader.GetTIKSize()); } cUIDsys::AccessInstance().AddTitle(TitleID); @@ -558,6 +552,18 @@ u64 CNANDContentManager::Install_WiiWAD(std::string &fileName) return TitleID; } +bool Add_Ticket(u64 TitleID, const u8 *p_tik, u32 tikSize) +{ + std::string TicketFileName = Common::GetTicketFileName(TitleID); + File::CreateFullPath(TicketFileName); + File::IOFile pTicketFile(TicketFileName, "wb"); + if (!pTicketFile || !p_tik) + { + //PanicAlertT("WAD installation failed: error creating %s", TicketFileName.c_str()); + return false; + } + return pTicketFile.WriteBytes(p_tik, tikSize); +} } // namespace end diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.h b/Source/Core/DiscIO/Src/NANDContentLoader.h index 14a2062641..63135df693 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.h +++ b/Source/Core/DiscIO/Src/NANDContentLoader.h @@ -29,7 +29,7 @@ namespace DiscIO { - + bool Add_Ticket(u64 TitleID, const u8 *p_tik, u32 tikSize); struct SNANDContent { u32 m_ContentID; From 303d1b83eb09472a3f9a635d8c3b794a6c9b0286 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 18:25:01 -0700 Subject: [PATCH 3/9] minor cleanup to /dev/es, fix for grabbing titleid from the disc, and es_gettitledir --- .../Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp index 83c7544734..2a33d01ed9 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -93,7 +93,7 @@ bool CWII_IPC_HLE_Device_es::Open(u32 _CommandAddress, u32 _Mode) { // blindly grab the titleID from the disc - it's unencrypted at: // offset 0x0F8001DC and 0x0F80044C - VolumeHandler::RAWReadToPtr((u8*)&m_TitleID, (u64)0x0F8001DC, 8); + VolumeHandler::GetVolume()->GetTitleID((u8*)&m_TitleID); m_TitleID = Common::swap64(m_TitleID); } else @@ -177,11 +177,11 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address); - const DiscIO::INANDContentLoader& rNANDCOntent = AccessContentDevice(TitleID); + const DiscIO::INANDContentLoader& rNANDContent = AccessContentDevice(TitleID); u16 NumberOfPrivateContent = 0; - if (rNANDCOntent.IsValid()) // Not sure if dolphin will ever fail this check + if (rNANDContent.IsValid()) // Not sure if dolphin will ever fail this check { - NumberOfPrivateContent = rNANDCOntent.GetNumEntries(); + NumberOfPrivateContent = rNANDContent.GetNumEntries(); if ((u32)(TitleID>>32) == 0x00010000) Memory::Write_U32(0, Buffer.PayloadBuffer[0].m_Address); @@ -191,10 +191,10 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) Memory::Write_U32(0, _CommandAddress + 0x4); } else - Memory::Write_U32((u32)rNANDCOntent.GetContentSize(), _CommandAddress + 0x4); + Memory::Write_U32((u32)rNANDContent.GetContentSize(), _CommandAddress + 0x4); INFO_LOG(WII_IPC_ES, "IOCTL_ES_GETTITLECONTENTSCNT: TitleID: %08x/%08x content count %i", - (u32)(TitleID>>32), (u32)TitleID, rNANDCOntent.IsValid() ? NumberOfPrivateContent : (u32)rNANDCOntent.GetContentSize()); + (u32)(TitleID>>32), (u32)TitleID, rNANDContent.IsValid() ? NumberOfPrivateContent : (u32)rNANDContent.GetContentSize()); return true; } @@ -371,7 +371,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address); char* Path = (char*)Memory::GetPointer(Buffer.PayloadBuffer[0].m_Address); - sprintf(Path, "/%08x/%08x/data", (u32)(TitleID >> 32), (u32)TitleID); + sprintf(Path, "/title/%08x/%08x/data", (u32)(TitleID >> 32), (u32)TitleID); INFO_LOG(WII_IPC_ES, "IOCTL_ES_GETTITLEDIR: %s", Path); } @@ -539,11 +539,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) const DiscIO::INANDContentLoader& Loader = AccessContentDevice(TitleID); - // Assert if title is not a disc title and the loader is not valid - _dbg_assert_msg_(WII_IPC_ES, ((u32)(TitleID >> 32) == 0x00010000) || - ((u32)(TitleID >> 32) == 0x00010004) || Loader.IsValid(), - "Loader not valid for TitleID %08x/%08x", (u32)(TitleID >> 32), (u32)TitleID); - u32 TMDViewCnt = 0; if (Loader.IsValid()) { @@ -675,7 +670,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) // TODO: actually use this param in when writing to the outbuffer :/ MaxCount = Memory::Read_U32(Buffer.InBuffer[1].m_Address); } - const DiscIO::INANDContentLoader& Loader = DiscIO::CNANDContentManager::Access().GetNANDLoader(TitleID); + const DiscIO::INANDContentLoader& Loader = AccessContentDevice(TitleID); INFO_LOG(WII_IPC_ES, "IOCTL_ES_GETSTOREDTMD: title: %08x/%08x buffersize: %i", (u32)(TitleID >> 32), (u32)TitleID, MaxCount); @@ -856,7 +851,7 @@ const DiscIO::INANDContentLoader& CWII_IPC_HLE_Device_es::AccessContentDevice(u6 m_NANDContent[_TitleID] = &DiscIO::CNANDContentManager::Access().GetNANDLoader(_TitleID); - _dbg_assert_msg_(WII_IPC_ES, m_NANDContent[_TitleID]->IsValid(), "NandContent not valid for TitleID %08x/%08x", (u32)(_TitleID >> 32), (u32)_TitleID); + _dbg_assert_msg_(WII_IPC_ES, ((u32)(_TitleID >> 32) == 0x00010000) || m_NANDContent[_TitleID]->IsValid(), "NandContent not valid for TitleID %08x/%08x", (u32)(_TitleID >> 32), (u32)_TitleID); return *m_NANDContent[_TitleID]; } @@ -878,11 +873,10 @@ u32 CWII_IPC_HLE_Device_es::ES_DIVerify(u8* _pTMD, u32 _sz) { return -1; } - std::string tmdPath = Common::GetTMDFileName(tmdTitleID), - dataPath = Common::GetTitleDataPath(tmdTitleID); + std::string tmdPath = Common::GetTMDFileName(tmdTitleID); File::CreateFullPath(tmdPath); - File::CreateFullPath(dataPath); + File::CreateFullPath(Common::GetTitleDataPath(tmdTitleID)); if(!File::Exists(tmdPath)) { File::IOFile _pTMDFile(tmdPath, "wb"); From 60594c079d2412e928aff6308cfce34cd6bec07d Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 18:27:48 -0700 Subject: [PATCH 4/9] allow just ejecting the disc by canceling the file dialog --- Source/Core/DolphinWX/Src/FrameTools.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 2ca28ce4dd..607c920906 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -678,11 +678,8 @@ void CFrame::DoOpen(bool Boot) File::SetCurrentDir(currentDir); } - if (path.IsEmpty()) - return; - // Should we boot a new game or just change the disc? - if (Boot) + if (Boot && !path.IsEmpty()) BootGame(std::string(path.mb_str())); else { From c3e46d5b454738e96d2d62ed783573fe701b5c0b Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 18:33:21 -0700 Subject: [PATCH 5/9] partial fix for issue 4742 --- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp index c02ada362f..126f3daeb4 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp @@ -211,7 +211,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 // Don't do anything if the log is unselected if (LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) { - const char *pFilename = m_pFileSystem->GetFileName(DVDAddress); + const char *pFilename = NULL; + if (m_pFileSystem) + pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) { INFO_LOG(WII_IPC_DVD, "DVDLowRead: %s (0x%llx) - (DVDAddr: 0x%llx, Size: 0x%x)", @@ -233,7 +235,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 if (!VolumeHandler::ReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size)) { - PanicAlertT("Cant read from DVD_Plugin - DVD-Interface: Fatal Error"); + PanicAlertT("DVDLowRead - Fatal Error: failed to read from volume"); } } break; @@ -325,10 +327,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 PanicAlertT("Detected attempt to read more data from the DVD than fit inside the out buffer. Clamp."); Size = _BufferOutSize; } - - if (!VolumeHandler::RAWReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size)) + if(!VolumeHandler::RAWReadToPtr(Memory::GetPointer(_BufferOut), DVDAddress, Size)) { - PanicAlertT("Cant read from DVD_Plugin - DVD-Interface: Fatal Error"); + PanicAlertT("DVDLowUnencryptedRead - Fatal Error: failed to read from volume"); } } break; @@ -348,7 +349,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 case DVDLowSeek: { u64 DVDAddress = Memory::Read_U32(_BufferIn + 0x4) << 2; - const char *pFilename = m_pFileSystem->GetFileName(DVDAddress); + const char *pFilename = NULL; + if (m_pFileSystem) + pFilename = m_pFileSystem->GetFileName(DVDAddress); if (pFilename != NULL) { INFO_LOG(WII_IPC_DVD, "DVDLowSeek: %s (0x%llx) - (DVDAddr: 0x%llx)", From 8e332948bff6355daaac33da013a05f8919ad084 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 21:09:18 -0700 Subject: [PATCH 6/9] less log noise from CNandContentLoader --- Source/Core/DiscIO/Src/NANDContentLoader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp index 3e799ffd8b..f010b7ed98 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp @@ -191,6 +191,8 @@ const SNANDContent* CNANDContentLoader::GetContentByIndex(int _Index) const bool CNANDContentLoader::Initialize(const std::string& _rName) { + if (_rName.empty()) + return false; m_Path = _rName; WiiWAD Wad(_rName); u8* pDataApp = NULL; @@ -221,7 +223,7 @@ bool CNANDContentLoader::Initialize(const std::string& _rName) File::IOFile pTMDFile(TMDFileName, "rb"); if (!pTMDFile) { - ERROR_LOG(DISCIO, "CreateFromDirectory: error opening %s", + DEBUG_LOG(DISCIO, "CreateFromDirectory: error opening %s", TMDFileName.c_str()); return false; } From a0d6d682434852068fca1f6411dd130ebca366bb Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 21 Aug 2011 21:10:58 -0700 Subject: [PATCH 7/9] sysconf SetArayData use the minimum of the buffersize or the dataLength --- Source/Core/Common/Src/SysConf.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/Src/SysConf.h b/Source/Core/Common/Src/SysConf.h index 119cc3c45a..fb9c775828 100644 --- a/Source/Core/Common/Src/SysConf.h +++ b/Source/Core/Common/Src/SysConf.h @@ -66,10 +66,9 @@ struct SSysConfEntry } bool SetArrayData(u8* buffer, u16 bufferSize) { - - if (buffer && bufferSize <= dataLength) + if (buffer) { - memcpy(data, buffer, bufferSize); + memcpy(data, buffer, min(bufferSize, dataLength)); return true; } return false; From a78c5f984feaac4fce6d77e9329ef3dbb17d3b22 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Tue, 31 Jan 2012 20:31:30 -0800 Subject: [PATCH 8/9] download codes for virtualconsole titles --- Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp index e9089c6006..dccc697942 100644 --- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp @@ -151,9 +151,18 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&) std::string gameid = m_gameid; - // WiiWare are identified by their first four characters - if (m_gameid[0] == 'W') + + switch (m_gameid[0]) + { + case 'R': + case 'S': + case 'G': + break; + default: + // All channels (WiiWare, VirtualConsole, etc) are identified by their first four characters gameid = m_gameid.substr(0, 4); + break; + } sf::Http::Request req; req.SetURI("/txt.php?txt=" + gameid); From d6de53f235a269c484f5f12f8adcc8ab9f62ef10 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Tue, 31 Jan 2012 23:49:47 -0800 Subject: [PATCH 9/9] convert name, notes and creator to wxstring using *wxConvCurrent instead of FromAscii. fix issue 5069 --- Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp index dccc697942..cffeb25e7f 100644 --- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp @@ -78,7 +78,7 @@ void CodeConfigPanel::UpdateCodeList() gcodes_end = m_gcodes.end(); for (; gcodes_iter!=gcodes_end; ++gcodes_iter) { - m_listbox_gcodes->Append(wxString::FromAscii(gcodes_iter->name.c_str())); + m_listbox_gcodes->Append(wxString(gcodes_iter->name.c_str(), *wxConvCurrent)); if (gcodes_iter->enabled) m_listbox_gcodes->Check(m_listbox_gcodes->GetCount()-1, true); } @@ -111,7 +111,7 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&) if (sel > -1) { - m_infobox.label_name->SetLabel(wxGetTranslation(wxstr_name) + wxString::FromAscii(m_gcodes[sel].name.c_str())); + m_infobox.label_name->SetLabel(wxGetTranslation(wxstr_name) + wxString(m_gcodes[sel].name.c_str(), *wxConvCurrent)); // notes textctrl m_infobox.textctrl_notes->Clear(); @@ -119,10 +119,10 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&) notes_iter = m_gcodes[sel].notes.begin(), notes_end = m_gcodes[sel].notes.end(); for (; notes_iter!=notes_end; ++notes_iter) - m_infobox.textctrl_notes->AppendText(wxString::FromAscii(notes_iter->c_str())); + m_infobox.textctrl_notes->AppendText(wxString(notes_iter->c_str(), *wxConvCurrent)); m_infobox.textctrl_notes->ScrollLines(-99); // silly - m_infobox.label_creator->SetLabel(wxGetTranslation(wxstr_creator) + wxString::FromAscii(m_gcodes[sel].creator.c_str())); + m_infobox.label_creator->SetLabel(wxGetTranslation(wxstr_creator) + wxString(m_gcodes[sel].creator.c_str(), *wxConvCurrent)); // add codes to info listbox std::vector::const_iterator