diff --git a/src/mame/drivers/megadriv_acbl.cpp b/src/mame/drivers/megadriv_acbl.cpp index aa6c221fb2e..4fb1da9d165 100644 --- a/src/mame/drivers/megadriv_acbl.cpp +++ b/src/mame/drivers/megadriv_acbl.cpp @@ -331,19 +331,6 @@ READ16_MEMBER(md_boot_state::aladmdb_r ) return 0x0000; } -READ16_MEMBER(md_boot_state::sonic2mb_r ) -{ - if (m_maincpu->pc()==0x00010a) - return ioport("COIN")->read() & 0x03; - - if (m_maincpu->pc()==0x000318) - return ioport("MCU")->read() << 8; // DSW - - //logerror("sonic2mb_r : %06x\n",m_maincpu->pc()); - - return 0x0000; -} - READ16_MEMBER(md_boot_state::twinktmb_r ) { if (m_maincpu->pc()==0x02f81e) @@ -633,29 +620,35 @@ INPUT_PORTS_START( aladmdb ) INPUT_PORTS_END INPUT_PORTS_START( sonic2mb ) - PORT_INCLUDE( aladmdb ) + PORT_INCLUDE( md_common ) - /* As I don't know how it is on real hardware, this is more a guess than anything */ - PORT_MODIFY("MCU") - PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x01, "2" ) - PORT_DIPSETTING( 0x02, "3" ) - PORT_DIPSETTING( 0x03, "4" ) - PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3") - PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4") - PORT_DIPNAME( 0x30, 0x20, "Timer Speed" ) PORT_DIPLOCATION("SW1:5,6") - PORT_DIPSETTING( 0x30, "Slowest" ) - PORT_DIPSETTING( 0x20, "Normal" ) - PORT_DIPSETTING( 0x10, "Fast" ) - PORT_DIPSETTING( 0x00, "Fastest" ) - PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7") - PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8") - PORT_DIPUNUSED( 0x100, IP_ACTIVE_HIGH ) + PORT_MODIFY("PAD1") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) - PORT_START("COIN") + PORT_MODIFY("PAD2") + PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("DSW") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x0300, 0x0200, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2") + PORT_DIPSETTING( 0x0000, "1" ) + PORT_DIPSETTING( 0x0100, "2" ) + PORT_DIPSETTING( 0x0200, "3" ) + PORT_DIPSETTING( 0x0300, "4" ) + PORT_DIPUNKNOWN_DIPLOC(0x0400, 0x0400, "SW1:3") + PORT_DIPUNKNOWN_DIPLOC(0x0800, 0x0800, "SW1:4") + PORT_DIPNAME( 0x3000, 0x2000, "Timer Speed" ) PORT_DIPLOCATION("SW1:5,6") + PORT_DIPSETTING( 0x3000, "Slowest" ) + PORT_DIPSETTING( 0x2000, "Normal" ) + PORT_DIPSETTING( 0x1000, "Fast" ) + PORT_DIPSETTING( 0x0000, "Fastest" ) + PORT_DIPUNKNOWN_DIPLOC(0x4000, 0x4000, "SW1:7") + PORT_DIPUNKNOWN_DIPLOC(0x8000, 0x8000, "SW1:8") INPUT_PORTS_END INPUT_PORTS_START( twinktmb ) @@ -1056,9 +1049,9 @@ void md_boot_state::init_barek3() void md_boot_state::init_sonic2mb() { - // 100000 = writes to mcu? 300000 = reads? + // 100000 = writes to unpopulated MCU? m_maincpu->space(AS_PROGRAM).install_write_handler(0x100000, 0x100001, write16_delegate(FUNC(md_boot_state::aladmdb_w),this)); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x300000, 0x300001, read16_delegate(FUNC(md_boot_state::sonic2mb_r),this)); + m_maincpu->space(AS_PROGRAM).install_read_port(0x300000, 0x300001, "DSW"); init_megadrij(); } diff --git a/src/mame/includes/megadriv_acbl.h b/src/mame/includes/megadriv_acbl.h index 85053208011..f2a3d07dfd0 100644 --- a/src/mame/includes/megadriv_acbl.h +++ b/src/mame/includes/megadriv_acbl.h @@ -33,7 +33,6 @@ private: DECLARE_READ16_MEMBER(bl_710000_r); DECLARE_WRITE16_MEMBER(aladmdb_w); DECLARE_READ16_MEMBER(aladmdb_r); - DECLARE_READ16_MEMBER(sonic2mb_r); DECLARE_READ16_MEMBER(twinktmb_r); DECLARE_READ16_MEMBER(mk3mdb_dsw_r); DECLARE_READ16_MEMBER(ssf2mdb_dsw_r);