Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <mamelayout version="2">
- <!--
- Controles virtuais para Daytona USA
- Criado por: Wellington Terumi Uemura
- Licença: CC0
- Fonte: Documentação Oficial do MAME:
- https://docs.mamedev.org/techspecs/layout_files.html
- Download: https://pastebin.com/TjTx5895
- https://mamedoc.readthedocs.io/
- Data de criação: December 28, 2025
- -->
- <!-- Elemento de texto "WHEEL" (volante) -->
- <element name="volante" defstate="1">
- <text string="WHEEL"></text>
- </element>
- <!-- Elemento de texto "AC" (acelerador) -->
- <element name="gas" defstate="1">
- <text string="AC"></text>
- </element>
- <!-- Elemento de texto "BK" (freio) -->
- <element name="brake" defstate="1">
- <text string="BK"></text>
- </element>
- <!-- Para bloquear cliques do mouse -->
- <element name="cover" defstate="0">
- <rect><color alpha="0" /></rect>
- </element>
- <!--
- https://github.com/mamedev/mame/blob/master/src/mame/sega/model2.cpp#L1765
- PORT_START("STEER")
- PORT_BIT(0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(10)
- É daqui de onde obtemos os valores para o volante e aplicamos as cores
- da posição neutra até o extremo. O mecanismo interno do MAME faz o
- resto para transicionar entre as cores.
- -->
- <element name="wheel">
- <rect>
- <bounds state="0xff" left="0.475" top="0.0" right="1.0" bottom="1.0" /><!-- Direita -->
- <bounds state="0x80" left="0.475" top="0.0" right="0.525" bottom="1.0" /><!-- Centro -->
- <bounds state="0x0" left="0.0" top="0.0" right="0.525" bottom="1.0" /><!-- Esquerda -->
- <color state="0x80" red="0.0" green="0.0" blue="0.8" /><!-- neutro/centro -->
- <color state="0x40" red="0.709" green="0.0" blue="0.709" /><!-- intermediário -->
- <color state="0x0" red="1.0" green="0.0" blue="0.0" /><!-- Left -->
- <color state="0xbf" red="0.709" green="0.0" blue="0.709" /><!-- intermediário -->
- <color state="0xff" red="1.0" green="0.0" blue="0.0" /><!-- Right-->
- </rect>
- </element>
- <!--
- https://github.com/mamedev/mame/blob/master/src/mame/sega/model2.cpp#L1765
- PORT_START("ACCEL")
- PORT_BIT(0xff, 0x00, IPT_PEDAL) PORT_SENSITIVITY(30) PORT_KEYDELTA(10)
- PORT_START("BRAKE")
- PORT_BIT(0xff, 0x00, IPT_PEDAL2) PORT_SENSITIVITY(30) PORT_KEYDELTA(10)
- É daqui de onde obtemos os valores para o acelerador e freio, aplicamos
- as cores da posição neutra até o extremo. O mecanismo interno do MAME
- faz o resto para transicionar entre as cores.
- -->
- <element name="pedal">
- <rect>
- <bounds state="0x00" left="0.0" top="0.9" right="1.0" bottom="1.0" /><!-- Neutro -->
- <bounds state="0xff" left="0.0" top="0.0" right="1.0" bottom="1.0" /><!-- Socado -->
- <color state="0x00" red="0.0" green="0.0" blue="0.8" /><!-- Neutro -->
- <color state="0x7f" red="0.709" green="0.0" blue="0.709" /><!-- 50% -->
- <color state="0xff" red="1.0" green="0.0" blue="0.0" /><!-- Socado -->
- </rect>
- </element>
- <!-- Define o nome da nossa ilustração para ser selecionada na interface do MAME-->
- <view name="Controles Analógicos" showpointers="no">
- <screen index="0">
- <bounds x="0" y="0" width="4" height="3" />
- </screen>
- <!-- Define a posição e tamanho do texto "WHEEL" na tela -->
- <element ref="volante" align="3">
- <bounds x="1.870" y="2.91" width="0.261" height="0.052" />
- <color red="1.0" green="1.0" blue="1.0" />
- </element>
- <!-- Define a posição e tamanho inicial para a animação do volante na tela -->
- <element ref="wheel" inputtag="STEER" inputmask="0xff" inputraw="yes">
- <bounds x="1" y="2.8" width="2" height="0.1" />
- <color alpha="0.7" />
- </element>
- <!-- Bloqueia o clique no volante -->
- <element ref="cover" clickthrough="no">
- <bounds x="0.9" y="2.8" width="2.1" height="0.2" />
- </element>
- <!-- Define a posição e tamanho do texto "AC" na tela -->
- <element ref="gas" align="3">
- <bounds x="3.075" y="2.91" width="0.1" height="0.053" />
- <color red="1.0" green="1.0" blue="1.0" />
- </element>
- <!-- Define a posição e tamanho inicial para a animação do acelerador na tela -->
- <element ref="pedal" inputtag="ACCEL" inputmask="0xff" inputraw="yes">
- <bounds x="3.075" y="1.9" width="0.1" height="1" />
- <color alpha="0.7" />
- </element>
- <!-- Define a posição e tamanho do texto "BK" na tela -->
- <element ref="brake" align="3">
- <bounds x="3.274" y="2.911" width="0.1" height="0.051" />
- <color red="1.0" green="1.0" blue="1.0" />
- </element>
- <!-- Define a posição e tamanho inicial para a animação do freio na tela -->
- <element ref="pedal" inputtag="BRAKE" inputmask="0xff" inputraw="yes">
- <bounds x="3.275" y="1.9" width="0.1" height="1" />
- <color alpha="0.7" />
- </element>
- <!-- Bloqueia o clique nos pedais -->
- <element ref="cover" clickthrough="no">
- <bounds x="3.02" y="1.862" width="0.4" height="1.1" />
- </element>
- </view>
- </mamelayout>
Advertisement
Add Comment
Please, Sign In to add comment