I have experience booting a pi2 and exiting emulators using a push button. The code I link to below could easily be adapted to shutdown the system as well. A toggle isn’t necessary, just a momentary push button is all that’s required.
All you need is a push button connected to gpio3. You may have problems shutting down your emulators if you use a script running shutdown -h now all by itself. I suggest for you to check out THIS post.
That piece of code shuts down the emulators gracefully so you don’t lose hi scores and it properly saves SRM’s
You could add the following code to the code in the link detailed above
sleep(10)
os.system('shutdown -h now')
Insert that code right after
device.emit(uinput.KEY_ESC,0)
In config.txt under /boot , add the line
avoid_safe_mode=1
That button will then boot up your pi and shut down your system and emulators gracefully.