It works in emulation station but not attract mode.
Here is my Atari7800.cfg file:
# Generated by Attract-Mode v2.1.0
#
executable /opt/retropie/supplementary/runcommand/runcommand.sh
args 0_SYS_atari7800 "[romfilename]"
rompath /home/pi/RetroPie/roms/atari7800
romext .a78
system Atari7800
info_source thegamesdb.net
artwork flyer /home/pi/Retropie/roms/atari7800/boxart
artwork marquee /home/pi/RetroPie/roms/atari7800/marguee
artwork snap /home/pi/RetroPie/roms/atari7800/snap
artwork wheel /home/pi/RetroPie/roms/atari7800/wheel