Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Operation Thunderbolt + MAMEHooker 2 player script issue  (Read 866 times)

0 Members and 1 Guest are viewing this topic.

Afterburner1970

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:December 04, 2025, 11:34:53 am
  • I want to build my own arcade controls!
Operation Thunderbolt + MAMEHooker 2 player script issue
« on: December 02, 2025, 02:58:42 pm »
Hi,

Ok, after losts of mucking around and reading many posts and help from Howard, I finally got both guns (on my Revolution X) working.

Only issue is when playing 2 player..... whoever pulls the trigger second, it stops the first players guns recoil.

It must be a script issue, so hoping someone can spot my error?

ini file

[General]
MameStart=
MameStop=kls 1
StateChange=
OnRotate=
OnPause=
[KeyStates]
RefreshTime=
[Output]
Player1_Recoil_Piston=lfs pistonthunder 20 %s%
Player2_Recoil_Piston=lfs pistonthunder-2 20 %s%


and the 2 script files


Pisonthunder.mhs

uls 1 1 0

uls 1 1 %s%



Pistonthunder-2.mhs

uls 1 2 %s%

uls 1 1 %s%

Many thanks

bandicoot

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 03, 2025, 11:14:19 am
Re: Operation Thunderbolt + MAMEHooker 2 player script issue
« Reply #1 on: December 03, 2025, 11:07:39 am »
hello i think
this mut be like this

Pistonthunder-2.mhs

uls 1 2 0

uls 1 2 %s%

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19440
  • Last login:December 05, 2025, 11:03:36 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Operation Thunderbolt + MAMEHooker 2 player script issue
« Reply #2 on: December 03, 2025, 06:25:57 pm »
to simplify even greater, you never have to pass a zero when the state is off.   I have that option in place for outputs with multiple values.   Just pass a %s%... when the output isn't firing the value of %s% will be 0 anyway.



Afterburner1970

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:December 04, 2025, 11:34:53 am
  • I want to build my own arcade controls!
Re: Operation Thunderbolt + MAMEHooker 2 player script issue
« Reply #3 on: December 04, 2025, 11:24:59 am »
i had made a typo

the script is actually

uls 1 2 0

uls 1 2 %s%

but still have this issue....any thoughts?

Thanks

Afterburner1970

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 31
  • Last login:December 04, 2025, 11:34:53 am
  • I want to build my own arcade controls!
Re: Operation Thunderbolt + MAMEHooker 2 player script issue
« Reply #4 on: December 04, 2025, 11:27:59 am »
I should point out, as I didnt make this very clear..this issue is happening on operation thunderbolt. Revolution X is working perfectly.

Thanks in advance

TapeWormInYourGut

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 148
  • Last login:Today at 11:56:15 am
  • I want to build my own arcade controls!
Re: Operation Thunderbolt + MAMEHooker 2 player script issue
« Reply #5 on: Today at 11:41:31 am »
I have the same issue in Operation Thunderbolt and it's because the output states appear to be bugged in that game. If you inspect the states that are being sent, you will see this happening;

1.) A state of 0 is sent when a player's trigger is pressed, and a state of 1 is sent when the trigger is let go. I.e. the recoil states are opposite when compared to other games. This means that %s% cannot be used to dictate the recoil state.

2.) When a player presses their trigger, the system will immediately flip the other player's state to the opposite of what the current player is set.

If P1 starts holding their trigger, then this is sent:
P1=0

If P2 also begins holding their trigger, then all 3 of these messages are sent IF P1 is still holding their trigger. The result is that P2 will begin recoiling, and P1 will stop recoiling. (Remember, 0=recoil on and 1=recoil off)
P2=0 (P2 recoil on)
P1=0 (P1 recoil on)
P1=1 (P1 recoil off)

If P2 releases their trigger and keeps it released, then this is sent:
P2=1 (P2 recoil off)
P1=1 (P1 recoil off)
P1=0 (P1 recoil on)

If P1 releases and presses their trigger again, then this is sent.
P1=1 (P1 recoil on)
P2=1 (P2 recoil on)
P2=0 (P2 recoil off)

etc.. It sends the same initial state for both players, and then sets the other player's state to the opposite of the current player.

It's just a hot mess. You can't really use 2-player with outputs because of bad state messages being sent.
« Last Edit: Today at 11:56:43 am by TapeWormInYourGut »