Logo

CS.RIN.RU - Steam Underground Community

IRC: #cs.rin.ru at irc.rizon.net
It is currently Friday, 17 Apr 2015, 08:41

English | Русский




Post new topic Reply to topic  [ 919 posts ] 
Author Message

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Saturday, 30 Mar 2013, 06:58   
Advanced forumer Завсегдатай
User avatar
Joined: Wednesday, 22 Apr 2009, 06:48
Posts: 170
Hey, is this still a thing? Has there been any developments with this or something quite close to this?


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Monday, 22 Apr 2013, 17:56   
Advanced forumer Завсегдатай
User avatar
Joined: Monday, 04 Aug 2008, 20:17
Posts: 195
Location: Imaginationland
@JorjVirus69

Your wrapper need a more proper login. Some games may not login because events are not send in correct order, take a look in XBOX360 SDK help file. xlive is not documented at all on Windows platform, but XBOX360 have same API! Also XOVERLAPPED structure handling is a problem (Asynchronous IO). NOTE: LocalAlloc can cause some troubles, better use HeapAlloc.
I also attached my old modified xliveless source, it may help because I found many functions prototypes by reversing original xlive.dll and by use of XBOX 360 SDK.


Attachments:
File comment: my old, modified xliveless source
xliveless.7z [46.36 KiB]
Downloaded 105 times
Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Monday, 22 Apr 2013, 18:08   
I live here Три раза сломал клаву :)
User avatar
Joined: Sunday, 25 Sep 2011, 21:50
Posts: 5355
Location: 0100 0011 0101 0011 0101 0010 0100 1001 0100 1110 0101 0010 0101 0101
virusek wrote:
@JorjVirus69

Your wrapper need a more proper login. Some games may not login because events are not send in correct order, take a look in XBOX360 SDK help file. xlive is not documented at all on Windows platform, but XBOX360 have same API! Also XOVERLAPPED structure handling is a problem (Asynchronous IO). NOTE: LocalAlloc can cause some troubles, better use HeapAlloc.
I also attached my old modified xliveless source, it may help because I found many functions prototypes by reversing original xlive.dll and by use of XBOX 360 SDK.

WB!!

_________________
All-In-One Post about getting Free Steam/Origin/Uplay Keys!
The ACF & Manifests Database - Share and download easily and safe!
Image


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Monday, 22 Apr 2013, 18:35   
Advanced forumer Завсегдатай
User avatar
Joined: Monday, 04 Aug 2008, 20:17
Posts: 195
Location: Imaginationland
Hym, seems that login is crashing Bioshock 2... It crashes after sixth XUserGetSigninState call.

EDIT: Bioshock 2 need a proper implemented XUserReadProfileSettingsByXuid, also it calls xlive export #5372 (which purpose is unknown for me).


Last edited by virusek on Monday, 22 Apr 2013, 19:24, edited 1 time in total.

Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Monday, 22 Apr 2013, 19:23   
Moderator
User avatar
Joined: Friday, 06 Jul 2012, 07:00
Posts: 9961
Location: Faster Than Scene
virusek wrote:
Hym, seems that login is crashing Bioshock 2... It crashes after sixth XUserGetSigninState call.


are you able to fix it by any chance?

_________________
Image


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Monday, 22 Apr 2013, 19:38   
Advanced forumer Завсегдатай
User avatar
Joined: Monday, 04 Aug 2008, 20:17
Posts: 195
Location: Imaginationland
Read my edit. Creating emulator for one game is much easier. Creating emulator for all games is complicated task, because it must behave exactly as real XLive, and Xlive emulation is hard - it use event system (sign-in is event based) and asynchronous I/O.

PS: XUserReadProfileSettingsByXuid prototype should look like this, included needed structures:

  1.  
  2. typedef struct _XOVERLAPPED             XOVERLAPPED, *PXOVERLAPPED;
  3.  
  4. typedef
  5.     VOID
  6.     (WINAPI *PXOVERLAPPED_COMPLETION_ROUTINE)(
  7.     __in    DWORD                       dwErrorCode,
  8.     __in    DWORD                       dwNumberOfBytesTransfered,
  9.     __inout PXOVERLAPPED                pOverlapped
  10.     );
  11.  
  12. typedef struct _XOVERLAPPED {
  13.     ULONG_PTR                           InternalLow;
  14.     ULONG_PTR                           InternalHigh;
  15.     ULONG_PTR                           InternalContext;
  16.     HANDLE                              hEvent;
  17.     PXOVERLAPPED_COMPLETION_ROUTINE     pCompletionRoutine;
  18.     DWORD_PTR                           dwCompletionContext;
  19.     DWORD                               dwExtendedError;
  20. } XOVERLAPPED, *PXOVERLAPPED;
  21.  
  22. typedef enum _XUSER_PROFILE_SOURCE
  23. {
  24.     XSOURCE_NO_VALUE = 0,
  25.     XSOURCE_DEFAULT,
  26.     XSOURCE_TITLE,
  27.     XSOURCE_PERMISSION_DENIED
  28. } XUSER_PROFILE_SOURCE;
  29.  
  30. typedef struct  {
  31.     BYTE type;
  32.     union {
  33.         LONG nData;
  34.         LONGLONG i64Data;
  35.         double dblData;
  36.         struct {
  37.             DWORD cbData;
  38.             LPWSTR pwszData;
  39.         }string;
  40.         float fData;
  41.         struct {
  42.             DWORD cbData;
  43.             PBYTE pbData;
  44.         }binary;
  45.         FILETIME ftData;
  46.     };
  47. } XUSER_DATA, *PXUSER_DATA;
  48.  
  49.  
  50. typedef struct _XUSER_PROFILE_SETTING {
  51.     XUSER_PROFILE_SOURCE source;
  52.     union {
  53.         DWORD dwUserIndex;
  54.         XUID xuid;
  55.     }user;
  56.     DWORD dwSettingId;
  57.     XUSER_DATA data;
  58. } XUSER_PROFILE_SETTING, *PXUSER_PROFILE_SETTING;
  59.  
  60. typedef struct _XUSER_READ_PROFILE_SETTING_RESULT {
  61.     DWORD dwSettingsLen;
  62.     XUSER_PROFILE_SETTING *pSettings;
  63. } XUSER_READ_PROFILE_SETTING_RESULT, *PXUSER_READ_PROFILE_SETTING_RESULT;
  64.  
  65. DWORD WINAPI XUserReadProfileSettingsByXuid(
  66.     DWORD dwTitleId,
  67.     DWORD dwUserIndexRequester,
  68.     DWORD dwNumFor,
  69.     const XUID *pxuidFor,
  70.     DWORD dwNumSettingIds,
  71.     const DWORD *pdwSettingIds,
  72.     DWORD *pcbResults,
  73.     PXUSER_READ_PROFILE_SETTING_RESULT pResults,
  74.     PXOVERLAPPED pXOverlapped
  75.     );
  76.  


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Monday, 22 Apr 2013, 23:07   
I live here Три раза сломал клаву :)
User avatar
Joined: Tuesday, 24 Feb 2009, 18:42
Posts: 4772
Location: CZ
would be nice to be able to load Bioshock with DLC properly (ahab's way isnt ideal)

_________________
List of unreleased games: -http://cs.rin.ru/forum/viewtopic.php?f=10&t=65548&p=971440#p971440 /http://pastebin.com/gpge75LJ

Image


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Saturday, 27 Apr 2013, 05:05   
Forum ghost Местное привидение
User avatar
Joined: Saturday, 27 Apr 2013, 04:50
Posts: 408
Location: Rock Town
JorjVirus69, I want to personally thank you for this solution you created. You saved me weeks of frustration caused by the inability of GFWL to save my game progress in BAC GOTY on Windows 8. That's the only game I have had trouble with trying to find a workaround, and it was so simple. Thanks man, you're awesome. Side note: How far along are you with the development of XLive's next update? No rush, just thought I'd ask.


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Tuesday, 30 Apr 2013, 13:37   
Advanced forumer Завсегдатай
User avatar
Joined: Tuesday, 23 Dec 2008, 19:26
Posts: 187
No, the project is not dead and it will not die as i need it myself too.
v2 is in the works, about 30 % complete, however that means i will not make any fixes or patches until it is complete.
Also, this is not my primary project at the moment, so it will take some time until you hear more of this.


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Tuesday, 30 Apr 2013, 14:33   
I live here Три раза сломал клаву :)
User avatar
Joined: Tuesday, 24 Feb 2009, 18:42
Posts: 4772
Location: CZ
JorjVirus69 wrote:
No, the project is not dead and it will not die as i need it myself too.
v2 is in the works, about 30 % complete, however that means i will not make any fixes or patches until it is complete.
Also, this is not my primary project at the moment, so it will take some time until you hear more of this.

we can wait ;-) glad to see you after a while

_________________
List of unreleased games: -http://cs.rin.ru/forum/viewtopic.php?f=10&t=65548&p=971440#p971440 /http://pastebin.com/gpge75LJ

Image


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Tuesday, 30 Apr 2013, 17:42   
Junior Mod
User avatar
Joined: Monday, 06 Jun 2005, 01:28
Posts: 1463
Location: Rin!
Oh man, that is so great!

Thanks Jorj for the heads up! Can't wait! :D

_________________
Ok, something "useful" here:
MEGA.co.nz - My Updates folder.

cs.rin.ru

Watch_Dogs - 3DMGame saves to Reloaded tutorial


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Wednesday, 01 May 2013, 21:00   
Advanced forumer Завсегдатай
User avatar
Joined: Monday, 04 Aug 2008, 20:17
Posts: 195
Location: Imaginationland
@JorjVirus69

You can use my modified xliveless source for function like XShowKeyboardUI (required by F1 2011 for user name and save bolid setting), and XNotifyGetNext (events are needed for some games to proper login).
Attached my current work (Bioshock 2 works now, but DLC is not supported yet).

PS: Can you tell me some spec about XEnumerete? Because structure returned by this function seems to be different than on XBOX360.
PS2: You created fake HANDLE values like 0xDEADCODE, but this will throw exception when game call XCloseHandle/CloseHande on such handle. I'm overcome this by creating fake, not used mutex, it can be safe closed by CloseHandle.
PS3: Bioshock 2 with yours emulator crash at XEnumerete, it is a null pointer somewhere in it.


Attachments:
xliveless.rar [37.31 KiB]
Downloaded 101 times


Last edited by virusek on Wednesday, 01 May 2013, 22:07, edited 1 time in total.
Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Wednesday, 01 May 2013, 22:05   
Advanced forumer Завсегдатай
User avatar
Joined: Tuesday, 23 Dec 2008, 19:26
Posts: 187
virusek wrote:
You can use my modified xliveless source for function like XShowKeyboardUI and XNotifyGetNext

Already implemented properly in v2, XShow actually work as intended: they display an overlay.

virusek wrote:
Can you tell me some spec about XEnumerate? Because structure returned by this function seems to be different than on XBOX360.

Can you be a little more specific ?

virusek wrote:
You created fake HANDLE values like 0xDEADCODE, but this will throw exception when game call XCloseHandle/CloseHande on such handle. I'm overcome this by creating fake, not used mutex, it can be safe closed by CloseHandle.

At first i didn't need handles, and some code from those times has survived. v2 has a dedicated handle table now.

virusek wrote:
Bioshock 2 with yours emulator crash at XEnumerate, it is a null pointer somewhere in it.

Probably due to a previous call to #5372 (XMarketplaceCreateOfferEnumerator) as you pointed out earlier.


PS: I can't open your archive (using 7-zip here).


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Wednesday, 01 May 2013, 22:11   
Advanced forumer Завсегдатай
User avatar
Joined: Monday, 04 Aug 2008, 20:17
Posts: 195
Location: Imaginationland
Archive should work now, I used WinRAR 5.0 b2 to pack it and it seems it defaults now to new RAR5 format...

PS: Bioshock 2 calls also #5356:

  1. 29/04/2013 14:38:30.413 XLiveInitializeEx
  2. 29/04/2013 14:38:30.417 XOnlineStartup
  3. 29/04/2013 14:38:37.310 XLiveOnCreateDevice
  4. 29/04/2013 14:38:37.314 XNotifyCreateListener (0x00000000000000ef)
  5. 29/04/2013 14:38:37.319 XLiveOnResetDevice
  6. 29/04/2013 14:38:38.857 XLiveOnCreateDevice
  7. 29/04/2013 14:38:38.862 XLiveOnResetDevice
  8. 29/04/2013 14:38:38.893 XUserSetContext
  9. 29/04/2013 14:38:38.896 XUserGetSigninInfo(0x00000000,0x00000002,0x0038be14)
  10. 29/04/2013 14:38:38.903 XLiveContentCreateEnumerator
  11. 29/04/2013 14:38:38.908 XEnumerate 1182BF70, *censored AppID*, 00000000
  12. 29/04/2013 14:38:38.913 XLivePBufferAllocate (28)
  13. 29/04/2013 14:38:38.917 XLiveContentCreateAccessHandle
  14. 29/04/2013 14:38:38.921 XLivePBufferGetByteArray
  15. 29/04/2013 14:38:38.925 XLiveContentGetPath
  16. 29/04/2013 14:38:38.928 XLivePBufferFree
  17. 29/04/2013 14:38:38.931 XLiveLess_5356
  18. 29/04/2013 14:38:38.934 XLiveLess_5356
  19. 29/04/2013 14:38:38.937 XLiveContentGetPath
  20. 29/04/2013 14:38:38.941 XEnumerate 1182BF70, *censored AppID*, 00000000
  21. 29/04/2013 14:38:38.945 XCloseHandle
  22. 29/04/2013 14:38:38.948 XLiveLess_5372
  23. 29/04/2013 14:38:38.950 XEnumerate 0E9C0000, 3717544, 00000000
  24. 29/04/2013 14:38:38.959 XUserGetSigninInfo(0x00000000,0x00000002,0x0038be08)
  25. 29/04/2013 14:38:38.985 XUserGetSigninInfo(0x00000000,0x00000002,0x0038be90)
  26. 29/04/2013 14:38:38.993 XUserGetSigninInfo(0x00000000,0x00000001,0x0038c2e8)
  27. 29/04/2013 14:38:38.999 XLiveCreateProtectedDataContext


Top
 Profile  

Post Post subject: Re: XLive (aka GFWL) emulator   
Posted: Wednesday, 01 May 2013, 22:38   
Advanced forumer Завсегдатай
User avatar
Joined: Tuesday, 23 Dec 2008, 19:26
Posts: 187
#5356 is a dlc related function:
  1.  
  2. HRESULT WINAPI XContent_5356( DWORD MustBeZero, XCONTENT_DATA *XContentData, WCHAR *Buffer, DWORD *Length)
  3.  

This function and #5357 are the cause of many dlc related crashes as they are unimplemented.

Also XCONTENT_DATA is not the same from 360, it's something like this:
  1.  
  2. typedef struct _XCONTENT_DATA
  3. {
  4.     DWORD   Unknown1;       // (1)
  5.     DWORD   Unknown2;       // != NULL
  6.     DWORD   Unknown3;       // Content type ? (2)
  7.     BYTE    ContentId[20];
  8. } XCONTENT_DATA;
  9.  


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 919 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 62  Next


Who is online

Users browsing this forum: No registered users and 7 guests


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum




Powered by phpBB® Forum Software © phpBB Group