diff options
author | purpasmart96 <kanzoconfigz@hotmail.com> | 2015-06-12 00:12:16 +0200 |
---|---|---|
committer | purpasmart96 <kanzoconfigz@hotmail.com> | 2015-06-12 05:41:59 +0200 |
commit | 7933dbe6a0eee766a64b26f7d4461a40e473fcdc (patch) | |
tree | 91ae37d96b1e508f63055f285c64225811237b8a /src/core/hle/service/am | |
parent | Merge pull request #848 from lioncash/ldm (diff) | |
download | yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.gz yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.bz2 yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.lz yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.xz yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.tar.zst yuzu-7933dbe6a0eee766a64b26f7d4461a40e473fcdc.zip |
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 55 | ||||
-rw-r--r-- | src/core/hle/service/am/am.h | 47 | ||||
-rw-r--r-- | src/core/hle/service/am/am_app.cpp | 20 | ||||
-rw-r--r-- | src/core/hle/service/am/am_app.h | 22 | ||||
-rw-r--r-- | src/core/hle/service/am/am_net.cpp | 40 | ||||
-rw-r--r-- | src/core/hle/service/am/am_net.h | 22 | ||||
-rw-r--r-- | src/core/hle/service/am/am_sys.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/am/am_sys.h | 22 | ||||
-rw-r--r-- | src/core/hle/service/am/am_u.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/am/am_u.h | 22 |
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 000000000..57dc1ece7 --- /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 000000000..063b8bd09 --- /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 000000000..c6fc81bc3 --- /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 000000000..fd6017d14 --- /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 000000000..b1af0e9d8 --- /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 000000000..25d2c3f23 --- /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 000000000..864fc14df --- /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 000000000..b114f1d35 --- /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 000000000..6bf84b36b --- /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 000000000..3b2454b6c --- /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 |