From 61226d15d9fc97e471fbc4cb63e147097335a8b2 Mon Sep 17 00:00:00 2001 From: Matt Switlik Date: Sun, 14 Nov 2021 20:51:44 -0500 Subject: [PATCH 1/2] Updated TV state codes for zero 1. Not sure when they changed. --- detect.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/detect.sh b/detect.sh index a2fbfcc..619a9ee 100755 --- a/detect.sh +++ b/detect.sh @@ -6,34 +6,22 @@ HDMIDISABLE="/home/pi/gpihdmiout/disable.sh -y" # Run the tvservice command and store the output for parsing. TVSTATUS=$(tvservice -s) +# Kernel v5.10.63+ # Patched: # state 0x400000 [LCD], 320x240 @ 0.00Hz, progressive # Unpatched, no HDMI at boot: -# RPi Zero 1 -# state 0x40001 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced -# RPi Zero 2 -# state 0x40000 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced -# Unpatched, no HDMI at boot, then HDMI inserted -# RPi Zero 1 -# state 0x40002 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced -# RPi Zero 2 # state 0x40000 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced # Unpatched, HDMI at boot: -# RPi Zero 1 -# state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive -# RPi Zero 2 # state 0xa [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive +# state 0xa [HDMI DMT (85) RGB full 16:9], 1280x720 @ 60.00Hz, progressive # Unpatched, HDMI at boot, then HDMI removed: -# RPi Zero 1 -# state 0x120009 [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive -# RPi Zero 2 # state 0x9 [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive # Parse the tvservice command output to get just the TV state code. TVCODE=$(echo $TVSTATUS | cut -c7-14) if [ $TVCODE == "0x400000" ]; then echo "GPi CASE LCD Enabled. Continue booting." -elif [ $TVCODE == "0x40000" ] || [ $TVCODE == "0x40001" ]; then +elif [ $TVCODE == "0x40000" ] then echo "No HDMI connected. Enable GPi CASE LCD, and reboot." $HDMIDISABLE reboot From e539e69531f07340a7bfa3f4cb70ef4eb4e07268 Mon Sep 17 00:00:00 2001 From: "Matthew G. Switlik" Date: Mon, 15 Nov 2021 10:04:19 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4d6941..dac9ca0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,11 @@ ## Setup -Clone the scripts into /home/pi +Download and install the GPiCASE patch from https://support.retroflag.com/ + +Enabling HDMI overwrites /boot/config.txt with /boot/GPi_Case_patch/original_files/config.txt. Disabling HDMI overwrites /boot/config.txt with /boot/GPi_Case_patch/patch_files/config.txt. Make any needed changes to /boot/config.txt and /boot/GPi_Case_patch/patch_files/config.txt or /boot/GPi_Case_patch/original_files/config.txt like overclocking or audio fixes for RPiZ2. + +Clone the HDMI output scripts into /home/pi ``` $ cd /home/pi $ git clone https://github.com/SWiT/gpihdmiout.git