Main > Main Forum

LED control idea

Pages: << < (7/16) > >>

Trimoor:


--- Quote from: cholin on February 14, 2005, 10:30:30 pm ---You're a genious! May I ask, how do you know all this?

--- End quote ---
I know everything.  It's just easier that way.
(By the way, you misspelled genius.) ;D

An idea I had for my original cabinet was to light up the arrows and buttons as Weinerdog says, but have them controlled by the frontend.  When you highlight Galaga in the frontend, only the left and right arrows and one button light up.  When you highlight Defender, the up/down arrows illuminate, as well as five buttons.

This would be relatively easy to control with the parallel port, but no one has this coded yet.  If they did, it would probably only be for windows.  (Insert long rambling hatred of microsoft here)


If anyone needs electronic or circuit help, just ask me.  (bribes will help me work faster)

cholin:

Wienerdog, thats exactly what I was going to do :D Thanks alot for the help.  Is there any specific diode I need or anything like that?

tetsujin:


--- Quote from: Trimoor on February 14, 2005, 11:28:25 pm ---
--- Quote from: cholin on February 14, 2005, 10:30:30 pm ---You're a genius! May I ask, how do you know all this?

--- End quote ---
An idea I had for my original cabinet was to light up the arrows and buttons as Weinerdog says, but have them controlled by the frontend.  When you highlight Galaga in the frontend, only the left and right arrows and one button light up.  When you highlight Defender, the up/down arrows illuminate, as well as five buttons.

This would be relatively easy to control with the parallel port, but no one has this coded yet.  If they did, it would probably only be for windows.  (Insert long rambling hatred of microsoft here)

--- End quote ---

My plan is similar: when a game is loaded, the available controls will light up (including the diagonals on the stick, if it's an 8-way).  But then I'll have them light brighter when the control is actually activated.  (But not light at all if they're not active for the game.)  And when a diagonal direction is pushed for an 8-way game, rather than lighting up the "up" and "right" buttons for instance, I'd light a diagonal "up+left" direction light.  And then if a diagonal direction is pressed in a 4-way game, nothing will light.  Processing diagonals could be done with logic gates, of course, but I'll most likely use a cheap microcontroller for it for simplicity's sake.

Programming simple circuits on the parallel port isn't too hard on Linux or most anywhere else for that matter - you send bits to the port, and those bits go high on the parallel port.  The only real trick for this application is activating the right buttons' lights, because that requires information about the game.  Controls.dat doesn't do the job, IMO, since it works according to button numbers as they're understood by the game.  For that reason I plan to take my data on what controls should be lit from the Mame control configuration for the game.

I'm planning to control my lights with USB.  To save I/O lines on my USB microcontroller I'm going to use the microcontroller to drive a shift register, and that'll be what actually controls the LEDs.  You might want something similar when using the parallel port, to get around the limited number of I/O lines there.

For some reason I was thinking that I would have LEDs creating light points around the joystick...  I really like Weinerdog's suggestion of making the light illuminate an entire direction triangle around the joystick.  That would take some extra work (either routing out space in the CP for a lightable plastic triangle, or else using EL strip for the triangle) but I think it'd be a whole lot better.  (EL Strip is a very tempting option for this application...  Infinitely easier to install than an LED-lit triangle.  I'm not sure what I'd need to use to switch that 100VAC from the inverter, though...  Relays?  I sure hope not.  And for getting low- and high-intensity lighting depending on what controls are being actuated?  No idea...)

Trimoor:

I would find blinking lights during a game far too distracting, but I would love not having to explain the controls to everyone who uses it for EVERY single game.  USB might be difficult.  What would you register the device as?  You would probably have to write your own drivers, which means we'd be stuck with windows again.  I think the serial port is a better option.  It's easy enough to access in software, and every microcontroller knows how to read serial data.  Good luck on the MAME end of it...

I don't think lighting a triangle with an LED would be hard at all.  Route out a shape larger than the triangle, and the black border of the vinyl will do the rest.  If that doesn't work, cut a triangle mask out of aluminum foil and glue it to the bottom of the overlay.

For the EL idea, a triac should be used.  It's a solid state device very similar to a transistor, except it can handle high AC voltages and even large currents.

tetsujin:


--- Quote from: Trimoor on February 15, 2005, 01:43:21 pm ---I would find blinking lights during a game far too distracting, but I would love not having to explain the controls to everyone who uses it for EVERY single game.  USB might be difficult.  What would you register the device as?  You would probably have to write your own drivers, which means we'd be stuck with windows again.

I don't think lighting a triangle with an LED would be hard at all.  Route out a shape larger than the triangle, and the black border of the vinyl will do the rest.  If that doesn't work, cut a triangle mask out of aluminum foil and glue it to the bottom of the overlay.

--- End quote ---

Well, maybe the LED idea isn't hard, but it's definitely a hell of a lot more work than either drilling a single hole for an LED, or using EL strip.  But I don't know if EL strip will be bright enough.

Your point about blinky lights is well taken - with that in mind I may decide not to do the two-level lighting.  But I've always thought it'd be nice in games like Street Fighter to have some clear indication of what direction I'm moving the stick.  It makes it a lot easier to figure out why my Shoryuken isn't working.  :)  I am also very interested in making sure people never have to wonder which button is which.  When each stick has between six to eight buttons, that's important.

There are USB HID profiles for indicator lights.  I may use that, or I may make it a more generic device type, like a virtual serial port or something, and just send bits to it.  If I were to go the virtual serial port route, I could choose to use generic, off-the-shelf chipsets like the FTDI chips.  It's basically a USB->RS232 on a chip, with driver support in Windows, Mac, and Linux.  But I'd more likely use a PIC, since I don't need the full functionality of the FTDI chip (it provides functions like the flow control lines, which aren't needed on USB, and therefore not part of the standard USB communications class.)  I'll take all these USB devices I want to build as an opportunity to learn USB programming.  On Linux.  Not Windows.  :)

I don't see why the MAME side of this would be particularly difficult.  I'll have a front end.  It'll know what game I'm running, because it will be responsible for running the game.  So when the game is being loaded, I can make the front-end run a script to handle checking the game control configuration and updating the LEDs.

RS232 would be another relatively easy solution.  I'm interested in doing this with USB, though.  I've decided I don't want to have to deal with RS232 and the Parallel port any more.  :)

Pages: << < (7/16) > >>

Go to full version