Set up controller schemes:
sudo chown pi /opt/retropie/configs/all/retroarch.cfg
cd /opt/retropie/emulators/RetroArch/installdir/bin
sudo ./retroarch-joyconfig -j 0 >> /opt/retropie/configs/all/retroarch.cfg
Add to controller scheme:
input_enable_hotkey_btn = “6”
input_exit_emulator_btn = “7”
input_enable_hotkey_btn = “6”
input_save_state_btn = “4”
input_enable_hotkey_btn = “6”
input_load_state_btn = “5”
Obviously your buttons will be different. For my config, these buttons allow me to quit out with START + Select, and save state with START + R1, load state with START + L1