improve spdheat sprite rendering at left edge, fix dipswitch (nw) (#5777)

* improve spdheat sprite rendering at left edge, fix dipswitch (nw)

* better explain dipswitch function (nw)

* ran srcclean on layout file, and added opposite side view (nw)
This commit is contained in:
David Haywood 2019-10-23 15:20:09 +01:00 committed by R. Belmont
parent 7c8607e42c
commit be13cc8120
2 changed files with 168 additions and 114 deletions

View File

@ -113,7 +113,7 @@ void spdheat_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
.x.. .... .... .... = X flip
x... .... .... .... = Y flip
3: .... .xxx xxxx xxxx = X position
3: .... ..xx xxxx xxxx = X position
*/
for (int offs = (0x800 / 2) - 4; offs >= 0; offs -= 4)
@ -122,21 +122,19 @@ void spdheat_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
int color = (m_spriteram[offs + 2] >> 10) & 0x0f;
int y = 256 - ((m_spriteram[offs + 1] & 0x0ff));
int x = (int16_t)(m_spriteram[offs + 3] & 0xffff);
int x = (m_spriteram[offs + 3] & 0x3ff);
int flipx = BIT(m_spriteram[offs + 2], 14);
int flipy = BIT(m_spriteram[offs + 2], 15);
// TODO: revisit
if (xo == 0 && x >= 0)
x &= 0x3ff;
if (xo == 1)
{
if (x < 384)
continue;
x -= 512;
x -= 0x200;
}
else
{
if (x & 0x200)
x -= 0x400;
}
if (yo != BIT(m_spriteram[offs + 1], 9))
@ -496,9 +494,9 @@ static INPUT_PORTS_START( spdheat )
PORT_DIPNAME( 0x0040, 0x0040, "Round Skip (With Select Buttons)" ) PORT_DIPLOCATION("DSWA:7")
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, "Functions of CPU-Controlled Cars" ) PORT_DIPLOCATION("DSWA:8")
PORT_DIPSETTING( 0x0080, "Continuous" )
PORT_DIPSETTING( 0x0000, "Not Continuous" )
PORT_DIPNAME( 0x0080, 0x0080, "CPU Keeps Collected Upgrades Between Races" ) PORT_DIPLOCATION("DSWA:8") // "Functions of CPU-Controlled Cars"
PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) // "Not Continuous"
PORT_DIPSETTING( 0x0080, DEF_STR( Yes ) ) // "Continuous"
PORT_START("DSWB")
PORT_DIPNAME( 0x000F, 0x0000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSWB:1,2,3,4")
@ -542,16 +540,16 @@ static INPUT_PORTS_START( spdheat )
PORT_DIPSETTING( 0x0008, DEF_STR( Normal ) ) // 200
PORT_DIPSETTING( 0x0004, DEF_STR( Hard ) ) // 190
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) // 180
PORT_DIPNAME( 0x0010, 0x0000, "Coin Display" ) PORT_DIPLOCATION("DSWC:5")
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0010, 0x0010, "Display Coins per Credit" ) PORT_DIPLOCATION("DSWC:5")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0010, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Language ) ) PORT_DIPLOCATION("DSWC:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Japanese ) )
PORT_DIPSETTING( 0x0000, DEF_STR( English ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSWC:7")
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, "Coin System" ) PORT_DIPLOCATION("DSWC:8")
PORT_DIPNAME( 0x0080, 0x0080, "Coin System" ) PORT_DIPLOCATION("DSWC:8") // what does this do?
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )

View File

@ -81,6 +81,43 @@
</bezel>
</view>
<view name="Quadruple (with shifters, opposite side)">
<screen index="0">
<bounds x="4.25" y="0" width="4" height="3" />
<orientation rotate="180" />
</screen>
<bezel element="shifter" inputtag="IN0" inputmask="0x0001" >
<bounds x="4.2625" y="0.0125" width="0.2" height="0.4" />
<color alpha="0.6" />
<orientation rotate="180" />
</bezel>
<screen index="1">
<bounds x="0" y="0" width="4" height="3" />
<orientation rotate="180" />
</screen>
<bezel element="shifter" inputtag="IN0" inputmask="0x0010">
<bounds x="0.0125" y="0.0125" width="0.2" height="0.4" />
<color alpha="0.6" />
<orientation rotate="180" />
</bezel>
<screen index="2">
<bounds x="4.25" y="3.25" width="4" height="3" />
<orientation rotate="180" />
</screen>
<bezel element="shifter" inputtag="IN1" inputmask="0x0001" >
<bounds x="8.0375" y="5.8375" width="0.2" height="0.4" />
<color alpha="0.6" />
</bezel>
<screen index="3">
<bounds x="0" y="3.25" width="4" height="3" />
<orientation rotate="180" />
</screen>
<bezel element="shifter" inputtag="IN1" inputmask="0x0010" >
<bounds x="3.7875" y="5.8375" width="0.2" height="0.4" />
<color alpha="0.6" />
</bezel>
</view>
<view name="Quadruple">
<screen index="0">
<bounds x="0" y="3.25" width="4" height="3" />
@ -95,4 +132,23 @@
<bounds x="4.25" y="0" width="4" height="3" />
</screen>
</view>
<view name="Quadruple (opposite side)">
<screen index="0">
<bounds x="4.25" y="0" width="4" height="3" />
<orientation rotate="180" />
</screen>
<screen index="1">
<bounds x="0" y="0" width="4" height="3" />
<orientation rotate="180" />
</screen>
<screen index="2">
<bounds x="4.25" y="3.25" width="4" height="3" />
<orientation rotate="180" />
</screen>
<screen index="3">
<bounds x="0" y="3.25" width="4" height="3" />
<orientation rotate="180" />
</screen>
</view>
</mamelayout>