Author Topic: attrat mode + demulshooter  (Read 2701 times)

Gioacchino87

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
attrat mode + demulshooter
« on: April 05, 2020, 01:32:45 AM »
hi guys!

i'm going to build two lightgun with this guide

http://forum.arcadecontrols.com/index.php?topic=161189.0

in few words, when i choose the rom, i need to start demulshooter.exe over the emulator, from command prompt to gesture the lightgun

here an example of the command:

Code: [Select]
DemulShooter.exe -target=[target] -rom=[rom] [options]
here the wiki of demulshooter https://github.com/argonlefou/DemulShooter/wiki

there is a feature that i can launche two program after i choose a rom/game?

or i can set up with a combination of (like) hotkey with and addictional software?

Gioacchino87

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Re: attrat mode + demulshooter
« Reply #1 on: April 05, 2020, 12:43:23 PM »
any news?

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: attrat mode + demulshooter
« Reply #2 on: April 06, 2020, 11:37:14 PM »
there different ways. see here:

via plugin
via external script software (like autoit)
via cmd + start two different executeables (see here. section OpenBOR)
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

Gioacchino87

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Re: attrat mode + demulshooter
« Reply #3 on: April 09, 2020, 10:36:53 PM »
there different ways. see here:

via plugin
via external script software (like autoit)
via cmd + start two different executeables (see here. section OpenBOR)

Edit: and the command for running a program from a script is described here: https://github.com/mickelson/attract/blob/master/Layouts.md#plugin_command

i can set this this code on emulator.cfg?

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: attrat mode + demulshooter
« Reply #4 on: April 14, 2020, 11:48:42 PM »
I'm not a programmer / software engineer / coder.

Have a look at your AM folder. there is a folder called plugins.
for plugins in AM : you have to create there a .nut file and activate it under AM (start AM > press TAB key > Plug-Ins > choose your_plugin > Enabled : Yes
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

Gioacchino87

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Re: attrat mode + demulshooter
« Reply #5 on: April 15, 2020, 12:56:32 PM »
Code: [Select]
#RequireAdmin
#include <Misc.au3>
#include <GamePadEx.au3>
#include <File.au3>

Sleep (100)
Global $myGamePadHandle = GPExInitialize() ; Get a handle. This doesn't have to be global but needs to be passed to all the other functions.
Global $myID = 0 ; We want to monitor the default GamePad

Global $gameRom = $CmdLine[1]
LogMessage("richiesta avvio rom " & $gameRom)

Run("C:\Cabinato\Emulatori\demul07a_221215\demul.exe -run=awave -rom=" & $gameRom)
Run("C:\Cabinato\Emulatori\demul07a_221215\DemulShooter.exe -target=demul07a -noresize -widescreen -v -rom=" & $gameRom)

While 1
Sleep(10)
$testrawdata = GPExGetRawData($myGamePadHandle, $myID) ; Get almost every data possible from the gamepad. Returns in an array with 8 elements.
if $testrawdata[7]= (768) and ProcessExists("DemulShooter.exe") Then
        LogMessage("chiusura processi..."")
ProcessClose ( "demul.exe" )
ProcessClose ( "DemulShooter.exe" )
LogMessage("chiusura processi completata"")
Exit
EndIf
WEnd

Func LogMessage($logMessage)
   _FileWriteLog(@ScriptDir & "\launcher.log", $logMessage)
EndFunc

i tried to write an autoit script. but it doesn't work. can you help me?