summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/NANDContentLoader.cpp
diff options
context:
space:
mode:
authorfires.gc <fires.gc@gmail.com>2009-03-14 19:13:21 +0000
committerfires.gc <fires.gc@gmail.com>2009-03-14 19:13:21 +0000
commit56ec588c49b5b0ab8c20a8c6fa9b6d1076a10fd1 (patch)
treeb7af326e50447069bc6251f42f8f33bac2d9cd06 /Source/Core/DiscIO/Src/NANDContentLoader.cpp
parentbf30cc8a7229aa16ad019085b011ba37426eb6ad (diff)
some changes of HLE of the WII game loader
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2655 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/NANDContentLoader.cpp')
-rw-r--r--Source/Core/DiscIO/Src/NANDContentLoader.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
index 1de5423397..c08009b233 100644
--- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
@@ -132,6 +132,7 @@ public:
const u16 GetTitleVersion() const {return m_TileVersion;}
const u16 GetNumEntries() const {return m_numEntries;}
+ const DiscIO::IVolume::ECountry GetCountry() const;
private:
@@ -352,6 +353,66 @@ bool CNANDContentLoader::ParseTMD(u8* pDataApp, u32 pDataAppSize, u8* pTicket, u
return true;
}
+const DiscIO::IVolume::ECountry CNANDContentLoader::GetCountry() const
+{
+ DiscIO::IVolume::ECountry country = DiscIO::IVolume::COUNTRY_UNKNOWN;
+
+ if (IsValid())
+ {
+ u64 TitleID = GetTitleID();
+ char* pTitleID = (char*)&TitleID;
+
+ switch (pTitleID[0])
+ {
+ case 'S':
+ country = DiscIO::IVolume::COUNTRY_EUROPE;
+ break; // PAL // <- that is shitty :) zelda demo disc
+
+ case 'P':
+ country = DiscIO::IVolume::COUNTRY_EUROPE;
+ break; // PAL
+
+ case 'D':
+ country = DiscIO::IVolume::COUNTRY_EUROPE;
+ break; // PAL
+
+ case 'F':
+ country = DiscIO::IVolume::COUNTRY_FRANCE;
+ break; // PAL
+
+ case 'I':
+ country = DiscIO::IVolume::COUNTRY_ITALY;
+ break; // PAL
+
+ case 'X':
+ country = DiscIO::IVolume::COUNTRY_EUROPE;
+ break; // XIII <- uses X but is PAL rip
+
+ case 'E':
+ country = DiscIO::IVolume::COUNTRY_USA;
+ break; // USA
+
+ case 'J':
+ country = DiscIO::IVolume::COUNTRY_JAP;
+ break; // JAP
+
+ case 'K':
+ country = DiscIO::IVolume::COUNTRY_KOR;
+ break; // KOR
+
+ case 'O':
+ country = DiscIO::IVolume::COUNTRY_UNKNOWN;
+ break; // SDK
+
+ default:
+ PanicAlert("Unknown Country Code!");
+ break;
+ }
+ }
+
+ return(country);
+}
+
bool CNANDContentLoader::ParseWAD(DiscIO::IBlobReader& _rReader)
{
CBlobBigEndianReader ReaderBig(_rReader);