Hm, are you sure about that?
I believed that the Ultimarc interface converted the 12-position rotary switch output to keyboard signals ( [ , ] , \ , / ).
I'm not, I'm assuming poster does not have LS-30 "12-position rotary" joystick because they are typically referred to as "mechanical" and poster said he thinks his one is "optical". One photo would solve that mystery.
There are basically two types of rotary joysticks, those that use "quadrature encoding" (encoder itself can be mechanical or optical):
PC interface/adapter for these joystick converts "quadrature encoding" signal to standard PC mouse serial data, that's what I'm talking about.
And then there is "12-position rotary switch" you are talking about, it's unique and non-standard:
I'm not sure how it works but obviously there is nothing like it on a PC, as there is for "quadrature encoding" which is how mice work, spinners and trackballs too, so that explains why Ultimarc's interface converts "12-position" signal into keystrokes. I think it could just the same convert it to PC mouse signal, not sure which would be more authentic and don't think there would be any difference for MAME, except that mouse signal could be more suitable for other games that do use "quadrature encoding" type of rotary joystick.
It seem to me "12-position" rotary joystick with that interface would only let you play properly those games that originally use it, while with "quadrature encoding" rotary joystick you could play either type of rotary games just as good and without any loss of precision. I'd try it out to confirm, but I'm feeling lazy and I am pretty sure that's how it is.
I do have rotary joystick I made for 'Caliber .50' PCB. I never bothered to play any games in MAME with it, but I do know when connected to a PC via adapter it moves my mouse pointer left-right and so I know I could map that movement to whatever games and whatever their inputs are, digital or analog just the same. For example I could play Arkanoid in MAME with it and other spinner games, but i could also play Galaga if I map rotation to left and right, then I'd move by rotating the stick instead of moving it left or right. Never tried any of it though, this just occurred to me _after I wrote it, funny thing.
You could make one yourself in about few hours, and you probably already have all the parts necessary:
http://www.trimoor.com/rotary_joystick/