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: Keyboard hack idea using an AND gate..  (Read 3135 times)

0 Members and 1 Guest are viewing this topic.

HoopstarsGarage

  • Scratch Building Demi-God!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 240
  • Last login:April 19, 2016, 09:24:11 pm
  • Scratch Building Demi-God..
    • Hoopstars Garage
Keyboard hack idea using an AND gate..
« on: June 21, 2005, 01:49:49 am »
I have been asked to build a cabinet for a friend which will only play the Donkey Kong series (DK, DK Jnr. & DK3)..

To keep costs down, I thought using a hacked keyboard would probably be ok..  the only thing that bugs me is not having the shift function as found on some of the better inferfaces out there - the major reason for this is as an "exit" from the current game button..

I thought about using an AND gate who's inputs are tied to say the Player 1 and Player 2 buttons.. pressing these two buttons together would output a high, which could then activate another key on the keyboard (ie. Escape)..

Has anyone ever tried this or can anyone see any problems with this?? 


Hoops


EDIT: I do NOT want to add any other buttons to the control panel or for that matter hidden buttons on the cabinet..
« Last Edit: June 21, 2005, 01:52:38 am by HoopstarsGarage »

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: Keyboard hack idea using an AND gate..
« Reply #1 on: June 21, 2005, 08:00:43 am »
you don't need a special encoder or anything to do this.  MAME handles it perfect.


button one - press the button and twice the 'shift' key.  So it would look like this "Z" and not "S" (assuming the "Z" is the button 1 and "S" is the shift or other key)

then for exit press "Z" and then "S".  So it will say "Z" and "S"

The trouble with not adding extra buttons is that you hit both player 1 and player 2 ALL the time.  Any other combination you will also hit at times you really wish you didn't.  Add a seperate shift key isn't bad...  Or make a 3 key combination maybe.

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
Re: Keyboard hack idea using an AND gate..
« Reply #2 on: June 21, 2005, 08:06:46 am »
I agree with Lilwolf, but:

I would put a dedicated pause button on the cabinet, then use it as a combo so P and another button would escape the game.
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.

cbmeeks

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 197
  • Last login:July 01, 2006, 09:29:58 pm
  • Metroid Classic
    • Metroid Classic
Re: Keyboard hack idea using an AND gate..
« Reply #3 on: June 21, 2005, 10:22:51 am »
Your idea would work.  The AND gate probably has 4 outputs so you could do something like:

Player1 Start + Player2 Start + Fire1 + Fire2

If you are going to the trouble of not adding another shift button or exit button for authenticity, then you would make the key combo complex or near impossible to accidently do.

If it were me, and I wanted to keep the CP lean, I would put a pause and exit button on TOP of the cab...out of eyesight.

cbmeeks
RETRO COMPUTERS!
A NEW place to chat about retro computers!
RETRO

METROID
Metroid Classic

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Keyboard hack idea using an AND gate..
« Reply #4 on: June 21, 2005, 10:26:48 am »
To keep costs down, I thought using a hacked keyboard would probably be ok..
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

HoopstarsGarage

  • Scratch Building Demi-God!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 240
  • Last login:April 19, 2016, 09:24:11 pm
  • Scratch Building Demi-God..
    • Hoopstars Garage
Re: Keyboard hack idea using an AND gate..
« Reply #5 on: June 21, 2005, 10:28:22 am »
you don't need a special encoder or anything to do this.  MAME handles it perfect.


button one - press the button and twice the 'shift' key.  So it would look like this "Z" and not "S" (assuming the "Z" is the button 1 and "S" is the shift or other key)

then for exit press "Z" and then "S".  So it will say "Z" and "S"

The trouble with not adding extra buttons is that you hit both player 1 and player 2 ALL the time.  Any other combination you will also hit at times you really wish you didn't.  Add a seperate shift key isn't bad...  Or make a 3 key combination maybe.
Maybe I am just stupid.. but I didn't understand any of that..?

Do I need to set up something in MAME to do this??


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
Re: Keyboard hack idea using an AND gate..
« Reply #6 on: June 21, 2005, 10:38:33 am »
you don't need a special encoder or anything to do this.  MAME handles it perfect.


button one - press the button and twice the 'shift' key.  So it would look like this "Z" and not "S" (assuming the "Z" is the button 1 and "S" is the shift or other key)

then for exit press "Z" and then "S".  So it will say "Z" and "S"

The trouble with not adding extra buttons is that you hit both player 1 and player 2 ALL the time.  Any other combination you will also hit at times you really wish you didn't.  Add a seperate shift key isn't bad...  Or make a 3 key combination maybe.
Maybe I am just stupid.. but I didn't understand any of that..?

Do I need to set up something in MAME to do this??
Basically all you need to do is map UI CANCEL (Esc) in MAME to "1 and 2" (Mame can handle AND/OR/NOT key assignments.

Also be aware that for the hack, you need to pick keys that can be used together.   Not likely to be a problem with Donkey Kong, but I don't want people thinking that they only need six inputs so they can pick any keyboard keys and have it work fine.
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.

rescue161

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
  • Last login:August 04, 2025, 05:20:11 pm
  • I built my own Cabaret machine!
Re: Keyboard hack idea using an AND gate..
« Reply #7 on: June 21, 2005, 12:30:42 pm »


Just a crude drawing of my CP.

I used a keyboard hack.

Text in parentheses indicates that both buttons must be pressed for that function to occur.

To exit a game and go back to my front end, I press both the Player 1 & 2 Start buttons.
« Last Edit: June 21, 2005, 12:37:24 pm by rescue161 »
"Censorship reflects a society's lack of confidence in itself." - Supreme Court Justice Potter Stewart

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: Keyboard hack idea using an AND gate..
« Reply #8 on: June 21, 2005, 12:57:55 pm »
Besides the above good reasons for not using AND gates, you should also consider the fact that keyboard hacks need you to connect a row and a column together, not put a high signal on a single line.

HoopstarsGarage

  • Scratch Building Demi-God!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 240
  • Last login:April 19, 2016, 09:24:11 pm
  • Scratch Building Demi-God..
    • Hoopstars Garage
Re: Keyboard hack idea using an AND gate..
« Reply #9 on: June 21, 2005, 10:28:49 pm »
Basically all you need to do is map UI CANCEL (Esc) in MAME to "1 and 2" (Mame can handle AND/OR/NOT key assignments.
I have read the .doc files regarding the ctrl remapping and I STIIL can not make this work - I have to be missing something??

This is what I have done.

- Made a text file called "default.ini" and put it in the ctrlr directory of MAME. this is what is in that file"

UI_CANCEL               "KEYCODE_1 KEYCODE_2"

- changed the mame.ini file to read:

### Windows path and directory options ###
rompath                 roms
samplepath              samples
# inipath               <NULL> (not set)
cfg_directory           cfg
nvram_directory         nvram
memcard_directory       memcard
input_directory         inp
hiscore_directory       hi
state_directory         sta
artwork_directory       artwork
snapshot_directory      snap
diff_directory          diff
ctrlr_directory         ctrlr
ctrlr         default

cheat_file              cheat.dat
history_file            history.dat
mameinfo_file           mameinfo.dat


So what have I missed?? thanks guys

Hoops

NoOne=NBA=

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2718
  • Last login:July 23, 2011, 08:59:16 am
  • Just Say No To Taito! -Nichibutsu
Re: Keyboard hack idea using an AND gate..
« Reply #10 on: June 22, 2005, 01:05:05 am »
Just hit TAB while MAME is running, and set it in the general controls menu.

HoopstarsGarage

  • Scratch Building Demi-God!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 240
  • Last login:April 19, 2016, 09:24:11 pm
  • Scratch Building Demi-God..
    • Hoopstars Garage
Re: Keyboard hack idea using an AND gate..
« Reply #11 on: June 22, 2005, 01:34:28 am »
Just hit TAB while MAME is running, and set it in the general controls menu.


 :-[ :-[ :-[ :-[:-[

You can not understand how dumb I feel right now :)

Thanks for the help guys..!!