I'd like to run a few dozen of automated tests on the driver I'm working on, and lua looks useful for this. Ideally, the tests should check screen contents while they are running, but I can get by without that -- i.e. stuff some keyboard input, wait a while, stuff more input, capture a screenshot, repeat.
How can I manipulate dip switches, though? "for k,v in pairs(manager:machine():ioport().ports) do print (k) end" enumerates them, but "print (manager:machine():ioport().ports[':SA1'].fields[':'])" fails with:
attempt to index a userdata value (field ':SA1')