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

    Pi in a Gameboy Advance Build - WIP

    Scheduled Pinned Locked Moved Projects and Themes
    gameboy advancegbabuildhandheldproject
    240 Posts 18 Posters 180.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

      I decided to try out the "use GPIO as a controller" thing today and I used test leads to make my "buttons"

      0_1478273378202_gpio-controller.jpg

      Then I connected them up to the GPIO using the pin numbers from the Adafruit PiGRRL 2 Default Controls. I may change this to tidy things up in the case, but this was just a test.

      0_1478273835173_gpio-controller-wiring.jpg

      I then installed the retrogame software and configured it by commenting out the buttons in the config file I wouldn't be using.

      When I rebooted the Pi to try to configure things my screen started acting wavy and I thought that there was an issue with conflicting pins, but it turned out that my very quick mockup had some screen wires touching each other and that was causing the disruption.

      Mapping the buttons was just like any other controller in EmulationStation and things seem to work fine.

      If you're finding the MAME ROW too easy, you can try this new controller out. ;)
      0_1478274092319_gpio-controller-wiring-working.jpg

      πŸ“· @obsidianspider

      mooseprM 1 Reply Last reply Reply Quote 2
      • mooseprM
        moosepr @obsidianspider
        last edited by

        @obsidianspider thats one less usb required ;)

        want to get a tft into your project, look no further than here https://retropie.org.uk/forum/topic/7464/ili9341-tft-screen-guide

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

          @moosepr said in Pi in a Gameboy Advance Build:

          @obsidianspider thats one less usb required ;)

          Haha, yeah, 13 wires to replace 4…

          At some point I still have to figure out the power situation to see if I have enough GPIO pins available.

          πŸ“· @obsidianspider

          cyperghostC mooseprM 2 Replies Last reply Reply Quote 0
          • cyperghostC
            cyperghost @obsidianspider
            last edited by cyperghost

            @obsidianspider Can you please provide a better resolution of your latest photo?

            As you don't use the Key buttons of your screen GPIOs are set free
            Can you recheck your wiring with this picture by adafruit please?

            or can you recheck if you have GPIO 18, 40 or 45 free? These pins can provide PWM sound! I think you don't need a USB hub :)

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

              @obsidianspider there are ways to reduce the number of pins your using http://raspberrypi.stackexchange.com/questions/14035/8x8-matrix-of-buttons but it does mean you will need different software to scan the rows and columns to figure out what is pressed

              want to get a tft into your project, look no further than here https://retropie.org.uk/forum/topic/7464/ili9341-tft-screen-guide

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

                @cyperghost Sorry for the delay, I was helping to run Bacon Fest all day today, and I'll be back tomorrow.

                0_1478388012104_CwhkRbNUoAEn4iv.jpg
                That's ~1/5 of the festival area. A few people showed up. ;)

                This is my current GPIO setup (I have been writing it on a diagram as I go through wiring it up on my Pi 2 test machine)
                0_1478388185020_gpio-2016-11-05.jpg

                I know you REALLY want me to use that I2S amp, but from what I can see, it's mono, and I want stereo sound to the headphone jack, so I don't know that it would work for me, plus I'm already running out of GPIO pins, and I still need some for my power switch once I figure that out. Even my Mausberry needed at least two when I did that on my Super Famicom.

                Semi-related: I got Pi-related mail today.

                0_1478388435548_box-envelope.jpg

                Can you guess what was in the box and what was in the padded envelope?

                0_1478388460797_amp-pi3.jpg

                If you guessed that the box was for the 24mm Adafruit amp and that the padded envelope was for the Pi 3, you'd be right. Haha. I will never understand shipping decisions. For what it's worth, they were ordered from the same company. The Pi 3 was a free giveaway by Arrow this past week. Now I have to make something cool with that too…

                πŸ“· @obsidianspider

                cyperghostC 1 Reply Last reply Reply Quote 3
                • obsidianspiderO
                  obsidianspider @moosepr
                  last edited by

                  @moosepr I'm not sure I need to go the multiplexing route, but if I run out of pins, I'll keep it in mind. I haven't really researched how to do that at all and my brain is fried from doing volunteer work for 12 hours, and I'm doing more tomorrow.

                  πŸ“· @obsidianspider

                  mooseprM 1 Reply Last reply Reply Quote 0
                  • mooseprM
                    moosepr @obsidianspider
                    last edited by

                    @obsidianspider fried! Bacon! I'm intrigued, was it a massive festival devoted to bacon?

                    want to get a tft into your project, look no further than here https://retropie.org.uk/forum/topic/7464/ili9341-tft-screen-guide

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

                      @moosepr Haha, I totally missed the "fried" and "bacon" reference. I guess it depends on how you define "massive." They're expecting ~75,000 people to attend this year's Bacon Fest

                      πŸ“· @obsidianspider

                      mooseprM 1 Reply Last reply Reply Quote 0
                      • mooseprM
                        moosepr @obsidianspider
                        last edited by

                        @obsidianspider awesome! The best we get here is beer festivals! I would love to go to a bacon festival!

                        want to get a tft into your project, look no further than here https://retropie.org.uk/forum/topic/7464/ili9341-tft-screen-guide

                        1 Reply Last reply Reply Quote 0
                        • cyperghostC
                          cyperghost @obsidianspider
                          last edited by

                          I know you REALLY want me to use that I2S amp, but from what I can see, it's mono, and I want stereo sound to the headphone jack, so I don't know that it would work for

                          No I want to save you from using a USB HUB ;)
                          I see 2 issues:

                          1. the single OTG USB provides 500mA output - if you use a HUB (passive) then every connector provides just 100mA
                          2. space in your housing ;)

                          I don't know if you want a real handheld console. If yes you need space for batteries, charging balancers and switches.

                          I never said "I2S is the best f*ck the rest" - as related to my build I recommended sound via HDMI or USB sound card. But in my build there was no additional space for an extra Hub. So I tried PWM sound that didn't satisfy me and then switched to I2S which was my last resort and I benefit from a devices that mixed left+right audio channel into mono speaker. I never demanded sound via headphones, so your solution seems best and you can argue with "real stereo".

                          Thank you very much for your diagramms. I also learn a lot of your builds and ideas. Have fun on your party.

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

                            @cyperghost I don't claim to know what I'm doing or how I'm going to get there, but my idea for sound was initially inspired by the NeoPiGamer. They didn't use a hub, but the lack of wifi is something I found really annoying when tweaking my Zero. Maybe once it's set up it won't be bad, but initially it was rough.

                            I'm not going to use the OTG connector for power, I'll be tapping right into the 5V power source that's feeding the Pi, so I won't be limited by the port. What the hub can handle outputting is another matter, but the one I picked up seems to work with wifi, a keyboard, a controller, and a USB sound card, simultaneously. I know I can do the controller via GPIO now, and I'm glad I tried it. I was intimidated by it before and now I see it wasn't bad at all.

                            Your I2S-ing has inspired me to look into building a Shairport Pi with an optical audio out. AirPlay to my home theater has been on my "to do" list for a while but I didn't want to buy an AirPort Express. A Pi solution will probably end up being more expensive, but I'll learn something and, knowing me, I'll find some way to incorporate a little scree into it.

                            I'm not sure how I'll do the hub yet either. I wish that one I bought initially wasn't a piece of junk as the board was a small square, not a spread out rectangle, but I think I might be able to fit it in the bottom of the case once I desolder the connectors.

                            πŸ“· @obsidianspider

                            cyperghostC 1 Reply Last reply Reply Quote 1
                            • cyperghostC
                              cyperghost @obsidianspider
                              last edited by cyperghost

                              @obsidianspider said in Pi in a Gameboy Advance Build:

                              ... lack of wifi is something I found really annoying when tweaking my Zero. Maybe once it's set up it won't be bad, but initially it was rough.

                              Yes the missing build in WIFI of the Zero hurts bad. But for my own I use the WIFI just with a external hub for loading ROMs on it or to tweak the system. So a generell network link isn't needed. Of course a permanent solution is better :)

                              handle outputting is another matter, but the one I picked up seems to work with wifi, a keyboard, a controller, and a USB sound card, simultaneously.

                              That should work :) I used the same setup for testing purposes but there was rare space in my Pie housing. max height of each componet ist just 9mm ... enough for a USB-A connector :)

                              Your I2S-ing has inspired me to look into building a Shairport Pi with an optical audio out.

                              I think it's not a matter what is really the best. That depends strong on personal view point. About the sound topic - I made the experience that most people (even those on adafruit) were really satisfied with the PWM sound ... in the adafruit forum only one guy wrote, that the static sound, generated by the Pie, get him on his nervs. He was satisfied with the ingame sound, too - but if there is silende (because you are in the ES main menu or gamelist menu) you always hear pops and hisses ... So he builds a "mute function" via GPIO :)

                              I used I2S instead. But even this isn't perfect you always hear a "POP" if the amp gets activated. But it's nothing compared to PWM soundoutput.

                              To come to end ... take the time to experiment with different solutions and then select the best fittings.

                              I'm not sure how I'll do the hub yet either. I wish that one I bought initially wasn't a piece of junk as the board was a small square, not a spread out rectangle, but I think I might be able to fit it in the bottom of the case once I desolder the connectors.

                              For gods sake, desolder the connectors they need space :)

                              It is a real pleasure to see the energy, the ideas and the creativity in the development in all these builds ... mockups ... projects ... whatever they named :)
                              It doesn't matter if these were created from @adamspc @obsidianspider @Tekkaman_Slade @UDb23 @Thak @Zigurana @thedudester80 @monstermadeofman @stahl80 @raygan and all I've forgot.... All did do a great job: There was an idea, there is fun - let's build a case for emulation with the Pie

                              Btw: English is not my native language so please ask if I expressed something unclear, okay?

                              obsidianspiderO 1 Reply Last reply Reply Quote 2
                              • obsidianspiderO
                                obsidianspider @cyperghost
                                last edited by

                                @cyperghost your English is just fine. I only speak one language, so I would never criticize someone for not being perfect at English when they also know other languages. (I'm sure that even my English isn't completely correct at times.) I understood your comments and you have helped me quite a bit. I will be volunteering all day again today, so no Pi progress, but that's ok.

                                πŸ“· @obsidianspider

                                mooseprM 1 Reply Last reply Reply Quote 0
                                • mooseprM
                                  moosepr @obsidianspider
                                  last edited by

                                  @obsidianspider there are a few different i2s boards that are designed for stereo output, there is a little bit of a craze for making audio players from pi's. The apparently give good sound quality, but I have never listened to one so i can't comment.

                                  The main problem is that they are not designed to be small, and are not really all that cheap either.

                                  Most are designed for the larger pi's like this
                                  http://www.iqaudio.co.uk/audio/8-pi-dac-0712411999650.html
                                  Which would actually work with the zero, just not fit inside your case! There are smaller ones designed for the zero
                                  https://shop.pimoroni.com/products/phat-dac
                                  But again, that will make space an issue

                                  There is also a plan c that I'm not sure if it will work. But looking at the tiny adafruit i2s doohickey, you can actually tweak the device to do just the left or just the right channels. Now I'm my limited understating of i2s is that it is quite one sided communication, so it may be possible to wire one in for each channel to get stereo sound.

                                  I have had a thought though, how many of the games that can run on a zero, have actual stereo audio?

                                  want to get a tft into your project, look no further than here https://retropie.org.uk/forum/topic/7464/ili9341-tft-screen-guide

                                  cyperghostC 1 Reply Last reply Reply Quote 0
                                  • cyperghostC
                                    cyperghost @moosepr
                                    last edited by cyperghost

                                    @moosepr said in Pi in a Gameboy Advance Build:

                                    There is also a plan c that I'm not sure if it will work. But looking at the tiny adafruit i2s doohickey, you can actually tweak the device to do just the left or just the right channels. Now I'm my limited understating of i2s is that it is quite one sided communication, so it may be possible to wire one in for each channel to get stereo sound.

                                    That's possible imho (I haven't tried) but the small adafruit amp is designed for seperate channel so using two of these should work. As I often said... These little boards may be a good choice for the Pi0. I think HDMI splitters are not cheap - also a good (and cheap) solution is use of a USB sound card (with the HUB thing).

                                    But it's a manifest .... If you are in need for GPIO wiring to get sound then rather use I2S than PWM.

                                    there are a few different i2s boards that are designed for stereo output, there is a little bit of a craze for making audio players from pi's. The apparently give good sound quality, but I have never listened to one so i can't comment.

                                    Yes that's the point why I2S may net be used so often. Hifiberry and Phatdac are knowen solution but they are big in size and well... the costs are high. Of course they are designed for stereo output - the I2S system is common in every CD player. I also think they need a lot of more wires to work. Some use the I2C bus to get volume control. And some use I2S just as converter and need a separate AMP. So the little adafruit is just cool :) and the prizing is more than acceptable :)

                                    I have had a thought though, how many of the games that can run on a zero, have actual stereo audio?

                                    Some Mame games and some SNES games. Moreover PSX is very common and well N64 and PSP (but +Pi0=automaticfail). I think in 85% it doesn't matter if it's mono or stereo. But what I can say is that the adafruit I2S amp gots a excellent and powerfull sound output!

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      diegzumillo
                                      last edited by

                                      Hey there
                                      Just to add some more comments to my quoted comment up there. There was a topic at adafruit's forum where they explained their powerboost 1000's limitations. If I remember their words it was something like "the pi 2 is already stretching what the powerboost is capable of but it's not meant for pi 3". Those were not the exact words but the idea is that it actually works on the pi 2, if you need more performance than the pi zero. "Stretching" to me means it works.

                                      cyperghostC jb32647J 2 Replies Last reply Reply Quote 1
                                      • cyperghostC
                                        cyperghost @diegzumillo
                                        last edited by

                                        @diegzumillo
                                        Sorry, I didn't get you :D

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

                                          The broken DS Lite I bought on eBay showed up today.
                                          0_1478725996848_broken-ds-lite.jpg

                                          Using two guides over at iFixit I had the DS Lite apart in minutes. If I was actually trying to put it back together again I could see it taking much longer.
                                          0_1478726092969_ds-lite-apart.jpg

                                          I'm mainly concerned with the ABXY button area and that part of the circuit board, but I've read that the DS Lite speakers sound pretty good, so hopefully these aren't blown. It also had the 1000mAh 3.7V battery inside, so I may mess around with that a bit during my initial testing of going on battery power.

                                          It looks like I'll be able to section out the ABXY area of the case and frankencase it into the GBA case
                                          0_1478726403667_ds-lite-buttons.jpg
                                          0_1478726195389_ds-lite-bottom-outside.jpg
                                          0_1478726204532_ds-lite-bottom-underside.jpg
                                          0_1478726252845_ds-lite-abxy-outside.jpg
                                          0_1478726260274_ds-lite-abxy-underside.jpg

                                          I took a piece of scrap paper and did a rubbing of the button holes from the DS Lite and placed it on the GBA case and it is like it was made for it.
                                          0_1478726276431_ds-lite-button-holes-on-gba.jpg

                                          Next I'm going to see if I can wire up the ABXY buttons from the DS Lite and the directional, L, R, Start, and Select buttons from the GBA. I found some pinouts on a few different websites.

                                          0_1478726461483_ds-lite-board-front.jpg
                                          0_1478726468363_ds-lite-board-back.jpg
                                          0_1478728954020_dslight pinout.jpg

                                          0_1478727007258_gba-board-front.jpg
                                          0_1478727043231_gba-board-back.jpg
                                          0_1478727059781_GBAtestpoints.jpg

                                          With how thin the DS casing is I'm thinking I will be able to put the DS Lite PCB on top of the GBA PCB and that extra depth should make up the difference in case thickness. At least that's the theory.

                                          Onward.

                                          πŸ“· @obsidianspider

                                          mooseprM 1 Reply Last reply Reply Quote 2
                                          • mooseprM
                                            moosepr @obsidianspider
                                            last edited by

                                            @obsidianspider looking good dude! I did think those nds buttons would be a good fit for the GBA

                                            want to get a tft into your project, look no further than here https://retropie.org.uk/forum/topic/7464/ili9341-tft-screen-guide

                                            obsidianspiderO 1 Reply Last reply Reply Quote 0
                                            • 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.