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: DIY keyboard encoder  (Read 77445 times)

0 Members and 1 Guest are viewing this topic.

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #80 on: June 15, 2012, 09:42:31 pm »
Nice job on this. I got mine and flashed it tonight  I am finding that the assignment differs from the graphic on your page.

For example it seems a1 is next to the gnd and continues up that side. B1 starts after bcc and travels down that side. Mappings are all correct to the grid it's just where it starts that seems to differ.
Pm me for custom cnc needs...

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #81 on: June 15, 2012, 09:43:16 pm »
I meant vcc not bcc damn correct text
Pm me for custom cnc needs...

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9663
  • Last login:Today at 02:20:58 pm
  • Designated spam hunter
Re: DIY keyboard encoder
« Reply #82 on: June 16, 2012, 12:53:32 pm »
Thanks for your consideration, Degenatron.

Based on your earlier post, here is a revised set list,  a question for everyone, and one additional map suggestion:

--Firmware Set Alpha: The primary "kitchen sink" set with 8 maps. Designed for people who just want to set one mode and don't need to switch maps during normal usage:
Map 1 - 1P-6Btn MAME
Map 2 - Only P2-6Btn MAME - Like Map 1, but with Player 2 defaults. Can be used in a standalone P2 controller or with a second board running Map 1 (or Firmware Set Bravo) for simple wiring in a 2 player panel.
Map 3 - 2P-3Btn MAME
Map 4 - 2P-6Btn MAME - The most common CP configuration that people choose.  Right now, I see two ways to approach this using just one board.  Which of these would you prefer?

1.
The current map requires relatively complicated wiring (daisy-chaining the correct NO contacts on switches for the “impossible” presses, I believe) and re-mapping several keys in MAME.  Admin buttons not available outside MAME, since it uses a combination of keypresses to activate those functions.

2. Change the HWB input in this map to a "Function Shift" (FS) that activates the admin functions. i.e. FS + P1 Left = 5 (P1 Coin), FS + P1 Right = 1 (P1 Start), etc. There's room for 1 FS input + {2 x (4 directions + 6 buttons)} = 21 inputs.  – Easier to wire, but requires remembering the combinations to activate admin functions. Admin button functions available outside MAME. You would have to press the HWB button on the encoder board itself to change mode. This map may have to be a separate firmware set.

Map 5 - P3+P4 MAME – 1 pause input (reprogrammed HWB button) + {2 x (4 directions + 4 buttons + coin + start)} = 21 inputs.
Map 6 - Pinball
Map 7 - Generic (Alphabetic)
Map 8 - Generic (Numeric/hexadecimal/keypad keys/etc.)

--Firmware Set Bravo: 1 Player - 6 Btn. MAME/Pinball

--Firmware Set Charlie: 2 Player - 3 Btn. MAME/Pinball (Adjusted slightly to match)

--Firmware Sets Zed001, Zed002, etc.: Generic and/or custom maps made for specific programs or by request.

I proposed Bravo and Charlie for those who want their panel to switch from MAME to VP/FP maps with just one press of a "HWB" admin button.  This becomes important if they can’t see the blinking LED to know what mode it is in. (Picture trying to remember if you pressed the button 6 times or 7, and wondering whether all of them registered.)


Scott
« Last Edit: June 16, 2012, 01:22:21 pm by PL1 »

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #83 on: June 17, 2012, 09:51:47 am »
Don't have a problem with how the code is setup at all. the 2p configurations don't bother me. Don't play any pinball games either. I do agree that when the minimus is installed in a cab or enclosure, its going to be very hard to see what mode you are in.

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #84 on: June 17, 2012, 11:26:59 am »
I do mostly pinball and a shift function within that mapping as I would cut down on the number of button needed. For example using an ipac, I usually program a combo of start and right flipper to emulate coin. Also start Enter to give me escape. Keeps a pin looking more realistic.

As for the led for mode, could you not simply connect another led off the back of the existing led connections that is visible behind the bezel?
Pm me for custom cnc needs...

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9663
  • Last login:Today at 02:20:58 pm
  • Designated spam hunter
Re: DIY keyboard encoder
« Reply #85 on: June 17, 2012, 12:18:37 pm »
could you not simply connect another led off the back of the existing led connections

This pic gives you an idea of just how tiny (.1") the surface mount LEDs at the bottom are compared to the standard USB connector at the top.



The only way that I can think to add an external LED is for Degenetron to reprogram one of the inputs to a LED output. (If that's possible. :dunno)

You could also just mount the board so that the LED shines through your bezel and all the wires go out the bottom of the board.


Scott
« Last Edit: June 17, 2012, 12:25:17 pm by PL1 »

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #86 on: June 17, 2012, 01:16:11 pm »
Would be interesting if they could be programmed to be output triggers then potentially they could drive a relay board and we have a cheap led wiz replacement also.
Pm me for custom cnc needs...

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #87 on: June 18, 2012, 05:59:22 pm »

The only way that I can think to add an external LED is for Degenetron to reprogram one of the inputs to a LED output. (If that's possible. :dunno)

You could also just mount the board so that the LED shines through your bezel and all the wires go out the bottom of the board.

Scott
I can program any of the inputs to be an output.  I am doing this very thing for another project I am working on.  This output 5V can be used to drive LED's or other connected peripherals.

We would have to sacrifice a pin to power an external LED. 
Maybe we could have some modes that make use 1 or 2 outputs for LED's

I made a comment before about performing a hard switch of modes.  This is similar to what is being suggested by PL1 as separate firmwares.  I think it would be good to have a system to allow all the permutations on a single AVR.
To toggle between the groups (A, B, C) you would do a long press (10/15 seconds) of the HWB button.  To toggle within the groups,  you would press once.

A) standard (all direct input): MAME1P, MAME2P, GENERIC, PINBALL...
B) extended (with impossible presses): MAME1P, MAME2P...
C) leds (with outputs for led): MAME1P, MAME2P...

I have another suggestion which is a bit left field.  I think i can get this device to output audio.  I could output beeps, tones or samples.  The beeps and tones are easily done and would not use much memory.  The samples would have to be very short 8 bit (PCM).
So I could have the device play a few notes to indicate change of mode or change of group,  or it could (potential) speak the mode name or number.
Output would need to be amplified but you would probably have an amplifier in a cab anyhow.  This would need 1 pin.

I hope this all makes sense.

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #88 on: June 18, 2012, 06:10:47 pm »
Would be interesting if they could be programmed to be output triggers then potentially they could drive a relay board and we have a cheap led wiz replacement also.
Interesting.  I can use 20 pins for output.  I can program some sequences in the firware.  I am not familiar with led wiz.  If you can give me some idea of what you want the I will take a look at that.

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #89 on: June 19, 2012, 11:40:06 am »
ledwiz can be used to program lighting sequences on its 32 ports. it can handle upto 500mah per output (not all at the same time as i understand it). We currently have some software written than interacts with pinmame to trigger off the rom events that are then controled via the ledwiz. The Led's or even contactors or relays that are switching high demand items (motors, etc). With this we have been able to replicated much of the hardware and lighting effects you get on a real pinball.

ledwiz home page
http://groovygamegear.com/webstore/index.php?main_page=product_info&products_id=239

a big thread on the software etc is over on the hyperpin forum.
http://www.hyperspin-fe.com/forum/showthread.php?10980-Tutorial-How-to-config-Ledwiz-PacDrive

many builds now, mine included have this force feedback installed, makes for a very interactive game.

If we could somehow call this device in replace of the ledwiz, again it would be cheap alternative, however I can't commment on its limitations or maybe even greater potential it has over the ledwiz to do this type of control or even just to mimic what the ledwiz does for led's. certinaly for lighting a control panel etc it would again be a cheaper alternative.

Pm me for custom cnc needs...

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #90 on: June 21, 2012, 02:13:04 am »
I have two of these usb dev boards inbound so I can hopefully wrap up my Gauntlet.  Really appreciate all the work you've done so far and will likely be hitting you up once I get the minimi (minimuses?) in. 

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #91 on: June 21, 2012, 12:39:54 pm »
^^ awesome, someone else on the minimus encoder bandwagon  ;D

GIZMOGAMES

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 103
  • Last login:February 28, 2019, 10:33:46 pm
Re: DIY keyboard encoder
« Reply #92 on: June 21, 2012, 12:55:55 pm »
ide love a couple of these set for xbox those parts you used are getting like rockinhorse doodoo to pick up tho i cant find them anywhere for relatively cheep :S
 keep up the great work tho :)  :cheers: :cheers:

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:May 25, 2025, 09:38:18 pm
  • Fighter Captured
Re: DIY keyboard encoder
« Reply #93 on: June 21, 2012, 01:07:01 pm »
^^ awesome, someone else on the minimus encoder bandwagon  ;D

If you're keeping count, I have four of them as well.  One has degenatrons binaries on it and is working as anticipated.

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #94 on: June 21, 2012, 01:29:59 pm »
I am now the proud owner of 10 units for all these projects I have around here. Will try and soak test one this weekend. Stunning job on this.
Pm me for custom cnc needs...

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #95 on: June 21, 2012, 05:13:52 pm »
Thanks for testing these out in your cab projects.   Let me know how it goes.

Here's a useful guide to loading firmware on the minimus if you're a first timer: http://www.minimususb.com/minimus_v14.pdf

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #96 on: June 25, 2012, 08:55:38 pm »
Boards came in today.  Got FLIP installed, drivers installed, and loaded up Denegatron's hex no issues.  Works great and is readily id'd by windows.

I'm planning on using these to interface with my Caanoo in MAME4All.   

-- the following is a thread-jack and can be ignored unless you are curious and/or have made any progress towards HID joystick mapping on these boards --
[threadjack]
The caanoo doesn't handle peripheral recognition globally so it is up to each ap dev to port it in as they see fit.  MAME4All doesn't recognize keyboards so doesn't recognize the current mappings.  Also it doesn't recognize multiple controllers on one device, so the Xin-Mo boards only will register the P1 inputs and my gpWiz40 is in the same boat.  MAME4All will recognize multiple devices via USB hub, not sure how this looks any different than what's coming through Xin-Mo boards but that's that.  Endstate is that I need to crack the nut on a simple 7 input (four directions and three buttons) HID controller mapping for these boards.  Then I can use 3 or 4 or them to make my nut.  I am slowing trying to figure out how to do this by prowling the LUFA forums but I am by no means a programmer or even wannabe so we'll see how I fair.  Anytime somebody wants to sweep in to the rescue is fine by me.  Oh, and if you're wondering why I don't hack 3 pads it's because I don't have room for those bulky-ass boards in my build.
[/threadjack]

Denegatron, your pinout on your website doesn't match either of the three shown on this thread.  No issue, just sayin.   :)  Thank you very much for your awesome site as it has been immensely helpful already. 

Anybody looking to get one of these minimus AVRs for themselves please go buy out 404.  Once he's bingo you can get yours where I got mine (sorry I don't like shipping costs from England to US) http://www.foundmy.com/oscom/minimus-avr-usb-32k-instock-p-402.html
     
   

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #97 on: June 25, 2012, 09:59:22 pm »
Denegatron, 404 - just ran across this: https://bitbucket.org/sigio/revmame-hid-joystick/src

USB HID joystick driver based on AT90USB162 board.  Seems like that is right up our alley.  That said I have no idea what to do with the listed makefile but it's got a little picture of the minimus beside it.  Is this helpful at all? 



404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #98 on: June 26, 2012, 10:02:01 am »
Boards came in today.  Got FLIP installed, drivers installed, and loaded up Denegatron's hex no issues.  Works great and is readily id'd by windows.

I'm planning on using these to interface with my Caanoo in MAME4All.   

-- the following is a thread-jack and can be ignored unless you are curious and/or have made any progress towards HID joystick mapping on these boards --
[threadjack]
The caanoo doesn't handle peripheral recognition globally so it is up to each ap dev to port it in as they see fit.  MAME4All doesn't recognize keyboards so doesn't recognize the current mappings.  Also it doesn't recognize multiple controllers on one device, so the Xin-Mo boards only will register the P1 inputs and my gpWiz40 is in the same boat.  MAME4All will recognize multiple devices via USB hub, not sure how this looks any different than what's coming through Xin-Mo boards but that's that.  Endstate is that I need to crack the nut on a simple 7 input (four directions and three buttons) HID controller mapping for these boards.  Then I can use 3 or 4 or them to make my nut.  I am slowing trying to figure out how to do this by prowling the LUFA forums but I am by no means a programmer or even wannabe so we'll see how I fair.  Anytime somebody wants to sweep in to the rescue is fine by me.  Oh, and if you're wondering why I don't hack 3 pads it's because I don't have room for those bulky-ass boards in my build.
[/threadjack]

Denegatron, your pinout on your website doesn't match either of the three shown on this thread.  No issue, just sayin.   :)  Thank you very much for your awesome site as it has been immensely helpful already. 

Anybody looking to get one of these minimus AVRs for themselves please go buy out 404.  Once he's bingo you can get yours where I got mine (sorry I don't like shipping costs from England to US) http://www.foundmy.com/oscom/minimus-avr-usb-32k-instock-p-402.html    
   

I know the owner of foundmy. We go back some time. I can tell you that he has limited stock left of minimus units. I also happen to know the Xecuter guys that worked on the minimus. Whatever stock you see out there in the wild is the absolute last stock anywhere. Get them while you still can.

As for your issue here. There are a few solutions.

Most people refer to Jamie Lentin's code as the base for most of their USB HID joystick work.
http://jamie.lentin.co.uk/embedded/arcade-joystick/

I did speak to Jamie and he is very helpful. I'm not a great coder and I too am a total AVR N00b. He was gracious enough to offer me his hex and unfortunately, it didn't work for me. Also, i tinkered a bit with his source code and couldn't get it to properly adapt to the minimus 16 units. It could have been the fact that i am still a bit more worried about getting a cabinet for my project so i didn't tinker with the code that much. If you happened to have gotten a batch of minimus32 units, i can send you his hex. Use it at your own risk.

The revmame project is incomplete. I believe i spoke to the developer when i first found the code and he is still working on his mame cab and right now has a set of usb controllers running on the cab. He said he would let me know when the source is done.

The guy over at slashdev, who wrote the complete ps3 code hex may be able to help you. You can tell him your situation and ask him to compile the code to work on the minimus.

Or, you can just wait for degenatrons to finish his project. :)

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #99 on: June 26, 2012, 04:07:36 pm »
404,  good info thanks.  I tried a PS3 hex I found on another site.  It recognizes fine in window but won't register button presses so something seems to be wrong.  I'll keep plugging away at it. 

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #100 on: June 26, 2012, 04:30:53 pm »
Denegatron, 404 - just ran across this: https://bitbucket.org/sigio/revmame-hid-joystick/src

USB HID joystick driver based on AT90USB162 board.  Seems like that is right up our alley.  That said I have no idea what to do with the listed makefile but it's got a little picture of the minimus beside it.  Is this helpful at all? 

Hey Le Chuck,  I took a look at this before, along with some other clones of the grunskis/PJRC joystick. This does not use Windows HID device drivers and is therefore not plug and play on Windows.  It needs an .inf file and driver software from libusb library.  It should work fine on Mac and Linux.
If you want to get it working using on Windows using libusb then you can get it from http://sourceforge.net/apps/trac/libusb-win32/wiki .

I built a basic HID joystick based on the examples from the LUFA library - Jamie Lentin also did something along the same lines.  I would like to add more buttons and a 2 player setup.
At some point I will pick this up and look to incorporate a HID joystick mode in my encoder.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #101 on: June 26, 2012, 05:01:21 pm »
Denegatron, 404 - just ran across this: https://bitbucket.org/sigio/revmame-hid-joystick/src

USB HID joystick driver based on AT90USB162 board.  Seems like that is right up our alley.  That said I have no idea what to do with the listed makefile but it's got a little picture of the minimus beside it.  Is this helpful at all? 

Hey Le Chuck,  I took a look at this before, along with some other clones of the grunskis/PJRC joystick. This does not use Windows HID device drivers and is therefore not plug and play on Windows.  It needs an .inf file and driver software from libusb library.  It should work fine on Mac and Linux.
If you want to get it working using on Windows using libusb then you can get it from http://sourceforge.net/apps/trac/libusb-win32/wiki .

I built a basic HID joystick based on the examples from the LUFA library - Jamie Lentin also did something along the same lines.  I would like to add more buttons and a 2 player setup.
At some point I will pick this up and look to incorporate a HID joystick mode in my encoder.

Thanks, like I said I don't know exactly what I'm looking at IR to this stuff so I'm glad you and 404 are here to help set me straight.  If you care to share your hex I don't need anything fancy, just four directions and two or three buttons would be great but I'll take what you have for testing porpoises. 

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #102 on: June 26, 2012, 06:31:16 pm »
404,  good info thanks.  I tried a PS3 hex I found on another site.  It recognizes fine in window but won't register button presses so something seems to be wrong.  I'll keep plugging away at it. 

XIM? lol

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #103 on: June 26, 2012, 06:53:17 pm »
Here is the last known working build of Jamie Lentin's HID joystick encoder. Again, this was built for the Minimus 32 ATMEGA32U2 as opposed to the minimus16 which uses the AT90USB162 chip. The two chips, at least in spec should be cross compatible. In this case, the code used is not. I just tested it on yet another minimus16k and got zero response from grounding any of the ports, just like Jamie's build he sent me. Use at your own risk.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #104 on: June 26, 2012, 07:33:03 pm »
404,  good info thanks.  I tried a PS3 hex I found on another site.  It recognizes fine in window but won't register button presses so something seems to be wrong.  I'll keep plugging away at it. 

XIM? lol

maybe  ::)

Here is the last known working build of Jamie Lentin's HID joystick encoder. Again, this was built for the Minimus 32 ATMEGA32U2 as opposed to the minimus16 which uses the AT90USB162 chip. The two chips, at least in spec should be cross compatible. In this case, the code used is not. I just tested it on yet another minimus16k and got zero response from grounding any of the ports, just like Jamie's build he sent me. Use at your own risk.

I'll give it a whirl but if it didn't work for you I don't see how I'll be any different.  Thanks tho. 

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #105 on: June 26, 2012, 07:58:19 pm »
404,  good info thanks.  I tried a PS3 hex I found on another site.  It recognizes fine in window but won't register button presses so something seems to be wrong.  I'll keep plugging away at it. 

XIM? lol

maybe  ::)

Here is the last known working build of Jamie Lentin's HID joystick encoder. Again, this was built for the Minimus 32 ATMEGA32U2 as opposed to the minimus16 which uses the AT90USB162 chip. The two chips, at least in spec should be cross compatible. In this case, the code used is not. I just tested it on yet another minimus16k and got zero response from grounding any of the ports, just like Jamie's build he sent me. Use at your own risk.

I'll give it a whirl but if it didn't work for you I don't see how I'll be any different.  Thanks tho. 

figured i would put it up considering so many people are asking for HID code. If you cannot manage to get the slashdev developer to do it and you are in a rush to get this done, you can always take a chance and get yourself a minimus32.

 I can personally do without the HID code in Degenatron's work. However, IMO having ps3/HID mode would put this project on par with more commercial projects like the dual strike. Imagine a sub 10 USD alternative to an approximately 40USD dollar piece of hardware that requires no assembly and a few mouse clicks to flash.

I do know someone that has some AVR experience and I had a batch of minimus mods sent over to him.  His initial plans were to port as much of the dual strike code over to use on the cheaper AT9 series chips. He has kept up with Degenatron's work and is now having second thoughts as it's quite redundant to have two projects with similar goals. Who knows if and/or when he actually plans on starting. Can't say i blame him if he never gets the project off of the ground.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:May 20, 2025, 04:44:57 pm
  • <insert personal text here>
Re: DIY keyboard encoder
« Reply #106 on: June 26, 2012, 08:06:17 pm »
figured i would put it up considering so many people are asking for HID code. If you cannot manage to get the slashdev developer to do it and you are in a rush to get this done, you can always take a chance and get yourself a minimus32.

 I can personally do without the HID code in Degenatron's work. However, IMO having ps3/HID mode would put this project on par with more commercial projects like the dual strike. Imagine a sub 10 USD alternative to an approximately 40USD dollar piece of hardware that requires no assembly and a few mouse clicks to flash.

I do know someone that has some AVR experience and I had a batch of minimus mods sent over to him.  His initial plans were to port as much of the dual strike code over to use on the cheaper AT9 series chips. He has kept up with Degenatron's work and is now having second thoughts as it's quite redundant to have two projects with similar goals. Who knows if and/or when he actually plans on starting. Can't say i blame him if he never gets the project off of the ground.

Yeah, no dice.  It comes up but won't register.  Having the HID option would make my life easier.  Save me from buying and hacking a bunch of cheapo controllers.  I'm not in a huge hurry but I would eventually like to put my current mini to bed as it's been dragging out a bit now.

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #107 on: June 26, 2012, 08:21:30 pm »
figured i would put it up considering so many people are asking for HID code. If you cannot manage to get the slashdev developer to do it and you are in a rush to get this done, you can always take a chance and get yourself a minimus32.

 I can personally do without the HID code in Degenatron's work. However, IMO having ps3/HID mode would put this project on par with more commercial projects like the dual strike. Imagine a sub 10 USD alternative to an approximately 40USD dollar piece of hardware that requires no assembly and a few mouse clicks to flash.

I do know someone that has some AVR experience and I had a batch of minimus mods sent over to him.  His initial plans were to port as much of the dual strike code over to use on the cheaper AT9 series chips. He has kept up with Degenatron's work and is now having second thoughts as it's quite redundant to have two projects with similar goals. Who knows if and/or when he actually plans on starting. Can't say i blame him if he never gets the project off of the ground.

Yeah, no dice.  It comes up but won't register.  Having the HID option would make my life easier.  Save me from buying and hacking a bunch of cheapo controllers.  I'm not in a huge hurry but I would eventually like to put my current mini to bed as it's been dragging out a bit now.

Yeah, i hear ya. I may see what the slashdev guy is up to lately as he has not updated the site in a while. If he is up to porting his code to the minimus, I'll mail him or have the foundmy owner send him a sample to work with. Considering he hasn't posted in a while, i wouldn't exactly hold my breath on that.

Look on the bright side, your cab and most of the electronics are done. I'm no wood worker. My last attempt at a cab came out pretty horrific.  ;D

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #108 on: June 27, 2012, 02:30:14 pm »
The attached PDF gives you an idea of the key mappings I will be including in the next version.  A lot of credit goes to PL1 for his input and suggestions.

This will be a significantly more capable device - with some interesting interactive options.

To add some order to the many modes I have added groups.  There will be at least 4 groups.  These groups will contain up to 5 different modes each.

Group A - Direct Wired Maps (1P MAME, 2P MAME, 1P and 2P MAME, 3P and 4P MAME, 1P Pinball)
Group B - Special Maps (Alphatebic, Hexadecimal, MAME extended/impossible)
Group C - Direct Wired Maps with External LED (Similar to group A with external LED)
Group D - Direct Wired Maps with External Sound (Similar to group A with external sound)

To toggle groups, a long press of the HWB button is required - hold down for 2 or more seconds.
To toggle modes, a short press is required.

The LED's on the minimus will flash to indicate the group and mode when you make a change,  or when it powers up.
Number of blue flashes = group number
Number of red flashes = mode number

I have added some interactive groups to support external LED and external Speaker (or buzzer).
When an LED mode is active it will send flashes to pin B10 (to identify mode only).  If you connect up an external LED it can be mounted on a control panel.  It could also be used in combination with a wired up HWB button,  if a translucent LED button is used.

When a speaker mode is active,  it will send sound to pin B10.  You can connect an 8ohm speaker or a piezo buzzer (like you get in door chimes) or you can connect to the amp in your cabinet.  The speaker will echo the group and mode by playing low and high tones.  Actually,  my plan was to use sampled sound but that is proving a little difficult,  but i will persist.

I hope to have this update out soon and it will hopefully get feedback and continue to develop.
PL1 - this release will not include all the mappings we have been discussing but it is a start and I want to get a stable release out so I can get feedback.  I can push out updates and changes.

We don't have HID joystick mode yet,  but seems this would be a useful addition.  I will be taking another look at that when this lot is stable.

Any feedback, good and bad, on these developments is appreciated.
« Last Edit: June 27, 2012, 02:34:37 pm by degenatrons »

macattack

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 293
  • Last login:August 03, 2018, 05:35:16 pm
  • Cabinet builder to the stars!
Re: DIY keyboard encoder
« Reply #109 on: June 27, 2012, 07:58:36 pm »
Incredible work, thanks.

Installed one in my space invaders today. Works a charm.
Just need to find some decent USB extension cables.
Pm me for custom cnc needs...

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #110 on: June 27, 2012, 08:17:47 pm »
Looking forward to it. just to happens i have a buzzer pulled from a dead motherboard here sitting right on my desk.  ;D

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #111 on: June 28, 2012, 07:11:24 pm »
I have an update for the encoder with some neat new stuff.

There are multiple groups and each group has a series of modes.  I made some tweaks to the groups,  so we now have:

A: Direct Wired Maps (7 different modes)
B: Extended Maps for MAME (making use of impossible combinations to support 2 players with 6 buttons each)
C: Hotswap between MAME and Pinball
D: Hotswap between MAME and Generic (mainly for multiple console support)
E: Modes (as per A) with a dedicated pin for external LED and/or Speaker/Buzzer on B10 pin.
F: A slot for custom/user requested modes.  This will be empty.  If you connect a speaker it will play a short tune/demo when in this mode.

You can see all the groups and modes in the attached key mapping PDF.  This PDF is intended as a quick reference card.
Thanks again to PL1 for continued input and advice on the mappings.

To switch groups use a long press > 2 seconds
To switch modes within a group use a short press.
The onboard leds will echo the group/mode.

The most common modes are in group 1.  To keep it easy to setup for normal use.

The firmware (hex v1.4) is attached.

I tested this out and it seems to work ok.
404 - Would be great if you could test with that buzzer.  You need to get to group E and F to get output on B10 pin. 
The output on B10 is good for speakers (about 8 ohm), buzzers and LEDs.

Cheers


404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #112 on: June 28, 2012, 09:41:18 pm »
ill test out the buzzer and led functionality as soon as i can wrap my brain around all of the new modes you added.  ;D

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #113 on: July 02, 2012, 04:36:43 pm »
I tidied up some stuff and put out a big update on my resources page at https://sites.google.com/site/degenatrons/controller-interfaces/usb-keyboard-encoder/resources

For basic use,  you don't need to concern yourself with all the flashy stuff.  The encoder will default to Group A and this has 7 modes which can be toggled using the HWB pin.  Refer to my resources page for a basic reference to Group A mappings.

There are many advanced groups.  A full mapping table is available for these.
I consolidated the LED and sound output into a single group so it doesnt matter if you connect a speaker, buzzer or an LED to pin B10.  Whatever it is will buzz or flash.

The latest firmware (v1.4.1) and docs are attached as zip file.

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #114 on: July 02, 2012, 09:17:32 pm »
been quite busy so haven't been able to test anything yet. I can't seem to catch up with you degenatrons!  :)

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #115 on: July 03, 2012, 01:06:31 pm »
been quite busy so haven't been able to test anything yet. I can't seem to catch up with you degenatrons!  :)

No worries.  No rush.  Thanks for helping out.

404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #116 on: July 08, 2012, 11:51:25 am »
I'm probably doing something wrong as i still dont understand all of these groups. I tried a few times now and can't get it to switch over to the last group to get an LED or buzzer to work. :(

degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #117 on: July 08, 2012, 03:01:31 pm »
I'm probably doing something wrong as i still dont understand all of these groups. I tried a few times now and can't get it to switch over to the last group to get an LED or buzzer to work. :(

Hey thanks for looking at this. 

Just to be sure you have the latest firmware and keymappings,  you can get v1.4.1 at
https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxkZWdlbmF0cm9uc3xneDoxYWJiM2FmODcxMWU1MTY0

After firmware is loaded,  you can switch groups with a long press of the HWB button.  The LED's and sound are in group F so you need to do a few long presses to set this group.  After you change groups the onboard LEDs should flash to give you indication.

The 1st LED flashes the number of the active group,  then the 2nd LED flashes the number of the active mode.

Maybe if this is too complicated I may have to simplify.
PL1 has suggested having different firmwares instead of groups.

I hope this all makes sense.  Let me know if you need some more info.

Cheers


degenatrons

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 364
  • Last login:March 29, 2016, 05:53:23 pm
    • KADE
Re: DIY keyboard encoder
« Reply #118 on: July 08, 2012, 03:07:02 pm »
It did not take long to assemble a fleet of encoders


404

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1019
  • Last login:August 04, 2015, 10:19:10 pm
Re: DIY keyboard encoder
« Reply #119 on: July 08, 2012, 03:15:31 pm »
It did not take long to assemble a fleet of encoders



you sunk my battleship  ;D