From 1a560c368b61f550511cc8476f925a7eecff5c06 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sun, 26 Aug 2012 06:28:54 +0000 Subject: [PATCH] zac_proto: added dipswitches; flicker: added standard buttons --- src/mame/drivers/flicker.c | 29 ++++--- src/mame/drivers/zac_proto.c | 153 +++++++++++++++++++++++++++++++--- src/mame/layout/zac_proto.lay | 8 +- 3 files changed, 159 insertions(+), 31 deletions(-) diff --git a/src/mame/drivers/flicker.c b/src/mame/drivers/flicker.c index efbd4ce3efd..b32aef115f6 100644 --- a/src/mame/drivers/flicker.c +++ b/src/mame/drivers/flicker.c @@ -66,14 +66,14 @@ ADDRESS_MAP_END static INPUT_PORTS_START( flicker ) PORT_START("TEST") PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME) - PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1 coin credit") PORT_CODE(KEYCODE_5) - PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2 credit") PORT_CODE(KEYCODE_6) - PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3 credit") PORT_CODE(KEYCODE_7) - PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4 credit") PORT_CODE(KEYCODE_8) - PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("5 credit") PORT_CODE(KEYCODE_9) - PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("6 credit") PORT_CODE(KEYCODE_0) - PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Tilt") PORT_CODE(KEYCODE_T) - PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Start") PORT_CODE(KEYCODE_1) + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_COIN1) // 1 credit + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_COIN2) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_COIN3) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_COIN4) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_COIN5) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_COIN6) // 6 credits + PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_TILT) + PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_START) PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test") PORT_START("B0") @@ -111,7 +111,7 @@ INPUT_PORTS_END READ8_MEMBER( flicker_state::port02_r ) { - offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x20; // we need the full address + offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address if (offset < 7) { @@ -132,10 +132,9 @@ WRITE8_MEMBER( flicker_state::port00_w ) WRITE8_MEMBER( flicker_state::port01_w ) { // The output lines operate the various lamps (44 of them) - offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address + offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address - if (offset < 0x10) - i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset)); + i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset)); } WRITE8_MEMBER( flicker_state::port10_w ) @@ -152,7 +151,7 @@ WRITE8_MEMBER( flicker_state::port10_w ) 9 = knocker A = coin counter B = coin acceptor */ - offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address + offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address if (data && data != offset) { switch (offset) @@ -174,8 +173,8 @@ WRITE8_MEMBER( flicker_state::port10_w ) beep_set_frequency(m_beeper, 200); break; case 0x0a: - coin_counter_w(machine(), 0, 1); - coin_counter_w(machine(), 0, 0); + //coin_counter_w(machine(), 0, 1); + //coin_counter_w(machine(), 0, 0); break; default: break; diff --git a/src/mame/drivers/zac_proto.c b/src/mame/drivers/zac_proto.c index c336bf84ea2..890bb9563eb 100644 --- a/src/mame/drivers/zac_proto.c +++ b/src/mame/drivers/zac_proto.c @@ -1,6 +1,21 @@ -/* +/********************************************************************* Zaccaria Prototype -*/ + + These use the INS8060 (SC/MP) processor, and are Zaccaria's first + digital machines. + +The inputs work with 'strike' and 'skijump'. +The playboard inputs are unknown. + +ToDo: +- Proper artwork +- Mirrors of ram and switches +- battery backup of ram +- Inputs +- Outputs +- Sound + +**********************************************************************/ #include "emu.h" #include "cpu/scmp/scmp.h" @@ -25,14 +40,12 @@ protected: // driver_device overrides virtual void machine_reset(); -public: - DECLARE_DRIVER_INIT(zac_proto); }; static ADDRESS_MAP_START( zac_proto_map, AS_PROGRAM, 8, zac_proto_state ) AM_RANGE(0x0000, 0x0bff) AM_ROM - AM_RANGE(0x0c00, 0x0dff) AM_RAM + AM_RANGE(0x0d00, 0x0dff) AM_RAM AM_RANGE(0x0e00, 0x0e00) AM_READ_PORT("PL0") AM_RANGE(0x0e01, 0x0e01) AM_READ_PORT("PL1") AM_RANGE(0x0e02, 0x0e02) AM_READ_PORT("PL2") @@ -51,22 +64,142 @@ ADDRESS_MAP_END static INPUT_PORTS_START( zac_proto ) // playfield inputs PORT_START("PL0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_START ) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_START("PL1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_START("PL2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_START("PL3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_START("PL4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) + // dipswitches PORT_START("PL5") + PORT_DIPNAME( 0x0f, 0x02, "Coinage Slot 1" ) + PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 2C_5C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 2C_7C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x09, "2 Coins/9 Credits" ) + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0b, "2 Coins/11 Credits" ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x0d, "2 Coins/13 Credits" ) + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_7C ) ) + PORT_DIPSETTING( 0x0f, "2 Coins/15 Credits" ) + PORT_DIPNAME( 0xf0, 0x20, "Coinage Slot 2" ) + PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x50, DEF_STR( 2C_5C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x70, DEF_STR( 2C_7C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x90, "2 Coins/9 Credits" ) + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0xb0, "2 Coins/11 Credits" ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0xd0, "2 Coins/13 Credits" ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_7C ) ) + PORT_DIPSETTING( 0xf0, "2 Coins/15 Credits" ) + PORT_START("PL6") + PORT_DIPNAME( 0x03, 0x01, "High Score" ) + PORT_DIPSETTING( 0x00, "0" ) + PORT_DIPSETTING( 0x01, "1" ) + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x03, "3" ) + PORT_DIPNAME( 0x04, 0x04, "Beat High Score" ) + PORT_DIPSETTING( 0x04, "Super Bonus" ) + PORT_DIPSETTING( 0x00, "Game" ) + PORT_DIPNAME( 0x08, 0x08, "Match" ) + PORT_DIPSETTING( 0x08, "Enabled" ) + PORT_DIPSETTING( 0x00, "Disabled" ) + PORT_DIPNAME( 0x30, 0x20, "Beat High/Random Score" ) + PORT_DIPSETTING( 0x00, "500000 points" ) + PORT_DIPSETTING( 0x10, "Extra Ball" ) + PORT_DIPSETTING( 0x20, "Extra Game" ) + PORT_DIPSETTING( 0x30, "Super Bonus" ) + PORT_DIPNAME( 0xc0, 0x80, "Reward for Special" ) + PORT_DIPSETTING( 0x00, "500000 points" ) + PORT_DIPSETTING( 0x40, "Extra Ball" ) + PORT_DIPSETTING( 0x80, "Extra Game" ) + PORT_DIPSETTING( 0xc0, "Super Bonus" ) + PORT_START("PL7") + PORT_DIPNAME( 0x01, 0x00, "Random" ) + PORT_DIPSETTING( 0x00, "Enabled" ) + PORT_DIPSETTING( 0x01, "Disabled" ) + PORT_DIPNAME( 0x06, 0x02, "Balls" ) + PORT_DIPSETTING( 0x00, "1" ) + PORT_DIPSETTING( 0x02, "3" ) + PORT_DIPSETTING( 0x04, "5" ) + PORT_DIPSETTING( 0x06, "7" ) + PORT_DIPNAME( 0x18, 0x10, "Strikes to get special" ) + PORT_DIPSETTING( 0x00, "1" ) + PORT_DIPSETTING( 0x08, "2" ) + PORT_DIPSETTING( 0x10, "3" ) + PORT_DIPSETTING( 0x18, "4" ) + PORT_DIPNAME( 0x20, 0x20, "Unlimited Specials" ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPNAME( 0x40, 0x40, "Bonus Ball Award" ) + PORT_DIPSETTING( 0x40, "Extra Ball" ) + PORT_DIPSETTING( 0x00, "200000 points" ) + PORT_DIPNAME( 0x80, 0x80, "SW24" ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) INPUT_PORTS_END WRITE8_MEMBER( zac_proto_state::out0_w ) { +// solenoids } WRITE8_MEMBER( zac_proto_state::out1_w ) { +// lamps } // need to implement blanking of leading zeroes @@ -89,10 +222,6 @@ void zac_proto_state::machine_reset() output_set_digit_value(10, 0x3f); // units shows zero all the time } -DRIVER_INIT_MEMBER(zac_proto_state,zac_proto) -{ -} - static MACHINE_CONFIG_START( zac_proto, zac_proto_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", SCMP, 1000000) @@ -135,6 +264,6 @@ ROM_START(spacecty) ROM_LOAD("zsc4.dat", 0x1400, 0x0400, CRC(69e0bb95) SHA1(d9a1d0159bf49445b0ece0f9d7806ed80657c2b2)) ROM_END -GAME(1978, skijump, 0, zac_proto, zac_proto, zac_proto_state, zac_proto, ROT0, "Zaccaria", "Ski Jump", GAME_IS_SKELETON_MECHANICAL) -GAME(1979, spacecty, 0, zac_proto, zac_proto, zac_proto_state, zac_proto, ROT0, "Zaccaria", "Space City", GAME_IS_SKELETON_MECHANICAL) -GAME(1978, strike, 0, zac_proto, zac_proto, zac_proto_state, zac_proto, ROT0, "Zaccaria", "Strike", GAME_IS_SKELETON_MECHANICAL) +GAME(1978, skijump, 0, zac_proto, zac_proto, driver_device, 0, ROT0, "Zaccaria", "Ski Jump", GAME_IS_SKELETON_MECHANICAL) +GAME(1979, spacecty, 0, zac_proto, zac_proto, driver_device, 0, ROT0, "Zaccaria", "Space City", GAME_IS_SKELETON_MECHANICAL) +GAME(1978, strike, 0, zac_proto, zac_proto, driver_device, 0, ROT0, "Zaccaria", "Strike", GAME_IS_SKELETON_MECHANICAL) diff --git a/src/mame/layout/zac_proto.lay b/src/mame/layout/zac_proto.lay index 8eea6a5cea5..6258b715d47 100644 --- a/src/mame/layout/zac_proto.lay +++ b/src/mame/layout/zac_proto.lay @@ -49,16 +49,16 @@ - + - + - + - +