People have used optical rotarys with MAME to play the mechanical rotary games. They work pretty well, but don't have the distinct click/feel that the mechanicals do, which bothers some people, including myself.
Folks have also used them as a spinner, or even a steering wheel. Reports say it works OK, but not as good as the real thing, as they have no weight, and won't keep spinning. Personally, I'd only use 'em as a spinner on Arkanoid and Pong type games.