XGI messages to fix Jetpac XBLA. addition changes to get AegisWings, Jetpac, MetalSlug 3, and State of Decay in game.

+ Updated PR from Permanulled PR#1150
This commit is contained in:
Cancerous 2019-08-19 12:35:01 -04:00 committed by illusion
parent 7a2efec4fe
commit ce5845b1aa
5 changed files with 39 additions and 7 deletions

View File

@ -80,8 +80,10 @@ X_RESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
return X_STATUS_SUCCESS;
}
case 0x000B0011: {
// TODO(DrChat): Figure out what this is again
} break;
// TODO(PermaNull): reverse buffer contents.
XELOGD("XGISessionDelete");
return X_STATUS_SUCCESS;
}
case 0x000B0012: {
assert_true(buffer_length == 0x14);
uint32_t session_ptr = xe::load_and_swap<uint32_t>(buffer + 0x0);
@ -95,6 +97,17 @@ X_RESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
user_count, unk_0, user_index_array, private_slots_array);
return X_STATUS_SUCCESS;
}
case 0x000B0014: {
// Gets Jetpac XBLA in game
// get high score table?
XELOGD("XGI_unknown");
return X_STATUS_SUCCESS;
}
case 0x000B0015: {
// send high scores?
XELOGD("XGI_unknown");
return X_STATUS_SUCCESS;
}
case 0x000B0041: {
assert_true(!buffer_length || buffer_length == 32);
// 00000000 2789fecc 00000000 00000000 200491e0 00000000 200491f0 20049340

View File

@ -41,6 +41,14 @@ X_RESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
xe::store_and_swap<uint32_t>(buffer + 0, 1); // XONLINE_NAT_OPEN
return X_ERROR_SUCCESS;
}
case 0x00058007: {
// Occurs if title calls XOnlineGetServiceInfo, expects dwServiceId
// and pServiceInfo. pServiceInfo should contain pointer to
// XONLINE_SERVICE_INFO structure.
XELOGD("CXLiveLogon::GetServiceInfo(%.8X, %.8X)", buffer_ptr,
buffer_length);
return 1229; // ERROR_CONNECTION_INVALID
}
case 0x00058020: {
// 0x00058004 is called right before this.
// We should create a XamEnumerate-able empty list here, but I'm not
@ -51,8 +59,10 @@ X_RESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
return X_STATUS_UNSUCCESSFUL;
}
case 0x00058023: {
XELOGD("XliveBaseUnk58023({:08X}, {:08X}) unimplemented", buffer_ptr,
buffer_length);
XELOGD(
"CXLiveMessaging::XMessageGameInviteGetAcceptedInfo(%.8X, %.8X) "
"unimplemented",
buffer_ptr, buffer_length);
return X_STATUS_UNSUCCESSFUL;
}
case 0x00058046: {

View File

@ -12,6 +12,7 @@
#include "xenia/kernel/util/shim_utils.h"
#include "xenia/kernel/xam/xam_private.h"
#include "xenia/kernel/xevent.h"
#include "xenia/kernel/xthread.h"
#include "xenia/xbox.h"
namespace xe {
@ -47,11 +48,15 @@ dword_result_t XMsgStartIORequest(dword_t app, dword_t message,
app, message, buffer, buffer_length);
if (result == X_ERROR_NOT_FOUND) {
XELOGE("XMsgStartIORequest: app {:08X} undefined", app);
XThread::SetLastError(X_ERROR_NOT_FOUND);
}
if (overlapped_ptr) {
kernel_state()->CompleteOverlappedImmediate(overlapped_ptr, result);
result = X_ERROR_IO_PENDING;
}
if (result == X_ERROR_SUCCESS || X_ERROR_IO_PENDING) {
XThread::SetLastError(0);
}
return result;
}
DECLARE_XAM_EXPORT1(XMsgStartIORequest, kNone, kImplemented);

View File

@ -287,7 +287,9 @@ dword_result_t NetDll_WSARecvFrom(dword_t caller, dword_t socket,
//}
}
return 0;
// we're not going to be receiving packets any time soon
// return error so we don't wait on that - Cancerous
return -1;
}
DECLARE_XAM_EXPORT1(NetDll_WSARecvFrom, kNetworking, kStub);

View File

@ -574,8 +574,10 @@ DECLARE_XAM_EXPORT1(XamSessionCreateHandle, kUserProfiles, kStub);
dword_result_t XamSessionRefObjByHandle(dword_t handle, lpdword_t obj_ptr) {
assert_true(handle == 0xCAFEDEAD);
*obj_ptr = 0;
return X_ERROR_FUNCTION_FAILED;
// TODO(PermaNull): Implement this properly,
// For the time being returning 0xDEADF00D will prevent crashing.
*obj_ptr = 0xDEADF00D;
return X_ERROR_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamSessionRefObjByHandle, kUserProfiles, kStub);