Jump to content

emulating the old arcade leds in a recent raine in linux...


Tux

Recommended Posts

This was supported in the old dos version, through the 3 keyboard leds, but of course accessing these leds with a multitasking os can be more problematic and the emulation was just dropped when switching to the sdl version, a very long time ago...

Now there are ways to access the leds available on the system in linux through sysfs. It makes accessing any led and controlling it much easier. These leds are available in /sys/class/leds, see the description in any kernel documentation in /usr/src/linux/Documentation/leds, they had neat ideas on how to use all these leds...

I finally made a good interface to choose which led on your system you want to assign to the emulated leds, you can choose any led displayed in /sys/class/leds as long as its brightness file is writable. I found a nice udev rules to assign group leds to all files in /sys/class/leds from there : https://unix.stackexchange.com/questions/20125/how-can-i-change-the-permissions-in-sys-to-alter-the-state-of-a-led-light-using

After this, just add your user to group leds, and he has access to these leds...

There are at most 4 emulated leds, so if you have only the keyboard leds you'll be able to assign only 3, but it's usually enough, these leds are not of an uttermost importance ! The status of the leds is restored when raine quits, and the thing is super fast, so even if it's not spectacular, it would have been a shame not to emulate it !
If you have a dual shock 3 connected, it adds 4 new leds that you can assign here !
The new "leds..." option is at the end of the "Options" dialog, it displays leds assignments so far, the names are taken directly from /sys/class/leds so it's not always super user friendly, but it's understandable, it looks like this for the keyboard : (see attachment).
leds.png

For windows users, sorry, there is no such interface for leds in windows. There is a way to assign keyboard leds though, but it's complicated, there is a demo source included in mame source for that, and even them chose not to merge it (unless it's been done since then but it's unlikely). Well microsoft usually loves to make things complex, here it's just too easy to use not to use them !

The games supporting these leds : most taito games (taito f3, darius, exzisus, bonze adventure, rainbow island, the taito xsystem1 68000 games), the toaplan2 games.
There are probably more which can be added, this feature has been completely forgotten for many years now !

While doing this I found a bad bug when loading a game which uses more than 1 cpu of the same category, like darius, and a forgotten free in the game selection header if the number of games played is more than 5.

Of course all this is totally optional, if you don't want to see your leds changed by raine, just don't assign any in the leds assignment dialog and it will fail silently.

Edited by Tux
Link to comment
Share on other sites

  • Tux pinned this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...