diff options
| author | 2019-03-10 19:54:13 -0400 | |
|---|---|---|
| committer | 2019-03-10 19:54:13 -0400 | |
| commit | debc7442f2904cd11e025b4101ad007561470289 (patch) | |
| tree | 678311927b0afbc0c22ed232337c4cf70f7b76f7 /src/core/file_sys | |
| parent | system_version: Correct sizes on VectorVfsFile construction (diff) | |
| download | yuzu-debc7442f2904cd11e025b4101ad007561470289.tar.gz yuzu-debc7442f2904cd11e025b4101ad007561470289.tar.xz yuzu-debc7442f2904cd11e025b4101ad007561470289.zip | |
set_sys: Use official nintendo version string
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/errors.h | 3 | ||||
| -rw-r--r-- | src/core/file_sys/system_archive/system_version.cpp | 20 | ||||
| -rw-r--r-- | src/core/file_sys/system_archive/system_version.h | 3 |
3 files changed, 18 insertions, 8 deletions
diff --git a/src/core/file_sys/errors.h b/src/core/file_sys/errors.h index e4a4ee4ab..bb4654366 100644 --- a/src/core/file_sys/errors.h +++ b/src/core/file_sys/errors.h | |||
| @@ -11,6 +11,9 @@ namespace FileSys { | |||
| 11 | constexpr ResultCode ERROR_PATH_NOT_FOUND{ErrorModule::FS, 1}; | 11 | constexpr ResultCode ERROR_PATH_NOT_FOUND{ErrorModule::FS, 1}; |
| 12 | constexpr ResultCode ERROR_ENTITY_NOT_FOUND{ErrorModule::FS, 1002}; | 12 | constexpr ResultCode ERROR_ENTITY_NOT_FOUND{ErrorModule::FS, 1002}; |
| 13 | constexpr ResultCode ERROR_SD_CARD_NOT_FOUND{ErrorModule::FS, 2001}; | 13 | constexpr ResultCode ERROR_SD_CARD_NOT_FOUND{ErrorModule::FS, 2001}; |
| 14 | constexpr ResultCode ERROR_OUT_OF_BOUNDS{ErrorModule::FS, 3005}; | ||
| 15 | constexpr ResultCode ERROR_FAILED_MOUNT_ARCHIVE{ErrorModule::FS, 3223}; | ||
| 16 | constexpr ResultCode ERROR_INVALID_ARGUMENT{ErrorModule::FS, 6001}; | ||
| 14 | constexpr ResultCode ERROR_INVALID_OFFSET{ErrorModule::FS, 6061}; | 17 | constexpr ResultCode ERROR_INVALID_OFFSET{ErrorModule::FS, 6061}; |
| 15 | constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::FS, 6062}; | 18 | constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::FS, 6062}; |
| 16 | 19 | ||
diff --git a/src/core/file_sys/system_archive/system_version.cpp b/src/core/file_sys/system_archive/system_version.cpp index 52df10f55..6e22f97b0 100644 --- a/src/core/file_sys/system_archive/system_version.cpp +++ b/src/core/file_sys/system_archive/system_version.cpp | |||
| @@ -16,16 +16,20 @@ constexpr u8 VERSION_MAJOR = 5; | |||
| 16 | constexpr u8 VERSION_MINOR = 1; | 16 | constexpr u8 VERSION_MINOR = 1; |
| 17 | constexpr u8 VERSION_MICRO = 0; | 17 | constexpr u8 VERSION_MICRO = 0; |
| 18 | 18 | ||
| 19 | constexpr u8 REVISION_MAJOR = 0; | 19 | constexpr u8 REVISION_MAJOR = 3; |
| 20 | constexpr u8 REVISION_MINOR = 0; | 20 | constexpr u8 REVISION_MINOR = 0; |
| 21 | 21 | ||
| 22 | constexpr char PLATFORM_STRING[] = "YUZU"; | 22 | constexpr char PLATFORM_STRING[] = "NX"; |
| 23 | constexpr char VERSION_HASH[] = ""; | 23 | constexpr char VERSION_HASH[] = "23f9df53e25709d756e0c76effcb2473bd3447dd"; |
| 24 | constexpr char DISPLAY_VERSION[] = "5.1.0"; | 24 | constexpr char DISPLAY_VERSION[] = "5.1.0"; |
| 25 | constexpr char DISPLAY_TITLE[] = "YuzuEmulated Firmware for NX 5.1.0-0.0"; | 25 | constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 5.1.0-3.0"; |
| 26 | 26 | ||
| 27 | } // namespace SystemVersionData | 27 | } // namespace SystemVersionData |
| 28 | 28 | ||
| 29 | std::string GetLongDisplayVersion() { | ||
| 30 | return SystemVersionData::DISPLAY_TITLE; | ||
| 31 | } | ||
| 32 | |||
| 29 | VirtualDir SystemVersion() { | 33 | VirtualDir SystemVersion() { |
| 30 | VirtualFile file = std::make_shared<VectorVfsFile>(std::vector<u8>(0x100), "file"); | 34 | VirtualFile file = std::make_shared<VectorVfsFile>(std::vector<u8>(0x100), "file"); |
| 31 | file->WriteObject(SystemVersionData::VERSION_MAJOR, 0); | 35 | file->WriteObject(SystemVersionData::VERSION_MAJOR, 0); |
| @@ -34,13 +38,13 @@ VirtualDir SystemVersion() { | |||
| 34 | file->WriteObject(SystemVersionData::REVISION_MAJOR, 4); | 38 | file->WriteObject(SystemVersionData::REVISION_MAJOR, 4); |
| 35 | file->WriteObject(SystemVersionData::REVISION_MINOR, 5); | 39 | file->WriteObject(SystemVersionData::REVISION_MINOR, 5); |
| 36 | file->WriteArray(SystemVersionData::PLATFORM_STRING, | 40 | file->WriteArray(SystemVersionData::PLATFORM_STRING, |
| 37 | std::min<u64>(sizeof(SystemVersionData::PLATFORM_STRING), 0x20ull), 0x8); | 41 | std::min<u64>(sizeof(SystemVersionData::PLATFORM_STRING), 0x20ULL), 0x8); |
| 38 | file->WriteArray(SystemVersionData::VERSION_HASH, | 42 | file->WriteArray(SystemVersionData::VERSION_HASH, |
| 39 | std::min<u64>(sizeof(SystemVersionData::VERSION_HASH), 0x40ull), 0x28); | 43 | std::min<u64>(sizeof(SystemVersionData::VERSION_HASH), 0x40ULL), 0x28); |
| 40 | file->WriteArray(SystemVersionData::DISPLAY_VERSION, | 44 | file->WriteArray(SystemVersionData::DISPLAY_VERSION, |
| 41 | std::min<u64>(sizeof(SystemVersionData::DISPLAY_VERSION), 0x18ull), 0x68); | 45 | std::min<u64>(sizeof(SystemVersionData::DISPLAY_VERSION), 0x18ULL), 0x68); |
| 42 | file->WriteArray(SystemVersionData::DISPLAY_TITLE, | 46 | file->WriteArray(SystemVersionData::DISPLAY_TITLE, |
| 43 | std::min<u64>(sizeof(SystemVersionData::DISPLAY_TITLE), 0x80ull), 0x80); | 47 | std::min<u64>(sizeof(SystemVersionData::DISPLAY_TITLE), 0x80ULL), 0x80); |
| 44 | return std::make_shared<VectorVfsDirectory>(std::vector<VirtualFile>{file}, | 48 | return std::make_shared<VectorVfsDirectory>(std::vector<VirtualFile>{file}, |
| 45 | std::vector<VirtualDir>{}, "data"); | 49 | std::vector<VirtualDir>{}, "data"); |
| 46 | } | 50 | } |
diff --git a/src/core/file_sys/system_archive/system_version.h b/src/core/file_sys/system_archive/system_version.h index 9fb794b36..deed79b26 100644 --- a/src/core/file_sys/system_archive/system_version.h +++ b/src/core/file_sys/system_archive/system_version.h | |||
| @@ -4,10 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <string> | ||
| 7 | #include "core/file_sys/vfs_types.h" | 8 | #include "core/file_sys/vfs_types.h" |
| 8 | 9 | ||
| 9 | namespace FileSys::SystemArchive { | 10 | namespace FileSys::SystemArchive { |
| 10 | 11 | ||
| 12 | std::string GetLongDisplayVersion(); | ||
| 13 | |||
| 11 | VirtualDir SystemVersion(); | 14 | VirtualDir SystemVersion(); |
| 12 | 15 | ||
| 13 | } // namespace FileSys::SystemArchive | 16 | } // namespace FileSys::SystemArchive |