hello
I have absolutely no time to take care of this project
but here is an example for digdug game
to see what outputs Mame sends (in windowed mode)
mame.exe digdug -window -output console
you should see in console led0 = 0 led0 = 1 alternatively when you insert coin P1
you should see in console led1 = 0 led1 = 1 alternatively when you insert coin P2
to let sumo detects outputs
launch sumo then
mame.exe digdug -window -output windows
insert coins P1 P2, play a little, exit
this part is important because Mame sends outputs in real time and we don't know what Mame sends until it sends
digdug.ini is now created and you can edit this file to suit your needs
original digdug ini file
[digdug]
constantforce=200
rumblemagnitude=40000
friction=200
damper=200
inertie=200
spring=200
[listitem]
led0=none
led1=none
Orientation(\\.\DISPLAY1)=none
-------------
edited digdug ini file
[digdug]
constantforce=200
rumblemagnitude=40000
friction=200
damper=200
inertie=200
spring=200
[listitem]
led0=led
led1=led
Orientation(\\.\DISPLAY1)=none
--------------------
led1=led
means
when in game led1 is switching on, the arduino receives =L101 (state=1, lamp=01)
when in game led1 is switching off, the arduino receives =L001 (state=0, lamp=01)
led0=led
means
when in game led0 is switching on, the arduino receives =L100 (state=1, lamp=00)
when in game led0 is switching off, the arduino receives =L000 (state=0, lamp=00)
--------------------
you can directly assign the output you want on arduino
[digdug]
constantforce=200
rumblemagnitude=40000
friction=200
damper=200
inertie=200
spring=200
[listitem]
led0=lamp3
led1=lamp5
Orientation(\\.\DISPLAY1)=none
led1=lamp5
means
when in game led1 is switching on, the arduino receives =L105 (state=1, lamp=05)
when in game led1 is switching off, the arduino receives =L005 (state=0, lamp=05)
led0=lamp3
means
when in game led0 is switching on, the arduino receives =L103 (state=1, lamp=03)
when in game led0 is switching off, the arduino receives =L003 (state=0, lamp=03)
-----------------
edit your arduino sketch to your needs, taking count of state and lamp number, mod you hardware connected to your arduino
connect your arduino, program it with your sketch
launch sumo (check com port)
then launch the game in full screen (or in windowed mode if you need to debug)
mame.exe digdug -output windows