trunk/src/mame/drivers/inder.c
| r31901 | r31902 | |
| 31 | 31 | inder_state(const machine_config &mconfig, device_type type, const char *tag) |
| 32 | 32 | : genpin_class(mconfig, type, tag) |
| 33 | 33 | , m_maincpu(*this, "maincpu") |
| 34 | , m_audiocpu(*this, "audiocpu") |
| 34 | 35 | , m_sn(*this, "sn") |
| 35 | 36 | , m_switches(*this, "SW") |
| 36 | 37 | { } |
| r31901 | r31902 | |
| 40 | 41 | DECLARE_WRITE8_MEMBER(sol_brvteam_w); |
| 41 | 42 | DECLARE_WRITE8_MEMBER(sol_canasta_w); |
| 42 | 43 | DECLARE_WRITE8_MEMBER(sn_w); |
| 44 | DECLARE_READ8_MEMBER(sndcmd_r); |
| 45 | DECLARE_WRITE8_MEMBER(sndcmd_w); |
| 43 | 46 | DECLARE_WRITE8_MEMBER(lamp_w) { }; |
| 44 | 47 | DECLARE_WRITE8_MEMBER(disp_w); |
| 45 | 48 | DECLARE_DRIVER_INIT(inder); |
| 46 | 49 | private: |
| 47 | 50 | UINT8 m_row; |
| 48 | 51 | UINT8 m_segment[5]; |
| 52 | UINT8 m_sndcmd; |
| 49 | 53 | virtual void machine_reset(); |
| 50 | 54 | required_device<cpu_device> m_maincpu; |
| 55 | optional_device<cpu_device> m_audiocpu; |
| 51 | 56 | optional_device<sn76489_device> m_sn; |
| 52 | 57 | required_ioport_array<11> m_switches; |
| 53 | 58 | }; |
| r31901 | r31902 | |
| 77 | 82 | AM_RANGE(0x4b02, 0x4b02) AM_DEVWRITE("ay", ay8910_device, data_w) |
| 78 | 83 | ADDRESS_MAP_END |
| 79 | 84 | |
| 85 | static ADDRESS_MAP_START( lapbylap_map, AS_PROGRAM, 8, inder_state ) |
| 86 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 87 | AM_RANGE(0x2000, 0x20ff) AM_WRITE(disp_w) |
| 88 | AM_RANGE(0x4000, 0x43ff) AM_RAM // pair of 2114 |
| 89 | AM_RANGE(0x4400, 0x44ff) AM_RAM AM_SHARE("nvram") // pair of 5101, battery-backed |
| 90 | AM_RANGE(0x4800, 0x480a) AM_READWRITE(sw_r,sw_w) |
| 91 | AM_RANGE(0x4900, 0x4900) AM_WRITE(sol_canasta_w) |
| 92 | AM_RANGE(0x4901, 0x4907) AM_WRITE(lamp_w) |
| 93 | AM_RANGE(0x4b00, 0x4b00) AM_WRITE(sndcmd_w) |
| 94 | ADDRESS_MAP_END |
| 95 | |
| 96 | static ADDRESS_MAP_START( lapbylap_sub_map, AS_PROGRAM, 8, inder_state ) |
| 97 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 98 | AM_RANGE(0x8000, 0x87ff) AM_RAM // 6116 |
| 99 | AM_RANGE(0x9000, 0x9000) AM_DEVWRITE("ay1", ay8910_device, address_w) |
| 100 | AM_RANGE(0x9001, 0x9001) AM_DEVREAD("ay1", ay8910_device, data_r) |
| 101 | AM_RANGE(0x9002, 0x9002) AM_DEVWRITE("ay1", ay8910_device, data_w) |
| 102 | AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("ay2", ay8910_device, address_w) |
| 103 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD("ay2", ay8910_device, data_r) |
| 104 | AM_RANGE(0xa002, 0xa002) AM_DEVWRITE("ay2", ay8910_device, data_w) |
| 105 | ADDRESS_MAP_END |
| 106 | |
| 80 | 107 | static INPUT_PORTS_START( inder ) |
| 81 | 108 | PORT_START("SW.0") |
| 82 | 109 | PORT_DIPNAME( 0x03, 0x01, "Coin Slot 1") // sw G,H |
| r31901 | r31902 | |
| 184 | 211 | PORT_DIPSETTING( 0x30, "1500000") |
| 185 | 212 | PORT_DIPNAME( 0xc0, 0xc0, "Points for 2nd free game") // sw A,B |
| 186 | 213 | PORT_DIPSETTING( 0x00, "NA") |
| 187 | | PORT_DIPSETTING( 0x10, "2900000") |
| 188 | | PORT_DIPSETTING( 0x20, "2700000") |
| 189 | | PORT_DIPSETTING( 0x30, "2500000") |
| 214 | PORT_DIPSETTING( 0x40, "2900000") |
| 215 | PORT_DIPSETTING( 0x80, "2700000") |
| 216 | PORT_DIPSETTING( 0xc0, "2500000") |
| 190 | 217 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 191 | 218 | |
| 192 | 219 | PORT_START("SW.1") |
| r31901 | r31902 | |
| 260 | 287 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 261 | 288 | INPUT_PORTS_END |
| 262 | 289 | |
| 290 | static INPUT_PORTS_START( lapbylap ) |
| 291 | PORT_START("SW.0") |
| 292 | PORT_DIPNAME( 0x03, 0x03, "Coin Slot 1") // sw G,H |
| 293 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C )) // slot 2: 1 moneda 4 partidas |
| 294 | PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C )) // and 4c_3c; slot 2: 1 moneda 3 partidas |
| 295 | PORT_DIPNAME( 0x08, 0x08, "Balls") // sw E |
| 296 | PORT_DIPSETTING( 0x08, "3") |
| 297 | PORT_DIPSETTING( 0x00, "5") |
| 298 | PORT_DIPNAME( 0x30, 0x20, "Points for free game") // sw C,D |
| 299 | PORT_DIPSETTING( 0x00, "2900000") |
| 300 | PORT_DIPSETTING( 0x10, "2700000") |
| 301 | PORT_DIPSETTING( 0x20, "2500000") |
| 302 | PORT_DIPSETTING( 0x30, "2300000") |
| 303 | PORT_BIT( 0xc4, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 304 | |
| 305 | PORT_START("SW.1") |
| 306 | PORT_DIPNAME( 0x03, 0x03, "High Score") //"Handicap" // sw O,P |
| 307 | PORT_DIPSETTING( 0x00, "4600000") |
| 308 | PORT_DIPSETTING( 0x01, "4400000") |
| 309 | PORT_DIPSETTING( 0x02, "4200000") |
| 310 | PORT_DIPSETTING( 0x03, "4000000") |
| 311 | PORT_DIPNAME( 0x0c, 0x08, "Extra Ball Award??") //"Comienzo Secuenzia Diana Bola Extra" // sw M,N |
| 312 | PORT_DIPSETTING( 0x04, "50000") |
| 313 | PORT_DIPSETTING( 0x08, "25000") |
| 314 | PORT_DIPSETTING( 0x0c, "10000") |
| 315 | PORT_DIPNAME( 0x10, 0x10, "Extra Ball Derribo??") //"Bola Extra en 1st Derribo Completo" // sw L |
| 316 | PORT_DIPSETTING( 0x00, DEF_STR(No)) |
| 317 | PORT_DIPSETTING( 0x10, DEF_STR(Yes)) // "Si" |
| 318 | PORT_DIPNAME( 0x20, 0x20, "Especiales Laterales??") //need help here guys... // sw K |
| 319 | PORT_DIPSETTING( 0x00, "Derribo Lateral Dianas") |
| 320 | PORT_DIPSETTING( 0x20, "Derribo Completo Dianas Laterales") |
| 321 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 322 | |
| 323 | PORT_START("SW.2") |
| 324 | PORT_DIPNAME( 0x03, 0x03, "High Score Returns??") //"Handicap de Vueltas" // sw W,X |
| 325 | PORT_DIPSETTING( 0x00, "40") |
| 326 | PORT_DIPSETTING( 0x01, "35") |
| 327 | PORT_DIPSETTING( 0x02, "30") |
| 328 | PORT_DIPSETTING( 0x03, "25") |
| 329 | PORT_DIPNAME( 0x40, 0x40, "Bola Extra En Rampa??") //nfi // sw R |
| 330 | PORT_DIPSETTING( 0x00, "Derribo Completo") |
| 331 | PORT_DIPSETTING( 0x40, "Derribo Lateral") |
| 332 | PORT_DIPNAME( 0x80, 0x80, "Apagado??") //nfi // sw Q |
| 333 | PORT_DIPSETTING( 0x00, DEF_STR(Hard)) // "Facil" |
| 334 | PORT_DIPSETTING( 0x80, DEF_STR(Easy)) // "Dificil" |
| 335 | PORT_BIT( 0x3c, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 336 | |
| 337 | PORT_START("SW.3") |
| 338 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 339 | |
| 340 | PORT_START("SW.4") |
| 341 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 342 | |
| 343 | PORT_START("SW.5") // Contactos 50-57 |
| 344 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // "Monedero A" |
| 345 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // "Monedero B" |
| 346 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 347 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) // "Falta" |
| 348 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // "Pulsador Partidas" |
| 349 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 350 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Accounting info") // "Test economico" |
| 351 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Test") // "Test tecnico" |
| 352 | |
| 353 | PORT_START("SW.6") // 60-67 |
| 354 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) |
| 355 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) |
| 356 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) |
| 357 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) |
| 358 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) |
| 359 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) |
| 360 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 361 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O) |
| 362 | |
| 363 | PORT_START("SW.7") // 70-77 |
| 364 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) |
| 365 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) |
| 366 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) |
| 367 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F) |
| 368 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) |
| 369 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) |
| 370 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) |
| 371 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) |
| 372 | |
| 373 | PORT_START("SW.8") // 80-87 |
| 374 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) |
| 375 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) |
| 376 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) |
| 377 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) |
| 378 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) |
| 379 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) |
| 380 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) |
| 381 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) |
| 382 | |
| 383 | PORT_START("SW.9") // 90-97 |
| 384 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) |
| 385 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("Outhole") |
| 386 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) |
| 387 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) |
| 388 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) |
| 389 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) |
| 390 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) |
| 391 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) |
| 392 | |
| 393 | PORT_START("SW.10") |
| 394 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 395 | INPUT_PORTS_END |
| 396 | |
| 263 | 397 | READ8_MEMBER( inder_state::sw_r ) |
| 264 | 398 | { |
| 265 | 399 | return m_switches[m_row]->read(); |
| r31901 | r31902 | |
| 275 | 409 | m_sn->write(space, 0, BITSWAP8(data, 0, 1, 2, 3, 4, 5, 6, 7)); |
| 276 | 410 | } |
| 277 | 411 | |
| 412 | WRITE8_MEMBER( inder_state::sndcmd_w ) |
| 413 | { |
| 414 | m_sndcmd = data; |
| 415 | m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 416 | } |
| 417 | |
| 418 | READ8_MEMBER( inder_state::sndcmd_r ) |
| 419 | { |
| 420 | return m_sndcmd; |
| 421 | } |
| 422 | |
| 278 | 423 | // "bobinas" |
| 279 | 424 | WRITE8_MEMBER( inder_state::sol_brvteam_w ) |
| 280 | 425 | { |
| r31901 | r31902 | |
| 387 | 532 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "ayvol", 1.0) |
| 388 | 533 | MACHINE_CONFIG_END |
| 389 | 534 | |
| 535 | static MACHINE_CONFIG_START( lapbylap, inder_state ) |
| 536 | /* basic machine hardware */ |
| 537 | MCFG_CPU_ADD("maincpu", Z80, XTAL_5MHz / 2) |
| 538 | MCFG_CPU_PROGRAM_MAP(lapbylap_map) |
| 539 | MCFG_CPU_PERIODIC_INT_DRIVER(inder_state, irq0_line_hold, 250) // NE556 |
| 540 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_2MHz) |
| 541 | MCFG_CPU_PROGRAM_MAP(lapbylap_sub_map) |
| 542 | MCFG_CPU_PERIODIC_INT_DRIVER(inder_state, irq0_line_hold, 250) // NE555 |
| 390 | 543 | |
| 544 | MCFG_NVRAM_ADD_1FILL("nvram") |
| 545 | |
| 546 | /* Video */ |
| 547 | MCFG_DEFAULT_LAYOUT(layout_inder) |
| 548 | |
| 549 | /* Sound */ |
| 550 | MCFG_FRAGMENT_ADD( genpin_audio ) |
| 551 | MCFG_SPEAKER_STANDARD_MONO("ayvol") |
| 552 | MCFG_SOUND_ADD("ay1", AY8910, XTAL_2MHz) // same xtal that drives subcpu |
| 553 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "ayvol", 1.0) |
| 554 | MCFG_SOUND_ADD("ay2", AY8910, XTAL_2MHz) // same xtal that drives subcpu |
| 555 | MCFG_AY8910_PORT_A_READ_CB(READ8(inder_state, sndcmd_r)) |
| 556 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "ayvol", 1.0) |
| 557 | MACHINE_CONFIG_END |
| 558 | |
| 559 | |
| 391 | 560 | /*------------------------------------------------------------------- |
| 392 | 561 | / Brave Team (1985) |
| 393 | 562 | /-------------------------------------------------------------------*/ |
| r31901 | r31902 | |
| 548 | 717 | GAME(1985, brvteam, 0, inder, inder, inder_state, inder, ROT0, "Inder", "Brave Team", GAME_MECHANICAL) |
| 549 | 718 | |
| 550 | 719 | // ay8910 |
| 551 | | GAME(1986, canasta, 0, canasta, canasta, inder_state, inder, ROT0, "Inder", "Canasta '86'", GAME_MECHANICAL | GAME_NOT_WORKING ) |
| 720 | GAME(1986, canasta, 0, canasta, canasta, inder_state, inder, ROT0, "Inder", "Canasta '86'", GAME_MECHANICAL) |
| 552 | 721 | |
| 553 | 722 | // sound cpu with 2x ay8910 |
| 554 | | GAME(1986, lapbylap, 0, inder, inder, inder_state, inder, ROT0, "Inder", "Lap By Lap", GAME_IS_SKELETON_MECHANICAL) |
| 723 | GAME(1986, lapbylap, 0, lapbylap, lapbylap, inder_state, inder, ROT0, "Inder", "Lap By Lap", GAME_MECHANICAL) |
| 724 | |
| 555 | 725 | GAME(1987, pinmoonl, 0, inder, inder, inder_state, inder, ROT0, "Inder", "Moon Light (Inder)", GAME_IS_SKELETON_MECHANICAL) |
| 556 | 726 | GAME(1988, pinclown, 0, inder, inder, inder_state, inder, ROT0, "Inder", "Clown (Inder)", GAME_IS_SKELETON_MECHANICAL) |
| 557 | 727 | GAME(1989, corsario, 0, inder, inder, inder_state, inder, ROT0, "Inder", "Corsario", GAME_IS_SKELETON_MECHANICAL) |