How do I get the arcade bezels in Retropie 4.0?

Info on the Pi and retro gaming emulation
pjft
Posts: 7
Joined: Mon Oct 03, 2016 10:58 am

Re: How do I get the arcade bezels in Retropie 4.0?

Post by pjft » Mon Oct 03, 2016 11:06 am

@Floob: apologies for bothering. I hesitated on creating a new thread vs this one.

I thought I'd install them later today, I plan on doing it manually, as I have some customizations made on my own shaders and config files, so I wasn't thinking of using your rp-video-manager tool, unless perhaps to backup and restore my config files should anything go wrong.

You mention the arcade bezels only support 1920x1080, but I believe I'm running on a 720p monitor at the moment. What's your take on what may be needed to make that happen successfully?

Should I batch resize all the image files? (i.e. is it a size issue)
Would I need to bulk replace any values or parameters in the config files? (i.e. is it an offset/viewport issue?)

What's your take or best guess?

I'm happy to look into it and figure it out on my own, but given that you've looked into this for a while now, I'd love your perspective to estimate the amount of work necessary - and perhaps do some pre-processing beforehand, as in the computer I have access during the day I have some more tools to use than the one at home.

Thanks for the time, and sorry for partially hijacking the thread - let me know if you'd rather have me start a new one, though I thought the answer could help here as well.

Floob
Site Admin
Posts: 182
Joined: Mon Feb 09, 2015 8:27 pm

Re: How do I get the arcade bezels in Retropie 4.0?

Post by Floob » Mon Oct 03, 2016 7:27 pm

Hi,

Yes, the bezels only support 1920x1080, you can resize these images manually, or just let them become resized automatically.
The issue will more likely be that some of the configs specify the video are (viewport) in the config files, and it is these that will look odd on another resolution.
Here is an example:
https://github.com/biscuits99/rp-video- ... id.zip.cfg

You could edit the files that specify the size to reduce the size but keep the aspect ratio, but obviously that will require some manual effort.

Here is an example of one that just uses a pre-defined ratio that shouldnt need to change
https://github.com/biscuits99/rp-video- ... nd.zip.cfg

pjft
Posts: 7
Joined: Mon Oct 03, 2016 10:58 am

Re: How do I get the arcade bezels in Retropie 4.0?

Post by pjft » Mon Oct 03, 2016 8:47 pm

Hah.

Thanks for the reply.

I was actually just trying it out, and surprisingly it seems that it's working as intended, which is unexpected. I was very much under the impression this LCD I'm using is 720p only, but I may be mistaken. fbset -s returns "1824x984", which is closer to 1080p, so maybe I stand corrected.

I had done a lot of pre-processing working under some assumptions:
- I had resized all png files to 720p;
- I had hacked together a bash script to change all viewport width, height, x and y to 2/3 of the original value (which I, conceptually, assumed would be the right changes to the files)

But apparently now I won't need them, at least for the time being.

Happy to share those files here, if it helps anyone, though they are untested.

I suspect maybe only the config files are needed, as I *expect* that the overlay image will always be resized to full screen, as (I hope) the dimensions are not an absolute number of pixels.

----

My very hacky job at a linux/mac bash file was the following:

#!/bin/bash
FILENAME_IN="$1"
FILENAME_OUT="$1.new"
rm $FILENAME_OUT
while IFS='' read -r line || [[ -n "$line" ]]; do
LINE=$line
NEWLINE=''

if [[ $line == *"custom_viewport_width"* ]]
then
CUSTOM_VIEWPORT_WIDTH=$(echo "$line" | sed 's/custom_viewport_width = "\(.*\)"/\1/')
NEWLINE='custom_viewport_width = "'$((CUSTOM_VIEWPORT_WIDTH * 2/3))'"';
fi

if [[ $line == *"custom_viewport_height"* ]]
then
CUSTOM_VIEWPORT_HEIGHT=$(echo "$line" | sed 's/custom_viewport_height = "\(.*\)"/\1/')
NEWLINE='custom_viewport_height = "'$((CUSTOM_VIEWPORT_HEIGHT * 2/3))'"';
fi

if [[ $line == *"custom_viewport_x"* ]]
then
CUSTOM_VIEWPORT_X=$(echo "$line" | sed 's/custom_viewport_x = "\(.*\)"/\1/')
NEWLINE='custom_viewport_x = "'$((CUSTOM_VIEWPORT_X * 2/3))'"';
fi

if [[ $line == *"custom_viewport_y"* ]]
then
CUSTOM_VIEWPORT_Y=$(echo "$line" | sed 's/custom_viewport_y = "\(.*\)"/\1/')
NEWLINE='custom_viewport_y = "'$((CUSTOM_VIEWPORT_Y * 2/3))'"'
fi

if [[ $NEWLINE == "" ]]
then
NEWLINE=$LINE
fi
echo "$NEWLINE" >> $FILENAME_OUT
done < "$1"

-----

It will output a new <romname>.cfg.new file.

The only ones it won't work is for the invaders ones (there are 3) just because there are some commented lines there which will break the regexp. It was easier, in my case, just to fix those 3 source files by removing the commented lines - as I said, it was a lazy hack. :)

I then had a separate batch to run it for all files in the folder and rename it to the right <romname>.cfg format in a separate folder.

Hope this helps, and let me know if it'd be worth it for me to upload the 720p hypothetical versions somewhere.

Also, I'm curious: why aspect ratio index 22 instead of 21 (core provided)?

Thanks!

Floob
Site Admin
Posts: 182
Joined: Mon Feb 09, 2015 8:27 pm

Re: How do I get the arcade bezels in Retropie 4.0?

Post by Floob » Mon Oct 03, 2016 9:24 pm

Thanks for the bash script example, thats really useful.

The index value of 22 is just to confirm that it should pick up custom settings in the file.
Details here:
viewtopic.php?t=52#p159

pjft
Posts: 7
Joined: Mon Oct 03, 2016 10:58 am

Re: How do I get the arcade bezels in Retropie 4.0?

Post by pjft » Mon Oct 03, 2016 9:49 pm

Thanks - I had read a similar post of yours with those details, they were really helpful. I suppose my question was why would be overriding them, but I suppose some could be wrong so we're overriding them. :)

A separate question, though, which may be something I might be missing. This is all working great for ROMs for which the .cfg file exists. However, for those that don't, it automatically loads the last selected overlay and resolution settings. I suspect it may be related to the "config_save_on_exit = "true"" option in the retroarch - when I remove it it does work fine, but - as expected - game-specific option changes aren't saved.

I kind of expected that the game-specific overlay options wouldn't be cascaded back to the main retroarch.cfg back in /opt/retropie/configs/mame-libretro/ , but it does seem the case.

Is there any obscure setting I may be missing?

Well, regardless, thank you for the great work - this is very much appreciated!

Cheers.

Floob
Site Admin
Posts: 182
Joined: Mon Feb 09, 2015 8:27 pm

Re: How do I get the arcade bezels in Retropie 4.0?

Post by Floob » Mon Oct 03, 2016 10:20 pm

The override is there to compensate for aspect ratio / bezel size compromise, as it isnt always practical to stick to the 100% accurate aspect ration on some of the games if the bezel is to work.

Yes, I'd recommend your retroarch.cfg files remain clean, that is the system specific ones should broadly look like this
http://pastebin.com/n5FbDBUK

I wouldnt set to save the config on exit. Lots of info on the RetroPie forum, here is a diagram that may help:
https://retropie.org.uk/forum/topic/219 ... he-game/24

If you want game specific overrides, I would put the one or two lines into the game .cfg file.
A bit like this: https://www.youtube.com/watch?v=NiE_JZf5aRo

An alternative route is here:
https://retropie.org.uk/forum/topic/405 ... pendconfig

pjft
Posts: 7
Joined: Mon Oct 03, 2016 10:58 am

Re: How do I get the arcade bezels in Retropie 4.0?

Post by pjft » Mon Oct 03, 2016 10:41 pm

Thanks, this is a great read.

The reason I asked was because in one of the files shared for the manual install, there was a cfg file titled mame_libretro.cfg (of all names) which I assumed was meant to be equivalent to the creator's source default retroarch.cfg, and there it had the setting to save on exit set to "true". My bad.

Final question for today, if you'd allow me.

I find that the performance on lr-mame2003 on my RPi3 with davej's CRT shader, no curvature, and the arcade bezel overlays is actually sub-par. Not significantly, but sufficiently so that the sound will start breaking, which is unfortunate. Stays around 55fps or something, rather than the usual 60fps.

It does stay fixed at 60fps (well, 60.2fps) if I only use the CRT shader, or the Arcade overlay, but no shader.

I tried to overclock the RPi to

arm_freq=1350
core_freq=500
over_voltage=4

but neither did it significantly improve the performance there, surprisingly, but also quickly overheated my Pi, leading to the yellow warning square.

I found the patrickm scanlines overlay. Is there a setup that allows us to merge both (i.e just use the arcade overlay on top of patrickm's scaline overlay)? Would you recommend it? I am aware that the look will not be ideal, but maybe we can layer overlays on top of another.

Or, alternatively, do you get solid 60fps performance on these? Or even, alternatively, can I use these on lr-fba-next just by copying the cfg and overlay files to the fba folder? I expect the answer to be "yes" (I do have the FBA rom set in a separate folder already), but wanted to confirm. I expect lr-fba-next to have better performance.

Thanks for your patience Floob. Apologies for taking your time with questions you have probably answered countless times already.

pjft
Posts: 7
Joined: Mon Oct 03, 2016 10:58 am

Re: How do I get the arcade bezels in Retropie 4.0?

Post by pjft » Tue Oct 04, 2016 3:15 pm

I hacked together a script to batch merge the arcade bezel and patrickm's scanline filters in a single image, using GraphicsMagick (ImageMagick was giving me some errors dealing with PNGs).

Uploaded to MEGA in case it may help anyone:

https://mega.nz/#!tINUASpA!1FVweKk1tS4P ... 8NP1QMEaxE

I suppose if someone isn't extremely picky about the shader, they can get (hopefully) a performance boost by using the arcade overlay with the embedded scanlines, rather than using the arcade overlay and the scanlines as a separate shader.

Haven't tried them yet, though - only later today - so can't promise they're anything good, but in principle should be reasonably good, I suppose.

Cheers.

Floob
Site Admin
Posts: 182
Joined: Mon Feb 09, 2015 8:27 pm

Re: How do I get the arcade bezels in Retropie 4.0?

Post by Floob » Tue Oct 04, 2016 6:21 pm

You can layer overlays, but I wouldnt recommend it:
https://github.com/libretro/RetroArch/w ... figuration

I think you may be better checking out davej posts about his crt shader for the Pi as he has made many recommendations about improving its speed.
https://retropie.org.uk/forum/search?te ... itlesposts

I tend to use the patl overlays for consoles, and for arcade I use a basic scanline overlay that fills the screen.
One day I'll get around to converting a lot more bezels.

pjft
Posts: 7
Joined: Mon Oct 03, 2016 10:58 am

Re: How do I get the arcade bezels in Retropie 4.0?

Post by pjft » Tue Oct 04, 2016 10:28 pm

Thanks - sounds great!

Just to confirm, these worked well, and the performance is good. We just need to commend out the video_shader settings on the individual cfg files, otherwise it'll still apply the shader on top of this, in case you want to try.

Cheers, thanks.

Post Reply