<b>Install Raspberry Pi OS using Raspberry Pi Imager</b>
-Dowlonad Raspberry Pi Imager from link on the right, then install.
-Launch Pi Imager, Select OS, Emulation & Game OS, Retropi, Select Latest Version.
-Insert SD Card Into PC, Select Storage
-Click Write.
<b>Insert SD Card into you Raspberry Pi and boot right into Retropi.</b>
In order to have a 1:1 ratio on the screen we have to set our resolution in /boot/config.txt.
To edit, exit emulationstation (Select > Quit > Quit EmulationStation), then type sudo nano <b>/boot/config.txt.</b>
Or edit use card reader and edit <b>config.txt</b> from boot partition (Editable In Windows).
Remove the<b> #</b> before <b>hdmi_force_hotplug=1</b>.
Remove the<b> #</b> before <b>hdmi_group</b> and set it to <b>2</b>.
Remove the <b>#</b> before <b>hdmi_mode</b> and set it to <b>87</b>. This is the custom HDMI mode, so now we have to set a custom resolution and refresh rate:
Add <b>hdmi_cvt=1024 600 60</b> (or set it to your resolution and refresh rate). - Example 1024px x 600px @ 60Hz
<b>Reboot</b>.
<div>
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=1027 600 60
</div>
<b>Credits:</b> Thanks <a href= "https://pixel.red/guide/retropie-custom-resolution/" target="_blank">https://pixel.red/guide/retropie-custom-resolution/</a>