Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: willy3d2k3 on October 16, 2004, 11:30:38 pm

Title: Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 16, 2004, 11:30:38 pm
Okay, I'm sorry if this was answered in previous threads, but I couldn't find it after several searches in a few different sites.  How do I exit an emulator running from inside MAMEWAH using a gamepad/joystick?  Ideally, it's be a 2-button job (JOY1_BUTTON10 & JOY1_BUTTON9).
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: Wizard of DelRay on October 16, 2004, 11:47:27 pm
I know mouse support has been added but am not sure about gamepads.  I would assume you can't, at least not the way you want to do it.  The way you describe using multiple presses sounds like an IPAC feature.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 17, 2004, 09:21:40 am
Thanks for the reply, Wizard.

Can it be done with just one button press?  I can live with that.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: Wizard of DelRay on October 17, 2004, 10:17:37 am
Okay, scratch my last answer.  I'm not sure if this will work for other emulators but it will for MAME.  Run a game and hit tab to get into the options.  Then choose Input (general) and scroll down until you see UI Cancel.  Hit the enter key to change it and press the two buttons you want to use to exit at the same time.  If it worked they'll both show up and you'll now have to hit them to exit the menu and exit MAME.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 17, 2004, 11:17:47 am
Thanks again, Wizard.

That does work for MAME.  The problem is with other emulators, and since this project is a console game box ( my son calls it the GameBox.  Pretty original, eh? :P) I wanted to map the exit of a console emulator to a button on a gamepad.  I sorta found a workaround courtesy of Minwah in his FAQs...JoyToKey.  Now I can map a keypress (i.e. ESC) to a button on the keypad.

This, however, opens up a new problem.  Since this is a console box, I wanted to use a console controller for all tasks.  I want to keep the game box (sorry, GameBox) self-contained, with no keyboard needed.  Logic dictates (at least my logic, fuzzy as it may be) that I should pick just 1 controller, and that the determinig factor should be the system being emulated that is most dependent on its controller.  Therefore, I chose the N64 contoller.

(For anyone whose ever played N64's GoldenEye 007 successfully with as PS2 Dual Shock, I envy you greatly.)

Now, mapping a keypress to a button solves my exit problem.  Heck, it even allows me to control Z26 exclusively from my controller.  But seeing as Project 64 (the emu I use for N64) needs all the buttons on a standard N64 gamepad, I would either need to shut off JoyToKey when P64 is loaded, or find an N64-like gamepad with extra buttons.

Sorry for the long-winded post.  If anyone could throw some ideas my way, I - and my son - would most appreciate it.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: Minwah on October 18, 2004, 06:18:38 am
Now, mapping a keypress to a button solves my exit problem.  Heck, it even allows me to control Z26 exclusively from my controller.  But seeing as Project 64 (the emu I use for N64) needs all the buttons on a standard N64 gamepad, I would either need to shut off JoyToKey when P64 is loaded, or find an N64-like gamepad with extra buttons.

I don't think you would need to disable JoyToKey, AFAIK the joystick inputs are still read so you can still use them as normal (even with JoyToKey running).
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 18, 2004, 11:49:20 am
Hi Minwah,

My problem is that I can map buttons on the N64 controller with JoyToKey to exit any emulator back into MAMEWAH except Project 64.  Since all the N64's controller buttons are used to play N64 games, mapping a button would mean I can't use that button during gameplay.  That's why I would need to unload JoyToKey for N64 play.

I think I solved my problem, tho.  I found an N64 controller that has extra function keys.  That would fit my needs, provided my N64-to USB adapter recognizes all the buttons.  I'll keep my fingers crossed. :-\

Thank you Minwah and to all who have helped me up to this point.  I hope to have this project done soon.  I will post some pictures when I do.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: Bgnome on October 18, 2004, 12:22:33 pm
couldnt you wire an external momentary switch to trigger opposite sides of the dpad to be pressed, ie up & down or right & left?  this way, you cant possibly exit the emu from playing normally (depending on where you put the switch) and you wont need a new controller.  this is an idea i got from tiger-helis key assignment info..
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 18, 2004, 01:41:38 pm
Hi Bgnome,

Sounds like an elegant solution to the problem.  My tinkering skills are kinda on the anorexic side, but this sounds like something I could tackle.  Thank you for your tip.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: quadmasta on October 19, 2004, 06:40:41 pm
That's why I would need to unload JoyToKey for N64 play.

Why not create a batch file that will automatically unload JoyToKey before running the N64 emulator and then load JoyToKey on exit?

I'm gonna search for JoyToKey and get the parameters and I'll post an example batch file.

Edit:  or just read this http://echo.messageboard.nl/2243/viewtopic.php?t=95

Basically all you would have to do was download his "killjoytokey.exe" file and then make a batch file and type the following in

@echo off
..\killjoytokey.exe  <--where ..\ is the directory killjoytokey.exe lives
..\N64emu  <--where ..\ is the directory of your N64 emulator and N64emu is your emulator's executeable
..\joytokey.exe/hidden  <--where ..\ is the directory where joytokey.exe lives

Then all you would have to do is edit your mamewah.cfg to point to the batch file instead of pointing to the emulator's executeable.  This *might* pop up a command window.  If anybody knows how to definitely get rid of it you're welcome to chime in.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 19, 2004, 09:26:13 pm
Thanks for responing, quadmasta.  I'm going to give it a try as soon as I can and let you know how it goes.
Title: Re:Couple more nagging problems with MAMEWAH...
Post by: willy3d2k3 on October 21, 2004, 08:42:56 am
Sorry for not getting back sooner...work's wiped me out.

I tried a couple of variations of Quadmasta's suggestions, but could not get the programs to behave.  Project 64 would open but not open the game, JoyToKey would open in a window, and none would work right.  I appreciate the help, but maybe I just don't have the mental capacity to make it work (aorry, work really has drained me.)  Maybe I'll tackle the problem again after a mental recharge.

Thank you all for your help, especially Quadmasta and Wizard of DelRay.  Your suggestions may not have solved this problem, but still led me in new directions that I'm sure will help me perfect my Gamebox project.  And again, great work Minwah!!!