Pi in a Gameboy Advance Build - WIP
-
@obsidianspider
I know we've got the MAME ROW and all but it might be more appropriate to be playing Splatter House when they arrive: -
@backstander said in Pi in a Gameboy Advance Build:
So you get Trick or Treators early in your neighborhood?
Yeah they do it the Friday before Halloween from 6-8
-
@moosepr said in Pi in a Gameboy Advance Build:
@obsidianspider ooooooooh good going man! I think the advance has the best layout.
Are you going the composite reversing cam screen route, or are you going to get another ili9341?
Unless you know a secret I don't, the frame rate for the ILI9341 was pretty crummy when I actually got it to work. I thought it was because the Pi was putting video to two screens, but it seems like ~12fps is common over SPI.
I'm assuming you going to chop up the nes controller to do you buttons?
I'd love to use the logic from the ibuffalo and the buttons, but in looking at things next to each other the SNES buttons are bigger. I have to take apart the GBA and measure things for buttons as well as the screen.
-
@obsidianspider I have an ili9341 in my mini pi project. The refresh rate isn't amazing, you can see some tearing on fast and full screen updates, but it is plenty playable! I would use it every time.
I was tempted to chop the buttons out of an old DS, and use them in an advance shell, but I'm not keen on the paint and filter to crack and fall out
-
@moosepr said in Pi in a Gameboy Advance Build:
@obsidianspider I have an ili9341 in my mini pi project. The refresh rate isn't amazing, you can see some tearing on fast and full screen updates, but it is plenty playable! I would use it every time.
Did you install a custom driver or just use the notro/fbtft that's built into Raspbian? Mine was pitiful and looking online it seemed that was common, but I admit I have no idea what I'm doing.
-
@obsidianspider I'm just using the built in one, seems OK to me, I might see if I can get a video uploaded so you can see
-
@moosepr another concern is the physical size of the PCB. The ili9341 boards I saw stuck out pretty far on either side.
-
If I can fit it in an Altoids tin you can make it work in a GBA. I can't wait to see what you come up with. Good luck dude I believe in you =]
-
@obsidianspider yeah that was where I got stuck! I did some digging and it looked to me that the PCB did very little other than making the ribbon cable more breadboard friendly, and adding the SD card. I did make a custom PCB that the screen could be transplanted on to, but life has gotten in the way and it's sat in a box untested
-
@moosepr I think I'm going to try the 3.2" Sainsmart display that Tekkaman_Slade used on their NeoPiGamer. The 3.2" will just fit if I trim off the extra buttons, and I don't see any way a 3.5" backup camera screen will fit. The 2.8" screens are slightly smaller than the opening in the GBA screen cover, and I think that might look a little janky.
Now I need to find a small USB hubβ¦
-
I ordered the Sainsmart 3.2" screen as well as a 4-port "octopus" (quadropus?) hub that I saw on the sudomod wiki
Assuming the hub works like I want it to (keyboard, wifi, controller, usb drive), I'll take it apart and just keep the board and then wire it up to whatever ports or boards I need.
-
Since I don't have a USB hub, and I only just ordered the one for this project this morning, today I decided use my Pi 2 as a test platform to see if the old USB sound card that I had sitting in a drawer from a long discarded headset would work for this project.
The overall adapter was a bit long for the project, but I can desolder the USB connector and the 3.5mm jacks and it'll be plenty small.
Using the instructions I found over at sudomod I was able to get the sound card working in minutes. With headphones plugged in it was LOUD (I'm not sure how to set a hotkey to do the
Select+ Up
Select+Down
to adjust volume like I've heard some people refer to so I went though the RetroPie menu and adjusted it there for now) so hopefully it'll do well to power the GBA speaker. -
@obsidianspider
This is what I did with my Xbox 360 controller which will adjust the volume with RetroArch emulators:
sudo nano /opt/retropie/configs/all/retroarch.cfg
# Volume controls: mute, volume up and down input_audio_mute_axis = +1 #Down on D pad/Left Stick input_volume_up_axis = -3 #Up on Right Stick input_volume_down_axis = +3 #Down on Right Stick
-
@backstander said in Pi in a Gameboy Advance Build:
Thanks! Do you have to hitSelect
to activate that, or is it just any time you hit up on the analog stick it adjusts the audio? -
@obsidianspider oh yeah I forgot to put the hotkey button. Yes you would need to hold the
Select
button to activate it.Config it like this:
# Hotkey button input_enable_hotkey_btn = 8 #Select
-
@backstander That makes sense.
Now I need to get back to Strato Fighter!
-
I never realized how often I try to use a network connection to do things with my Pi until I had a Pi with no network connection. That's it, the handheld is getting Wifi.
Hackaday has a really good writeup of adding an Edimax wifi adapter to a Zero. This will be done once I have my hub and am sure that it works before cutting it apart.
-
After getting frustrated with my multimeter trying to figure out the wiring for the potentiometer (volume knob) I found a diagram over at Assembler Games and it looks like the pot is controlling the "volume" pin of the amp chip. I'm not sure I want to go through the trouble of trying to keep the GBA amp functional, especially when a stereo potentiometer is around $1. If someone figured that out, I'm all ears, but I think it may be more trouble than it's worth.
-
My SainSmart 3.2" TFT showed up today and getting it to work wasn't as straightforward as I initially read, but it was totally doable and the speed seems very good when connected to my test mule Raspberry Pi 2 with a fresh image of RetroPie updated to 4.0.6.
(I still have the protective film in place)OK, so here's how I got the screen working on a freshly installed image of RetroPie 4.0.6 on a Raspberry Pi 2. Steps are a combination of a few posts here and on GitHub
First I added the following to the bottom of the
/boot/config.txt
#Waveshare 3.2 TFT Screen #same resolution for hdmi and tft hdmi_force_hotplug=1 hdmi_cvt=320 240 60 1 0 0 0 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 dtparam=spi=on dtoverlay=waveshare32b:rotate=270,speed=82000000,fps=60
Then I rebooted and wondered why nothing had happened. It turned out I needed to install the device tree overlay (that's what
dtoverlay
means, you learn something every day). Since RetroPie isgit clone https://github.com/swkim01/waveshare-dtoverlays.git sudo cp waveshare-dtoverlays/waveshare32b-overlay.dtb /boot/overlays/waveshare32b.dtbo
I rebooted and my screen was still black. What the heck? It turns out that by default Linux is blanking the second screen when displaying on the primary framebuffer (the HDMI port). To confirm that your screen is being recognized as
fb1
you can run the following commandls /dev/fb*
and you should see
/dev/fb0 /dev/fb1
fb0
is the HDMI display andfb1
is the TFTTo get the data from fb0 to display on fb1 there's a framebuffer copy utility that you can install
sudo apt-get install cmake git clone https://github.com/tasanakorn/rpi-fbcp cd rpi-fbcp/ mkdir build cd build/ cmake .. make sudo install fbcp /usr/local/bin/fbcp
You don't want to run that manually every time you boot, so we can do that by adding a line to
/etc/rc.local
sudo nano /etc/rc.local
Before, the final βexit 0β line, add the following:
/usr/local/bin/fbcp &
Ctrl+X
theny
thenEnter
I also think I blacklisted the touchscreen driver to prevent possible goofiness and also to potentially reduce CPU load.
sudo nano /etc/modprobe.d/raspi-blacklist.conf
(Mine was blank)
Add
# 3.2" LCD Touchscreen driver blacklist ads7846
Ctrl+X
theny
thenEnter
Then reboot to implement everything
sudo reboot
If all is well you should see your screen displaying EmulationStation!
I don't know how to detect FPS, but it is very playable. Definitely preferable to the fuzziness I've seen in photographs of using a backup camera monitor.
Next I need to try to get it working on the Pi Zero before I attempt to chop it down to fit the Gameboy Advance case.
-
@obsidianspider do you notice any shearing or tearing on the screen when it's doing fast and full screen updates? I get it on the ili9341 tft but it's not too bad
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.