The programmatic control "API" for mame is very much lua at that point. It's nowhere near complete, but we welcome complements. So, for remote control, I guess the best would be to grab a lua module that provides whatever method you like best, require it from a lua script, and have fun. OG.