Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MAME spinner games: Does mame emulate quadrature decoding?  (Read 3052 times)

0 Members and 1 Guest are viewing this topic.

huygens

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:October 31, 2011, 01:33:08 am
MAME spinner games: Does mame emulate quadrature decoding?
« on: September 20, 2008, 03:14:25 pm »
I was wondering how much of the control hardware is emulated by MAME. All the spinner games use some form of quadrature decoding to convert the quadrature signal to a counter at 1x, 2x, or 4x the physical spinner resolution. Does mame emulate the decoding circuitry, or does it translate the mouse/spinner data to counter data directly.

If a game uses a 72 gap encoder wheel and has a 4x quadrature decoder should I set the analog sensitivity based on  a 72 gap spinner or a 72*4 gap spinner?

 

Ummon

  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5244
  • Last login:June 09, 2010, 06:37:18 pm
Re: MAME spinner games: Does mame emulate quadrature decoding?
« Reply #1 on: September 21, 2008, 03:31:13 pm »
I'm surprised u_rebelscum hasn't replied yet. I think this has come up before though I don't remember the details. I'd think at MameWorld, someone would know right off.
Yo. Chocolate.


"Theoretical physics has been the most successful and cost-effective in all of science."

Stephen Hawking


People often confuse expressed observations with complaint, ridicule, or - even worse - self-pity.

ahofle

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4544
  • Last login:August 30, 2023, 05:10:22 pm
    • Arcade Ambience Project
Re: MAME spinner games: Does mame emulate quadrature decoding?
« Reply #2 on: September 22, 2008, 04:28:13 pm »
I'm pretty sure MAME does not emulate the quadrature decoding, but I'm sure u_rebel will confirm.  Even if it did, you would get jumpy movement similar to cranking up the resolution too high on a low res spinner.  This is why you need a really high resolution spinner for games like Arkanoid.  In your example, I believe you would have to set the sensitivity at 72*4.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME spinner games: Does mame emulate quadrature decoding?
« Reply #3 on: September 22, 2008, 04:41:30 pm »
Your mouse, opti-pac, or whatever other encoder you use does the quadrature encoding.  This value is what MAME sees.  MAME then has the ability to decrease or increase this value by a percentage IIRC.

I have a project on my list to make an encoder where you can turn off the encoding so that it reports at 1x.  The problem with the super high res encoders is that it can almost report too much information for games that only used 1x and had a small tooth count.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: MAME spinner games: Does mame emulate quadrature decoding?
« Reply #4 on: September 22, 2008, 07:32:26 pm »
Heh, I'm late, and this has been mostly answered, again.  I'll put my two cents anyway.

Mame is designed to accept normal inputs: keyboard, mouse, joystick (and lightgun which is like a mouse, but not exactly ;)).  PC mice already do the decoding, so there is no need for mame to do quadrature decoding, or more precisely, unconverting mouse count to faked quadrature signals, and then decode back to a count through emulation.  Add that until "recently" there was no way to send the raw quadrature signals to the PC, and then mame to see it and emulate the hardware that decoded it, in real time without lag and/or missed changes (any even now it's not normal).

So the way mame "handles" different tooth counts and 1x, 2x & 4x decoders is the analog mouse sensitivity setting, input definitions (part is setting the defaults for aforementioned sensitivity), and (very rarely) hardcoded special input hacks.

There are a few threads at this site about tooth count and decoding state levels.  But, yah, inputs is one of mame's "weakest" AFA true complete hardware emulation, but almost completely due to PC limits & standards.
Robin
Knowledge is Power

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re: MAME spinner games: Does mame emulate quadrature decoding?
« Reply #5 on: September 22, 2008, 08:01:20 pm »
I wouldn't call it MAME's fault.  It is getting quadrature data.  The various manufactures could easily send 1x or 2x data or even switch between them, but they don't.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: MAME spinner games: Does mame emulate quadrature decoding?
« Reply #6 on: September 23, 2008, 02:57:09 pm »
I wouldn't call it MAME's fault.  It is getting quadrature data.  The various manufactures could easily send 1x or 2x data or even switch between them, but they don't.

Mame is not getting quadrature data, so of course it's not mame's fault. 

The mouse converts (decodes) it to counts (numbers increased or decreased per axis).  There was one (AKAIK) port protocol, busmouse, that didn't have the mouse decode the quadrature signal, but even so their was a hardware decoder between the CPU and the mouse.  All other protocols (serial, PS/2, apple's ADB, & USB) have the decoder inside the mouse, and do not transmit quadrature signals to the PC.

It's true that the manufacturers could have their decoders decode at 1x, 2x or 4x, but that's outside of mame's realm, as it would take reprogramming the decoder in the mouse (sort of like keyWiz/ipac remapping).
Robin
Knowledge is Power