Jump to content
LaunchBox Community Forums

Blick LEDBlinky for starting when launching a specific title


Recommended Posts

Posted

I have set LaunchBox to use LEDBlinky as this what I want for most of my games, but for some titles I don't want LaunchBox to activate LEDBlinky as this blocks full hooking by MAMEHooker and the LED functions is locked out.

 

Is there any way to do this with a flag or checkbox?

 

As if now I have to start a title with dynamic LEDs from MAMEHooker by launching it via ahk and start MAMEHooker just befor the emu exe o for the game, which isn't really is deal.

 

Guess this is major overkill for most but it's damn cool having start buttons blink when you have inserted credits or having the control panel act as a police siren when playing Chase HQ and you reach the villain

 

Inserted a clip which shows some games with normal LEDBlinky mapping via its xml then virtual cop 1 and 2 which is hooked by MAMEHooker and have dynamic LED on the start buttons and finnaly the ArcadePC title "Elevator Action Death Parade" in the service menu to show the elevator buttons which lists up during in-game action events.

Understand if this is totally overkill from the normal user but a checkbox in the game menu to block LEDBlinky from hooking or the like would be awesome. 

 

Posted

There is no per game option to turn it off, you could use a pre launch command in LB to turn off LEDBLinky.exe.

You also know that LEDBlinky has built in support to respond to MAME Outputs as well? Some simple ones like flashing start buttons blinking when coins are inserted are enabled by default, but you can add more complex ones as well.

I have my LEDs flashing between red and blue for police lights in Chase HQ without using MAME Hooker.

Posted

Yeah, but then you can't hook the outputs to a solenoid like for "Point Blank 2" to the light gun (GUN4IR) that's why I can't have LEDBlinky hook as this would block the light part of the outputs. For "Elevator Action death Parade" it's crucial to the game play, like you can see in my video here

https://youtu.be/zO0byY-gguc&t=16m47s

Posted

if anyone find their way here, I actually did get around this whit a somewhat dirty ahk launcher for games that needs MAMEHooker + its LED functions even though having LEDBLinky set up in Launchbox/Big Box
A sctipt for Virtua Cop / Sega Model 2

MAMEHooker vcop2.ini

Spoiler

[General]
MameStart=cmo 1 baud=9600_parity=N_data=8_stop=1, cmo 2 baud=9600_parity=N_data=8_stop=1, cmw 1 S6M1x2M3x0x, cmw 2 S6M1x2M3x0x
MameStop=cmw 1 M1x2M3x0E, cmw 2 M1x1M3x0E, cmc 1, cmc 2
StateChange=
OnRotate=
OnPause=
[KeyStates]
RefreshTime=
[Output]
P1_LmpStart=lws 01 13 %s%
P2_LmpStart=lws 02 24 %s%
P1_Ammo=
P1_Clip=
P1_Life=
Credits=
P2_Ammo=
P2_Clip=
P2_Life=
P1_CtmRecoil=cmw 1 F0x%s%x1x
P2_CtmRecoil=cmw 2 F0x%s%x1x
P1_Damaged=cmw 1 F1x2x1x,lws 1 01 %s%,lws 1 13 %s%,lws 1 10 %s%,lws 1 22 %s%,lws 1 04 %s%,lws 1 16 %s%,lws 1 07 %s%,lws 1 19 %s%
P2_Damaged=cmw 2 F1x2x1x,lws 2 01 %s%,lws 2 13 %s%,lws 2 10 %s%,lws 2 22 %s%,lws 2 04 %s%,lws 2 16 %s%,lws 2 07 %s%,lws 2 19 %s%

* Player 1 button 4 and Player 2 button 8 lit up when credit
* Vibration + Red flash on respective player side when damage
* Recoil as long as you have bullets

Launch AHK "Virtua Cop2.ahk" with refocus when exit and extre start buttons

Spoiler

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force

Process,Close,mamehook.exe
Run,taskkill /im "mamehook.exe" /F
Sleep 300
Run, \LaunchBox\ThirdParty\mamehooker\mamehook.exe
Sleep 300

Run, \LaunchBox\ThirdParty\DemulShooter\DemulShooter.exe -target=model2 -rom=vcop2
Run, emulator_multicpu.exe vcop2

;Extra start buttons for easy access on control panel (normally 1 and 2)

z::1
k::2

Escape::
    Process,Close,emulator_multicpu.exe
    Run,taskkill /im "emulator_multicpu.exe" /F
    Process,Close,Demulshooter.exe
    Run,taskkill /im "Demulshooter.exe" /F
    Sleep 300

    if WinExist("LaunchBox Big Box")
            WinActivate ; Use the window found by WinExist.
        else if WinExist("LaunchBox")
            WinActivate ; Use the window found by WinExist.    
    else
            Send !{ESC}
    ExitApp
return

A bit of work per title, but works damn great

Posted
On 9/15/2022 at 6:58 AM, gStAv said:

Yeah, but then you can't hook the outputs to a solenoid like for "Point Blank 2" to the light gun (GUN4IR) that's why I can't have LEDBlinky hook as this would block the light part of the outputs. For "Elevator Action death Parade" it's crucial to the game play, like you can see in my video here

https://youtu.be/zO0byY-gguc&t=16m47s

Good to know. I haven't got around to setting up the outputs for my Gun4IRs yet. MameHooker doesn't recognize my iPac4 Ultimate, so I was just using LEDBLinky for now as it worked just fine for LEDs.

Is it not possible to run both apps and have them just react to the outputs they need to command different functions? I haven't look at it deeply yet but I thought MAME outputs used a broadcast system and that might work.

Posted

Yeah, I was also hoping for MAMEHooker to handle recoil effects and LEDBlinky to take care of LED functions, but I never got them to work side by side.

Would have been awesome though as the handling would be much cleaner, but this works. So good for now I guess 😁

Posted
2 hours ago, gStAv said:

Yeah, I was also hoping for MAMEHooker to handle recoil effects and LEDBlinky to take care of LED functions, but I never got them to work side by side.

Would have been awesome though as the handling would be much cleaner, but this works. So good for now I guess 😁

I just tested and with both apps running LEDBlinky handled LEDs and I had MameHooker speaking. So it should be possible to have LEDBlinky handle the LEDs and MameHooker send COM outputs to control rumble in the Gun4IRs.

Posted

😃 Wow, that would be damn awesome if it would work. Can you test with pblank2 and set the start buttons to blink when credit and set the recoil in mamehooker for a test?

Posted
18 hours ago, gStAv said:

😃 Wow, that would be damn awesome if it would work. Can you test with pblank2 and set the start buttons to blink when credit and set the recoil in mamehooker for a test?

I'll just be adding the rumble to my Gun4IRs later this week, so can't do that specific action, but when I said MAMEHooker was speaking, I didn't mean just that it found outputs and was speaking them. It was a custom action for a specific MAME output that I added to speak my chosen phrase, so sending a COM port command shouldn't be any different.

  • 3 weeks later...
Posted
On 9/20/2022 at 1:03 AM, gStAv said:

Work Ah, I see. Hope you're right. I can't get the the both to play nice so please get back to me if it works for you Sir 🥰

Just haven't had time to add rumble to my Gun4IRs, but did some testing and finding the same issue as you.

Although both MameHooker and MameOutputTester (from LEDBlinky) can run concurrently and both will see the MAME outputs, once you "consume" the event with one or the other it seems doesn't work.

To test I used LEDs and the rumble feature of my XBOX 360 controllers. Even if I try to consume different outputs on each, it seems only one can consume events at a time.

 I'm really going to have to think about the best option moving forward. Short of LEDBlinky adding serial support to outputs or MAMEHooker seeing my Ultimarc Ultimate, there doesn't seem to be an easy or elegant solution.

 

Posted

Yeah, Its rather strange as they both should be able to coexist but as you say, only one can hold the candle it seems.
My rather dirty script where it puts MAMEHooker up in the food chain just before launch works great, just that you need to do this per game
and that its not that optimal having old killed icons down the right besides the clock for each operation killing and reopening the MAMEhooker app.

Do you know how to remove a stray icon after you kill its process btw? just to keep things tidy

Posted
2 hours ago, gStAv said:

Yeah, Its rather strange as they both should be able to coexist but as you say, only one can hold the candle it seems.
My rather dirty script where it puts MAMEHooker up in the food chain just before launch works great, just that you need to do this per game
and that its not that optimal having old killed icons down the right besides the clock for each operation killing and reopening the MAMEhooker app.

Do you know how to remove a stray icon after you kill its process btw? just to keep things tidy

I've found some scripts that do that by modifying the registry but iexplorer.exe needs to be restarted as well. Not sure that's a great solution but I can message you the script if you want to take a look.

My issue with killing and restarting MameHooker as needed is MameHooker seems to take some time to start up and that's less than optimal then I want for my cabinet. 

  • 2 years later...
Posted

Sorry to revive an old thread, but just wondering if you had any luck with this over the last few years? I'm about to run into this problem myself, so am looking at all viable options prior to finishing my build.

Posted

I haven't tried more with it. To be honest I think this should be some added fix withing LB/BB as MAMEHooker somewhat clashes with the LB/BB LEDBlinky function. I still have it working but the tideous way of Killin the MAMEHooker process and restart it again upon launch. It's no big issue as I have this in my ahks for stand alone titles like Teknoparrot for example. But when it comes to MAME you need to have ahks per game is pretty annoying. Not many games in need of panel LEDs during gameplay though so it's doable, still a bit messy in my opinions it would be awesome if a kills and restart function would be implemented. Please let me know if you get this sorted. I would be all over it. But left it for my new pinball a bit so glad I got more people on my side. Cheers! 

 

/Gustav

Posted

No worries at all, appreciate the follow up. It took me 1.5 hours just to get Virtua Cop 2 up and running with Mamehooker and Demulshooter (with recoil), but even with your modified Mamehooker vcop2 ini script the LEDs wouldn't flash. Looks like I have a few tinker weekends ahead of me yet. 😄

It may not be relevant for you, but if you haven't heard of it yet, "Hook of the Reaper" is a newer Mamehooker alternative that's being actively built, which uses the "network" output rather than "windows" output for hooking MAME and other emulator notifications. LEDBlinky seems to only support the typical "windows" output though, so I'm trying to find out if I can have the FE pass signals from whatever hooker is used back to LEDBlinky as a workaround.

Will let you know how I go, as I'm currently experimenting with a few different tools to see what works together and what doesn't.

  • Thanks 1
Posted

yeah, I would love to get your feedback on it. I've heard of the reaper, but as it dint suppoer LEDBlinky as of now I dindt want to make the switch. Looks promesion though

Posted

Will do. Just trying to get my head wrapped around everything again, as things have changed a lot since my last arcade build in 2012, and what worked back then is often not even usable today. 😄 I'm starting with a clean slate, so this thread should be a good reference for anyone who stumbles across it in the future.

  • Unusual Gem 1
Posted

Minor update to keep everyone in the loop.

I made a discussion on the GitHub page for HOTR, which includes a few technical details regarding hooking into MAME: Add Optional Windows Output Hooking Method · 6Bolt/Hook-Of-The-Reaper · Discussion #43

As for LEDBlinky and network output, there is no promise that this will come but it has been noted as a potential enhancement for a future version.

If this happens, and I really hope it does for longevity reasons, then a combination of HOTR and LEDBlinky (plus Demulshooter when required) should cover all our bases. Until then, it appears that a preference must be made for LEDBlinky or Mamehooker while using windows output.

In the meantime, I'll report back on my tests with LEDBlinky and Mamehooker using windows output within the next couple of weeks to see if I can get them to play nicely together.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...