https://gameroomsolutions.com/setup-daphne-raspberry-pi-3-retropie/This is the page I used to help me set up Daphne on my pi. The controller file at the end didn't work for me so I changed mine to get it to work with my controller with the buttons where I wanted them.
The .command file will look different depending on the game you are adding to your pi. It will reflect the command line data (screen size, dip switches, etc...) that would be sent to daphne to run the game. I can share to setup I used for mine if you need it.