Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Freeplay CM3 GBA clone Kit.

    Your discoveries
    freeplay cm3 clone kit
    5
    104
    29482
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Substring
      Substring @Dragu last edited by

      @dragu better summon @ian57 here, he made the tests with gpio remapping

      Former dev - Please reply with @substring so that i am notified when you answer me
      Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

      1 Reply Last reply Reply Quote 0
      • Dragu
        Dragu Banned last edited by Dragu

        @Substring
        @ian57 was last here 12 days ago, so I return to my cave 😉
        With PiGRRL the problem of the custom GPIO may also exist.

        Substring ian57 2 Replies Last reply Reply Quote 0
        • Substring
          Substring @Dragu last edited by

          @dragu but i can get in touch with him almost whenever i want 😉

          Former dev - Please reply with @substring so that i am notified when you answer me
          Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

          1 Reply Last reply Reply Quote 0
          • Dragu
            Dragu Banned last edited by

            @Substring
            I have the impression that this object dont accept arguments for map other as 1,2.
            I am always somewhere astonished about in general software in Linux, as parameter files seems to be an acknowledged territory. I was about long time ago making with my team software for bigger companies, it was never software that had constant values inside that could at a certain moment change. By hardware or environnement. 🙂

            1 Reply Last reply Reply Quote 0
            • Dragu
              Dragu Banned last edited by Dragu

              @Substring
              Other thing on the schedule was the 3.2" waveshare tft screen, and this was a straight, because not necessary to use ED's driver, the waveshare32b.dtbo in /boot/overlays is working fine.

              ian57 1 Reply Last reply Reply Quote 0
              • Dragu
                Dragu Banned last edited by Dragu

                Something else that I found out about this tiny waveshare displays, there are too much parameters in the description 🙂
                If you just limit to the 3 not out commented, you have lcd screen + hdmi output all together, It seems to me that somebody was already asking this.

                #Waveshare 3.2 TFT Screen
                #same resolution for hdmi and tft
                #hdmi_force_hotplug=1
                #hdmi_group=2                
                #hdmi_mode=1                 
                #hdmi_mode=87                
                hdmi_cvt=320 240 60 1 0 0 0
                dtparam=spi=on              
                dtoverlay=waveshare32b:rotate=270,speed=82000000,fps=60
                
                1 Reply Last reply Reply Quote 1
                • ian57
                  ian57 Staff @Dragu last edited by

                  @dragu of course it is working fine, we put it here for this 😉

                  "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." Dennis Ritchie

                  1 Reply Last reply Reply Quote 0
                  • ian57
                    ian57 Staff @Dragu last edited by

                    @dragu I have a lot of work right now... so I cannot answer whenever I want, sorry.

                    For your problem, you need to pur the gpio config right in a conf file because the recalbox scripts do not take into account the gpio parameter from the recalbox.conf config file.

                    Add the module in /etc/module.conf file

                    snd_bcm2835
                    uinput
                    usbhid
                    mk_arcade_joystick_rpi
                    

                    and create /etc/modprobe.d/mk_arcade_joystick.conf file with your parameters :

                    blacklist ads7846 
                    #options mk_arcade_joystick_rpi map=1,2
                    # gpio with button order: Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl
                    options mk_arcade_joystick_rpi map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,20,-1
                    

                    It should work for now...
                    the next release of recalbox should handle the gpio parameter in recalbox.conf

                    "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." Dennis Ritchie

                    1 Reply Last reply Reply Quote 1
                    • Dragu
                      Dragu Banned last edited by

                      @ian57
                      Be assured that I appreciate your and all other work in this non-profit organization for rotten gamblers.
                      I will test in the next hour, the GBA becomes adult only when it sounds through the speaker, "Shake it baby" 😉

                      1 Reply Last reply Reply Quote 0
                      • Dragu
                        Dragu Banned last edited by Dragu

                        @ian57
                        I just tested, but he still dont want to load the driver. The file in /etc/modprobe.d was already existing before, but also he refused already than to load the driver by modprobe. That seems the biggest problem, but when I put him map=1 or map=1,2 in recalbox.conf, he load the driver without other order, but with the basic gpio as always.

                        modprobe mk_arcade_joystick_rpi

                        modprobe: can't load module mk_arcade_joystick_rpi (extra/mk_arcade_joystick_rpi.ko): Invalid argument

                        Substring 1 Reply Last reply Reply Quote 0
                        • Substring
                          Substring @Dragu last edited by

                          @dragu once again : the current recalbox-config.sh won't handle anything behind map=5 from the recalbox.conf. That's why ian suggested to manyally force the load ofnthe module. This also mean you must disable it in the recalbox.conf

                          Former dev - Please reply with @substring so that i am notified when you answer me
                          Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                          1 Reply Last reply Reply Quote 0
                          • Dragu
                            Dragu Banned last edited by Dragu

                            @Substring
                            I am not sure about this. I just changed in recalbox.conf all the relations to the gpio-controller as following

                            # ------------ D2 - GPIO Controllers ------------ #
                            ## GPIO Controllers
                            ## enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)
                            #controllers.gpio.enabled=1
                            ## mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)
                            #controllers.gpio.args=map=5
                            

                            but nothing changed, no driver loaded.
                            with in modules.conf

                            snd_bcm2835
                            uinput
                            usbhid
                            mk_arcade_joystick_rpi
                            

                            and the driver is here

                            sftp://root@Freeplay/lib/modules/4.4.13-v7/extra/mk_arcade_joystick_rpi.ko 14`972
                            
                            Substring 1 Reply Last reply Reply Quote 0
                            • Substring
                              Substring @Dragu last edited by

                              @dragu have you added the file that ian mentionned ?

                              Former dev - Please reply with @substring so that i am notified when you answer me
                              Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                              1 Reply Last reply Reply Quote 0
                              • ian57
                                ian57 Staff last edited by

                                @Dragu you should test with modprobe :

                                modprobe mk_arcade_joystick_rpi map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,20,-1
                                

                                and double check that you are really using the mk_arcade module from @Substring ... the master version with HK management included

                                "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." Dennis Ritchie

                                1 Reply Last reply Reply Quote 0
                                • Dragu
                                  Dragu Banned last edited by Dragu

                                  @ian57
                                  As I made over 20 years of software development as teamleader, you can imagine that I am able to follow 3 simple instructions. 🙂
                                  So, the driver file is exactly what @Substring linked for download, installed on the right place and with the right length (as you see in my sftp line from before)
                                  Modprobe is not functioning with this ko, with or without parameters, so result

                                  # modprobe mk_arcade_joystick_rpi map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,20,-1
                                  modprobe: can't load module mk_arcade_joystick_rpi (extra/mk_arcade_joystick_rpi.ko): Invalid argument
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • ian57
                                    ian57 Staff last edited by

                                    @Dragu I think it comes from the parameter. @Substring which release of module did you send to Dragu? Master with HK or only master?

                                    "UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." Dennis Ritchie

                                    Substring 1 Reply Last reply Reply Quote 0
                                    • Substring
                                      Substring @ian57 last edited by

                                      @ian57 HK patched with the patch we've tested 2 minths ago to make the hotkeybtn on par with master

                                      Former dev - Please reply with @substring so that i am notified when you answer me
                                      Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                                      1 Reply Last reply Reply Quote 0
                                      • Dragu
                                        Dragu Banned last edited by Dragu

                                        @ian57
                                        @Substring
                                        Concerning the Freeplay GPIO layout, there are 2 common pins with MAP 1. It is Up,4, and Down,17. So with this both existing pins for old and new mk_arcade_joystick_rpi.ok ( old -> length = 11864, new compiled ->length = 14972 MAP 1 is functioning and driver loaded.
                                        Could it be that the blocking of other maps is in the script recalbox-config.sh ?
                                        I mean second part with rmmod.

                                        if [ "$command" == "gpiocontrollers" ];then
                                            command="module"
                                            mode="load"
                                            extra1="mk_arcade_joystick_rpi"
                                            extra2="map=1,2"
                                        fi
                                        
                                        if [ "$command" == "module" ];then
                                            modulename="$extra1"
                                            map="$extra2"
                                            # remove in all cases
                                            rmmod /lib/modules/`uname -r`/extra/${modulename}.ko 2>&1 | recallog
                                        
                                            if [ "$mode" == "load" ];then
                                                echo "`logtime` : loading module $modulename args = $map" 2>&1 | recallog
                                                insmod /lib/modules/`uname -r`/extra/${modulename}.ko $map 2>&1 | recallog
                                            [ "$?" ] || exit 1
                                            fi
                                            exit 0
                                        fi
                                        
                                        Substring 1 Reply Last reply Reply Quote 0
                                        • Substring
                                          Substring @Dragu last edited by

                                          @dragu as i said : the script diesn't handle enough parameters yet. Check ~/logs/recalbox.log you'll get some details

                                          Former dev - Please reply with @substring so that i am notified when you answer me
                                          Ex dev - Merci de me répondre en utilisant @substring pour que je sois notifé

                                          1 Reply Last reply Reply Quote 0
                                          • Dragu
                                            Dragu Banned last edited by Dragu

                                            @Substring

                                            [       14.39] enabling mk_arcade_joystick_rpi
                                            [       14.36] updated wifi settings : ssid=
                                            [       14.42] ---- recalbox-config.sh ----
                                            [       14.46] rmmod: can't unload module 'mk_arcade_joystick_rpi': No such file or directory
                                            [       14.51] [       14.48] : loading module mk_arcade_joystick_rpi args = map=4
                                            

                                            As you see, I tried with 4, he loaded the driver, but other chaotic mapping. Minimum some advance.

                                            Substring 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Want to support us ?

                                            79
                                            Online

                                            99.6k
                                            Users

                                            28.1k
                                            Topics

                                            187.1k
                                            Posts

                                            Copyright © 2021 recalbox.com