Attract-Mode Support > Scripting

LEDSpicer Emitter Plugin & LEDSpicer Tutorial

(1/3) > >>

mahuti:
For those that use LEDSpicer on Linux platforms, I've written a plugin to interact with it. Updated 12/16/2020

https://github.com/mahuti/Emitter-Plugin

This plugin:
* Changes light profiles while navigating AM based on the currently shown rom.
* Changes light and joystick profiles when a rom is launched.

Plugin Options

Delay Time:
The amount of inactivity (in microseconds) before Launching Emitter

Reset Time:
This is the period of time until the profile resets to the default (if set)

Default Profile:
The name of the profile that should be sent after a game exits & after the reset time. This should be a valid profile name set up in LEDSpicer. If you use dynamic joysticks, the profile should include a rotator profile

Joystick Default Position:
If using dynamic joysticks, you can set a default joystick mode to use while in AttractMode. If you have a default profile set, this option will override it.

The options available for this setting are: Use profile default, Vertical 2-way, 4-way, 8-way, Analog. Your joystick must support the selected mode, or the closest mode will be used instead. In my case, I only have one layout, so my joystick is set to Vertical 2-way by default

Activation Mode:
There are two modes for use in the AM user interface. Manual and Automatic.
Automatic mode: lighting profiles will be changed based on the currently selected rom after an editable period of inactivity.
Manual mode: a button press will change the profile based on currently selected rom.

Key:
The key that will activate the Emitter plugin when in Manual mode

Attract Mode User Interface Navigation

FOR ARCADE SYSTEMS: Emulator System Name must include one of the following words (case doesn't matter), arcade, mame, neo geo, neogeo, fba, final burn, or daphne. Emulator Systems including one of these names will call LEDSpicer to use an arcade profile
 
Example:

--- Code: ---emitter LoadProfileByEmulator romname arcade --no_rotate

--- End code ---

FOR CONSOLES: Emulator System Name must match the LEDSPicer profile name, for instance a system named "Nintendo Entertainment System" will launch a profile named "Nintendo Entertainment System.xml" from the LEDSpicer profiles directory.

Example:

--- Code: ---emitter LoadProfile systemname --no_rotate
--- End code ---

Launching a Game
FOR ARCADE SYSTEMS: This does the same thing as in the user interface, but will allow rotators/restrictors to work.
 
Example:

--- Code: ---emitter LoadProfileByEmulator romname arcade

--- End code ---

FOR CONSOLES: This does the same thing as in the user interface, but will allow rotators/restrictors to work.
Example:

--- Code: ---emitter LoadProfile systemname
--- End code ---

Please check github for other important information.

About LEDSpicer: https://sourceforge.net/p/ledspicer/wiki/Home/
LEDSpicer is used to dynamically change LED colors, manage Joystick profiles (for U360, GGG 49-way, servostiks) and it can also interact with MAME's output system to drive things like Knockers and LCD panels. LEDSpicer has support for controls.ini as well as colors.ini to set LED colors to the original joystick and button colors.

Quick-start tutorial is available a few posts down.

Sinistar:

--- Quote from: mahuti on November 05, 2020, 07:45:10 PM ---For those that use LEDSpicer on Linux platforms, I've written a plugin to interact with it.

The Emitter plugin for AttractMode works with LEDSpicer to change your lighting configuration based on your currently selected ROM in AttractMode.

https://github.com/mahuti/Emitter-Plugin

There are two modes. Manual and Automatic. In Automatic mode, lighting profiles will be changed based on the currently selected rom after an editable period of inactivity. In Manual mode, a button press will change the profile based on currently selected rom.

Please check github for other important information.

I use LEDSpicer to show the keys that will be used when playing a specific game.... trackballs, spinners, etc. LEDSPicer can even change the colors of the buttons/joysticks to the original button color. This plugin just calls the LEDSpicer emitter app to change the profiles dynamically... you need LEDSpicer to do the real work though.


--- End quote ---
I see you mentioned it working with linux does this work with Rasperry Pi 4 and Attract mode (led spicer that is). I know a ton of people would be all over this if so.

mahuti:
This was built just for  LEDSpicer. It currently calls LEDspicer's Emitter's LoadProfileByEmulator command based on the rom, either by a command key, or automatically while browsing the romlist.

I am adding the ability to load a profile at game launch as well (which will be useful for also driving U360s and Servostiks, etc.) I should have that up in the next day or so.

It has been tested on Rpi3 and Rpi4. I use Raspberry Pi 4s and 3s on my cabs, so yep.

mahuti:
This has been updated to include support for ALSO launching LEDSpicer's emitter ToGame, and resetting it FromGame. See the top post for details

MV19:
Thank you for this! You're a life saver.

Navigation

[0] Message Index

[#] Next page

Go to full version