This commit is contained in:
The-Little-Wolf 2024-12-21 10:09:18 -08:00 committed by GitHub
commit 18b484b05b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 121 additions and 4 deletions

View File

@ -2,7 +2,7 @@
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. *
* Copyright 2024 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
@ -17,8 +17,110 @@ namespace xe {
namespace kernel {
namespace xam {
// Enum
dword_result_t XamAvatarBeginEnumAssets_entry(
qword_t unk1, // 4 bytes, Var1 + 0x1ed0144
qword_t unk2, // 0x32
dword_t unk3, // 0x1ffffff
int_t unk4, // ULONGLONG, (LZCOUNT(Var2) << 0x20) >> 0x25 ^ 1) + 1
dword_t unk5, // 1
qword_t unk6 // 0
) {
// XMsgStartIORequestEx(0xf3, 0x60000c, unkn6, stack1, 0x14, stack2)
XELOGD("Stubbed");
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarBeginEnumAssets, kAvatars, kStub);
dword_result_t XamAvatarEnumAssets_entry(
dword_t unk1, // Var1 + (0x1A0 or 0x1b0)
dword_t unk2, // Var1 + 0x90
qword_t unk3 // 0
) {
// XMsgStartIORequestEx(0xf3, 0x60000d, unk3, stack1, 8, stack2)
XELOGD("Stubbed");
return X_E_NO_MORE_FILES; // Stop it from calling endlessly
}
DECLARE_XAM_EXPORT1(XamAvatarEnumAssets, kAvatars, kStub);
dword_result_t XamAvatarEndEnumAssets_entry(qword_t unk1) {
// some_function(0x60000e,param_1,0,0,local_10)
XELOGD("Stubbed");
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarEndEnumAssets, kAvatars, kStub);
// Get
dword_result_t XamAvatarGetAssetsResultSize_entry(qword_t unk1, // ?
qword_t unk2, // ?
dword_t unk3 // ?
) {
XELOGD("Stubbed");
// return XMsgInProcessCall(0xf3,0x600005,local_20,0);
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarGetAssetsResultSize, kAvatars, kStub);
dword_result_t XamAvatarGetAssets_entry(qword_t unk1, // ?
word_t unk2, // ?
dword_t unk3, // ?
dword_t unk4, // ?
dword_t unk5, // ?
qword_t unk6 // ?
) {
XELOGD("Stubbed");
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarGetAssets, kAvatars, kStub);
dword_result_t XamAvatarGetAssetIcon_entry(
lpqword_t unk1, // param_2, param_1 + 0x48
dword_t unk2, // 0, param_3
dword_t unk3, // param_1 + 0x3c, Var1 + 3
dword_t unk4, // 4b, param_1 + 0x38, Var1[2]
qword_t unk5 // param_1 + 0x58, Var + 8
) {
// XMsgStartIORequestEx(0xf3, 0x60000B, unk5, stack1, 0x1C, 0x10000000)
XELOGD("Stubbed");
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarGetAssetIcon, kAvatars, kStub);
dword_result_t XamAvatarGetManifestLocalUser_entry(dword_t unk1, // 4b,
dword_t unk2, // 4b,
qword_t unk3 // 8b,
) {
// XMsgStartIORequestEx(0xf3, 0x600003, unk3, stack1, 8, 0)
XELOGD("Stubbed");
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarGetManifestLocalUser, kAvatars, kStub);
dword_result_t XamAvatarGetMetadataRandom_entry(qword_t unk1, // ?
qword_t unk2, // ?
dword_t unk3, // ?
qword_t unk4 // ?
) {
XELOGD("Stubbed");
// some_function(0x600010,param_4,local_28,0xc,local_30)
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarGetMetadataRandom, kAvatars, kStub);
dword_result_t XamAvatarManifestGetBodyType_entry(qword_t body_type) {
// return either char of 1 - male, 2 - female, else - unknown
XELOGD("Stubbed");
return '\x01';
}
DECLARE_XAM_EXPORT1(XamAvatarManifestGetBodyType, kAvatars, kStub);
// Start/End
dword_result_t XamAvatarInitialize_entry(
dword_t unk1, // 1, 4, etc
dword_t unk1, // 1, 2, 4, etc
dword_t unk2, // 0 or 1
dword_t processor_number, // for thread creation?
lpdword_t function_ptrs, // 20b, 5 pointers
@ -26,15 +128,30 @@ dword_result_t XamAvatarInitialize_entry(
dword_t unk6 // flags - 0x00300000, 0x30, etc
) {
// Negative to fail. Game should immediately call XamAvatarShutdown.
return ~0u;
return X_STATUS_SUCCESS; //~0u;
}
DECLARE_XAM_EXPORT1(XamAvatarInitialize, kAvatars, kStub);
void XamAvatarShutdown_entry() {
// No-op.
// Calls XMsgStartIORequestEx(0xf3,0x600002,0,0,0,0).
}
DECLARE_XAM_EXPORT1(XamAvatarShutdown, kAvatars, kStub);
// Animation
dword_result_t XamAvatarLoadAnimation_entry(
// https://github.com/xenia-canary/xenia-canary/commit/212c99eee2724de15f471148d10197d89794ff32
lpqword_t asset_id_ptr, //
dword_t flags, //
dword_t output, // Var1 + 0x2C
qword_t unk1 // Var1 + 0x10
) {
// XMsgStartIORequestEx(0xf3, 0x60000F, unk4, stack1, 0x18, 0x10000000)
XELOGD("Stubbed");
return X_STATUS_SUCCESS;
}
DECLARE_XAM_EXPORT1(XamAvatarLoadAnimation, kAvatars, kStub);
} // namespace xam
} // namespace kernel
} // namespace xe