summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorGravatarGravatar hap <happppp@users.noreply.github.com>2019-03-24 23:30:02 +0100
committerGravatarGravatar hap <happppp@users.noreply.github.com>2019-03-24 23:30:02 +0100
commitcdde287597f73b77606642f95af657f5e832182c (patch) (github)
tree8428f3a3bad0f69fb122a8cb5e14a09138fd2b7b /docs
parent465f5d42aa107f2b3aa7bab673a602abbd54e15a (diff)
downloadmame-cdde287597f73b77606642f95af657f5e832182c.tar.bz2
mame-cdde287597f73b77606642f95af657f5e832182c.zip
layout doc: correction and add inputraw (this one actually does work the way inputmask was documented before) (nw)
Diffstat (limited to 'docs')
-rw-r--r--docs/source/techspecs/layout_files.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/source/techspecs/layout_files.rst b/docs/source/techspecs/layout_files.rst
index b12ad931df4..cc85a923caa 100644
--- a/docs/source/techspecs/layout_files.rst
+++ b/docs/source/techspecs/layout_files.rst
@@ -768,12 +768,15 @@ how digital displays may be connected to emulated outputs::
If an element instantiating a layout element has ``inputtag`` and ``inputmask``
attributes but lacks a ``name`` attribute, it will take its state from the value
-of the corresponding I/O port, masked with the ``inputmask`` value, and shifted
-to the right so that the least significant one bit of the mask aligns with the
-least significant bit of the value (for example a mask of 0x05 will result in no
-shift, while a mask of 0xb0 will result in the value being shifted four bits to
-the right). This is often used to allow clickable buttons and toggle switches
-to provide visible feedback.
+of the corresponding I/O port, masked with the ``inputmask`` value and XORed
+with the I/O port default field value. The latter is useful for inputs that are
+active-low. If the result is non-zero, the state is 1, otherwise it's 0. This
+is often used to allow clickable buttons and toggle switches to provide visible
+feedback. By using ``inputraw="1"``, it's possible to obtain the raw data from
+the I/O port, masked with the ``inputmask`` and shifted to the right so that the
+least significant one bit of the mask aligns with the least significant bit of
+the value (for example a mask of 0x05 will result in no shift, while a mask of
+0xb0 will result in the value being shifted four bits to the right).
When handling mouse input, MAME treats all layout elements as being rectangular,
and only activates the frontmost element whose area includes the location of the