Tutorial Center Image Script

Tool for Hdmi_timings and center image from Frank Skilton
Tutorial howto install on retropie
Thanks to Vitor (https://www.facebook.com/groups/1649021265123737/permalink/2118011884891337/)

Ok guys, I was finally able to figure things out with Pi2Scart so I’ll write this small guide with some informations. Feel free to use and post it wherever you like.

I’m using the Retropie 4.2 image provided here:

The first thing I wanted was to center the picture with the correct HDMI timings for the Sony PVM. I first centered it using my consolized NeoGeo MVS outputing a cross hatch that way I would know my monitor is perfect.
Than you will want to use Frank Skilton HDMI timing calculator.

Copy it to your USB stick and for it to run go to your shell command line with ctrl+f4 on the Pi. For some reason SSH is really slow and not usable.
CD into the folder with the files. (The files are inside a tar.gz archive you need to extract it first).
Now to run it:
Sudo chmod +x set_video.sh
Sudo bash ./set_video.sh

Adjust the position and write the timings down.

Now you need to change those on your /boot/config.txt. You can do it on the Pi using nano:
Sudo nano /boot/config.txt
Use ctrl+o to save
ctrl+x to exit.

The tricky part which I didn’t found anywhere someone explaining is that there are two scripts working when you enter a game and one when you exit it.
So if you boot with the correct HDMI timings and a centered image you will get a off center image because of this script.

Those scripts are the ones made by Michael Vencio.
So the first thing you want to do is update your script. The one with the pre made image is 6.1 and the latest one is 7.0.
Get it here:

install fbv with

sudo apt-get install fbv

Now you have to edit the runcommand-onend.sh file. Use NotePad++ on windows because notepad will give you bad characters when editing the file.
Now insert the timing you got from the set_video.sh script into it.
This will cover the menus.
If you have image that’s outside your visible area, leave it be, because disabling overscan will give you a soft image that’s undesirable.

Now all the consoles game run at 1600×240. This is a tricky to avoid Raspberry Pi pixel clock limitation.
A bug report were filled here but popcornmix tried and without success so don’t expect a fix for this problem and use this resolution.
Also because the horizontal resolution is so high it hides scalings artifacts and the image looks great.
Now you need to go to your set_video.sh script and insert the default 1600×240 timings from runcommand-onstart script.

hdmi_timings 1600 1 85 157 192 240 1 4 3 15 0 0 0 60 0 32000000 1

This will give you the image that your consoles will display, tweak it with your keyboard arrows to center it and write the numbers down.
Edit your runcommand-onstart.sh file with NotePad++ and save it.
Now copy it to /opt/retropie/configs/all and replace the ones from the original image file you flashed your SD card.

The last part is covered already from the documentation and is adjusting your X and Y position and your height and width from within the retroarch menu.

Hope this helps as far as I know those information were not available anywhere. If I’m being redundant, I’m sorry, but I feel this might help somebody else with the same problems that I had.

Comments are closed.