Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Show off your completed Game Boy Zero, or post your build logs here!
User avatar
VeteranGamer
Posts: 1704
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 499 times
Been thanked: 886 times

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by VeteranGamer » Fri Mar 29, 2019 4:51 pm

Hisham_ALRiyami wrote:
Fri Mar 29, 2019 10:08 am
VeteranGamer

am planing to build the same build you have the only thing i dont know to do is how to link the lcd to the bi .can you show me how did you wire them together .
thanks a lot for sharing the steps for your build I appreciate it a lot because it help a lot of people who want to build GBZ like me.



my preferred method is to use a board/boards I designed, this make the whole build a lot more cleaner and makes for solid connections


viewtopic.php?f=25&t=5614


Image

Image

Image

Image



the wiring would be....


Display--------Raspberry Pi
BL--------------pin 12 (GPIO 18) I dont have a seperate connectipn for the BL (LED) as I've wired it straight to the 3.3V
SCK------------pin 23 (GPIO 11)
MISO----------pin 21 (GPIO 9)
MOSI----------pin 19 (GPIO 10)
CS--------------pin 24 (GPIO 8)
RST------------pin 22 (GPIO 25)
D/C-------------pin 18 (GPIO 24)
VIN-------------pin 17 (3.3v)
GND-----------pin 20 (GND)


(this is the same if you wire with the boards I've designed or if you wire directly to the RPi)


you could also use this board (it wires exactly the same way).....


Image


https://oshpark.com/shared_projects/HMNIMwZV






there are a couple of methods that you can use to enable the screen....
but currently I've been liking the performance of this method (it claims to be around 60FPS, it may not be far off that)



https://github.com/juj/fbcp-ili9341


heres is how I've enabled it.....



some of this may not be necessary, as it already may be disabled/enabled...
but I did it anyway...

via Raspi Config (in the Retropie menu)
disable SPI
enable Overscan


reboot


I've done this via SSH
(Need WiFi and be connected to the same network as your PC/Laptop)


Or just type it in manually...
(Need WiFi and a Keyboard connected to the RPi)



this is meant to be done at the end, but I found I couldnt even get to this point (so I've done it first)

Code: Select all

sudo nano /etc/rc.local
and add this before end

Code: Select all

/home/pi/fbcp-ili9341/build/fbcp-ili9341 &
now just follow these steps

Code: Select all

sudo apt-get install cmake

git clone https://github.com/juj/fbcp-ili9341.git

cd fbcp-ili9341

mkdir build

cd build

cmake -DARMV6Z=ON -DILI9341=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 -DDISPLAY_ROTATE_180_DEGREES=ON ..

make -j

sudo ./fbcp-ili9341 &


for a
RPi3 you just need to change the CMAKE

Code: Select all

cmake -DARMV8A=ON -DILI9341=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 -DDISPLAY_ROTATE_180_DEGREES=ON ..

the other method would be this....

viewtopic.php?f=22&t=2312

its a very decent method of enabling the SPI LCD, but I feel the first method is a lot more smoother (and it gives a better FPS)







.

Dividion
Posts: 65
Joined: Fri Mar 30, 2018 5:42 am
Has thanked: 46 times
Been thanked: 55 times

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by Dividion » Fri Mar 29, 2019 6:30 pm

VeteranGamer wrote:
Fri Mar 29, 2019 4:51 pm
via Raspi Config (in the Retropie menu)
disable SPI
enable Overscan
That must be a really different method if those two are reversed. I need to check it out.
Looks like the 3.5in 480x320 KeDei screen I tried last year might work now too. Very interesting.
Check out my store for GBZ boards and accessories: http://pocketadventures.com

User avatar
VeteranGamer
Posts: 1704
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 499 times
Been thanked: 886 times

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by VeteranGamer » Sat Mar 30, 2019 4:01 am

Dividion wrote:
Fri Mar 29, 2019 6:30 pm
VeteranGamer wrote:
Fri Mar 29, 2019 4:51 pm
via Raspi Config (in the Retropie menu)
disable SPI
enable Overscan
That must be a really different method if those two are reversed. I need to check it out.
Looks like the 3.5in 480x320 KeDei screen I tried last year might work now too. Very interesting.


IDK if it is a "really different" method......
( https://github.com/juj/fbcp-ili9341 )

but
this method doesnt use the same FBTFT frame buffer drivers (like notro/fbtft and moosepr method in his guide)
and it also doesn't use the SPI driver (this is why you disable SPI)


you can read up more about this here.....

https://github.com/juj/fbcp-ili9341


if your going to try to get your Kedei screen to work, I highly recommend you look at this section.....
(the installation I've posted above is ONLY for a ili9431, the Kedei will be slightly different)


https://github.com/juj/fbcp-ili9341#installation


I've got a Waveshare 3.5" screen working, and it doesn't look that bad either (performance wise)
it actually performs very decent....





.

Hisham_ALRiyami
Posts: 4
Joined: Fri Mar 29, 2019 10:02 am
Has thanked: 1 time

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by Hisham_ALRiyami » Wed Apr 17, 2019 10:32 am

thanks a lot to VeteranGamer and everyone else who replied.
now i have another problem maping buttons to gpio.
tried this method "viewtopic.php?t=57" thre buttons was not working which is up,RT and start .tried changing the number of the gpio from the code nothing happend even tried gpioneer but one button didnt work.VeteranGamer can you share with us what you did or the code you have ?.only this step left then my build will be complete.

User avatar
VeteranGamer
Posts: 1704
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 499 times
Been thanked: 886 times

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by VeteranGamer » Wed Apr 17, 2019 9:20 pm

Hisham_ALRiyami wrote:
Wed Apr 17, 2019 10:32 am
thanks a lot to VeteranGamer and everyone else who replied.
now i have another problem maping buttons to gpio.
tried this method "viewtopic.php?t=57" thre buttons was not working which is up,RT and start .tried changing the number of the gpio from the code nothing happend even tried gpioneer but one button didnt work.VeteranGamer can you share with us what you did or the code you have ?.only this step left then my build will be complete.


I personally haven't tried the method you linked....
but if you've tried to change the GPIO and still had no success...
I would suggest double checking your wiring/connections, you could have a issue there.....

if that still doesnt work....


then the way I enable the GPIO as the controls is using Adafruit Retrogame...

https://learn.adafruit.com/retro-gaming ... s-software


its very straight forward...

firstly I would configure the controls using a Keyboard


UP (UP directional button)
Down (Down directional button)
Left (Left directional button)
Right (Right directional button)
Start (Enter button)
Select (Space button)
A (Left Ctrl button)
B (Left Alt button)
X (Z button)
Y (X button)
L1 (A button)
R1 (S button)


once configured....
SSH in the system....
and enable the GPIO.....

Code: Select all

cd

Code: Select all

curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh

Code: Select all

sudo bash retrogame.sh

if you've done everything correctly so far (just copy and pasting)
you'll be presented with this screen....

gaming_retrogame-sh.png
gaming_retrogame-sh.png (13.31 KiB) Viewed 942 times

Select Option 1


and allow the installation to complete
once completed...

gaming_retrogame-reboot.png
gaming_retrogame-reboot.png (9.43 KiB) Viewed 942 times

Reboot, and Retrogame will be installed....


you can now configure it however you have the controls wired/connected to the GPIO

the standard (out of the box) configuration that Retrogame has or installs for you is this....

Code: Select all

# Here's a pin configuration for the PiGRRL 2 project:
 
LEFT       4  # Joypad left
RIGHT     19  # Joypad right
UP        16  # Joypad up
DOWN      26  # Joypad down
LEFTCTRL  14  # 'A' button
LEFTALT   15  # 'B' button
Z         20  # 'X' button
X         18  # 'Y' button
SPACE      5  # 'Select' button
ENTER      6  # 'Start' button
A         12  # Left shoulder button
S         13  # Right shoulder button
ESC       17  # Exit ROM; PiTFT Button 1
1         22  # PiTFT Button 2
2         23  # PiTFT Button 3
3         27  # PiTFT Button 4

you can either keep the same....
or just edit to how suits your build.....


you can edit this via a few ways....
here are a couple....

if you SSH in to the build....
you can access the Retrogame.cfg

Code: Select all

sudo nano /boot/retrogame.cfg

or

you can insert your Micro SD Card into a PC/Laptop and access the Retrogame.cfg via the Boot of the SD card
however you will need to use something like this....

https://notepad-plus-plus.org/download/v7.6.6.html

to edit/configure...





.

Hisham_ALRiyami
Posts: 4
Joined: Fri Mar 29, 2019 10:02 am
Has thanked: 1 time

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by Hisham_ALRiyami » Sun Apr 21, 2019 3:05 pm

VeteranGamer wrote:
Wed Apr 17, 2019 9:20 pm
Hisham_ALRiyami wrote:
Wed Apr 17, 2019 10:32 am
thanks a lot to VeteranGamer and everyone else who replied.
now i have another problem maping buttons to gpio.
tried this method "viewtopic.php?t=57" thre buttons was not working which is up,RT and start .tried changing the number of the gpio from the code nothing happend even tried gpioneer but one button didnt work.VeteranGamer can you share with us what you did or the code you have ?.only this step left then my build will be complete.


I personally haven't tried the method you linked....
but if you've tried to change the GPIO and still had no success...
I would suggest double checking your wiring/connections, you could have a issue there.....

if that still doesnt work....


then the way I enable the GPIO as the controls is using Adafruit Retrogame...

https://learn.adafruit.com/retro-gaming ... s-software


its very straight forward...

firstly I would configure the controls using a Keyboard


UP (UP directional button)
Down (Down directional button)
Left (Left directional button)
Right (Right directional button)
Start (Enter button)
Select (Space button)
A (Left Ctrl button)
B (Left Alt button)
X (Z button)
Y (X button)
L1 (A button)
R1 (S button)


once configured....
SSH in the system....
and enable the GPIO.....

Code: Select all

cd

Code: Select all

curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh >retrogame.sh

Code: Select all

sudo bash retrogame.sh

if you've done everything correctly so far (just copy and pasting)
you'll be presented with this screen....


gaming_retrogame-sh.png


Select Option 1


and allow the installation to complete
once completed...


gaming_retrogame-reboot.png


Reboot, and Retrogame will be installed....


you can now configure it however you have the controls wired/connected to the GPIO

the standard (out of the box) configuration that Retrogame has or installs for you is this....

Code: Select all

# Here's a pin configuration for the PiGRRL 2 project:
 
LEFT       4  # Joypad left
RIGHT     19  # Joypad right
UP        16  # Joypad up
DOWN      26  # Joypad down
LEFTCTRL  14  # 'A' button
LEFTALT   15  # 'B' button
Z         20  # 'X' button
X         18  # 'Y' button
SPACE      5  # 'Select' button
ENTER      6  # 'Start' button
A         12  # Left shoulder button
S         13  # Right shoulder button
ESC       17  # Exit ROM; PiTFT Button 1
1         22  # PiTFT Button 2
2         23  # PiTFT Button 3
3         27  # PiTFT Button 4

you can either keep the same....
or just edit to how suits your build.....


you can edit this via a few ways....
here are a couple....

if you SSH in to the build....
you can access the Retrogame.cfg

Code: Select all

sudo nano /boot/retrogame.cfg

or

you can insert your Micro SD Card into a PC/Laptop and access the Retrogame.cfg via the Boot of the SD card
however you will need to use something like this....

https://notepad-plus-plus.org/download/v7.6.6.html

to edit/configure...





.
Thanks a lot for your time and finally its working XXDD

User avatar
infinitLoop
Posts: 381
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 162 times
Been thanked: 129 times
Contact:

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by infinitLoop » Tue May 07, 2019 5:41 pm

VeteranGamer wrote:
Fri Mar 29, 2019 4:51 pm

heres is how I've enabled it.....

are you doing anything else to optimize gameplay? it's not working very well for me, at least on 16bit stuff - using a pi zero...

i've tried both methods (let's call the other way the "moosepr" way) and with your newer way, the image looks great, and is (mostly) very smooth in like NES games like super mario, just an occasional hiccup, but GBA and SNES games like mario kart are ridiculously laggy (ones that are/were fine on composite or hdmi).

Trying the moosepr way, SNES and GBA games are (mostly, again) fine, and pretty much normal speed but there is a very noticeable screen-door effect in the menu and sometimes elsewhere in more static images (in motion, its at least less noticeable, but you can still see the vertical scan lines sometimes).

i've read up on the driver and it's settings, and played around with core_freq and the clock divisor, as well as a few other things, but i haven't gotten your way to work well with the 16bit games at all. at best, upping the core_freq_min seemed to resolve the occasional slowdown that would happen when the gpu was coming out of idle, in the 8bit games.

User avatar
VeteranGamer
Posts: 1704
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 499 times
Been thanked: 886 times

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by VeteranGamer » Tue May 07, 2019 9:08 pm

infinitLoop wrote:
Tue May 07, 2019 5:41 pm
VeteranGamer wrote:
Fri Mar 29, 2019 4:51 pm

heres is how I've enabled it.....
are you doing anything else to optimize gameplay? it's not working very well for me, at least on 16bit stuff - using a pi zero...
I havent optimized it in anyway

I've not really noticed any lag....
the JUJ driver method is a lot more smoother than moosepr and you also have a lot less tearing compared to moosepr....

however
his driver is more suited to the RPi3, but for me has been just as good on the Pi Zero (this is my own experience) .....

IDK...
what your setup is....
how you have everything connected up....
what emulators your using

my connection (wiring length) from the Pi Zero to the LCD is only about 40mm (4CM)....
and i'm using...
lr-gpsp for GBA
lr-snes9x2002 for SNES (but expect limitation)



if you experience any other issues....
I would highly recommend that you start a post in the support section






.

User avatar
infinitLoop
Posts: 381
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 162 times
Been thanked: 129 times
Contact:

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by infinitLoop » Wed May 08, 2019 6:41 am

VeteranGamer wrote:
Tue May 07, 2019 9:08 pm
IDK...
what your setup is....
how you have everything connected up....
what emulators your using

my connection (wiring length) from the Pi Zero to the LCD is only about 40mm (4CM)....
and i'm using...
lr-gpsp for GBA
lr-snes9x2002 for SNES (but expect limitation)
i'm not doing anything too crazy or unusual with it. Latest Retropie 4.4, and the same default emulators (tried some others, but those seem to be the best performing).

Software-wise, I do usually go through the optimization stuff, like yaya's popular post, but i've also just tried a clean install too without doing any of that. I think you prefer retropie 4.3, and that's one thing i haven't tried yet, but that was probably one of my next steps, to see if it's any better.

i've got two builds I'm trying it on right now, to see what differences in their results - using the spi adapter board from http://www.pocketadventures.com/product_spi10.asp to connect the screens - and they both seem to be performing about the same. i think the board appears to hook up the same way as your boards do, just in one board (it's fairly straight-forward, connection-wise, with just that one sm resistor). connections are very short (the length of those long pins included with the board).

i'm also using the basic gpio assists from that site to organize everything, and for power, one is using a 1000c/camble shutdown and the other is using the power assist pro from pocketadventures. both use pwm audio, and have ads1115 battery monitors.

for one of them, i was actually having issues where the button presses from some of the gpio-mapped buttons would interrupt the screen and cause it to stutter and freeze. it seemed to be a bridged connection somewhere, but i couldn't find it. to get around that, i re-mapped the control board to a teensy/usb and stuck a little hub in there for it, which seemed to work fine. i didn't have the issue on the other build, so that is still using gpio buttons.

the moosepr way got me the most usable results on whole, but that vertical line, screen door effect really knocks the quality of the play down. if everything was as smooth as 8bit stuff looks on the newer approach, it would be amazing, but as it is, i think it makes too much unplayable.

i haven't had much issue with tearing, until i push the core_freq too high. it's really just the slowdown that's killing me.

one thing they do have in common is the screen. maybe that's the issue. i have a different model on order from aliexpress, but who knows when that'll arrive. this is the one i used on these: https://www.aliexpress.com/item/1pcs-3- ... 4c4d5WKOhL
VeteranGamer wrote:
Tue May 07, 2019 9:08 pm
I would highly recommend that you start a post in the support section
sorry :( i knew this wasn't a good thread, but figured since the discussion was happening in here already, i would see if you had any advice on it

User avatar
infinitLoop
Posts: 381
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 162 times
Been thanked: 129 times
Contact:

Re: Veteran's 3rd "THE ULTIMATE CUSTOM BUILD"

Post by infinitLoop » Thu May 09, 2019 10:07 pm

at the risk of being scolded yet again, an update for anyone else who might have the issue...

installed retropie 4.3, and - so far anyway - it's run everything pretty much as I'd expect, and the framerate and image is very smooth, and looks great.

it's a huge difference using the juj driver, versus 4.4, which - for everything i tried - just did not handle most 16bit games at all.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest