mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
Merge pull request #1818 from ajrhacker/mustache_flip
mustache.cpp: Flip screen improvements
This commit is contained in:
commit
d12904d9a7
@ -92,25 +92,25 @@ static INPUT_PORTS_START( mustache )
|
||||
PORT_BIT( 0xf9, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("DSWA")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW 2:!1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW 2:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
|
||||
PORT_DIPNAME( 0x06, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW 2:!2,!3")
|
||||
PORT_DIPNAME( 0x06, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW 2:2,3")
|
||||
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW 2:!4,!5")
|
||||
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW 2:4,5")
|
||||
PORT_DIPSETTING( 0x10, "1" )
|
||||
PORT_DIPSETTING( 0x18, "3" )
|
||||
PORT_DIPSETTING( 0x08, "4" )
|
||||
PORT_DIPSETTING( 0x00, "5" )
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW 2:!6")
|
||||
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW 2:6")
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSWB")
|
||||
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW 1:!1,!2,!3")
|
||||
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW 1:1,2,3")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
|
||||
@ -119,16 +119,18 @@ static INPUT_PORTS_START( mustache )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW 1:!4,!5")
|
||||
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW 1:4,5")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
|
||||
PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SW 1:!6")
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW 1:!7")
|
||||
PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SW 1:6")
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW 1:7")
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
// There is an 8th dipswitch here, which controls screen flip, but the operator sheet implies it does it via hardware, i.e. not readable by cpu. May need further investigation.
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW 1:8")
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
@ -12,7 +12,8 @@ public:
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram") { }
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_dswb(*this, "DSWB") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
@ -22,6 +23,8 @@ public:
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_shared_ptr<uint8_t> m_spriteram;
|
||||
|
||||
required_ioport m_dswb;
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_control_byte;
|
||||
|
||||
|
@ -54,14 +54,12 @@ WRITE8_MEMBER(mustache_state::videoram_w)
|
||||
|
||||
WRITE8_MEMBER(mustache_state::video_control_w)
|
||||
{
|
||||
if (flip_screen() != (data & 0x01))
|
||||
{
|
||||
flip_screen_set(data & 0x01);
|
||||
machine().tilemap().mark_all_dirty();
|
||||
}
|
||||
/* It is assumed that screen flipping is controlled by both
|
||||
hardware (via a DIP switch, labeled "Hard SW" on the
|
||||
operator's sheet) and software, as in some Irem games */
|
||||
flip_screen_set((data & 0x01) ^ BIT(~m_dswb->read(), 7));
|
||||
|
||||
/* tile bank */
|
||||
|
||||
if ((m_control_byte ^ data) & 0x08)
|
||||
{
|
||||
m_control_byte = data;
|
||||
@ -128,7 +126,7 @@ void mustache_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
|
||||
if (flip_screen())
|
||||
{
|
||||
sx = 240 - sx;
|
||||
sy = 240 - sy;
|
||||
sy = 232 - sy;
|
||||
}
|
||||
|
||||
gfx->transpen(bitmap,clip,
|
||||
|
Loading…
Reference in New Issue
Block a user