summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-03-10 19:54:13 -0400
committerGravatar Zach Hilman2019-03-10 19:54:13 -0400
commitdebc7442f2904cd11e025b4101ad007561470289 (patch)
tree678311927b0afbc0c22ed232337c4cf70f7b76f7 /src/core/file_sys
parentsystem_version: Correct sizes on VectorVfsFile construction (diff)
downloadyuzu-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.h3
-rw-r--r--src/core/file_sys/system_archive/system_version.cpp20
-rw-r--r--src/core/file_sys/system_archive/system_version.h3
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 {
11constexpr ResultCode ERROR_PATH_NOT_FOUND{ErrorModule::FS, 1}; 11constexpr ResultCode ERROR_PATH_NOT_FOUND{ErrorModule::FS, 1};
12constexpr ResultCode ERROR_ENTITY_NOT_FOUND{ErrorModule::FS, 1002}; 12constexpr ResultCode ERROR_ENTITY_NOT_FOUND{ErrorModule::FS, 1002};
13constexpr ResultCode ERROR_SD_CARD_NOT_FOUND{ErrorModule::FS, 2001}; 13constexpr ResultCode ERROR_SD_CARD_NOT_FOUND{ErrorModule::FS, 2001};
14constexpr ResultCode ERROR_OUT_OF_BOUNDS{ErrorModule::FS, 3005};
15constexpr ResultCode ERROR_FAILED_MOUNT_ARCHIVE{ErrorModule::FS, 3223};
16constexpr ResultCode ERROR_INVALID_ARGUMENT{ErrorModule::FS, 6001};
14constexpr ResultCode ERROR_INVALID_OFFSET{ErrorModule::FS, 6061}; 17constexpr ResultCode ERROR_INVALID_OFFSET{ErrorModule::FS, 6061};
15constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::FS, 6062}; 18constexpr 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;
16constexpr u8 VERSION_MINOR = 1; 16constexpr u8 VERSION_MINOR = 1;
17constexpr u8 VERSION_MICRO = 0; 17constexpr u8 VERSION_MICRO = 0;
18 18
19constexpr u8 REVISION_MAJOR = 0; 19constexpr u8 REVISION_MAJOR = 3;
20constexpr u8 REVISION_MINOR = 0; 20constexpr u8 REVISION_MINOR = 0;
21 21
22constexpr char PLATFORM_STRING[] = "YUZU"; 22constexpr char PLATFORM_STRING[] = "NX";
23constexpr char VERSION_HASH[] = ""; 23constexpr char VERSION_HASH[] = "23f9df53e25709d756e0c76effcb2473bd3447dd";
24constexpr char DISPLAY_VERSION[] = "5.1.0"; 24constexpr char DISPLAY_VERSION[] = "5.1.0";
25constexpr char DISPLAY_TITLE[] = "YuzuEmulated Firmware for NX 5.1.0-0.0"; 25constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 5.1.0-3.0";
26 26
27} // namespace SystemVersionData 27} // namespace SystemVersionData
28 28
29std::string GetLongDisplayVersion() {
30 return SystemVersionData::DISPLAY_TITLE;
31}
32
29VirtualDir SystemVersion() { 33VirtualDir 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
9namespace FileSys::SystemArchive { 10namespace FileSys::SystemArchive {
10 11
12std::string GetLongDisplayVersion();
13
11VirtualDir SystemVersion(); 14VirtualDir SystemVersion();
12 15
13} // namespace FileSys::SystemArchive 16} // namespace FileSys::SystemArchive