hh_cop400: added handlers to plus1

This commit is contained in:
hap 2016-03-05 08:02:06 +01:00
parent 2d8aa85227
commit a38c82c236
2 changed files with 24 additions and 4 deletions

View File

@ -653,16 +653,33 @@ public:
plus1_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_cop400_state(mconfig, type, tag)
{ }
DECLARE_WRITE8_MEMBER(write_d);
};
// handlers
//..
WRITE8_MEMBER(plus1_state::write_d)
{
// D?: speaker out
m_speaker->level_w(data & 1);
}
// config
static INPUT_PORTS_START( plus1 )
PORT_START("IN.0") // port G
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN.1") // port L
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
INPUT_PORTS_END
static MACHINE_CONFIG_START( plus1, plus1_state )
@ -670,6 +687,9 @@ static MACHINE_CONFIG_START( plus1, plus1_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", COP410, 1000000) // approximation - RC osc. R=51K to +5V, C=100pf to GND
MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true) // guessed
MCFG_COP400_WRITE_D_CB(WRITE8(plus1_state, write_d))
MCFG_COP400_READ_G_CB(IOPORT("IN.0"))
MCFG_COP400_READ_L_CB(IOPORT("IN.1"))
/* no visual feedback! */

View File

@ -58,10 +58,10 @@
@88 HD38820A 1984, Bandai Pair Match (PT-460) (1/2)
@89 HD38820A 1984, Bandai Pair Match (PT-460) (2/2)
*75 HD44801A 1982, Alpha 8201 protection MCU (have dump)
75 HD44801A 1982, Alpha 8201 protection MCU -> machine/alpha8201.*
*35 HD44801B 1983, Alpha 8302 protection MCU (have dump)
*42 HD44801B 1984, Alpha 8303 protection MCU (have dump)
35 HD44801B 1983, Alpha 8302 protection MCU (see 8201)
42 HD44801B 1984, Alpha 8303 protection MCU (see 8201)
(* denotes not yet emulated by MAME, @ denotes it's in this driver)