diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 06be9940e..90fdde6c7 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -44,6 +44,20 @@ void GetNumContentInfos(Service::Interface* self) { LOG_WARNING(Service_AM, "(STUBBED) called"); } +void ListDataTitleTicketInfos(Service::Interface* self) { + u32* cmd_buff = Kernel::GetCommandBuffer(); + u32 ticket_count = cmd_buff[1]; + u64 title_id = cmd_buff[2]; + title_id = (title_id << 32) | cmd_buff[3]; + u32 start_index = cmd_buff[4]; + u32 tipointer = cmd_buff[6]; + + cmd_buff[1] = RESULT_SUCCESS.raw; + cmd_buff[2] = 0x18; + LOG_WARNING(Service_AM, "(STUBBED) TicketCount=0x%08X TitleID==0x%16X StartIndex=0x%08X", + "TicketInfosPointer=0x%08X",ticket_count, title_id, start_index, tipointer); +} + void Init() { using namespace Kernel; diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 15e63bc7b..d9540e747 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -50,6 +50,20 @@ void GetTitleIDList(Service::Interface* self); */ void GetNumContentInfos(Service::Interface* self); +/** +* AM::ListDataTitleTicketInfos service function +* Inputs: +* 1 : Ticket count +* 2-3 : u64, Title ID +* 4 : Start Index? +* 5 : (TicketCount * 24) << 8 | 0x4 +* 6 : Ticket Infos pointer +* Outputs: +* 1 : Result, 0 on success, otherwise error code +* 2 : Number of content infos plus one ,0x18 +*/ +void ListDataTitleTicketInfos(Service::Interface* self); + /// Initialize AM service void Init(); diff --git a/src/core/hle/service/am/am_app.cpp b/src/core/hle/service/am/am_app.cpp index 16c76a1eb..06747e6c1 100644 --- a/src/core/hle/service/am/am_app.cpp +++ b/src/core/hle/service/am/am_app.cpp @@ -9,14 +9,14 @@ namespace Service { namespace AM { const Interface::FunctionInfo FunctionTable[] = { - {0x100100C0, GetNumContentInfos, "GetNumContentInfos"}, - {0x10020104, nullptr, "FindContentInfos"}, - {0x10030142, nullptr, "ListContentInfos"}, - {0x10040102, nullptr, "DeleteContents"}, - {0x10050084, nullptr, "GetDataTitleInfos"}, - {0x10070102, nullptr, "ListDataTitleTicketInfos"}, - {0x100900C0, nullptr, "IsDataTitleInUse"}, - {0x100A0000, nullptr, "IsExternalTitleDatabaseInitialized"}, + {0x100100C0, GetNumContentInfos, "GetNumContentInfos"}, + {0x10020104, nullptr, "FindContentInfos"}, + {0x10030142, nullptr, "ListContentInfos"}, + {0x10040102, nullptr, "DeleteContents"}, + {0x10050084, nullptr, "GetDataTitleInfos"}, + {0x10070102, ListDataTitleTicketInfos, "ListDataTitleTicketInfos"}, + {0x100900C0, nullptr, "IsDataTitleInUse"}, + {0x100A0000, nullptr, "IsExternalTitleDatabaseInitialized"}, }; AM_APP_Interface::AM_APP_Interface() {