diff --git a/Source/Core/Core/Src/NetPlay.h b/Source/Core/Core/Src/NetPlay.h index dfe72d87a3..ee51644e0f 100644 --- a/Source/Core/Core/Src/NetPlay.h +++ b/Source/Core/Core/Src/NetPlay.h @@ -34,7 +34,7 @@ struct Rpt : public std::vector typedef std::vector NetWiimote; -#define NETPLAY_VERSION "Dolphin NetPlay 2013-03-03" +#define NETPLAY_VERSION "Dolphin NetPlay 2013-04-11" // messages enum diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h index 35235ac413..9dec464f84 100644 --- a/Source/Core/DiscIO/Src/Volume.h +++ b/Source/Core/DiscIO/Src/Volume.h @@ -38,6 +38,7 @@ public: virtual void GetTMD(u8*, u32 *_sz) const { *_sz=0; } virtual std::string GetUniqueID() const = 0; virtual std::string GetMakerID() const = 0; + virtual int GetRevision() const { return 0; } // TODO: eliminate? virtual std::string GetName() const; virtual std::vector GetNames() const = 0; diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp index 8d36a9c166..d4ef327b30 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.cpp +++ b/Source/Core/DiscIO/Src/VolumeGC.cpp @@ -91,6 +91,18 @@ std::string CVolumeGC::GetMakerID() const return makerID; } +int CVolumeGC::GetRevision() const +{ + if (!m_pReader) + return 0; + + u8 Revision; + if (!Read(7, 1, &Revision)) + return 0; + + return Revision; +} + std::vector CVolumeGC::GetNames() const { std::vector names; diff --git a/Source/Core/DiscIO/Src/VolumeGC.h b/Source/Core/DiscIO/Src/VolumeGC.h index 78ec9521c7..5fc9c2c901 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.h +++ b/Source/Core/DiscIO/Src/VolumeGC.h @@ -34,6 +34,7 @@ public: bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const; std::string GetUniqueID() const; std::string GetMakerID() const; + int GetRevision() const; std::vector GetNames() const; u32 GetFSTSize() const; std::string GetApploaderDate() const; diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index 09671b91c5..edd2d973b8 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -37,7 +37,7 @@ #include "ChunkFile.h" #include "ConfigManager.h" -static const u32 CACHE_REVISION = 0x113; +static const u32 CACHE_REVISION = 0x114; #define DVD_BANNER_WIDTH 96 #define DVD_BANNER_HEIGHT 32 @@ -48,6 +48,7 @@ GameListItem::GameListItem(const std::string& _rFileName) : m_FileName(_rFileName) , m_emu_state(0) , m_FileSize(0) + , m_Revision(0) , m_Valid(false) , m_BlobCompressed(false) { @@ -77,6 +78,7 @@ GameListItem::GameListItem(const std::string& _rFileName) m_UniqueID = pVolume->GetUniqueID(); m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str()); m_IsDiscTwo = pVolume->IsDiscTwo(); + m_Revision = pVolume->GetRevision(); // check if we can get some infos from the banner file too DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume); @@ -175,6 +177,7 @@ void GameListItem::DoState(PointerWrap &p) p.Do(m_pImage); p.Do(m_Platform); p.Do(m_IsDiscTwo); + p.Do(m_Revision); } std::string GameListItem::CreateCacheFilename() diff --git a/Source/Core/DolphinWX/Src/ISOFile.h b/Source/Core/DolphinWX/Src/ISOFile.h index 629ce0b765..a164b0c265 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.h +++ b/Source/Core/DolphinWX/Src/ISOFile.h @@ -42,6 +42,7 @@ public: std::string GetName(int index) const; std::string GetCompany() const; std::string GetDescription(int index = 0) const; + int GetRevision() const { return m_Revision; } const std::string& GetUniqueID() const {return m_UniqueID;} const std::string GetWiiFSPath() const; DiscIO::IVolume::ECountry GetCountry() const {return m_Country;} @@ -87,6 +88,7 @@ private: DiscIO::IVolume::ECountry m_Country; int m_Platform; + int m_Revision; #if defined(HAVE_WX) && HAVE_WX wxImage m_Image; diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 3385a75cd9..4abf867378 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -208,6 +208,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW } wxString temp = _T("0x") + StrToWxStr(OpenISO->GetMakerID()); m_MakerID->SetValue(temp); + m_Revision->SetValue(wxString::Format(wxT("%u"), OpenISO->GetRevision())); m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate())); m_FST->SetValue(wxString::Format(wxT("%u"), OpenISO->GetFSTSize())); @@ -472,6 +473,10 @@ void CISOProperties::CreateGUIControls(bool IsWad) new wxStaticText(m_Information, wxID_ANY, _("Maker ID:")); m_MakerID = new wxTextCtrl(m_Information, ID_MAKERID, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY); + wxStaticText * const m_RevisionText = + new wxStaticText(m_Information, wxID_ANY, _("Revision:")); + m_Revision = new wxTextCtrl(m_Information, ID_REVISION, wxEmptyString, + wxDefaultPosition, wxDefaultSize, wxTE_READONLY); wxStaticText * const m_DateText = new wxStaticText(m_Information, wxID_ANY, _("Date:")); m_Date = new wxTextCtrl(m_Information, ID_DATE, wxEmptyString, @@ -509,10 +514,12 @@ void CISOProperties::CreateGUIControls(bool IsWad) sISODetails->Add(m_Country, wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); sISODetails->Add(m_MakerIDText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); sISODetails->Add(m_MakerID, wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - sISODetails->Add(m_DateText, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sISODetails->Add(m_Date, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); - sISODetails->Add(m_FSTText, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); - sISODetails->Add(m_FST, wxGBPosition(5, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); + sISODetails->Add(m_RevisionText, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); + sISODetails->Add(m_Revision, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); + sISODetails->Add(m_DateText, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); + sISODetails->Add(m_Date, wxGBPosition(5, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); + sISODetails->Add(m_FSTText, wxGBPosition(6, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); + sISODetails->Add(m_FST, wxGBPosition(6, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); sISODetails->AddGrowableCol(1); wxStaticBoxSizer * const sbISODetails = new wxStaticBoxSizer(wxVERTICAL, m_Information, _("ISO Details")); diff --git a/Source/Core/DolphinWX/Src/ISOProperties.h b/Source/Core/DolphinWX/Src/ISOProperties.h index 9a4f5672f8..6c82beef12 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.h +++ b/Source/Core/DolphinWX/Src/ISOProperties.h @@ -98,6 +98,7 @@ private: wxTextCtrl *m_GameID; wxTextCtrl *m_Country; wxTextCtrl *m_MakerID; + wxTextCtrl *m_Revision; wxTextCtrl *m_Date; wxTextCtrl *m_FST; wxArrayString arrayStringFor_Lang; @@ -156,6 +157,7 @@ private: ID_GAMEID, ID_COUNTRY, ID_MAKERID, + ID_REVISION, ID_DATE, ID_FST, ID_VERSION, diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp index ab6682d170..9e6142356f 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.cpp +++ b/Source/Core/DolphinWX/Src/NetWindow.cpp @@ -45,8 +45,11 @@ std::string BuildGameName(const GameListItem& game) std::string name(game.GetBannerName(lang)); if (name.empty()) name = game.GetVolumeName(lang); - - return name + " (" + game.GetUniqueID() + ")"; + + if (game.GetRevision() != 0) + return name + " (" + game.GetUniqueID() + ", Revision " + std::to_string((long long)game.GetRevision()) + ")"; + else + return name + " (" + game.GetUniqueID() + ")"; } void FillWithGameNames(wxListBox* game_lbox, const CGameListCtrl& game_list)