mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Attract mode not supporting resolution set in config.txt #667

Closed SKYNET2023 closed 3 years ago

SKYNET2023 commented 3 years ago

I am running a pi 4 in an arcade cabinet with a CRT Monitor which requires the 800x600 60Hz 4:3 Resolution (hdmi_group=2, mode 9) in the pi's config.txt file.

The command line, Emulation Station and multiple emulators support this video mode without issue. However, Attract Mode shows video in a very distorted and scrambled manor, almost as if sync was not working correctly.

I believe this issue is specific to the pi 4 because I was previously using those same settings in Attract Mode on a pi 3B+ build for years without issue.

Please help me finish my pi 4 upgrade!

oomek commented 3 years ago

On PI4 Attract Mode by default will open in maximum resolution reported by the display. Please refer to SFML-PI readme to see how to override the resolution and refresh rate using environmental variables https://github.com/mickelson/sfml-pi/blob/aeefcd461348cf344afbc2a89f170116ee854744/readme.md

multigamesystem commented 3 years ago

On PI4 Attract Mode by default will open in maximum resolution reported by the display. Please refer to SFML-PI readme to see how to override the resolution and refresh rate using environmental variables https://github.com/mickelson/sfml-pi/blob/aeefcd461348cf344afbc2a89f170116ee854744/readme.md

Why not build resolution options into Attract Mode? I've also found this to be quite annoying trying to run Attract Mode with a display that natively runs at 1024 x 768 but reports up to 1080p.

When I start games in Emulation Station the aspect ratio is correct but starting those same games in Attract Mode causes them to be squashed because of Attract Modes resolution override.

oomek commented 3 years ago

Resolution selection will come eventually. For the time being your option is to set the env var.

SKYNET2023 commented 3 years ago

I read the article you shared, thank you for that! However, I am still unsure exactly how to set the environmental variables. I noticed that the readme had the four "SFML_DRM..." commands which can be used to set the device, video mode, refresh rate etc. but what file do I open to add that in? Also, can you give me an example of a full command? For example, if I want to set a video mode, what else do I need to add to "SFML_DRM_MODE"?

oomek commented 3 years ago

Type in the console: SFML_DRM_MODE=800x600 SFML_DRM_REFRESH=60 attract or: export SFML_DRM_MODE=800x600 export SFML_DRM_REFRESH=60 then launch attract to make it remember until console session is active.

SKYNET2023 commented 3 years ago

It worked! Thanks so much.