mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
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:
parent
7c8607e42c
commit
be13cc8120
@ -105,15 +105,15 @@ void spdheat_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
|
||||
0: .... .... .... .... = ?
|
||||
|
||||
1: .... .... xxxx xxxx = Y position
|
||||
.... ..x. .... .... = Y position
|
||||
x... .... .... .... = 0 = 16x16, 1 = 16x32
|
||||
.... ..x. .... .... = Y position
|
||||
x... .... .... .... = 0 = 16x16, 1 = 16x32
|
||||
|
||||
2: .... ..xx xxxx xxxx = Code
|
||||
..xx xx.. .... .... = Color
|
||||
.x.. .... .... .... = X flip
|
||||
x... .... .... .... = Y flip
|
||||
..xx xx.. .... .... = Color
|
||||
.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 ) )
|
||||
|
||||
|
@ -1,98 +1,154 @@
|
||||
<?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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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 index="2">
|
||||
<bounds x="0" y="0" width="4" height="3" />
|
||||
</screen>
|
||||
<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" />
|
||||
</screen>
|
||||
<screen index="1">
|
||||
<bounds x="4.25" y="3.25" width="4" height="3" />
|
||||
</screen>
|
||||
<screen index="2">
|
||||
<bounds x="0" y="0" width="4" height="3" />
|
||||
</screen>
|
||||
<screen index="3">
|
||||
<bounds x="4.25" y="0" width="4" height="3" />
|
||||
</screen>
|
||||
</view>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user