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: Will this stop ghosting...?  (Read 4173 times)

0 Members and 1 Guest are viewing this topic.

isuT

  • Guest
  • Trade Count: (0)
Will this stop ghosting...?
« on: July 20, 2002, 01:28:45 pm »
I read through some of the ghosting explanations but didn't understand em 100%.  From what I understand if you have three keys that make up 3 corners of a square you will get ghosting on the final corner of the square when the other 3 keys are pressed simultaneously...?
well since I don't need all the keys in the 8x17 matrix my keyboard has, if I skip every other row won't that eliminate ghosting since there will never be 3 keys presed that make up the 3 corners of the square?

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:Will this stop ghosting...?
« Reply #1 on: July 20, 2002, 02:43:21 pm »
If I read what you are asking correctly then no, it won't.  An 8x17 matrix has 17 non-ghosting keys available, which with careful selection is enough for a SF-style layout.

What you are missing (judging from your question) is that 3 keys that form ANY square will produce ghosting.  I will lay it out in Matrix notation, say your columns are 1 to 17 and the rows are A through I.

A "ghost" key of B2 is generated when A1 and A2 and B1 are pressed, as you would expect.

But, a "ghost" key of D7 is generated whenever B3 and B7 and D3 are pressed, which is less obvious.

(And in reality, newer keyboards will "block" the 3rd key instead of generating a "ghost" key, but that's beside the point.)

Don't feel bad about missing this as the whole issue is pretty confusing.  If you haven't read it yet, my (overly long) article at  http://www.mameworld.net/emuadvice/keyhack2.html walks you through what is really going on and how to select appropriate keys.

(If my article is what confused you in the first place, then I'm sorry . . .  Post a reply and I'll see what I can do!!!)

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.

JustMichael

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1438
  • Last login:September 27, 2015, 01:19:40 am
  • Mmmmm!! Cheesecake!!
Re:Will this stop ghosting...?
« Reply #2 on: July 20, 2002, 05:43:27 pm »
One other thing you will probably find out is that the pcb inside of keyboards usually can only "see" a few keys pressed at a time (4 or 5) reliably.  Any more than this and they aren't seen.  You will have to try your keyboard to find out which keys and how many it can see at once.

jelloslug

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:May 25, 2005, 03:55:59 pm
  • Splut!
    • Jelloslugs Arcade
Re:Will this stop ghosting...?
« Reply #3 on: July 21, 2002, 12:08:31 am »
If you really want to hack a keyboard and dont want ghosting you must use diodes in the circuit.  Ghosting is cause by current flowing backward through the circuit to complete the 4th key.  If you prevent the reverse flow you will have no ghosting, period.  This will not stop problems of limited amout of keystrokes being seen my the keyboard though, since that is a function of the keyboard itself.  I have hacked a keyboard and had ne problems with ghosting but I would recomend an encoder to anybody (I ended up switching to an encoder myself).

isuT

  • Guest
  • Trade Count: (0)
Re:Will this stop ghosting...?
« Reply #4 on: July 21, 2002, 03:22:19 am »
thanks for the help guys.
about the diodes, was it finally determined that they do effectively stop ghosting or is it just a myth?...i read through quite a bit of the debate they have on it here but didn't read it all (there was way too much over my head stuff =P  ).

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:Will this stop ghosting...?
« Reply #5 on: July 21, 2002, 05:52:36 pm »
Don't hack a keyboard... it will take ages... you will have to twiddle with what buttons can be used... you might find that you can never push more then 3 buttons at a time... and after you finally get it all working, and decide to do it again, purchasing the same exact model/brand will not necessarily give you the same encoder.... so you will have to start again.

hack a joystick... they are made not to have ghosting and all keys pressed at the same time..

or better yet... by and ipac or a mk64 or a hagstrom.... you will never spend money better..

btw, I hacked a keyboard, then a joystick, now I have an encoder... each time it got a little better... but still a mess

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:Will this stop ghosting...?
« Reply #6 on: July 21, 2002, 10:33:40 pm »
Think og the keyboard as a grid like

1234
5678
9012

The keyboard work like battleship.  Let's say 1234 is qwer and the others are the keys below it.  If you press D (7) the keyboard controller will see that you press a key in the 3rd column, and 2nd column.  It will look up which key that should be and send it.  So if you press E(3), A(5), D(7) the controller will see that you pressed something in the 1st and 2nd row, and also something in the 1st and 3rd row.  That makes only two  points it knows for sure you hit.  The 7 is "hidden" behind the other two keys.

jelloslug

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:May 25, 2005, 03:55:59 pm
  • Splut!
    • Jelloslugs Arcade
Re:Will this stop ghosting...?
« Reply #7 on: July 22, 2002, 08:42:27 am »
Diodes will stop ghosting.  I did not understand how ghosting happened and how the diodes stoped it untill I laid a 4 button matrix out in electric schematic form, then everthing was clear.  Try it yourself and if you don't know how PM me and Ill help.

neuromancer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 446
  • Last login:May 10, 2006, 04:26:57 pm
  • Can I Play?
Re:Will this stop ghosting...?
« Reply #8 on: July 22, 2002, 12:26:23 pm »

Diodes will stop ghosting.  I did not understand how ghosting happened and how the diodes stoped it untill I laid a 4 button matrix out in electric schematic form, then everthing was clear.  Try it yourself and if you don't know how PM me and Ill help.


Only very old keyboards have ghosting anyway. Even keyboards I have from the 80's (IBM AT and Zenith) use blocking to prevent ghosting, like all modern keyboards do. (Basically, forget about ghosting, because it doesn't exist).

The biggest issues with keyboard hacking are 1) it takes time to decode the matrix and 2) it takes time to fix mistakes due to performing 1) incorrectly.

The tutorial on mameworld.net is the best out there. It's in the emuadvise section, and includes a number of decoded matricies you can use.

Bob



jelloslug

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:May 25, 2005, 03:55:59 pm
  • Splut!
    • Jelloslugs Arcade
Re:Will this stop ghosting...?
« Reply #9 on: July 22, 2002, 12:51:29 pm »
Quote
The biggest issues with keyboard hacking are 1) it takes time to decode the matrix and 2) it takes time to fix mistakes due to performing 1) incorrectly.


neuromancer is more that correct on this point.  I spent a large amout of time decoding the matrix and even more troubleshooting my poor soldering skills.  I eventually went with a buttonbox2 (because I still was too cheap to buy an ipac) an it work great.  You also have the added bonus of not having to run as much wiring with an encoder (common ground).  That cleaned up my cab a bunch.