So I build some controls, hooked them up to the GPIO port and written a kernel module to interface with the input/joystick subsystem. The issue I am having is that jstest can read the controls fine, but advj detects the controls, but is unable to read them. ie it shows the correct joysticks and buttons, but detects no change in them. specifying --joystick_device raw allows the controls to be read, but neither sdl or event mode work.
Anyone have any thoughts on this? I spent the past day beating my head against advj, trying to get my module code to work before I tried jstest and realised it was working, so I'm not really in the mode for more researching and testing.
-
- Posts: 179
- Joined: Wed Jun 06, 2012 1:51 am
- Location: United States
- Contact: Website AOL
Re: AdvanceMAME Controls
I don't have an answer but that is a really cool project.
Have you considered looking at the gpio-keys kernel driver/module?
Have you considered looking at the gpio-keys kernel driver/module?
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
Re: AdvanceMAME Controls
Its an interesting module, but it registers with the input system as a keyboard, and I want to register as a joystick.
Re: AdvanceMAME Controls
Did you ever get this working (and are you willing to share the code)?Nocturnal wrote:So I build some controls, hooked them up to the GPIO port and written a kernel module to interface with the input/joystick subsystem.
Re: AdvanceMAME Controls
I knocked something up with Python that works using the uinput and GPIO modules. Blog post with full description and source.
Re: AdvanceMAME Controls
*Shrugs* It wasn't not working, advmame just can't see the events being generated except in raw mode. No idea why... well none worth the effort of testing at least.
Don't know if you have seen this blog post. Similar to what you have done, except in C not python. Had I been aware of the uinput module, I probably would have used that instead of writing my own from scratch.
I don't have to code for my module handy, my mame box is on hold till I get the last bits in the mail from the US (my package left a month ago, so it should be here any day), I have been working the pi into a toy for my 3yo nephew. The SD card with the code on it should be around here somewhere if you really want to see it.
I used a switch matrix (I believe the final one was 3x8), the pi couldn't drive it directly, and I didn't want to fool around with upping the port power (the lack of proper electrical specs was not encouraging) so I used a couple of transistors to power the matrix. I used a kernel timer to poll the matrix.
Don't know if you have seen this blog post. Similar to what you have done, except in C not python. Had I been aware of the uinput module, I probably would have used that instead of writing my own from scratch.
I don't have to code for my module handy, my mame box is on hold till I get the last bits in the mail from the US (my package left a month ago, so it should be here any day), I have been working the pi into a toy for my 3yo nephew. The SD card with the code on it should be around here somewhere if you really want to see it.
I used a switch matrix (I believe the final one was 3x8), the pi couldn't drive it directly, and I didn't want to fool around with upping the port power (the lack of proper electrical specs was not encouraging) so I used a couple of transistors to power the matrix. I used a kernel timer to poll the matrix.
Re: AdvanceMAME Controls
*Shrugs* It wasn't not working, advmame just can't see the events being generated except in raw mode. No idea why... well none worth the effort of testing at least.
Don't know if you have seen this blog post. Similar to what you have done, except in C not python. Had I been aware of the uinput module, I probably would have used that instead of writing my own from scratch.
I don't have to code for my module handy, my mame box is on hold till I get the last bits in the mail from the US (my package left a month ago, so it should be here any day), I have been working the pi into a toy for my 3yo nephew. The SD card with the code on it should be around here somewhere if you really want to see it.
I used a switch matrix (I believe the final one was 3x8), the pi couldn't drive it directly, and I didn't want to fool around with upping the port power (the lack of proper electrical specs was not encouraging) so I used a couple of transistors to power the matrix. I used a kernel timer to poll the matrix.
Don't know if you have seen this blog post. Similar to what you have done, except in C not python. Had I been aware of the uinput module, I probably would have used that instead of writing my own from scratch.
I don't have to code for my module handy, my mame box is on hold till I get the last bits in the mail from the US (my package left a month ago, so it should be here any day), I have been working the pi into a toy for my 3yo nephew. The SD card with the code on it should be around here somewhere if you really want to see it.
I used a switch matrix (I believe the final one was 3x8), the pi couldn't drive it directly, and I didn't want to fool around with upping the port power (the lack of proper electrical specs was not encouraging) so I used a couple of transistors to power the matrix. I used a kernel timer to poll the matrix.