aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorGravatar purpasmart96 <kanzoconfigz@hotmail.com>2015-06-11 15:12:16 -0700
committerGravatar purpasmart96 <kanzoconfigz@hotmail.com>2015-06-11 20:41:59 -0700
commit7933dbe6a0eee766a64b26f7d4461a40e473fcdc (patch)
tree91ae37d96b1e508f63055f285c64225811237b8a /src/core/hle/service/am
parentb1cb0a3f2c0ed47ea2a926a8ff04720a91c1b80b (diff)
Services: Continue separation of services into their own folders
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/am.cpp55
-rw-r--r--src/core/hle/service/am/am.h47
-rw-r--r--src/core/hle/service/am/am_app.cpp20
-rw-r--r--src/core/hle/service/am/am_app.h22
-rw-r--r--src/core/hle/service/am/am_net.cpp40
-rw-r--r--src/core/hle/service/am/am_net.h22
-rw-r--r--src/core/hle/service/am/am_sys.cpp22
-rw-r--r--src/core/hle/service/am/am_sys.h22
-rw-r--r--src/core/hle/service/am/am_u.cpp22
-rw-r--r--src/core/hle/service/am/am_u.h22
10 files changed, 294 insertions, 0 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
new file mode 100644
index 00000000..57dc1ece
--- /dev/null
+++ b/src/core/hle/service/am/am.cpp
@@ -0,0 +1,55 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "common/logging/log.h"
+
+#include "core/hle/service/service.h"
+#include "core/hle/service/am/am_app.h"
+#include "core/hle/service/am/am_net.h"
+#include "core/hle/service/am/am_sys.h"
+
+#include "core/hle/hle.h"
+#include "core/hle/kernel/event.h"
+#include "core/hle/kernel/shared_memory.h"
+
+namespace Service {
+namespace AM {
+
+void TitleIDListGetTotal(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+ u32 media_type = cmd_buff[1] & 0xFF;
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = 0;
+
+ LOG_WARNING(Service_AM, "(STUBBED) media_type %u", media_type);
+}
+
+void GetTitleIDList(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+ u32 num_titles = cmd_buff[1];
+ u32 media_type = cmd_buff[2] & 0xFF;
+ u32 addr = cmd_buff[4];
+
+ cmd_buff[1] = RESULT_SUCCESS.raw;
+ cmd_buff[2] = 0;
+
+ LOG_WARNING(Service_AM, "(STUBBED) Requested %u titles from media type %u", num_titles, media_type);
+}
+
+void Init() {
+ using namespace Kernel;
+
+ AddService(new AM_APP_Interface);
+ AddService(new AM_NET_Interface);
+ AddService(new AM_SYS_Interface);
+}
+
+void Shutdown() {
+
+}
+
+} // namespace AM
+
+} // namespace Service
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
new file mode 100644
index 00000000..063b8bd0
--- /dev/null
+++ b/src/core/hle/service/am/am.h
@@ -0,0 +1,47 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/kernel/kernel.h"
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace AM {
+
+/**
+ * AM::TitleIDListGetTotal service function
+ * Gets the number of installed titles in the requested media type
+ * Inputs:
+ * 0 : Command header (0x00010040)
+ * 1 : Media type to load the titles from
+ * Outputs:
+ * 1 : Result, 0 on success, otherwise error code
+ * 2 : The number of titles in the requested media type
+ */
+void TitleIDListGetTotal(Service::Interface* self);
+
+/**
+ * AM::GetTitleIDList service function
+ * Loads information about the desired number of titles from the desired media type into an array
+ * Inputs:
+ * 0 : Command header (0x00020082)
+ * 1 : The maximum number of titles to load
+ * 2 : Media type to load the titles from
+ * 3 : Descriptor of the output buffer pointer
+ * 4 : Address of the output buffer
+ * Outputs:
+ * 1 : Result, 0 on success, otherwise error code
+ * 2 : The number of titles loaded from the requested media type
+ */
+void GetTitleIDList(Service::Interface* self);
+
+/// Initialize AM service
+void Init();
+
+/// Shutdown AM service
+void Shutdown();
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_app.cpp b/src/core/hle/service/am/am_app.cpp
new file mode 100644
index 00000000..c6fc81bc
--- /dev/null
+++ b/src/core/hle/service/am/am_app.cpp
@@ -0,0 +1,20 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/hle.h"
+#include "core/hle/service/am/am.h"
+#include "core/hle/service/am/am_app.h"
+
+namespace Service {
+namespace AM {
+
+// Empty arrays are illegal -- commented out until an entry is added.
+//const Interface::FunctionInfo FunctionTable[] = { };
+
+AM_APP_Interface::AM_APP_Interface() {
+ //Register(FunctionTable);
+}
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_app.h b/src/core/hle/service/am/am_app.h
new file mode 100644
index 00000000..fd6017d1
--- /dev/null
+++ b/src/core/hle/service/am/am_app.h
@@ -0,0 +1,22 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace AM {
+
+class AM_APP_Interface : public Service::Interface {
+public:
+ AM_APP_Interface();
+
+ std::string GetPortName() const override {
+ return "am:app";
+ }
+};
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_net.cpp b/src/core/hle/service/am/am_net.cpp
new file mode 100644
index 00000000..b1af0e9d
--- /dev/null
+++ b/src/core/hle/service/am/am_net.cpp
@@ -0,0 +1,40 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/hle.h"
+#include "core/hle/service/am/am.h"
+#include "core/hle/service/am/am_net.h"
+
+namespace Service {
+namespace AM {
+
+const Interface::FunctionInfo FunctionTable[] = {
+ {0x08010000, nullptr, "OpenTicket"},
+ {0x08020002, nullptr, "TicketAbortInstall"},
+ {0x08030002, nullptr, "TicketFinalizeInstall"},
+ {0x08040100, nullptr, "InstallTitleBegin"},
+ {0x08050000, nullptr, "InstallTitleAbort"},
+ {0x080600C0, nullptr, "InstallTitleResume"},
+ {0x08070000, nullptr, "InstallTitleAbortTMD"},
+ {0x08080000, nullptr, "InstallTitleFinish"},
+ {0x080A0000, nullptr, "OpenTMD"},
+ {0x080B0002, nullptr, "TMDAbortInstall"},
+ {0x080C0042, nullptr, "TMDFinalizeInstall"},
+ {0x080E0040, nullptr, "OpenContentCreate"},
+ {0x080F0002, nullptr, "ContentAbortInstall"},
+ {0x08100040, nullptr, "OpenContentResume"},
+ {0x08120002, nullptr, "ContentFinalizeInstall"},
+ {0x08130000, nullptr, "GetTotalContents"},
+ {0x08140042, nullptr, "GetContentIndexes"},
+ {0x08150044, nullptr, "GetContentsInfo"},
+ {0x08190108, nullptr, "Unknown"},
+ {0x081B00C2, nullptr, "InstallTitlesFinish"},
+};
+
+AM_NET_Interface::AM_NET_Interface() {
+ Register(FunctionTable);
+}
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_net.h b/src/core/hle/service/am/am_net.h
new file mode 100644
index 00000000..25d2c3f2
--- /dev/null
+++ b/src/core/hle/service/am/am_net.h
@@ -0,0 +1,22 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace AM {
+
+class AM_NET_Interface : public Service::Interface {
+public:
+ AM_NET_Interface();
+
+ std::string GetPortName() const override {
+ return "am:net";
+ }
+};
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_sys.cpp b/src/core/hle/service/am/am_sys.cpp
new file mode 100644
index 00000000..864fc14d
--- /dev/null
+++ b/src/core/hle/service/am/am_sys.cpp
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/hle.h"
+#include "core/hle/service/am/am.h"
+#include "core/hle/service/am/am_sys.h"
+
+namespace Service {
+namespace AM {
+
+const Interface::FunctionInfo FunctionTable[] = {
+ {0x00010040, TitleIDListGetTotal, "TitleIDListGetTotal"},
+ {0x00020082, GetTitleIDList, "GetTitleIDList"},
+};
+
+AM_SYS_Interface::AM_SYS_Interface() {
+ Register(FunctionTable);
+}
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_sys.h b/src/core/hle/service/am/am_sys.h
new file mode 100644
index 00000000..b114f1d3
--- /dev/null
+++ b/src/core/hle/service/am/am_sys.h
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace AM {
+
+class AM_SYS_Interface : public Service::Interface {
+public:
+ AM_SYS_Interface();
+
+ std::string GetPortName() const override {
+ return "am:sys";
+ }
+};
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_u.cpp b/src/core/hle/service/am/am_u.cpp
new file mode 100644
index 00000000..6bf84b36
--- /dev/null
+++ b/src/core/hle/service/am/am_u.cpp
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/hle.h"
+#include "core/hle/service/am/am.h"
+#include "core/hle/service/am/am_u.h"
+
+namespace Service {
+namespace AM {
+
+const Interface::FunctionInfo FunctionTable[] = {
+ {0x00010040, TitleIDListGetTotal, "TitleIDListGetTotal"},
+ {0x00020082, GetTitleIDList, "GetTitleIDList"},
+};
+
+AM_U_Interface::AM_U_Interface() {
+ Register(FunctionTable);
+}
+
+} // namespace AM
+} // namespace Service
diff --git a/src/core/hle/service/am/am_u.h b/src/core/hle/service/am/am_u.h
new file mode 100644
index 00000000..3b2454b6
--- /dev/null
+++ b/src/core/hle/service/am/am_u.h
@@ -0,0 +1,22 @@
+// Copyright 2015 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included..
+
+#pragma once
+
+#include "core/hle/service/service.h"
+
+namespace Service {
+namespace AM {
+
+class AM_U_Interface : public Service::Interface {
+public:
+ AM_U_Interface();
+
+ std::string GetPortName() const override {
+ return "am:u";
+ }
+};
+
+} // namespace AM
+} // namespace Service