Alternate GBZ GPIO inquiry

Having trouble with your GBZ build? Ask your questions here!
Golddeenoh
Posts: 27
Joined: Tue Dec 05, 2017 12:29 pm
Has thanked: 9 times
Been thanked: 1 time

Alternate GBZ GPIO inquiry

Post by Golddeenoh » Fri Dec 08, 2017 9:30 am

Good morning all, I've been following along for a good bit and made a rough GBZ a few years ago but it didn't look as good as i would want and i analog controlled the inputs. it was a gift for my wife and now i am re doing it but I am having some issues with my planned route on how i would like to do the wiring.

When i did it before the Pi zero interfaced with an Adafruit 2.4"TFT and the 26 pin ribbon coming off of the TFT connected to the buttons and power supply. I feel this cleans up the wiring some and make it fit better in the space.

the question is if i am in the correct place to change the pin/GPIO so that i can reallocate them to the new layout on the common ground PCB?
Attachments
20171208_093433.jpg
20171208_093433.jpg (3.27 MiB) Viewed 6350 times
20171208_093456.jpg
20171208_093456.jpg (3.57 MiB) Viewed 6350 times

Golddeenoh
Posts: 27
Joined: Tue Dec 05, 2017 12:29 pm
Has thanked: 9 times
Been thanked: 1 time

Re: Alternate GBZ GPIO inquiry

Post by Golddeenoh » Mon Dec 11, 2017 2:09 pm

this is how it looks, I have gone in and changed the files to align with the pins as it indicates but it appears that there is something i am missing to get the reassigned GPIO to work.
Attachments
20171211_160119.jpg
20171211_160119.jpg (3.91 MiB) Viewed 6311 times

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Alternate GBZ GPIO inquiry

Post by rodocop » Mon Dec 11, 2017 6:10 pm

So you have edited the retrogame.c file to the gpio pins you used? (use the gpio number not the physical pin number).
GPIO.png
GPIO.png (250.09 KiB) Viewed 6300 times

Golddeenoh
Posts: 27
Joined: Tue Dec 05, 2017 12:29 pm
Has thanked: 9 times
Been thanked: 1 time

Re: Alternate GBZ GPIO inquiry

Post by Golddeenoh » Mon Dec 11, 2017 7:53 pm

I think i read the code at face value and did it per pin instead of per GPIO designation, I'll use the chart you provided and recode it to the GPIO number instead of the physical pin.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Alternate GBZ GPIO inquiry

Post by rodocop » Mon Dec 11, 2017 8:26 pm

Hopefully that works. That's the only reason I can think of as to why it wasn't working. Chances are the buttons that work but do not do the right action happen to have a physical number that matches a gpio number that you have wired.

Golddeenoh
Posts: 27
Joined: Tue Dec 05, 2017 12:29 pm
Has thanked: 9 times
Been thanked: 1 time

Re: Alternate GBZ GPIO inquiry

Post by Golddeenoh » Tue Dec 12, 2017 10:08 am

Of course now i get no video, working fine and all of a sudden no video, tested it with another tft, another PI zero, and new image, neither gave output. going to have to try and test some more and see what happened to lose video.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Alternate GBZ GPIO inquiry

Post by rodocop » Tue Dec 12, 2017 12:54 pm

in the diagram above, make sure you do not use any of the purple ones for the controls, those are meant to be used for the screen. Maybe that would cause issues if you have one mapped to a control as well? Use the green ones only for controls.

Golddeenoh
Posts: 27
Joined: Tue Dec 05, 2017 12:29 pm
Has thanked: 9 times
Been thanked: 1 time

Re: Alternate GBZ GPIO inquiry

Post by Golddeenoh » Tue Dec 12, 2017 2:30 pm

That also looks like what i did now, pin 11 and 7, but appearently i coded it as GPIO 11 and 7. i guess i will have to reimage the cards to fix it. Unless doing those as inputs will cause any kind of damage to the TFT?

Golddeenoh
Posts: 27
Joined: Tue Dec 05, 2017 12:29 pm
Has thanked: 9 times
Been thanked: 1 time

Re: Alternate GBZ GPIO inquiry

Post by Golddeenoh » Tue Dec 12, 2017 7:26 pm

ok, i got in again and changed the desigantors to the GPIO inputs that corrispond and they still dont work right. I also tried the FTP method and added the file as used in "viewtopic.php?f=22&t=57&hilit=GPIO+how+to" and it still didn't work. i get some responses but again not the ones i coded in or wanted to use.

also tried to do the overlay for PWM audio but it didn't respond either.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Alternate GBZ GPIO inquiry

Post by rodocop » Wed Dec 13, 2017 5:46 am

Okay. So my next thing is to make sure that those black wires are actually connected to the proper gpio pins on the screen driver board and that they correspond the gpios you are mapping on the pi.

I've never used a screen like that, so maybe it uses more gpios than I'm thinking.

Can't really think of anything else to get it to work.

If audio isn't working make sure you have not mapped the pwm pins for controls. If you have followed prs's guide then you shouldn't have.

You have the pwm audio all wired up? And you added the proper line to the config.txt?

Worst case wire everything to the pi, and skip the screen. Use an HDMI screen to test, and if it works that way there is something with the screen board that is not allowing you to pass through controls.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest