mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
this is another scroll register, not flip (nw)
This commit is contained in:
parent
570c8cf82f
commit
f74b4e7754
@ -133,7 +133,7 @@ static ADDRESS_MAP_START( himesiki_iom0, AS_IO, 8, himesiki_state )
|
||||
AM_RANGE(0x05, 0x05) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x06, 0x06) AM_WRITE(himesiki_rombank_w)
|
||||
AM_RANGE(0x07, 0x07) AM_WRITENOP // 8255 cw
|
||||
AM_RANGE(0x08, 0x08) AM_WRITE(himesiki_flip_w)
|
||||
AM_RANGE(0x08, 0x08) AM_WRITE(himesiki_scrolly_w)
|
||||
AM_RANGE(0x09, 0x0a) AM_WRITE(himesiki_scrollx_w)
|
||||
AM_RANGE(0x0b, 0x0b) AM_WRITE(himesiki_sound_w)
|
||||
ADDRESS_MAP_END
|
||||
@ -233,6 +233,92 @@ static INPUT_PORTS_START( himesiki )
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( androidp )
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("1P")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("2P")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("OTHERS")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // coin?
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN2 ) // service?
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
static const gfx_layout layout1 =
|
||||
@ -283,6 +369,8 @@ void himesiki_state::machine_start()
|
||||
|
||||
|
||||
save_item(NAME(m_scrollx));
|
||||
save_item(NAME(m_scrolly));
|
||||
|
||||
save_item(NAME(m_flipscreen));
|
||||
}
|
||||
|
||||
@ -290,6 +378,8 @@ void himesiki_state::machine_reset()
|
||||
{
|
||||
m_scrollx[0] = 0;
|
||||
m_scrollx[1] = 0;
|
||||
m_scrolly = 0;
|
||||
|
||||
m_flipscreen = 0;
|
||||
}
|
||||
|
||||
@ -323,6 +413,7 @@ static MACHINE_CONFIG_START( himesiki, himesiki_state )
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("ym2203", YM2203, MCLK/4)
|
||||
MCFG_YM2203_IRQ_HANDLER(INPUTLINE("sub", 0))
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.10)
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.10)
|
||||
MCFG_SOUND_ROUTE(2, "mono", 0.10)
|
||||
@ -393,4 +484,4 @@ ROM_END
|
||||
|
||||
GAME( 1989, himesiki, 0, himesiki, himesiki, driver_device, 0, ROT90, "Hi-Soft", "Himeshikibu (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 198?, androidp, 0, himesiki, himesiki, driver_device, 0, ROT90, "Nasco", "Android (early build?)", MACHINE_NOT_WORKING )
|
||||
GAME( 198?, androidp, 0, himesiki, androidp, driver_device, 0, ROT90, "Nasco", "Android (early build?)", MACHINE_NOT_WORKING )
|
||||
|
@ -25,6 +25,8 @@ public:
|
||||
/* video-related */
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_scrollx[2];
|
||||
int m_scrolly;
|
||||
|
||||
int m_flipscreen;
|
||||
|
||||
/* devices */
|
||||
@ -33,7 +35,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(himesiki_sound_w);
|
||||
DECLARE_WRITE8_MEMBER(himesiki_bg_ram_w);
|
||||
DECLARE_WRITE8_MEMBER(himesiki_scrollx_w);
|
||||
DECLARE_WRITE8_MEMBER(himesiki_flip_w);
|
||||
DECLARE_WRITE8_MEMBER(himesiki_scrolly_w);
|
||||
// DECLARE_WRITE8_MEMBER(himesiki_flip_w);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
@ -38,6 +38,12 @@ WRITE8_MEMBER(himesiki_state::himesiki_scrollx_w)
|
||||
m_scrollx[offset] = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(himesiki_state::himesiki_scrolly_w)
|
||||
{
|
||||
m_scrolly = data;
|
||||
}
|
||||
|
||||
#if 0 // this can't be flipscreen (android uses it for scroll, same PCB)
|
||||
WRITE8_MEMBER(himesiki_state::himesiki_flip_w)
|
||||
{
|
||||
m_flipscreen = data & 0xc0;
|
||||
@ -46,6 +52,7 @@ WRITE8_MEMBER(himesiki_state::himesiki_flip_w)
|
||||
if (data & 0x3f)
|
||||
logerror("p08_w %02x\n",data);
|
||||
}
|
||||
#endif
|
||||
|
||||
void himesiki_state::himesiki_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
@ -119,6 +126,7 @@ UINT32 himesiki_state::screen_update_himesiki(screen_device &screen, bitmap_ind1
|
||||
{
|
||||
int x = -(m_scrollx[0] << 8 | m_scrollx[1]) & 0x1ff;
|
||||
m_bg_tilemap->set_scrolldx(x, x);
|
||||
m_bg_tilemap->set_scrolldy(-m_scrolly, -m_scrolly);
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||
himesiki_draw_sprites(bitmap, cliprect);
|
||||
|
Loading…
Reference in New Issue
Block a user