Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My build (now with secondary shoulder buttons!)
#1
Initial build: https://imgur.com/a/Cj3hG

Later post with L2/R2 shoulder buttons: https://imgur.com/a/oK4VJ

Shoulder button Thing: https://www.thingiverse.com/thing:2789672

The thing has been updated to include a deeper shield for the outside (the version pictured lets you see into the case).
Reply
#2
Incidentally, I'm presently trying to modify mk_arcade_joystick_rpi to support the extra buttons. I can see them working using `watch -n 0.125 -- gpio readall` (pins 41 & 43), but I'm having trouble getting the rebuilt JS to work without breaking the hotkey button.

Perhaps someone can take a look and tell me what I'm doing wrong...

https://github.com/TheFlav/mk_arcade_joy...rdi:master
Reply
#3
I’ll try to make some time to make a mod like that soon to the joystick code.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#4
So, how are you editing/building that code?

Did you edit it and then
dkms build
dkms install
it?

You would probably want to increment the version number in the dkms.conf file (and also /usr/src/mk_arcade_joystick_rpi-0.1.5.5/ directory name) before doing the mods.

Then, after installing it, you could reboot (or modprobe remove/install) and then run
jstest /dev/input/js0

That's the best way to test your code, I think.

Also, what do you have in /etc/modprobe.d/mk_arcade_joystick.conf
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#5
I've been working on a new version of the mk_arcade_joystick_rpi code. I hadn't realized that it basically wouldn't properly accept/use the GPIO lines above 31 that the CM3 has. I had to re-work a bunch of the low-level stuff to accept input numbers above GPIO31. I will be testing it more, but my code is now using GPIO40, 41, 42, 43 as extra buttons.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#6
(04-05-2018, 05:42 AM)Flavor Wrote: I've been working on a new version of the mk_arcade_joystick_rpi code.  I hadn't realized that it basically wouldn't properly accept/use the GPIO lines above 31 that the CM3 has.  I had to re-work a bunch of the low-level stuff to accept input numbers above GPIO31.  I will be testing it more, but my code is now using GPIO40, 41, 42, 43 as extra buttons.

Flavor, I'm looking to add L2/R2 buttons as well as a PSP analog joystick to my build, via the GPIO expansion points on the board. Eagerly awaiting your results to see if its possible!
Reply
#7
(05-18-2018, 08:40 AM)wegener.eric@gmail.com Wrote:
(04-05-2018, 05:42 AM)Flavor Wrote: I've been working on a new version of the mk_arcade_joystick_rpi code.  I hadn't realized that it basically wouldn't properly accept/use the GPIO lines above 31 that the CM3 has.  I had to re-work a bunch of the low-level stuff to accept input numbers above GPIO31.  I will be testing it more, but my code is now using GPIO40, 41, 42, 43 as extra buttons.

Flavor, I'm looking to add L2/R2 buttons as well as a PSP analog joystick to my build, via the GPIO expansion points on the board. Eagerly awaiting your results to see if its possible!

Yes, the support should now be in https://github.com/TheFlav/mk_arcade_joystick_rpi and in the latest SD image at http://freeplaytech.com/build for the extra buttons.  You can just add them with a config change /etc/modprobe.d/mk_arcade_joystick.conf

See the line that's commented out in https://github.com/TheFlav/mk_arcade_joy...install.sh for an example.

As for PSP analog, we're still working on that.  It will need some extra hardware to do the analog->digital conversion that the Pi can access.  We're working on all that.  The pieces have been validated, but it's not really in a state that's usable, yet.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#8
(05-18-2018, 09:51 AM)Flavor Wrote:
(05-18-2018, 08:40 AM)wegener.eric@gmail.com Wrote:
(04-05-2018, 05:42 AM)Flavor Wrote: I've been working on a new version of the mk_arcade_joystick_rpi code.  I hadn't realized that it basically wouldn't properly accept/use the GPIO lines above 31 that the CM3 has.  I had to re-work a bunch of the low-level stuff to accept input numbers above GPIO31.  I will be testing it more, but my code is now using GPIO40, 41, 42, 43 as extra buttons.

Flavor, I'm looking to add L2/R2 buttons as well as a PSP analog joystick to my build, via the GPIO expansion points on the board. Eagerly awaiting your results to see if its possible!

Yes, the support should now be in https://github.com/TheFlav/mk_arcade_joystick_rpi and in the latest SD image at http://freeplaytech.com/build for the extra buttons.  You can just add them with a config change /etc/modprobe.d/mk_arcade_joystick.conf

See the line that's commented out in https://github.com/TheFlav/mk_arcade_joy...install.sh for an example.

As for PSP analog, we're still working on that.  It will need some extra hardware to do the analog->digital conversion that the Pi can access.  We're working on all that.  The pieces have been validated, but it's not really in a state that's usable, yet.

Awesome, thanks so much for the quick response. I believe I did my install using that SD image, so theoretically I'll just need to change the config file, wire up the buttons and I'll be good to go. I've got the mcp3008 AD chip that I planned on using for the PSP analog stick, I've read that some folks have been able to make that work but not sure of the specifics involved in coding to do so.
Reply
#9
(05-18-2018, 11:25 AM)wegener.eric@gmail.com Wrote: Awesome, thanks so much for the quick response. I believe I did my install using that SD image, so theoretically I'll just need to change the config file, wire up the buttons and I'll be good to go. I've got the mcp3008 AD chip that I planned on using for the PSP analog stick, I've read that some folks have been able to make that work but not sure of the specifics involved in coding to do so.

That MCP3008 chip should work okay, but you'd have to add it to the mk_arcade_joystick_rpi code if you wanted it to be a new function of the current joystick. I am planning on using a different i2c chip and adding that to the code. I already have some code that queries the values from the chip, but it's not at all integrated into the joy driver code. I don't know how soon that will happen.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#10
(05-19-2018, 02:04 AM)Flavor Wrote:
(05-18-2018, 11:25 AM)wegener.eric@gmail.com Wrote: Awesome, thanks so much for the quick response. I believe I did my install using that SD image, so theoretically I'll just need to change the config file, wire up the buttons and I'll be good to go. I've got the mcp3008 AD chip that I planned on using for the PSP analog stick, I've read that some folks have been able to make that work but not sure of the specifics involved in coding to do so.

That MCP3008 chip should work okay, but you'd have to add it to the mk_arcade_joystick_rpi code if you wanted it to be a new function of the current joystick.  I am planning on using a different i2c chip and adding that to the code.  I already have some code that queries the values from the chip, but it's not at all integrated into the joy driver code.  I don't know how soon that will happen.

I got my new L2/R2 buttons working! Now I can play pretty much all PSX titles natively without an external controller. :-) Everything worked perfectly, thanks so much for your help.

Now all that's left is the analog stick... hahaha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)