trunk/src/mame/drivers/flicker.c
r17478 | r17479 | |
66 | 66 | static INPUT_PORTS_START( flicker ) |
67 | 67 | PORT_START("TEST") |
68 | 68 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME) |
69 | | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("1 coin credit") PORT_CODE(KEYCODE_5) |
70 | | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("2 credit") PORT_CODE(KEYCODE_6) |
71 | | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("3 credit") PORT_CODE(KEYCODE_7) |
72 | | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("4 credit") PORT_CODE(KEYCODE_8) |
73 | | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("5 credit") PORT_CODE(KEYCODE_9) |
74 | | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("6 credit") PORT_CODE(KEYCODE_0) |
75 | | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Tilt") PORT_CODE(KEYCODE_T) |
76 | | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Start") PORT_CODE(KEYCODE_1) |
| 69 | PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_COIN1) // 1 credit |
| 70 | PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_COIN2) |
| 71 | PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_COIN3) |
| 72 | PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_COIN4) |
| 73 | PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_COIN5) |
| 74 | PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_COIN6) // 6 credits |
| 75 | PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_TILT) |
| 76 | PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_START) |
77 | 77 | PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Test") |
78 | 78 | |
79 | 79 | PORT_START("B0") |
r17478 | r17479 | |
111 | 111 | |
112 | 112 | READ8_MEMBER( flicker_state::port02_r ) |
113 | 113 | { |
114 | | offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x20; // we need the full address |
| 114 | offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address |
115 | 115 | |
116 | 116 | if (offset < 7) |
117 | 117 | { |
r17478 | r17479 | |
132 | 132 | WRITE8_MEMBER( flicker_state::port01_w ) |
133 | 133 | { |
134 | 134 | // The output lines operate the various lamps (44 of them) |
135 | | offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address |
| 135 | offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address |
136 | 136 | |
137 | | if (offset < 0x10) |
138 | | i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset)); |
| 137 | i4004_set_test(m_maincpu, BIT(ioport("TEST")->read(), offset)); |
139 | 138 | } |
140 | 139 | |
141 | 140 | WRITE8_MEMBER( flicker_state::port10_w ) |
r17478 | r17479 | |
152 | 151 | 9 = knocker |
153 | 152 | A = coin counter |
154 | 153 | B = coin acceptor */ |
155 | | offset = cpu_get_reg(m_maincpu, I4004_RAM) - 0x10; // we need the full address |
| 154 | offset = cpu_get_reg(m_maincpu, I4004_RAM) & 0x0f; // we need the full address |
156 | 155 | if (data && data != offset) |
157 | 156 | { |
158 | 157 | switch (offset) |
r17478 | r17479 | |
174 | 173 | beep_set_frequency(m_beeper, 200); |
175 | 174 | break; |
176 | 175 | case 0x0a: |
177 | | coin_counter_w(machine(), 0, 1); |
178 | | coin_counter_w(machine(), 0, 0); |
| 176 | //coin_counter_w(machine(), 0, 1); |
| 177 | //coin_counter_w(machine(), 0, 0); |
179 | 178 | break; |
180 | 179 | default: |
181 | 180 | break; |
trunk/src/mame/drivers/zac_proto.c
r17478 | r17479 | |
1 | | /* |
| 1 | /********************************************************************* |
2 | 2 | Zaccaria Prototype |
3 | | */ |
4 | 3 | |
| 4 | These use the INS8060 (SC/MP) processor, and are Zaccaria's first |
| 5 | digital machines. |
| 6 | |
| 7 | The inputs work with 'strike' and 'skijump'. |
| 8 | The playboard inputs are unknown. |
| 9 | |
| 10 | ToDo: |
| 11 | - Proper artwork |
| 12 | - Mirrors of ram and switches |
| 13 | - battery backup of ram |
| 14 | - Inputs |
| 15 | - Outputs |
| 16 | - Sound |
| 17 | |
| 18 | **********************************************************************/ |
| 19 | |
5 | 20 | #include "emu.h" |
6 | 21 | #include "cpu/scmp/scmp.h" |
7 | 22 | #include "zac_proto.lh" |
r17478 | r17479 | |
25 | 40 | |
26 | 41 | // driver_device overrides |
27 | 42 | virtual void machine_reset(); |
28 | | public: |
29 | | DECLARE_DRIVER_INIT(zac_proto); |
30 | 43 | }; |
31 | 44 | |
32 | 45 | |
33 | 46 | static ADDRESS_MAP_START( zac_proto_map, AS_PROGRAM, 8, zac_proto_state ) |
34 | 47 | AM_RANGE(0x0000, 0x0bff) AM_ROM |
35 | | AM_RANGE(0x0c00, 0x0dff) AM_RAM |
| 48 | AM_RANGE(0x0d00, 0x0dff) AM_RAM |
36 | 49 | AM_RANGE(0x0e00, 0x0e00) AM_READ_PORT("PL0") |
37 | 50 | AM_RANGE(0x0e01, 0x0e01) AM_READ_PORT("PL1") |
38 | 51 | AM_RANGE(0x0e02, 0x0e02) AM_READ_PORT("PL2") |
r17478 | r17479 | |
51 | 64 | static INPUT_PORTS_START( zac_proto ) |
52 | 65 | // playfield inputs |
53 | 66 | PORT_START("PL0") |
| 67 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 68 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 69 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_START ) |
| 70 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) |
| 71 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) |
| 72 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) |
| 73 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 74 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
54 | 75 | PORT_START("PL1") |
| 76 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) |
| 77 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) |
| 78 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) |
| 79 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) |
| 80 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) |
| 81 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) |
| 82 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 83 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
55 | 84 | PORT_START("PL2") |
| 85 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) |
| 86 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) |
| 87 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) |
| 88 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) |
| 89 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) |
| 90 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) |
| 91 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 92 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
56 | 93 | PORT_START("PL3") |
| 94 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) |
| 95 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) |
| 96 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) |
| 97 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) |
| 98 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) |
| 99 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) |
| 100 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 101 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
57 | 102 | PORT_START("PL4") |
| 103 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) |
| 104 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) |
| 105 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) |
| 106 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) |
| 107 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) |
| 108 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) |
| 109 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 110 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
| 111 | |
58 | 112 | // dipswitches |
59 | 113 | PORT_START("PL5") |
| 114 | PORT_DIPNAME( 0x0f, 0x02, "Coinage Slot 1" ) |
| 115 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) |
| 116 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_1C ) ) |
| 117 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 118 | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 119 | PORT_DIPSETTING( 0x05, DEF_STR( 2C_5C ) ) |
| 120 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_3C ) ) |
| 121 | PORT_DIPSETTING( 0x07, DEF_STR( 2C_7C ) ) |
| 122 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) ) |
| 123 | PORT_DIPSETTING( 0x09, "2 Coins/9 Credits" ) |
| 124 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_5C ) ) |
| 125 | PORT_DIPSETTING( 0x0b, "2 Coins/11 Credits" ) |
| 126 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) ) |
| 127 | PORT_DIPSETTING( 0x0d, "2 Coins/13 Credits" ) |
| 128 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_7C ) ) |
| 129 | PORT_DIPSETTING( 0x0f, "2 Coins/15 Credits" ) |
| 130 | PORT_DIPNAME( 0xf0, 0x20, "Coinage Slot 2" ) |
| 131 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| 132 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) ) |
| 133 | PORT_DIPSETTING( 0x30, DEF_STR( 2C_3C ) ) |
| 134 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) |
| 135 | PORT_DIPSETTING( 0x50, DEF_STR( 2C_5C ) ) |
| 136 | PORT_DIPSETTING( 0x60, DEF_STR( 1C_3C ) ) |
| 137 | PORT_DIPSETTING( 0x70, DEF_STR( 2C_7C ) ) |
| 138 | PORT_DIPSETTING( 0x80, DEF_STR( 1C_4C ) ) |
| 139 | PORT_DIPSETTING( 0x90, "2 Coins/9 Credits" ) |
| 140 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_5C ) ) |
| 141 | PORT_DIPSETTING( 0xb0, "2 Coins/11 Credits" ) |
| 142 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) ) |
| 143 | PORT_DIPSETTING( 0xd0, "2 Coins/13 Credits" ) |
| 144 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_7C ) ) |
| 145 | PORT_DIPSETTING( 0xf0, "2 Coins/15 Credits" ) |
| 146 | |
60 | 147 | PORT_START("PL6") |
| 148 | PORT_DIPNAME( 0x03, 0x01, "High Score" ) |
| 149 | PORT_DIPSETTING( 0x00, "0" ) |
| 150 | PORT_DIPSETTING( 0x01, "1" ) |
| 151 | PORT_DIPSETTING( 0x02, "2" ) |
| 152 | PORT_DIPSETTING( 0x03, "3" ) |
| 153 | PORT_DIPNAME( 0x04, 0x04, "Beat High Score" ) |
| 154 | PORT_DIPSETTING( 0x04, "Super Bonus" ) |
| 155 | PORT_DIPSETTING( 0x00, "Game" ) |
| 156 | PORT_DIPNAME( 0x08, 0x08, "Match" ) |
| 157 | PORT_DIPSETTING( 0x08, "Enabled" ) |
| 158 | PORT_DIPSETTING( 0x00, "Disabled" ) |
| 159 | PORT_DIPNAME( 0x30, 0x20, "Beat High/Random Score" ) |
| 160 | PORT_DIPSETTING( 0x00, "500000 points" ) |
| 161 | PORT_DIPSETTING( 0x10, "Extra Ball" ) |
| 162 | PORT_DIPSETTING( 0x20, "Extra Game" ) |
| 163 | PORT_DIPSETTING( 0x30, "Super Bonus" ) |
| 164 | PORT_DIPNAME( 0xc0, 0x80, "Reward for Special" ) |
| 165 | PORT_DIPSETTING( 0x00, "500000 points" ) |
| 166 | PORT_DIPSETTING( 0x40, "Extra Ball" ) |
| 167 | PORT_DIPSETTING( 0x80, "Extra Game" ) |
| 168 | PORT_DIPSETTING( 0xc0, "Super Bonus" ) |
| 169 | |
61 | 170 | PORT_START("PL7") |
| 171 | PORT_DIPNAME( 0x01, 0x00, "Random" ) |
| 172 | PORT_DIPSETTING( 0x00, "Enabled" ) |
| 173 | PORT_DIPSETTING( 0x01, "Disabled" ) |
| 174 | PORT_DIPNAME( 0x06, 0x02, "Balls" ) |
| 175 | PORT_DIPSETTING( 0x00, "1" ) |
| 176 | PORT_DIPSETTING( 0x02, "3" ) |
| 177 | PORT_DIPSETTING( 0x04, "5" ) |
| 178 | PORT_DIPSETTING( 0x06, "7" ) |
| 179 | PORT_DIPNAME( 0x18, 0x10, "Strikes to get special" ) |
| 180 | PORT_DIPSETTING( 0x00, "1" ) |
| 181 | PORT_DIPSETTING( 0x08, "2" ) |
| 182 | PORT_DIPSETTING( 0x10, "3" ) |
| 183 | PORT_DIPSETTING( 0x18, "4" ) |
| 184 | PORT_DIPNAME( 0x20, 0x20, "Unlimited Specials" ) |
| 185 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 186 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 187 | PORT_DIPNAME( 0x40, 0x40, "Bonus Ball Award" ) |
| 188 | PORT_DIPSETTING( 0x40, "Extra Ball" ) |
| 189 | PORT_DIPSETTING( 0x00, "200000 points" ) |
| 190 | PORT_DIPNAME( 0x80, 0x80, "SW24" ) |
| 191 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 192 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
62 | 193 | INPUT_PORTS_END |
63 | 194 | |
64 | 195 | WRITE8_MEMBER( zac_proto_state::out0_w ) |
65 | 196 | { |
| 197 | // solenoids |
66 | 198 | } |
67 | 199 | |
68 | 200 | WRITE8_MEMBER( zac_proto_state::out1_w ) |
69 | 201 | { |
| 202 | // lamps |
70 | 203 | } |
71 | 204 | |
72 | 205 | // need to implement blanking of leading zeroes |
r17478 | r17479 | |
89 | 222 | output_set_digit_value(10, 0x3f); // units shows zero all the time |
90 | 223 | } |
91 | 224 | |
92 | | DRIVER_INIT_MEMBER(zac_proto_state,zac_proto) |
93 | | { |
94 | | } |
95 | | |
96 | 225 | static MACHINE_CONFIG_START( zac_proto, zac_proto_state ) |
97 | 226 | /* basic machine hardware */ |
98 | 227 | MCFG_CPU_ADD("maincpu", SCMP, 1000000) |
r17478 | r17479 | |
135 | 264 | ROM_LOAD("zsc4.dat", 0x1400, 0x0400, CRC(69e0bb95) SHA1(d9a1d0159bf49445b0ece0f9d7806ed80657c2b2)) |
136 | 265 | ROM_END |
137 | 266 | |
138 | | GAME(1978, skijump, 0, zac_proto, zac_proto, zac_proto_state, zac_proto, ROT0, "Zaccaria", "Ski Jump", GAME_IS_SKELETON_MECHANICAL) |
139 | | GAME(1979, spacecty, 0, zac_proto, zac_proto, zac_proto_state, zac_proto, ROT0, "Zaccaria", "Space City", GAME_IS_SKELETON_MECHANICAL) |
140 | | GAME(1978, strike, 0, zac_proto, zac_proto, zac_proto_state, zac_proto, ROT0, "Zaccaria", "Strike", GAME_IS_SKELETON_MECHANICAL) |
| 267 | GAME(1978, skijump, 0, zac_proto, zac_proto, driver_device, 0, ROT0, "Zaccaria", "Ski Jump", GAME_IS_SKELETON_MECHANICAL) |
| 268 | GAME(1979, spacecty, 0, zac_proto, zac_proto, driver_device, 0, ROT0, "Zaccaria", "Space City", GAME_IS_SKELETON_MECHANICAL) |
| 269 | GAME(1978, strike, 0, zac_proto, zac_proto, driver_device, 0, ROT0, "Zaccaria", "Strike", GAME_IS_SKELETON_MECHANICAL) |