diff options
Diffstat (limited to 'docs/source')
-rw-r--r-- | docs/source/commandline/commandline-all.rst | 2 | ||||
-rw-r--r-- | docs/source/images/MAMElogo.svg | 71 | ||||
-rw-r--r-- | docs/source/techspecs/layout_files.rst | 452 | ||||
-rw-r--r-- | docs/source/usingmame/defaultkeys.rst | 835 | ||||
-rw-r--r-- | docs/source/usingmame/images/mahjongpanel.svg | 215 |
5 files changed, 1319 insertions, 256 deletions
diff --git a/docs/source/commandline/commandline-all.rst b/docs/source/commandline/commandline-all.rst index ebae1a6719f..f05c5b6b479 100644 --- a/docs/source/commandline/commandline-all.rst +++ b/docs/source/commandline/commandline-all.rst @@ -2186,8 +2186,6 @@ Core Video Options mame64 mk -syncrefresh -.. Tip:: **-syncrefresh** can be helpful for G-Sync or FreeSync display users. - **-prescale** *<amount>* Controls the size of the screen images when they are passed off to the diff --git a/docs/source/images/MAMElogo.svg b/docs/source/images/MAMElogo.svg index b45bc7ebdb3..01d860d18e7 100644 --- a/docs/source/images/MAMElogo.svg +++ b/docs/source/images/MAMElogo.svg @@ -1,68 +1,25 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - id="svg4563" + id="svg-mamelogo" version="1.1" - viewBox="0 0 321.26581 91.07238" - height="91.07238mm" - width="321.26581mm"> - <defs - id="defs4557"> - <linearGradient - id="left-dark"> - <stop - style="stop-color:#00274f;stop-opacity:1" - offset="0" - id="stop5213" /> - <stop - style="stop-color:#68cafb;stop-opacity:1" - offset="1" - id="stop5215" /> + viewBox="0 0 1214 344" + height="344px" + width="1214px"> + <defs> + <linearGradient id="left-dark" x1="0" x2="1" y1="0" y2="0"> + <stop id="stop5213" offset="0" stop-color="#00274f" /> + <stop id="stop5215" offset="1" stop-color="#68cafb" /> </linearGradient> - <linearGradient - gradientUnits="userSpaceOnUse" - y2="299.328" - x2="11" - y1="299.328" - x1="1213.16" - id="right-dark"> - <stop - id="stop4" - stop-color="#68cafb" - offset="0" /> - <stop - id="stop6" - stop-color="#00274f" - offset="1" /> + <linearGradient id="right-dark" x1="0" x2="1" y1="0" y2="0"> + <stop id="stop4" offset="0" stop-color="#68cafb" /> + <stop id="stop6" offset="1" stop-color="#00274f" /> </linearGradient> - <linearGradient - gradientUnits="userSpaceOnUse" - y2="162.44048" - x2="237.65611" - y1="162.44048" - x1="-80.41803" - id="linearGradient5175" - xlink:href="#right-dark" /> - <linearGradient - gradientUnits="userSpaceOnUse" - y2="162.44048" - x2="237.65611" - y1="162.44048" - x1="-80.41803" - id="linearGradient5211" - xlink:href="#left-dark" /> </defs> - <g - transform="translate(82.012688,-116.4355)" - id="layer1"> + <g> <path - style="fill:url(#linearGradient5175);fill-rule:evenodd;stroke:url(#linearGradient5211);stroke-width:1.32291663px;stroke-linejoin:miter;stroke-opacity:0.75" - d="m -80.418029,184.88601 66.4546,-66.5869 v 28.92769 l 29.05998,-28.92769 v 46.56667 l 46.74315,-46.83125 v 52.51979 l 52.519789,-52.51979 v 29.19227 l 29.01579,-28.92769 v 44.6704 l 43.56815,-43.65625 h 50.71269 l -16.36184,16.36025 h -25.83921 l -7.40833,7.40833 h 13.44877 l -17.02064,17.24184 h -13.80332 l -7.67291,7.54062 h 44.93418 l -17.15293,17.02171 h -68.74748 l 4.14496,-4.54211 V 161.91118 L 101.6153,186.07663 V 158.0308 L 74.715911,184.88601 H 44.421121 V 162.17576 L -0.24927857,206.84642 H -26.707609 L -2.1013586,182.1518 V 162.17576 L -26.707609,186.6058 v -29.10417 l -27.25209,27.38438 z" - class="cls-1" /> + fill="url(#right-dark)" stroke="url(#left-dark)" stroke-width="5" stroke-linejoin="miter" stroke-opacity="0.75" + d="M 6,259 257,7 V 116 L 367,7 V 183 L 544,6 V 204 L 742,7 V 116 L 852,7 V 176 L 1017,11 H 1208 L 1146,73 H 1049 L 1021,101 H 1072 L 1007,166 H 955 L 926,195 H 1096 L 1031,259 H 771 L 787,241 V 172 L 694,263 V 157 L 592,259 H 478 V 172 L 309,341 H 209 L 302,248 V 172 L 209,263 V 157 L 106,259 z" /> </g> </svg> diff --git a/docs/source/techspecs/layout_files.rst b/docs/source/techspecs/layout_files.rst index 4d7f9f5d712..9ebb5863de5 100644 --- a/docs/source/techspecs/layout_files.rst +++ b/docs/source/techspecs/layout_files.rst @@ -64,7 +64,7 @@ in the rightward and downward directions. The origin (0,0) has no particular significance, and you may freely use negative coordinates in layouts. Coordinates are supplied as floating-point numbers. -MAME assumes that view coordinates have the same aspect ratio as pixel on the +MAME assumes that view coordinates have the same aspect ratio as pixels on the output device (host screen or window). Assuming square pixels and no rotation, this means equal distances in X and Y axes correspond to equal horizontal and vertical distances in the rendered output. @@ -73,20 +73,30 @@ Views, groups and elements all have their own internal coordinate systems. When an element or group is referenced from a view or another group, its coordinates are scaled as necessary to fit the specified bounds. -Objects are positioned and sized using ``bounds`` elements. A bounds element -may specify the position of the top left corner and the size using ``x``, ``y``, -``width`` and ``height`` attributes, or it may specify the coordinates of the -edges with the ``left``, ``top``, ``right`` and ``bottom`` attributes. These -two ``bounds`` elements are equivalent:: +Objects are positioned and sized using ``bounds`` elements. The horizontal +position and size may be specified in three ways: left edge and width using +``x`` and ``width`` attributes, horizontal centre and width using ``xc`` and +``width`` attributes, or left and right edges using ``left`` and ``right`` +attributes. Similarly, the vertical position and size may be specified in terms +of the top edge and height using ``y`` and ``height`` attributes, vertical +centre and height using ``yc`` and ``height`` attributes, or top and bottom +edges using ``top`` and ``bottom`` attributes. - <bounds x="455" y="120" width="11" height="7" /> - <bounds left="455" top="120" right="466" bottom="127" /> +These three ``bounds`` elements are equivalent:: -Either the ``x`` or ``left`` attribute must be present to distinguish between -the two schemes. The ``width`` and ``height`` or ``right`` and ``bottom`` -default to 1.0 if not supplied. It is an error if ``width`` or ``height`` are -negative, if ``right`` is less than ``left``, or if ``bottom`` is less than -``top``. + <bounds x="455" y="120" width="12" height="8" /> + <bounds xc="461" yc="124" width="12" height="8" /> + <bounds left="455" top="120" right="467" bottom="128" /> + +It’s possible to use different schemes in the horizontal and vertical +directions. For example, these equivalent ``bounds`` elements are also valid:: + + <bounds x="455" top="120" width="12" bottom="128" /> + <bounds left="455" yc="124" right="467" height="8" /> + +The ``width``/``height`` or ``right``/``bottom`` default to 1.0 if not supplied. +It is an error if ``width`` or ``height`` are negative, if ``right`` is less +than ``left``, or if ``bottom`` is less than ``top``. .. _layout-concepts-colours: @@ -376,12 +386,12 @@ and rendering. An element may be used in multiple views, and may be used multiple times within a view. An element’s appearance depends on its *state*. The state is an integer which -usually comes from an I/O port field or an emulated output (see the discussion -of :ref:`layout-parts-views` for information on connecting an element to an I/O -port or output). Any component of an element may be restricted to only drawing -when the element’s state is a particular value. Some components (e.g. -multi-segment displays and reels) use the state directly to determine their -appearance. +usually comes from an I/O port field or an emulated output (see +:ref:`layout-interact-elemstate` for information on connecting an element to an +emulated I/O port or output). Any component of an element may be restricted to +only drawing when the element’s state is a particular value. Some components +(e.g. multi-segment displays and reels) use the state directly to determine +their appearance. Each element has its own internal coordinate system. The bounds of the element’s coordinate system are computed as the union of the bounds of the @@ -395,22 +405,63 @@ attribute, to be used if not connected to an emulated output or I/O port. If present, the ``defstate`` attribute must be a non-negative integer. Child elements of the ``element`` element instantiate components, which are -drawn in reading order from first to last (components draw on top of components -that come before them). All components support a few common features: - -* Each component may have a ``state`` attribute. If present, the component will - only be drawn when the element’s state matches its value (if absent, the - component will always be drawn). If present, the ``state`` attribute must be - a non-negative integer. +drawn into the element texture in reading order from first to last using alpha +blending (components draw over and may obscure components that come before +them). All components support a few common features: + +* Components may be conditionally drawn depending on the element’s state by + supplying ``state`` and/or ``statemask`` attributes. If present, these + attributes must be non-negative integers. If only the ``state`` attribute is + present, the component will only be drawn when the element’s state matches its + value. If only the ``statemask`` attribute is present, the component will + only be drawn when all the bits that are set in its value are set in the + element’s state. + + If both the ``state`` and ``statemask`` attributes are present, the component + will only be drawn when the bits in the element’s state corresponding to the + bits that are set in the ``statemask`` attribute’s value match the value of the + corresponding bits in the ``state`` attribute’s value. + + (The component will always be drawn if neither ``state`` nor ``statemask`` + attributes are present, or if the ``statemask`` attribute’s value is zero.) * Each component may have a ``bounds`` child element specifying its position and size (see :ref:`layout-concepts-coordinates`). If no such element is present, the bounds default to a unit square (width and height of 1.0) with the top left corner at (0,0). + + A component’s position and/or size may be animated according to the element’s + state by supplying multiple ``bounds`` child elements with ``state`` + attributes. The ``state`` attribute of each ``bounds`` child element must be + a non-negative integer. The ``state`` attributes must not be equal for any + two ``bounds`` elements within a component. + + If the element’s state is lower than the ``state`` value of any ``bounds`` + child element, the position/size specified by the ``bounds`` child element + with the lowest ``state`` value will be used. If the element’s state is + higher than the ``state`` value of any ``bounds`` child element, the + position/size specified by the ``bounds`` child element with the highest + ``state`` value will be used. If the element’s state is between the ``state`` + values of two ``bounds`` child elements, the position/size will be + interpolated linearly. * Each component may have a ``color`` child element specifying an RGBA colour (see :ref:`layout-concepts-colours` for details). This can be used to control - the colour of geometric, algorithmically drawn, or textual components. It is - ignored for ``image`` components. If no such element is present, the colour - defaults to opaque white. + the colour of geometric, algorithmically drawn, or textual components. For + ``image`` components, the colour of the image pixels is multiplied by the + specified colour. If no such element is present, the colour defaults to + opaque white. + + A component’s color may be animated according to the element’s state by + supplying multiple ``color`` child elements with ``state`` attributes. The + ``state`` attributes must not be equal for any two ``color`` elements within a + component. + + If the element’s state is lower than the ``state`` value of any ``color`` + child element, the colour specified by the ``color`` child element with the + lowest ``state`` value will be used. If the element’s state is higher than + the ``state`` value of any ``color`` child element, the colour specified by + the ``color`` child element with the highest ``state`` value will be used. If + the element’s state is between the ``state`` values of two ``color`` child + elements, the RGBA colour components will be interpolated linearly. The following components are supported: @@ -419,18 +470,25 @@ rect disk Draws a uniform colour ellipse fitted to its bounds. image - Draws an image loaded from a PNG or JPEG file. The name of the file to load - (including the file name extension) is supplied with the required ``file`` - attribute. Additionally, an optional ``alphafile`` attribute may be used to - specify the name of a PNG file (including the file name extension) to load - into the alpha channel of the image. The image file(s) should be placed in - the same directory/archive as the layout file. If the ``alphafile`` - attribute refers refers to a file, it must have the same dimensions as the - file referred to by the ``file`` attribute, and must have a bit depth no - greater than eight bits per channel per pixel. The intensity from this - image (brightness) is copied to the alpha channel, with full intensity (white - in a greyscale image) corresponding to fully opaque, and black corresponding - to fully transparent. + Draws an image loaded from a PNG, JPEG, Windows DIB (BMP) or SVG file. The + name of the file to load (including the file name extension) is supplied + using the required ``file`` attribute. Additionally, an optional + ``alphafile`` attribute may be used to specify the name of a PNG file + (including the file name extension) to load into the alpha channel of the + image. + + If the ``alphafile`` attribute refers refers to a file, it must have the + same dimensions (in pixels) as the file referred to by the ``file`` + attribute, and must have a bit depth no greater than eight bits per channel + per pixel. The intensity from this image (brightness) is copied to the + alpha channel, with full intensity (white in a greyscale image) + corresponding to fully opaque, and black corresponding to fully transparent. + The ``alphafile`` attribute will be ignored if the ``file`` attribute refers + to an SVG image; it is only used in conjunction with bitmap images. + + The image file(s) should be placed in the same directory/archive as the + layout file. Image file formats are detected by examining the content of + the files, file name extensions are ignored. text Draws text in using the UI font in the specified colour. The text to draw must be supplied using a ``string`` attribute. An ``align`` attribute may @@ -523,7 +581,6 @@ An example element that draws a static left-aligned text string:: <text string="CPU" align="1"><color red="1.0" green="1.0" blue="1.0" /></text> </element> - An example element that displays a circular LED where the intensity depends on the state of an active-high output:: @@ -543,6 +600,51 @@ An example element for a button that gives visual feedback when clicked:: <text string="RESET"><bounds x="0.1" y="0.4" width="0.8" height="0.2" /><color red="1.0" green="1.0" blue="1.0" /></text> </element> +An example of an element that draws a seven-segment LED display using external +segment images:: + + <element name="digit_a" defstate="0"> + <image file="a_off.png" /> + <image file="a_a.png" statemask="0x01" /> + <image file="a_b.png" statemask="0x02" /> + <image file="a_c.png" statemask="0x04" /> + <image file="a_d.png" statemask="0x08" /> + <image file="a_e.png" statemask="0x10" /> + <image file="a_f.png" statemask="0x20" /> + <image file="a_g.png" statemask="0x40" /> + <image file="a_dp.png" statemask="0x80" /> + </element> + +An example of a bar graph that grows vertically and changes colour from green, +through yellow, to red as the state increases:: + + <element name="pedal"> + <rect> + <bounds state="0x000" left="0.0" top="0.9" right="1.0" bottom="1.0" /> + <bounds state="0x610" left="0.0" top="0.0" right="1.0" bottom="1.0" /> + <color state="0x000" red="0.0" green="1.0" blue="0.0" /> + <color state="0x184" red="1.0" green="1.0" blue="0.0" /> + <color state="0x610" red="1.0" green="0.0" blue="0.0" /> + </rect> + </element> + +An example of a bar graph that grows horizontally to the left or right and +changes colour from green, through yellow, to red as the state changes from the +neutral position:: + + <element name="wheel"> + <rect> + <bounds state="0x800" left="0.475" top="0.0" right="0.525" bottom="1.0" /> + <bounds state="0x280" left="0.0" top="0.0" right="0.525" bottom="1.0" /> + <bounds state="0xd80" left="0.475" top="0.0" right="1.0" bottom="1.0" /> + <color state="0x800" red="0.0" green="1.0" blue="0.0" /> + <color state="0x3e0" red="1.0" green="1.0" blue="0.0" /> + <color state="0x280" red="1.0" green="0.0" blue="0.0" /> + <color state="0xc20" red="1.0" green="1.0" blue="0.0" /> + <color state="0xd80" red="1.0" green="0.0" blue="0.0" /> + </rect> + </element> + .. _layout-parts-views: @@ -596,11 +698,15 @@ param element Adds an element to the view (see :ref:`layout-parts-elements`). The name of the element to add is specified using the required ``ref`` attribute. It is - an error if no element with this name is defined in the layout file. May - optionally be connected to an emulated I/O port using ``inputtag`` and + an error if no element with this name is defined in the layout file. Within + a layer, elements are drawn in the order they appear in the layout file, + from front to back. See below for more details. + + May optionally be connected to an emulated I/O port using ``inputtag`` and ``inputmask`` attributes, and/or an emulated output using a ``name`` - attribute. Within a layer, elements are drawn in the order they appear in - the layout file, from front to back. See below for more details. + attribute. See :ref:`layout-interact-clickable` for details. See + :ref:`layout-interact-elemstate` for details on supplying a state value to + the instantiated element. screen Adds an emulated screen image to the view. The screen must be identified using either an ``index`` attribute or a ``tag`` attribute (it is an error @@ -610,6 +716,10 @@ screen zero (0). If present, the ``tag`` attribute must be the tag path to the screen relative to the device that causes the layout to be loaded. Screens are drawn in the order they appear in the layout file, from front to back. + + May optionally be connected to an emulated I/O port using ``inputtag`` and + ``inputmask`` attributes, and/or an emulated output using a ``name`` + attribute. See :ref:`layout-interact-clickable` for details. collection Adds screens and/or items in a collection that can be shown or hidden by the user (see :ref:`layout-parts-collections`). The name of the collection is @@ -681,51 +791,10 @@ Screens (``screen`` elements), layout elements (``element`` elements) and groups :ref:`layout-concepts-colours`) specifying a modifier colour. The component colours of the screen or layout element(s) are multiplied by this colour. -If an ``element`` element has ``inputtag`` and ``inputmask`` attributes, -clicking it is equivalent to pressing a key/button mapped to the corresponding -input(s). The ``inputtag`` specifies the tag path of an I/O port relative to -the device that caused the layout file to be loaded. The ``inputmask`` -attribute must be an integer specifying the bits of the I/O port that the -element should activate. This sample shows instantiation of clickable buttons:: - - <element ref="btn_3" inputtag="X2" inputmask="0x10"> - <bounds x="2.30" y="4.325" width="1.0" height="1.0" /> - </element> - <element ref="btn_0" inputtag="X0" inputmask="0x20"> - <bounds x="0.725" y="5.375" width="1.0" height="1.0" /> - </element> - <element ref="btn_rst" inputtag="RESET" inputmask="0x01"> - <bounds x="1.775" y="5.375" width="1.0" height="1.0" /> - </element> - -If an ``element`` element has a ``name`` attribute, it will take its state from -the value of the correspondingly named emulated output. Note that output names -are global, which can become an issue when a machine uses multiple instances of -the same type of device. See :ref:`layout-parts-elements` for details on how an -element’s state affects its appearance. This example shows how digital displays -may be connected to emulated outputs:: - - <element name="digit6" ref="digit"><bounds x="16" y="16" width="48" height="80" /></element> - <element name="digit5" ref="digit"><bounds x="64" y="16" width="48" height="80" /></element> - <element name="digit4" ref="digit"><bounds x="112" y="16" width="48" height="80" /></element> - <element name="digit3" ref="digit"><bounds x="160" y="16" width="48" height="80" /></element> - <element name="digit2" ref="digit"><bounds x="208" y="16" width="48" height="80" /></element> - <element name="digit1" ref="digit"><bounds x="256" y="16" width="48" height="80" /></element> - -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 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`` value and shifted to the right to -remove trailing zeroes (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 -mouse pointer. +Screens (``screen`` elements) and layout elements (``element`` elements) may +have their colour and position/size animated by supplying multiple ``color`` +and/or ``bounds`` child elements with ``state`` attributes. See +:ref:`layout-interact-itemanim` for details. .. _layout-parts-collections: @@ -1003,6 +1072,207 @@ tiles on each iteration. Rows are connected to I/O ports ``board:IN.7`` at the top to ``board.IN.0`` at the bottom. +.. _layout-interact: + +Interactivity +------------- + +Interactive views are supported by allowing items to be bound to emulated +outputs and I/O ports. Five kinds of interactivity are supported: + +Clickable items + If an item in a view is bound to an I/O port switch field, clicking the + item will activate the emulated switch. +State-dependent components + Some components will be drawn differently depending on the containing + element’s state. These include the dot matrix, multi-segment LED display, + simple counter and reel elements. See :ref:`layout-parts-elements` for + details. +Conditionally-drawn components + Components may be conditionally drawn or hidden depending on the containing + element’s state by supplying ``state`` and/or ``statemask`` attributes. See + :ref:`layout-parts-elements` for details. +Component parameter animation + Components’ colour and position/size within their containing element may be + animated according the element’s state by providing multiple ``color`` + and/or ``bounds`` elements with ``state`` attributes. See + :ref:`layout-parts-elements` for details. +Item parameter animation + Items’ colour and position/size within their containing view may be animated + according to their animation state. + + +.. _layout-interact-clickable: + +Clickable items +~~~~~~~~~~~~~~~ + +If a view item (``element`` or ``screen`` element) has ``inputtag`` and +``inputmask`` attribute values that correspond to a digital switch field in the +emulated system, clicking the element will activate the switch. The switch +will remain active as long as the mouse button is held down and the pointer is +within the item’s current bounds. (Note that the bounds may change depending on +the item’s animation state, see :ref:`layout-interact-itemanim`). + +The ``inputtag`` attribute specifies the tag path of an I/O port relative to the +device that caused the layout file to be loaded. The ``inputmask`` attribute +must be an integer specifying the bits of the I/O port field that the item +should activate. This sample shows instantiation of clickable buttons:: + + <element ref="btn_3" inputtag="X2" inputmask="0x10"> + <bounds x="2.30" y="4.325" width="1.0" height="1.0" /> + </element> + <element ref="btn_0" inputtag="X0" inputmask="0x20"> + <bounds x="0.725" y="5.375" width="1.0" height="1.0" /> + </element> + <element ref="btn_rst" inputtag="RESET" inputmask="0x01"> + <bounds x="1.775" y="5.375" width="1.0" height="1.0" /> + </element> + +When handling mouse input, MAME treats all layout elements as being rectangular, +and only activates the first clickable item whose area includes the location of +the mouse pointer. + + +.. _layout-interact-elemstate: + +Element state +~~~~~~~~~~~~~ + +A view item that instantiates an element (``element`` element) may supply a +state value to the element from an emulated I/O port or output. See +:ref:`layout-parts-elements` for details on how an element’s state affects its +appearance. + +If the ``element`` element has a ``name`` attribute, the element state value +will be taken from the value of the correspondingly named emulated output. Note +that output names are global, which can become an issue when a machine uses +multiple instances of the same type of device. This example shows how digital +displays may be connected to emulated outputs:: + + <element name="digit6" ref="digit"><bounds x="16" y="16" width="48" height="80" /></element> + <element name="digit5" ref="digit"><bounds x="64" y="16" width="48" height="80" /></element> + <element name="digit4" ref="digit"><bounds x="112" y="16" width="48" height="80" /></element> + <element name="digit3" ref="digit"><bounds x="160" y="16" width="48" height="80" /></element> + <element name="digit2" ref="digit"><bounds x="208" y="16" width="48" height="80" /></element> + <element name="digit1" ref="digit"><bounds x="256" y="16" width="48" height="80" /></element> + +If the ``element`` element has ``inputtag`` and ``inputmask`` attributes but +lacks a ``name`` attribute, the element state value will be taken from the value +of the corresponding I/O port, masked with the ``inputmask`` value. The +``inputtag`` attribute specifies the tag path of an I/O port relative to the +device that caused the layout file to be loaded. The ``inputmask`` attribute +must be an integer specifying the bits of the I/O port field to use. + +If the ``element`` element has no ``inputraw`` attribute, or if the value of the +``inputraw`` attribute is ``no``, the I/O port’s value is masked with the +``inputmask`` value and XORed with the I/O port default field value. If the +result is non-zero, the element state is 1, otherwise it’s 0. This is often +used or provide visual feedback for clickable buttons, as values for active-high +and active-low switches are normalised. + +If the ``element`` element has an ``inputraw`` attribute with the value ``yes``, +the element state will be taken from the I/O port’s value masked with the +``inputmask`` value and shifted to the right to remove trailing zeroes (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 useful for +obtaining the value of analog or positional inputs. + + +.. _layout-interact-itemanim: + +View item animation +~~~~~~~~~~~~~~~~~~~ + +Items’ colour and position/size within their containing view may be animated. +This is achieved by supplying multiple ``color`` and/or ``bounds`` child +elements with ``state`` attributes. The ``state`` attribute of each ``color`` +or ``bounds`` child element must be a non-negative integer. Withing a view +item, no two ``color`` elements may have equal state ``state`` attributes, and +no two ``bounds`` elements may have equal ``state`` attributes. + +If the item’s animation state is lower than the ``state`` value of any +``bounds`` child element, the position/size specified by the ``bounds`` child +element with the lowest ``state`` value will be used. If the item’s +animation state is higher than the ``state`` value of any ``bounds`` child +element, the position/size specified by the ``bounds`` child element with the +highest ``state`` value will be used. If the item’s animation state is between +the ``state`` values of two ``bounds`` child elements, the position/size will be +interpolated linearly. + +If the item’s animation state is lower than the ``state`` value of any ``color`` +child element, the colour specified by the ``color`` child element with the +lowest ``state`` value will be used. If the item’s animation state is higher +than the ``state`` value of any ``color`` child element, the colour specified by +the ``color`` child element with the highest ``state`` value will be used. If +the item’s animation state is between the ``state`` values of two ``color`` +child elements, the RGBA colour components will be interpolated linearly. + +An item’s animation state may be bound to an emulated output or input port by +supplying an ``animate`` child element. If present, the ``animate`` element +must have either an ``inputtag`` attribute or a ``name`` attribute (but not +both). If the ``animate`` child element is not present, the item’s animation +state is the same as its element state (see :ref:`layout-interact-elemstate`). + +If the ``animate`` child element is present and has an ``inputtag`` +attribute, the item’s animation state will be taken from the value of the +corresponding I/O port. The ``inputtag`` attribute specifies the tag path of an +I/O port relative to the device that caused the layout file to be loaded. The +raw value from the input port is used, active-low switch values are not +normalised. + +If the ``animate`` child element is present and has a ``name`` attribute, the +item’s animation state will be taken from the value of the correspondingly named +emulated output. Note that output names are global, which can become an issue +when a machine uses multiple instances of the same type of device. + +If the ``animate`` child element has a ``mask`` attribute, the item’s animation +state will be masked with the ``mask`` value and shifted to the right to remove +trailing zeroes (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). +Note that the ``mask`` attribute applies to output value (specified with the +``name`` attribute) as well as input port values (specified with the +``inputtag`` attribute). If the ``mask`` attribute is present, it must be an +integer value. If the ``mask`` attribute is not present, it is equivalent to +all 32 bits being set. + +This example shows elements with independent element state and animation state, +using the animation state taken from emulated outputs to control their +position:: + + <repeat count="5"> + <param name="x" start="10" increment="9" /> + <param name="i" start="0" increment="1" /> + <param name="mask" start="0x01" lshift="1" /> + + <element name="cg_sol~i~" ref="cosmo"> + <animate name="cg_count~i~" /> + <bounds state="0" x="~x~" y="10" width="6" height="7" /> + <bounds state="255" x="~x~" y="48.5" width="6" height="7" /> + </element> + + <element ref="nothing" inputtag="FAKE1" inputmask="~mask~"> + <animate name="cg_count~i~" /> + <bounds state="0" x="~x~" y="10" width="6" height="7" /> + <bounds state="255" x="~x~" y="48.5" width="6" height="7" /> + </element> + </repeat> + +This example shows elements with independent element state and animation state, +using the animation state taken from an emulated positional input to control +their positions:: + + <repeat count="4"> + <param name="y" start="1" increment="3" /> + <param name="n" start="0" increment="1" /> + <element ref="ledr" name="~n~.7"> + <animate inputtag="IN.1" mask="0x0f" /> + <bounds state="0" x="0" y="~y~" width="1" height="1" /> + <bounds state="11" x="16.5" y="~y~" width="1" height="1" /> + </element> + </repeat> + + .. _layout-errors: Error handling diff --git a/docs/source/usingmame/defaultkeys.rst b/docs/source/usingmame/defaultkeys.rst index 73bcb1c12fe..c55dc42b786 100644 --- a/docs/source/usingmame/defaultkeys.rst +++ b/docs/source/usingmame/defaultkeys.rst @@ -1,106 +1,729 @@ -.. _default-keys: - -Default Keys -============ - -All the keys below are fully configurable in the user interface. This list shows the standard keyboard configuration. - - -================ =============================================================================== - Key | Action ----------------- ------------------------------------------------------------------------------- -**Tab** | Toggles the configuration menu. -**~** | Toggles the On Screen Display. When the on-screen display is - | visible, you can use the following keys to control it: - | - | * **Up** - select previous parameter to modify - | * **Down** - select next parameter to modify - | * **Left** - decrease the value of the selected parameter - | * **Right** - increase the value of the selected parameter - | * **Enter** - reset parameter value to its default - | * **Control+Left** - decrease the value by 10x - | * **Shift+Left** - decrease the value by 0.1x - | * **Alt+Left** - decrease the value by the smallest amount - | * **Control+Right** - increase the value by 10x - | * **Shift+Right** - increase the value by 0.1x - | * **Alt+Right** - increase the value by the smallest amount - | - | If you are running with -debug, this key sends a 'break' in emulation. -**P** | Pauses the game. -**Shift+P** | While paused, advances to next frame. If rewind is enabled, a new rewind save state is also captured. -**Shift+~** | While paused, loads the most recent rewind save state. -**F2** | Service Mode for games that support it. -**F3** | Resets the game. -**Shift+F3** | Performs a "hard reset", which tears everything down and re-creates it - | from scratch. This is a more thorough and complete reset than the reset - | you get from hitting F3. -**LCtrl+F3** | [SDL ONLY] - Toggle uneven stretch. -**F4** | Shows the game palette, decoded GFX, and any tilemaps. Use the Enter key to - | switch between the three modes (palette, graphics, and tilemaps). Press F4 - | again to turn off the display. The key controls in each mode vary slightly: - | - | Palette/colortable mode: - | * **[ ]** - switch between palette and colortable modes - | * **Up/Down** - scroll up/down one line at a time - | * **Page Up/Page Down** - scroll up/down one page at a time - | * **Home/End** - move to top/bottom of list - | * **-/+** - increase/decrease the number of colors per row - | * **Enter** - switch to graphics viewer - | - | Graphics mode: - | * **[ ]** - switch between different graphics sets - | * **Up/Down** - scroll up/down one line at a time - | * **Page Up/Page Down** - scroll up/down one page at a time - | * **Home/End** - move to top/bottom of list - | * **Left/Right** - change color displayed - | * **R** - rotate tiles 90 degrees clockwise - | * **-/+** - increase/decrease the number of tiles per row - | * **Enter** - switch to tilemap viewer - | - | Tilemap mode: - | * **[ ]** - switch between different tilemaps - | * **Up/Down/Left/Right** - scroll 8 pixels at a time - | * **Shift+Up/Down/Left/Right** - scroll 1 pixel at a time - | * **Control+Up/Down/Left/Right** - scroll 64 pixels at a time - | * **R** - rotate tilemap view 90 degrees clockwise - | * **-/+** - increase/decrease the zoom factor - | * **Enter** - switch to palette/colortable mode - | - | Note: Not all games have decoded graphics and/or tilemaps. -**LCtrl+F4** | [*SDL ONLY*] - Toggles keeping aspect ratio. -**LCtrl+F5** | [*SDL ONLY*] - Toggle Filter. -**Alt+Ctrl+F5** | [*NON SDL MS WINDOWS ONLY*] - Toggle HLSL Post-Processing. -**F6** | Toggle cheat mode (if started with "-cheat"). -**LCtrl+F6** | Decrease Prescaling. -**F7** | Load a save state. You will be requested to press a key to determine which - | save state you wish to load. - | - | *Note that the save state feature is not supported for a large number of* - | *drivers. If support is not enabled for a given driver, you will receive* - | *a warning when attempting to save or load.* -**LCtrl+F7** | Increase Prescaling. -**Shift+F7** | Create a save state. Requires an additional keypress to identify the state, - | similar to the load option above. -**F8** | Decrease frame skip on the fly. -**F9** | Increase frame skip on the fly. -**F10** | Toggle speed throttling. -**F11** | Toggles speed display. -**Shift+F11** | Toggles internal profiler display (if compiled in). -**Alt+F11** | Record HLSL Rendered Video. -**F12** | Saves a screen snapshot. -**Alt+F12** | Take HLSL Rendered Snapshot. -**Insert** | [*WINDOW ONLY, NON-SDL*] Fast forward. While held, runs game with - | throttling disabled and with the maximum frameskip. -**Page DN** | [*SDL ONLY*] Fast forward. While held, runs the game with throttling - | disabled and with the maximum frameskip. -**Alt+ENTER** | Toggles between full-screen and windowed mode. -**Scroll Lock** | Default mapping for the **uimodekey**. - | - | This key allows users to disable and enable the emulated keyboard - | in machines that require it. All emulations which require emulated - | keyboards will start in that mode and you can only access the internal - | UI (hitting TAB) by first hitting this key. You can change the initial - | status of the emulated keyboard as presented upon start by using - | **-ui_active** as detailed below. -**Escape** | Exits emulator. -================ =============================================================================== +Default Keyboard Controls +========================= + +.. contents:: :local: + + +.. _default-keys-foreword: + +Controls Foreword +----------------- + +MAME supports a vast array of different types of machines, with a +significantly different array of inputs across them. This means that some +keyboard keys, mouse buttons, and joystick buttons will be used for multiple +functions. As a result, the control charts below are separated by machine-types +to make it easier to find what you’re looking for. + +All of the controls below are fully configurable in the user interface. These +charts show the default configuration. + +Note that the defaults shown here are arranged by US ANSI key positioning. If +you are using a different layout, the keys will vary. + +MAME User Interface Controls +---------------------------- + +The controls here cover MAME functions such as MAME’s menus, machine pause, +and saving/loading save states. + + +**Tab** + Toggles the configuration menu. + Switches to the next UI panel. +**~** (tilde key) + Toggles the On-Screen Display. + + If you are running with -debug, this key sends a ‘break’ in emulation. + + When the on-screen display is visible, you can use the following + keys to control it: + + * **Up** - select previous parameter to modify. + * **Down** - select next parameter to modify. + * **Left** - decrease the value of the selected parameter. + * **Right** - increase the value of the selected parameter. + * **Enter** - reset parameter value to its default. + * **Control+Left** - decrease the value by 10x. + * **Shift+Left** - decrease the value by 0.1x. + * **Alt+Left** - decrease the value by the smallest amount. + * **Control+Right** - increase the value by 10x. + * **Shift+Right** - increase the value by 0.1x. + * **Alt+Right** - increase the value by the smallest amount. + * **End** - temporarily hide the On Screen Display. + * **Home** - bring the On Screen Display back after hiding it. +**Up Arrow** + Highlight previous UI menu option. +**Down Arrow** + Highlight next UI menu option. +**Left Arrow** + Change current UI option setting when an arrow is present on it. +**Right Arrow** + Change current UI option setting when an arrow is present on it. +**Home** + Highlight first UI menu option. +**End** + Select last UI menu option. +**Left Shift+Tab** + Select previous UI panel. +**Enter**/**Joystick 1 Button 1** + Select currently highlighted UI menu option. +**Space** + Show comment on currently highlighted UI menu option. +**Delete** + Clear/reset to default when highlighting an entry on the input + configuration, cheat options, and plugin options pages. +**[** + UI Previous Group +**]** + UI Next Group +**P** + Pauses the emulated machine. +**Left Shift+P** + While paused, advances to next frame. If rewind is enabled, a new rewind + save state is also captured. +**Left Shift+~** + While paused, loads the most recent rewind save state. +**F1** + Power the machine on for machines that have specific power button behavior. +**F2** + Power the machine off for machines that have specific power button behavior. +**F3** + Soft resets the machine. +**Left Shift+F3** + Performs a “hard reset”, which tears everything down and re-creates it from + scratch. This is a more thorough and complete reset than the reset you get + from hitting F3. +**Left Ctrl+F3** + Toggle uneven stretch. (*SDL ONLY*) +**F4** + Shows the game palette, decoded graphics tiles/characters and any tilemaps. + + Use the Enter key to switch between the three modes (palette, graphics, and + tilemaps). + + Press F4 again to turn off the display. + The key controls in each mode vary slightly: + + Palette/colortable mode: + + * **[** **]** - switch between palette devices. + * **Up**/**Down** - scroll up/down one line at a time. + * **Page Up**/**Page Down** - scroll up/down one page at a time. + * **Home**/**End** - move to top/bottom of list. + * **-**/**+** - increase/decrease the number of colors per row. + * **Enter** - switch to graphics viewer. + + Graphics mode: + + * **[** **]** - switch between different graphics sets. + * **Up**/**Down** - scroll up/down one line at a time. + * **Page Up**/**Page Down** - scroll up/down one page at a time. + * **Home**/**End** - move to top/bottom of list. + * **Left**/**Right** - change color displayed. + * **R** - rotate tiles 90 degrees clockwise. + * **-**/**+** - increase/decrease the number of tiles per row. + * **Enter** - switch to tilemap viewer. + + Tilemap mode: + + * **[** **]** - switch between different tilemaps. + * **Up**/**Down**/**Left**/**Right** - scroll 8 pixels at a time. + * **Shift+Up**/**Down**/**Left**/**Right** - scroll 1 pixel at a time. + * **Control+Up**/**Down**/**Left**/**Right** - scroll 64 pixels at a time. + * **R** - rotate tilemap view 90 degrees clockwise. + * **-**/**+** - increase/decrease the zoom factor. + * **Enter** - switch to palette/colortable mode. + + Note: Not all games have decoded graphics and/or tilemaps. +**Left Ctrl+F4** + Toggles keeping aspect ratio. + (*SDL MAME only*) +**Left Ctrl+F5** + Toggle Filter. (*SDL ONLY*) + (*SDL MAME only*) +**Left Alt+Left Ctrl+F5** + Toggle HLSL Post-Processing. + (*Windows non-SDL MAME only*) +**F6** + Toggle cheat mode. (if started with “-cheat”) +**Left Ctrl+F6** + Decrease Prescaling. +**Left Ctrl+F7** + Increase Prescaling. +**F7** + Load a save state. You will be prompted to press a key or select from the + menu to determine which save state you wish to load. + + *Note that the save state feature is not supported for a large number of + drivers. If a given driver is not known to work perfectly, you will + receive a warning that the save state may not be valid when attempting to + save or load.* +**Left Shift+F7** + Create a save state. Requires an additional keypress to identify the state, + similar to the load option above. If an existing save state is present, it + will also appear in the selection menu to allow overwriting of that save + state. +**F8** + Decrease frame skipping on the fly. +**F9** + Increase frame skipping on the fly. +**F10** + Toggle speed throttling. +**F11** + Toggles speed display. +**Left Shift+F11** + Toggles internal profiler display (if compiled in). +**Left Alt+F11** + Record HLSL Rendered Video. +**F12** + Saves a screen snapshot. +**Left Shift+F12** + Begin recording MNG video. +**Left Control+Left Shift+F12** + Begin recording AVI video. +**Left Alt+F12** + Take HLSL Rendered Snapshot. +**Insert** + Fast forward. While held, runs game with throttling disabled and with the + maximum frameskip. + (*Windows non-SDL MAME only*) +**Page Down** + Fast forward. While held, runs game with throttling disabled and with the + maximum frameskip. + (*Windows non-SDL MAME only*) +**Left Alt+Enter** + Toggles between full-screen and windowed mode. +**Scroll Lock**/**Forward Delete** (Mac Desktop)/**fn-Delete** (Mac Laptop) + Default mapping for the **uimodekey**. + + This key toggles MAME’s response to user interface keys such as the + (by default) **Tab** key being used for menus. All emulated machines + which require emulated keyboards will start with UI controls disabled by + default and you can only access the internal UI by first hitting this + **uimodekey** key. You can change the initial status of the emulated + keyboard as presented upon start by using + :ref:`-uimodekey<mame-commandline-uimodekey>` +**Escape** + Exits emulator. + Cancel current UI option. + + +.. _default-arcade-keys: + +Default Arcade Machine Controls +------------------------------- + +This section covers controls that are applicable to most kinds of arcade +machines. Note that not all machines will have all of these controls. All the +controls below are fully configurable in the user interface. This list shows +the standard keyboard configuration. + +**5** *(not numeric keypad)* + Coin slot 1 +**6** *(not numeric keypad)* + Coin slot 2 +**7** *(not numeric keypad)* + Coin slot 3 +**8** *(not numeric keypad)* + Coin slot 4 +**Backspace** + Bill 1 (For machines that have a bill receptor/note reader) +**T** + Tilt + + Usually a tilt switch or shock sensor that will end the current game, reset + credits and/or reset the machine if the machine is knocked excessively hard + or moved. Most commonly found on pinball machines. +**-** *(not numeric keypad)* + Volume Down + + For machines that have an electronic volume control. +**=** *(not numeric keypad)* + Volume Up + + For machines that have an electronic volume control. +**F1** + Memory Reset + + This resets high scores, credits/winnings, statistics, and/or operator + settings on machines that support it. +**F2** + Service Mode + + This is a momentary push-button on some machines, while it is a toggle + switch or DIP switch on others. +**9** *(not numeric keypad)* + Service 1 + + Service buttons are typically used to give free credits or to navigate the + operator service menus. +**0** *(not numeric keypad)* + Service 2 +**-** *(not numeric keypad)* + Service 3 +**=** *(not numeric keypad)* + Service 4 + + +.. _default-game-keys: + +Default Arcade Game Controls +---------------------------- + +This section covers controls for arcade games using common joystick/button +control schemes. All the controls below are fully configurable in the user +interface. This list shows the standard keyboard configuration. + +**5** *(not numeric keypad)* + Coin slot 1 +**6** *(not numeric keypad)* + Coin slot 2 +**7** *(not numeric keypad)* + Coin slot 3 +**8** *(not numeric keypad)* + Coin slot 4 +**1** *(not numeric keypad)* + Player 1 start or 1 player mode +**2** *(not numeric keypad)* + Player 2 start or 2 players mode +**3** *(not numeric keypad)* + Player 3 start or 3 players mode +**4** *(not numeric keypad)* + Player 4 start or 4 players mode + + +.. _default-player1-keys: + +Player 1 Controls +~~~~~~~~~~~~~~~~~ + +**Up Arrow** + Player 1 Up +**Down Arrow** + Player 1 Down +**Left Arrow** + Player 1 Left +**Right Arrow** + Player 1 Right +**E** + Player 1 Up on Left Stick for dual-stick machines (e.g. Robotron) +**D** + Player 1 Down on Left Stick for dual-stick machines (e.g. Robotron) +**S** + Player 1 Left on Left Stick for dual-stick machines (e.g. Robotron) +**F** + Player 1 Right on Left Stick for dual-stick machines (e.g. Robotron) +**I** + Player 1 Up on Right Stick for dual-stick machines (e.g. Robotron) +**K** + Player 1 Down on Right Stick for dual-stick machines (e.g. Robotron) +**J** + Player 1 Left on Right Stick for dual-stick machines (e.g. Robotron) +**L** + Player 1 Right on Right Stick for dual-stick machines (e.g. Robotron) +**Left Ctrl**/**Mouse B0**/**Gun 1 Button 0** + Player 1 Button 1 +**Left Alt**/**Mouse B2**/**Gun 1 Button 1** + Player 1 Button 2 +**Spacebar**/**Mouse B1**/**Joystick 1 Button 1 or B** + Player 1 Button 3 +**Left Shift** + Player 1 Button 4 +**Z** + Player 1 Button 5 +**X** + Player 1 Button 6 +**C** + Player 1 Button 7 +**V** + Player 1 Button 8 +**B** + Player 1 Button 9 +**N** + Player 1 Button 10 +**M** + Player 1 Button 11 +**,** + Player 1 Button 12 +**.** + Player 1 Button 13 +**/** + Player 1 Button 14 +**Right Shift** + Player 1 Button 15 + + +.. _default-player2-keys: + +Player 2 Controls +~~~~~~~~~~~~~~~~~ + +**R** + Player 2 Up +**F** + Player 2 Down +**D** + Player 2 Left +**G** + Player 2 Right +**A** + Player 2 Button 1 +**S** + Player 2 Button 2 +**Q** + Player 2 Button 3 +**W** + Player 2 Button 4 +**E** + Player 2 Button 5 + + +.. _default-player3-keys: + +Player 3 Controls +~~~~~~~~~~~~~~~~~ + +**I** + Player 3 Up +**K** + Player 3 Down +**J** + Player 3 Left +**L** + Player 3 Right +**Right Control** + Player 3 Button 1 +**Right Shift** + Player 3 Button 2 +**Enter** *(not numeric keypad)* + Player 3 Button 3 + + +.. _default-player4-keys: + +Player 4 Controls +~~~~~~~~~~~~~~~~~ + +**8** *(on numeric keypad)* + Player 4 Up +**2** *(on numeric keypad)* + Player 4 Down +**4** *(on numeric keypad)* + Player 4 Left +**6** *(on numeric keypad)* + Player 4 Right +**0** *(on numeric keypad)* + Player 4 Button 1 +**.** *(on numeric keypad)* + Player 4 Button 2 +**Enter** *(on numeric keypad)* + Player 4 Button 3 + + +.. _default-mahjong-hanafuda-keys: + +Default Mahjong and Hanafuda Keys +--------------------------------- + +Most mahjong and hanafuda games use a standard control panel layout. Some keys +may not be present, depending on the kind of game. For example games without a +bonus game feature may lack the Take Score, Double Up, Big and Small keys, and +games without gambling features may also lack the Bet key. Some games may not +use all keys that are present. For example many games do not use the Flip Flop +and Last Chance keys. + +.. image:: images/mahjongpanel.svg + :width: 100% + :align: center + :alt: Standard mahjong control panel layout + +Due to the large number of keys, MAME only provides default input configuration +for a single set of player controls. For multi-player mahjong/hanafuda games, +or mahjong/hanafuda games with multiple player positions, manual configuration +is required. All the keys below are fully configurable in the user interface. +This list shows the standard keyboard configuration. + + +**5** *(not numeric keypad)* + Coin slot 1 +**6** *(not numeric keypad)* + Coin slot 2 +**7** *(not numeric keypad)* + Coin slot 3 +**8** *(not numeric keypad)* + Coin slot 4 +**Y** + Player 1 Mahjong/Hanafuda Flip Flop +**1** *(not numeric keypad)* + Player 1 start or 1 player mode +**2** *(not numeric keypad)* + Player 2 start or 2 players mode +**3** *(not numeric keypad)* + Player 3 start or 3 players mode + + Mahjong Bet +**4** *(not numeric keypad)* + Player 4 start or 4 players mode +**Right Ctrl** + Player 1 Mahjong/Hanafuda Take Score +**Right Shift** + Player 1 Mahjong/Hanafuda Double Up +**Enter** + Player 1 Mahjong/Hanafuda Big +**Backspace** + Player 1 Mahjong/Hanafuda Small +**Right Alt** + Player 1 Mahjong/Hanafuda Last Chance +**Ctrl** + Mahjong Kan +**Alt** + Mahjong Pon +**Spacebar** + Mahjong Chi +**Shift** + Mahjong Reach +**Z** + Mahjong Ron +**A** + Player 1 Mahjong/Hanafuda A +**B** + Player 1 Mahjong/Hanafuda B +**C** + Player 1 Mahjong/Hanafuda C +**D** + Player 1 Mahjong/Hanafuda D +**E** + Player 1 Mahjong/Hanafuda E +**F** + Player 1 Mahjong/Hanafuda F +**G** + Player 1 Mahjong/Hanafuda G +**H** + Player 1 Mahjong/Hanafuda H +**I** + Player 1 Mahjong I +**J** + Player 1 Mahjong J +**K** + Player 1 Mahjong K +**L** + Player 1 Mahjong L +**M** + Player 1 Mahjong M + + Player 1 Hanafuda Yes +**N** + Player 1 Mahjong N + + Player 1 Hanafuda No +**O** + Player 1 Taiwanese Mahjong O +**Semicolon** + Player 1 Taiwanese Mahjong P +**Q** + Player 1 Taiwanese Mahjong Q + + +.. _default-gambling-keys: + +Default Gambling Keys +--------------------- + +All the keys below are fully configurable in the user interface. This list shows +the standard keyboard configuration. + +Note that many gambling games use buttons for multiple functions. For example a +slots game may use the Start button to stop all reels, lacking a dedicated Stop +All Reels button, or a poker game may use the hold buttons to control the +double-up bonus game, lacking dedicated Take Score, Double Up, High and Low +buttons. + + +**5** + Coin slot 1 +**6** + Coin slot 2 +**7** + Coin slot 3 +**8** + Coin slot 4 +**Backspace** + Bill 1 (For machines that have a bill receptor/note reader) +**I** + Payout +**Q** + Key In +**W** + Key Out +**F1** + Memory Reset +**9** *(not numeric keypad)* + Service 1 (Service buttons are typically used to give free credits or to + navigate the internal operator service menus) +**0** *(not numeric keypad)* + Service 2 + Book-Keeping (for machines that have this functionality) +**-** *(not numeric keypad)* + Service 3 +**=** *(not numeric keypad)* + Service 4 +**M** + Bet +**1** *(not numeric keypad)* + Player 1 start or 1 player mode +**2** *(not numeric keypad)* + Deal +**L** + Stand +**4** *(not numeric keypad)* + Take Score + + For games that allow gambling winnings in a double-or-nothing bonus game, + this takes the winnings from the main game. +**3** *(not numeric keypad)* + Double Up + + For games that allow gambling winnings in a double-or-nothing bonus game, + this gambles the winnings from the main game in the bonus game. +**D** + Half Gamble + + Used by games that allow gambling half or all of the winnings from the main + game in the bonus game. +**A** + High +**S** + Low +**O** + Door + + +.. _default-blackjack-keys: + +Default Blackjack Keys +~~~~~~~~~~~~~~~~~~~~~~ + +All the keys below are fully configurable in the user interface. This list shows +the standard keyboard configuration. + + +**1** + Player 1 start or 1 player mode + + Used to deal a new hand for games that have separate buttons to deal a new + hand and draw an additional card. +**2** + Deal (hit) + + Used to draw an additional card, and to deal a new hand in games that don’t + use separate buttons to deal a new hand and draw an additional card. +**L** + Stand + + +.. _default-poker-keys: + +Default Poker Keys +~~~~~~~~~~~~~~~~~~ + +All the keys below are fully configurable in the user interface. This list shows +the standard keyboard configuration. + + +**1** + Player 1 start or 1 player mode + + Used to deal a new hand for games that have separate buttons to deal a new + hand and draw replacement cards. +**2** + Deal + + Used to draw replacement cards, and to deal a new hand in games that don’t + use separate buttons to deal a new hand and draw replacement cards. +**Z** + Hold 1/discard 1 +**X** + Hold 2/discard 2 +**C** + Hold 3/discard 3 +**V** + Hold 4/discard 4 +**B** + Hold 5/discard 5 +**N** + Cancel + + Used by some games to cancel current selection for cards to hold/discard. + + +.. _default-slots-keys: + +Default Slots Keys +~~~~~~~~~~~~~~~~~~ + +All the keys below are fully configurable in the user interface. This list shows +the standard keyboard configuration. + + +**1** + Player 1 start or 1 player mode +**X** + Stop Reel 1 +**C** + Stop Reel 2 +**V** + Stop Reel 3 +**B** + Stop Reel 4 +**Z** + Stop All Reels + + +.. _default-computer-keys: + +Default Computer Keys +--------------------- + +All the keys below are fully configurable in the user interface. This list shows +the standard keyboard configuration. + +Note that controls can vary widely by computer type, so not all keys are shown +here. See the “Input (this Machine)” section of MAME’s configuration menu for +details for the machine you are currently using. + + +**Tab** + Toggles the configuration menu. +**Scroll Lock**/**Forward Delete** (Mac Desktop)/**fn-Delete** (Mac Laptop) + Default mapping for the **uimodekey**. + + This key toggles MAME’s response to user interface keys such as the + (by default) **Tab** key being used for menus. All emulated machines + which require emulated keyboards will start with UI controls disabled by + default and you can only access the internal UI by first hitting this + **uimodekey** key. You can change the initial status of the emulated + keyboard as presented upon start by using + :ref:`-uimodekey<mame-commandline-uimodekey>` +**F2** + Start tape for machines that have cassette tape drives. +**Shift+F2** + Stop tape for machines that have cassette tape drives. +**Left Shift+Scroll Lock** + Pastes from system clipboard into the emulated machine. +**Alphanumeric Keys** + These keys are mapped to their equivalents in the emulated machine by + default. + + +.. _default-othermachine-keys: + +Other Machines +-------------- + +All the keys are fully configurable in the user interface. + +Note that controls can vary widely by machine type, so default keys are not +shown here and defaults will vary considerably based on the manufacturer and +style. See the “Input (this Machine)” section of MAME’s configuration menu for +details for the machine you are currently using. diff --git a/docs/source/usingmame/images/mahjongpanel.svg b/docs/source/usingmame/images/mahjongpanel.svg new file mode 100644 index 00000000000..963ca2e0be0 --- /dev/null +++ b/docs/source/usingmame/images/mahjongpanel.svg @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + id="svg-mahjong" + version="1.1" + viewBox="0 0 1136 176" + height="176" + width="1136"> + <g id="buttons" stroke="none"> + <rect y="0" x="0" height="64" width="64" id="button-a" fill="#cccccc" /> + <rect y="0" x="80" height="64" width="64" id="button-b" fill="#cccccc" /> + <rect y="0" x="160" height="64" width="64" id="button-c" fill="#cccccc" /> + <rect y="0" x="240" height="64" width="64" id="button-d" fill="#cccccc" /> + <rect y="0" x="320" height="64" width="64" id="button-e" fill="#cccccc" /> + <rect y="0" x="400" height="64" width="64" id="button-f" fill="#cccccc" /> + <rect y="0" x="480" height="64" width="64" id="button-g" fill="#cccccc" /> + <rect y="0" x="560" height="64" width="64" id="button-h" fill="#cccccc" /> + <rect y="0" x="640" height="64" width="64" id="button-i" fill="#cccccc" /> + <rect y="0" x="720" height="64" width="64" id="button-j" fill="#cccccc" /> + <rect y="0" x="800" height="64" width="64" id="button-k" fill="#cccccc" /> + <rect y="0" x="880" height="64" width="64" id="button-l" fill="#cccccc" /> + <rect y="0" x="960" height="64" width="64" id="button-m" fill="#cccccc" /> + <rect y="0" x="1072" height="64" width="64" id="button-n" fill="#ff3333" /> + <rect y="112" x="0" height="64" width="64" id="button-flipflop" fill="#ffff33" /> + <rect y="112" x="80" height="64" width="64" id="button-start" fill="#ffff33" /> + <rect y="112" x="160" height="64" width="64" id="button-bet" fill="#ffff33" /> + <rect y="112" x="280" height="64" width="64" id="button-take" fill="#ff66cc" /> + <rect y="112" x="360" height="64" width="64" id="button-dup" fill="#ff66cc" /> + <rect y="112" x="440" height="64" width="64" id="button-big" fill="#ff66cc" /> + <rect y="112" x="520" height="64" width="64" id="button-small" fill="#ff66cc" /> + <rect y="112" x="640" height="64" width="64" id="button-last" fill="#33ff99" /> + <rect y="112" x="720" height="64" width="64" id="button-kan" fill="#33ff99" /> + <rect y="112" x="800" height="64" width="64" id="button-pon" fill="#33ff99" /> + <rect y="112" x="880" height="64" width="64" id="button-chi" fill="#33ff99" /> + <rect y="112" x="960" height="64" width="64" id="button-reach" fill="#33ff99" /> + <rect y="112" x="1072" height="64" width="64" id="button-ron" fill="#ff9933" /> + </g> + <g id="labels" + font-family="sans-serif" font-style="normal" font-variant="normal" font-weight="bold" font-stretch="normal" + text-anchor="middle" + fill="#000000" stroke="none" + style="text-align:center;line-height:1.25;letter-spacing:0px;word-spacing:0px"> + <text id="label-a" + y="47.5104" x="32" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="32" + id="tspan-a0">A</tspan></text> + <text id="label-b" + y="47.5104" x="112" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="112" + id="tspan-b0">B</tspan></text> + <text id="label-c" + y="47.5104" x="192" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="192" + id="tspan-c0">C</tspan></text> + <text id="label-d" + y="47.5104" x="272" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="272" + id="tspan-d0">D</tspan></text> + <text id="label-e" + y="47.5104" x="352" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="352" + id="tspan-e0">E</tspan></text> + <text id="label-f" + y="47.5104" x="432" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="432" + id="tspan-f0">F</tspan></text> + <text id="label-g" + y="47.5104" x="512" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="512" + id="tspan-g0">G</tspan></text> + <text id="label-h" + y="47.5104" x="592" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="592" + id="tspan-h0">H</tspan></text> + <text id="label-i" + y="47.5104" x="672" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="672" + id="tspan-i0">I</tspan></text> + <text id="label-j" + y="47.5104" x="752" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="752" + id="tspan-j0">J</tspan></text> + <text id="label-k" + y="47.5104" x="832" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="832" + id="tspan-k0">K</tspan></text> + <text id="label-l" + y="47.5104" x="912" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="912" + id="tspan-l0">L</tspan></text> + <text id="label-m" + y="47.5104" x="992" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="992" + id="tspan-m0">M</tspan></text> + <text id="label-n" + y="47.5104" x="1104" + style="font-size:42.66666794px" + xml:space="preserve"><tspan + y="47.5104" x="1104" + id="tspan-n0">N</tspan></text> + <text id="label-flipflop" + y="140.4128" x="32" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="140.4128" x="32" + id="tspan-flipflop0">FLIP</tspan><tspan + y="157.17379" x="32" + id="tspan-flipflop1">FLOP</tspan></text> + <text id="label-start" + y="148.84703" x="112" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="112" + id="tspan-start0">START</tspan></text> + <text id="label-bet" + y="148.84703" x="192" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="192" + id="tspan-bet0">BET</tspan></text> + <text id="label-take" + y="140.4128" x="312" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="140.4128" x="312" + id="tspan-take0">TAKE</tspan><tspan + y="157.17379" x="312" + id="tspan-take1">SCORE</tspan></text> + <text id="label-dup" + y="140.4128" x="392" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="140.4128" x="392" + id="tspan-dup0">DOUBLE</tspan><tspan + y="157.17379" x="392" + id="tspan-dup1">UP</tspan></text> + <text id="label-big" + y="148.84703" x="472" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="472" + id="tspan-big0">BIG</tspan></text> + <text id="label-small" + y="148.84703" x="552" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="552" + id="tspan-small0">SMALL</tspan></text> + <text id="label-last" + y="140.4128" x="672" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="140.4128" x="672" + id="tspan-last0">LAST</tspan><tspan + y="157.17379" x="672" + id="tspan-last1">CHANCE</tspan></text> + <text id="label-kan" + y="148.84703" x="752" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="752" + id="tspan-kan0">KAN</tspan></text> + <text id="label-pon" + y="148.84703" x="832" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="832" + id="tspan-pon0">PON</tspan></text> + <text id="label-chi" + y="148.84703" x="912" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="912" + id="tspan-chi0">CHI</tspan></text> + <text id="label-reach" + y="148.84703" x="992" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="992" + id="tspan-reach0">REACH</tspan></text> + <text id="label-ron" + y="148.84703" x="1104" + style="font-size:13.33333302px" + xml:space="preserve"><tspan + y="148.84703" x="1104" + id="tspan-ron0">RON</tspan></text> + </g> +</svg> |