Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Doomkid

-dup 2 and -extratics in DosBox? (Fixed by xttl - thanks!)

Recommended Posts

http://doomwiki.org/wiki/Ticdup

A friend of mine who lives very far away has been deathmatching with me over Choco Doom using the -dup 2 command for better online play. I noticed this page on the Wiki, however when trying to launch the game with it in vanilla Doom2 with dosbox, i couldn't seem to get it work - is the command line parameter -ticdup 2? Am I doing something wrong?

Any help is appreciated :)

Share this post


Link to post

It's -dup. The number can be anything between 1-9, although more than 5 is somewhat useless, and 1 is already normal.

Share this post


Link to post

Strangely, when launching the game in ChocoDoom with the -dup 2 command, it works fine - The frame rate is reduced to 17 and the speed is doubled, compensating rather well for the lag.

We tried a DOSbox game with -extratic and it indeed felt smoother, but the movement was still notably slow. We tried -dup 2, and then tried simply -dup, and tried them with -extratic and without, however the framerate did not seem to be effected regardless of that combination of commands we used in the same way it was in Choco Doom.

I may record a video of it to make it more clear what is happening - It would be nice to compensate for the lag under DosBox. I'm very surprised it isn't working.

Share this post


Link to post

Vanilla Doom supports ticdup but vanilla ipxsetup and sersetup do not. I think it was originally implemented in the engine for DWANGO only (DWANGO always used ticdup 2 AFAIK) so the other network drivers were never updated.

You have to get a replacement network driver that allows specifying ticdup. I used to have one (and it's not difficult to modify ipxsetup/sersetup sources to support it anyway, it's just a parameter the network driver has to pass to the engine via the doomcom buffer) but unfortunately do not have it handy right now.

EDIT: Well, here is a modified ipxsetup I just compiled. It supports these extra command line parameters:

-dup #: sets ticdup # (1-9), default 1
-extratics #: sets extratics to # (0-8), default 0
-extratic: sets extratics to 1
-player #: force your player number to # in game (1-4)
-exec name: try to launch "name" instead of "doom" or "doom2"

Note that there is no error checking done for the case where more than one node has specified the same player number and if you do so, it will cause the game to hang on startup. Also, if one node is using -player, then all nodes will have to use it because otherwise the automatically (based on IPX network address) assigned player number of one node may be the same as a manually specified one of some other node.

When using ticdup you have to adjust your mouse sensitivity accordingly. ZDoom and Chocolate Doom may do this for you (I'm not sure) but vanilla does not. For -dup 2, halve your sensitivity. For -dup 3, divide it by 3 and so on.

Btw. in the original ipxsetup source extratics was always being set to 1! But the sources are not for the version that came with the newest Doom releases anyway... (this version doesn't show the blue window when looking for nodes, for example)

Edited by xttl

Share this post


Link to post

Thank you so much for the very helpful post. This is exactly what I was looking for!

Share this post


Link to post

hey xttl, you think i can get the source code for that? :D
Would be cool if the lines you changed were commented for easy reading :) would much appreciate it!

EDIT:
hmmm just ran into a bug i think, i cant set maxdemo size when we have -dup 2 and -extratics <n> but if we use -extratic and -dup 2 it works.

Works perfect even with only -extratic though man thanks alot :) although im wondering whats causing that.

Share this post


Link to post

I updated it a bit:

- fixed crash when IPX wasn't enabled in DOSBox (possibly would have happened on real hardware too if no IPX driver was loaded but I don't know)

- changed parameter -exe to -exec so it doesn't overlap with heretic.com if someone is still using that

- changed max nodes from 4 to 8 since the same driver works just fine with Hexen and Strife

- it now looks for these game executables if -exec wasn't specified on command line (in this order): doom2.exe, doom.exe, hexen.exe, heretic.exe, strife1.exe.

- added internal help message if you use -?, -h or -help

 

On 22.3.2016 at 10:19 AM, MadDog said:

hey xttl, you think i can get the source code for that? :D
Would be cool if the lines you changed were commented for easy reading :) would much appreciate it!




Source is for 16-bit Open Watcom. Original ipxsetup sources from id are for Borland C++ 3.1 but I ported it since Open Watcom can cross compile for DOS realmode from under Windows (even 64-bit) or Linux and it is free. No comments about the changes though, but it should be pretty self explanatory if you compare it to the original sources.

On 22.3.2016 at 10:19 AM, MadDog said:

hmmm just ran into a bug i think, i cant set maxdemo size when we have -dup 2 and -extratics <n> but if we use -extratic and -dup 2 it works.

Works perfect even with only -extratic though man thanks alot :) although im wondering whats causing that.


Well that is strange, it seems to be working for me. I tested with ipxsetup -dup 2 -extratics X -maxdemo 1 -record test -nodes 1 with different values of X and it always stops recording pretty soon as it should with a 1kB demo buffer instead of the default 128kB. When I was still compiling ipxsetup replacements and other things with that really old Turbo C 2.01 freeware release from Borland, the resulting binaries didn't work properly with long command lines but I don't think Open Watcom has that problem.

Also, shouldn't this thread have been made in the multiplayer or source ports section or somewhere else than here? But whatever...

Edited by xttl

Share this post


Link to post

Whoever moved the thread, thank you.

Xttl, thanks once again for the updated version of ipxsetup - I'm stunned at how well an international DM can feel under dosbox with these commands enabled. It's much appreciated :)

Share this post


Link to post

Updated it one more time, changed max extratics from 8 to 7 since when testing I found out that 8 causes an error when exiting the first map. Also fixed the error messages when game launching fails, added nr4tl.exe to the list of game executables it looks for automatically (it's between doom2.exe and doom.exe), added colored textmode title banner.

I hope it doesn't need anything more now other than the error check for multiple nodes attempting to use the same player number.

Share this post


Link to post

xttl, i also tried it with -nodes 1 -maxdemo 1024 -record test -extratics 3 -dup 2
and it seems to work when using -nodes 1 but once we try to do it while connecting to eachother it instantly crashes before it even starts to load up doom2.

Although using -extratic with -dup 2 worked with recording maxdemo increased, but using -extratics 3 with -dup 2 it instantly crashes :(

Share this post


Link to post

(Just as a follow up for MadDog, if it's too much of a pain/time consuming to fix, don't worry about it - It's more a curiosity than anything else at this point. We ping about 220 to eachother and -dup 2 and -extratic already makes the game super responsive.)

Share this post


Link to post
MadDog said:

xttl, i also tried it with -nodes 1 -maxdemo 1024 -record test -extratics 3 -dup 2
and it seems to work when using -nodes 1 but once we try to do it while connecting to eachother it instantly crashes before it even starts to load up doom2.


Well that is even more strange if it's truly crashing before it even launches the game. You mean you don't even see the "DOOM II: Hell on Earth v1.9" (or whatever game you're using) banner? If it did go into the game but immediately crashed with error message "NetUpdate: netbuffer->numtics > BACKUPTICS" then that's another thing. I got this when I tried using large values of extratics, then when I capped it to 8 I got that crash when I tried to exit the first map. With 7 that problem seems to be gone.

Anyway, I just tried running 2 DOSBoxes side by side and used command line "ipxsetup -nodes 2 -maxdemo 1024 -record test -extratics 3 -dup 2" on both (well, different demo name but otherwise the same on both DOSBoxes). It seemed to work fine and also I managed to record a demo longer than 128kB (it had recorded 173 kilobytes before I pressed Q to stop wasting my time replaying episode 1 again for the Nth time).

Are you using this in DOSBox or on real hardware with DOS or Win9x?

LinuxDoom as compiled from id's source release (and all source ports that use synchronous networking? I don't know, haven't checked...) only allow setting extratics to either 0 or 1 while original DOS ipxsetup always sets it to 1 so I may have to remove or limit the option if it's just not working correctly with other values.

Also, all nodes have to manually enter the same value for -dup (if you're not sticking with the default of dup 1) or the game will crash after it has started with a consistency failure error. It seems to tolerate differing values of extratics though.

Share this post


Link to post

Alright i will have to test this thanks alot, i will report back with my findings.

ok, i think i just found the problem.

This only happens if i use dm.exe for setting up the network game :(
Although it only happens when using -extratics <N> but it works with -extratic just fine.

Wonder what is causing this :(

Share this post


Link to post

Wow, I hadn't even considered that death manager could be getting in the way - it does inject further commands before launching, maybe that has to do with it?

Share this post


Link to post

It seems that the problem is caused by a command line that is too long. Original ipxsetup is also affected, try entering lots of nonsense or duplicate parameters and you'll see that it also fails to launch the game (yet doesn't give any error message...just says that it "returned from Doom").

You would already have seen the correct error message (which is "Spawning <command> failed (Arg list too big)") if you had used -exec to specify a custom game executable, but I forgot to add a check for the return value from spawnv when using one of the predefined executable names...

I thought Open Watcom would support longer command lines than Borland C 3.1, I guess not then... well, at least neither is as bad as about this as Turbo C 2.01, IIRC.

I'll upload a new version tomorrow that passes the arguments to the game via a response file (like DM.EXE already does when it passes parameters to the network driver). That should get around the limitations.

Share this post


Link to post

But using dm.exe creates a response file which doesnt cause problems the long commandline problem as i have tested this myself so i still dont understand why its doing it, because with dm.exe we loaded custom wad file warped to a map had nomonsters checked etc so automatically that makes it very long, much longer than the test with only extratics, dup, record, and maxdemo line.

EDIT: just read the last part of your post, we have been using dm.exe this hole time :(

EDIT 2: -nomonsters
-skill 5
-warp 1
-deathmatch
-nodes 2
-file DK_DM_3F.WAD
-record test23 -dup 2 -extratic -maxdemo 1024

this is what showed up in the response file when we launched dm.exe with -extratic instead of -extratics <n>
and it works fine, but if we put -extratics instead of -extratic it doesnt load, says returned from doom.exe

Share this post


Link to post

Well, DeathManager makes a response file which ipxsetup (at least my version) parses and then tries to pass the args separately to game. This fails when the argument list is too long for spawnv to handle.

Anyway, I just uploaded a new version which uses a response file called IPX$$$.TMP to pass the arguments to the game. Try and see if it works better now, at least it should. I have to sleep now.

Share this post


Link to post

hmmm still doesnt seem to work with -extratics <n> although the response file thing totally does work and is a totally awesome workaround for the overly long commandline arguments thingy :P

Would really like extratics to work tho as it really helps with ping spikes/dropped packets.

Share this post


Link to post

Just tested it with 2 DOSBoxes using Doom 2 v1.9 and DeathManager v1.2 using this command line: dm -file pwads\dwango5.wad -record test -extratics 3 -dup 2 -maxdemo 1024 (then selected IPX, 2 players, old deathmatch, no monsters, skill 5 and warp to map19 in DM and pressed F10). It seems to work...

Does the newest version give you any error messages? It should tell why the spawn failed (like "arg list too big" or "no such file or directory") and not just say that it returned from doom.exe or whatever.

Share this post


Link to post

well heck, i just tested it right now with 2 dosbox windows as well and it works i will test it when doomkid is on :)

Share this post


Link to post

As a perhaps interesting note I just noticed that Strife's ipxsetup.exe supports parameter -ticdup # for setting ticdup from command line. However it doesn't look for anything else than strife1.exe when launching the game so it cannot be used with the other games (this is unlike Heretic's and Hexen's ipxsetup which can launch doom.exe or doom2.exe too). Regardless of this, Strife itself ignores the ticdup setting, it doesn't work with my ipxsetup replacement either... so the option is only useful if you copy Strife's ipxsetup.exe to some other game's directory and rename the game executable to strife1.exe.

Share this post


Link to post

oh man xttl, you are a god! maxdemo and extratics 3 and dup 2 works perfect while recording, idk if you changed something or not buts its awesome

EDIT: also wondering if that is the latest source code. gonna save it just in case :p

Share this post


Link to post

Yes, I reuploaded the source zip every time I reuploaded the executable. I didn't change anything that I think could be related after modifying it to pass arguments to the game using a response file. Maybe you were accidentally using an older version when it didn't work?

Also in case you people didn't know about it, in vanilla different players will not lag the same. This is why I added that -player # option. In two player games player 1 (green) is best if your link has low latency, however if you have high latency then player 2 (indigo/gray) has better playability. I don't know how it goes with more than 2 players.

Share this post


Link to post

MadDog, XCOPY and terminus.. We no longer have any excuse not to do a bunch of OS DM :) thanks a million, xttl!

Share this post


Link to post

Is there any advantage of using this with dosbox compared to chocolate/crispy's netcode? What about ipxboom? Does that need any improving?

edit: satisfying compet-n requirements doesn't count.

Share this post


Link to post

I don't think so, Danfun, I personally just find it very interesting that the engine comes stock standard with all sorts of rather ingenious optimizations for long distance play :)

Some of my friends prefer DosBox to Choco, I personally love them both and am content to play either.

Share this post


Link to post

Using Dosbox over Chocolate is simultaneously more authentic (using original exe) and less authentic (Chocolate may or may not emulate x86 stuff more accurately) at the same time. To get true authentic and accurate gameplay, you will need an old-school PC ;p

edit: For the record, why do they prefer vanilla and dosbox to chocolate?

Share this post


Link to post

It has to do with mouse control I believe. Several of my buddies can't get their mouse control "sweet spot" in Choco, for some reason. I personally can't feel much in the way of difference (Choco seems to have less latency during net games without -dup) but honestly I enjoy using either one. If I had to pick one for "super serious" play, it would likely be Choco, though.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×