l2/r2 analog stick board
#31
(09-06-2018, 02:41 AM)Flavor Wrote: Let me know which SD image you guys are starting with.  I will try to recreate it and post a solution.

In the meantime, I will burn Freeplay_CM3_18081001.img.gz to an SD and see if it has this problem, so I can start looking at a solution.

I am using Freeplay_CM3_18090501.img.gz, I have followed the instructions outlined in the setup description and received no error messages during the install of the software. Everything finishes up and says DKMS or whatever complete. For some reason though, none of the buttons on my add on board are working, and the fan is not powering up either. I have tried to configure input, and done a few clean installs with the software and both SD card images available on the site. At this point, I believe it has to be a bad soldering job, and am going to take everything apart and redo it. 

Do you have any other suggestions or possible fixes to look into? I am headed down to the store to buy some more GPIO header pins (mine are clipped to short and may not be reusable)  Confused
Reply
#32
stevo619
WAIT!

I'm sorry.  I was out at lunch and then at the bank for way too long.

If your A/B/X/Y/DPAD/etc are working, then it's not a dkms problem.

I think your problem is with the config file.  Now that you have extra buttons (with the add-on board), you need to edit the conf file.
For more info see https://docs.google.com/document/d/1GkmF...1VnZ1wgEY/

Do this command:
sudo nano /etc/modprobe.d/mk_arcade_joystick.conf

If you are using the L2/R2 addon but not using any analog input, then it should look like this.


Code:
#options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,-1,-1,-1,-1 hkmode=2
#this next line is for use with 4 extra buttons (maybe L2,R2,C,Z)
options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40 hkmode=2
#this next line is for use with a single PSP1000 analog stick
#options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41
#this next line is for use with 2 PSP1000 analog sticks
#options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 x2addr=75 y2addr=79 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41


If you are using a single PSP analog stick, then use this:

Code:
#options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,-1,-1,-1,-1 hkmode=2
#this next line is for use with 4 extra buttons (maybe L2,R2,C,Z)
#options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40 hkmode=2
#this next line is for use with a single PSP1000 analog stick
options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41
#this next line is for use with 2 PSP1000 analog sticks
#options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 x2addr=75 y2addr=79 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41


The fan is a different issue, and we can get more into that if you want. Basically, if you want it to come on when the CPU gets hot, then you'd use this:
https://github.com/TheFlav/rpi-fan
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
#33
(11-15-2018, 04:54 AM)stevo619 Wrote:
(09-06-2018, 02:41 AM)Flavor Wrote: Let me know which SD image you guys are starting with.  I will try to recreate it and post a solution.

In the meantime, I will burn Freeplay_CM3_18081001.img.gz to an SD and see if it has this problem, so I can start looking at a solution.

I am using Freeplay_CM3_18090501.img.gz, I have followed the instructions outlined in the setup description and received no error messages during the install of the software. Everything finishes up and says DKMS or whatever complete. For some reason though, none of the buttons on my add on board are working, and the fan is was not powering up either. I have tried to configure input, and done a few clean installs with the software and both SD card images available on the site. At this point, I believe it has to be a bad soldering job, and am going to take everything apart and redo it. 

I have 5v and a good ground on the add on board, with 3.3v and good grounds going to the analog surface plates. I did notice the fan wasn't working because the surface plate labeled FAN_GND is not a ground according to my voltmeter. Moved the ground wire and bam, the fan is running. Still no L2, R2, and hot button in the game slot... None of the board buttons are showing 3.3v on any of the pins either. Stock CM3 board the buttons have 3.3v running to one of the post constantly, so I know the issue is they are not getting power, but can't determine why.

Do you have any other suggestions or possible fixes to look into? I just went to Microcenter and bought new copper pins and re-soldered everything just to be sure. I am going to wipe and try another clean install. Hopefully it is just a software issue and the GPIO is not turning the power on because it doesn't know to do so for whatever reason. Let me know what you think.  Confused 

I should also add that I have not yet installed the psp1000 joysticks, as I was hoping to get everything else working before messing with the analog inputs. 
Reply
#34
stevo619,
Did you see my previous post here? There's a lot of info for you. I think that you have to edit the conf file using
sudo nano /etc/modprobe.d/mk_arcade_joystick.conf

That's the piece that I'm guessing you're missing here.

If you want to test the joystick, then run
jstest /dev/input/js0
to see what the joystick is reporting

You can also run
gpio readall
To see button states, but jstest is more applicable here.
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
#35
(11-15-2018, 08:00 AM)Flavor Wrote: stevo619,
Did you see my previous post here?  There's a lot of info for you.  I think that you have to edit the conf file using
sudo nano /etc/modprobe.d/mk_arcade_joystick.conf

That's the piece that I'm guessing you're missing here.

If you want to test the joystick, then run
jstest /dev/input/js0
to see what the joystick is reporting

You can also run
gpio readall
To see button states, but jstest is more applicable here.
I did see your post after I re-soldered everything again. Did a much better job this time anyway lol. 

The config file was my issue. Everything is working great now. I will be messing with the software for the fan next, and then on to more case modding to fit my psp1000 sticks in. Then I will drop in that other code to turn them on.

This has been a bit more involved than I thought, but is totally going to be worth it. I will probably wind up doing another shell at some point, as the first one is a bit of a learning experience. 

Can't thank you enough for pointers and expertise here. 

You are awesome!!!
Reply
#36
(11-15-2018, 02:15 PM)stevo619 Wrote: I did see your post after I re-soldered everything again. Did a much better job this time anyway lol. 

The config file was my issue. Everything is working great now. I will be messing with the software for the fan next, and then on to more case modding to fit my psp1000 sticks in. Then I will drop in that other code to turn them on.

This has been a bit more involved than I thought, but is totally going to be worth it. I will probably wind up doing another shell at some point, as the first one is a bit of a learning experience. 

Can't thank you enough for pointers and expertise here. 

You are awesome!!!

That's great news, stevo619. I'm glad to hear that it's working now!

Please feel free to ask about the fan when you get to it. I know that it's not well documented, so I need to know what the sticking points are with that setup. You can install it "always-on" or "Pi-controlled." The Pi-controlled method requires that rpi-fan control (or some other software) that I mentioned earlier.
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
#37
Here's my log:


Code:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.98-v7+/modules.dep.bin'

------------------------------
Deleting module version: 0.1.6.2
completely from the DKMS tree.
------------------------------
Done.
Reading package lists... Done
Building dependency tree
Reading state information... Done
cpp-4.7 is already the newest version (4.7.3-11+rpi1).
dkms is already the newest version (2.3-2).
gcc-4.7 is already the newest version (4.7.3-11+rpi1).
joystick is already the newest version (1:1.6.0-1).
raspberrypi-kernel is already the newest version (1.20190819~stretch-1).
raspberrypi-kernel-headers is already the newest version (1.20190819~stretch-1).
wiringpi is already the newest version (2.50).
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
If your kernel was just updated, you may need to reboot and rerun this script

Creating symlink /var/lib/dkms/mk_arcade_joystick_rpi/0.1.6.2/source ->
                 /usr/src/mk_arcade_joystick_rpi-0.1.6.2

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
Error! echo
Your kernel headers for kernel 4.14.98-v7+ cannot be found at
/lib/modules/4.14.98-v7+/build or /lib/modules/4.14.98-v7+/source.
mk_arcade_joystick_rpi already present in /etc/modules
You may need to edit /etc/modules by hand

/etc/modprobe.d/mk_arcade_joystick.conf exists and contains options for mk_arcade_joystick_rpi
Already contain lines for v0.1.5.10+ of the driver

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.98-v7+/modules.dep.bin'
modprobe: FATAL: Module mk_arcade_joystick_rpi not found in directory /lib/modules/4.14.98-v7+
It is recommended that you run 'sudo nano /etc/modprobe.d/mk_arcade_joystick.conf' to set up desired parameters.
0


Is this alright?

EDIT: I deleted the old DKMS and rebuilt it. First none of the buttons worked, but then i commented out the default line used in the config and replaced it with the line from the instructions. Now all the buttons work except for the D-pad, which gives no input at all.

EDIT#2: My bad, even though i disassebled and reassembled the device thrice, i failed to notice that my d-pad was oriented wrong. Everything works now.
Reply
#38
Good evening, I write from Argentina, first of all thank you very much for your effort in this version, my query is as follows, I have RECALBOX 6.1.1 installed in my bartop, and I want to make the L2 and R2 buttons work in my gpio, but I cannot make them work, i need this setting is it possible?

#this next line is for use with 4 extra buttons (maybe L2, R2, C, Z)
options mk_arcade_joystick_rpi map = 4 gpio = 4,17,27,22,10,9,25,24,23,18,15,14,2,19,26, -1, -1 hkmode = 2

I've also tried replacing the original mk_arcade_joystick_rpi.ko file with mk_arcade_joystick_rpi.ko from THEFLAV but it didn't work.

To be clearer, the only thing I need is to add L2 and R2 to the driver with that GPIO configuration.

thank you very much in advance
Reply
#39
nuke_arg: I need to be quick, so I apologize for the shortness.

This line can not have extra spaces. Try this.
options mk_arcade_joystick_rpi map=4 gpio=4,17,27,22,10,9,25,24,23,18,15,14,2,19,26,-1,-1 hkmode=2

Also, show us the output from this command when logged into the machine.
dmesg |grep mk_arcade

Are you using a Freeplay CM3 as your bartop?
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
#40
(05-26-2020, 12:12 AM)Flavor Wrote: nuke_arg:  I need to be quick, so I apologize for the shortness.

This line can not have extra spaces.  Try this.
options mk_arcade_joystick_rpi map=4 gpio=4,17,27,22,10,9,25,24,23,18,15,14,2,19,26,-1,-1 hkmode=2

Also, show us the output from this command when logged into the machine.
dmesg |grep mk_arcade

Are you using a Freeplay CM3 as your bartop?

First of all thank you very much for answering, I am using the original version of RECALBOX 6.1.1 DRANGONZBLAZE in my RPI3 +, just replace the original mk_arcade_joystick.ko file with that of your cm3 version, also add the file in etc / modprobe, and set gpio map = 4 in recalbox.conf.

I would just like to add to the gpio 19,26 pins the L2 and R2 buttons

Later when I get back from work, I'm going to show the log and try that option setting with hkmode = 2a, hopefully it works a long time ago that I have those dead side buttons on my bartop since recalbox is very closed for modifications.

Thanks for your time!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)