Tos on 7/6/2008 at 22:16
I'm releasing a "wrapper" .dll for System Shock 2 that converts the old DirectPlay 4 calls that are made for the game's multiplayer support into DirectPlay 8 ones, thereby making multiplayer playable under Windows Vista and eliminating the need to use Hamachi to connect to a host that is behind a router. Stability and latency should also be improved under DirectPlay 8. It can be downloaded from (
http://s149432842.onlinehome.us/files/ss2wrapper.zip) here.
Installation instructions:
1. Copy the files from the .zip into your System Shock 2 directory, making backups where appropriate if you'd like.
2. If you are hosting a game and are behind a router, you may need to forward port 5198 in order for others to connect to you.
3. That's it. The game will automatically load the wrapper .dll at startup, and connecting to or hosting multiplayer games should be much easier than it was before.
Known issues:
- IP addresses are not displayed in the game staging screen for any player other than the host, and the host's internal network IP address will probably be displayed rather than their external one. This will probably not be fixed, since it's a fairly small issue.
catbarf on 7/6/2008 at 22:23
:eek:
I'm not in a position to try it now, but if it works- awesome job!
Nameless Voice on 7/6/2008 at 23:42
Just tried this twice with TF, it crashed near the start of Medsci1 in both cases.
The first time, we had the ureleased version of SecMod installed, and got this error after climbing up the ladder right at the start:
Code:
---------------------------
Shock2.exe - Application Error
---------------------------
The instruction at "0x20b0b62b" referenced memory at "0x00000008". The memory could not be "written".
Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK Cancel
---------------------------
After that, I thought maybe the mod could be the cause of the crash, so we tried again with a vanilla install, and got another crash in roughly the same place. I forgot to copy the memory address, but this time it was a read operation and not a write operation that failed.
The Brain on 7/6/2008 at 23:52
Wow! Thanks, Tos!. :wot: :)
Hmm, apparently you didn't apply this fix over shock2.exe included in Kolya's SS2-Tool-v2.4. If I remember correctly it's based on bobruck's Texture Memory-fixed .exe and it includes Displacer's HD Space-fix (Kolya, can you confirm this?).
So, if you can make some sort of binary patch which includes your fix against this shock2.exe, it would be superb job! :thumb: :D
Tos on 8/6/2008 at 00:38
Quote Posted by Nameless Voice
Just tried this twice with TF, it crashed near the start of Medsci1 in both cases.
The first time, we had the ureleased version of SecMod installed, and got this error after climbing up the ladder right at the start:
After that, I thought maybe the mod could be the cause of the crash, so we tried again with a vanilla install, and got another crash in roughly the same place. I forgot to copy the memory address, but this time it was a read operation and not a write operation that failed.
Hmm. vort and I were able to play through a couple levels past MedSci2 with no issues last night. I did make a few changes since we ran through those levels and only tested it again briefly, so it's definitely possible that I made a mistake somewhere. I just tried to get that to happen on my LAN however, and was able to get all the way up to the upgrade machines on MedSci1 with no issues.
If you can connect to each other without the patch, do you have the same crash there? If not, can you tell me exactly how to reproduce the error if you can get it to happen again? I can't tell what's going on from that error report exactly since it looks like it tried to access memory outside of the game (and probably my DLL too).
Quote Posted by The Brain
Wow! Thanks,
Tos!. :wot: :)
Hmm, apparently you didn't apply this fix over shock2.exe included in Kolya's SS2-Tool-v2.4. If I remember correctly it's based on
bobruck's Texture Memory-fixed .exe and it includes
Displacer's HD Space-fix (
Kolya, can you confirm this?).
So, if you can make some sort of binary patch which includes your fix against this shock2.exe, it would be superb job! :thumb: :D
Wouldn't be difficult to make a patcher. If you can direct me to it though, I'll look into replacing it with that.
Nameless Voice on 8/6/2008 at 01:01
Quote Posted by Tos
If you can connect to each other without the patch, do you have the same crash there? If not, can you tell me exactly how to reproduce the error if you can get it to happen again? I can't tell what's going on from that error report exactly since it looks like it tried to access memory outside of the game (and probably my DLL too).
We can connect through Hamachi, yes. We did some testing of SecMod in multiplayer recently, and it didn't crash. I haven't tried playing vanilla SS2 multiplayer is some time, however.
I didn't do anything special. I grabbed the wrench, smashed the conduit, climbed up the ladder, and it crashed in the corridor beyond. I wasn't hosting.
Yes, it sounds like an access violation. Those would be easier to track if you made a version of ShockEd with this patch applied (having a version of ShockEd with this patch would be useful anyway). I suggest using the (
http://www.strangebedfellows.de/index.php/topic,387.0.html) ShockEd Toolkit version of the editor if you want to try patching one.
I might try testing it again tomorrow.
Tos on 8/6/2008 at 01:25
Quote Posted by Nameless Voice
I didn't do anything special. I grabbed the wrench, smashed the conduit, climbed up the ladder, and it crashed in the corridor beyond. I wasn't hosting.
Very strange. I've repeated that exact sequence of events several times (as a client even) and haven't gotten a single crash. I'm not ruling out the wrapper as being the cause of the problem, but could you try it with a clean installation of SS2?
Quote Posted by Nameless Voice
Yes, it sounds like an access violation. Those would be easier to track if you made a version of ShockEd with this patch applied (having a version of ShockEd with this patch would be useful anyway). I suggest using the (
http://www.strangebedfellows.de/index.php/topic,387.0.html) ShockEd Toolkit version of the editor if you want to try patching one.
I'm not sure why it would be easier to track in ShockEd -- perhaps because of the errorlog.txt that the game writes to when it crashes? I actually wrote something for Thief that logs crashes to errorlog.txt in the same way that Dromed does, and stupidly forgot to include it in the .dll for SS2. I can upload a new version with that included, if it'd help.
Normally I wouldn't even ask, but since you've done some works on scripts, would you happen to have a JIT debugger installed (such as OllyDbg)? That would make tracking this down fairly trivial, but if not the errorlog.txt should suffice.
Making a version for ShockEd should be simple. I will have to compile a new .dll though since some addresses are different. (I was under the impression that the only version of ShockEd released to the public was one built before the multiplayer patch was released though, does MP actually work properly in it?)
It sounds like the changes that you mentioned are actually just changes to the .cfg files from what I see in that post -- aside from the multi-core fix, which has already been applied. They should still work with this.
Nameless Voice on 8/6/2008 at 02:19
Quote Posted by Tos
Very strange. I've repeated that exact sequence of events several times (as a client even) and haven't gotten a single crash. I'm not ruling out the wrapper as being the cause of the problem, but could you try it with a clean installation of SS2?
That might be an idea. The install that I was using the second time was "clean" as far as I know. It had some extra assets, but no custom mission or gamesys files.
Quote Posted by Tos
I'm not sure why it would be easier to track in ShockEd -- perhaps because of the errorlog.txt that the game writes to when it crashes?
Partly because of its monolog crash dump, and partly because I have some debug information regarding function addresses for it somewhere...
Quote Posted by Tos
Normally I wouldn't even ask, but since you've done some works on scripts, would you happen to have a JIT debugger installed (such as OllyDbg)? That would make tracking this down fairly trivial, but if not the errorlog.txt should suffice.
I'm not particularly well-versed with debuggers, but I do have MSVC and GDB handy. I could try running the game through either.
Quote Posted by Tos
(I was under the impression that the only version of ShockEd released to the public was one built before the multiplayer patch was released though, does MP actually work properly in it?)
I'm not completely certain as to the history of ShockEd, but I know that the version which we have definitely has fully functional multiplayer support. The ShockEd Toolkit version that I linked to is just the released version with a few fan-made patches applied to it (mostly made by Telliamed).
Tos on 8/6/2008 at 02:51
I've updated the .zip linked to in the first post with the new .dll that records crash information to errorlog.txt. Since I can't seem to reproduce this bug on my end, if you could get it to crash again and either upload the file somewhere or copy the address that ShockWrapper.dll was loaded to and the stack dump here, that'd be helpful.
Quote Posted by Nameless Voice
I'm not particularly well-versed with debuggers, but I do have MSVC and GDB handy. I could try running the game through either.
I'm not really too familiar with either, but if they're capable of showing a call stack (or any sort of history of function calls) that'd be the thing to look at when it crashes. If there was a call to something in ShockWrapper.dll shortly before it crashed, something in my code is probably at fault.