Files
Xenia-Canary/src/xenia/kernel/xam/apps/xlivebase_app.cc
The-Little-Wolf 4abbfa0b04 Xam App
Recording more unknown app messages for future reference.

    Xam message 2B001 is called in Toy Story Mania!

    Xmp messages 7002F and 70044 are called on the start of all dashboard versions before the Kinect update. When 70044 is set to return X_E_FAIL you can access the xbox music player but when it succeeds the emulator locks up and you are forced to close it manually (no crash). The music player can't be access at all past version 5787 and instead goes back to the previous screen as if it is closing itself down. 7002B (NXE and Kinect) and 70053 (Blades) are called when trying to access the music, picture, and video libraries.

    Messenger is only called when using netplay with dashboard versions 5759 to 5787. After that an "xbox live is currently unavailable" messaged is displayed on 3 of the tabs (marketplace, xbox live, and games) blocking any internet related messages from appearing on versions 6683 to 6717.

    Xlivebase message 5008C is called on the start of dashboard versions 1888 to 2858 and 50094 is called instead from versions 4532 to 4552. LogonGetHR is called on the startup of dashboard (netplay version)

    XGI message B0036 is called after clicking on xbox live in the arcade library (v5759 to 5787) or from the game library (v6683 to v6717). B0021 is sent in the games Fatal Fury Special and Beijing 2008. B003D is used by UFC 2009 (netplay build).
2024-08-24 19:36:42 +02:00

107 lines
3.8 KiB
C++

/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2021 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/kernel/xam/apps/xlivebase_app.h"
#include "xenia/base/logging.h"
#include "xenia/base/threading.h"
namespace xe {
namespace kernel {
namespace xam {
namespace apps {
XLiveBaseApp::XLiveBaseApp(KernelState* kernel_state)
: App(kernel_state, 0xFC) {}
// http://mb.mirage.org/bugzilla/xliveless/main.c
X_HRESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
uint32_t buffer_ptr,
uint32_t buffer_length) {
// NOTE: buffer_length may be zero or valid.
auto buffer = memory_->TranslateVirtual(buffer_ptr);
switch (message) {
case 0x0005008C: {
// Called on startup of blades dashboard v1888 to v2858
XELOGD("XLiveBaseUnk5008C, unimplemented");
return X_E_FAIL;
}
case 0x00050094: {
// Called on startup of blades dashboard v4532 to v4552
XELOGD("XLiveBaseUnk50094, unimplemented");
return X_E_FAIL;
}
case 0x00058003: {
// Called on startup of dashboard (netplay build)
XELOGD("XLiveBaseLogonGetHR, unimplemented");
return X_E_SUCCESS;
}
case 0x00058004: {
// Called on startup, seems to just return a bool in the buffer.
assert_true(!buffer_length || buffer_length == 4);
XELOGD("XLiveBaseGetLogonId({:08X})", buffer_ptr);
xe::store_and_swap<uint32_t>(buffer + 0, 1); // ?
return X_E_SUCCESS;
}
case 0x00058006: {
assert_true(!buffer_length || buffer_length == 4);
XELOGD("XLiveBaseGetNatType({:08X})", buffer_ptr);
xe::store_and_swap<uint32_t>(buffer + 0, 1); // XONLINE_NAT_OPEN
return X_E_SUCCESS;
}
case 0x00058007: {
// Occurs if title calls XOnlineGetServiceInfo, expects dwServiceId
// and pServiceInfo. pServiceInfo should contain pointer to
// XONLINE_SERVICE_INFO structure.
XELOGD("CXLiveLogon::GetServiceInfo({:08X}, {:08X})", buffer_ptr,
buffer_length);
return 0x80151802; // ERROR_CONNECTION_INVALID
}
case 0x00058020: {
// 0x00058004 is called right before this.
// We should create a XamEnumerate-able empty list here, but I'm not
// sure of the format.
// buffer_length seems to be the same ptr sent to 0x00058004.
XELOGD("CXLiveFriends::Enumerate({:08X}, {:08X}) unimplemented",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00058023: {
XELOGD(
"CXLiveMessaging::XMessageGameInviteGetAcceptedInfo({:08X}, {:08X}) "
"unimplemented",
buffer_ptr, buffer_length);
return X_E_FAIL;
}
case 0x00058037: {
XELOGD("XPresenceInitialize({:08X}, {:08X})", buffer_ptr, buffer_length);
return X_E_SUCCESS;
}
case 0x00058046: {
// Required to be successful for 4D530910 to detect signed-in profile
// Doesn't seem to set anything in the given buffer, probably only takes
// input
XELOGD("XLiveBaseUnk58046({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
return X_E_SUCCESS;
}
}
XELOGE(
"Unimplemented XLIVEBASE message app={:08X}, msg={:08X}, arg1={:08X}, "
"arg2={:08X}",
app_id(), message, buffer_ptr, buffer_length);
return X_E_FAIL;
}
} // namespace apps
} // namespace xam
} // namespace kernel
} // namespace xe