netcode-revival: XNetTransport::ForceLiveFlag - force the game's live-user static
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
Writes the title's internal 'live user' flag byte (0x83028851, derived from sub_8263E788's lis -32003 / lbz -30639 = recompiler value -2097348608 -> 0x83030000 - 0x77AF) to 1 so the frontend stops refusing Xbox Live features before it ever calls a rexglue API. Logs the first force.
This commit is contained in:
parent
51b8ce5ed2
commit
73d8f36af2
2 changed files with 21 additions and 0 deletions
|
|
@ -116,6 +116,12 @@ class XNetTransport {
|
||||||
// The local machine's virtual IP (host order) - mirrors XNetGetTitleXnAddr.
|
// The local machine's virtual IP (host order) - mirrors XNetGetTitleXnAddr.
|
||||||
static uint32_t LocalVirtualIp();
|
static uint32_t LocalVirtualIp();
|
||||||
|
|
||||||
|
// netcode-revival: force the title's internal "live user" static flag
|
||||||
|
// (Skate 3 build) so its frontend stops refusing "Xbox Live features"
|
||||||
|
// before it ever calls a rexglue API. Called periodically by the ghost
|
||||||
|
// client. Fragile: the address is tied to this title's build.
|
||||||
|
void ForceLiveFlag();
|
||||||
|
|
||||||
// --- discovery (used by XNetQosLookup) ------------------------------------
|
// --- discovery (used by XNetQosLookup) ------------------------------------
|
||||||
// Send a session query for our room; the reply lands asynchronously and is
|
// Send a session query for our room; the reply lands asynchronously and is
|
||||||
// surfaced by Sessions() once WaitForReply returns.
|
// surfaced by Sessions() once WaitForReply returns.
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,21 @@ bool XNetTransport::Active() const {
|
||||||
return active_;
|
return active_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void XNetTransport::ForceLiveFlag() {
|
||||||
|
// The Skate 3 frontend gates "Xbox Live features" on an internal static
|
||||||
|
// byte (the game's own "live user" flag) and refuses WITHOUT calling any
|
||||||
|
// rexglue API when it is 0. The game sets it from its sign-in manager, but
|
||||||
|
// with no real Live the flag never becomes non-zero. Force it here.
|
||||||
|
// Address from the game: sub_8263E788 does lis r11,-32003 -> r11 =
|
||||||
|
// 0x83030000 (recompiler's -2097348608) then lbz at -30639 =>
|
||||||
|
// 0x83028851. (Fragile: tied to this title's build; revival only.)
|
||||||
|
uint8_t* flag = REX_KERNEL_MEMORY()->TranslateVirtual<uint8_t*>(0x83028851);
|
||||||
|
if (flag != nullptr && *flag == 0) {
|
||||||
|
REXLOG_INFO("xnet trace: forcing game live flag 0x83028851 = 1");
|
||||||
|
*flag = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void XNetTransport::SetRelay(const char* host, uint16_t port, const char* room) {
|
void XNetTransport::SetRelay(const char* host, uint16_t port, const char* room) {
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(mu_);
|
std::lock_guard<std::mutex> lock(mu_);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue