summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/VolumeGC.cpp
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2008-10-09 05:33:24 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2008-10-09 05:33:24 +0000
commiteb65601f90173d7567656540621c91bc0c5c222f (patch)
treec97d7f8ddb18c942272176944ec264a3f096f957 /Source/Core/DiscIO/Src/VolumeGC.cpp
parent4001e11116a9657d8d051aa718db558f956a6981 (diff)
updated the filesystemviewer. maybe someone can help and explain why the treectrl doesn't work for me in non-debug builds?
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@807 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/VolumeGC.cpp')
-rw-r--r--Source/Core/DiscIO/Src/VolumeGC.cpp65
1 files changed, 52 insertions, 13 deletions
diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp
index f942898e42..b10319c7cb 100644
--- a/Source/Core/DiscIO/Src/VolumeGC.cpp
+++ b/Source/Core/DiscIO/Src/VolumeGC.cpp
@@ -38,18 +38,6 @@ bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
return m_pReader->Read(_Offset, _Length, _pBuffer);
}
-std::string CVolumeGC::GetName() const
-{
- if (m_pReader == NULL)
- return false;
-
- char Name[128];
- if (!Read(0x20, 0x60, (u8*)&Name))
- return false;
-
- return Name;
-}
-
std::string CVolumeGC::GetUniqueID() const
{
static const std::string NO_UID("NO_UID");
@@ -96,7 +84,7 @@ IVolume::ECountry CVolumeGC::GetCountry() const
case 'X':
country = COUNTRY_EUROPE;
- break; // XIII <- uses X but is PAL rip
+ break; // XIII <- uses X but is PAL
case 'E':
country = COUNTRY_USA;
@@ -119,6 +107,57 @@ IVolume::ECountry CVolumeGC::GetCountry() const
return(country);
}
+std::string CVolumeGC::GetMakerID() const
+{
+ if (m_pReader == NULL)
+ return false;
+
+ char makerID[3];
+ if (!Read(0x4, 0x2, (u8*)&makerID))
+ return false;
+ makerID[2] = 0;
+
+ return makerID;
+}
+
+std::string CVolumeGC::GetName() const
+{
+ if (m_pReader == NULL)
+ return false;
+
+ char name[128];
+ if (!Read(0x20, 0x60, (u8*)&name))
+ return false;
+
+ return name;
+}
+
+u32 CVolumeGC::GetFSTSize() const
+{
+ if (m_pReader == NULL)
+ return false;
+
+ u32 size;
+ if (!Read(0x428, 0x4, (u8*)&size))
+ return false;
+
+ return Common::swap32(size);
+}
+
+std::string CVolumeGC::GetApploaderDate() const
+{
+ if (m_pReader == NULL)
+ return false;
+
+ char date[16];
+ if (!Read(0x2440, 0x10, (u8*)&date))
+ return false;
+ // Should be 0 already, but just in case
+ date[10] = 0;
+
+ return date;
+}
+
u64 CVolumeGC::GetSize() const
{
if (m_pReader)