Previous 15994 Revisions Next

r6106 Friday 16th October, 2009 at 17:44:04 UTC by Angelo Salese
[X1]: Implemented IPL & NMI reset front panel buttons
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r6105r6106
15541554 *
15551555 *************************************/
15561556
1557static INPUT_CHANGED( ipl_reset )
1558{
1559   const address_space *space = cputag_get_address_space(field->port->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
1560   UINT8 *ROM = memory_region(space->machine, "maincpu");
1561
1562   cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
1563   memory_set_bankptr(space->machine, 1, &ROM[0x00000]);
1564
1565   //anything else?
1566}
1567
1568/* Apparently most games doesn't support this (not even the Konami ones!), one that does is...177 :o */
1569static INPUT_CHANGED( nmi_reset )
1570{
1571   cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
1572}
1573
15571574static INPUT_PORTS_START( x1 )
1575   PORT_START("FP_SYS") //front panel buttons, hard-wired with the soft reset/NMI lines
1576   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CHANGED(ipl_reset,0) PORT_NAME("IPL reset")
1577   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CHANGED(nmi_reset,0) PORT_NAME("NMI reset")
1578
15581579   PORT_START("SYSTEM")
1559   PORT_DIPNAME( 0x01, 0x01, "SYSTEM" )
1560   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1561   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1562   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
1563   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1564   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1565   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
1566   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1567   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1568   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
1569   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1570   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1571   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
1580   PORT_DIPNAME( 0x10, 0x10, "unk" )
15721581   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
15731582   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1574   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1575   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1576   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1577   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
1578   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1579   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1580   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
15811583
1582   PORT_START("IOSYS")
1584   PORT_START("IOSYS") //TODO: implement front-panel DIP-SW here
15831585   PORT_DIPNAME( 0x01, 0x01, "IOSYS" )
15841586   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
15851587   PORT_DIPSETTING(    0x00, DEF_STR( On ) )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team