
 nullDC Netplay Configuration Guide
 ----------------------------------

 WARNING! Netplay is still in its early stages, it has known bugs, problems and limititations. It's not user friendly either.
If you encounter any problems regarding Netplay configuration and usage, don't bother reporting them or asking for help.
"We" know about them. "We" will not take the time to fix them any time soon because the current state of the emulator
does not allow it. If the information in this document does not help you then "we" can't help you either.
Configuration is very important so be sure to read this document because it's almost certain that you will encounter
problems (unless you REALLY know what you're doing). 
If you're OK with all the known bugs, problems and limititations then you can continue reading this document. Have fun. :)

 The Netplay implementation on nullDC consists of 2 parts. The Client part which is built in to the
emulator itself (in the maple plugin to be more exact) and the Server part which is a standalone
application.
 The configuration process might be confusing for most people so this process will be explained step by step.
The Netplay implementation of nullDC does not offer the players a way to communicate so it is recommented to
use a Messenger or IRC application in order to share configuration information in real time.


 Step 1: Configuring the Server
 ------------------------------
 
 The user that will host the game MUST run the Server application (hookjoy_server.exe) and configure it.
The Server application consists of the following options:

port: The port that is going to be used during netplay.

 Make sure that your firewall does not block this port or Netplay will not work.

ratio: The ratio that is going to be used during netplay.

 Ratio depends on the rensponse times between all players. If one of the players has slow response times
the rest players will be affected too and the game will be slower than expected.
 Possible ratio options can be from 0 upwards. It's not recommended to choose a value greater than 9.
Choosing a low number (ie: 4) will make the game slower if the response times of one (or more) of the players
are slow to respond. Choosing a high number (ie: 8) will make the game faster but there will be a delay after each
input command (when you press a button there will be a delay until you see it on the screen).
It's recommended to try different values until you find the one that works "best" on each Netplay session.

players: The number of players that will join the Netplay session

 Possible (valid) player options can be from 2 to 4.

Server Configuration Exmples:

Example 1: 11122,5,3 <-- This will start the Server for a 3 player game using port 11122 and a ratio of 5
Example 2: 432,8,2 <-- This will start the Server for a 2 player game using port 432 and a ratio of 8

In short, after you run the Server application (hookjoy_server.exe) type in the appropriate configuration
(depending on your personal preference and the number of players) and press Enter to start the Server.
Do not close the server! The server MUST be running during the Netplay session! Proceed to step 2.


 Step 2: Configuring nullDC.cfg
 ------------------------------

 This step MUST be taken by all the users that will join the Netplay session including the user
that hosts the game.
Go to the directory where nullDC.exe is placed and open nullDC.cfg with a text editor.
If it's the first time you've use nullDC then run nullDC.exe and close it (so that nullDC.cfg can be created).
Scroll down the config file until you find these values:

local_port=
server_addr=
server_port=

"local_port=" is the controller port that will be used by each player. The value can be from 0 to 3
where 0 is for player 1, 1 for player 2, 2 for player 3 and 3 for player 4. Each user MUST use
a different value.

"server_addr=" is the IP address of the PC that runs the Server application (hookjoy_server.exe).
If the Netplay session is over the internet, then all players MUST put the internet IP
address of the PC that runs the Server application. If the netplay session is over a LAN then all
the players MUST put the Local IP address of the PC that runs the Server application.

"server_port=" is the port that the Server uses for the netplay session. All players MUST put
the same port here that is used by the Server application for the current Netplay session.

Here is an example of the aboved options configured. The configuration example below matches the
first Server configuration example that was described in Step 1. It is assumed that the server runs
on a PC that has the internet IP address 82.112.64.14:

Player 1 options MUST look like these:
local_port=0
server_addr=82.112.64.14
server_port=11122

Player 2 options MUST look like these:
local_port=1
server_addr=82.112.64.14
server_port=11122

Player 3 options MUST look like these:
local_port=2
server_addr=82.112.64.14
server_port=11122

As you can see, all 3 users/players point to the same IP address and the same Server port (the ones used by the Server)
but use a different local port (because they plugged their virtual Dreamcast controller in to a different virtual port).
After each player edits the values described above accordingly, he/she MUST save the changes they made and close "nullDC.cfg".
Step 2 is done, proceed to step 3.


 Step 3: Configuring the emulator and running a game
 ---------------------------------------------------

 All of the players MUST run the emulator, open the plugin configuration (Options>Select Plugins) and select
"nullDC Controller [WinHook.NET]" as the Controller. Do not use "nullDC Controller [WinHook]" because it
is for Offline usage only and will not allow Netplay to "work".
Depending on the number of players that will join the Netplay session, the required number of Controllers MUST be set to
each port accordingly by all players.

 For example, if the game will have 3 players then all 3 players MUST configure the emulator to use
"nullDC Controller [WinHook.NET]" on Port A, Port B and Port C while setting Port D to "None".

 Now, if the game will have 4 players then all 4 players MUST configure the emulator to use
"nullDC Controller [WinHook.NET]" on Port A, Port B and Port C and Port D.

 After that, all players must make sure that they don't have any memory cards selected
(by setting every box that has "nullDC VMU" to "None" on all ports from A to D).


 Every player must have the same plugins and options selected. This is very important!
If one of the players uses a different plugin or setting then synchronization will be lost!
It's recommended to use nullPVR, Image Reader and nullAICA as the selected plugins. If one player cannot (or doesn't want to)
use a specific plugin then the rest players must change plugins too so that all players use the same plugins.

 After selecting the plugins, all players must make sure that they use the same options too by navigating through the menus
of the emulator and changing options where necessary.

 Players 2, 3 and 4 might want to configure the buttons they want to use after that. They must configure the buttons
on ports B, C and D (since they are going to use these ports and not port A as in offline mode).

 After all the above are done then all players must select Normal Boot to run a game (File>Normal Boot) and select the exact same game.
In this case "same game" means same file type (if it's an image file), same size and same version of the same game.
If the game of one player has something different than to rest of the players, then it will result in desync.

 The netplay session will start when the number of players specified on the Server application (Step 1) have joined the session.
The user that runs the server application will be informed about which player joins the session when he/she does so.
Players that have configured everything and selected a game will keep seeing a white screen until all players are connected.
If something is not configured correctly, then some players might wait for the rest (and keep seeing a white screen) forever.


 Advanced Stuff
 --------------

 If you wish to use a memory card (VMU) during an online session then all the players MUST use the exact same memory card on
the exact same Port. For example, if one of the users wants to use a memory card on Slot A1 then he must give the memory
card file to the rest players and tell them to insert it on port A1 (using the plugin configuration of the emulator).
If one of the players inserts a memory card to a different slot to the rest of the players, this will lead to desync.
If one of the players uses a different memory card file to the rest of the players, this will lead to desync.
If one of the players inserts more or less memory cards than the rest of the players, this will lead to desync.

 It should be possible (in theory) to create a Netplay session that has players through the internet and your local LAN
at the same time as long as all PCs have network or internet access to the PC that runs the Server application.
Of course the LAN PCs must point to the local IP address of the PC that runs the Server while the PCs through the internet
must point to the internet IP instead.

 Up to 4 players can be connected on a Netplay session. Even on games that don't support more than 1 or 2 players.
This sounds useless... unless you want to show your gaming skills to your friend who's on the other side of the world.


 Last Notes
 ----------

 There are many things that can limit speed during Netplay. Here are the most known occassions:

 1. The Server Application is configured to use a very low Ratio. Increasing the ratio will speed things up.

 2. One or more of the players lives in another country. This usually results in high response times and slow speed.
    Each player should open the windows Command Prompt and trace the IP of the rest. The syntax is as follows:
    "tracert 84.123.01.99" (without the "". Each user will have a different IP address assigned to them by their ISP,
    "84.123.01.99" is just an example). Each hop will be done within some ms. The higher the ms, the higher the
    responce time. Avoid players with high response times. They will make things slow for the rest players.

 3. One or more of the players has a slower pc than the rest. Things will be slow because this particular player
    has a PC that cannot keep up with the PCs of the rest of the players.


 Netplay Compatibility
 ---------------------

 Explaination:

 Working: Does not Lose Sync (with some luck and if everything is configured correctly)
 Not Working: Lose Sync (expected :P)
 Unknown: Same as Not Working, just not verified yet.


 Known Working Games:

 Dead Or Alive 2
 Gauntlet Legends
 Ikaruga
 Powerstone
 

 Known Not Working Games:

 Marvel Versus Capcom 2
 Soul Calibur


 Unknown Compatibility:

 *Everything Else*

Note: Games with Unknown Compatibility are expected Not To Work unless proven otherwise.


EOF