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: Idea to add Esc and Pause to CP without using another input or Shift function!  (Read 2483 times)

0 Members and 1 Guest are viewing this topic.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Thanks to LusiD, RandyT, and UrebelScum for help with this.

Here?s the problem: you have wired up your encoder and used all available inputs, but you would like to have ESCAPE and PAUSE on your panel, and you don?t want to have to remember Shift Codes, etc.

The solution - Since a joystick can?t be both Up and Down at the same time, wire a button to both the Up and Down inputs on your encoder/gamepad hack.  Now set UI Cancel in MAME to ?both UP and Down?.  You now have an Escape button that can?t be activated accidentally.

The same thing can be done for Pause using the Right and Left joystick inputs.

Warnings/Notes:  This works for MAME, but won?t work for programs that won?t allow multiple keypresses per input, or assignable inputs.

I don?t recommend doing this for other inputs (especially action inputs) as the player might ?stutter? a little as the inputs are processed.  Pause and Escape should be fine, though.

This will only work (realistically) with direct-mode (common-ground) circuits.  This means this will work with almost all keyboard encoders, but will not work with many gamepads, although some should be okay.

MAME reads many gamepad UP buttons as J1 Y-axis +.  I believe that this will still work with MAME, although I haven?t confirmed it, yet.  Also, even if MAME allows it, many gamepads do not allow UP and Down to register at the same time, either through the software driver or the firmware.  So this may not work for some gamepads even if MAME allows it.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Today at 11:25:58 am
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com

Don't forget to use diodes though.

Otherwise, every time you try to go up or down you'll exit the program as the two need to be isolated from each other except for the instance of that one button press :).

RandyT

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Don't forget to use diodes though.
I didn't think Diodes would be needed as that switch would be open until pressed?

Guess I need to understand the circuitry better ???
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Today at 11:25:58 am
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Don't forget to use diodes though.
I didn't think Diodes would be needed as that switch would be open until pressed?

Guess I need to understand the circuitry better ???

The problem is that you only have a single contact on your ESC button (normal microswitch).  This means that the input lines going to both UP and DOWN would need to be linked together to hook to that one contact.

If you had a double pole switch, you wouldn't need the diodes.

RandyT

Grasshopper

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2380
  • Last login:March 04, 2025, 07:13:36 pm
  • life, don't talk to me about life
This is an ingenious suggestion. It is often the simplest ideas that are best.

An awful lot of cheap gamepads have only 6 buttons. This is just about adequate for the actual game playing buttons but doesn't leave anything left over for the player start buttons etc.

My first thought was that this hack could be used on the old style gamepads that connect to the MIDI port as these can be bought really cheaply. Then I remembered that the joysticks on that type of controller are analogue. Pity.

It took me a while to ponder the whole diode issue. But now I have, I think RandyT is correct diodes would be a necessity.

What we really need is some kind of database that indicates what brands of gamepad use a common ground, have easy solder points, MSDOS drivers etc. It is not knowing these things that puts me off gamepad hacks.
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

Nyrine

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38
  • Last login:August 19, 2003, 02:43:06 pm
  • I'm a llama!
None of the joypads (USB) Ive hacked register U+D or L+R -- seems the pad knows it cant do this, and if it sees it, doesnt send it to the PC =/

M-80

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 44
  • Last login:May 16, 2004, 08:31:05 pm
  • Some day... some day... Snap!
Can't you just use the iPac's reprogramming utility to remap the buttons? The pause button is just the P key. Slikstik put Pause buttons in their CPs.

http://www.ultimarc.com/winipac.html

ErikRuud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1709
  • Last login:March 05, 2021, 10:20:27 am
  • I'll build a cab for only 99.99.99!!!
    • Erik's humble video game page
Randy-T is correct, you would need a double pole switch to make this work. If you try to use a single pole switch, you end up with all three switches wired in paralell, and pressing any one of them will register as both up and down.

On my cab, I used the IPac's shift function to map the Esc key to another button. I have a pause button on my cab, the shifted function is Esc.  That lets me use the button for two purposes, and it also makes it harder to accidently exit a game.  I did the same with the Reset control so that it takes a two button press to exit or reset a game in progress.
Real Life.  Still a poor substitute for video games!       
American Laser Games Wrapper
O2em Rom Utility

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Thinking about the comments, I agree diodes will be required.

Answering a bunch of comments here:

Quote
None of the joypads (USB) Ive hacked register U+D or L+R -- seems the pad knows it cant do this, and if it sees it, doesnt send it to the PC =/

I'm getting this impression also, maybe it won't work for gamepad hacks.
Quote
Can't you just use the iPac's reprogramming utility to remap the buttons? The pause button is just the P key. Slikstik put Pause buttons in their CPs.
Not if you're already using all 28 inputs for action keys :-)
Quote
What we really need is some kind of database that indicates what brands of gamepad use a common ground, have easy solder points, MSDOS drivers etc. It is not knowing these things that puts me off gamepad hacks.
Yes a database would be a great idea.  I don't think DOS drivers are required, as these are USB pads.  USB is only supported in a DOS Box under windows, so you are still using the Windows drivers.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.