spdheat - add layout with shifters [David Haywood] (#5765)

* shifter layout (nw)

* actually fix gear mapping ingame (2nd bit just seems to cause problems)
This commit is contained in:
David Haywood 2019-10-20 21:00:24 +01:00 committed by ajrhacker
parent 8c60f6c2bb
commit cbecc57325
2 changed files with 95 additions and 9 deletions

View File

@ -497,7 +497,7 @@ static INPUT_PORTS_START( spdheat )
PORT_DIPNAME( 0x0001, 0x0001, "D_UNK0" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, "Drag Race" )
PORT_DIPNAME( 0x0002, 0x0002, "Drag Race" ) // no effect?
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0004, 0x0004, "D_UNK2" )
@ -520,17 +520,22 @@ static INPUT_PORTS_START( spdheat )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("IN0")
PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P1 Shift") PORT_PLAYER(1)
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P1 Shift") PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // if this is ACTIVE_HIGH gear in Service mode will always show low gear, but your start will be slow as if in high gear regardless of above
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("Reserved 2")
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("Reserved 1")
PORT_BIT( 0x0030, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P2 Shift") PORT_PLAYER(2)
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P2 Shift") PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) // see above
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P3 Shift") PORT_PLAYER(3)
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P3 Shift") PORT_PLAYER(3)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // see above
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("Reserved 3")
PORT_BIT( 0x0030, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P4 Shift") PORT_PLAYER(4)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_TOGGLE PORT_NAME("P4 Shift") PORT_PLAYER(4)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) // see above
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE4 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )

View File

@ -1,17 +1,98 @@
<?xml version="1.0"?>
<mamelayout version="2">
<element name="shifter" defstate="0">
<rect>
<bounds left="0" right="32" top="0" bottom="64" />
<color red="0.85" green="0.4" blue="0.3" />
</rect>
<rect>
<bounds left="2" right="30" top="2" bottom="62" />
<color red="0.14" green="0.17" blue="0.2" />
</rect>
<rect>
<bounds left="14" right="18" top="15" bottom="49" />
<color red="0.44" green="0.47" blue="0.5" />
</rect>
<disk>
<bounds left="14" right="18" top="13" bottom="17" />
<color red="0.44" green="0.47" blue="0.5" />
</disk>
<disk>
<bounds left="14" right="18" top="47" bottom="51" />
<color red="0.44" green="0.47" blue="0.5" />
</disk>
<text string="LOW" state="0">
<bounds left="3" right="29" top="2" bottom="12" />
<color red="1.0" green="1.0" blue="0.4" />
</text>
<text string="LOW" state="1">
<bounds left="3" right="29" top="2" bottom="12" />
<color red="1.0" green="1.0" blue="1.0" />
</text>
<text string="HIGH" state="0">
<bounds left="3" right="29" top="52" bottom="62" />
<color red="1.0" green="1.0" blue="1.0" />
</text>
<text string="HIGH" state="1">
<bounds left="3" right="29" top="52" bottom="62" />
<color red="1.0" green="1.0" blue="0.4" />
</text>
<disk state="0">
<bounds left="9" right="23" top="14" bottom="28" />
<color red="0.85" green="0.4" blue="0.3" />
</disk>
<disk state="1">
<bounds left="9" right="23" top="36" bottom="50" />
<color red="0.85" green="0.4" blue="0.3" />
</disk>
</element>
<view name="Quadruple (with shifters)">
<screen index="0">
<bounds x="0" y="3.25" width="4" height="3" />
</screen>
<bezel element="shifter" inputtag="IN0" inputmask="0x0001" >
<bounds x="3.7875" y="5.8375" width="0.2" height="0.4" />
<color alpha="0.6" />
</bezel>
<screen index="1">
<bounds x="4.25" y="3.25" width="4" height="3" />
</screen>
<bezel element="shifter" inputtag="IN0" inputmask="0x0010">
<bounds x="8.0375" y="5.8375" width="0.2" height="0.4" />
<color alpha="0.6" />
</bezel>
<screen index="2">
<bounds x="0" y="0" width="4" height="3" />
</screen>
<bezel element="shifter" inputtag="IN1" inputmask="0x0001" >
<bounds x="0.0125" y="0.0125" width="0.2" height="0.4" />
<color alpha="0.6" />
<orientation rotate="180" />
</bezel>
<screen index="3">
<bounds x="4.25" y="0" width="4" height="3" />
</screen>
<bezel element="shifter" inputtag="IN1" inputmask="0x0010" >
<bounds x="4.2625" y="0.0125" width="0.2" height="0.4" />
<color alpha="0.6" />
<orientation rotate="180" />
</bezel>
</view>
<view name="Quadruple">
<screen index="0">
<bounds x="0" y="3.25" width="4" height="3" />
</screen>
<screen index="1">
<bounds x="4.25" y="3.25" width="4" height="3" />
</screen>
</screen>
<screen index="2">
<bounds x="0" y="0" width="4" height="3" />
</screen>
</screen>
<screen index="3">
<bounds x="4.25" y="0" width="4" height="3" />
</screen>
</view>
</screen>
</view>
</mamelayout>