Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Exiting Mame with no Buttons on Cab (Touchscreen)  (Read 3504 times)

0 Members and 1 Guest are viewing this topic.

Hewskie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:July 27, 2018, 02:45:42 am
Exiting Mame with no Buttons on Cab (Touchscreen)
« on: July 06, 2009, 05:14:30 pm »
Hello,

             I'm in the process of designing my touchscreen Juke/ Touchmaster player while I wait for all the parts to arrive in the mail and I've run into a problem. After launching a Mame game from xlobby, I need to hit esc to return to the front end. Does anyone know a simple way close mame without adding a pushbutton to the machine?

             I remember reading about a mouse macro that could generate a keypress by moving the mouse in a prerecorded pattern, but I can't find anything on the subject at the moment.

Any Ideas would be greatly appreciated.

(PS - I will probably be posting a thread in the Project Announcements very soon so look out!)

(edit: changed subject title)
« Last Edit: July 08, 2009, 02:25:29 am by Hewskie »

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re: Adding One(1) Button to a cab
« Reply #1 on: July 06, 2009, 05:16:10 pm »
You could map it so you can hit a combo of inputs to exit out.

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Adding One(1) Button to a cab
« Reply #2 on: July 06, 2009, 05:18:40 pm »
If all else fails, mount a discreet small button somewhere out of sight and create a simple keyboard hack. This may offer other uses if you discover new needs for the machine or want to expand functionality.

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Adding One(1) Button to a cab
« Reply #3 on: July 06, 2009, 05:52:20 pm »
You could map it so you can hit a combo of inputs to exit out.

That will be your easiest bet.  You can go into Mame right now and configure "UI cancel" to be any combination of existing buttons.

Free resource for building your own rotating control panels!

My other job...


mlalena

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 129
  • Last login:June 12, 2021, 12:31:44 pm
Re: Adding One(1) Button to a cab
« Reply #4 on: July 06, 2009, 08:34:53 pm »
One other option is to have a tiny separate application that is always on top.
This app has one button which generates an escape click when pressed.
Then you don't need any hardware buttons.

Kevin Mullins

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4504
  • Last login:February 01, 2021, 01:29:34 pm
    • Me on Myspace
Re: Adding One(1) Button to a cab
« Reply #5 on: July 06, 2009, 09:56:14 pm »
You could map it so you can hit a combo of inputs to exit out.

That will be your easiest bet.  You can go into Mame right now and configure "UI cancel" to be any combination of existing buttons.

TOUCHSCREEN ?!?

If they had other buttons would you think it would be such a problem to "add" a button.  ;)

Even though MAME was mentioned, I'm thinking it was meant to be just for the Touchmaster/Megatouch games. (my interpretation anyways)
Not a technician . . . . just a DIY'er.

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re: Adding One(1) Button to a cab
« Reply #6 on: July 06, 2009, 10:02:51 pm »
Oops...missed the touchscreen part.

Why do you need to exit out at all?

severdhed

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2975
  • Last login:December 14, 2024, 05:01:52 pm
  • RIP Dinosaur Hippo
Re: Adding One(1) Button to a cab
« Reply #7 on: July 06, 2009, 11:39:13 pm »
i know this is a touchscreen, and i'm not familair with touchmaster, but will  you not need any other buttons, such as coin inputs?  if you will need coin slots or something, then you would need some kind of input interface, such as a gamepad hack or keyboard encoder. 

gamepad hacks are pretty easy, and you can get a usb gamepad for a pretty reasonable price
Current Projects:      Zak-Man | TMNT Pedestal | SNES Pi | N64 Odroid
Former Projects:     4 Player Showcase | Donkey Kong | iCade

Hewskie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:July 27, 2018, 02:45:42 am
Re: Adding One(1) Button to a cab
« Reply #8 on: July 07, 2009, 12:00:56 am »
Mlalena, I was thinking about something like that,but I have very little programing experience. do you know of anyone that could help me 

Kman-Sweden

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 526
  • Last login:October 23, 2015, 07:29:00 am
  • Up the Irons!
Re: Adding One(1) Button to a cab
« Reply #9 on: July 07, 2009, 01:44:09 am »
If you change your mind about the KB hack... Check out my arcade PC website.
Find your button in the matrix and then you only need to solder two wires.
Good Luck.

Hewskie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:July 27, 2018, 02:45:42 am
Re: Adding One(1) Button to a cab
« Reply #10 on: July 07, 2009, 02:25:41 am »
Thanks for all the interest in my post everyone! I'd like to clarify a little, the topic name is a bit misleading as I'm building a touchscreen jukebox that will not have any buttons at all on it. (see craptacular picture attatched). The machine will primarily be a Juke, but will have a "Games" screen used to launch mame games: touchmaster, touchmaster 3000, 4000, 5000, 7000 and 8000 all set to freeplay from the service menu. As the touchscreen is basically a mouse and mouseclicks, I will need a way to exit from mame and get back to xlobby (the jukebox)

I really like the idea of creating an application to run on top of mame with an "exit" button in one corner that would send a keypress of esc to mame. I don't know much about programming, but i can't see this as being too difficult, If anyone could help me I'd be glad to send a few bucks (paypal) for your trouble, or maybe we could work out something else,

Thanks

(edit to mention games are set to freeplay)
« Last Edit: July 07, 2009, 02:33:21 am by Hewskie »

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4420
  • Last login:Yesterday at 08:57:40 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Adding One(1) Button to a cab
« Reply #11 on: July 07, 2009, 01:04:46 pm »
cheapest ($15-20) and easy way....doing it remotely.

Get the AIRCLICK USB. It's advertise as a Multimedia Control but there is a plugin and act as a KEYBORD (ARROWS, ENTER) and also controls the Volume +/-.

All you have to do it set the ESC in MAME as the ENTER KEY and have the remote somewhere.

Also good for Shutting Down the Machine properly (by pressing the PLAY/ENTER by 5 sec).

Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

mlalena

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 129
  • Last login:June 12, 2021, 12:31:44 pm
Re: Adding One(1) Button to a cab
« Reply #12 on: July 07, 2009, 09:59:53 pm »
I admit defeat.

I whipped up a prototype virtual button program for you, and it all works except that I can't get it to appear on top of MAME. It appears on top of Mala fine. Don't have any more time to look at it today but maybe someone else can.
I posted everything to my site including source code here: http://www.lalena.com/MAME/VirtualButton.html

All parameters are command line based. I'm lazy.

Hewskie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:July 27, 2018, 02:45:42 am
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #13 on: July 08, 2009, 02:29:16 am »
Wow, thanks for trying mlalena!

This program seems perfect if we could get it to work. I think I'll make a post about it in the software forum if you don't mind.

and Thenasty, that airclick remote is pretty cool, they're only 6-9$ on ebay so i'll probably pick one up anyway, thanks for pointing it out.

Sir Headless VII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 106
  • Last login:April 30, 2017, 02:04:52 pm
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #14 on: July 08, 2009, 03:14:35 am »
             I remember reading about a mouse macro that could generate a keypress by moving the mouse in a prerecorded pattern, but I can't find anything on the subject at the moment.

If you want a program like that you can use a mouse gesture program like this one. I have never used that one so don't take this a huge endorsement of that particular program, it was just the first google hit. That said that program looks like it should do what you want.

Barry Barcrest

  • I'm only in it for the lack of money
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1620
  • Last login:November 09, 2021, 09:54:17 am
  • Simple Plan
    • E-Touch Jukebox
Re: Adding One(1) Button to a cab
« Reply #15 on: July 08, 2009, 06:23:38 am »
I admit defeat.

I whipped up a prototype virtual button program for you, and it all works except that I can't get it to appear on top of MAME. It appears on top of Mala fine. Don't have any more time to look at it today but maybe someone else can.
I posted everything to my site including source code here: http://www.lalena.com/MAME/VirtualButton.html

All parameters are command line based. I'm lazy.

Problem you will be having is the mame window is directx, if you are just making a form stay on top it will not be ontop of that.

Hewskie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:July 27, 2018, 02:45:42 am
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #16 on: July 08, 2009, 06:52:40 am »
Thanks Sir Headless VII! This program is exactly what I was talking about. It works great for closing a few other programs like winamp visualizations but I'm having some trouble with it in MAME.  The same problem that mlalena ran into while making the virtual button app is happening. It seems that MAME either completely takes over all keyboard/mouse inputs until it is closed, or it doesn't allow 3rd party applications to send keypresses.

In other words:

 - the mouse gesture program (strokeit) is up and running and working as it's supposed to
 - I've configured it to send "ESCAPE" to mame on select mouse gestures
 - While in MAME, StrokeIt appears to recognize the gestures, but nothing happens in mame
 - Tried with many different keys set as "Cancel UI" in the Tab menu

anyone know any way around this?

mlalena

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 129
  • Last login:June 12, 2021, 12:31:44 pm
Re: Adding One(1) Button to a cab
« Reply #17 on: July 08, 2009, 07:32:23 am »
Problem you will be having is the mame window is directx, if you are just making a form stay on top it will not be ontop of that.

OK. Maybe making my app DirectX also might help. It doesn't look that difficult given that all I am doing is showing a form with a label on it & one click event handler. I won't be able to get to this until tonight.

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4420
  • Last login:Yesterday at 08:57:40 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #18 on: July 08, 2009, 11:09:46 am »
Thenasty, that airclick remote is pretty cool, they're only 6-9$ on ebay so i'll probably pick one up anyway, thanks for pointing it out.

LMK when you get yours. Need a photo of the wiring. I accidentally busted the USB part and 3 wires were loose and e-mailed griffin for wiring but did not want to give the info to me.
There are 5 wires inside the USB connector (cover easily remove). 2 are attached but 3 need to be re-soldered in the right USB pin.
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4420
  • Last login:Yesterday at 08:57:40 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #19 on: July 08, 2009, 11:16:53 am »
here is a picture

Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Hewskie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Last login:July 27, 2018, 02:45:42 am
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #20 on: July 08, 2009, 05:06:26 pm »
Quote
LMK when you get yours. Need a photo of the wiring. I accidentally busted the USB part and 3 wires were loose and e-mailed griffin for wiring but did not want to give the info to me.

sure, no problem

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Exiting Mame with no Buttons on Cab (Touchscreen)
« Reply #21 on: July 08, 2009, 06:05:05 pm »
You might be able to make your MAME windowed and then have a strip at the top/bottom/side/where ever that has  your quit button.  That way, MAME and your app won't fight for control.  The only other way I see is having a custom bezel for MAME that is just a "button" picture and use AHK or whatever to determine if you clicked on that spot.  It's a clunky solution, but it might work.   :dunno