viciious / d32xr

A modern port of Doom for the Sega 32X
Other
161 stars 12 forks source link

Networking support #14

Closed b1tsh1ft3r closed 2 years ago

b1tsh1ft3r commented 3 years ago

The current jaguar source has built in serial networking support. This can be adapted to work, tested and improved. The Megadrive/Genesis has serial communication capabilities at 4800 baud via any of the controller ports. Doom originally worked via 9600 Baud rate.

Networking could be implemented via controller port 2 as a local serial link initially. All Mega drive consoles can set any controller port to act in serial mode. Since the EXT Port is limited to model 1 consoles, controller port 2 makes the most sense for compatibility reasons.

Current serial network packet size is 6 bytes. Sending 6 bytes is about 10ms (1.66ms per byte x 6). Receiving data is currently interleaved between sending bytes. Overall transfer time in current jaguar source implementation is 20ms at worst for sending and receiving a full packet of game data if using the Megadrive at 4800 Baud rate (fastest it can communicate).

Pinout for the controller port can be seen here: https://plutiedev.com/img/md-port-pinout.png

Pin 6 = TX Pin 8= GND Pin 9 = RX

Would be happy to attempt to implement this. Is there currently a build which has the menu code which is functional? It would seem the latest build as of 6/7/21 does not currently show the doom logo or have menu options to select from on the title screen.

viciious commented 3 years ago

Hi,

thanks for your interest in the project - that's certainly an interesting idea! I was hoping someone would pick it up.

Unfortunately, the menu code currently only works if the WAD file has proper graphical assets from JagDoom. I guess I could share the WAD file with you on plutiedev Discord, maybe?

What kind of hardware are you planning to use to connect the two MD's together? I'm aware of the Sega Modem but I don't think that can be easily obtained... Also, using the second controller port for comm wouldn't allow to plug in a mouse in the same port, wouldn't it? Or could it be daisy chained?

viciious commented 3 years ago

This post also suggests using parallel mode transfers on the second controller port: https://www.sega-16.com/forum/showthread.php?14701-Zero-tolerance-multiplayer-online!/page2

viciious commented 2 years ago

OK, networking support via ZT-link cable has recently been added on the master branch. Hooray!