Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

Carmageddon 2 - Networking without IPX

The greatest unfinished sequel ever!
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

I did some research if that could be feasible... Using some basic knowledge on Windows Sockets and reverse code engineering, I created this project: CarmaUDP!

So, how it works?

Briefly: Carmageddon 2 uses one IPX socket for all networking operations. IPX and UDP are similar protocols and share the same Windows Sockets API. That is, to create an IPX or UDP socket, you use the socket() procedure, to send data the send() procedure, etc... The only actual problem is addressing, and can be easily resolved because both IPv4 and IPX addresses use the same structure (sockaddr) which is 16 bytes long. As simple as it sounds: hook input Winsock API calls to convert (on-the-fly) IPX addresses to IPv4 and hook output Winsock API calls to convert IP addresses back to IPX.

Sorry for my bad English.

http://rapidshare.com/files/280830607/CarmaUDP.zip

Tags:
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

Very nice!
Seeing Vista has no proper IPX drivers, LAN games over Vista should be possible with this nifty tool right? Or is that Winsock api also different on Vista and this program wouldn't work in there?

Anyway I'll test that tomorrow and feedback here.
Image / carmageddon add-ons at road reaction
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Carmageddon 2 - Networking without IPX

Post by Razor »

Ooooh, I'm glad to see that the whole C2Online thing hasn't been completely dismissed, great!
I'm eager for news!
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

I have tested/developed it in Windows XP 32bit SP3, and I'm pretty sure it is compatible with Vista. If not, only minor changes would be needed.
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Carmageddon 2 - Networking without IPX

Post by Razor »

If you're unable to get it working with Vista, would it be possible to get it working with VirtualBox on an unsupported operating system?
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

Whatever I try, I get the "Local and/or Broadcast address not specified; exiting".
What address type is it supposed to be? My local address is correctely detected as 192.168.0.246, on the other comp it is ofcourse 192.168.0.1. I let the port unchanged. Broadcast address should be 192.168.0.255 right? Tried everything I could think of but no luck.
Image / carmageddon add-ons at road reaction
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Whatever I try, I get the "Local and/or Broadcast address not specified; exiting".
What address type is it supposed to be? My local address is correctely detected as 192.168.0.246, on the other comp it is ofcourse 192.168.0.1. I let the port unchanged. Broadcast address should be 192.168.0.255 right? Tried everything I could think of but no luck.
Problem fixed; link updated.
If you're unable to get it working with Vista, would it be possible to get it working with VirtualBox on an unsupported operating system?
It depends on the unsupported OS. If we're talking about Vista I could handle it. If you imply Macintosh, I don't think so because I only have experience in Windows programming, sorry.
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Carmageddon 2 - Networking without IPX

Post by Razor »

It depends on the unsupported OS. If we're talking about Vista I could handle it. If you imply Macintosh, I don't think so because I only have experience in Windows programming, sorry.
I was thinking more along the lines of those poor Win7 users, who've 'upgraded'.
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

CarmaUDP stopped crashing when I added the Local key. But now it is C2 that crashes!
BTW what executable version did you work with? V2? Because here I've been trying your tool with BBQC2 and with a normal C2 upgraded with the super patch v2.
Here's the config on both comp:

Code: Select all

[Addresses]
Local=192.168.0.1
LocalPort=12286
BroadcastPort=12286
MasterServerPort=12286
Broadcast=192.168.0.255
MasterServer=0.0.0.0
and

Code: Select all

[Addresses]
Local=192.168.0.246
LocalPort=12286
BroadcastPort=12286
MasterServerPort=12286
Broadcast=192.168.0.255
MasterServer=0.0.0.0
Is the broadcast address correct? I guess letting 0.0.0.0 will set the range to be wide open.
Also I've ofcourse disabled the IPX drivers on both computers in order to be sure your tool is what makes the link between both games.
I get the same crash on both computers, do you want the report log?

@Razor: Cut it out already with useless and biased opinions.
Image / carmageddon add-ons at road reaction
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Addresses are fine. (Setting broadcast address to 0.0.0.0 will make the socket to broadcast to address 0.0.0.0, which does nothing.) Disabling IPX is irrelevant because loader will patch Carmageddon 2 to create UDP sockets.

As for the version, here is the executable I work with: http://rapidshare.com/files/280114647/carma2_hw.zip
I'm not sure, but I think it's the Windows XP fix one.

A quick search on BBQC2 showed up to be a mod. I'll download it and test with it.

If there are any error reports from Carmageddon 2, that could be useful.
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

Hey, it is working with your executable. It works well even. Gotta test the master server too.
The Local key and address must be added manually indeed.

So you actually build your tool based on the untouched executable. Most people nowadays use (or should use) the v2 executable. BBQ C2 uses a slightly modified version of the v2 exe. So if you could somehow detect whether the executable is based on the v1, v1.2 or v2 and then proceed to patch the ipx into udp accordingly that'd be really great!

I know Stainless did some changes in the net code for the v2. Not sure how much work it would be to adapt your tool to this version. Also... erm... it'd be very nice as well if you could do the same with C1 :heh:
A lot of people on this very forum are more C1 fans than C2 fans and would like to have a stable base for C1 networking.

I'm the guy who's maintaining that BBQ mod, it currently uses Hamachi to connect people together but I feel like your tool would be way better and ofcourse would allow people to use the mod on Vista too! So if you complete this project, would you let me embed your tool in the next BBQ release?$

Speaking of Vista there's still feedback needed there.

Keep up the very good work :]

Oh, and you can find the V2 patch there: https://rr2000.cwaboard.co.uk under PC Tools.
Image / carmageddon add-ons at road reaction
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

The "Local key and address" is fixed, check the new link (first post).

To be honest, I've never encountered any problems with this executable for a long time now, so I wasn't aware of any special patches except the Windows XP fix one. I think mine's is that one. Anyway, if BBQ C2's exe preserves PDNetInitialise() procedure as it was (into place, and umodified), then theoritically it should work, but I'll check it just to be sure.

About Carmageddon 1: As this is a 16-bit DOS application, I don't think I could handle it, sorry.

And of course, you can embed CarmaUDP in your mod :)
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

I downloaded Super Patch v2 and BBQ C2 and updated CarmaUDP.dll. It works for both now. I have even tested hosting a game with BBQ C2 and joining with plain Super Patch v2.

Here's the updated DLL to play with (ONLY supports v2!): http://rapidshare.com/files/280433131/C ... tch_v2.zip

I'll begin updating the whole project, to support both versions transparently.
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

Client-to-client mode works very well now! And I noticed it autodetects Hamachi's IP too!
However I can't make the master server mode work, I have only tried with BBQ so far though, I'd need a bit more freetime. Running the master server on one comp is ok, but trying to connect to it by enabling the master server address feature in CarmaUDP makes BBQC2 crash. I'll have to try with your XP patched executable.
The master server mode only works on LAN right? But the P2P client mode should work with Hamachi I think, gonna try to have some time to test that with TTR or Harm.

Thanks for your work! It seems to me like the LAN game works better than with the IPX netcode. In my case at least (I encountered lag or no synchronisation between both comps before).
I'll keep you updated with our tests!
Image / carmageddon add-ons at road reaction
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

I've updated the whole project to support Super Patch v2 (including BBQ C2's executable). Everything should work fine now. (Link updated)

Theoritically, the whole project can work on the Internet. I just didn't had a chance to test that. Remember though, if you're going to do something like that, you'll need to forward every port that is needed.


Remark: To use CarmaUDP with BBQ C2, you must rename BBQC2.exe to carma2_hw.exe.
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

We finally tested the client2client on vista and with hamachi. It worked very well. Like lagless (just a couple little wraps). Seeing TTR will install Win7 tomorrow we'll be able to test it on this OS as well. Though I don't see why it wouldn't work.
Your "autodetect broadcast address" function is a very nice addition. Set the broadcast address for Hamachi to 5.255.255.255 directly.

We'd also like to test the master server mode. Should the master server side also run the CarmaUDP client once the server is started? Also if we change the master server's port, is it permanently changed (and then stored in the ini file as well?) or is 666 the default for any time we run the executable without specifying the different port as argument?

Anyway, your tool really kicks the BBQ C2 project again!
Even motivates me to try to program that multiplayer car changer myself!
Image / carmageddon add-ons at road reaction
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

I believe it'll work on Windows 7 too.

The auto-detect feature was something I was planning to include in the first version, though I was too lazy to code it :P

About master-server: CarmaUDP Client module is loaded only if you select the "Master-server address" checkbox in loader, and it's job is to make Carmageddon negotiate with the master-server. Master-server on the other hand, is a stand-alone application that manages a linked-list of registered servers reported by CarmaUDP Client. You can of course, start master-server and play Carmageddon in the same PC. Also, master-server doesn't save any configuration. So if port is omitted, it's defaulted to 666. ...though you can always create a shell link and append the port as an argument, I can change that if you want :)

So, what's that "multiplayer car changer" you're talking about?
User avatar
Razor
Stomping-on-Kittens
Posts: 3427
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Carmageddon 2 - Networking without IPX

Post by Razor »

So, what's that "multiplayer car changer" you're talking about?
It allows you to change your car in a multiplayer game (most likely in the lobby just before the race), I'd like to see it included in the next release of BBQ as C2 tends to randomly choose the worst possible car for a track. Too bad the original car changer is nowhere to be found. :(
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

That would be awesome; though I didn't know there was an "original car changer".
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

666 is the perfect port for Carmageddon IMO :sglasses:
The original Multiplayer Car Changer is a very old tool from back in 1999 if not older.
It'd be a little tool that changes the cars availability prior to running Carmageddon. And thus allows you to choose your car. But then people can have the same car in the game, just like in TDR where everybody was always taking either the Gorvette or McKilem. But in C2 there's no name floating above the cars :B
Really too bad it's really nowhere to be found nowadays. That's why a new one is needed.
The idea is very simple but a lot of testing is needed to see if some game modes make the game crash etc.

Oh and BTW if people want to play BBQ with this new tool, you can now use the very latest Hamachi release: https://secure.logmein.com/hamachi.msi
Hamachi is still pretty handy for the chatroom actually :B
Image / carmageddon add-ons at road reaction
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

666 is the perfect port for Carmageddon IMO
Well, 666 is best suited for Doom :P

Seems rather interesting. We shall wait for this new tool then :)
User avatar
Toshiba-3
BRender Actor
Posts: 5511
Joined: Sun Jun 08, 2003 12:14 am
Location: MagnaChem Data Unit
Contact:

Carmageddon 2 - Networking without IPX

Post by Toshiba-3 »

Haven't been able to test further with Win7 as C2 doesn't boot on it so far.
Still haven't got time to test the master server mode myself. Will do though.

Anybody around able to run C2 in Win7?
Image / carmageddon add-ons at road reaction
User avatar
Killer11
hit n run
Posts: 159
Joined: Tue Jan 09, 2007 4:49 pm
Location: Lithuania

Carmageddon 2 - Networking without IPX

Post by Killer11 »

You mean simply running it with no extra settings save for the mandatory to everyone glidewrapper?
Well I can do it. What kind of problems are you having exactly?

[Edit by tosh: removed the rest, thanks to keep it to PMs guys.]
User avatar
TTR
Psycho Maniac
Posts: 5277
Joined: Wed Oct 15, 2003 3:40 am
Location: Rotterdam, Holland
Contact:

Carmageddon 2 - Networking without IPX

Post by TTR »

Well in 7, when i load up carma2_hw.exe (doing that since Vista) i get the error Can't load Brender engine front (font?) main menu blablabla..

No, now it does load up, then when the menu loads (it blows up from a 1x1 pixel to the full menu) just before its done loading the menu, it goes back and forth, very minor but NEVER loads the whole menu :sad:
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Seems to me that a Windows 7-compatible glide wrapper is needed.
User avatar
Killer11
hit n run
Posts: 159
Joined: Tue Jan 09, 2007 4:49 pm
Location: Lithuania

Carmageddon 2 - Networking without IPX

Post by Killer11 »

Well Zeckensack's wrapper works perfectly on my 64 bit 7. Just in case i uploaded all the files that sit in my carma 2 root directory.
http://www.mediafire.com/download.php?2zjyumjey43
User avatar
Killer11
hit n run
Posts: 159
Joined: Tue Jan 09, 2007 4:49 pm
Location: Lithuania

Carmageddon 2 - Networking without IPX

Post by Killer11 »

Tested on a friends pc that is runing exact same version of Seven that I am runing here and it fail to load if i try to run UDPLoader otherwise carma 2 works fine. Might it be Nvidia gfx card that is messing it up? My card is Radeon HD3870, his is Gf8500GT
User avatar
TTR
Psycho Maniac
Posts: 5277
Joined: Wed Oct 15, 2003 3:40 am
Location: Rotterdam, Holland
Contact:

Carmageddon 2 - Networking without IPX

Post by TTR »

Yeah i already had problems with C1 on Vista, because it didn't load DirectDraw..but ATi users could play C1!

:decu:
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Killer 11, can you be more specific about the problem you encountered? You mean one of CarmaUDP modules failed to load and complained with a message box or just Carmageddon crashed?
User avatar
Killer11
hit n run
Posts: 159
Joined: Tue Jan 09, 2007 4:49 pm
Location: Lithuania

Carmageddon 2 - Networking without IPX

Post by Killer11 »

When I simply run Carmageddon 2 everythign is fine. However, if I run the UDPLoader it gives me a message that Carma2_hw has stopped working.

Edit: Just want to say how glad I am for choosing a Radeon ^^.
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Ok, Carmageddon crashes.

Let me see if I've understood correctly: If you run CarmaUDP on your machine (which is same as your friend's with the major exception the graphics card) it works, right? If that's the case, then something might interfere with API hooking (most possibly) on your friend's PC. See if he got any Antivirus program running, disable it, and try again.

I once tested CarmaUDP on a machine running Windows XP SP2 and BitDefender Antivirus 9, and caused me troubles because BitDefender likes to hook some Socket APIs in every process that runs through the "Appinit_Dlls" registry key...

Otherwise, we got a Windows 7 compatibility issue here.
User avatar
Killer11
hit n run
Posts: 159
Joined: Tue Jan 09, 2007 4:49 pm
Location: Lithuania

Carmageddon 2 - Networking without IPX

Post by Killer11 »

Well that PC is quite different hardware wise. but he's running same OS and using same antivirus. his cpu is AMD dual core while mine is a Core 2 Duo. I'll try to swap my gfx card with my brothers Geforce tomorrow and I'll see what happens.
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Judging by how many times CarmaUDP is downloaded, it seems that IPX doesn't pose any serious threat... yet :P
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Carmageddon 2 - Networking without IPX

Post by Harmalarm »

Hey stifado,

nice work on the CarmaUDP! I've only recently seen your post and was flabbergasted. Just tested the tool with Toshiba over hamachi and it works like a charm on my Vista SP2 system. We had a pretty lag-less game, though I was at the uni which has a pretty swell connnection. Wonder how it runs at home now. :p

anyway, we also tried the master server but couldn't figure out how to use it properly. I thought it would work like this; Running the master server enables other players over the net to play with eachother through my connection right? So basically other players should enter my ip in their master server adress and then create their own game and let others join? Or should the master server also be running a game and is this the only way to get all players together?

me confused. :s Could you explain in a step by step way how you thought this would work?
User avatar
Stifado
mechanic
Posts: 25
Joined: Sun Sep 13, 2009 9:10 pm

Carmageddon 2 - Networking without IPX

Post by Stifado »

Well... as I've stated in a previous post of mine, master-server is not a dedicated-server, but a simple "redirector" of sorts, which means that Carmageddon is not needed in order to work. You can think it as an announcer of games :P Nothing special.

So, "Running the master server enables other players over the net to be aware of eachother (open/closed games) through my connection. So basically other players should enter my ip in their master server adress and then create their own game and let others join." is the correct answer :)

Master-server "listens" by default at port 666, if not specified as an argument. Master-server client "listens" at port specified by "MasterServerClientPort" in CarmaUDP.ini (which is what you specify in the loader).
* Carmageddon communicates with master-server to register/update/delete a game, through it's own socket.
* Master-server client recieves the list of games through it's own socket when the user enters the Network menu.
* Then, Carmageddon can use this list of games, as if they were found in LAN.

Remember to forward ports correctly if you're testing this on the Internet. Which implies:

Master-server side:
* 666 UDP (or port specified as argument)

Player's side:
* Local port UDP
* Master-server client port UDP

Hope this helps :)
Post Reply

Check who’s online

Users browsing this forum: No registered users and 241 guests