In my opinion raspbian detects hdmi or sdtv if hdmi_force_hotplug=0
is set. runcommand.sh checks with tvservice --status
if sdtv or hdmi is set.
https://github.com/retropie/RetroPie-Setup/blob/master/supplementary/runcommand.sh
runcommand.sh
does something like this:
starttype/parameter 1 – if hdmi change resolution to CAE 1 (VGA), otherwise (SDTV) do nothing.
It is possible to add other CAE modes/resolutions. You can get a list of all supported modes withtvservice -m CAE
.