This feature is available on the recoil outputs tab.

This is the first publish of this software, it is not meant to be perfect, it's meant to be a good
start and show what is possible.  It should be possible to connect to:
Mame
Demulshooter
Supermodel

It should also be possible at some point to interface with MameHooker, MameHooker doesn't have TCP ports as
an output, so I need to either find a way to add that to MameHooker, or create another input into the Sinden 
software / lightgun, HID might be possible.  We can't use serial as the Sinden software already uses this 
interface to connect to the lightgun.

Remember to unblock software on your computer firewall, remember to include MAME, Demulshooter, and Sinden software.  I had a strange issue where some MAME events were blocked but others were let through, so don't just assume that because something is coming through that all messages are unblocked.  In my case I think I had unblocked stuff on private networks but not public networks but windows had labelled my home network as a public network.

I don't need to do this, but if having issues try running software in administrator mode, especially DemulShooter.  I'm not aware you need to do this with the Sinden software but worth a try if having issues.


The recoil outputs are controlled by this config RecoilOutputsGamesList.ini


So far I have only interfaced with MAME and DemulShooter.

MAME
The following MAME games have proper recoil in my software , I was surprised that a lot of other games don't have the outputs:
Time Crisis - timecris
Terminator2 - term2
Alien3:TheGun - alien3
Point Blank 2 - ptblank2
RevolutionX - revx *my rom doesn't work, so I haven't been able to test this

I haven't identified which games don't have custom recoil events but the Sinden software will detect the game is loaded and change the recoil settings to an appropriate value, this is loaded from a config, so the settings can be changed.  I have added all the MAME gun games from the Sinden Lightgun wiki.  As an example Steel Gunner does not seem to send custom events, but in the RecoilOutputsGamesList.ini I have set it to Automatic.  So when you switch to it, you have appropriate recoil. 

Any of these games that have custom events, we can documente this and change the config.  Some games may have custom events which need to be switched on in the service menu.

Inside Mame.ini set "outputs" to network or run Mame like this on the command line (using T2 as example rom):
mame.exe term2 -output network

For testing the MAME outputs, I found the following useful so you can see Sinden software and MAME:
mame.exe term2 -window -output network

And also this which outputs the outputs on the console line instead:
mame.exe term2 -window -output console

Load the latest V2.08a Sinden software, start the client for external recoil outputs or set to Auto Start and restart.

If you then load MAME it should connect.
 
In general LightgunA and LightgunB in the Sinden software doesn't mean Player1 and Player2.  This is because Player1 and Player2 is controlled by the target software such as MAME.  However the recoil events will send P1 events to LightgunA and P2 events to LightgunB.  So if using recoil outputs then you need to assign these correctly.

DemulShooter
Use DemulShooter how you normally would, please follow guides elsewhere.

In DemulShooter_GUI.exe go to PageSelection -> Outputs, Tick - Enable Network Outputs, the other settings should be fine with defaults BUT I have set 
"Length of custom [recoil] generated output OFF state": 10 milliseconds.  
This makes the automatic recoil a bit faster and fires more in line with the bullets when I have tested in Virtua Cop (when you get machine gun and automatic).

I have so far tested with Model2 and Virtua Cop, Virtua Cop 2, House Of The Dead and Gunblade NY.  Other platforms may have issues in the events arrive in different orders.  Please send examples of issues to contact@sindenlightgun.com and I will try to adapt.


RecoilOutputsGamesList.ini
This is the format for the .ini, it is very basic to start with but may expand to be more complex.  Currently each rom can only be listed once, if a game is available in multiple emulators such as Virtua Cop in MAME and model2 then you can only add one entry, I'm sure this will be improved soon as MAME model2 is improving so rapidly.

There are 3 types of entry so far, 
MAME
MAME Custom
DemulShooter

MAME is a list of MAME games and it just configures the recoil with no custom outputs, the format is as follows:

Rom Name
recoil profile
	Normal - Single shot profile in Sinden app
	AutomaticFast - AutomaticFast shot profile in Sinden app
	AutomaticNormal - AutomaticNormal shot profile in Sinden app
	AutomaticStrong - AutomaticStrong shot profile in Sinden app
	Mixed - Mixed shot profile in Sinden app
	NormalApp - Single shot settings saved in Sinden app
	AutomaticApp - Automatic shot settings saved in Sinden app
	App - Whatever recoil setting is in the app
Strength
	Set to 0-10, for most of these 10 should be used
Pump action on recoil
	Recoil when you activate pump
Pump action off recoil
	Recoil when you de-activate pump

MAME Custom is for MAME games that have outputs, the format is more complex.  So far I have identified 2 different ways the outputs works.  The first is the obvious that recoil fires when you receive a recoil on event.  The second way is more like rumble.  You switch recoil on with an on event, and keep recoiling/rumbling till you switch it off.  An example of this is Alien3.  I assume when you switch recoil on, the recoil itself will go on and off like a rumble unit.  So Sinden software has to understand this difference.  Also with the normal way, if the game has a load of machine gun, such as Terminator2, the Sinden Lightgun won't be able to keep up at full strength, so you need to lower the strength.  So in T2, if you make the strength 5 out of 10, it can keep up really nicely with the game.

Rom name
Custom code
	MameCustom
Custom Algorithm
	0 - Recoil fires only on event
	1 - Recoil rumbles when on
Strength
	Set to 0-10, recommend 10 for single shot games and 5 for machine gun games
P1 recoil on event
P1 recoil off event (if required, blank otherwise)
P2 recoil on
P2 recoil off (if required, blank otherwise)
Pump action on recoil
	Recoil when you activate pump
Pump action off recoil
	Recoil when you de-activate pump
Game Name


DemulShooter

DemulShooter is cool because across all the games, it receives the outputs and converts them into standard DemulShooter ones, so we did need to add in the event name.

RomName
General recoil pattern
	Normal - Single Shot - 0
	Automatic Fast - Machine Gun Style Fast Speed - 1
	Automatic Normal - Machine Gun Style Normal Speed - 2
	Automatic Strong - Machine Gun Style Strong (but slower) - 3
	Automatic Mixed - A mix of single shot and automatic - 4
	Automatic App - Whatever the automatic settings in the Sinden app is - 5
Strength
	Set to 0-10, for most of these 10 should be used, but use 5 if recoil can't keep up
No ammo strength
	Set to 0-10, 4 works well for me, feels like an empty chamber recoil
Reload event
	Custom recoil event, see RecoilTcpServerReadme.txt to understand language, recommend blank, T2170, A or U7
Damage event
	Custom recoil event, see RecoilTcpServerReadme.txt to understand language, recommend U7.
Killed event
	Custom recoil event, see RecoilTcpServerReadme.txt to understand language, recommend T4100.
Swap order
	This is meant for games where the events arrive in different orders, untested, set to 0 or 1
Pump action on recoil
	Recoil when you activate pump
Pump action off recoil
	Recoil when you de-activate pump


"No ammo strength" is I believe a unique feature of Sinden recoil.  When you are low on ammo, the software detects this and can change the recoil to be a different strength to replicate an empty chamber clicking.  This is also very complex so if games are misbahving, try setting this to empty.

 

