logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Ask Wine : why doesn't NWNX4 work ?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Alban



Joined: 18 Jan 2012
Posts: 3

PostPosted: Wed Jan 18, 2012 21:45    Post subject: Ask Wine : why doesn't NWNX4 work ? Reply with quote

The context : a nwn2 player called xaphir from the Crossover community came to #nwn2cr.

Don't know what Crossover is ? I didn't either. It's the paid version of wine and is in fact it how the wine dev team gets food in its plate. It's not expensive though (think 50$).

Long things short, we get a chance to get the wine dev to look into the troubles met with nwnx4. They apparently want to boost their product's name in the gaming community and this is an opportunity for them.

To support this effort, it would be interesting to have first hand and fresh informations about the State of the Art information regarding this topic.

FYI, a summary of the related threads from this forum will be made.

Direct feedback from main nwnx dev would be great, including Skywing of course as the main suspect is the hooking code. Assertions like "It would be possible to rework the injector code I posted to not use NtContinue. The change I would make would be to write out into the jump trampoline mov instructions to set all of the registers, followed by a jmp rel32 to branch to the old eip value in lieu of calling NtContinue. (Standard longjmp semantics not used due to a need to preserve volatile registers.)" might interest the wine team, maybe?

As far as testing goes, nwnx4 runs but the hook "breaks" after a while. Proof of concept :

Thanks for your attention.
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Thu Jan 19, 2012 2:03    Post subject: Reply with quote

Different versions use different means for the hook as I recall.

The version I produced used what you had described. The one virusman produced use Detours, which likely does something else, but probably boils down to SetThreadContext to alter the context of the initial thread.
Back to top
View user's profile Send private message
Alban



Joined: 18 Jan 2012
Posts: 3

PostPosted: Thu Jan 19, 2012 11:14    Post subject: Reply with quote

Thanks for your reply Skywing.

So to be clear at the moment you abandoned the non Detours hook and the production version is Detours.

Any chance to get a build of yours in order to test both? Or is it definitely a out-of-sync branch?

Also would you have time to elaborate about what in your opinion would cause the Detour version to lose the hook?

NB : to be fair, it could be considered pointless to get it to work in 2012 as the servers and players bases will diminue, getting windows is easier and VPS make hosting cost less. Though I firmly believe it would be useful for people.
Back to top
View user's profile Send private message
Skywing



Joined: 03 Jan 2008
Posts: 321

PostPosted: Thu Jan 19, 2012 23:03    Post subject: Reply with quote

I don't think it's a pointless endeavor, although I would still recommend using native Windows and not WINE (I'm not sure if all of the other plugins would work properly on WINE, for example whether Mono now supports mixed mode assemblies enough for the NWScript Accelerator plugin to work).

It's probably worth implementing the support for both scenarios to WINE; the code involved is likely to be very similar (supporting thread context setting) if that is what is missing. Something to ask the WINE folks.
Back to top
View user's profile Send private message
Alban



Joined: 18 Jan 2012
Posts: 3

PostPosted: Fri Jan 20, 2012 15:44    Post subject: Reply with quote

I'm glad you consider it a worthy cause. And indeed testing the largest variety of plugins might be required.

Now to be honest and I beg your pardon, I am not sure about the 2nd part of your reply : The 2 scenarios are 1. Detours 2. Your hook ?

Question unsolved "Where do I get the last -even nightly build- versions of these two? " From svn ? Does the Win DDK work to compile them ? or are there compiled versions available ?
Back to top
View user's profile Send private message
BladeandPlow



Joined: 22 Aug 2015
Posts: 4

PostPosted: Thu Sep 10, 2015 13:06    Post subject: NWNX4 on Wine does not recognize the Server Reply with quote

I achieved to run the NWServer with Wine and it does work great. I can connect to it and play normally from any Client.

Now I want to extend it with NWNX4. I achieved to run NWNX4 with Wine and could configure it to launch the correct Server Process with the correct PW Module.
But then NWNX4 cannot recognize the own Server Process and does continuesly launch new Server Processes.

I disabled GameSpy Check and Server Process Check but still it does constantly launch new Server Processes.






I checked the Network Connections and can actually see the open UDP Server Socket.





With Wine the Server Socket is opened as Wineserver, but since it is an UDP Socket there isn't any established Connection between Server and Client.
So I wonder how does the Gamespy Check and the Process Check work?
And also how can I find out more details about why the Process Check did fail?
Back to top
View user's profile Send private message Visit poster's website
BladeandPlow



Joined: 22 Aug 2015
Posts: 4

PostPosted: Thu Oct 08, 2015 23:27    Post subject: Linux Application Reply with quote

I am thinking of an unconventional development where the NWNX4 would be an Linux Application and would launch the NWNServer with Wine.

Since the NWNX4 code is developped with wxWidget which is a Crossplatform Framework there could be a posibility that it also compiles on Linux.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group