trunk/src/mame/drivers/gts1.c
| r242448 | r242449 | |
| 87 | 87 | gts1_state(const machine_config &mconfig, device_type type, const char *tag) |
| 88 | 88 | : genpin_class(mconfig, type, tag) |
| 89 | 89 | , m_maincpu(*this, "maincpu") |
| 90 | , m_switches(*this, "X") |
| 90 | 91 | { } |
| 91 | 92 | |
| 92 | 93 | DECLARE_DRIVER_INIT(gts1); |
| r242448 | r242449 | |
| 108 | 109 | private: |
| 109 | 110 | virtual void machine_reset(); |
| 110 | 111 | required_device<cpu_device> m_maincpu; |
| 111 | | UINT8 m_io[256]; //!< dummy I/O values of undefined ranges (will be removed) |
| 112 | required_ioport_array<5> m_switches; |
| 113 | UINT8 m_strobe; //!< switches strobe lines (5 lower bits used) |
| 112 | 114 | UINT8 m_nvram_addr; //!< NVRAM address |
| 113 | 115 | bool m_nvram_e2; //!< NVRWAM enable (E2 line) |
| 114 | 116 | bool m_nvram_wr; //!< NVRWAM write (W/R line) |
| 115 | | UINT16 m_6351_addr; |
| 116 | | UINT16 m_z30_out; |
| 117 | UINT16 m_6351_addr; //!< ROM MM6351 address (12 bits) |
| 118 | UINT16 m_z30_out; //!< 4-to-16 decoder outputs |
| 117 | 119 | }; |
| 118 | 120 | |
| 119 | 121 | static ADDRESS_MAP_START( gts1_map, AS_PROGRAM, 8, gts1_state ) |
| r242448 | r242449 | |
| 121 | 123 | ADDRESS_MAP_END |
| 122 | 124 | |
| 123 | 125 | static ADDRESS_MAP_START( gts1_data, AS_DATA, 8, gts1_state ) |
| 124 | | AM_RANGE(0x0000, 0x00ff) AM_RAM // not correct |
| 126 | AM_RANGE(0x0000, 0x00ff) AM_RAM |
| 127 | AM_RANGE(0x0100, 0x01ff) AM_RAM AM_SHARE("nvram") |
| 125 | 128 | ADDRESS_MAP_END |
| 126 | 129 | |
| 127 | 130 | static ADDRESS_MAP_START( gts1_io, AS_IO, 8, gts1_state ) |
| 128 | | AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE ( "ra17xx_u4", ra17xx_device, io_r, io_w ) // (U4) solenoid |
| 129 | | AM_RANGE(0x0030, 0x003f) AM_DEVREADWRITE ( "r10696_u3", r10696_device, io_r, io_w ) // (U3) solenoid + dips |
| 130 | | AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE ( "ra17xx_u5", ra17xx_device, io_r, io_w ) // (U5) switch matrix |
| 131 | | AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE ( "r10696_u2", r10696_device, io_r, io_w ) // (U2) NVRAM io chip |
| 132 | | AM_RANGE(0x00d0, 0x00df) AM_DEVREADWRITE ( "r10788_u6", r10788_device, io_r, io_w ) // (U6) display chip |
| 133 | | AM_RANGE(0x0000, 0x00ff) AM_READ ( gts1_io_r ) AM_WRITE( gts1_io_w ) // catch undecoded I/O accesss |
| 134 | | AM_RANGE(0x0100, 0x0100) AM_READ ( gts1_pa_r ) AM_WRITE( gts1_pa_w ) // CPU I/O port A (input/output) |
| 135 | | AM_RANGE(0x0101, 0x0101) AM_WRITE( gts1_pb_w ) // CPU I/O port B (output only) |
| 131 | AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE ( "u4", ra17xx_device, io_r, io_w ) // (U4) solenoid |
| 132 | AM_RANGE(0x0030, 0x003f) AM_DEVREADWRITE ( "u3", r10696_device, io_r, io_w ) // (U3) solenoid + dips |
| 133 | AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE ( "u5", ra17xx_device, io_r, io_w ) // (U5) switch matrix |
| 134 | AM_RANGE(0x0060, 0x006f) AM_DEVREADWRITE ( "u2", r10696_device, io_r, io_w ) // (U2) NVRAM io chip |
| 135 | AM_RANGE(0x00d0, 0x00df) AM_DEVREADWRITE ( "u6", r10788_device, io_r, io_w ) // (U6) display chip |
| 136 | AM_RANGE(0x0000, 0x00ff) AM_READ ( gts1_io_r ) AM_WRITE( gts1_io_w ) // catch undecoded I/O accesss |
| 137 | AM_RANGE(0x0100, 0x0100) AM_READ ( gts1_pa_r ) AM_WRITE( gts1_pa_w ) // CPU I/O port A (input/output) |
| 138 | AM_RANGE(0x0101, 0x0101) AM_WRITE( gts1_pb_w ) // CPU I/O port B (output only) |
| 136 | 139 | ADDRESS_MAP_END |
| 137 | 140 | |
| 141 | #define DSW_GTS1 \ |
| 142 | PORT_START("DSW0") \ |
| 143 | PORT_DIPNAME( 0x01, 0x00, "S01") \ |
| 144 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 145 | PORT_DIPSETTING( 0x01, DEF_STR( On )) \ |
| 146 | PORT_DIPNAME( 0x02, 0x00, "S02") \ |
| 147 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 148 | PORT_DIPSETTING( 0x02, DEF_STR( On )) \ |
| 149 | PORT_DIPNAME( 0x04, 0x00, "S03") \ |
| 150 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 151 | PORT_DIPSETTING( 0x04, DEF_STR( On )) \ |
| 152 | PORT_DIPNAME( 0x08, 0x00, "S04") \ |
| 153 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 154 | PORT_DIPSETTING( 0x08, DEF_STR( On )) \ |
| 155 | PORT_DIPNAME( 0x10, 0x00, "S05") \ |
| 156 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 157 | PORT_DIPSETTING( 0x10, DEF_STR( On )) \ |
| 158 | PORT_DIPNAME( 0x20, 0x20, "S06") \ |
| 159 | PORT_DIPSETTING( 0x00, DEF_STR( No )) \ |
| 160 | PORT_DIPSETTING( 0x20, DEF_STR( Yes )) \ |
| 161 | PORT_DIPNAME( 0x40, 0x40, "S07") \ |
| 162 | PORT_DIPSETTING( 0x00, DEF_STR( No )) \ |
| 163 | PORT_DIPSETTING( 0x40, DEF_STR( Yes )) \ |
| 164 | PORT_DIPNAME( 0x80, 0x80, "S08") \ |
| 165 | PORT_DIPSETTING( 0x00, DEF_STR( No )) \ |
| 166 | PORT_DIPSETTING( 0x80, DEF_STR( Yes )) \ |
| 167 | \ |
| 168 | PORT_START("DSW1") \ |
| 169 | PORT_DIPNAME( 0x01, 0x00, "S09") \ |
| 170 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 171 | PORT_DIPSETTING( 0x01, DEF_STR( On )) \ |
| 172 | PORT_DIPNAME( 0x02, 0x00, "S10") \ |
| 173 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 174 | PORT_DIPSETTING( 0x02, DEF_STR( On )) \ |
| 175 | PORT_DIPNAME( 0x04, 0x00, "S11") \ |
| 176 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 177 | PORT_DIPSETTING( 0x04, DEF_STR( On )) \ |
| 178 | PORT_DIPNAME( 0x08, 0x00, "S12") \ |
| 179 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 180 | PORT_DIPSETTING( 0x08, DEF_STR( On )) \ |
| 181 | PORT_DIPNAME( 0x10, 0x00, "S13") \ |
| 182 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 183 | PORT_DIPSETTING( 0x10, DEF_STR( On )) \ |
| 184 | PORT_DIPNAME( 0x20, 0x00, "S14") \ |
| 185 | PORT_DIPSETTING( 0x00, DEF_STR( Yes )) \ |
| 186 | PORT_DIPSETTING( 0x20, DEF_STR( No )) \ |
| 187 | PORT_DIPNAME( 0x40, 0x40, "S15") \ |
| 188 | PORT_DIPSETTING( 0x00, DEF_STR( No )) \ |
| 189 | PORT_DIPSETTING( 0x40, DEF_STR( Yes )) \ |
| 190 | PORT_DIPNAME( 0x80, 0x00, "S16") \ |
| 191 | PORT_DIPSETTING( 0x00, DEF_STR( No )) \ |
| 192 | PORT_DIPSETTING( 0x80, DEF_STR( Yes )) \ |
| 193 | \ |
| 194 | PORT_START("DSW2") \ |
| 195 | PORT_DIPNAME( 0x01, 0x00, "S17") \ |
| 196 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 197 | PORT_DIPSETTING( 0x01, DEF_STR( On )) \ |
| 198 | PORT_DIPNAME( 0x02, 0x00, "S18") \ |
| 199 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 200 | PORT_DIPSETTING( 0x02, DEF_STR( On )) \ |
| 201 | PORT_DIPNAME( 0x04, 0x00, "S19") \ |
| 202 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 203 | PORT_DIPSETTING( 0x04, DEF_STR( On )) \ |
| 204 | PORT_DIPNAME( 0x08, 0x00, "S20") \ |
| 205 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 206 | PORT_DIPSETTING( 0x08, DEF_STR( On )) \ |
| 207 | PORT_DIPNAME( 0x10, 0x00, "S21") \ |
| 208 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 209 | PORT_DIPSETTING( 0x10, DEF_STR( On )) \ |
| 210 | PORT_DIPNAME( 0x20, 0x00, "S22") \ |
| 211 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 212 | PORT_DIPSETTING( 0x20, DEF_STR( On )) \ |
| 213 | PORT_DIPNAME( 0x40, 0x00, "S23") \ |
| 214 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 215 | PORT_DIPSETTING( 0x40, DEF_STR( On )) \ |
| 216 | PORT_DIPNAME( 0x80, 0x00, "S24") \ |
| 217 | PORT_DIPSETTING( 0x00, DEF_STR( Off )) \ |
| 218 | PORT_DIPSETTING( 0x80, DEF_STR( On )) |
| 219 | |
| 220 | #define SWITCHES_GTS1 \ |
| 221 | PORT_START("X.0") \ |
| 222 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 223 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 224 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 225 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 226 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 227 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 228 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 229 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 230 | PORT_START("X.1") \ |
| 231 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 232 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 233 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 234 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 235 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 236 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 237 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 238 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 239 | PORT_START("X.2") \ |
| 240 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 241 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 242 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 243 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 244 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 245 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 246 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 247 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 248 | PORT_START("X.3") \ |
| 249 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 250 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 251 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 252 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 253 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 254 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 255 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 256 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 257 | PORT_START("X.4") \ |
| 258 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 259 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 260 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 261 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 262 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 263 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 264 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 265 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) \ |
| 266 | |
| 138 | 267 | static INPUT_PORTS_START( gts1 ) |
| 139 | | PORT_START("DSW0") |
| 140 | | PORT_DIPNAME( 0x01, 0x00, "S01") |
| 141 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 142 | | PORT_DIPSETTING( 0x01, DEF_STR( On )) |
| 143 | | PORT_DIPNAME( 0x02, 0x00, "S02") |
| 144 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 145 | | PORT_DIPSETTING( 0x02, DEF_STR( On )) |
| 146 | | PORT_DIPNAME( 0x04, 0x00, "S03") |
| 147 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 148 | | PORT_DIPSETTING( 0x04, DEF_STR( On )) |
| 149 | | PORT_DIPNAME( 0x08, 0x00, "S04") |
| 150 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 151 | | PORT_DIPSETTING( 0x08, DEF_STR( On )) |
| 152 | | PORT_DIPNAME( 0x10, 0x00, "S05") |
| 153 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 154 | | PORT_DIPSETTING( 0x10, DEF_STR( On )) |
| 155 | | PORT_DIPNAME( 0x20, 0x20, "S06") |
| 156 | | PORT_DIPSETTING( 0x00, DEF_STR( No )) |
| 157 | | PORT_DIPSETTING( 0x20, DEF_STR( Yes )) |
| 158 | | PORT_DIPNAME( 0x40, 0x40, "S07") |
| 159 | | PORT_DIPSETTING( 0x00, DEF_STR( No )) |
| 160 | | PORT_DIPSETTING( 0x40, DEF_STR( Yes )) |
| 161 | | PORT_DIPNAME( 0x80, 0x80, "S08") |
| 162 | | PORT_DIPSETTING( 0x00, DEF_STR( No )) |
| 163 | | PORT_DIPSETTING( 0x80, DEF_STR( Yes )) |
| 268 | DSW_GTS1 |
| 164 | 269 | |
| 165 | | PORT_START("DSW1") |
| 166 | | PORT_DIPNAME( 0x01, 0x00, "S09") |
| 167 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 168 | | PORT_DIPSETTING( 0x01, DEF_STR( On )) |
| 169 | | PORT_DIPNAME( 0x02, 0x00, "S10") |
| 170 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 171 | | PORT_DIPSETTING( 0x02, DEF_STR( On )) |
| 172 | | PORT_DIPNAME( 0x04, 0x00, "S11") |
| 173 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 174 | | PORT_DIPSETTING( 0x04, DEF_STR( On )) |
| 175 | | PORT_DIPNAME( 0x08, 0x00, "S12") |
| 176 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 177 | | PORT_DIPSETTING( 0x08, DEF_STR( On )) |
| 178 | | PORT_DIPNAME( 0x10, 0x00, "S13") |
| 179 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 180 | | PORT_DIPSETTING( 0x10, DEF_STR( On )) |
| 181 | | PORT_DIPNAME( 0x20, 0x00, "S14") |
| 182 | | PORT_DIPSETTING( 0x00, DEF_STR( Yes )) |
| 183 | | PORT_DIPSETTING( 0x20, DEF_STR( No )) |
| 184 | | PORT_DIPNAME( 0x40, 0x40, "S15") |
| 185 | | PORT_DIPSETTING( 0x00, DEF_STR( No )) |
| 186 | | PORT_DIPSETTING( 0x40, DEF_STR( Yes )) |
| 187 | | PORT_DIPNAME( 0x80, 0x00, "S16") |
| 188 | | PORT_DIPSETTING( 0x00, DEF_STR( No )) |
| 189 | | PORT_DIPSETTING( 0x80, DEF_STR( Yes )) |
| 270 | SWITCHES_GTS1 |
| 271 | INPUT_PORTS_END |
| 190 | 272 | |
| 191 | | PORT_START("DSW2") |
| 192 | | PORT_DIPNAME( 0x01, 0x00, "S17") |
| 193 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 194 | | PORT_DIPSETTING( 0x01, DEF_STR( On )) |
| 195 | | PORT_DIPNAME( 0x02, 0x00, "S18") |
| 196 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 197 | | PORT_DIPSETTING( 0x02, DEF_STR( On )) |
| 198 | | PORT_DIPNAME( 0x04, 0x00, "S19") |
| 199 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 200 | | PORT_DIPSETTING( 0x04, DEF_STR( On )) |
| 201 | | PORT_DIPNAME( 0x08, 0x00, "S20") |
| 202 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 203 | | PORT_DIPSETTING( 0x08, DEF_STR( On )) |
| 204 | | PORT_DIPNAME( 0x10, 0x00, "S21") |
| 205 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 206 | | PORT_DIPSETTING( 0x10, DEF_STR( On )) |
| 207 | | PORT_DIPNAME( 0x20, 0x00, "S22") |
| 208 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 209 | | PORT_DIPSETTING( 0x20, DEF_STR( On )) |
| 210 | | PORT_DIPNAME( 0x40, 0x00, "S23") |
| 211 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 212 | | PORT_DIPSETTING( 0x40, DEF_STR( On )) |
| 213 | | PORT_DIPNAME( 0x80, 0x00, "S24") |
| 214 | | PORT_DIPSETTING( 0x00, DEF_STR( Off )) |
| 215 | | PORT_DIPSETTING( 0x80, DEF_STR( On )) |
| 273 | static INPUT_PORTS_START( jokrpokr ) |
| 274 | DSW_GTS1 |
| 275 | |
| 276 | PORT_START("X.0") |
| 277 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PLAY/TEST") |
| 278 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("POP/BUMBER") |
| 279 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EXTRA BALL TARGET") |
| 280 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SPECIAL ROLLOVER") |
| 281 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("10 POINT CONTACTS") |
| 282 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)") |
| 283 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 284 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
| 285 | |
| 286 | PORT_START("X.1") |
| 287 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#1 COIN CHUTE") |
| 288 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" ROLLOVER") |
| 289 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"10\" DROP TARGET") |
| 290 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"Q\" DROP TARGET (red)") |
| 291 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET (black)") |
| 292 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (black)") |
| 293 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 294 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
| 295 | |
| 296 | PORT_START("X.2") |
| 297 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("#2 COIN CHUTE") |
| 298 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"B\" ROLLOVER") |
| 299 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (black)") |
| 300 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (black)") |
| 301 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET") |
| 302 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("JOKER DROP TARGET") |
| 303 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 304 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
| 305 | |
| 306 | PORT_START("X.3") |
| 307 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("REPLAY BUTTON") |
| 308 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"C\" ROLLOVER") |
| 309 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"J\" DROP TARGET (red)") |
| 310 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"O\" DROP TARGET (red)") |
| 311 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET") |
| 312 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)") |
| 313 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 314 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
| 315 | |
| 316 | PORT_START("X.4") |
| 317 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TILT PANEL") |
| 318 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) |
| 319 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) |
| 320 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) |
| 321 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"K\" DROP TARGET") |
| 322 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("\"A\" DROP TARGET (red)") |
| 323 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) |
| 324 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) |
| 216 | 325 | INPUT_PORTS_END |
| 217 | 326 | |
| 218 | 327 | void gts1_state::machine_reset() |
| 219 | 328 | { |
| 329 | m_strobe = 0; |
| 220 | 330 | m_nvram_addr = 0; |
| 221 | 331 | m_nvram_e2 = false; |
| 222 | 332 | m_nvram_wr = false; |
| r242448 | r242449 | |
| 237 | 347 | |
| 238 | 348 | WRITE8_MEMBER(gts1_state::gts1_solenoid_w) |
| 239 | 349 | { |
| 240 | | switch (offset) { |
| 350 | switch (offset) |
| 351 | { |
| 241 | 352 | case 0: |
| 242 | 353 | LOG(("%s: outhole <- %x\n", __FUNCTION__, data)); |
| 243 | 354 | break; |
| r242448 | r242449 | |
| 262 | 373 | case 7: |
| 263 | 374 | LOG(("%s: no. 8 <- %x\n", __FUNCTION__, data)); |
| 264 | 375 | break; |
| 265 | | case 8: |
| 266 | | case 9: |
| 267 | | case 10: |
| 268 | | case 11: |
| 376 | case 8: case 9: case 10: case 11: |
| 269 | 377 | LOG(("%s: not used [%x] <- %x\n", __FUNCTION__, offset, data)); |
| 270 | 378 | break; |
| 271 | 379 | case 12: // spare |
| r242448 | r242449 | |
| 287 | 395 | |
| 288 | 396 | READ8_MEMBER (gts1_state::gts1_switches_r) |
| 289 | 397 | { |
| 290 | | UINT8 data = 0; |
| 291 | | LOG(("%s: switches[%02x] -> %x\n", __FUNCTION__, offset, data)); |
| 398 | UINT8 data = 1; |
| 399 | if (offset >= 8 && offset < 16) { |
| 400 | const int bit = offset - 8; |
| 401 | for (int i = 0; i < 5; i++) { |
| 402 | if (m_strobe & (1 << i)) { |
| 403 | data &= BIT(m_switches[i]->read(), bit); |
| 404 | } |
| 405 | } |
| 406 | } |
| 407 | LOG(("%s: switches[%x,%x] -> %x\n", __FUNCTION__, m_strobe, offset, data)); |
| 292 | 408 | return data; |
| 293 | 409 | } |
| 294 | 410 | |
| 295 | 411 | WRITE8_MEMBER(gts1_state::gts1_switches_w) |
| 296 | 412 | { |
| 297 | | LOG(("%s: switches[%02x] <- %x\n", __FUNCTION__, offset, data)); |
| 413 | LOG(("%s: switches[%x] <- %x\n", __FUNCTION__, offset, data)); |
| 414 | if (offset < 5) { |
| 415 | // outputs O-0 to O-4 are the 5 strobe lines |
| 416 | m_strobe = (m_strobe & ~(1 << offset)) | ((data & 1) << offset); |
| 417 | } |
| 298 | 418 | } |
| 299 | 419 | |
| 300 | 420 | /** |
| r242448 | r242449 | |
| 337 | 457 | }; |
| 338 | 458 | UINT8 a = ttl7448_mod[(data >> 0) & 15]; |
| 339 | 459 | UINT8 b = ttl7448_mod[(data >> 4) & 15]; |
| 340 | | LOG(("%s: offset:%d data:%02x a:%02x b:%02x\n", __FUNCTION__, offset, data, a, b)); |
| 460 | // LOG(("%s: offset:%d data:%02x a:%02x b:%02x\n", __FUNCTION__, offset, data, a, b)); |
| 341 | 461 | if ((offset % 8) < 7) { |
| 342 | 462 | output_set_indexed_value("digit8_", offset, a); |
| 343 | 463 | output_set_indexed_value("digit8_", offset + 16, b); |
| r242448 | r242449 | |
| 377 | 497 | case 0: // group A |
| 378 | 498 | // FIXME: Schematics says TO Z5 |
| 379 | 499 | if (!m_nvram_wr && m_nvram_e2) { |
| 380 | | // FIXME: read generic NVRAM data |
| 500 | UINT8* nvram = memregion("nvram")->base(); |
| 501 | assert(nvram != NULL); |
| 502 | data = nvram[m_nvram_addr]; |
| 503 | LOG(("%s: nvram[%02x] -> %x\n", __FUNCTION__, m_nvram_addr, data)); |
| 381 | 504 | } |
| 382 | 505 | break; |
| 383 | 506 | case 1: // group B |
| r242448 | r242449 | |
| 406 | 529 | case 2: // group C - data bits 3:0 of NVRAM |
| 407 | 530 | if (m_nvram_wr && m_nvram_e2) { |
| 408 | 531 | LOG(("%s: nvram[%02x] <- %x\n", __FUNCTION__, m_nvram_addr, data & 15)); |
| 409 | | // FIXME: write generic NVRAM data |
| 532 | UINT8* nvram = memregion("nvram")->base(); |
| 533 | assert(nvram != NULL); |
| 534 | nvram[m_nvram_addr] = data & 15; |
| 410 | 535 | } |
| 411 | 536 | break; |
| 412 | 537 | } |
| r242448 | r242449 | |
| 523 | 648 | |
| 524 | 649 | READ8_MEMBER (gts1_state::gts1_io_r) |
| 525 | 650 | { |
| 526 | | UINT8 data = m_io[offset] & 0x0f; |
| 527 | | LOG(("%s: io[%02x] -> %x\n", __FUNCTION__, offset, data)); |
| 651 | const UINT8 data = 0x0f; |
| 652 | LOG(("%s: unmapped io[%02x] -> %x\n", __FUNCTION__, offset, data)); |
| 528 | 653 | return data; |
| 529 | 654 | } |
| 530 | 655 | |
| 531 | 656 | WRITE8_MEMBER(gts1_state::gts1_io_w) |
| 532 | 657 | { |
| 533 | | LOG(("%s: io[%02x] <- %x\n", __FUNCTION__, offset, data)); |
| 534 | | m_io[offset] = data; |
| 658 | LOG(("%s: unmapped io[%02x] <- %x\n", __FUNCTION__, offset, data)); |
| 535 | 659 | } |
| 536 | 660 | |
| 537 | 661 | READ8_MEMBER (gts1_state::gts1_pa_r) |
| r242448 | r242449 | |
| 565 | 689 | MCFG_CPU_DATA_MAP(gts1_data) |
| 566 | 690 | MCFG_CPU_IO_MAP(gts1_io) |
| 567 | 691 | |
| 568 | | //MCFG_NVRAM_ADD_0FILL("nvram") |
| 692 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 569 | 693 | |
| 570 | 694 | /* A1753CE 2048 x 8 ROM (000-7ff), 128 x 4 RAM (00-7f) and 16 I/O lines (20 ... 2f) */ |
| 571 | | MCFG_DEVICE_ADD( "ra17xx_u5", RA17XX, 0 ) |
| 695 | MCFG_DEVICE_ADD( "u5", RA17XX, 0 ) |
| 572 | 696 | MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_switches_r) ) |
| 573 | 697 | MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_switches_w) ) |
| 574 | 698 | |
| 575 | 699 | /* A1752CF 2048 x 8 ROM (800-fff), 128 x 4 RAM (80-ff) and 16 I/O lines (40 ... 4f) */ |
| 576 | | MCFG_DEVICE_ADD( "ra17xx_u4", RA17XX, 0 ) |
| 700 | MCFG_DEVICE_ADD( "u4", RA17XX, 0 ) |
| 577 | 701 | MCFG_RA17XX_READ ( READ8 (gts1_state,gts1_solenoid_r) ) |
| 578 | 702 | MCFG_RA17XX_WRITE( WRITE8(gts1_state,gts1_solenoid_w) ) |
| 579 | 703 | |
| 580 | 704 | /* 10696 General Purpose Input/Output */ |
| 581 | | MCFG_DEVICE_ADD( "r10696_u2", R10696, 0 ) |
| 705 | MCFG_DEVICE_ADD( "u2", R10696, 0 ) |
| 582 | 706 | MCFG_R10696_IO( READ8 (gts1_state,gts1_nvram_r), |
| 583 | 707 | WRITE8(gts1_state,gts1_nvram_w) ) |
| 584 | 708 | |
| 585 | 709 | /* 10696 General Purpose Input/Output */ |
| 586 | | MCFG_DEVICE_ADD( "r10696_u3", R10696, 0 ) |
| 710 | MCFG_DEVICE_ADD( "u3", R10696, 0 ) |
| 587 | 711 | MCFG_R10696_IO( READ8 (gts1_state,gts1_lamp_apm_r), |
| 588 | 712 | WRITE8(gts1_state,gts1_lamp_apm_w) ) |
| 589 | 713 | |
| 590 | 714 | /* 10788 General Purpose Display and Keyboard */ |
| 591 | | MCFG_DEVICE_ADD( "r10788_u6", R10788, XTAL_3_579545MHz / 18 ) // divided in the circuit |
| 715 | MCFG_DEVICE_ADD( "u6", R10788, XTAL_3_579545MHz / 18 ) // divided in the circuit |
| 592 | 716 | MCFG_R10788_UPDATE( WRITE8(gts1_state,gts1_display_w) ) |
| 593 | 717 | |
| 594 | 718 | /* Video */ |
| r242448 | r242449 | |
| 849 | 973 | ROM_END |
| 850 | 974 | |
| 851 | 975 | |
| 852 | | GAME(1977, gts1, 0, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "System 1", GAME_IS_BIOS_ROOT) |
| 976 | GAME(1977, gts1, 0, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "System 1", GAME_IS_BIOS_ROOT) |
| 853 | 977 | |
| 854 | 978 | //Exact same roms as gts1 with added hardware we'll likely need roms for to emulate properly |
| 855 | | GAME(1979, gts1s, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "System 1 with sound board", GAME_IS_BIOS_ROOT) |
| 856 | | GAME(19??, sys1test, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "System 1 Test prom", GAME_IS_SKELETON_MECHANICAL) |
| 979 | GAME(1979, gts1s, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "System 1 with sound board", GAME_IS_BIOS_ROOT) |
| 980 | GAME(19??, sys1test, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "System 1 Test prom", GAME_IS_SKELETON_MECHANICAL) |
| 857 | 981 | |
| 858 | 982 | // chimes |
| 859 | | GAME(1977, cleoptra, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Cleopatra", GAME_IS_SKELETON_MECHANICAL) |
| 860 | | GAME(1978, sinbad, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Sinbad", GAME_IS_SKELETON_MECHANICAL) |
| 861 | | GAME(1978, sinbadn, sinbad, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Sinbad (Norway)", GAME_IS_SKELETON_MECHANICAL) |
| 862 | | GAME(1978, jokrpokr, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Joker Poker", GAME_IS_SKELETON_MECHANICAL) |
| 863 | | GAME(1978, dragon, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Dragon", GAME_IS_SKELETON_MECHANICAL) |
| 864 | | GAME(1979, solaride, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Solar Ride", GAME_IS_SKELETON_MECHANICAL) |
| 865 | | GAME(1979, countdwn, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Count-Down", GAME_IS_SKELETON_MECHANICAL) |
| 983 | GAME(1977, cleoptra, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Cleopatra", GAME_IS_SKELETON_MECHANICAL) |
| 984 | GAME(1978, sinbad, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Sinbad", GAME_IS_SKELETON_MECHANICAL) |
| 985 | GAME(1978, sinbadn, sinbad, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Sinbad (Norway)", GAME_IS_SKELETON_MECHANICAL) |
| 986 | GAME(1978, jokrpokr, gts1, gts1, jokrpokr, gts1_state, gts1, ROT0, "Gottlieb", "Joker Poker", GAME_IS_SKELETON_MECHANICAL) |
| 987 | GAME(1978, dragon, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Dragon", GAME_IS_SKELETON_MECHANICAL) |
| 988 | GAME(1979, solaride, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Solar Ride", GAME_IS_SKELETON_MECHANICAL) |
| 989 | GAME(1979, countdwn, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Count-Down", GAME_IS_SKELETON_MECHANICAL) |
| 866 | 990 | |
| 867 | 991 | // NE555 beeper |
| 868 | | GAME(1978, closeenc, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Close Encounters of the Third Kind", GAME_IS_SKELETON_MECHANICAL) |
| 869 | | GAME(1978, charlies, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Charlie's Angels", GAME_IS_SKELETON_MECHANICAL) |
| 870 | | GAME(1979, pinpool, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Pinball Pool", GAME_IS_SKELETON_MECHANICAL) |
| 992 | GAME(1978, closeenc, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Close Encounters of the Third Kind", GAME_IS_SKELETON_MECHANICAL) |
| 993 | GAME(1978, charlies, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Charlie's Angels", GAME_IS_SKELETON_MECHANICAL) |
| 994 | GAME(1979, pinpool, gts1, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Pinball Pool", GAME_IS_SKELETON_MECHANICAL) |
| 871 | 995 | |
| 872 | 996 | // sound card |
| 873 | | GAME(1979, totem, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Totem", GAME_IS_SKELETON_MECHANICAL) |
| 874 | | GAME(1979, hulk, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "The Incredible Hulk", GAME_IS_SKELETON_MECHANICAL) |
| 875 | | GAME(1979, geniep, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Genie (Pinball)", GAME_IS_SKELETON_MECHANICAL) |
| 876 | | GAME(1980, buckrgrs, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Buck Rogers", GAME_IS_SKELETON_MECHANICAL) |
| 877 | | GAME(1980, torch, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Torch", GAME_IS_SKELETON_MECHANICAL) |
| 878 | | GAME(1980, roldisco, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Roller Disco", GAME_IS_SKELETON_MECHANICAL) |
| 879 | | GAME(1980, astannie, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Asteroid Annie and the Aliens", GAME_IS_SKELETON_MECHANICAL) |
| 997 | GAME(1979, totem, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Totem", GAME_IS_SKELETON_MECHANICAL) |
| 998 | GAME(1979, hulk, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "The Incredible Hulk", GAME_IS_SKELETON_MECHANICAL) |
| 999 | GAME(1979, geniep, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Genie (Pinball)", GAME_IS_SKELETON_MECHANICAL) |
| 1000 | GAME(1980, buckrgrs, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Buck Rogers", GAME_IS_SKELETON_MECHANICAL) |
| 1001 | GAME(1980, torch, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Torch", GAME_IS_SKELETON_MECHANICAL) |
| 1002 | GAME(1980, roldisco, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Roller Disco", GAME_IS_SKELETON_MECHANICAL) |
| 1003 | GAME(1980, astannie, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Gottlieb", "Asteroid Annie and the Aliens", GAME_IS_SKELETON_MECHANICAL) |
| 880 | 1004 | |
| 881 | 1005 | // homebrew |
| 882 | | GAME(1986, hexagone, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Christian Tabart", "L'Hexagone (France)", GAME_IS_SKELETON_MECHANICAL) |
| 1006 | GAME(1986, hexagone, gts1s, gts1, gts1, gts1_state, gts1, ROT0, "Christian Tabart", "L'Hexagone (France)", GAME_IS_SKELETON_MECHANICAL) |