summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2015-02-28 22:51:28 -0500
committerGravatar Subv2015-03-02 08:12:04 -0500
commit9a72fb79fc886932ea8b54822475970c22d28578 (patch)
tree906e203dd4d0db84133fbbf5fb2ae2d66559f82d /src
parentMerge pull request #599 from Subv/morton (diff)
downloadyuzu-9a72fb79fc886932ea8b54822475970c22d28578.tar.gz
yuzu-9a72fb79fc886932ea8b54822475970c22d28578.tar.xz
yuzu-9a72fb79fc886932ea8b54822475970c22d28578.zip
Services/AM: Stubbed TitleIDListGetTotal and GetTitleIDList.
They will always return 0 titles for every media type for now. This is needed to boot Home Menu further
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am_sys.cpp53
1 files changed, 45 insertions, 8 deletions
diff --git a/src/core/hle/service/am_sys.cpp b/src/core/hle/service/am_sys.cpp
index 7ab89569f..b244190a2 100644
--- a/src/core/hle/service/am_sys.cpp
+++ b/src/core/hle/service/am_sys.cpp
@@ -5,19 +5,56 @@
5#include "core/hle/hle.h" 5#include "core/hle/hle.h"
6#include "core/hle/service/am_sys.h" 6#include "core/hle/service/am_sys.h"
7 7
8////////////////////////////////////////////////////////////////////////////////////////////////////
9// Namespace AM_SYS
10
11namespace AM_SYS { 8namespace AM_SYS {
12 9
13// Empty arrays are illegal -- commented out until an entry is added. 10/**
14//const Interface::FunctionInfo FunctionTable[] = { }; 11 * Gets the number of installed titles in the requested media type
12 * Inputs:
13 * 0: Command header (0x00010040)
14 * 1: Media type to load the titles from
15 * Outputs:
16 * 1: Result, 0 on success, otherwise error code
17 * 2: The number of titles in the requested media type
18 */
19static void TitleIDListGetTotal(Service::Interface* self) {
20 u32* cmd_buff = Kernel::GetCommandBuffer();
21 u32 media_type = cmd_buff[1] & 0xFF;
22
23 cmd_buff[1] = RESULT_SUCCESS.raw;
24 cmd_buff[2] = 0;
25 LOG_WARNING(Service_CFG, "(STUBBED) media_type %u", media_type);
26}
27
28/**
29 * Loads information about the desired number of titles from the desired media type into an array
30 * Inputs:
31 * 0: Command header (0x00020082)
32 * 1: The maximum number of titles to load
33 * 2: Media type to load the titles from
34 * 3: Descriptor of the output buffer pointer
35 * 4: Address of the output buffer
36 * Outputs:
37 * 1: Result, 0 on success, otherwise error code
38 * 2: The number of titles loaded from the requested media type
39 */
40static void GetTitleIDList(Service::Interface* self) {
41 u32* cmd_buff = Kernel::GetCommandBuffer();
42 u32 num_titles = cmd_buff[1];
43 u32 media_type = cmd_buff[2] & 0xFF;
44 u32 addr = cmd_buff[4];
45
46 cmd_buff[1] = RESULT_SUCCESS.raw;
47 cmd_buff[2] = 0;
48 LOG_WARNING(Service_CFG, "(STUBBED) Requested %u titles from media type %u", num_titles, media_type);
49}
15 50
16//////////////////////////////////////////////////////////////////////////////////////////////////// 51const Interface::FunctionInfo FunctionTable[] = {
17// Interface class 52 {0x00010040, TitleIDListGetTotal, "TitleIDListGetTotal"},
53 {0x00020082, GetTitleIDList, "GetTitleIDList"},
54};
18 55
19Interface::Interface() { 56Interface::Interface() {
20 //Register(FunctionTable); 57 Register(FunctionTable);
21} 58}
22 59
23} // namespace 60} // namespace