Jump to content

Getting IPX working. Making it so the protocal is highlighted

IPX mod

  • Please log in to reply
8 replies to this topic

#1 -Rhiyo-

  • Guest

Posted 11 January 2013 - 03:17 AM

Hey, I've got the IPX in IE games working using http://www.solemnwar...net/ipxwrapper/ to emulate IPX.

This is workaround for the lag that you get when trying to play multiplayer through TCP/IP and it being slow to enter. Would emulating IPX over UDP cause any issues for multiplayer?

Also, I'm trying to mod the game so IPX is always lit up, right now the game checks the registry to see if IPX is on the pc and then it will light up and be pressable, where as I want it not to check the registry, and just be light up and know that the dll file is in it's own folder.

Could anyone help me start this/direct me to where I would start this? Thanks. Great site by the way.

#2 aqrit

  • Member
  • 132 posts

Posted 11 January 2013 - 10:53 AM

You would use a disassembler or debugger
Find where the program calls DPLAYX export #1 ( DirectPlayCreate )

Then find where the program calls pDP->EnumConnections()
Get the callback address passed to EnumConnections.

That is where you want to be.
Look around for the IPX GUID maybe
Or find where the IPX button is enabled.

Maybe one of the GUI modders will have an easier anwser.

Edited by aqrit, 11 January 2013 - 11:10 AM.

#3 aqrit

  • Member
  • 132 posts

Posted 11 January 2013 - 01:42 PM

I started looking at ToB...

Getting the button enabled is only half the battle....

DirectPlay still needs to know the Name/Path of the Dll and the two "Reserve" registry entries.

I don't know an easy way to do that.

Here is a quick look at the easy half

arg_4 of sub_9C3C04 is IDirectPlay4A* g_lpDP

so with a debugger set a bp at the end of sub_9C3C04
then set a hardware bp at g_lpDP->vtable->0x8C  ( EnumConnections )

we see it is called from 009C448F
so the callback function is sub_9C4C76
which is something of a wrapper for sub_9C2C23

sub_9C2C23( sz, lpguidSP, lpConnection, dwConnectionSize )

what is lpConnection? [ http://source.winehq...dplobby.c#L1487 ]

ipx = {
    ( padded out till end but should it be DPAID_INetPort?? )    

sub_9C2C23( "IPX", offset unk_AB9548, &ipx, 0x50 );

#4 Rhiyo

  • Member
  • 4 posts

Posted 11 January 2013 - 07:01 PM

Hey aqrit, I messaged you over at the gog forums yesterday.

Although I'm not that skilled in using debugger software, I do have some knowledge in it. So I'll give it look through soon and have go at it.

Thanks for your help, it's been a major step forward already.

If it were an easy thing to do I'd either get it to check if IPX is on the computer first, and if not then check the base directory, or maybe a better thing to do would be adding a new button called "UDP" considering this is technically UDP.

#5 aqrit

  • Member
  • 132 posts

Posted 12 January 2013 - 12:02 AM

DirectPlay still needs to know the Name/Path of the Dll and the two "Reserve" registry entries.

Debugging isn't going to help.
Game -> DirectPlay -> IPX Service Provider
What really needs to be patched is DPLAYX.dll
AFAIK there is no clean way of doing that.

What do we have against registry entries?
You can change the SP GUID and Dll name to something else... if you're worried about conflicts.

more garbage:
Tob calls InitializeConnection from 009C4840
the service provider dll is loaded and SPInit is called 
SPINITDATA is passed to SPInit 
SPINITDATA contains the two "Reserve" fields

#6 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 12 January 2013 - 05:37 AM

What do we have against registry entries?

Well, I don't know about the original poster, but mine(register entries) for example show problems usually because they are oddly missing even when the programs are installed. Or they are just wrong. And I bet you don't want to create additional problems (to end users) by locking something to just check on an odd file in the middle of no where... try deleting you BG2 game directory after installing the ToB, just for kicks. :devil:
Yes, that's just generally on register entries, it might not have anything else to do with the subject... but you should still consider it.

Deactivated account. The user today is known as The Imp.

#7 Rhiyo

  • Member
  • 4 posts

Posted 12 January 2013 - 10:56 PM

I just disliking having odd registry files lying around, but if this is not possible I'm fine with using registry files then.

#8 aqrit

  • Member
  • 132 posts

Posted 15 January 2013 - 12:47 PM

If Wine's DPLAYX.dll is just a drop-in replacement then you can add the stuff you want very easily.


we control both the game and the new dpwsockx.dll
TCP/IP and IPX historically both used dpwsockx.dll
so you could piggy-back on the TCP SP.

[ in the game ]
If after EnumConnections returns and IPX is not enabled then copy the info for tcp to ipx.

[ in the new dpwsockx.dll ]
In SPInit,
Check the passed GUID

If the GUID is IPX
hResult = r_SPInit(data);
if( SUCCEEDED( hResult ){ return hResult; }
else { let IPXWrapper run. }

If TCP check with the game to see if IPX is seleted.
If IPX is selected but the passed GUID is TCP...
Then fixup the two reserve fields and the GUID in "data" and and let IPXWrapper run.

Else just
"return r_SPInit(data);"
which I assume loads dpwsockx.dll from the system directory and call its SPInit

Is IPXWrapper compatible with native IPX implementations?
( aka. can one player be running win9x and the other be using IPXWrapper? )


Edited by aqrit, 15 January 2013 - 01:36 PM.

#9 Rhiyo

  • Member
  • 4 posts

Posted 16 January 2013 - 03:39 PM

I can't be certain, and I have no way of testing it, but I doubt it considering it tunnels all the packets to UDP (I'm no network expert, though).