diff --git a/trunk/ConsoleDataMigration/sources/ConsoleBackup/ConsoleBackup.cpp b/trunk/ConsoleDataMigration/sources/ConsoleBackup/ConsoleBackup.cpp index a7a0ef9..0ec2d34 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleBackup/ConsoleBackup.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleBackup/ConsoleBackup.cpp @@ -251,7 +251,8 @@ extern "C" void nnMain(void) s_HwUtility.GetMacAddress(), operationMessage, s_HwUtility.GetRegion(), - s_HwUtility.GetSerialNumber() + s_HwUtility.GetSerialNumber(), + s_HwUtility.GetRtcAll() ); renderSystem.SwapBuffers(); diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/ConsoleRestore.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/ConsoleRestore.cpp index 0c42cf9..c38bf64 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/ConsoleRestore.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/ConsoleRestore.cpp @@ -282,7 +282,8 @@ extern "C" void nnMain(void) s_HwUtility.GetMacAddress(), operationMessage, s_HwUtility.GetRegion(), - s_HwUtility.GetSerialNumber() + s_HwUtility.GetSerialNumber(), + s_HwUtility.GetRtcAll() ); if (GetRestoreMode() != RESTORE_MODE_RESTORE) diff --git a/trunk/ConsoleDataMigration/sources/common/DrawSystemState.cpp b/trunk/ConsoleDataMigration/sources/common/DrawSystemState.cpp index 594b749..4bc9f83 100644 --- a/trunk/ConsoleDataMigration/sources/common/DrawSystemState.cpp +++ b/trunk/ConsoleDataMigration/sources/common/DrawSystemState.cpp @@ -38,6 +38,7 @@ u8 s_BatteryRemain; std::string s_AdapterState; u8 s_Progress; ::std::vector* s_OperationMessage; +nn::mcu::CTR::RtcData s_Rtc; } @@ -64,8 +65,15 @@ void SetTextWriterCore() { GetTextWriter()->Print("\n"); - GetTextWriter()->Printf("System Ver. %d.%d.%d-%d\n", s_CupMajor, s_CupMinor, s_CupMicro, s_NupMajor); - GetTextWriter()->Printf("System Region %s\n", nn::cfg::CTR::GetRegionCodeA3(s_Region)); + if(nn::cfg::CTR::GetRegionCodeA3(s_Region) != NULL) + { + GetTextWriter()->Printf("System Ver. %d.%d.%d-%d%c\n", s_CupMajor, s_CupMinor, s_CupMicro, s_NupMajor, + nn::cfg::CTR::GetRegionCodeA3(s_Region)[0]); + } + else + { + GetTextWriter()->Printf("System Ver. %d.%d.%d-%d\n", s_CupMajor, s_CupMinor, s_CupMicro, s_NupMajor); + } GetTextWriter()->Printf("Serial No. %s\n", s_SerialNo); GetTextWriter()->Printf("Device ID %llu\n", s_DeviceId); GetTextWriter()->Printf("MAC Address %s\n", s_MacAddress); @@ -73,6 +81,8 @@ void SetTextWriterCore() / 100000000ULL % 10000ULL), static_cast (s_FriendCode / 10000ULL % 10000ULL), static_cast (s_FriendCode % 10000ULL)); + GetTextWriter()->Printf("Raw RTC 20%02d/%02d/%02d %02d:%02d:%02d\n", s_Rtc.m_Year, s_Rtc.m_Month, s_Rtc.m_Day, + s_Rtc.m_Hour, s_Rtc.m_Minute, s_Rtc.m_Second); GetTextWriter()->Printf("Battery %d%%\n", s_BatteryRemain); GetTextWriter()->Printf("AC Adaper %s\n", s_AdapterState.c_str()); GetTextWriter()->Printf("Progress %02d%%\n", s_Progress); @@ -108,7 +118,8 @@ void DrawSystemState char8* macAddress, ::std::vector& operationMessage, nn::cfg::CTR::CfgRegionCode region, - u8* serialNo + u8* serialNo, + nn::mcu::CTR::RtcData rtc ) { // パラメータ保存 @@ -126,6 +137,7 @@ void DrawSystemState std::memcpy(s_SerialNo, serialNo, sizeof(s_SerialNo)); s_SerialNo[nn::cfg::CTR::CFG_SECURE_INFO_SERIAL_NO_LEN] = '\0'; s_OperationMessage = &operationMessage; + s_Rtc = rtc; // デフォルトで上画面に描画するもの diff --git a/trunk/ConsoleDataMigration/sources/common/DrawSystemState.h b/trunk/ConsoleDataMigration/sources/common/DrawSystemState.h index 8acab14..53d5791 100644 --- a/trunk/ConsoleDataMigration/sources/common/DrawSystemState.h +++ b/trunk/ConsoleDataMigration/sources/common/DrawSystemState.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -71,7 +72,8 @@ void DrawSystemState char8* macAddress, ::std::vector& operationMessage, nn::cfg::CTR::CfgRegionCode region, - u8* s_SerialNo + u8* serialNo, + nn::mcu::CTR::RtcData rtc ); } diff --git a/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.cpp b/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.cpp index aa633ee..e6068f4 100644 --- a/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.cpp +++ b/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.cpp @@ -78,4 +78,9 @@ void HardwareStateManager::GetVersionData(common::VerDef* version) return m_pUtil->GetVersionData(version); } +nn::mcu::CTR::RtcData HardwareStateManager::GetRtcAll() +{ + return m_pUtil->GetRtcAll(); +} + } diff --git a/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.h b/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.h index 65b6525..faf8b73 100644 --- a/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.h +++ b/trunk/ConsoleDataMigration/sources/common/HardwareStateManager.h @@ -40,6 +40,7 @@ public: nn::Handle GetMcuHandle(); void GetSerialNumber(u8** serial, size_t* size); void GetVersionData(common::VerDef* version); + nn::mcu::CTR::RtcData GetRtcAll(); private: NN_PADDING4; diff --git a/trunk/ConsoleDataMigration/sources/common/Util.cpp b/trunk/ConsoleDataMigration/sources/common/Util.cpp index 177d7d4..25893be 100644 --- a/trunk/ConsoleDataMigration/sources/common/Util.cpp +++ b/trunk/ConsoleDataMigration/sources/common/Util.cpp @@ -281,6 +281,13 @@ u32 Util::GetBatteryRemain() return remain; } +nn::mcu::CTR::RtcData Util::GetRtcAll() +{ + nn::mcu::CTR::RtcData data; + mp_Mcu->GetRtcAll(&data); + return data; +} + u64 Util::GetInfraDeviceId() { bit64 infraDeviceId; diff --git a/trunk/ConsoleDataMigration/sources/common/Util.h b/trunk/ConsoleDataMigration/sources/common/Util.h index 17151c0..0a15cae 100644 --- a/trunk/ConsoleDataMigration/sources/common/Util.h +++ b/trunk/ConsoleDataMigration/sources/common/Util.h @@ -84,6 +84,9 @@ public: // バッテリ残量を0~100で返す u32 GetBatteryRemain(); + // RTC生値を返す + nn::mcu::CTR::RtcData GetRtcAll(); + // 64bitインフラデバイスIDを返す u64 GetInfraDeviceId();