Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

PiTFT 3.5" TFT - I want to install this upside down
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Fri Nov 06, 2015 6:32 pm

After some frustration I was able to get this combination to work. Here's some notes:

- Started with RetroPie 3.2.1 image for Pi 2. Did first boot, exited EmulationStation and did the usual raspi-config stuff: expand filesystem, disable overscan, enable device tree and SPI, load SPI kernel module by default, force audio to 3.5mm jack. Plus any other features you need (keyboard layout, SSH, etc.) but NOT overclocking (can tweak this later, as explained in guide). Reboot to allow filesystem expansion to happen.

- Run RetroPie-Setup script to install emulators.

- For PiTFT, it's necessary to use "--force-yes" when installing raspberrypi-bootloader. It'll take forever and complains a lot along the way, but does eventually conclude successfully. Then install and run adafruit-pitft-helper -t 35r

- "sudo install fbcp" doesn't work because the /usr/local/bin directory doesn't exist in this version of RetroPie. Okay then, take note of where the compiled executable resides...for example, on my system it was /home/pi/rpi-fbcp/build/fbcp

- When editing the 'asplashscreen' file (the do_start() function), use the above complete path to the executable, followed by an ampersand, e.g.: /home/pi/rpi-fbcp/build/fbcp &

- Skip the steps about runcommand.sh and the get_mode() function (which no longer exists in the current version). RetroPie seems to be better behaved now about not switching resolution when running ports, so we can just ignore that part.

- In /boot/config.txt, use the following hdmi configuration:
Code: Select all | TOGGLE FULL SIZE
hdmi_force_hotplug=1
hdmi_cvt=480 320 60 1 0 0 0
hdmi_group=2
hdmi_mode=87

This forces the HDMI resolution to 480x320 (to match the larger PiTFT), makes fbcp more efficient (as it doesn't need to do scaling).

- Also in config.txt, the 'dtoverlay' line for the screen can be tweaked: set speed to 80000000 (80 MHz) and fps to 60 (it won't actually run at 60 fps, but this is to ensure it's not throttled back in any way).

Reboot and see how it goes. If no response from PiTFT, make sure device tree and SPI are both enabled in raspi-config. If all is well, you can enable overclocking now, just be sure core_freq doesn't exceed 300 MHz.

Some games were still quite playable despite the reduced frame rate.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Fri Nov 06, 2015 6:35 pm

Oh also, to use display upside-down: the 'dtoverlay' line in /boot/config.txt, change "rotate=90" to "rotate=270".

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by StuartFox on Fri Nov 06, 2015 6:50 pm

Thanks so much Phil. I was pretty stuck on this. I'll go through this again and see how it runs. For my game boy project though, do you think I'd get better all round performance from the composite screen I have? Even though the picture won't be so good?

I have enough spare bits now to build two so I could try both I guess.

Many many thanks again for helping me out. This was way beyond me.

Stuart

StuartFox
 
Posts: 17
Joined: Tue Oct 27, 2015 11:18 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Sat Nov 07, 2015 1:07 am

You'll definitely get faster refresh on a composite screen, it just might be a little blurry in comparison (maybe not, depends on the emulator & game, lots of old arcade games were 320x240 so they're gonna get scaled up on the 3.5" PiTFT anyway).

Most games and the HDMI output are still running at 60 Hz behind the scenes, so 'twitch' input and game logic and collision detection are all happening at full resolution, it's just the updates to the PiTFT that are throttled. Some games are more playable than others in this setting.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by StuartFox on Sat Nov 07, 2015 7:37 am

Thanks again for your help on this. I'm new to Pi. so apolagies in advance for this question.

What do you mean by 'use "--force-yes" when installing raspberrypi-bootloader.'?

Regarding screen choice, I'll test both before I cut the correct hole in my gameboy. I'm limited to the original gameboy controls (plus two extra buttons on the back) so maybe the games available will look ok on composite. If it were your project, which screen would you use?

Many many thanks.

Stuart

StuartFox
 
Posts: 17
Joined: Tue Oct 27, 2015 11:18 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Sat Nov 07, 2015 5:18 pm

sudo apt-get -y --force-yes install raspberrypi-bootloader
Note the double-hyphen. Anyway, this installs the package despite all the complaints about needing to downgrade some other things in the process.

As for which screen, depends on which games you tend to play (fast twitch stuff might do better on composite due to better refresh rate) and which emulators you'll use most (if the system's native resolution is some integer fraction of the PiTFT size (480x320), it'll usually look better on that screen).

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by StuartFox on Mon Nov 09, 2015 5:35 pm

Hi again,

Still having issues. Not sure I installed fbcp correctly.

The screen currently goes black when RetroPie boots.

This was the message "build files have been written to: /home/pi/rpi-fbcp/build"

I have a 3.5 and 2.8 pitft by the way. Was aiming to use the smaller one for better performance, so I adjusted the screen model and resolutions when following your steps.

StuartFox
 
Posts: 17
Joined: Tue Oct 27, 2015 11:18 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Mon Nov 09, 2015 6:12 pm

OK, sounds like at least the screen's initializing, just no fbcp yet.
Do you have this line:
Code: Select all | TOGGLE FULL SIZE
/home/pi/rpi-fbcp/build/fbcp &

In the 'asplashscreen' script?
How about logging in and running fbcp manually, see if the screen starts doing things?

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by StuartFox on Mon Nov 09, 2015 6:45 pm

Ok Awesome - so I had put that line in asplashscreen but I'd got it wrong.

My 2.8r is now working on Quake! Woop!

So, I have the 2.8r, the 3.5r and the composite. I'm guessing I'll get the best frame rate out of the 2.8?

I'm going to clone this image now onto another SD card and try the 3.5...........

Again, thanks so much for your time on this - must admit I feel pretty dense about now, but I know more than I did last week!

StuartFox
 
Posts: 17
Joined: Tue Oct 27, 2015 11:18 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Mon Nov 09, 2015 7:07 pm

Composite for best frame rate. 2.8" PiTFT, second-best frame rate, for non-blurry 'pixel perfect' emulation of many arcade games that ran at 320x240 (e.g. Joust). 3.5" PiTFT, lowest frame rate, for max pixels.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by StuartFox on Mon Nov 09, 2015 7:47 pm

Cool - the 2.8 is working ok so far. I'll keep playing.

Touch screen doesn't work in this type of setup, no?

Thanks :-) If you're ever in Gloucestershire, England, I'll buy you a beer. Long way for a beer though.

StuartFox
 
Posts: 17
Joined: Tue Oct 27, 2015 11:18 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by pburgess on Mon Nov 09, 2015 8:22 pm

I don't think any of the emulators do anything with touchscreen input. The ports though...like Quake menus might be navigable if the touchscreen is calibrated. Just sorta-checked here...yeah, I could get the cursor to move around and detect presses, but the axes are swapped and stuff, would require some setup.

Some info here. You can skip the first few steps, it's already been installed by the adafruit-pitft-helper script, maybe start at "Manual Calibration":
https://learn.adafruit.com/adafruit-pit ... alibration
I don't think X calibration is necessary, can stop there.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by originalself on Fri Dec 25, 2015 5:25 pm

Great information here. I am trying to use it but seem to be having trouble installing fbcp. I get the following error
Code: Select all | TOGGLE FULL SIZE
install: `fbcp' and `/home/pi/rpi-fbcp/build/fbcp' are the same file
I checked in filezilla and everything seems to be in that file path.
pburgess wrote:After some frustration I was able to get this combination to work. Here's some notes:
- "sudo install fbcp" doesn't work because the /usr/local/bin directory doesn't exist in this version of RetroPie. Okay then, take note of where the compiled executable resides...for example, on my system it was /home/pi/rpi-fbcp/build/fbcp

- When editing the 'asplashscreen' file (the do_start() function), use the above complete path to the executable, followed by an ampersand, e.g.: /home/pi/rpi-fbcp/build/fbcp &


originalself
 
Posts: 2
Joined: Fri Dec 18, 2015 1:14 pm

Re: PiTFT 3.5" TFT - I want to install this upside down

by StuartFox on Fri Dec 25, 2015 5:46 pm

I got it working finally thanks to Phil's support, you're welcome to try my image.....

StuartFox
 
Posts: 17
Joined: Tue Oct 27, 2015 11:18 am

Re: PiTFT 3.5" TFT - I want to install this upside down

by originalself on Fri Dec 25, 2015 9:32 pm

StuartFox wrote:I got it working finally thanks to Phil's support, you're welcome to try my image.....

That would be great!

edit: I got it to work but my screen can't handle the higher clock. at 80 it is static. 70/64 is wildly unstable. 60 MHz works but is really slow. I may just need a new screen. :(

originalself
 
Posts: 2
Joined: Fri Dec 18, 2015 1:14 pm

Please be positive and constructive with your questions and comments.