Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Joust on November 25, 2009, 06:52:27 am

Title: Front end for multiple custom control panels
Post by: Joust on November 25, 2009, 06:52:27 am
I'm looking for A front end that supports a specific Feature and wondering if its already out there somewhere.

I built a cabinet for Mame that has several control panels setup in different configurations.
Now I'm looking for a front end to use.
I have multiple control panels and want the front end to read a couple lines to see what control panel is inserted and only offer up the games that that panel supports. I can use parallel port pins or keyboard controller pins or whatever.
does such a thing exist? how hard would it be to implement this.
Any coders willing to try?
Title: Re: Front end for multiple custom control panels
Post by: youki on November 25, 2009, 08:05:34 am
I think the more simple would be you create a list of game for each panel , and have a menu to select what panel you use.  All Frontend are able to do that.

To make things automatic as you describe , with AtomicFE you could manage to do that using its plugin's system based on Vbscript. But it will require coding.

The easiest way would you predifine the list for each panel in a set of different file.

Then ask  in the code of the plugin to check what panel is inserted regulary. If the panel change, load the List of game with the content of the gamelist corresponding to your panel.

If you have a way to read what panel it is from VBScript , it is relativly simple to do in Atomic.
Title: Re: Front end for multiple custom control panels
Post by: Havok on November 25, 2009, 02:30:22 pm
You could query WMI, assuming each panel had a unique hardware identifier. (I believe you can order GPWiz's with unique ids).

Just query against PNPDeviceID, and depending on the value have the front end display the correct list.

However, your life would be a lot easier to just create lists. That's how I have Atomic setup on my Mame cabinet. I have a Master list that just has the panel names. You select the installed panel from the list, and then you get a list of games that work specifically for that panel only.
Title: Re: Front end for multiple custom control panels
Post by: Joust on November 25, 2009, 10:45:05 pm
thanks Guys, that sounds like a viable alternative.
I was hoping though that someone could figure out a way to do it if by reading three keys form a keyboard controller and selecting the list that way.
But I guess, if I have to swap the control panel anyway, its not a lot extra effort to change to a new list.
I'm a hardware guy and cannot code to save my life. I can do simple shell scritps but thats the extent of my coding.
The idea of differnet PNP device Id's is intriguing. Perhaps I could put a small serial eeprom on the CP. but I think it would be better to use a small micro to read three lines terminated differently on the diff control panels and feed some sort of different data to the computer serially.
where do I find this front end of which you speak?
Title: Re: Front end for multiple custom control panels
Post by: Paul Olson on November 26, 2009, 12:20:54 am
I would like to have the ability to have similar functionality for my modular cp as well. Unfortunately, my coding ability isn't up to the task either. I would have the added complexity of needing to set up the configuration for combinations of panels - up to 5. I would also have to find a way to send a signal from each panel, which is a problem since I sometimes use all 8 wires of cat 5 for the controller. I just use lists for now, but maybe one of these days a few of us can get together and come up with something.
Title: Re: Front end for multiple custom control panels
Post by: youki on November 26, 2009, 03:50:20 am



Quote
where do I find this front end of which you speak?


http://www.atomicfe.com (http://www.atomicfe.com)    (don't forget to also install the last patch)

Quote
You could query WMI, assuming each panel had a unique hardware identifier. (I believe you can order GPWiz's with unique ids).

That would be a good idea indeed. You can easly call WMI from atomic plug'ins.

Quote
I'm a hardware guy and cannot code to save my life. I can do simple shell scritps but thats the extent of my coding.

If you can say me, where exactly find the information that identify your panel , i can code the plugin for you.
Title: Re: Front end for multiple custom control panels
Post by: cosam on November 26, 2009, 05:23:21 am
The idea of differnet PNP device Id's is intriguing. Perhaps I could put a small serial eeprom on the CP. but I think it would be better to use a small micro to read three lines terminated differently on the diff control panels and feed some sort of different data to the computer serially.

If you have inputs spare, I'd just use the keyboard encoder. Checking for a key combination is very simple, software-wise.

Otherwise: the standard parallel port has at least 4 or 5 inputs, even without using bi-directional mode. By grounding different combinations of pins you can support 16 or 32 different control panels. No electronics required, and the software side is just a matter of polling the parallel port for a byte and filtering as necessary. You needn't even use those big old DB25 connectors; just reserve a few pins of whatever connector you use to hook up the CP and run a cable to the parallel port inside the cab.

Then again, playing with uC's and serial interfaces is probably much more fun ;-)
Title: Re: Front end for multiple custom control panels
Post by: Joust on November 26, 2009, 10:32:10 pm

Quote
I'm a hardware guy and cannot code to save my life. I can do simple shell scritps but thats the extent of my coding.

If you can say me, where exactly find the information that identify your panel , i can code the plugin for you.

thats very kind of you.
I have one of the PAC controllers from www.ultimarc.com (http://www.ultimarc.com) so I can map pretty much any three keys to my control panels and terminate them differently on the various panels.  Thats probably the easiest and fastest way to do it.
I don't care which keys are used but it might be best to use keys that are not needed by other things :)
Later, I can perhaps make a micro to do something different or use the parallel port.
Title: Re: Front end for multiple custom control panels
Post by: youki on November 27, 2009, 03:35:41 am
So in fact, you want just that according to the key you press , the game list changes?

Title: Re: Front end for multiple custom control panels
Post by: Joust on November 28, 2009, 12:54:34 am
So in fact, you want just that according to the key you press , the game list changes?
I'm not sure we have the same idea here.
My idea would require that those keys are pressed 100% of the time.
would that be ok?

lets say for example Say I'm using The Keys X, Y and Z
I could have different control panels such as the following assuming a 1 in the table below is a hard wired key:
x y z Control Panel
0 0 0 Defender/Stargate
0 0 1 Multi Williams
0 1 0 Pacman/Galaga
0 1 1 Trackball games
1 0 0 Spinner Games
1 0 1 Steering Wheel
0 0 0 Jamma
ETC
Title: Re: Front end for multiple custom control panels
Post by: youki on November 28, 2009, 06:49:51 am
I see,

But i don't think windows will like that. IF It is exactly like if you maintain permanently the keys pressed , you will saturate keyboard buffer , windows message queue etc..etc...  your system will become unusable.

The thing to do would be that when you switch the panel it simules a key press (but only one time).
Title: Re: Front end for multiple custom control panels
Post by: Joust on November 28, 2009, 06:34:19 pm
I see,

But i don't think windows will like that. IF It is exactly like if you maintain permanently the keys pressed , you will saturate keyboard buffer , windows message queue etc..etc...  your system will become unusable.

The thing to do would be that when you switch the panel it simules a key press (but only one time).
that makes sense.
If that is the case, then the 000 state would be invalid. You could scan for any of those buttons, if you detect one of them, then determine which of the three are pressed and match a list to the table.
that would work. I could figure out a way to make the key presses only temporary.

I've been thinking. Does MAME use the parallel port for anything?
If not, it would be very easy to use three pins from that port and you could scan them at anytime. Maybe use some other pins for other configurations
Title: Re: Front end for multiple custom control panels
Post by: drventure on November 28, 2009, 09:04:53 pm
Another possibility is to use a simple latching circuit connected to a keyboard input on your keywiz (or ipac etc).

Basically, the idea would be this.

1) have (x) latching circuits, each connected to a specific key (say, 1-5 to keep it simple for now).
2) each of your swappable panels has a particular connection wired directly to ground (just like a normal button wireup but without the button).
3) when you Attach the cable for a particular panel, the actual process of plugging in the cable acts like a button push.
4) the prob is that since the cable continues to be connected, the button will continue to be "pushed" which you don't want
5) that's where the latching circuit comes in. basically, you just use a relay, a capacity, and a resistor. When the cable connects it starts charging the capacitor, once the cap is fully charged it fires the relay, which "pushes" the button to the ipac. at that point the cap drains and the relay disconnects and nothing else will happen until you disconnect the cable and start the process all over again.

I'm using a very similar circuit in my cab to convert a knife switch "constant on, constant off" to a push button momentary-on-on-make/momentary-on-on-break type output. Works a treat.

Here's a rough diagram of the circuit. I used a cap and micro relay from radio shack.

(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=90051.0;attach=137272)

NOTE WELL. the drawing includes an LEDWiz, this is ONLY for purposes of supplying a low current 5vdc powersource. You could also get the 5v from a PS rail, a hacked USB cable, etc. As per the ledwiz docs, you wouldn't want to drive an inductive load (like a relay) using the actual LEDWiz outputs.

And, the usual disclaimer. I'm not responsible if you blow up any equipment with this circuit. IWOMD (It worked on my desk)  ;)
Title: Re: Front end for multiple custom control panels
Post by: Joust on November 28, 2009, 11:18:37 pm
yeah, thats a good Ckt. thats awesome.
simple RC ckt