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
    20658
    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.
    • 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
                  • Substring
                    Substring @Dragu last edited by

                    @dragu it's not taking further parameters, we had that problem with ian already. But still, manually loading it should work

                    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 think I will take a big hammer, or stay with retropie. The whole story is crazy.
                      Just to repeat :

                      1. Calling mk_arcade_joystick_rpi map=1 (1,2) from recalbox.conf loads the driver (with in this case wrong gpio's)
                      2. Not calling mk_arcade_joystick_rpi in recalbox.conf but trying to load it under modprobe mk_arcade_joystick_rpi (all map=x) load the driver under NO condition, always argument error, also with map=1 or map=1,2.
                      3. This driver dont load under modprobe in Recalbox. Point.
                      4. Modifying recalbox-config.sh brings nothing, so somewhere in this piece of software is mess.
                      1 Reply Last reply Reply Quote 0
                      • Dragu
                        Dragu Banned last edited by Dragu

                        @Substring
                        @ian57
                        YEAH ! I have it.
                        I was just modifying S26recalboxsystem and recalboxsystem.sh to make the animal accept map=5. But first with no result.
                        So, I started modprobe with option -D and that was the beginning of the solution

                        # modprobe -D mk_arcade_joystick_rpi
                        insmod /lib/modules/4.4.13-v7/extra/mk_arcade_joystick_rpi.ko map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,23,-1
                        

                        Because this showed that he correctly found the definitions in modprobe.d.
                        After I remember the argument story. Perhaps something wrong here, and that was really the problem, it was necessary to crop last parameter from

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

                        to

                        options mk_arcade_joystick_rpi map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,23
                        

                        he just accept 13 gpio definitions, not 14
                        and now, problem resolved, all keys working on Freeplay GBA 🙂
                        As you see with 23, I put Hotkey on R1, right shoulder button. Because he is otherway unused in Recalbox. And it works also.
                        Time to move to next story 🙂

                        I also arrived to load the driver in recalbox.conf.
                        But first I modified back, recalbox-config.sh and S26recalboxsystem, not necessary anymore. I am sure other people will need at a certain moment this :

                        
                        # ------------ 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 gpio=4,17,6,5,19,26,16,24,23,18,15,14,23"
                        
                        
                        1 Reply Last reply Reply Quote 1
                        • Dragu
                          Dragu Banned last edited by Dragu

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • ian57
                            ian57 Staff last edited by

                            @Dragu sorry my bad... I did not count the parameters;.. thought you were using the old master config style (only 12 parameters), the 13st one was -1 for not configuring the HK.

                            are you sure that controllers.gpio.args="map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,23"is working, because I made these tests without success, I had to add variable in S26recalboxsystem to deal with map parameters.

                            "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
                              Not your bad, but some pieces of software too much simple in error handling. So it should work with parameters as it is feeded up, or giving a clear error feedback.
                              Now, I think that I also modified everything backward, but I have no ideas about cache's in the package. I will make in the afternoon a fresh install and tell back 🙂

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

                                @Substring
                                @ian57
                                I am back and tested with a fresh install on release 180330 that I use everywhere, not to introduce other error.

                                And I can confirm you, all engines running. The custom parameter in recalbox.conf is accepted and processed, as you see also in recalbox.log, without any modification on the kernel part and also without file mk_arcade_joystick.conf in /etc/modprobe.d ! The winner take's it all.

                                     15.50] updated wifi settings : ssid=
                                [       15.54] setting keyboard layout to de
                                [       15.57] [       15.53] : loading module mk_arcade_joystick_rpi args = map=5 gpio=4,17,6,5,19,26,16,24,23,18,15,14,23
                                [       15.57] updated wifi settings : ssid=Lounge 2,4G AM
                                

                                So you can put this ko in the next release.
                                Next digging from my part will be on ili934x driver, I think that Subs also was meaning this one for 60fps.

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

                                  @Dragu tha'ts a good news.

                                  "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

                                    @Substring
                                    @ian57
                                    As you can see, the AlekFULL theme comes pretty well under this small screen. I will at a certain moment make some improvement on the fonts (text that is hidden for the moment.)

                                    alt text

                                    Why you dont see it? Because the GBA has a cutout frame off 3" and display has 3.2". Original GBA display had 2.8".

                                    Main problem from waveshare32b.dtbo driver is low speed but also no possibility to shift the viewing area or compress.
                                    Therefore, next step is ili9341 that has all this features and is also already in the Recalbox package.

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

                                      @dragu i remember @Flavor was colplaining about kodi ...

                                      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
                                        But Kodi I am able to load. Now in general I dont use it, so maybe something.
                                        But I have another question for you. The line in config.txt

                                        dtparam=spi=on
                                        

                                        does this line load's spi-bcm2835.ko ? Or something else, its in relation with the fb-ili9341 driver.

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

                                          @dragu no the libe triggers some hardware functionnality, which can in turn make the kernel load the required ko in a.plug-n-play style

                                          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
                                            With the ili9341 driver I may have reached my limits, but I also cannot find the executable con2fbmap in the recalbox bin.

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

                                            Want to support us ?

                                            120
                                            Online

                                            96.9k
                                            Users

                                            27.8k
                                            Topics

                                            186.5k
                                            Posts

                                            Copyright © 2021 recalbox.com