RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Pi in a Super Famicom Build

    Scheduled Pinned Locked Moved Projects and Themes
    super famicomsuper nintendobuildconsoleproject
    187 Posts 23 Posters 154.4k Views
    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.
    • obsidianspiderO
      obsidianspider
      last edited by obsidianspider

      In a case of "while I'm at it", when I got my TFT working again after the new 20170303 kernel update was released I decided to do something about the images being displayed on the TFT.

      When I was first getting things going I just resized the image to 320x240 and displayed it. It worked, but if the image wasn't the correct aspect ratio, the script didn't care and it resulted in a distorted image. Today I managed to correct that. My new (still admittedly hacky) script will now resize images proportionally so they fit inside the window without stretching.

      0_1488836141773_resize-proportional.jpg

      I think it's a "more right" way to address the issue, and is a whole lot more convenient than making custom images for every single game so it doesn't look stretched.

      📷 @obsidianspider

      1 Reply Last reply Reply Quote 4
      • obsidianspiderO
        obsidianspider
        last edited by

        Today I added a 256GB USB drive to the Super Famicom Pi and it was pretty easy. The drive was a bit too long, but I learned from putting one in my Genesis hub Pi that by taking the case off it should fit with no problems. The blue LED is really bright, so I covered it with a piece of tape, because without it there was blue light bleeding out of all of the vent holes like a spaceship read to take off.

        0_1489374053936_sfc-pi-with-256gb-usb.jpg

        📷 @obsidianspider

        B 1 Reply Last reply Reply Quote 2
        • B
          backstander @obsidianspider
          last edited by

          @obsidianspider
          Monoprice is the place to get cables lol
          I'm sure some people would like the blue-light-bleeding-out-of-all-of-the-vent-holes-like-a-spaceship-ready-to-take-off disease!

          obsidianspiderO 1 Reply Last reply Reply Quote 0
          • obsidianspiderO
            obsidianspider @backstander
            last edited by

            @backstander Monoprice was the only vendor I could find with a short HDMI cable that also had small connectors. Everyone else had really thick rubber on the plug and the cable insulation was huge.

            📷 @obsidianspider

            1 Reply Last reply Reply Quote 1
            • obsidianspiderO
              obsidianspider
              last edited by obsidianspider

              Today I decided to work on moving my scripts to my USB drive for stability, and to clean things up since I was initially just cobbling things together to get them to work. One challenge I faced was that the USB drive isn't immediately mounted when the system boots. It takes a few seconds. To get around that I put the tftstart.sh script in the /home/pi/ folder and added a bit to tell it to wait until the USB folder is available before trying to execute the scripts that are located on it.

              #!/bin/bash
              # Wait for USB disk detection
              # Disk drive mount we're waiting on
              usbdrive="/media/usb0/retropie-mount"
              # Max time to wait (in seconds)
              maxwait=60
              for (( i = 0; i <= $maxwait; i++ ))
              do
                [ -d $usbdrive ] && break
                sleep 1
              done
              
              #load image
              sudo python /home/pi/RetroPie/tft/imageparam.py "/home/pi/RetroPie/tft/images/RetroPie Splashscreen Blue.jpg"
              
              #turn on backlight and enable Reset button toggle
              sudo python /home/pi/RetroPie/tft/switch.py
              

              I also updated my runcommand-onstart.sh script to reference images located in the ROMs folder (I'm moving images to the ROMs folder) and to also handle file names with square braces[ ], which were breaking the script.

              # /opt/retropie/configs/all/runcommand-onstart.sh
              
              # get the full path filename of the ROM
              rom=$3
              
              # get the system name
              system=$1
              
              # get rom filename without folder
              rom_bn=$(basename "$rom")
              
              #get rom filename without extension
              rom_bn="${rom_bn%.*}"
              
              # escape square brackets in rom filename
              rom_bn="${rom_bn//\[/\\[}"
              rom_bn="${rom_bn//\]/\\]}"
              
              # Set a TFT-specific image if there is one
              img="$(find "/home/pi/RetroPie/tft/images/roms/${system}" -type f -name "${rom_bn}-image.*" -print -quit)"
              
              # If a TFT-specific image was not found, look in the images folder in the ROMs directory for that system
              if [[ -z "${img}" ]];
              then
                 img="$(find "/home/pi/RetroPie/roms/${system}/images" -type f -name "${rom_bn}-image.*" -print -quit)"
              fi
              
              # If an image was not found in the ROMs directory for that system, check to see if there are any in the default emulationstation location
              if [[ -z "${img}" ]];
              then
                 img="$(find "/opt/retropie/configs/all/emulationstation/downloaded_images/${system}" -type f -name "${rom_bn}-image.*" -print -quit)"
              fi	
              
              # If no game images are found, display one for the system being emulated
              if [[ -z "${img}" ]];
              then
                 img="$(find "/home/pi/RetroPie/tft/images/systems" -type f -name "${system}.*" -print -quit)"
              fi
              
              # If no system image is found, default back to the Raspberry Pi logo
              if [[ -z "${img}" ]];
              then
                 img="/home/pi/RetroPie/tft/images/Raspberry_Pi_Logo.svg.png"
              fi
              
              # run the python script to display the image
              sudo python /home/pi/RetroPie/tft/imageparam2.py "$img"
              

              I'm sure there is a lot that could still be improved or optimized, but things are working well.

              📷 @obsidianspider

              1 Reply Last reply Reply Quote 3
              • CybermenC
                Cybermen
                last edited by

                @obsidianspider Very good work. I am also rebuilding and have a question. How did you connect the original reset button? On the bottom are 4 connection possibilities?

                obsidianspiderO 1 Reply Last reply Reply Quote 0
                • obsidianspiderO
                  obsidianspider @Cybermen
                  last edited by

                  @cybermen the reset button is discussed in this post earlier in this same thread. That said, there are multiple motherboard variants, so use your meter to test.

                  📷 @obsidianspider

                  1 Reply Last reply Reply Quote 0
                  • CybermenC
                    Cybermen
                    last edited by

                    Super, Thank You.

                    1 Reply Last reply Reply Quote 0
                    • obsidianspiderO
                      obsidianspider
                      last edited by

                      Update

                      I learned the hard way not to use rpi-update

                      It apparently updated you to the bleeding edge firmware, and not only did the update fail halfway through, but once it completed successfully, Linux kept crashing. Now to see if I can fix this mess. Fun?

                      📷 @obsidianspider

                      1 Reply Last reply Reply Quote 0
                      • obsidianspiderO
                        obsidianspider
                        last edited by

                        Well that was less than fun. Lesson learned, kids. If you have a heavily customized install, make sure you create an image of your SD card in case you blow it up like I did.

                        Also, take better notes. ;)

                        Things are working now, but it was a lot of head scratching to get all of my scripts in the right places.

                        📷 @obsidianspider

                        DarksaviorD 1 Reply Last reply Reply Quote 0
                        • DarksaviorD
                          Darksavior @obsidianspider
                          last edited by

                          @obsidianspider I updated to the latest stretch build and that didn't go well. The gamecon driver wouldn't build. I reverted to stable stretch and fixed some dependencies to get ES to compile. I made a backup just in case, but it looks like I won't need to use it.

                          obsidianspiderO 1 Reply Last reply Reply Quote 0
                          • obsidianspiderO
                            obsidianspider @Darksavior
                            last edited by

                            @darksavior I haven't tried Stretch. I heard it wasn't supported yet.

                            📷 @obsidianspider

                            DarksaviorD 1 Reply Last reply Reply Quote 0
                            • DarksaviorD
                              Darksavior @obsidianspider
                              last edited by

                              @obsidianspider Try at your own risk, but once I sorted my dependencies, ES and the emulators I use work fine https://retropie.org.uk/forum/topic/16145/retropie-upgrading-raspbian-jessie-to-stretch

                              1 Reply Last reply Reply Quote 0
                              • BillyHB
                                BillyH
                                last edited by

                                @obsidianspider it's probably in the thread here somewhere but I can't seem to find it: have you linked the original power switch to a system shutdown, and if so, how?

                                Now that I have a Pi, I'm thinking about either murdering my old SNES or finding one to murder, and using it as a case for the Pi. If/When I do so, I may look closer to threads like these for inspiration.

                                • First Pi: Pi 3 in a PSone case
                                • Second Pi: Pi 0 in a Retroflag GPi Case
                                • Third Pi: Pi 4 as a desktop computer
                                • Some time in 2020: Picade
                                obsidianspiderO 1 Reply Last reply Reply Quote 0
                                • obsidianspiderO
                                  obsidianspider @BillyH
                                  last edited by

                                  @billyh Please don't break a known working SNES just for a Pi project. There are millions of ones that are inoperable.

                                  I used a Mausberry tied to the stock SNES power switch.

                                  📷 @obsidianspider

                                  1 Reply Last reply Reply Quote 0
                                  • obsidianspiderO obsidianspider referenced this topic on
                                  • First post
                                    Last post

                                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.