recently I completed my second build featuring a DPI screen (https://www.sudomod.com/forum/viewtopic.php?f=43&t=4745) and designed a couple of useful piece of software I'm gonna share with you (not everyone agree upon this opensource policy but... anyway... ).
This guide explains how to mirror the content of the gbz display (composite, SPI, DPI) to the HDMI output (and viceversa), as shown in the picture below and in the famous closed-source unreleased Sword project. Since this solution automatically detects when the HDMI cable is connected in order to turn mirroring and power on and off it's even better and more sophisticated than Sword's one)
So the first part of the process consists of cloning this repo I slighted modified in the RPi home and build it following the README instructions:
Execuing cloner.bin with default parameters you should be able to see the main screen cloned to the HDMI output, if this is not the case or you have a different screen configuration you may want to specify other values for srcScreen and dstScreen from command line.
Once you successfully mirrored your screen to HDMI from command line you can download this automatic HDMI cloner script, edit accordingly to your configuration, and enjoy the power of HOT-PLUG / PLUG-AND-PLAY HDMI mirroring!
Remember that cloner.bin must be located at /home/pi/gertCloner/cloner.bin!
HDMI_switcher: https://github.com/vascofazza/Retropie- ... witcher.sh
Third, you can include the script in your rc.local or cron listing and let the hdmi_switcher.sh script run at boot!
Happy mirroring everyone!