How to - Use the GPIO for Buttons instead of a Teensy

Various user-contributed guides for hardware-related things
User avatar
moosepr
Posts: 524
Joined: Wed Jan 25, 2017 6:18 am
Has thanked: 69 times
Been thanked: 241 times
Contact:

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by moosepr » Thu Jul 06, 2017 1:51 am

emaborsa wrote:
Wed Jul 05, 2017 11:42 pm
moosepr wrote:
Thu Jun 29, 2017 3:32 am
the only thing i can think is the SDL2 issues mentioned here

https://github.com/adafruit/Adafruit-Re ... patibility
Since my mothertongue is not english...or maybe I simply don't understand.... what is SDL2? Does Retropie work to 100% by using the GPIO instead teensy?

SDL2 is a graphics/hardware library which some emulators use as there base

if you install the adafruit retrogame software by hand (clone the git repository, make, make install) then you have to manually create some config files so that the SDL2 library can see the retrogame keyboard events.

if you used the adafruit script to install retrogame (https://raw.githubusercontent.com/adafr ... trogame.sh) then it creates the config files for you, and you wont have any issues
Get a small cheep LCD in your project https://www.sudomod.com/forum/viewtopic.php?f=22&t=2312
Wrap it all round a battery https://www.sudomod.com/forum/viewtopic.php?f=13&t=2292
Or use a custom PCB to make it really small https://www.sudomod.com/forum/viewtopic.php?f=13&t=2512
or make it really really really really tiny!! https://www.sudomod.com/forum/viewtopic.php?f=13&t=2919

User avatar
tinkerBOY
Posts: 710
Joined: Tue May 30, 2017 4:00 am
Has thanked: 294 times
Been thanked: 206 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by tinkerBOY » Mon Jul 10, 2017 7:51 pm

For those having a problem setting up the software side of the GPIO butttons I made a simple script that automates the task. I have tested it on RetroPie 4.1 and the new 4.2 version.

Go check it out at http://www.sudomod.com/forum/viewtopic.php?f=20&t=3390
New! tinkerBOY PowerSwitch v1.0 with Safe Shutdown
Game Boy Zero Controllers available @ tinkerBOY.xyz * Support
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter

emaborsa
Posts: 27
Joined: Sun Oct 02, 2016 1:58 am
Has thanked: 4 times
Been thanked: 1 time

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by emaborsa » Tue Jul 11, 2017 12:00 am

moosepr wrote:
Thu Jul 06, 2017 1:51 am
emaborsa wrote:
Wed Jul 05, 2017 11:42 pm
moosepr wrote:
Thu Jun 29, 2017 3:32 am
the only thing i can think is the SDL2 issues mentioned here

https://github.com/adafruit/Adafruit-Re ... patibility
Since my mothertongue is not english...or maybe I simply don't understand.... what is SDL2? Does Retropie work to 100% by using the GPIO instead teensy?

SDL2 is a graphics/hardware library which some emulators use as there base

if you install the adafruit retrogame software by hand (clone the git repository, make, make install) then you have to manually create some config files so that the SDL2 library can see the retrogame keyboard events.

if you used the adafruit script to install retrogame (https://raw.githubusercontent.com/adafr ... trogame.sh) then it creates the config files for you, and you wont have any issues
ok...and what if I simply install Retropie?

Unicornflakes
Posts: 12
Joined: Sat Jun 17, 2017 1:03 am
Has thanked: 2 times
Been thanked: 1 time

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by Unicornflakes » Sun Jul 16, 2017 9:20 am

cvp wrote:
Mon Sep 12, 2016 7:45 am
Hello, I want to use this GPIO method. It has worked so far as. The buttons are recognized under Retropi and I can configure the keys. Also, I can with the D-Pad, the Move the Retropi Menü (Up, down, left, right). A + B (Enter+go Back) and Start / Select access to settings very well!
But when start a game (i try with Gameboy/SNES Emulator) then all buttons not working. When I connect a keyboard it works well (Keyboard, not Gameboy Board)

With the keyboard I start then a game. Then I cut the connection between the keyboard and Rpi0. so I wanted to check if other buttons such as up, down, left, right working /Gameboy Input). Unfortunately not.

Do I need to adjust anything more on GB / SNES emulator?

I look forward to an early reply. thank you in advance
I have the exact same issue, but I don't think any answer was given. Anyone knows how to fix this ?

User avatar
tinkerBOY
Posts: 710
Joined: Tue May 30, 2017 4:00 am
Has thanked: 294 times
Been thanked: 206 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by tinkerBOY » Sun Jul 16, 2017 9:45 am

Unicornflakes wrote:
Sun Jul 16, 2017 9:20 am
cvp wrote:
Mon Sep 12, 2016 7:45 am
Hello, I want to use this GPIO method. It has worked so far as. The buttons are recognized under Retropi and I can configure the keys. Also, I can with the D-Pad, the Move the Retropi Menü (Up, down, left, right). A + B (Enter+go Back) and Start / Select access to settings very well!
But when start a game (i try with Gameboy/SNES Emulator) then all buttons not working. When I connect a keyboard it works well (Keyboard, not Gameboy Board)

With the keyboard I start then a game. Then I cut the connection between the keyboard and Rpi0. so I wanted to check if other buttons such as up, down, left, right working /Gameboy Input). Unfortunately not.

Do I need to adjust anything more on GB / SNES emulator?

I look forward to an early reply. thank you in advance
I have the exact same issue, but I don't think any answer was given. Anyone knows how to fix this ?
Re-configuring the buttons work for me. If not the try this one http://www.sudomod.com/forum/viewtopic.php?f=20&t=3390
New! tinkerBOY PowerSwitch v1.0 with Safe Shutdown
Game Boy Zero Controllers available @ tinkerBOY.xyz * Support
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter

prerunnerseth
Posts: 279
Joined: Fri May 06, 2016 5:36 pm
Has thanked: 16 times
Been thanked: 229 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by prerunnerseth » Mon Jul 24, 2017 3:15 pm

Updated the guide to make start key enter for easier navigation of menus.

User avatar
Lphillimore
Posts: 993
Joined: Sat Jan 07, 2017 7:03 pm
Location: Perth, WA
Has thanked: 796 times
Been thanked: 527 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by Lphillimore » Thu Jul 27, 2017 1:20 am

Having not used this method previously I've now got 2x GBZs utilising it and it works perfectly.

Thanks for the info.

MeisterAndre
Posts: 2
Joined: Tue Aug 15, 2017 10:02 am

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by MeisterAndre » Wed Aug 16, 2017 10:02 am

Hi,

your guide worked well for Retropie, but how can i do this with recalbox?? Is there a way to do so?

I built an Snes Zero and i am not as comfortable with retropie as with recalbox.

Best regards
Andre

User avatar
redled
Posts: 27
Joined: Mon Aug 14, 2017 4:40 pm
Location: San Francisco
Has thanked: 39 times
Been thanked: 4 times

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by redled » Sat Aug 26, 2017 1:42 pm

Just tested this on a Pi Zero W, wiring one of the cheapie Gameboy Zero PCBs on Amazon for $5 and it works, but...

1. Button holds don't seem to work correctly, like a long jump in Super Mario 2 with the Princess (I haven't cut my holes yet, so only have a & b buttons connected but everything is wired up)
2. Now my screen is flickering like crazy at the bottom half! Wow, this project is frustrating, two steps forward...

DalThePal
Posts: 4
Joined: Wed Oct 11, 2017 2:46 pm

Re: How to - Use the GPIO for Buttons instead of a Teensy

Post by DalThePal » Wed Oct 11, 2017 2:53 pm

I followed all of these steps with my sd Card in a rpi A and retropie would boot up fine. When I place the same card into my rpi zero it can’t finish booting. It reaches the retropie screen and then crashes and tries to boot again. It just does this on a continuous loop. Does anyone now what I’ve done wrong?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest