Jump to content
Rich Nagel

DOSBox Simultaneous Command and Conquer GDI and NOD Multiplayer

Recommended Posts

How do, Folks! Long time, no type.

 

I recently built myself up a new PC running WinDoZe XP, and decided to give C&C a whirl again. I'm using DOSBox to get it up and running, and was playing around with multiple copies of DOSBox running at the same time.

 

Anyhow, hehe, two copies of DOSBox v0.73 running C&C simultaneously with "ipx=true", "IPXNET STARTSERVER 213" for the GDI army, and "IPXNET CONNECT 127.0.0.1 213" for the NOD army <grin> :)

post-5428-1276340060_thumb.png

post-5428-1276340235_thumb.png

Share this post


Link to post

Ah interesting, nice to see you around, remember you worked on some other things with Nyer on here :)

Share this post


Link to post

Hehe I was thinking of doing something similar but I couldn't get LAN working properly on DOSBox, but I didn't really try hard either. :P

Share this post


Link to post
Ah interesting, nice to see you around, remember you worked on some other things with Nyer on here :)

 

Actually, he did most of the work <grin>. With his help I had created a few goodies for C&C for DOS. Most notably a DOS QuickBasic utility to enable all of the hidden options for C&C (including disabling AI alliance in multiplayer games, and allowing you to start a LAN game with only one player... sort of a skirmish mode for DOS C&C).

 

 

Hehe I was thinking of doing something similar but I couldn't get LAN working properly on DOSBox, but I didn't really try hard either. :P

 

It's really fairly easy. Note that you'll need a fairly quick PC to run multiple copies of DOSBox and the game to keep the framerate smooth (I have a P4 2.66GHZ PC). Anyhow, what I did was to copy C&C to two seperate directories on my hard drive (e.g. "C:\C1\C&C" and "C:\C2\C&C"), as well as a copy of DOSBox to each of these directories. Each of the copies of C&C are setup to run from the hard drive (no CD needed).

 

For "C1" I used the DOSBox 'mount' command (under the "[autoexec]" section) "MOUNT C C:\C1", and for "C2" "MOUNT C C:\C2".

 

For "C1", in DOSBox's "DOSBox.conf configuration file, "ipx=true" under the "[ipx]" section, and "IPXNET STARTSERVER 213" under the "[autoexec]" section.

 

For "C2", in DOSBox's "DOSBox.conf configuration file, "ipx=true" under the "[ipx]" section, and "IPXNET CONNECT 127.0.0.1 213" under the "[autoexec]" section.

 

Ran both DOSBox's (in windowed mode), started a LAN multiplayer game with "C1", joined the game with "C2", and let 'er rip :) Note that you could also do the same using DOSbox's "serial2=nullmodem", and "serial2=nullmodem server:127.0.0.1".

 

Anyhow, a few more screenies that I uploaded a while back of other games with DOSBox doing the exact same thing:

 

http://www.cmoo.com/snor/weeds/Flight_Simu..._IPX_Driver.png

http://www.cmoo.com/snor/weeds/Flight_Simu..._IPX_Driver.txt

 

http://www.cmoo.com/snor/weeds/Flight_Simu...Multiplayer.png

http://www.cmoo.com/snor/weeds/Flight_Simu...Multiplayer.txt

 

http://www.cmoo.com/snor/weeds/Flight_Simu..._IPX_Driver.png

http://www.cmoo.com/snor/weeds/Flight_Simu..._IPX_Driver.txt

 

http://www.cmoo.com/snor/weeds/Flight_Simu...r_and_Ernie.png

http://www.cmoo.com/snor/weeds/Flight_Simu...r_and_Ernie.txt

 

Share this post


Link to post

@Nyerguds,

 

BTW, if you're still around and reading this; I don't suppose that you would happen to know the offsets (and hex edits) for C&C v1.22's GAME.NEW to enable 'Capture the Flag' with 'AI Players' enabled simultaneously (similar to your C&C95 patch)?

 

Edited by Rich Nagel

Share this post


Link to post

oh man... lemme tell you, that one wasn't just a simple change at one or two offsets. I had to intercept the code for the button clicks and make em do different stuff. And I edited 2 buttons there... the AI one was modified to just become "AI On" / "AI Off", and the Bases one became "Bases On" / "Bases Off" / "CTF + Bases On" / "CTF + Bases Off".

 

I doubt I can pull that stuff off without extra space in the exe file.

Share this post


Link to post
oh man... lemme tell you, that one wasn't just a simple change at one or two offsets. I had to intercept the code for the button clicks and make em do different stuff. And I edited 2 buttons there... the AI one was modified to just become "AI On" / "AI Off", and the Bases one became "Bases On" / "Bases Off" / "CTF + Bases On" / "CTF + Bases Off".

 

I doubt I can pull that stuff off without extra space in the exe file.

 

Thanks for the info, Nyerguds :) Yeah, sounds like it would be too difficult to do.

 

I don't suppose though that there would be some easy edit to simply have only the AI enabled, reguardless of what was selected in-game for the multiplayer game type (and reguardless of the normal text on the buttons or their normal functions)?

 

BTW, would you happen to know of the offset that disables (lowers the volume) of the music when a multiplayer game is started?

 

Share this post


Link to post

first post here xD

 

I've already did it, it is just a IPX emulation of Dosbox... really cool, it looks like a Game Boy emulator with GameLink cable support.

 

BTW, would you happen to know of the offset that disables (lowers the volume) of the music when a multiplayer game is started?

 

He already did it, there was a problem related with Sycs in Online games, and we discover it was related with the multiplayer music, and if we use an different version of SCORES.MIX, it causes dissincronysations...

 

also, i've already tryed 2 comp. Running Windows XP, using only VMSound, and IPX/SPX installed. Fail, WinXP does not allows acess to DOS programs in NetWork.

 

 

Share this post


Link to post

Pichorra, the desyncs were only caused by the fact I made the music randomize at the start.

 

I don't know if I can find the music muting code in DOS C&C... I changed an awful lot in that code in C&C95 :P

Share this post


Link to post
I don't know if I can find the music muting code in DOS C&C... I changed an awful lot in that code in C&C95 :P

 

A-OK :)

 

Share this post


Link to post

I found the code, but I'm not sure exactly which part changes it... and since this is the Main Menu code, it's quite different from the C&C95 main menu, because it doesn't have the Internet option.

 

[edit]

 

If I'm not mistaken, these hacks will stop the muting of multiplayer music:

 

E2B12 88 90

E2B13 25 90

E2B14 2A 90

E2B15 70 90

E2B16 01 90

E2B17 00 90

 

E2B31 88 90

E2B32 3D 90

E2B33 2A 90

E2B34 70 90

E2B35 01 90

E2B36 00 90

 

One of these removes the muting command for Serial, the other for LAN. At the moment, I have no way of finding out which is which by looking at the code.

 

[edit]

 

Tested and confirmed: the second command (at E2B31) is the one used for LAN :)

Share this post


Link to post

No problem :)

 

I'll see if I find something to enable that CTF... might not be easy though, since the options loading happens in 2 stages; first all options are set to their defaults (and the buttons adapted to that state), and then there's the button click effects...

 

It's possible I can enable it, but it's likely that once you click through the AI Off -> AI On-> CTF -> AI Off options it'll be disabled again.

Share this post


Link to post

Mkay... now looking at the MP defaults.

 

88F57 is the start credits. currently set to "B8 0B 00 00", which is 00000BB8, which is 3000. Same drill for writing a different value: convert to hex, pad to 4 bytes, and reverse the bytes. Putting it to the maximum, "9999" would mean using the bytes "0F 27 00 00"

 

88F57 B8 0F

88F58 0B 27

 

It seems the CTF thing is a bit trickier... it's part of one byte of bit flags, like these special options... but the only thing the game does with it is disabling the 8th one, of which I have no idea what it does.

since it uses an AND command to accomplish this, which can ONLY disable bits, I can't use this to enable the CTF mode.

Share this post


Link to post
It seems the CTF thing is a bit trickier... it's part of one byte of bit flags, like these special options... but the only thing the game does with it it disable the 8th one, of which I have no idea what it does.

since it uses an AND command to accomplish this, which can ONLY disable bits, I can't use this to enable the CTF mode.

 

No problem at all. I had a hunch that would probably not be do-able in the DOS version, but thanks for having a look for me :)

 

Again, I have to give a big thanks for all the help that you have given me for enhancing the playability of my old DOS version of the game :)

 

Share this post


Link to post

Well, looks like I solved it... it's quite a bit of stuff, but it should work...

 

1. A change to the code that checks if CTF is enabled and adjusts the AI button to the CTF state if it is. This hack will change the command so it enables CTF instead of checking it (same data, just the command that uses it is changed :)), and then jumps over the actual button adjusting code.

 

89055 F6 80

89056 05 0D

 

8905C 74 EB

 

2. The button code, jumping over all CTF-related checks, so the button only toggles between "AI On" and "AI Off", without modifying the CTF state.

 

899D4 75 EB

899D5 38 09

 

899E0 2D 36

 

899EB 88 EB

899EC F9 09

 

89A1F 80 EB

89A20 0D 34

89A21 35 90

89A22 76 90

89A23 01 90

89A24 00 90

89A25 01 90

 

[edit]

 

lol, the last part of the thread is really not in the right section anymore ^_^

Share this post


Link to post
Well, looks like I solved it... it's quite a bit of stuff, but it should work...

 

Many thanks, Nyerguds... will try this ASAP/STAT! :) :)

 

 

Share this post


Link to post

So, any results?

Share this post


Link to post
So, any results?

 

Sorry about the late reply, I should have got back to you MUCH sooner. Yes, it works PERFECTLY! :)

 

Again, MANY THANKS! :) :)

 

Share this post


Link to post

hehe, glad it works :)

Share this post


Link to post

Kinda off topic: this hack should allow DOS C&C to run the Covert Ops with any C&C CD:

 

v1.20:

0009DF5C 02 FF

0009DF5D 00 FF

0009DF5E 00 FF

0009DF5F 00 FF

 

0009F048 02 FF

0009F049 00 FF

0009F04A 00 FF

0009F04B 00 FF

 

000E0722: 02 FF

000E0723: 00 FF

000E0724: 00 FF

000E0725: 00 FF

 

v1.22:

0009E000 02 FF

0009E001 00 FF

0009E002 00 FF

0009E003 00 FF

 

0009F0E8 02 FF

0009F0E9 00 FF

0009F0EA 00 FF

0009F0EB 00 FF

 

000E0836 02 FF

000E0837 00 FF

000E0838 00 FF

000E0839 00 FF

 

Basically, it changes the CD needed for the Covert Ops from "2" (COVERT) to "-1" (any) :)

Share this post


Link to post
Kinda off topic: this hack should allow DOS C&C to run the Covert Ops with any C&C CD:

 

Thanks for te info, Nyerguds :)

 

Share this post


Link to post

Just looked through this thread, it's pretty impressive :) Tell me, is it possible to play C&C over Internet through DOSBox using the LAN option?

Share this post


Link to post
Tell me, is it possible to play C&C over Internet through DOSBox using the LAN option?

 

I've never tried it before. But, in theory, it should work just fine.

 

Share this post


Link to post

yeah, Myg tested that with me once. It's even possible to make that work online somehow IIRC.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×