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

      @dragu have you read https://github.com/juj/fbcp-ili9341/blob/master/README.md#installation ? No dtoverlay should be specified, the driver handles everything

      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
        Yes. More than 10x 😄
        But we have not fbcp-ili9341, and my head too much small to build this.
        There is also this page that described the display area with new adapted viewport :
        https://github.com/juj/fbcp-ili9341/blob/master/freeplaytech_waveshare32b.h

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

          @dragu I haven't checked in-depths how it works, but you might simply build it in raspbian and copy it over to recalbox

          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
            Now, problem, what version of Raspian should I need to stay compatible with Recalbox ? I have spare SD's and can always shoot one for my bartop if it will work. Otherway my spare PI's are used up.

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

              @dragu the most "secure" version would be one with kernel 4.4

              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
                My bartop dont stops with crying, but I arrive to install, and activate ssh (what is not activated by default after nov16, beep) Also no cmake inside, but installed also now. And this cmake give me an error,

                pi@Raspian:~/fbcp-ili9341/build $ cmake -DFREEPLAYTECH_WAVESHARE32B=ON
                CMake Error: The source directory "/home/pi/fbcp-ili9341/build" does not appear to contain CMakeLists.txt.
                
                

                Sure and after juj description you make mkdir build and after cd build (empty) so he cannot find this file there but a level lower, somebody make a mistake or cmake changed...
                Finally I arrive, but errors

                pi@Raspian:~/fbcp-ili9341/build $ cmake -DFREEPLAYTECH_WAVESHARE32B=ON /home/pi/fbcp-ili9341
                -- Doing a Release build
                -- Board revision: a02082
                -- Detected this Pi to be one of: Pi 2B rev. 1.2, 3B, 3B+, CM3 or CM3 lite, with 4 hardware cores and ARMv8-A instruction set                  CPU.
                -- Enabling optimization flags that target ARMv8-A instruction set (Pi 2B >= rev. 1.2, 3B, 3B+, CM3 or CM3 lite)
                -- Scaling source image to view. If the HDMI resolution does not match the SPI display resolution, this will produce blurrines                 s. Match the HDMI display resolution with the SPI resolution in /boot/config.txt to get crisp pixel perfect rendering, or alte                 rnatively pass -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=ON to crop instead of scale if you want to view the center of the screen p                 ixel perfect when HDMI and SPI resolutions do not match.
                -- Preserving aspect ratio when scaling source image to the SPI display, introducing letterboxing/pillarboxing if HDMI and SPI                  aspect ratios are different (Pass -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON to stretch HDMI to cover full screen if you do                  not care about aspect ratio)
                CMake Error at CMakeLists.txt:127 (message):
                  Please define -DSPI_BUS_CLOCK_DIVISOR=<some even number> on the CMake
                  command line! (see files ili9341.h/waveshare35b.h for details) This
                  parameter along with core_freq=xxx in /boot/config.txt defines the SPI
                  display speed.  Smaller divisor number=faster speed, higher number=slower.
                
                
                -- Configuring incomplete, errors occurred!
                See also "/home/pi/fbcp-ili9341/build/CMakeFiles/CMakeOutput.log".
                

                also not normal.

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

                  @Substring
                  Ok, I understand, he wanted one more parameter, not easy to read between lines. So he build something, must just find it

                  pi@Raspian:~/fbcp-ili9341/build $ cmake -DFREEPLAYTECH_WAVESHARE32B=ON -DSPI_BUS_CLOCK_DIVISOR=8 /home/pi/fbcp-ili9341
                  -- Doing a Release build
                  -- Board revision: a02082
                  -- Detected this Pi to be one of: Pi 2B rev. 1.2, 3B, 3B+, CM3 or CM3 lite, with 4 hardware cores and ARMv8-A instruction set CPU.
                  -- Enabling optimization flags that target ARMv8-A instruction set (Pi 2B >= rev. 1.2, 3B, 3B+, CM3 or CM3 lite)
                  -- Scaling source image to view. If the HDMI resolution does not match the SPI display resolution, this will produce blurriness. Match the HDMI display resolution with the SPI resolution in /boot/config.txt to get crisp pixel perfect rendering, or alternatively pass -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=ON to crop instead of scale if you want to view the center of the screen pixel perfect when HDMI and SPI resolutions do not match.
                  -- Preserving aspect ratio when scaling source image to the SPI display, introducing letterboxing/pillarboxing if HDMI and SPI aspect ratios are different (Pass -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON to stretch HDMI to cover full screen if you do not care about aspect ratio)
                  -- SPI_BUS_CLOCK_DIVISOR set to 8. Try setting this to a higher value (must be an even number) if this causes problems. Display update speed = core_freq/divisor. (on Pi3B, by default core_freq=400)
                  -- USE_DMA_TRANSFERS enabled, this improves performance. Try running CMake with -DUSE_DMA_TRANSFERS=OFF it this causes problems, or try adjusting the DMA channels to use with -DDMA_TX_CHANNEL=<num> -DDMA_RX_CHANNEL=<num>.
                  -- Targeting WaveShare 3.2 inch (B) display with ILI9341
                  -- Configuring done
                  -- Generating done
                  -- Build files have been written to: /home/pi/fbcp-ili9341/build
                  

                  make -j seems to work, incredibly

                  pi@Raspian:~/fbcp-ili9341/build $ make -j
                  Scanning dependencies of target fbcp-ili9341
                  [  5%] Building CXX object CMakeFiles/fbcp-ili9341.dir/fbcp-ili9341.cpp.o
                  [ 16%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mem_alloc.cpp.o
                  [ 22%] Building CXX object CMakeFiles/fbcp-ili9341.dir/display.cpp.o
                  [ 16%] Building CXX object CMakeFiles/fbcp-ili9341.dir/diff.cpp.o
                  [ 27%] Building CXX object CMakeFiles/fbcp-ili9341.dir/dma.cpp.o
                  [ 33%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ssd1351.cpp.o
                  [ 38%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mailbox.cpp.o
                  [ 44%] Building CXX object CMakeFiles/fbcp-ili9341.dir/spi.cpp.o
                  [ 50%] Building CXX object CMakeFiles/fbcp-ili9341.dir/st7735r.cpp.o
                  [ 55%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9486.cpp.o
                  [ 61%] Building CXX object CMakeFiles/fbcp-ili9341.dir/gpu.cpp.o
                  [ 66%] Building CXX object CMakeFiles/fbcp-ili9341.dir/keyboard.cpp.o
                  [ 72%] Building CXX object CMakeFiles/fbcp-ili9341.dir/text.cpp.o
                  [ 83%] Building CXX object CMakeFiles/fbcp-ili9341.dir/hx8357d.cpp.o
                  [ 83%] Building CXX object CMakeFiles/fbcp-ili9341.dir/statistics.cpp.o
                  [ 88%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mz61581.cpp.o
                  [ 94%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9341.cpp.o
                  [100%] Linking CXX executable fbcp-ili9341
                  [100%] Built target fbcp-ili9341
                  
                  1 Reply Last reply Reply Quote 0
                  • Dragu
                    Dragu Banned last edited by

                    @Substring
                    Ok, I have an executable, now somebody must tell me where is equivalent to rc.local in Recalbox ?

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

                      @dragu no such files. Startup scripts are in /etc/init.d. create a S02iliblabla, get the basic structure of an init file, and launch it at start.

                      But first, you'd better try by launching it manually through ssh and make sure it works. If ypu just write an init script, you'll never get any ettor message

                      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
                        Petite question, pour recompiler, vaut-il mieux d'effacer le contenu du build précédent ?

                        Bonne idée de le lancer en ssh. Bon, il affiche rien pour le moment, mais me sort tout un tas de messages sophistiqués

                        # ./fbcp-ili9341
                        bcm_host_get_peripheral_address: 0x3f000000, bcm_host_get_peripheral_size: 16777216, bcm_host_get_sdram_address: 0x40000000
                        BCM core speed: current: 400000000hz, max turbo: 400000000hz. SPI CDIV: 8, SPI max frequency: 50000000hz
                        Allocated DMA channel 5
                        Allocated DMA channel 1
                        Enabling DMA channels Tx:5 and Rx:1
                        DMA hardware register file is at ptr: 0x75b65000, using DMA TX channel: 5 and DMA RX channel: 1
                        DMA hardware TX channel register file is at ptr: 0x75b65500, DMA RX channel register file is at ptr: 0x75b65100
                        DMA RX channel 1 was assigned another peripheral map 17!
                        DMA channel 0 has peripheral map 0 (is lite channel: 0, currently active: 0, current control block: (nil))
                        DMA channel 1 has peripheral map 17 (is lite channel: 0, currently active: 1, current control block: (nil))
                        DMA channel 2 has peripheral map 0 (is lite channel: 0, currently active: 0, current control block: (nil))
                        DMA channel 3 has peripheral map 5 (is lite channel: 0, currently active: 1, current control block: 0xfe538d80)
                        DMA channel 4 has peripheral map 0 (is lite channel: 0, currently active: 0, current control block: (nil))
                        DMA channel 5 has peripheral map 0 (is lite channel: 0, currently active: 0, current control block: (nil))
                        DMA channel 6 has peripheral map 13 (is lite channel: 0, currently active: 1, current control block: (nil))
                        DMA channel 7 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 8 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 9 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 10 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 11 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 12 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 13 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA channel 14 has peripheral map 0 (is lite channel: 1, currently active: 0, current control block: (nil))
                        DMA RX channel was assigned another peripheral map!
                        
                        1 Reply Last reply Reply Quote 0
                        • Dragu
                          Dragu Banned last edited by

                          Ok, I also found this cmake option
                          "-DDMA_RX_CHANNEL=<num>: Specifies the DMA channel number to use for SPI receive commands. Change this if you find a DMA channel conflict."
                          What would you propose, Master ?

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

                            Yes, we can. I used DMA channel 4 for RX, and the result

                            I will try to stretch a little the sides if possible, but already very nice

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

                              @dragu To recompile, the best is to make clean

                              Regarding the values, the best is probably to ask Flavor

                              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 was more brutal using rm -r 😉
                                But @Flavor dont use fbcp-ili9341, there is even no word about in the forum. Anyway, I am near the end with this one also. Pretty well working all this with standard Recalbox and just small addons. When I am finished with scaling here, there is just staying one point to close the thread.

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

                                  Vive la France, so I hope everybody recuperate for tomorrow.... 😉
                                  Ok, concerning fbcp-ili9341, I am finished and adjust now the TFT screen to the viewport matching the physical window in the GBA shell. After 2 dozens of recompilations, and I have a version for all other people that will buy this kit. As you can see in the fotos, this fit. That they are round is fault of the lens. 🙂

                                  So this story also over.

                                  Now only thing what stays is the software for the brightness controller of the display background.

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

                                    @Substring
                                    @ian57
                                    But with the automatic starting I will need some help.
                                    I tried first to put it in custom.sh to not meddle in the Recalbox system, my driver in
                                    /recalbox/share/system/fbcp-ili9341/fbcp-ili9341
                                    custom.sh :

                                    #!/bin/bash
                                    
                                    start() {
                                    
                                    /recalbox/share/system/fbcp-ili9341/fbcp-ili9341 &
                                    }
                                    
                                    stop() {
                                    
                                    }
                                    
                                    case "$1" in
                                      start)
                                            start
                                            ;;
                                      stop)
                                            stop
                                            ;;
                                    esac
                                    

                                    after no effect, I added fbcp-ili4391 to /usr/bin/fbcp-ili9341 and replaced start line with ./fbcp-ili9341 &
                                    again no result
                                    After this I created S02fbcp-ili9341 inside /etc/init.d

                                    #!/bin/bash
                                    
                                    /recalbox/share/system/fbcp-ili9341/fbcp-ili9341 &
                                    esac
                                    exit $?
                                    

                                    and also with ./fbcp-ili9341 &
                                    Both fbcp-ili9341 have the flag 755

                                    Not working. What is my error ?

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

                                      @dragu Make sur your binary is in /usr/bin + also make sure it has executable rights. Then simply create a /etc/init.d/S02ili9341
                                      which should hold:

                                      #!/bin/bash
                                      
                                      #!/bin/bash
                                      
                                      start() {
                                      
                                      /usr/bin/fbcp-ili9341 &
                                      }
                                      
                                      stop() {
                                      
                                      }
                                      
                                      case "$1" in
                                        start)
                                              start
                                              ;;
                                        stop)
                                              stop
                                              ;;
                                      esac
                                      

                                      You should use an absolute path to the file. Easy way to test it : in SSH, just run /etc/init.d/S02ili9341 start and tell us about the output

                                      The next good idea would be to daemonize the fbcp thing, but that's absolutely not mandatory

                                      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 S02fbcp-ili9341 seems to be e bit early to try to start fbcp... you should try S13 after S12populateshare

                                        "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
                                          The script give me an error with ...... start

                                          /etc/init.d/S02fbcp-ili9341: line 10: syntax error near unexpected token `}'
                                          

                                          line 10 is just the closing accolade for stop (because no content ?)

                                          }
                                          
                                          stop() {
                                          
                                          }
                                          
                                          Substring 1 Reply Last reply Reply Quote 0
                                          • Substring
                                            Substring @Dragu last edited by

                                            @dragu ah yeah indeed. Just add a echo -n ""

                                            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
                                            • First post
                                              Last post

                                            Want to support us ?

                                            122
                                            Online

                                            96.9k
                                            Users

                                            27.8k
                                            Topics

                                            186.5k
                                            Posts

                                            Copyright © 2021 recalbox.com