[Kernel] Recording more Xam app messages

- Recording more xam app messages for future reference
- Removed mistakes from messenger_app.h
- Added missing buffer_ptr, buffer_length to unknown message id logs
- transfer over netplay app messages
This commit is contained in:
The-Little-Wolf 2024-08-31 23:17:23 -07:00
parent 263c722a40
commit b07bd0b082
7 changed files with 450 additions and 40 deletions

View File

@ -29,7 +29,9 @@ X_RESULT MessengerApp::DispatchMessageSync(uint32_t message,
case 0x00200002: { case 0x00200002: {
// Used on start in blades dashboard v5759 (marketplace update) and // Used on start in blades dashboard v5759 (marketplace update) and
// possibly to 6717 with netplay // possibly to 6717 with netplay
XELOGD("MessengerUnk200002, unimplemented"); assert_true(!buffer_length || buffer_length == 12);
XELOGD("MessengerUnk200002({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_FAIL; return X_E_FAIL;
} }
} }

View File

@ -7,8 +7,8 @@
****************************************************************************** ******************************************************************************
*/ */
#ifndef XENIA_KERNEL_XAM_APPS_UNKNOWN_F7_APP_H_ #ifndef XENIA_KERNEL_XAM_APPS_MESSENGER_APP_H_
#define XENIA_KERNEL_XAM_APPS_UNKNOWN_F7_APP_H_ #define XENIA_KERNEL_XAM_APPS_MESSENGER_APP_H_
#include "xenia/kernel/kernel_state.h" #include "xenia/kernel/kernel_state.h"
#include "xenia/kernel/xam/app_manager.h" #include "xenia/kernel/xam/app_manager.h"
@ -31,4 +31,4 @@ class MessengerApp : public App {
} // namespace kernel } // namespace kernel
} // namespace xe } // namespace xe
#endif // XENIA_KERNEL_XAM_APPS_UNKNOWN_FE_APP_H_ #endif XENIA_KERNEL_XAM_APPS_MESSENGER_APP_H_

View File

@ -14,6 +14,11 @@
#include "xenia/kernel/kernel_state.h" #include "xenia/kernel/kernel_state.h"
#include "xenia/kernel/xenumerator.h" #include "xenia/kernel/xenumerator.h"
// Notes:
// - Messages ids that start with 0x00021xxx are UI calls
// - Messages ids that start with 0x00023xxx are used for the user profile
// - Messages ids that start with 0x0002Bxxx are used for the Kinect
namespace xe { namespace xe {
namespace kernel { namespace kernel {
namespace xam { namespace xam {
@ -88,10 +93,6 @@ X_HRESULT XamApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
(uint32_t)data->unk_48); (uint32_t)data->unk_48);
return X_E_SUCCESS; return X_E_SUCCESS;
} }
case 0x00021012: {
XELOGD("XamApp(0x00021012)");
return X_E_SUCCESS;
}
case 0x00022005: { case 0x00022005: {
struct message_data { struct message_data {
xe::be<uint32_t> deployment_type_ptr; xe::be<uint32_t> deployment_type_ptr;
@ -105,6 +106,13 @@ X_HRESULT XamApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
data->deployment_type_ptr.get(), data->overlapped_ptr.get()); data->deployment_type_ptr.get(), data->overlapped_ptr.get());
return X_E_SUCCESS; return X_E_SUCCESS;
} }
case 0x0002B003: {
// Games used in:
// 4D5309C9
XELOGD("XamUnk2B003({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
} }
XELOGE( XELOGE(
"Unimplemented XAM message app={:08X}, msg={:08X}, arg1={:08X}, " "Unimplemented XAM message app={:08X}, msg={:08X}, arg1={:08X}, "

View File

@ -16,12 +16,54 @@ namespace xe {
namespace kernel { namespace kernel {
namespace xam { namespace xam {
namespace apps { namespace apps {
/*
* Most of the structs below were found in the Source SDK, provided as stubs.
* Specifically, they can be found in the Source 2007 SDK and the Alien Swarm
* Source SDK. Both are available on Steam for free. A GitHub mirror of the
* Alien Swarm SDK can be found here:
* https://github.com/NicolasDe/AlienSwarm/blob/master/src/common/xbox/xboxstubs.h
*/
struct X_XUSER_ACHIEVEMENT { struct X_XUSER_ACHIEVEMENT {
xe::be<uint32_t> user_idx; xe::be<uint32_t> user_idx;
xe::be<uint32_t> achievement_id; xe::be<uint32_t> achievement_id;
}; };
struct XUSER_STATS_READ_RESULTS {
xe::be<uint32_t> NumViews;
xe::be<uint32_t> pViews;
};
struct XUSER_STATS_VIEW {
xe::be<uint32_t> ViewId;
xe::be<uint32_t> TotalViewRows;
xe::be<uint32_t> NumRows;
xe::be<uint32_t> pRows;
};
struct XUSER_STATS_COLUMN {
xe::be<uint16_t> ColumnId;
X_USER_DATA Value;
};
struct XUSER_STATS_SPEC {
xe::be<uint32_t> ViewId;
xe::be<uint32_t> NumColumnIds;
xe::be<uint16_t> rgwColumnIds[0x40];
};
struct XUSER_STATS_RESET {
xe::be<uint32_t> user_index;
xe::be<uint32_t> view_id;
};
struct XUSER_ANID {
xe::be<uint32_t> user_index;
xe::be<uint32_t> cchAnIdBuffer;
xe::be<uint32_t> pszAnIdBuffer;
xe::be<uint32_t> value_const; // 1
};
XgiApp::XgiApp(KernelState* kernel_state) : App(kernel_state, 0xFB) {} XgiApp::XgiApp(KernelState* kernel_state) : App(kernel_state, 0xFB) {}
// http://mb.mirage.org/bugzilla/xliveless/main.c // http://mb.mirage.org/bugzilla/xliveless/main.c
@ -108,6 +150,8 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
return X_E_SUCCESS; return X_E_SUCCESS;
} }
case 0x000B0010: { case 0x000B0010: {
XELOGD("XSessionCreate({:08X}, {:08X}), implemented in netplay",
buffer_ptr, buffer_length);
assert_true(!buffer_length || buffer_length == 28); assert_true(!buffer_length || buffer_length == 28);
// Sequence: // Sequence:
// - XamSessionCreateHandle // - XamSessionCreateHandle
@ -130,8 +174,8 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
return X_E_SUCCESS; return X_E_SUCCESS;
} }
case 0x000B0011: { case 0x000B0011: {
// TODO(PermaNull): reverse buffer contents. XELOGD("XGISessionDelete({:08X}, {:08X}), implemented in netplay",
XELOGD("XGISessionDelete"); buffer_ptr, buffer_length);
return X_STATUS_SUCCESS; return X_STATUS_SUCCESS;
} }
case 0x000B0012: { case 0x000B0012: {
@ -147,18 +191,75 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
user_count, unk_0, user_index_array, private_slots_array); user_count, unk_0, user_index_array, private_slots_array);
return X_E_SUCCESS; return X_E_SUCCESS;
} }
case 0x000B0013: {
XELOGD(
"XGISessionLeaveLocal({:08X}, {:08X}), implemented by netplay build",
buffer_ptr, buffer_length);
assert_true(buffer_length == 0x14);
return X_E_FAIL;
}
case 0x000B0014: { case 0x000B0014: {
// Gets 584107FB in game. // Gets 584107FB in game.
// get high score table? // get high score table?
XELOGD("XGI_unknown"); XELOGD("XSessionStart({:08X}), implemented in netplay", buffer_ptr);
return X_STATUS_SUCCESS; return X_STATUS_SUCCESS;
} }
case 0x000B0015: { case 0x000B0015: {
// send high scores? // send high scores?
XELOGD("XGI_unknown"); XELOGD("XSessionEnd({:08X}, {:08X}), implemented in netplay", buffer_ptr,
buffer_length);
return X_STATUS_SUCCESS; return X_STATUS_SUCCESS;
} }
case 0x000B0016: {
XELOGD("XSessionSearch({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B0018: {
XELOGD("XSessionModify({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B0019: {
XELOGD("XSessionGetInvitationData({:08X}, {:08X}), unimplemented",
buffer_ptr, buffer_length);
return X_E_SUCCESS;
}
case 0x000B001A: {
XELOGD(
"XSessionArbitrationRegister({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B001B: {
XELOGD("XSessionSearchByID({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B001C: {
XELOGD("XSessionSearchEx({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B001D: {
XELOGD("XSessionGetDetails({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B001E: {
XELOGD("XSessionMigrateHost({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B0020: {
XELOGD("XUserResetStatsView({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B0021: { case 0x000B0021: {
XELOGD("XUserReadStats");
struct XLeaderboard { struct XLeaderboard {
xe::be<uint32_t> titleId; xe::be<uint32_t> titleId;
xe::be<uint32_t> xuids_count; xe::be<uint32_t> xuids_count;
@ -172,19 +273,35 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
if (!data->results_guest_address) { if (!data->results_guest_address) {
return 1; return 1;
} }
return X_E_SUCCESS;
}
case 0x000B0025: {
XELOGD("XSessionWriteStats({:08X}), implemented by netplay build",
buffer_ptr);
return X_E_FAIL;
}
case 0x000B0026: {
XELOGD("XSessionFlushStats({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
} }
case 0x000B0036: { case 0x000B0036: {
// Called after opening xbox live arcade and clicking on xbox live v5759 // Called after opening xbox live arcade and clicking on xbox live v5759
// to 5787 and called after clicking xbox live in the game library from // to 5787 and called after clicking xbox live in the game library from
// v6683 to v6717 // v6683 to v6717
XELOGD("XGIUnkB0036, unimplemented"); XELOGD("XGIUnkB0036({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_FAIL; return X_E_FAIL;
} }
case 0x000B003D: { case 0x000B003D: {
// Games used in: // Used in 5451082A, 5553081E
// - 5451082a (netplay build). // XUserGetCachedANID
XELOGD("XGIUnkB003D, unimplemented"); // Used in 5451082A, 5553081E
return X_E_FAIL; XELOGI("XUserGetANID({:08X}, {:08X}), implemented in netplay", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
} }
case 0x000B0041: { case 0x000B0041: {
assert_true(!buffer_length || buffer_length == 32); assert_true(!buffer_length || buffer_length == 32);
@ -209,10 +326,20 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
} }
xe::store_and_swap<uint32_t>(context + 4, value); xe::store_and_swap<uint32_t>(context + 4, value);
} }
return X_E_SUCCESS;
}
case 0x000B0060: {
XELOGD("XSessionSearchByIds({:08X}), implemented in netplay", buffer_ptr);
return X_E_FAIL; return X_E_FAIL;
} }
case 0x000B0065: {
XELOGD("XSessionSearchWeighted({:08X}, {:08X}), unimplemented",
buffer_ptr, buffer_length);
return X_E_SUCCESS;
}
case 0x000B0071: { case 0x000B0071: {
XELOGD("XGI 0x000B0071, unimplemented"); XELOGD("XGIUnkB0071({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS; return X_E_SUCCESS;
} }
} }

View File

@ -28,20 +28,156 @@ X_HRESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
// NOTE: buffer_length may be zero or valid. // NOTE: buffer_length may be zero or valid.
auto buffer = memory_->TranslateVirtual(buffer_ptr); auto buffer = memory_->TranslateVirtual(buffer_ptr);
switch (message) { switch (message) {
case 0x00050002: {
// Current session must have PRESENCE flag.
XELOGD("XInviteSend({:08X}, {:08X}), implemented by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00050008: {
// Required to be successful for 534507D4
// Guess:
// XStorageDownloadToMemory -> XStorageDownloadToMemoryGetProgress
XELOGD(
"XStorageDownloadToMemoryGetProgress({:08x}, {:08x}), unimplemented",
buffer_ptr, buffer_length);
return X_E_SUCCESS;
}
case 0x00050009: {
// Fixes Xbox Live error for 513107D9
XELOGD("XStorageDownloadToMemory({:08X}, {:08X}), unimplemented",
buffer_ptr, buffer_length);
return XStorageDownloadToMemory(buffer_ptr);
}
case 0x0005000A: {
XELOGD("XStorageEnumerate({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x0005000B: {
// Fixes Xbox Live error for 43430821
XELOGD("XStorageUploadFromMemory({:08X}, {:08X}), unimplemented",
buffer_ptr, buffer_length);
return XStorageUploadFromMemory(buffer_ptr);
}
case 0x0005000C: {
XELOGD("XStringVerify({:08X} {:08X}), Stubbed", buffer_ptr,
buffer_length);
return XStringVerify(buffer_ptr, buffer_length);
}
case 0x0005000D: {
// Fixes hang when leaving session for 545107D5
// 415607D2 says this is XStringVerify
XELOGD("XStringVerify({:08X}, {:08X}), Stubbed", buffer_ptr,
buffer_length);
return XStringVerify(buffer_ptr, buffer_length);
}
case 0x0005000E: {
// Before every call there is a call to XUserFindUsers
// Success stub:
// 584113E8 successfully creates session.
// 58410B5D craches.
XELOGD("XUserFindUsersResponseSize({:08X}, {:08X}) unimplemented",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x0005000F: {
// 41560855 included from TU 7
// Attempts to set a dvar for ui_email_address but fails on
// WideCharToMultiByte
//
// 4D530AA5 encounters "Failed to retrieve account credentials".
XELOGD("_XAccountGetUserInfo({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_ERROR_FUNCTION_FAILED;
}
case 0x00050010: {
XELOGD("XAccountGetUserInfo({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_ERROR_FUNCTION_FAILED;
}
case 0x00050036: {
XELOGD("XOnlineQuerySearch({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00050038: {
// 4D5307D3
// 4D5307D1
XELOGD("XOnlineQuerySearch({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00050077: {
// Called on blades dashboard v1888
// Current Balance in sub menus:
// All New Demos and Trailers
// More Videos and Downloads
XELOGD("XLiveBaseUnk50077({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00050079: {
// Fixes Xbox Live error for 454107DB
XELOGD("XLiveBaseUnk50079({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x0005008B: {
// Called on blades dashboard v1888
// Fixes accessing marketplace Featured Downloads.
XELOGD("XLiveBaseUnk5008B({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x0005008C: { case 0x0005008C: {
// Called on startup of blades dashboard v1888 to v2858 // Called on startup of blades dashboard v1888 to v2858
XELOGD("XLiveBaseUnk5008C, unimplemented"); XELOGD("XLiveBaseUnk5008C({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_FAIL; return X_E_FAIL;
} }
case 0x0005008F: {
// Called on blades dashboard v1888
// Fixes accessing marketplace sub menus:
// All New Demos and Trailers
// More Videos and Downloads
XELOGD("XLiveBaseUnk5008F({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00050090: {
// Called on blades dashboard v1888
// Fixes accessing marketplace Game Downloads->All Games->Xbox Live Arcade
// sub menu.
XELOGD("XLiveBaseUnk50090({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00050091: {
// Called on blades dashboard v1888
// Fixes accessing marketplace Game Downloads.
XELOGD("XLiveBaseUnk50091({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00050094: { case 0x00050094: {
// Called on startup of blades dashboard v4532 to v4552 // Called on startup of blades dashboard v4532 to v4552
XELOGD("XLiveBaseUnk50094, unimplemented"); XELOGD("XLiveBaseUnk50094({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_FAIL; return X_E_FAIL;
} }
case 0x00050097: {
// Called on blades dashboard v1888
// Fixes accessing marketplace Memberships.
XELOGD("XLiveBaseUnk50097({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00058003: { case 0x00058003: {
// Called on startup of dashboard (netplay build) // Called on startup of dashboard (netplay build)
XELOGD("XLiveBaseLogonGetHR, unimplemented"); // Always receives a buffer ptr and buffer length of zero
return X_E_SUCCESS; XELOGD("XLiveBaseLogonGetHR, implemented by netplay build");
return 0x00151000L; // X_ONLINE_E_LOGON_NO_NETWORK_CONNECTION
} }
case 0x00058004: { case 0x00058004: {
// Called on startup, seems to just return a bool in the buffer. // Called on startup, seems to just return a bool in the buffer.
@ -64,6 +200,48 @@ X_HRESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
buffer_length); buffer_length);
return 0x80151802; // ERROR_CONNECTION_INVALID return 0x80151802; // ERROR_CONNECTION_INVALID
} }
case 0x00058009: {
XELOGD("XContentGetMarketplaceCounts({:08X}, {:08X}) unimplemented",
buffer_ptr, buffer_length);
return X_E_SUCCESS;
}
case 0x0005800C: {
XELOGD(
"XUserMuteListSetState({:08X}, {:08X}), implemented by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x0005800E: {
// Fixes Xbox Live error for 513107D9
XELOGD("XUserMuteListQuery({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00058017: {
XELOGD("XUserFindUsers({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00058019: {
// 54510846
XELOGD(
"XPresenceCreateEnumerator({:08X}, {:08X}), Stubbed by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x0005801C: {
// Called on blades dashboard v1888
XELOGD("XLiveBaseUnk5801C({:08X}, {:08X}), Stubbed by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x0005801E: {
// 54510846
XELOGD("XPresenceSubscribe({:08X}, {:08X}), Stubbed by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00058020: { case 0x00058020: {
// 0x00058004 is called right before this. // 0x00058004 is called right before this.
// We should create a XamEnumerate-able empty list here, but I'm not // We should create a XamEnumerate-able empty list here, but I'm not
@ -75,31 +253,101 @@ X_HRESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
} }
case 0x00058023: { case 0x00058023: {
XELOGD( XELOGD(
"CXLiveMessaging::XMessageGameInviteGetAcceptedInfo({:08X}, {:08X}) " "CXLiveMessaging::XMessageGameInviteGetAcceptedInfo({:08X}, "
"{:08X}) "
"unimplemented", "unimplemented",
buffer_ptr, buffer_length); buffer_ptr, buffer_length);
return X_E_FAIL; return X_E_FAIL;
} }
case 0x00058037: { case 0x00058024: {
XELOGD("XPresenceInitialize({:08X}, {:08X})", buffer_ptr, buffer_length); // Called on blades dashboard v1888
XELOGD("XLiveBaseUnk58024({:08X}, {:08X}), Stubbed by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00058032: {
XELOGD("XGetTaskProgress({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS; return X_E_SUCCESS;
} }
case 0x00058035: {
// Fixes Xbox Live error for 513107D9
// Required for 534507D4
XELOGD(
"XStorageBuildServerPath({:08X}, {:08X}), Stubbed by netplay "
"build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00058037: {
// Used in older games such as Crackdown, FM2, Saints Row 1
XELOGD("XPresenceInitializeLegacy({:08X}, {:08X})", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
case 0x00058044: {
XELOGD("XPresenceUnsubscribe({:08X}, {:08X}), Stubbed by netplay build",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00058046: { case 0x00058046: {
// Used in newer games such as Forza 4, MW3, FH2
//
// Required to be successful for 4D530910 to detect signed-in profile // Required to be successful for 4D530910 to detect signed-in profile
// Doesn't seem to set anything in the given buffer, probably only takes // Doesn't seem to set anything in the given buffer, probably only
// input // takes input
XELOGD("XLiveBaseUnk58046({:08X}, {:08X}) unimplemented", buffer_ptr, XELOGD("XPresenceInitialize({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length); buffer_length);
return X_E_SUCCESS; return X_E_SUCCESS;
} }
} }
XELOGE( XELOGE(
"Unimplemented XLIVEBASE message app={:08X}, msg={:08X}, arg1={:08X}, " "Unimplemented XLIVEBASE message app={:08X}, msg={:08X}, "
"arg1={:08X}, "
"arg2={:08X}", "arg2={:08X}",
app_id(), message, buffer_ptr, buffer_length); app_id(), message, buffer_ptr, buffer_length);
return X_E_FAIL; return X_E_FAIL;
} }
X_HRESULT XLiveBaseApp::XStringVerify(uint32_t buffer_ptr,
uint32_t buffer_length) {
if (!buffer_ptr) {
return X_E_INVALIDARG;
}
// uint32_t* data_ptr =
// kernel_state_->memory()->TranslateVirtual<uint32_t*>(buffer_ptr);
// TODO(Gliniak): Figure out structure after marshaling.
// Based on what game does there must be some structure that
// checks if string is proper.
return X_E_SUCCESS;
}
X_HRESULT XLiveBaseApp::XStorageDownloadToMemory(uint32_t buffer_ptr) {
// 41560817, 513107D5, 513107D9 has issues with X_E_FAIL.
// 513107D5, 513107D9 prefer X_ERROR_FUNCTION_FAILED.
if (!buffer_ptr) {
return X_E_INVALIDARG;
}
// 415607DD has issues with X_E_SUCCESS and X_ERROR_FUNCTION_FAILED.
// if (kernel_state()->title_id() == 0x415607DD) {
// return X_E_FAIL;
// }
return X_E_SUCCESS;
}
X_HRESULT XLiveBaseApp::XStorageUploadFromMemory(uint32_t buffer_ptr) {
if (!buffer_ptr) {
return X_E_INVALIDARG;
}
return X_E_SUCCESS;
}
} // namespace apps } // namespace apps
} // namespace xam } // namespace xam
} // namespace kernel } // namespace kernel

View File

@ -24,6 +24,25 @@ class XLiveBaseApp : public App {
X_HRESULT DispatchMessageSync(uint32_t message, uint32_t buffer_ptr, X_HRESULT DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
uint32_t buffer_length) override; uint32_t buffer_length) override;
private:
X_HRESULT XPresenceInitialize(uint32_t buffer_length);
X_HRESULT XPresenceSubscribe(uint32_t buffer_length);
X_HRESULT XPresenceUnsubscribe(uint32_t buffer_length);
X_HRESULT XPresenceCreateEnumerator(uint32_t buffer_length);
X_HRESULT GetServiceInfo(uint32_t service_id, uint32_t service_info);
X_HRESULT CreateFriendsEnumerator(uint32_t buffer_args);
void UpdateFriendPresence(const uint32_t user_index);
void UpdatePresenceXUIDs(const std::vector<uint64_t>& xuids,
const uint32_t user_index);
X_HRESULT XStringVerify(uint32_t buffer_ptr, uint32_t buffer_length);
X_HRESULT XStorageDownloadToMemory(uint32_t buffer_ptr);
X_HRESULT XStorageUploadFromMemory(uint32_t buffer_ptr);
X_HRESULT XStorageBuildServerPath(uint32_t buffer_ptr);
X_HRESULT Unk58024(uint32_t buffer_length);
X_HRESULT Unk5801C(uint32_t buffer_length);
}; };
} // namespace apps } // namespace apps

View File

@ -439,8 +439,10 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
case 0x0007002B: { case 0x0007002B: {
// Called on the NXE and Kinect dashboard after clicking on the picture, // Called on the NXE and Kinect dashboard after clicking on the picture,
// video, and music library // video, and music library
XELOGD("XMPUnk7002B, unimplemented"); assert_true(!buffer_length || buffer_length == 20);
return X_E_FAIL; XELOGD("XMPUnk7002B({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_INVALIDARG;
} }
case 0x0007002E: { case 0x0007002E: {
assert_true(!buffer_length || buffer_length == 12); assert_true(!buffer_length || buffer_length == 12);
@ -462,8 +464,9 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
} }
case 0x0007002F: { case 0x0007002F: {
// Called on the start up of all dashboard versions before kinect // Called on the start up of all dashboard versions before kinect
XELOGD("XMPUnk7002F, unimplemented"); XELOGD("XMPUnk7002F({:08X}, {:08X}), unimplemented", buffer_ptr,
return X_E_FAIL; buffer_length);
return X_E_INVALIDARG;
} }
case 0x0007003D: { case 0x0007003D: {
// XMPCaptureOutput // XMPCaptureOutput
@ -485,16 +488,19 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
} }
case 0x00070044: { case 0x00070044: {
// Called on the start up of all dashboard versions before kinect // Called on the start up of all dashboard versions before kinect
// When it returns X_E_FAIL you can access the music player up to version // When it returns X_E_INVALIDARG you can access the music player up to
// 5787 // version 5787
XELOGD("XMPUnk70044, unimplemented"); XELOGD("XMPUnk70044({:08X}, {:08X}), unimplemented", buffer_ptr,
return X_E_FAIL; buffer_length);
return X_E_INVALIDARG;
} }
case 0x00070053: { case 0x00070053: {
// Called on the blades dashboard after clicking on the picture, // Called on the blades dashboard after clicking on the picture,
// video, and music library // video, and music library in rapid succession then freezes
XELOGD("XMPUnk70053, unimplemented"); // it only recieves buffer
return X_E_FAIL; XELOGD("XMPUnk70053({:08X}, {:08X}), unimplemented", buffer_ptr,
buffer_length);
return X_E_INVALIDARG;
} }
} }
XELOGE( XELOGE(