# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# disable Rpi rainbow splash
disable_splash=1

# ignore EDID as we dont have one
hdmi_ignore_edid=0xa5000080

# use full spectrum RGB over HDMI
hdmi_pixel_encoding=2

# not sure if this should be 1 or 0 on Pi4 # it may have no effect
disable_overscan=1

# use the following to adjust edge of screen overscan
# will be broken on Pi4 if you set console size in cmdline.txt - so don't
#overscan_left=16
#overscan_right=36

# force hdmi output
hdmi_force_hotplug=1

# force a specific HDMI mode
# only use 1 of these 3 options
# deviating from these options can have unintended effects
# 1920x240p@60
#hdmi_timings=1920 1 52 208 260 240 1 6 10 6 0 0 0 60 0 38400000 1
hdmi_timings=1920 1 52 208 260 240 1 6 10 6 0 0 4 60 0 38400000 1

# 480i won't work right on the newest Pi4s
# 960x480i
#hdmi_timings=1920 1 48 192 240 480 1 6 3 16 0 0 2 60 1 37560000 1

# 640x480p@60 (high res)
#hdmi_timings=640 1 56 66 70 480 1 6 9 30 0 0 0 60 0 26208000 1

# DO NOT USE GROUP 1! - You have been warned
hdmi_group=2
# custom timings mode - only use this mode
hdmi_mode=87
## 2nd monitor - experimental
#hdmi_group:1=2
#hdmi_mode:1=87

[pi3]
#hdmi_group=1
#hdmi_mode=6
##default FIFJ keys; coin = c, 1pStart = 1, 2pStart = 2, arrows = movement, space = jump, left shift = fix
## check /usr/include/linux/input-event-codes.h for keycodes
dtoverlay=gpio-key,gpio=3,keycode=2,label="KEY_1"
dtoverlay=gpio-key,gpio=4,keycode=3,label="KEY_2"
##dtoverlay=gpio-key,gpio=2,keycode=6,label="KEY_5"
dtoverlay=gpio-key,gpio=2,keycode=46,label="KEY_C"
dtoverlay=gpio-key,gpio=17,keycode=103,label="KEY_UP"
dtoverlay=gpio-key,gpio=22,keycode=108,label="KEY_DOWN"
dtoverlay=gpio-key,gpio=9,keycode=105,label="KEY_LEFT"
dtoverlay=gpio-key,gpio=7,keycode=106,label="KEY_RIGHT"
dtoverlay=gpio-key,gpio=23,keycode=42,label="KEY_SHIFTLEFT"
dtoverlay=gpio-key,gpio=25,keycode=57,label="KEY_SPACE"
[all]

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
config_hdmi_boost=4

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

## pi4 overclocking - experimental - make sure your Pi4 firmware is up to date & you will want a heatsink
## big OC
#over_voltage=6
#arm_freq=2100
#gpu_freq=600

## small OC
#over_voltage=2
#arm_freq=1750

[all]
#dtoverlay=vc4-fkms-v3d
gpu_mem=256

