summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2018-09-02 10:49:18 -0400
committerGravatar GitHub2018-09-02 10:49:18 -0400
commit325f3e0693ab503b308d28958415de0072b46555 (patch)
tree32c024dfc61048316c64796a02a9b927c8edea7a
parentMerge pull request #1215 from ogniK5377/texs-nodep-assert (diff)
parentmaxwell_3d: Use CoreTiming for query timestamp (diff)
downloadyuzu-325f3e0693ab503b308d28958415de0072b46555.tar.gz
yuzu-325f3e0693ab503b308d28958415de0072b46555.tar.xz
yuzu-325f3e0693ab503b308d28958415de0072b46555.zip
Merge pull request #1213 from DarkLordZach/octopath-fs
filesystem/maxwell_3d: Various changes to boot Project Octopath Traveller
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp30
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.h2
-rw-r--r--src/video_core/engines/maxwell_3d.cpp5
3 files changed, 33 insertions, 4 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 5759299fe..3f8ff67e8 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -26,6 +26,17 @@
26 26
27namespace Service::FileSystem { 27namespace Service::FileSystem {
28 28
29enum class FileSystemType : u8 {
30 Invalid0 = 0,
31 Invalid1 = 1,
32 Logo = 2,
33 ContentControl = 3,
34 ContentManual = 4,
35 ContentMeta = 5,
36 ContentData = 6,
37 ApplicationPackage = 7,
38};
39
29class IStorage final : public ServiceFramework<IStorage> { 40class IStorage final : public ServiceFramework<IStorage> {
30public: 41public:
31 explicit IStorage(FileSys::VirtualFile backend_) 42 explicit IStorage(FileSys::VirtualFile backend_)
@@ -420,7 +431,7 @@ FSP_SRV::FSP_SRV() : ServiceFramework("fsp-srv") {
420 {0, nullptr, "MountContent"}, 431 {0, nullptr, "MountContent"},
421 {1, &FSP_SRV::Initialize, "Initialize"}, 432 {1, &FSP_SRV::Initialize, "Initialize"},
422 {2, nullptr, "OpenDataFileSystemByCurrentProcess"}, 433 {2, nullptr, "OpenDataFileSystemByCurrentProcess"},
423 {7, nullptr, "OpenFileSystemWithPatch"}, 434 {7, &FSP_SRV::OpenFileSystemWithPatch, "OpenFileSystemWithPatch"},
424 {8, nullptr, "OpenFileSystemWithId"}, 435 {8, nullptr, "OpenFileSystemWithId"},
425 {9, nullptr, "OpenDataFileSystemByApplicationId"}, 436 {9, nullptr, "OpenDataFileSystemByApplicationId"},
426 {11, nullptr, "OpenBisFileSystem"}, 437 {11, nullptr, "OpenBisFileSystem"},
@@ -444,7 +455,7 @@ FSP_SRV::FSP_SRV() : ServiceFramework("fsp-srv") {
444 {34, nullptr, "GetCacheStorageSize"}, 455 {34, nullptr, "GetCacheStorageSize"},
445 {51, &FSP_SRV::MountSaveData, "MountSaveData"}, 456 {51, &FSP_SRV::MountSaveData, "MountSaveData"},
446 {52, nullptr, "OpenSaveDataFileSystemBySystemSaveDataId"}, 457 {52, nullptr, "OpenSaveDataFileSystemBySystemSaveDataId"},
447 {53, nullptr, "OpenReadOnlySaveDataFileSystem"}, 458 {53, &FSP_SRV::OpenReadOnlySaveDataFileSystem, "OpenReadOnlySaveDataFileSystem"},
448 {57, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"}, 459 {57, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"},
449 {58, nullptr, "ReadSaveDataFileSystemExtraData"}, 460 {58, nullptr, "ReadSaveDataFileSystemExtraData"},
450 {59, nullptr, "WriteSaveDataFileSystemExtraData"}, 461 {59, nullptr, "WriteSaveDataFileSystemExtraData"},
@@ -516,6 +527,16 @@ void FSP_SRV::Initialize(Kernel::HLERequestContext& ctx) {
516 rb.Push(RESULT_SUCCESS); 527 rb.Push(RESULT_SUCCESS);
517} 528}
518 529
530void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
531 IPC::RequestParser rp{ctx};
532
533 const auto type = rp.PopRaw<FileSystemType>();
534 const auto title_id = rp.PopRaw<u64>();
535
536 IPC::ResponseBuilder rb{ctx, 2, 0, 0};
537 rb.Push(ResultCode(-1));
538}
539
519void FSP_SRV::MountSdCard(Kernel::HLERequestContext& ctx) { 540void FSP_SRV::MountSdCard(Kernel::HLERequestContext& ctx) {
520 LOG_DEBUG(Service_FS, "called"); 541 LOG_DEBUG(Service_FS, "called");
521 542
@@ -563,6 +584,11 @@ void FSP_SRV::MountSaveData(Kernel::HLERequestContext& ctx) {
563 rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); 584 rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
564} 585}
565 586
587void FSP_SRV::OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx) {
588 LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
589 MountSaveData(ctx);
590}
591
566void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { 592void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
567 LOG_WARNING(Service_FS, "(STUBBED) called"); 593 LOG_WARNING(Service_FS, "(STUBBED) called");
568 594
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h
index f073ac523..2b5c21abb 100644
--- a/src/core/hle/service/filesystem/fsp_srv.h
+++ b/src/core/hle/service/filesystem/fsp_srv.h
@@ -20,9 +20,11 @@ public:
20 20
21private: 21private:
22 void Initialize(Kernel::HLERequestContext& ctx); 22 void Initialize(Kernel::HLERequestContext& ctx);
23 void OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx);
23 void MountSdCard(Kernel::HLERequestContext& ctx); 24 void MountSdCard(Kernel::HLERequestContext& ctx);
24 void CreateSaveData(Kernel::HLERequestContext& ctx); 25 void CreateSaveData(Kernel::HLERequestContext& ctx);
25 void MountSaveData(Kernel::HLERequestContext& ctx); 26 void MountSaveData(Kernel::HLERequestContext& ctx);
27 void OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx);
26 void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); 28 void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
27 void OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); 29 void OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx);
28 void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); 30 void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx);
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 68ff1e86b..e63ad4d46 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -5,6 +5,7 @@
5#include <cinttypes> 5#include <cinttypes>
6#include "common/assert.h" 6#include "common/assert.h"
7#include "core/core.h" 7#include "core/core.h"
8#include "core/core_timing.h"
8#include "core/memory.h" 9#include "core/memory.h"
9#include "video_core/debug_utils/debug_utils.h" 10#include "video_core/debug_utils/debug_utils.h"
10#include "video_core/engines/maxwell_3d.h" 11#include "video_core/engines/maxwell_3d.h"
@@ -194,8 +195,8 @@ void Maxwell3D::ProcessQueryGet() {
194 // wait queues. 195 // wait queues.
195 LongQueryResult query_result{}; 196 LongQueryResult query_result{};
196 query_result.value = result; 197 query_result.value = result;
197 // TODO(Subv): Generate a real GPU timestamp and write it here instead of 0 198 // TODO(Subv): Generate a real GPU timestamp and write it here instead of CoreTiming
198 query_result.timestamp = 0; 199 query_result.timestamp = CoreTiming::GetTicks();
199 Memory::WriteBlock(*address, &query_result, sizeof(query_result)); 200 Memory::WriteBlock(*address, &query_result, sizeof(query_result));
200 } 201 }
201 break; 202 break;