New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce XNET, XONLINES database v2 #758
Conversation
XnInit is for only XNETS library. XNET library is different one. Verified with Halo - Combat Evolved (3911) Tony Hawk's Pro Skater 3 (4039)
Verified with MotoGP (4361)
Verified this PR with - XNETS [3911] Halo [4039] Tony Hawk's Pro Skater 3 [4361] MotoGP [4721] TimeSplitters 2 - XNETN [5344] Stake - XONLINES [4831] NBA2K3 [4928] Unreal Championship [5028] Capcom vs. SNK 2 EO [5120] Muzzle Flash [5233] MotoGP 2 [5344] Burnout 2 [5455] Ghost Recon Island Thunder [5558] XIII [5659] Plus Plum 2 [5788] All-Star Baseball '05 [5849] Kingdom Under Fire: The Crusaders
Well done again! I do wish to ask a favor; Please insert an empty line before Thanks in advance. |
I'm providing a share research to know what's the difference between XOnline, XOnlines, etc. XOnline Library Versions for Xbox Live
XNet Library Versions
Anyhow, I had researched some titles and found out as mentioned in #723, some libraries actually require yet is not mentioned in library versions array within the title's xbe such as below.
By not using the above method will cause problem with most of the titles. Except, I did not implement support for it... P.S. For myself and others, |
@@ -209,7 +204,7 @@ const HLEDataV2 HLEDataBaseV2[] = { | |||
//{ Lib_XONLINE,{ Sec_XONLINE }, XONLINES_OOVPAV2, XONLINES_OOVPA_SIZEV2 }, | |||
|
|||
// Fun fact, XONLINES are split into 2 header sections. | |||
//{ Lib_XONLINES,{ Sec_XONLINE, Sec_XNET }, XONLINES_OOVPAV2, XONLINES_OOVPA_SIZEV2 }, | |||
{ Lib_XONLINES,{ Sec_text, Sec_XONLINE, Sec_XNET }, XONLINES_OOVPAV2, XONLINES_OOVPA_SIZEV2 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, now I'm asking what's the reason to have Sec_text included? Like which function is inline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no answer, but inlined functions are worrisome, because if we need to patch them, how can we ever be sure there's only one occurrence in the Xbe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since XAPI functions exist in .text rather in an XAPI segment, it's very possible that other libraries add functions to .text too.
I don't think this necessarily means the functions are being inlined, as that would alter the signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then we need another term;
Inline is when a function is embedded into the caller. Which means multiple callers result in multiple inclusions.
But right now we're taking about something else. Namely, when a function is linked into an Xbe (but not in it's own section), and not inlined, thus it only appears once. What shall we call these?
"Out-of-section functions" is descriptive and clear, but too long.
We could call them "embedded functions", "roaming functions" or "foreign functions". Maybe something else - what do you guys think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatrickvL TBD (To be determined), it still need more research and accuracy data before we can say "yeah, it is embedded/inline function". My wip research about this XOnline and XNet libraries are showing otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XNetGetEthernetLinkStatus function has it in Sec_text. Other functions seem has it in Sec_XONLINE or Sec_XNET.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange, I can confirm what jarupxx is saying about XNetGetEthernetLinkStatus is in Sec_text section. It is indeed match perfectly. Even the callers is exactly the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatrickvL turns out it is not inline function. Odd huh?
@LukeUsher, I remember you were saying XOnline and XNet are completely separate thing. My current wip research and committed in this PR, are showing it differently. Both XOnline and XNet indeed have: (XNet OOVPA registers, yet is registers in XOnline)
I'll investigate this with Unreal Championship title base on @jarupxx's note stating all are found. |
I inserted an empty line before #if and after #endif, it looks good! |
@RadWolfie |
Here's what I discover by choosing specific section to scan. text:
xnet:
xonline:
LukeUsher is pretty much right. XOnline for any xonline functionality (doesn't matter if it has bind, listen, recv, etc functions in it). XNet for any general networking usage. I find it odd how Xbox dev team process this into xbe build a bit differently than I thought. |
@jarupxx What I think is XOnline__ library is built right on top of XNet library. Aka a combo. Currently it is correct. Except... we need to separate XNet and XOnline identically. Something like this... //XOnline section
REGISTER_OOVPAS(XOnlineLogon, PATCH, 4361),
...
//XNet section
REGISTER_OOVPAS(bind, PATCH, 3911, 4627),
... What do you guys think? @LukeUsher I don't think we can avoid XNet OOVPAs registrations being include in XOnline OOVPAs registrations? Since it might be randomly include of those 3 sections over time? Please provide feedback if you can to straighten this out with a solution. |
@RadWolfie I got it. Added a note for reader. |
Merged since no other solution is available. |
Known revision found is
XNETS 3911, 4039, 4361, 4721
XNETN 5344
XONLINES 4831 to 5849
Checked other revisions by the Dxbx Patterns.