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: Cool lpt encoder  (Read 2588 times)

0 Members and 1 Guest are viewing this topic.

aricade

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:August 15, 2004, 01:38:26 pm
  • Wamma langa ding dong!
    • Isaacade
Cool lpt encoder
« on: November 14, 2003, 02:54:24 pm »
This was just to cool....

If you're looking for a low cost encoder check this out

http://users.skynet.be/plipke/PF50HC/LPTswitch/index2.html

you can get the joystick drivers (PPJOY) here:
http://www.angelfire.com/retro/deonvdw/PPJoy.htm


Anybody tried this?

Off all the things I've lost I miss my mind the most!!

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Cool lpt encoder
« Reply #1 on: November 15, 2003, 08:04:27 am »
That is interesting (the first link)...I wonder about ghosting and key blocking though.

The second link is for interfacing old digital controllers (genesis, snes, saturn, etc...) to the PC. Not quite as usefull as the first beastie for cab construction.

I may have to build that first thing just to see how well it works.  8)
All Your Base Are Belong To Us!

IceCold

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 350
  • Last login:March 22, 2010, 05:11:22 pm
    • My MAME cabinet webpage
Re:Cool lpt encoder
« Reply #2 on: November 15, 2003, 10:12:52 am »
Did it say anything about amount of inputs?  I didn't see anything about that, anybody know?  I might have to build that, looks interesting

aricade

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:August 15, 2004, 01:38:26 pm
  • Wamma langa ding dong!
    • Isaacade
Re:Cool lpt encoder
« Reply #3 on: November 15, 2003, 01:58:03 pm »
Yes the second link is drivers for other controllers. But it has a Driver for the LPTSwitch(the first link).

And basically you can get 60 inputs with that driver.
5 columns  12 rows... WOOOHHHOOOO, I'm in HEAVEN!!!
http://www.angelfire.com/retro/deonvdw/Docs/Diagrams/LPTswitch.htm

The ppjoy driver breaks it up into 2 joysticks with 30 inputs each...

Now as far as ghosting: this is why the circuit calls for the use of diodes on each input of the rows..  to stop the voltage to leaking over to other matrix points, Pardon my untechy lingo.  If any one electronically inclined could verify this?

As this was a straight hardware solution designed originally for controls for home cockpits:  I'm sure the drives does not implement blocking.  Blocking on a keyboard is caused by the chips on the keyboard, not by the OS.  So as long as the driver doesn't do blocking(I'm sure it wouldn't because it's a joystick driver).

Also if someone can verify that this works.... I think both sites should be added to the interface section of this BYOAC.  

When I get a chance I will build one.  But time is not a luxury for me(I'll just have to stop sleeping again)...  Any how my wife is away for the weekend, sent her off to Toronto to watch cabaret(some crappy musical).  So it's time to get working on my cab!!!

That is interesting (the first link)...I wonder about ghosting and key blocking though.

The second link is for interfacing old digital controllers (genesis, snes, saturn, etc...) to the PC. Not quite as usefull as the first beastie for cab construction.

I may have to build that first thing just to see how well it works.  8)
Off all the things I've lost I miss my mind the most!!

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Cool lpt encoder
« Reply #4 on: November 15, 2003, 08:24:49 pm »
I stand corrected. Link two does have a driver for the lptswitch (but the approach is different).

The first link has a matrix of 5 x 8 or 40 inputs and his driver treats the interface as a keyboard keypresses. The second link gives a slightly different diagram and says "you can build as many rows as you need" (ie. increase the matrix size--up to the limit of 60 inputs) and the driver treats the inputs as two joysticks (rows 1-6 and rows 7-12).

Quote
Blocking on a keyboard is caused by the chips on the keyboard, not by the OS.  So as long as the driver doesn't do blocking(I'm sure it wouldn't because it's a joystick driver).


Umm...no. AFAIK blocking is a potential problem with any matrix and this is a matrix. First link is a 5 x 8 matrix second link describes a 5 x 12 matrix (5 x 5 as shown in the diagram). The SPP-LPT can handle 1 byte (8 bits) of input at a time, so, there might be blocking.

You are correct in that the diodes should block ghosting (at least if its caused by current bleeding accross the matrix).

On a final note, I could be wrong about everything or something...feel free to correct me.
All Your Base Are Belong To Us!

JeSo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:January 17, 2004, 08:19:36 am
  • Black Rose Immortal
Re:Cool lpt encoder
« Reply #5 on: November 16, 2003, 01:37:58 am »
From my (admittedly limited) knowledge, blocking is implemented by the keyboard's little processing thingo to prevent ghosting. Kind of a lesser-of-two-evils thing, better to get no result, than a wrong result.
Something like that anyway.

deonvdw

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:November 26, 2003, 02:31:53 am
Re:Cool lpt encoder
« Reply #6 on: November 16, 2003, 03:25:19 am »
Hi all,

PPJoy reads the parallel port once for each row (or 12 times in total).

During the first read Data0 (for row 1) is low and all other row drivers are high. The column values are then read from the status port (pins 10-13,15). The second read takes Data0 high and Data1 low and reads the new value from the status port. The rest of the rows are read in a similar fashion.

It takes about 25us to read rows 1-6 or 7-12. The two virtual joysticks are read independent of each others so it is probably not a good idea to span a single player's controls across the two virtual joysticks. Rather have some players only on the first joystick; and the others on the second joystick.

The diodes stops ghosting and reading each row at a time stops blocking.

Regards,
Deon van der Westhuysen

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
Re:Cool lpt encoder
« Reply #7 on: November 16, 2003, 07:58:10 am »
Wow, how did I miss this, it looks very promising and dirt cheap to build.

I've already built my first controller using a keyboard hack, and I've also got an Ipac for my second yet to be built two player panel. However If I was starting from scratch I'd definitely consider this interface.

Also, due to the increasing popularity of USB many people's parallel ports are now unused.

Deon, please can you answer a quick question for me.

Are you likely to be writing versions of the driver for MSDOS and Linux? One of the main advantages of keyboard encoders over other interfaces is that they are guaranteed to work with any operating system. If it were possible to port your driver to MSDOS/Linux then your interface would definitely become a viable alternative to a keyboard encoder.

Thanks in advance.
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Cool lpt encoder
« Reply #8 on: November 16, 2003, 08:00:30 am »
JeSo...Gotta stand by my assertion that blocking (and ghosting for that matter) is a problem inherent in matrix interfaces. Still, I could be wrong.

deonvdw...looks like your driver elegantly steps around the blocking  problem. I was a bit hesitant to build this interface before (using the keyboard interface driver) but now (since I know how PPJoy handles this issue) I will deffinately be building one. Thats some cool software you have there.  8)
All Your Base Are Belong To Us!

mazur

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:February 02, 2004, 07:21:08 pm
  • I want my own arcade controls!
Re:Cool lpt encoder
« Reply #9 on: November 16, 2003, 11:08:06 am »


thats the same circuit, with some mods
it dont use any resistor, i tested it, works, all the 60 inputs!
(with pppjoy driver)

But i maked only a simple test, with only 1 diode, connecting it to lpt por directly,
example: if u connect lpt pin 10 with pin 2 u will get button 1 pressed, pin 11 with pin 2 u get button 2......

I dunno how it works with 2 players pressing buttons and moving joysticks like freaks.

I think it worth a test.

Spaced Invader

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 585
  • Last login:July 15, 2008, 07:27:49 am
  • Resistance is... probably a good idea.
Re:Cool lpt encoder
« Reply #10 on: November 16, 2003, 06:55:52 pm »
Quote
I think it worth a test.

I agree...but I won't be able to test for 2 or 3 weeks. Anyone else?
All Your Base Are Belong To Us!

deonvdw

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:November 26, 2003, 02:31:53 am
Re:Cool lpt encoder
« Reply #11 on: November 17, 2003, 12:03:33 am »
Unfortunately there are no plans to port PPJoy to another platform. As it is PPJoy soaks up a lot of my spare time.

Writing a Linux driver for the LPTswitch interface should be quite simple - perhaps someone can mail the guy who write most of the Linux joystick drivers...

MSDOS is another beast altogether. I don't if you will be able to write a successful driver since most applications directly access the hardware. It is probably possible to include a special driver as part of the DOS MAME executable.

For those of you worried about ghosting - try building a small matrix - the first two buttons of row 1 and the first button of row 2. Try pressing button (1,2) and (2,1) - button (1,1) should not read pressed [Ghosting] Pressing all three buttons should be a good test for blocking.

Of course, if there is anyone out there (and I know you are there  :)), it is quite simple to design a 208 input interface using a 4-to-16 demux chip.

Glad you guys like PPJoy!