src/mame/drivers/seta2.c
| r2956 | r2957 | |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | static ADDRESS_MAP_START( grdians_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 456 | | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 457 | | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 458 | | AM_RANGE(0x304000, 0x30ffff) AM_READ(SMH_RAM ) // ? seems tile data |
| 459 | | AM_RANGE(0x600000, 0x600001) AM_READ(input_port_0_word_r ) // DSW 1 |
| 460 | | AM_RANGE(0x600002, 0x600003) AM_READ(input_port_1_word_r ) // DSW 2 |
| 461 | | AM_RANGE(0x700000, 0x700001) AM_READ(input_port_2_word_r ) // P1 |
| 462 | | AM_RANGE(0x700002, 0x700003) AM_READ(input_port_3_word_r ) // P2 |
| 463 | | AM_RANGE(0x700004, 0x700005) AM_READ(input_port_4_word_r ) // Coins |
| 456 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 457 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 458 | AM_RANGE(0x304000, 0x30ffff) AM_READ(SMH_RAM ) // ? seems tile data |
| 459 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW1") // DSW 1 |
| 460 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW2") // DSW 2 |
| 461 | AM_RANGE(0x700000, 0x700001) AM_READ_PORT("P1") // P1 |
| 462 | AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P2") // P2 |
| 463 | AM_RANGE(0x700004, 0x700005) AM_READ_PORT("SYSTEM") // Coins |
| 464 | 464 | AM_RANGE(0x70000c, 0x70000d) AM_READ(watchdog_reset16_r ) // Watchdog |
| 465 | 465 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(seta_sound_word_r ) // Sound |
| 466 | | AM_RANGE(0xc00000, 0xc3ffff) AM_READ(SMH_RAM ) // Sprites |
| 467 | | AM_RANGE(0xc40000, 0xc4ffff) AM_READ(SMH_RAM ) // Palette |
| 468 | | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 466 | AM_RANGE(0xc00000, 0xc3ffff) AM_READ(SMH_RAM ) // Sprites |
| 467 | AM_RANGE(0xc40000, 0xc4ffff) AM_READ(SMH_RAM ) // Palette |
| 468 | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 469 | 469 | ADDRESS_MAP_END |
| 470 | 470 | |
| 471 | 471 | static ADDRESS_MAP_START( grdians_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 501 | 501 | } |
| 502 | 502 | else |
| 503 | 503 | { |
| 504 | | int length; |
| 505 | | UINT8 *dat; |
| 504 | UINT32 length, size; |
| 505 | UINT16 *dat; |
| 506 | 506 | |
| 507 | | dat = eeprom_get_data_pointer(&length); |
| 508 | | dat[0]=0x70; |
| 509 | | dat[1]=0x08; |
| 507 | dat = eeprom_get_data_pointer(&length, &size); |
| 508 | dat[0] = 0x7008; |
| 510 | 509 | } |
| 511 | 510 | } |
| 512 | 511 | } |
| r2956 | r2957 | |
| 524 | 523 | } |
| 525 | 524 | |
| 526 | 525 | static ADDRESS_MAP_START( gundamex_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 527 | | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 528 | | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 529 | | AM_RANGE(0x500000, 0x57ffff) AM_READ(SMH_ROM ) // ROM |
| 530 | | AM_RANGE(0x600000, 0x600001) AM_READ(input_port_0_word_r ) // DSW 1 |
| 531 | | AM_RANGE(0x600002, 0x600003) AM_READ(input_port_1_word_r ) // DSW 2 |
| 532 | | AM_RANGE(0x700000, 0x700001) AM_READ(input_port_2_word_r ) // P1 |
| 533 | | AM_RANGE(0x700002, 0x700003) AM_READ(input_port_3_word_r ) // P2 |
| 534 | | AM_RANGE(0x700004, 0x700005) AM_READ(input_port_4_word_r ) // Coins |
| 535 | | AM_RANGE(0x700008, 0x700009) AM_READ(input_port_5_word_r ) // P1 |
| 536 | | AM_RANGE(0x70000a, 0x70000b) AM_READ(input_port_6_word_r ) // P2 |
| 526 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 527 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 528 | AM_RANGE(0x500000, 0x57ffff) AM_READ(SMH_ROM ) // ROM |
| 529 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW1") // DSW 1 |
| 530 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW2") // DSW 2 |
| 531 | AM_RANGE(0x700000, 0x700001) AM_READ_PORT("P1") // P1 |
| 532 | AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P2") // P2 |
| 533 | AM_RANGE(0x700004, 0x700005) AM_READ_PORT("SYSTEM") // Coins |
| 534 | AM_RANGE(0x700008, 0x700009) AM_READ_PORT("IN0") // P1 |
| 535 | AM_RANGE(0x70000a, 0x70000b) AM_READ_PORT("IN1") // P2 |
| 537 | 536 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(seta_sound_word_r ) // Sound |
| 538 | 537 | AM_RANGE(0xfffd0a, 0xfffd0b) AM_READ(gundamex_eeprom_r ) // parallel data register |
| 539 | 538 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 564 | 563 | { |
| 565 | 564 | switch (keyboard_row) |
| 566 | 565 | { |
| 567 | | case 0x01: return input_port_read_indexed(machine, 3); |
| 568 | | case 0x02: return input_port_read_indexed(machine, 4); |
| 569 | | case 0x04: return input_port_read_indexed(machine, 5); |
| 570 | | case 0x08: return input_port_read_indexed(machine, 6); |
| 571 | | case 0x10: return input_port_read_indexed(machine, 7); |
| 566 | case 0x01: return input_port_read(machine, "KEY0"); |
| 567 | case 0x02: return input_port_read(machine, "KEY1"); |
| 568 | case 0x04: return input_port_read(machine, "KEY2"); |
| 569 | case 0x08: return input_port_read(machine, "KEY3"); |
| 570 | case 0x10: return input_port_read(machine, "KEY4"); |
| 572 | 571 | default: logerror("p1_r with keyboard_row = %02x\n",keyboard_row); return 0xffff; |
| 573 | 572 | } |
| 574 | 573 | } |
| r2956 | r2957 | |
| 580 | 579 | } |
| 581 | 580 | |
| 582 | 581 | static ADDRESS_MAP_START( mj4simai_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 583 | | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 584 | | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 585 | | AM_RANGE(0x600000, 0x600001) AM_READ(mj4simai_p1_r ) // P1 |
| 586 | | AM_RANGE(0x600002, 0x600003) AM_READ(mj4simai_p1_r ) // P2, but I'm using P1 again |
| 582 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 583 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 584 | AM_RANGE(0x600000, 0x600001) AM_READ(mj4simai_p1_r ) // P1 |
| 585 | AM_RANGE(0x600002, 0x600003) AM_READ(mj4simai_p1_r ) // P2, but I'm using P1 again |
| 587 | 586 | AM_RANGE(0x600006, 0x600007) AM_READ(watchdog_reset16_r ) // Watchdog |
| 588 | | AM_RANGE(0x600100, 0x600101) AM_READ(input_port_2_word_r ) // |
| 589 | | AM_RANGE(0x600300, 0x600301) AM_READ(input_port_0_word_r ) // DSW 1 |
| 590 | | AM_RANGE(0x600302, 0x600303) AM_READ(input_port_1_word_r ) // DSW 2 |
| 587 | AM_RANGE(0x600100, 0x600101) AM_READ_PORT("SYSTEM") // |
| 588 | AM_RANGE(0x600300, 0x600301) AM_READ_PORT("DSW1") // DSW 1 |
| 589 | AM_RANGE(0x600302, 0x600303) AM_READ_PORT("DSW2") // DSW 2 |
| 591 | 590 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(seta_sound_word_r ) // Sound |
| 592 | | AM_RANGE(0xc00000, 0xc3ffff) AM_READ(SMH_RAM ) // Sprites |
| 593 | | AM_RANGE(0xc40000, 0xc4ffff) AM_READ(SMH_RAM ) // Palette |
| 594 | | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 591 | AM_RANGE(0xc00000, 0xc3ffff) AM_READ(SMH_RAM ) // Sprites |
| 592 | AM_RANGE(0xc40000, 0xc4ffff) AM_READ(SMH_RAM ) // Palette |
| 593 | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 595 | 594 | ADDRESS_MAP_END |
| 596 | 595 | |
| 597 | 596 | static ADDRESS_MAP_START( mj4simai_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 613 | 612 | ***************************************************************************/ |
| 614 | 613 | |
| 615 | 614 | static ADDRESS_MAP_START( myangel_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 616 | | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 617 | | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 618 | | AM_RANGE(0x700000, 0x700001) AM_READ(input_port_2_word_r ) // P1 |
| 619 | | AM_RANGE(0x700002, 0x700003) AM_READ(input_port_3_word_r ) // P2 |
| 620 | | AM_RANGE(0x700004, 0x700005) AM_READ(input_port_4_word_r ) // Coins |
| 615 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 616 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 617 | AM_RANGE(0x700000, 0x700001) AM_READ_PORT("P1") // P1 |
| 618 | AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P2") // P2 |
| 619 | AM_RANGE(0x700004, 0x700005) AM_READ_PORT("SYSTEM") // Coins |
| 621 | 620 | AM_RANGE(0x700006, 0x700007) AM_READ(watchdog_reset16_r ) // Watchdog |
| 622 | | AM_RANGE(0x700300, 0x700301) AM_READ(input_port_0_word_r ) // DSW 1 |
| 623 | | AM_RANGE(0x700302, 0x700303) AM_READ(input_port_1_word_r ) // DSW 2 |
| 621 | AM_RANGE(0x700300, 0x700301) AM_READ_PORT("DSW1") // DSW 1 |
| 622 | AM_RANGE(0x700302, 0x700303) AM_READ_PORT("DSW2") // DSW 2 |
| 624 | 623 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(seta_sound_word_r ) // Sound |
| 625 | | AM_RANGE(0xc00000, 0xc3ffff) AM_READ(SMH_RAM ) // Sprites |
| 626 | | AM_RANGE(0xc40000, 0xc4ffff) AM_READ(SMH_RAM ) // Palette |
| 627 | | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 624 | AM_RANGE(0xc00000, 0xc3ffff) AM_READ(SMH_RAM ) // Sprites |
| 625 | AM_RANGE(0xc40000, 0xc4ffff) AM_READ(SMH_RAM ) // Palette |
| 626 | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 628 | 627 | ADDRESS_MAP_END |
| 629 | 628 | |
| 630 | 629 | static ADDRESS_MAP_START( myangel_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 645 | 644 | ***************************************************************************/ |
| 646 | 645 | |
| 647 | 646 | static ADDRESS_MAP_START( myangel2_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 648 | | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 649 | | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 650 | | AM_RANGE(0x600000, 0x600001) AM_READ(input_port_2_word_r ) // P1 |
| 651 | | AM_RANGE(0x600002, 0x600003) AM_READ(input_port_3_word_r ) // P2 |
| 652 | | AM_RANGE(0x600004, 0x600005) AM_READ(input_port_4_word_r ) // Coins |
| 647 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 648 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 649 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("P1") // P1 |
| 650 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("P2") // P2 |
| 651 | AM_RANGE(0x600004, 0x600005) AM_READ_PORT("SYSTEM") // Coins |
| 653 | 652 | AM_RANGE(0x600006, 0x600007) AM_READ(watchdog_reset16_r ) // Watchdog |
| 654 | | AM_RANGE(0x600300, 0x600301) AM_READ(input_port_0_word_r ) // DSW 1 |
| 655 | | AM_RANGE(0x600302, 0x600303) AM_READ(input_port_1_word_r ) // DSW 2 |
| 653 | AM_RANGE(0x600300, 0x600301) AM_READ_PORT("DSW1") // DSW 1 |
| 654 | AM_RANGE(0x600302, 0x600303) AM_READ_PORT("DSW0") // DSW 2 |
| 656 | 655 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(seta_sound_word_r ) // Sound |
| 657 | | AM_RANGE(0xd00000, 0xd3ffff) AM_READ(SMH_RAM ) // Sprites |
| 658 | | AM_RANGE(0xd40000, 0xd4ffff) AM_READ(SMH_RAM ) // Palette |
| 659 | | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 656 | AM_RANGE(0xd00000, 0xd3ffff) AM_READ(SMH_RAM ) // Sprites |
| 657 | AM_RANGE(0xd40000, 0xd4ffff) AM_READ(SMH_RAM ) // Palette |
| 658 | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 660 | 659 | ADDRESS_MAP_END |
| 661 | 660 | |
| 662 | 661 | static ADDRESS_MAP_START( myangel2_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 686 | 685 | |
| 687 | 686 | static READ16_HANDLER( pzlbowl_coins_r ) |
| 688 | 687 | { |
| 689 | | return input_port_read_indexed(machine, 4) | (mame_rand(machine) & 0x80 ); |
| 688 | return input_port_read(machine, "SYSTEM") | (mame_rand(machine) & 0x80 ); |
| 690 | 689 | } |
| 691 | 690 | |
| 692 | 691 | static WRITE16_HANDLER( pzlbowl_coin_counter_w ) |
| r2956 | r2957 | |
| 701 | 700 | static ADDRESS_MAP_START( pzlbowl_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 702 | 701 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 703 | 702 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 704 | | AM_RANGE(0x400300, 0x400301) AM_READ(input_port_0_word_r ) // DSW 1 |
| 705 | | AM_RANGE(0x400302, 0x400303) AM_READ(input_port_1_word_r ) // DSW 2 |
| 706 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_2_word_r ) // P1 |
| 707 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_3_word_r ) // P2 |
| 703 | AM_RANGE(0x400300, 0x400301) AM_READ_PORT("DSW1") // DSW 1 |
| 704 | AM_RANGE(0x400302, 0x400303) AM_READ_PORT("DSW2") // DSW 2 |
| 705 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 706 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 708 | 707 | AM_RANGE(0x500004, 0x500005) AM_READ(pzlbowl_coins_r ) // Coins + Protection? |
| 709 | 708 | AM_RANGE(0x500006, 0x500007) AM_READ(watchdog_reset16_r ) // Watchdog |
| 710 | 709 | AM_RANGE(0x700000, 0x700001) AM_READ(pzlbowl_protection_r ) // Protection |
| r2956 | r2957 | |
| 732 | 731 | ***************************************************************************/ |
| 733 | 732 | |
| 734 | 733 | static ADDRESS_MAP_START( penbros_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 735 | | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 736 | | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 737 | | AM_RANGE(0x210000, 0x23ffff) AM_READ(SMH_RAM ) // RAM |
| 738 | | AM_RANGE(0x300000, 0x30ffff) AM_READ(SMH_RAM ) // RAM |
| 739 | | AM_RANGE(0x500300, 0x500301) AM_READ(input_port_0_word_r ) // DSW 1 |
| 740 | | AM_RANGE(0x500302, 0x500303) AM_READ(input_port_1_word_r ) // DSW 2 |
| 741 | | AM_RANGE(0x600000, 0x600001) AM_READ(input_port_2_word_r ) // P1 |
| 742 | | AM_RANGE(0x600002, 0x600003) AM_READ(input_port_3_word_r ) // P2 |
| 743 | | AM_RANGE(0x600004, 0x600005) AM_READ(input_port_4_word_r ) // Coins |
| 734 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 735 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 736 | AM_RANGE(0x210000, 0x23ffff) AM_READ(SMH_RAM ) // RAM |
| 737 | AM_RANGE(0x300000, 0x30ffff) AM_READ(SMH_RAM ) // RAM |
| 738 | AM_RANGE(0x500300, 0x500301) AM_READ_PORT("DSW1") // DSW 1 |
| 739 | AM_RANGE(0x500302, 0x500303) AM_READ_PORT("DSW2") // DSW 2 |
| 740 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("P1") // P1 |
| 741 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("P2") // P2 |
| 742 | AM_RANGE(0x600004, 0x600005) AM_READ_PORT("SYSTEM") // Coins |
| 744 | 743 | AM_RANGE(0x600006, 0x600007) AM_READ(watchdog_reset16_r ) // Watchdog |
| 745 | | // AM_RANGE(0x700000, 0x700001) AM_READ(pzlbowl_protection_r ) // Protection |
| 746 | | AM_RANGE(0xb00000, 0xb3ffff) AM_READ(SMH_RAM ) // Sprites |
| 747 | | AM_RANGE(0xb40000, 0xb4ffff) AM_READ(SMH_RAM ) // Palette |
| 744 | // AM_RANGE(0x700000, 0x700001) AM_READ(pzlbowl_protection_r ) // Protection |
| 745 | AM_RANGE(0xb00000, 0xb3ffff) AM_READ(SMH_RAM ) // Sprites |
| 746 | AM_RANGE(0xb40000, 0xb4ffff) AM_READ(SMH_RAM ) // Palette |
| 748 | 747 | AM_RANGE(0xa00000, 0xa03fff) AM_READ(seta_sound_word_r ) // Sound |
| 749 | | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 748 | AM_RANGE(0xfffc00, 0xffffff) AM_READ(SMH_RAM ) // TMP68301 Registers |
| 750 | 749 | ADDRESS_MAP_END |
| 751 | 750 | |
| 752 | 751 | static ADDRESS_MAP_START( penbros_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 770 | 769 | |
| 771 | 770 | static READ16_HANDLER( samshoot_lightgun1_r ) |
| 772 | 771 | { |
| 773 | | // popmessage("%02x %02x",input_port_read_indexed(machine, 3),input_port_read_indexed(machine, 2)); |
| 774 | | return (input_port_read_indexed(machine, 2) << 8) | input_port_read_indexed(machine, 3); |
| 772 | // popmessage("%02x %02x",input_port_read(machine, "GUN1X"),input_port_read(machine, "GUN1Y")); |
| 773 | return (input_port_read(machine, "GUN1Y") << 8) | input_port_read(machine, "GUN1X"); |
| 775 | 774 | } |
| 776 | 775 | static READ16_HANDLER( samshoot_lightgun2_r ) |
| 777 | 776 | { |
| 778 | | return (input_port_read_indexed(machine, 4) << 8) | input_port_read_indexed(machine, 5); |
| 777 | return (input_port_read(machine, "GUN2Y") << 8) | input_port_read(machine, "GUN2X"); |
| 779 | 778 | } |
| 780 | 779 | |
| 781 | 780 | static WRITE16_HANDLER( samshoot_coin_w ) |
| r2956 | r2957 | |
| 796 | 795 | AM_RANGE( 0x200000, 0x20ffff ) AM_RAM |
| 797 | 796 | AM_RANGE( 0x300000, 0x30ffff ) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) |
| 798 | 797 | |
| 799 | | AM_RANGE( 0x400000, 0x400001 ) AM_READ( input_port_0_word_r ) // DSW 1 |
| 800 | | AM_RANGE( 0x400002, 0x400003 ) AM_READ( input_port_9_word_r ) // Buttons |
| 798 | AM_RANGE( 0x400000, 0x400001 ) AM_READ_PORT("DSW1") // DSW 1 |
| 799 | AM_RANGE( 0x400002, 0x400003 ) AM_READ_PORT("BUTTONS") // Buttons |
| 801 | 800 | |
| 802 | 801 | AM_RANGE( 0x400300, 0x40030f ) AM_WRITE( seta2_sound_bank_w ) // Samples Banks |
| 803 | 802 | |
| 804 | 803 | AM_RANGE( 0x500000, 0x500001 ) AM_READ( samshoot_lightgun1_r ) // P1 |
| 805 | 804 | AM_RANGE( 0x580000, 0x580001 ) AM_READ( samshoot_lightgun2_r ) // P2 |
| 806 | 805 | |
| 807 | | AM_RANGE( 0x700000, 0x700001 ) AM_READ( input_port_6_word_r ) // Trigger |
| 808 | | AM_RANGE( 0x700002, 0x700003 ) AM_READ( input_port_7_word_r ) // Pump |
| 809 | | AM_RANGE( 0x700004, 0x700005 ) AM_READWRITE( input_port_8_word_r, samshoot_coin_w ) // Coins |
| 806 | AM_RANGE( 0x700000, 0x700001 ) AM_READ_PORT("TRIGGER") // Trigger |
| 807 | AM_RANGE( 0x700002, 0x700003 ) AM_READ_PORT("PUMP") // Pump |
| 808 | AM_RANGE( 0x700004, 0x700005 ) AM_READ_PORT("COIN") AM_WRITE( samshoot_coin_w ) // Coins |
| 810 | 809 | AM_RANGE( 0x700006, 0x700007 ) AM_READ( watchdog_reset16_r ) // Watchdog? |
| 811 | 810 | |
| 812 | 811 | AM_RANGE( 0x800000, 0x83ffff ) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) // Sprites |
| r2956 | r2957 | |
| 815 | 814 | |
| 816 | 815 | AM_RANGE( 0x900000, 0x903fff ) AM_READWRITE( seta_sound_word_r, seta_sound_word_w ) // Sound |
| 817 | 816 | |
| 818 | | AM_RANGE( 0xfffd0a, 0xfffd0b ) AM_READ( input_port_1_word_r ) // parallel data register (DSW 2) |
| 817 | AM_RANGE( 0xfffd0a, 0xfffd0b ) AM_READ_PORT("DSW2") // parallel data register (DSW 2) |
| 819 | 818 | AM_RANGE( 0xfffc00, 0xffffff ) AM_READWRITE( SMH_RAM, tmp68301_regs_w) AM_BASE(&tmp68301_regs ) // TMP68301 Registers |
| 820 | 819 | ADDRESS_MAP_END |
| 821 | 820 | |
| r2956 | r2957 | |
| 832 | 831 | ***************************************************************************/ |
| 833 | 832 | |
| 834 | 833 | static INPUT_PORTS_START( gundamex ) |
| 835 | | PORT_START_TAG("IN0") // $600000.w |
| 834 | PORT_START_TAG("DSW1") // $600000.w |
| 836 | 835 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1") |
| 837 | 836 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 838 | 837 | PORT_DIPSETTING( 0x0001, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 854 | 853 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" ) |
| 855 | 854 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 856 | 855 | |
| 857 | | PORT_START_TAG("IN1") // $600002.w |
| 856 | PORT_START_TAG("DSW2") // $600002.w |
| 858 | 857 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 859 | 858 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) |
| 860 | 859 | PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 881 | 880 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 882 | 881 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 883 | 882 | |
| 884 | | PORT_START_TAG("IN2") // $700000.w |
| 883 | PORT_START_TAG("P1") // $700000.w |
| 885 | 884 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 886 | 885 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 887 | 886 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 892 | 891 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 893 | 892 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 894 | 893 | |
| 895 | | PORT_START_TAG("IN3") // $700002.w |
| 894 | PORT_START_TAG("P2") // $700002.w |
| 896 | 895 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 897 | 896 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 898 | 897 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 903 | 902 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 904 | 903 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 905 | 904 | |
| 906 | | PORT_START_TAG("IN4") // $700004.w |
| 905 | PORT_START_TAG("SYSTEM") // $700004.w |
| 907 | 906 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 908 | 907 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 909 | 908 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 916 | 915 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 917 | 916 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 918 | 917 | |
| 919 | | PORT_START_TAG("IN5") // $700008.w |
| 918 | PORT_START_TAG("IN0") // $700008.w |
| 920 | 919 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 921 | 920 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 922 | 921 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 927 | 926 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 928 | 927 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 929 | 928 | |
| 930 | | PORT_START_TAG("IN6") // $70000a.w |
| 929 | PORT_START_TAG("IN1") // $70000a.w |
| 931 | 930 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 932 | 931 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 933 | 932 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 944 | 943 | ***************************************************************************/ |
| 945 | 944 | |
| 946 | 945 | static INPUT_PORTS_START( grdians ) |
| 947 | | PORT_START_TAG("IN0") // $600000.w |
| 946 | PORT_START_TAG("DSW1") // $600000.w |
| 948 | 947 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:1,2") |
| 949 | 948 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) // 0 |
| 950 | 949 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) // 1 |
| r2956 | r2957 | |
| 967 | 966 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) |
| 968 | 967 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 969 | 968 | |
| 970 | | PORT_START_TAG("IN1") // $600002.w |
| 969 | PORT_START_TAG("DSW2") // $600002.w |
| 971 | 970 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 972 | 971 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| 973 | 972 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1004 | 1003 | PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) |
| 1005 | 1004 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1006 | 1005 | |
| 1007 | | PORT_START_TAG("IN2") // $700000.w |
| 1006 | PORT_START_TAG("P1") // $700000.w |
| 1008 | 1007 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 1009 | 1008 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 1010 | 1009 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 1015 | 1014 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 1016 | 1015 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1017 | 1016 | |
| 1018 | | PORT_START_TAG("IN3") // $700002.w |
| 1017 | PORT_START_TAG("P2") // $700002.w |
| 1019 | 1018 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 1020 | 1019 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 1021 | 1020 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 1026 | 1025 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 1027 | 1026 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1028 | 1027 | |
| 1029 | | PORT_START_TAG("IN4") // $700004.w |
| 1028 | PORT_START_TAG("SYSTEM") // $700004.w |
| 1030 | 1029 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 1031 | 1030 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 1032 | 1031 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1044 | 1043 | ***************************************************************************/ |
| 1045 | 1044 | |
| 1046 | 1045 | static INPUT_PORTS_START( mj4simai ) |
| 1047 | | PORT_START_TAG("IN0") // $600300.w |
| 1046 | PORT_START_TAG("DSW1") // $600300.w |
| 1048 | 1047 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3") |
| 1049 | 1048 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 1050 | 1049 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| r2956 | r2957 | |
| 1069 | 1068 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "SW1:8" ) |
| 1070 | 1069 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1071 | 1070 | |
| 1072 | | PORT_START_TAG("IN1") // $600302.w |
| 1071 | PORT_START_TAG("DSW2") // $600302.w |
| 1073 | 1072 | PORT_DIPNAME( 0x0007, 0x0004, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 1074 | 1073 | PORT_DIPSETTING( 0x0004, "0" ) |
| 1075 | 1074 | PORT_DIPSETTING( 0x0003, "1" ) |
| r2956 | r2957 | |
| 1096 | 1095 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1097 | 1096 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1098 | 1097 | |
| 1099 | | PORT_START_TAG("IN2") // $600100.w |
| 1098 | PORT_START_TAG("SYSTEM") // $600100.w |
| 1100 | 1099 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 1101 | 1100 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 1102 | 1101 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1107 | 1106 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1108 | 1107 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1109 | 1108 | |
| 1110 | | PORT_START_TAG("IN3") // $600000(0) |
| 1109 | PORT_START_TAG("KEY0") // $600000(0) |
| 1111 | 1110 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 1112 | 1111 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 1113 | 1112 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| r2956 | r2957 | |
| 1116 | 1115 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) |
| 1117 | 1116 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1118 | 1117 | |
| 1119 | | PORT_START_TAG("IN4") // $600000(1) |
| 1118 | PORT_START_TAG("KEY1") // $600000(1) |
| 1120 | 1119 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 1121 | 1120 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 1122 | 1121 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| r2956 | r2957 | |
| 1125 | 1124 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) |
| 1126 | 1125 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN) |
| 1127 | 1126 | |
| 1128 | | PORT_START_TAG("IN5") // $600000(2) |
| 1127 | PORT_START_TAG("KEY2") // $600000(2) |
| 1129 | 1128 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 1130 | 1129 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 1131 | 1130 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| r2956 | r2957 | |
| 1133 | 1132 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 1134 | 1133 | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1135 | 1134 | |
| 1136 | | PORT_START_TAG("IN6") // $600000(3) |
| 1135 | PORT_START_TAG("KEY3") // $600000(3) |
| 1137 | 1136 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 1138 | 1137 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 1139 | 1138 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 1140 | 1139 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 1141 | 1140 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1142 | 1141 | |
| 1143 | | PORT_START_TAG("IN7") // $600000(4) |
| 1142 | PORT_START_TAG("KEY4") // $600000(4) |
| 1144 | 1143 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) |
| 1145 | 1144 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) |
| 1146 | 1145 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) |
| r2956 | r2957 | |
| 1157 | 1156 | ***************************************************************************/ |
| 1158 | 1157 | |
| 1159 | 1158 | static INPUT_PORTS_START( myangel ) |
| 1160 | | PORT_START_TAG("IN0") // $700300.w |
| 1159 | PORT_START_TAG("DSW1") // $700300.w |
| 1161 | 1160 | PORT_SERVICE_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW1:1" ) |
| 1162 | 1161 | PORT_DIPUNUSED_DIPLOC( 0x0002, 0x0002, "SW1:2" ) /* Listed as "Unused" */ |
| 1163 | 1162 | PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW1:3" ) /* Listed as "Unused" */ |
| r2956 | r2957 | |
| 1177 | 1176 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1178 | 1177 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1179 | 1178 | |
| 1180 | | PORT_START_TAG("IN1") // $700302.w |
| 1179 | PORT_START_TAG("DSW2") // $700302.w |
| 1181 | 1180 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 1182 | 1181 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| 1183 | 1182 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1203 | 1202 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| 1204 | 1203 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1205 | 1204 | |
| 1206 | | PORT_START_TAG("IN2") //$700000.w |
| 1205 | PORT_START_TAG("P1") //$700000.w |
| 1207 | 1206 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1208 | 1207 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1209 | 1208 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1214 | 1213 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 1215 | 1214 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1216 | 1215 | |
| 1217 | | PORT_START_TAG("IN3") //$700002.w |
| 1216 | PORT_START_TAG("P2") //$700002.w |
| 1218 | 1217 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1219 | 1218 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1220 | 1219 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1225 | 1224 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 1226 | 1225 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1227 | 1226 | |
| 1228 | | PORT_START_TAG("IN4") //$700004.w |
| 1227 | PORT_START_TAG("SYSTEM") //$700004.w |
| 1229 | 1228 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 1230 | 1229 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 1231 | 1230 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1243 | 1242 | ***************************************************************************/ |
| 1244 | 1243 | |
| 1245 | 1244 | static INPUT_PORTS_START( myangel2 ) |
| 1246 | | PORT_START_TAG("IN0") //$600300.w |
| 1245 | PORT_START_TAG("DSW1") //$600300.w |
| 1247 | 1246 | PORT_SERVICE_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW1:1" ) |
| 1248 | 1247 | PORT_DIPUNUSED_DIPLOC( 0x0002, 0x0002, "SW1:2" ) /* Listed as "Unused" */ |
| 1249 | 1248 | PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW1:3" ) /* Listed as "Unused" */ |
| r2956 | r2957 | |
| 1261 | 1260 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:8") |
| 1262 | 1261 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 1263 | 1262 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1264 | | |
| 1265 | 1263 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1266 | 1264 | |
| 1267 | | PORT_START_TAG("IN1") //$600302.w |
| 1265 | PORT_START_TAG("DSW2") //$600302.w |
| 1268 | 1266 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 1269 | 1267 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| 1270 | 1268 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1288 | 1286 | PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW2:8" ) /* Listed as "Unused" */ |
| 1289 | 1287 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1290 | 1288 | |
| 1291 | | PORT_START_TAG("IN2") //$600000.w |
| 1289 | PORT_START_TAG("P1") //$600000.w |
| 1292 | 1290 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1293 | 1291 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1294 | 1292 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1299 | 1297 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 1300 | 1298 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1301 | 1299 | |
| 1302 | | PORT_START_TAG("IN3") //$600002.w |
| 1300 | PORT_START_TAG("P2") //$600002.w |
| 1303 | 1301 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1304 | 1302 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1305 | 1303 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1310 | 1308 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 1311 | 1309 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1312 | 1310 | |
| 1313 | | PORT_START_TAG("IN4") //$600004.w |
| 1311 | PORT_START_TAG("SYSTEM") //$600004.w |
| 1314 | 1312 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 1315 | 1313 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 1316 | 1314 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1328 | 1326 | ***************************************************************************/ |
| 1329 | 1327 | |
| 1330 | 1328 | static INPUT_PORTS_START( pzlbowl ) |
| 1331 | | PORT_START_TAG("IN0") //$400300.w |
| 1329 | PORT_START_TAG("DSW1") //$400300.w |
| 1332 | 1330 | PORT_SERVICE_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW1:1" ) |
| 1333 | 1331 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:2") |
| 1334 | 1332 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 1352 | 1350 | PORT_DIPSETTING( 0x0000, "5" ) |
| 1353 | 1351 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1354 | 1352 | |
| 1355 | | PORT_START_TAG("IN1") //$400302.w |
| 1353 | PORT_START_TAG("DSW2") //$400302.w |
| 1356 | 1354 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 1357 | 1355 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| 1358 | 1356 | PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) ) |
| r2956 | r2957 | |
| 1382 | 1380 | PORT_DIPSETTING( 0x0080, DEF_STR( Japanese ) ) |
| 1383 | 1381 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1384 | 1382 | |
| 1385 | | PORT_START_TAG("IN2") //$500000.w |
| 1383 | PORT_START_TAG("P1") //$500000.w |
| 1386 | 1384 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 1387 | 1385 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 1388 | 1386 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 1393 | 1391 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 1394 | 1392 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1395 | 1393 | |
| 1396 | | PORT_START_TAG("IN3") //$500002.w |
| 1394 | PORT_START_TAG("P2") //$500002.w |
| 1397 | 1395 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 1398 | 1396 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 1399 | 1397 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 1404 | 1402 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 1405 | 1403 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1406 | 1404 | |
| 1407 | | PORT_START_TAG("IN4") //$500004.w |
| 1405 | PORT_START_TAG("SYSTEM") //$500004.w |
| 1408 | 1406 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 1409 | 1407 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) // unused, test mode shows it |
| 1410 | 1408 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1422 | 1420 | ***************************************************************************/ |
| 1423 | 1421 | |
| 1424 | 1422 | static INPUT_PORTS_START( penbros ) |
| 1425 | | PORT_START_TAG("IN0") //$500300.w |
| 1423 | PORT_START_TAG("DSW1") //$500300.w |
| 1426 | 1424 | PORT_SERVICE_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW1:1" ) |
| 1427 | 1425 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2") |
| 1428 | 1426 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 1443 | 1441 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_2C ) ) |
| 1444 | 1442 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1445 | 1443 | |
| 1446 | | PORT_START_TAG("IN1") //$500302.w |
| 1444 | PORT_START_TAG("DSW2") //$500302.w |
| 1447 | 1445 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 1448 | 1446 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 1449 | 1447 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 1466 | 1464 | PORT_DIPSETTING( 0x0000, "5" ) |
| 1467 | 1465 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1468 | 1466 | |
| 1469 | | PORT_START_TAG("IN2") //$600000.w |
| 1467 | PORT_START_TAG("P1") //$600000.w |
| 1470 | 1468 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 1471 | 1469 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 1472 | 1470 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 1477 | 1475 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 1478 | 1476 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1479 | 1477 | |
| 1480 | | PORT_START_TAG("IN3") //$600002.w |
| 1478 | PORT_START_TAG("P2") //$600002.w |
| 1481 | 1479 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 1482 | 1480 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 1483 | 1481 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 1488 | 1486 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 1489 | 1487 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1490 | 1488 | |
| 1491 | | PORT_START_TAG("IN4") //$600004.w |
| 1489 | PORT_START_TAG("SYSTEM") //$600004.w |
| 1492 | 1490 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 1493 | 1491 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) // unused, test mode shows it |
| 1494 | 1492 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
src/mame/drivers/system16.c
| r2956 | r2957 | |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | |
| 229 | | |
| 230 | 229 | /***************************************************************************/ |
| 231 | 230 | /* |
| 232 | 231 | Tough Turf (Datsu bootleg) sound emulation |
| r2956 | r2957 | |
| 423 | 422 | |
| 424 | 423 | //static UINT16 coinctrl; |
| 425 | 424 | |
| 426 | | |
| 427 | 425 | static WRITE16_HANDLER( sys16_coinctrl_w ) |
| 428 | 426 | { |
| 429 | 427 | if( ACCESSING_BITS_0_7 ) |
| r2956 | r2957 | |
| 492 | 490 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.48) |
| 493 | 491 | MACHINE_DRIVER_END |
| 494 | 492 | |
| 495 | | |
| 496 | | |
| 497 | 493 | /***************************************************************************/ |
| 498 | 494 | |
| 499 | 495 | static WRITE16_HANDLER( sys16_tilebank_w ) |
| r2956 | r2957 | |
| 542 | 538 | sys16_bg_page[3] = data&0xf; |
| 543 | 539 | } |
| 544 | 540 | |
| 545 | | |
| 546 | | |
| 547 | | |
| 548 | | |
| 549 | 541 | /***************************************************************************/ |
| 550 | | /***************************************************************************/ |
| 551 | | /***************************************************************************/ |
| 552 | 542 | |
| 543 | static INPUT_PORTS_START( sys16_common ) |
| 544 | PORT_START_TAG("P1") |
| 545 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 546 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 547 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 548 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 549 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 550 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 551 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 552 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 553 | 553 | |
| 554 | PORT_START_TAG("P2") |
| 555 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 556 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 557 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 558 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 559 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 560 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 561 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 562 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 554 | 563 | |
| 564 | PORT_START_TAG("SERVICE") |
| 565 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 566 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 567 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) |
| 568 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 569 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 570 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 571 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 572 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 555 | 573 | |
| 556 | | /***************************************************************************/ |
| 574 | PORT_START_TAG("DSW1") |
| 575 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") |
| 576 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) |
| 577 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) |
| 578 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) |
| 579 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) |
| 580 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) |
| 581 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) |
| 582 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) |
| 583 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) |
| 584 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) |
| 585 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) |
| 586 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) |
| 587 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) |
| 588 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) |
| 589 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) |
| 590 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 591 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) |
| 592 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") |
| 593 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) |
| 594 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) |
| 595 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) |
| 596 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) |
| 597 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) |
| 598 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) |
| 599 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) |
| 600 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) |
| 601 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) |
| 602 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) |
| 603 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) |
| 604 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) |
| 605 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) |
| 606 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) |
| 607 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) |
| 608 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) |
| 609 | INPUT_PORTS_END |
| 557 | 610 | |
| 558 | | |
| 559 | 611 | /***************************************************************************/ |
| 560 | 612 | |
| 561 | | |
| 562 | | /***************************************************************************/ |
| 563 | | |
| 564 | | /***************************************************************************/ |
| 565 | | |
| 566 | | |
| 567 | | /***************************************************************************/ |
| 568 | | |
| 569 | | |
| 570 | | /***************************************************************************/ |
| 571 | | |
| 572 | | |
| 573 | | |
| 574 | | /***************************************************************************/ |
| 575 | | |
| 576 | 613 | #ifdef UNUSED_DEFINITION |
| 577 | 614 | static INPUT_PORTS_START( aliensyn ) |
| 578 | | SYS16_JOY1 |
| 579 | | SYS16_JOY2 |
| 580 | | SYS16_SERVICE |
| 581 | | SYS16_COINAGE |
| 615 | PORT_INCLUDE( sys16_common ) |
| 582 | 616 | |
| 583 | 617 | PORT_START_TAG("DSW2") |
| 584 | 618 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ |
| r2956 | r2957 | |
| 604 | 638 | #endif |
| 605 | 639 | /****************************************************************************/ |
| 606 | 640 | |
| 607 | | |
| 608 | | /***************************************************************************/ |
| 609 | | |
| 610 | | |
| 611 | 641 | static ADDRESS_MAP_START( bayroute_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 612 | 642 | AM_RANGE(0x000000, 0x0bffff) AM_READ(SMH_ROM) |
| 613 | 643 | AM_RANGE(0x500000, 0x503fff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| r2956 | r2957 | |
| 615 | 645 | AM_RANGE(0x700000, 0x70ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 616 | 646 | AM_RANGE(0x710000, 0x710fff) AM_READ(SYS16_MRA16_TEXTRAM) |
| 617 | 647 | AM_RANGE(0x800000, 0x800fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 618 | | AM_RANGE(0x901002, 0x901003) AM_READ(input_port_0_word_r) // player1 |
| 619 | | AM_RANGE(0x901006, 0x901007) AM_READ(input_port_1_word_r) // player2 |
| 620 | | AM_RANGE(0x901000, 0x901001) AM_READ(input_port_2_word_r) // service |
| 621 | | AM_RANGE(0x902002, 0x902003) AM_READ(input_port_3_word_r) // dip1 |
| 622 | | AM_RANGE(0x902000, 0x902001) AM_READ(input_port_4_word_r) // dip2 |
| 648 | AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1") |
| 649 | AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2") |
| 650 | AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") |
| 651 | AM_RANGE(0x902002, 0x902003) AM_READ_PORT("DSW1") |
| 652 | AM_RANGE(0x902000, 0x902001) AM_READ_PORT("DSW2") |
| 623 | 653 | ADDRESS_MAP_END |
| 624 | 654 | |
| 625 | 655 | static ADDRESS_MAP_START( bayroute_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 664 | 694 | { |
| 665 | 695 | MACHINE_RESET_CALL(sys16_onetime); |
| 666 | 696 | } |
| 697 | |
| 667 | 698 | /***************************************************************************/ |
| 668 | 699 | |
| 669 | 700 | static INPUT_PORTS_START( bayroute ) |
| 670 | | SYS16_JOY1 |
| 671 | | SYS16_JOY2 |
| 672 | | SYS16_SERVICE |
| 673 | | SYS16_COINAGE |
| 701 | PORT_INCLUDE( sys16_common ) |
| 674 | 702 | |
| 675 | 703 | PORT_START_TAG("DSW2") |
| 676 | 704 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:1") |
| r2956 | r2957 | |
| 708 | 736 | MDRV_MACHINE_RESET(bayroute) |
| 709 | 737 | MACHINE_DRIVER_END |
| 710 | 738 | |
| 711 | | /*************************************************************************** |
| 712 | | |
| 713 | | Body Slam |
| 714 | | |
| 715 | | ***************************************************************************/ |
| 716 | | |
| 717 | | |
| 718 | 739 | /***************************************************************************/ |
| 719 | 740 | |
| 720 | | |
| 721 | | /***************************************************************************/ |
| 722 | | |
| 723 | | |
| 724 | | /***************************************************************************/ |
| 725 | | |
| 726 | | |
| 727 | | /***************************************************************************/ |
| 728 | | |
| 729 | 741 | static ADDRESS_MAP_START( dduxbl_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 730 | 742 | AM_RANGE(0x000000, 0x0bffff) AM_READ(SMH_ROM) |
| 731 | 743 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 732 | 744 | AM_RANGE(0x410000, 0x410fff) AM_READ(SYS16_MRA16_TEXTRAM) |
| 733 | 745 | AM_RANGE(0x440000, 0x440fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 734 | 746 | AM_RANGE(0x840000, 0x840fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 735 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 736 | | AM_RANGE(0xc41004, 0xc41005) AM_READ(input_port_1_word_r) // player2 |
| 737 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 738 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 739 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 747 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 748 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") |
| 749 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 750 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 751 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 740 | 752 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 741 | 753 | ADDRESS_MAP_END |
| 742 | 754 | |
| r2956 | r2957 | |
| 823 | 835 | MACHINE_RESET_CALL(sys16_onetime); |
| 824 | 836 | sys16_video_config(dduxbl_update_proc, -0x48, bank); |
| 825 | 837 | } |
| 838 | |
| 826 | 839 | /***************************************************************************/ |
| 827 | 840 | |
| 828 | 841 | static INPUT_PORTS_START( ddux ) |
| 829 | | SYS16_JOY1 |
| 830 | | SYS16_JOY2 |
| 831 | | SYS16_SERVICE |
| 832 | | SYS16_COINAGE |
| 842 | PORT_INCLUDE( sys16_common ) |
| 833 | 843 | |
| 834 | 844 | PORT_START_TAG("DSW2") |
| 835 | 845 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") |
| r2956 | r2957 | |
| 867 | 877 | |
| 868 | 878 | /***************************************************************************/ |
| 869 | 879 | |
| 870 | | |
| 871 | | |
| 872 | 880 | static ADDRESS_MAP_START( eswat_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 873 | 881 | AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM) |
| 874 | 882 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 875 | 883 | AM_RANGE(0x410000, 0x418fff) AM_READ(SYS16_MRA16_TEXTRAM) //* |
| 876 | 884 | AM_RANGE(0x440000, 0x440fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 877 | 885 | AM_RANGE(0x840000, 0x840fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 878 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 879 | | AM_RANGE(0xc41006, 0xc41007) AM_READ(input_port_1_word_r) // player2 |
| 880 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 881 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 882 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 886 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 887 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") |
| 888 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 889 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 890 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 883 | 891 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 884 | 892 | ADDRESS_MAP_END |
| 885 | 893 | |
| r2956 | r2957 | |
| 894 | 902 | } |
| 895 | 903 | |
| 896 | 904 | |
| 897 | | |
| 898 | 905 | static ADDRESS_MAP_START( eswatbl_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 899 | 906 | AM_RANGE(0x000000, 0x07ffff) AM_WRITE(SMH_ROM) |
| 900 | 907 | AM_RANGE(0x3e2000, 0x3e2001) AM_WRITE(eswat_tilebank0_w) |
| r2956 | r2957 | |
| 908 | 915 | AM_RANGE(0xffc000, 0xffffff) AM_WRITE(SYS16_MWA16_WORKINGRAM) AM_BASE(&sys16_workingram) |
| 909 | 916 | ADDRESS_MAP_END |
| 910 | 917 | |
| 911 | | |
| 912 | 918 | /***************************************************************************/ |
| 913 | 919 | |
| 914 | 920 | static void eswatbl_update_proc( void ) |
| r2956 | r2957 | |
| 952 | 958 | /***************************************************************************/ |
| 953 | 959 | |
| 954 | 960 | static INPUT_PORTS_START( eswat ) |
| 955 | | SYS16_JOY1 |
| 956 | | SYS16_JOY2 |
| 957 | | SYS16_SERVICE |
| 958 | | SYS16_COINAGE |
| 961 | PORT_INCLUDE( sys16_common ) |
| 959 | 962 | |
| 960 | 963 | PORT_START_TAG("DSW2") |
| 961 | 964 | PORT_DIPNAME( 0x01, 0x01, "Credits To Start" ) PORT_DIPLOCATION("SW2:1") |
| r2956 | r2957 | |
| 996 | 999 | |
| 997 | 1000 | /***************************************************************************/ |
| 998 | 1001 | |
| 999 | | |
| 1000 | | /***************************************************************************/ |
| 1001 | | |
| 1002 | | |
| 1003 | | /***************************************************************************/ |
| 1004 | | |
| 1005 | | |
| 1006 | | /***************************************************************************/ |
| 1007 | | |
| 1008 | | |
| 1009 | 1002 | static ADDRESS_MAP_START( fpointbl_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1010 | 1003 | AM_RANGE(0x000000, 0x01ffff) AM_ROM |
| 1011 | 1004 | // AM_RANGE(0x02002e, 0x020049) AM_READ(fp_io_service_dummy_r) |
| 1012 | 1005 | AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w) |
| 1013 | | AM_RANGE(0x601000, 0x601001) AM_READ(input_port_0_word_r) // service |
| 1014 | | AM_RANGE(0x601002, 0x601003) AM_READ(input_port_1_word_r) // player1 |
| 1015 | | AM_RANGE(0x601004, 0x601005) AM_READ(input_port_2_word_r) // player2 |
| 1016 | | AM_RANGE(0x600000, 0x600001) AM_READ(input_port_3_word_r) // dip1 |
| 1017 | | AM_RANGE(0x600002, 0x600003) AM_READ(input_port_4_word_r) // dip2 |
| 1006 | AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE") |
| 1007 | AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1") |
| 1008 | AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2") |
| 1009 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") |
| 1010 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") |
| 1018 | 1011 | AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(SYS16_MRA16_TILERAM, SYS16_MWA16_TILERAM) AM_BASE(&sys16_tileram) |
| 1019 | 1012 | AM_RANGE(0x410000, 0x410fff) AM_READWRITE(SYS16_MRA16_TEXTRAM, SYS16_MWA16_TEXTRAM) AM_BASE(&sys16_textram) |
| 1020 | 1013 | AM_RANGE(0x440000, 0x440fff) AM_READWRITE(SYS16_MRA16_SPRITERAM, SYS16_MWA16_SPRITERAM) AM_BASE(&sys16_spriteram) |
| r2956 | r2957 | |
| 1071 | 1064 | MACHINE_RESET_CALL(sys16_onetime); |
| 1072 | 1065 | sys16_video_config(fpoint_update_proc, -0xb8, NULL); |
| 1073 | 1066 | } |
| 1067 | |
| 1074 | 1068 | /***************************************************************************/ |
| 1075 | 1069 | |
| 1076 | | static INPUT_PORTS_START( fpoint ) |
| 1077 | | SYS16_SERVICE |
| 1078 | 1070 | |
| 1079 | | PORT_START_TAG("IN0") |
| 1080 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1081 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 1082 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1083 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1084 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 1085 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 1086 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1087 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 1071 | static INPUT_PORTS_START( fpointbl ) |
| 1072 | PORT_START_TAG("SERVICE") |
| 1073 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1074 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1075 | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) |
| 1076 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1077 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1078 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1079 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1080 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1088 | 1081 | |
| 1089 | | PORT_START_TAG("IN1") |
| 1090 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1091 | | |
| 1092 | | PORT_START_TAG("IN3") |
| 1093 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1094 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1095 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1096 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1097 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 1098 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 1099 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1100 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 1101 | | |
| 1102 | | PORT_START_TAG("DSW2") |
| 1103 | | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ |
| 1104 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2") |
| 1105 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1106 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1107 | | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" ) /* Listed as "Unused" */ |
| 1108 | | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* Listed as "Unused" */ |
| 1109 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") |
| 1110 | | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) |
| 1111 | | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) |
| 1112 | | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 1113 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1114 | | PORT_DIPNAME( 0x40, 0x40, "Clear Round Allowed" ) PORT_DIPLOCATION("SW2:7") /* Use button 3 */ |
| 1115 | | PORT_DIPSETTING( 0x00, "1" ) |
| 1116 | | PORT_DIPSETTING( 0x40, "2" ) |
| 1117 | | /* The mode in which a block falls at twice [ usual ] speed as this when playing 25 minutes or more on one coin. */ |
| 1118 | | PORT_DIPNAME( 0x80, 0x80, "2 Cell Move" ) PORT_DIPLOCATION("SW2:8") |
| 1119 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1120 | | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 1121 | | |
| 1122 | | SYS16_COINAGE |
| 1123 | | INPUT_PORTS_END |
| 1124 | | |
| 1125 | | |
| 1126 | | static INPUT_PORTS_START( fpointbj ) |
| 1127 | | SYS16_SERVICE |
| 1128 | | |
| 1129 | | PORT_START_TAG("IN0") |
| 1082 | PORT_START_TAG("P1") |
| 1130 | 1083 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1131 | 1084 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 1132 | 1085 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r2956 | r2957 | |
| 1136 | 1089 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1137 | 1090 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 1138 | 1091 | |
| 1139 | | PORT_START_TAG("IN1") |
| 1092 | PORT_START_TAG("P2") |
| 1140 | 1093 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1141 | 1094 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1142 | 1095 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| r2956 | r2957 | |
| 1166 | 1119 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1167 | 1120 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 1168 | 1121 | |
| 1169 | | SYS16_COINAGE |
| 1122 | PORT_START_TAG("DSW1") |
| 1123 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4") |
| 1124 | PORT_DIPSETTING( 0x07, DEF_STR( 4C_1C ) ) |
| 1125 | PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) |
| 1126 | PORT_DIPSETTING( 0x09, DEF_STR( 2C_1C ) ) |
| 1127 | PORT_DIPSETTING( 0x05, "2 Coins/1 Credit 5/3 6/4" ) |
| 1128 | PORT_DIPSETTING( 0x04, "2 Coins/1 Credit 4/3" ) |
| 1129 | PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) |
| 1130 | PORT_DIPSETTING( 0x01, "1 Coin/1 Credit 2/3" ) |
| 1131 | PORT_DIPSETTING( 0x02, "1 Coin/1 Credit 4/5" ) |
| 1132 | PORT_DIPSETTING( 0x03, "1 Coin/1 Credit 5/6" ) |
| 1133 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) |
| 1134 | PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) |
| 1135 | PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) |
| 1136 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) |
| 1137 | PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) |
| 1138 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 1139 | PORT_DIPSETTING( 0x00, "Free Play (if Coin B too) or 1/1" ) |
| 1140 | PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8") |
| 1141 | PORT_DIPSETTING( 0x70, DEF_STR( 4C_1C ) ) |
| 1142 | PORT_DIPSETTING( 0x80, DEF_STR( 3C_1C ) ) |
| 1143 | PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) |
| 1144 | PORT_DIPSETTING( 0x50, "2 Coins/1 Credit 5/3 6/4" ) |
| 1145 | PORT_DIPSETTING( 0x40, "2 Coins/1 Credit 4/3" ) |
| 1146 | PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) |
| 1147 | PORT_DIPSETTING( 0x10, "1 Coin/1 Credit 2/3" ) |
| 1148 | PORT_DIPSETTING( 0x20, "1 Coin/1 Credit 4/5" ) |
| 1149 | PORT_DIPSETTING( 0x30, "1 Coin/1 Credit 5/6" ) |
| 1150 | PORT_DIPSETTING( 0x60, DEF_STR( 2C_3C ) ) |
| 1151 | PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) |
| 1152 | PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) |
| 1153 | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) |
| 1154 | PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) |
| 1155 | PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) |
| 1156 | PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" ) |
| 1170 | 1157 | INPUT_PORTS_END |
| 1171 | 1158 | |
| 1172 | 1159 | /***************************************************************************/ |
| r2956 | r2957 | |
| 1197 | 1184 | /***************************************************************************/ |
| 1198 | 1185 | |
| 1199 | 1186 | static READ16_HANDLER( ga_io_players_r ) { |
| 1200 | | return (input_port_read_indexed(machine, 0) << 8) | input_port_read_indexed(machine, 1); |
| 1187 | return (input_port_read(machine, "P1") << 8) | input_port_read(machine, "P2"); |
| 1201 | 1188 | } |
| 1202 | 1189 | static READ16_HANDLER( ga_io_service_r ) |
| 1203 | 1190 | { |
| 1204 | | return (input_port_read_indexed(machine,2) << 8) | (sys16_workingram[0x2c96/2] & 0x00ff); |
| 1191 | return (input_port_read(machine,"SERVICE") << 8) | (sys16_workingram[0x2c96/2] & 0x00ff); |
| 1205 | 1192 | } |
| 1206 | 1193 | |
| 1207 | 1194 | static ADDRESS_MAP_START( goldnaxe_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 1211 | 1198 | AM_RANGE(0x140000, 0x140fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 1212 | 1199 | AM_RANGE(0x1f0000, 0x1f0003) AM_READ(SYS16_MRA16_EXTRAM) |
| 1213 | 1200 | AM_RANGE(0x200000, 0x200fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 1214 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 1215 | | AM_RANGE(0xc41006, 0xc41007) AM_READ(input_port_1_word_r) // player2 |
| 1216 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 1217 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 1218 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 1201 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 1202 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") |
| 1203 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 1204 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 1205 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 1219 | 1206 | AM_RANGE(0xffecd0, 0xffecd1) AM_READ(ga_io_players_r) |
| 1220 | 1207 | AM_RANGE(0xffec96, 0xffec97) AM_READ(ga_io_service_r) |
| 1221 | 1208 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| r2956 | r2957 | |
| 1288 | 1275 | sys16_update_proc = goldnaxe_update_proc; |
| 1289 | 1276 | } |
| 1290 | 1277 | |
| 1291 | | |
| 1292 | | |
| 1293 | 1278 | static DRIVER_INIT( goldnabl ) |
| 1294 | 1279 | { |
| 1295 | 1280 | MACHINE_RESET_CALL(sys16_onetime); |
| r2956 | r2957 | |
| 1298 | 1283 | /***************************************************************************/ |
| 1299 | 1284 | |
| 1300 | 1285 | static INPUT_PORTS_START( goldnaxe ) |
| 1301 | | SYS16_JOY1 |
| 1302 | | SYS16_JOY2 |
| 1303 | | SYS16_SERVICE |
| 1304 | | SYS16_COINAGE |
| 1286 | PORT_INCLUDE( sys16_common ) |
| 1305 | 1287 | |
| 1306 | 1288 | PORT_START_TAG("DSW2") |
| 1307 | 1289 | PORT_DIPNAME( 0x01, 0x01, "Credits Needed" ) PORT_DIPLOCATION("SW2:1") |
| r2956 | r2957 | |
| 1349 | 1331 | |
| 1350 | 1332 | /***************************************************************************/ |
| 1351 | 1333 | |
| 1352 | | |
| 1353 | | |
| 1354 | | /***************************************************************************/ |
| 1355 | | |
| 1356 | | |
| 1357 | | /***************************************************************************/ |
| 1358 | | |
| 1359 | | |
| 1360 | | /***************************************************************************/ |
| 1361 | | |
| 1362 | | |
| 1363 | | /***************************************************************************/ |
| 1364 | | |
| 1365 | | |
| 1366 | | /***************************************************************************/ |
| 1367 | | |
| 1368 | 1334 | static ADDRESS_MAP_START( passsht_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1369 | 1335 | AM_RANGE(0x000000, 0x01ffff) AM_READ(SMH_ROM) |
| 1370 | 1336 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 1371 | 1337 | AM_RANGE(0x410000, 0x410fff) AM_READ(SYS16_MRA16_TEXTRAM) |
| 1372 | 1338 | AM_RANGE(0x440000, 0x440fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 1373 | 1339 | AM_RANGE(0x840000, 0x840fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 1374 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 1375 | | AM_RANGE(0xc41004, 0xc41005) AM_READ(input_port_1_word_r) // player2 |
| 1376 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 1377 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 1378 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 1340 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 1341 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") |
| 1342 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 1343 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 1344 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 1379 | 1345 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 1380 | 1346 | ADDRESS_MAP_END |
| 1381 | 1347 | |
| r2956 | r2957 | |
| 1396 | 1362 | |
| 1397 | 1363 | static READ16_HANDLER( passht4b_service_r ) |
| 1398 | 1364 | { |
| 1399 | | UINT16 val=input_port_read_indexed(machine,2); |
| 1400 | | if(!(input_port_read_indexed(machine, 0) & 0x40)) val&=0xef; |
| 1401 | | if(!(input_port_read_indexed(machine, 1) & 0x40)) val&=0xdf; |
| 1402 | | if(!(input_port_read_indexed(machine, 5) & 0x40)) val&=0xbf; |
| 1403 | | if(!(input_port_read_indexed(machine, 6) & 0x40)) val&=0x7f; |
| 1365 | UINT16 val=input_port_read(machine, "SERVICE"); |
| 1366 | if(!(input_port_read(machine, "P1") & 0x40)) val&=0xef; |
| 1367 | if(!(input_port_read(machine, "P2") & 0x40)) val&=0xdf; |
| 1368 | if(!(input_port_read(machine, "P3") & 0x40)) val&=0xbf; |
| 1369 | if(!(input_port_read(machine, "P4") & 0x40)) val&=0x7f; |
| 1404 | 1370 | |
| 1405 | | passht4b_io3_val=(input_port_read_indexed(machine, 0)<<4) | (input_port_read_indexed(machine, 5)&0xf); |
| 1406 | | passht4b_io2_val=(input_port_read_indexed(machine, 1)<<4) | (input_port_read_indexed(machine, 6)&0xf); |
| 1371 | passht4b_io3_val=(input_port_read(machine, "P1") << 4) | (input_port_read(machine, "P3") & 0xf); |
| 1372 | passht4b_io2_val=(input_port_read(machine, "P2") << 4) | (input_port_read(machine, "P4") & 0xf); |
| 1407 | 1373 | |
| 1408 | 1374 | passht4b_io1_val=0xff; |
| 1409 | 1375 | |
| 1410 | 1376 | // player 1 buttons |
| 1411 | | if(!(input_port_read_indexed(machine, 0) & 0x10)) passht4b_io1_val &=0xfe; |
| 1412 | | if(!(input_port_read_indexed(machine, 0) & 0x20)) passht4b_io1_val &=0xfd; |
| 1413 | | if(!(input_port_read_indexed(machine, 0) & 0x80)) passht4b_io1_val &=0xfc; |
| 1377 | if(!(input_port_read(machine, "P1") & 0x10)) passht4b_io1_val &=0xfe; |
| 1378 | if(!(input_port_read(machine, "P1") & 0x20)) passht4b_io1_val &=0xfd; |
| 1379 | if(!(input_port_read(machine, "P1") & 0x80)) passht4b_io1_val &=0xfc; |
| 1414 | 1380 | |
| 1415 | 1381 | // player 2 buttons |
| 1416 | | if(!(input_port_read_indexed(machine, 1) & 0x10)) passht4b_io1_val &=0xfb; |
| 1417 | | if(!(input_port_read_indexed(machine, 1) & 0x20)) passht4b_io1_val &=0xf7; |
| 1418 | | if(!(input_port_read_indexed(machine, 1) & 0x80)) passht4b_io1_val &=0xf3; |
| 1382 | if(!(input_port_read(machine, "P2") & 0x10)) passht4b_io1_val &=0xfb; |
| 1383 | if(!(input_port_read(machine, "P2") & 0x20)) passht4b_io1_val &=0xf7; |
| 1384 | if(!(input_port_read(machine, "P2") & 0x80)) passht4b_io1_val &=0xf3; |
| 1419 | 1385 | |
| 1420 | 1386 | // player 3 buttons |
| 1421 | | if(!(input_port_read_indexed(machine, 5) & 0x10)) passht4b_io1_val &=0xef; |
| 1422 | | if(!(input_port_read_indexed(machine, 5) & 0x20)) passht4b_io1_val &=0xdf; |
| 1423 | | if(!(input_port_read_indexed(machine, 5) & 0x80)) passht4b_io1_val &=0xcf; |
| 1387 | if(!(input_port_read(machine, "P3") & 0x10)) passht4b_io1_val &=0xef; |
| 1388 | if(!(input_port_read(machine, "P3") & 0x20)) passht4b_io1_val &=0xdf; |
| 1389 | if(!(input_port_read(machine, "P3") & 0x80)) passht4b_io1_val &=0xcf; |
| 1424 | 1390 | |
| 1425 | 1391 | // player 4 buttons |
| 1426 | | if(!(input_port_read_indexed(machine, 6) & 0x10)) passht4b_io1_val &=0xbf; |
| 1427 | | if(!(input_port_read_indexed(machine, 6) & 0x20)) passht4b_io1_val &=0x7f; |
| 1428 | | if(!(input_port_read_indexed(machine, 6) & 0x80)) passht4b_io1_val &=0x3f; |
| 1392 | if(!(input_port_read(machine, "P4") & 0x10)) passht4b_io1_val &=0xbf; |
| 1393 | if(!(input_port_read(machine, "P4") & 0x20)) passht4b_io1_val &=0x7f; |
| 1394 | if(!(input_port_read(machine, "P4") & 0x80)) passht4b_io1_val &=0x3f; |
| 1429 | 1395 | |
| 1430 | 1396 | return val; |
| 1431 | 1397 | } |
| 1432 | 1398 | |
| 1433 | | static READ16_HANDLER( passht4b_io1_r ) { return passht4b_io1_val;} |
| 1434 | | static READ16_HANDLER( passht4b_io2_r ) { return passht4b_io2_val;} |
| 1435 | | static READ16_HANDLER( passht4b_io3_r ) { return passht4b_io3_val;} |
| 1399 | static READ16_HANDLER( passht4b_io1_r ) |
| 1400 | { |
| 1401 | return passht4b_io1_val; |
| 1402 | } |
| 1436 | 1403 | |
| 1404 | static READ16_HANDLER( passht4b_io2_r ) |
| 1405 | { |
| 1406 | return passht4b_io2_val; |
| 1407 | } |
| 1408 | |
| 1409 | static READ16_HANDLER( passht4b_io3_r ) |
| 1410 | { |
| 1411 | return passht4b_io3_val; |
| 1412 | } |
| 1413 | |
| 1437 | 1414 | static ADDRESS_MAP_START( passht4b_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1438 | 1415 | AM_RANGE(0x000000, 0x01ffff) AM_READ(SMH_ROM) |
| 1439 | 1416 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| r2956 | r2957 | |
| 1444 | 1421 | AM_RANGE(0xc41002, 0xc41003) AM_READ(passht4b_io1_r) |
| 1445 | 1422 | AM_RANGE(0xc41004, 0xc41005) AM_READ(passht4b_io2_r) |
| 1446 | 1423 | AM_RANGE(0xc41006, 0xc41007) AM_READ(passht4b_io3_r) |
| 1447 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 1448 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 1449 | | AM_RANGE(0xc43000, 0xc43001) AM_READ(input_port_0_word_r) // player1 // test mode only |
| 1450 | | AM_RANGE(0xc43002, 0xc43003) AM_READ(input_port_1_word_r) // player2 |
| 1451 | | AM_RANGE(0xc43004, 0xc43005) AM_READ(input_port_5_word_r) // player3 |
| 1452 | | AM_RANGE(0xc43006, 0xc43007) AM_READ(input_port_6_word_r) // player4 |
| 1424 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 1425 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 1426 | AM_RANGE(0xc43000, 0xc43001) AM_READ_PORT("P1") // test mode only |
| 1427 | AM_RANGE(0xc43002, 0xc43003) AM_READ_PORT("P2") |
| 1428 | AM_RANGE(0xc43004, 0xc43005) AM_READ_PORT("P3") |
| 1429 | AM_RANGE(0xc43006, 0xc43007) AM_READ_PORT("P4") |
| 1453 | 1430 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 1454 | 1431 | ADDRESS_MAP_END |
| 1455 | 1432 | |
| r2956 | r2957 | |
| 1523 | 1500 | /***************************************************************************/ |
| 1524 | 1501 | |
| 1525 | 1502 | static INPUT_PORTS_START( passsht ) |
| 1526 | | PORT_START_TAG("IN0") |
| 1527 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 1528 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1529 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1503 | PORT_INCLUDE( sys16_common ) |
| 1504 | |
| 1505 | PORT_MODIFY("P1") |
| 1530 | 1506 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 1531 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 1532 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 1533 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 1534 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 1535 | 1507 | |
| 1536 | | PORT_START_TAG("IN1") |
| 1537 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1538 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1539 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1508 | PORT_MODIFY("P2") |
| 1540 | 1509 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_COCKTAIL |
| 1541 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 1542 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 1543 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1544 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 1545 | 1510 | |
| 1546 | | SYS16_SERVICE |
| 1547 | | SYS16_COINAGE |
| 1548 | | |
| 1549 | 1511 | PORT_START_TAG("DSW2") |
| 1550 | 1512 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") |
| 1551 | 1513 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 1572 | 1534 | INPUT_PORTS_END |
| 1573 | 1535 | |
| 1574 | 1536 | static INPUT_PORTS_START( passht4b ) |
| 1575 | | PORT_START_TAG("IN0") |
| 1537 | PORT_INCLUDE( passsht ) |
| 1538 | |
| 1539 | PORT_MODIFY("P1") |
| 1576 | 1540 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 1577 | 1541 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 1578 | 1542 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| r2956 | r2957 | |
| 1582 | 1546 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 1583 | 1547 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 1584 | 1548 | |
| 1585 | | PORT_START_TAG("IN1") |
| 1549 | PORT_MODIFY("P2") |
| 1586 | 1550 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 1587 | 1551 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 1588 | 1552 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| r2956 | r2957 | |
| 1592 | 1556 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1593 | 1557 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_COCKTAIL |
| 1594 | 1558 | |
| 1595 | | PORT_START_TAG("IN2") |
| 1596 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1597 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1598 | | PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) |
| 1599 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1600 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1601 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1559 | PORT_MODIFY("SERVICE") |
| 1602 | 1560 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 ) |
| 1603 | 1561 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) |
| 1604 | 1562 | |
| 1605 | | SYS16_COINAGE |
| 1606 | | |
| 1607 | | PORT_START_TAG("DSW2") |
| 1608 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") |
| 1609 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1610 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1611 | | PORT_DIPNAME( 0x0e, 0x0e, "Initial Point" ) PORT_DIPLOCATION("SW2:2,3,4") |
| 1612 | | PORT_DIPSETTING( 0x06, "2000" ) |
| 1613 | | PORT_DIPSETTING( 0x0a, "3000" ) |
| 1614 | | PORT_DIPSETTING( 0x0c, "4000" ) |
| 1615 | | PORT_DIPSETTING( 0x0e, "5000" ) |
| 1616 | | PORT_DIPSETTING( 0x08, "6000" ) |
| 1617 | | PORT_DIPSETTING( 0x04, "7000" ) |
| 1618 | | PORT_DIPSETTING( 0x02, "8000" ) |
| 1619 | | PORT_DIPSETTING( 0x00, "9000" ) |
| 1620 | | PORT_DIPNAME( 0x30, 0x30, "Point Table" ) PORT_DIPLOCATION("SW2:5,6") |
| 1621 | | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) |
| 1622 | | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) |
| 1623 | | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 1624 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1625 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:7,8") |
| 1626 | | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) |
| 1627 | | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) |
| 1628 | | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 1629 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1630 | | |
| 1631 | | PORT_START_TAG("IN5") |
| 1563 | PORT_START_TAG("P3") |
| 1632 | 1564 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 1633 | 1565 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) |
| 1634 | 1566 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| r2956 | r2957 | |
| 1638 | 1570 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 1639 | 1571 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3) |
| 1640 | 1572 | |
| 1641 | | PORT_START_TAG("IN6") |
| 1573 | PORT_START_TAG("P4") |
| 1642 | 1574 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) |
| 1643 | 1575 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) |
| 1644 | 1576 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) |
| r2956 | r2957 | |
| 1647 | 1579 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) |
| 1648 | 1580 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) |
| 1649 | 1581 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4) |
| 1650 | | |
| 1651 | 1582 | INPUT_PORTS_END |
| 1652 | 1583 | |
| 1653 | 1584 | /***************************************************************************/ |
| r2956 | r2957 | |
| 1675 | 1606 | |
| 1676 | 1607 | /***************************************************************************/ |
| 1677 | 1608 | |
| 1678 | | |
| 1679 | | /***************************************************************************/ |
| 1680 | | |
| 1681 | | |
| 1682 | | /***************************************************************************/ |
| 1683 | | |
| 1684 | | |
| 1685 | | /***************************************************************************/ |
| 1686 | | |
| 1687 | 1609 | static INPUT_PORTS_START( shinobi ) |
| 1688 | | SYS16_JOY1 |
| 1689 | | SYS16_JOY2 |
| 1690 | | SYS16_SERVICE |
| 1691 | | SYS16_COINAGE |
| 1610 | PORT_INCLUDE( sys16_common ) |
| 1692 | 1611 | |
| 1693 | 1612 | PORT_START_TAG("DSW2") |
| 1694 | 1613 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1") |
| r2956 | r2957 | |
| 1717 | 1636 | |
| 1718 | 1637 | /***************************************************************************/ |
| 1719 | 1638 | |
| 1720 | | |
| 1721 | | /***************************************************************************/ |
| 1722 | | |
| 1723 | 1639 | static ADDRESS_MAP_START( shinobl_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 1724 | 1640 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) |
| 1725 | 1641 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 1726 | 1642 | AM_RANGE(0x410000, 0x410fff) AM_READ(SYS16_MRA16_TEXTRAM) |
| 1727 | 1643 | AM_RANGE(0x440000, 0x440fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 1728 | 1644 | AM_RANGE(0x840000, 0x840fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 1729 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 1730 | | AM_RANGE(0xc41006, 0xc41007) AM_READ(input_port_1_word_r) // player2 |
| 1731 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 1732 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_3_word_r) // dip1 |
| 1733 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_4_word_r) // dip2 |
| 1645 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 1646 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") |
| 1647 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 1648 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW1") |
| 1649 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW2") |
| 1734 | 1650 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 1735 | 1651 | ADDRESS_MAP_END |
| 1736 | 1652 | |
| r2956 | r2957 | |
| 1778 | 1694 | MACHINE_RESET_CALL(sys16_onetime); |
| 1779 | 1695 | } |
| 1780 | 1696 | |
| 1781 | | |
| 1782 | 1697 | /***************************************************************************/ |
| 1783 | 1698 | |
| 1784 | | |
| 1785 | | |
| 1786 | 1699 | static MACHINE_DRIVER_START( shinob2 ) |
| 1787 | 1700 | |
| 1788 | 1701 | /* basic machine hardware */ |
| r2956 | r2957 | |
| 1793 | 1706 | MDRV_MACHINE_RESET(shinobl) |
| 1794 | 1707 | MACHINE_DRIVER_END |
| 1795 | 1708 | |
| 1796 | | |
| 1797 | 1709 | /***************************************************************************/ |
| 1798 | 1710 | |
| 1799 | | |
| 1800 | | |
| 1801 | 1711 | /* bootleg has extra ram for regs? */ |
| 1802 | 1712 | |
| 1803 | 1713 | static ADDRESS_MAP_START( tetrisbl_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 1807 | 1717 | AM_RANGE(0x418000, 0x41803f) AM_READ(SYS16_MRA16_EXTRAM2) |
| 1808 | 1718 | AM_RANGE(0x440000, 0x440fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 1809 | 1719 | AM_RANGE(0x840000, 0x840fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 1810 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 1811 | | AM_RANGE(0xc41006, 0xc41007) AM_READ(input_port_1_word_r) // player2 |
| 1812 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 1813 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 1814 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 1720 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 1721 | AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2") |
| 1722 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 1723 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 1724 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 1815 | 1725 | AM_RANGE(0xc80000, 0xc80001) AM_READ(SMH_NOP) |
| 1816 | 1726 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 1817 | 1727 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 1831 | 1741 | ADDRESS_MAP_END |
| 1832 | 1742 | |
| 1833 | 1743 | |
| 1834 | | |
| 1835 | 1744 | static READ16_HANDLER(beautyb_unk1_r) |
| 1836 | 1745 | { |
| 1837 | 1746 | |
| r2956 | r2957 | |
| 1868 | 1777 | |
| 1869 | 1778 | /***************************************************************************/ |
| 1870 | 1779 | |
| 1871 | | |
| 1872 | | |
| 1873 | 1780 | static void tetris_bootleg_update_proc( void ) |
| 1874 | 1781 | { |
| 1875 | 1782 | sys16_fg_scrolly = sys16_textram[0x748]; |
| r2956 | r2957 | |
| 1901 | 1808 | /***************************************************************************/ |
| 1902 | 1809 | |
| 1903 | 1810 | static INPUT_PORTS_START( tetris ) |
| 1904 | | SYS16_JOY1 |
| 1905 | | SYS16_JOY2 |
| 1906 | | SYS16_SERVICE |
| 1907 | | SYS16_COINAGE /* unconfirmed */ |
| 1811 | PORT_INCLUDE( sys16_common ) /* unconfirmed coinage dip */ |
| 1908 | 1812 | |
| 1909 | 1813 | PORT_START_TAG("DSW2") |
| 1910 | 1814 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ |
| r2956 | r2957 | |
| 1947 | 1851 | MDRV_MACHINE_RESET(tetrisbl) |
| 1948 | 1852 | MACHINE_DRIVER_END |
| 1949 | 1853 | |
| 1950 | | |
| 1951 | 1854 | /***************************************************************************/ |
| 1952 | 1855 | |
| 1953 | 1856 | static READ16_HANDLER( tt_io_player1_r ) |
| 1954 | | { return input_port_read_indexed(machine,0) << 8; } |
| 1857 | { |
| 1858 | return input_port_read(machine, "P1") << 8; |
| 1859 | } |
| 1860 | |
| 1955 | 1861 | static READ16_HANDLER( tt_io_player2_r ) |
| 1956 | | { return input_port_read_indexed(machine,1) << 8; } |
| 1862 | { |
| 1863 | return input_port_read(machine, "P2") << 8; |
| 1864 | } |
| 1865 | |
| 1957 | 1866 | static READ16_HANDLER( tt_io_service_r ) |
| 1958 | | { return input_port_read_indexed(machine,2) << 8; } |
| 1867 | { |
| 1868 | return input_port_read(machine, "SERVICE") << 8; |
| 1869 | } |
| 1959 | 1870 | |
| 1960 | | |
| 1961 | | |
| 1962 | | /***************************************************************************/ |
| 1963 | | |
| 1964 | 1871 | /* |
| 1965 | 1872 | This game has a MCU which does the following: |
| 1966 | 1873 | - Get Z80 sound command out of work RAM and write to Z80 sound command register |
| r2956 | r2957 | |
| 1988 | 1895 | be tricky, tturfbl handles it correctly. |
| 1989 | 1896 | */ |
| 1990 | 1897 | |
| 1991 | | |
| 1992 | | /***************************************************************************/ |
| 1993 | | |
| 1994 | 1898 | static INPUT_PORTS_START( tturf ) |
| 1995 | | SYS16_JOY1 |
| 1996 | | SYS16_JOY2 |
| 1997 | | SYS16_SERVICE |
| 1998 | | SYS16_COINAGE |
| 1899 | PORT_INCLUDE( sys16_common ) |
| 1999 | 1900 | |
| 2000 | 1901 | PORT_START_TAG("DSW2") |
| 2001 | 1902 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Continues ) ) PORT_DIPLOCATION("SW2:1,2") |
| r2956 | r2957 | |
| 2034 | 1935 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 2035 | 1936 | AM_RANGE(0x410000, 0x410fff) AM_READ(SYS16_MRA16_TEXTRAM) |
| 2036 | 1937 | AM_RANGE(0x500000, 0x500fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 2037 | | AM_RANGE(0x600002, 0x600003) AM_READ(input_port_3_word_r) // dip1 |
| 2038 | | AM_RANGE(0x600000, 0x600001) AM_READ(input_port_4_word_r) // dip2 |
| 2039 | | AM_RANGE(0x601002, 0x601003) AM_READ(input_port_0_word_r) // player1 |
| 2040 | | AM_RANGE(0x601004, 0x601005) AM_READ(input_port_1_word_r) // player2 |
| 2041 | | AM_RANGE(0x601000, 0x601001) AM_READ(input_port_2_word_r) // service |
| 2042 | | AM_RANGE(0x602002, 0x602003) AM_READ(input_port_3_word_r) // dip1 |
| 2043 | | AM_RANGE(0x602000, 0x602001) AM_READ(input_port_4_word_r) // dip2 |
| 1938 | AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1") |
| 1939 | AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2") |
| 1940 | AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1") |
| 1941 | AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2") |
| 1942 | AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE") |
| 1943 | AM_RANGE(0x602002, 0x602003) AM_READ_PORT("DSW1") |
| 1944 | AM_RANGE(0x602000, 0x602001) AM_READ_PORT("DSW2") |
| 2044 | 1945 | AM_RANGE(0xc46000, 0xc4601f) AM_READ(SYS16_MRA16_EXTRAM3) |
| 2045 | 1946 | ADDRESS_MAP_END |
| 2046 | 1947 | |
| r2956 | r2957 | |
| 2108 | 2009 | |
| 2109 | 2010 | mem = memory_region(machine, REGION_CPU2); |
| 2110 | 2011 | memcpy(mem, mem+0x10000, 0x8000); |
| 2111 | | |
| 2112 | 2012 | } |
| 2013 | |
| 2113 | 2014 | /***************************************************************************/ |
| 2114 | 2015 | // sound ?? |
| 2115 | 2016 | static MACHINE_DRIVER_START( tturfbl ) |
| r2956 | r2957 | |
| 2136 | 2037 | |
| 2137 | 2038 | /***************************************************************************/ |
| 2138 | 2039 | |
| 2139 | | |
| 2140 | | /***************************************************************************/ |
| 2141 | | |
| 2142 | | |
| 2143 | | |
| 2144 | | |
| 2145 | | |
| 2146 | | /***************************************************************************/ |
| 2147 | | |
| 2148 | 2040 | static INPUT_PORTS_START( wb3b ) |
| 2149 | | SYS16_JOY1 |
| 2150 | | SYS16_JOY2 |
| 2151 | | SYS16_SERVICE |
| 2152 | | SYS16_COINAGE |
| 2041 | PORT_INCLUDE( sys16_common ) |
| 2153 | 2042 | |
| 2154 | 2043 | PORT_START_TAG("DSW2") |
| 2155 | 2044 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" ) /* Listed as "Unused" */ |
| r2956 | r2957 | |
| 2175 | 2064 | |
| 2176 | 2065 | /***************************************************************************/ |
| 2177 | 2066 | |
| 2178 | | |
| 2179 | | /***************************************************************************/ |
| 2180 | | |
| 2181 | 2067 | static ADDRESS_MAP_START( wb3bbl_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2182 | 2068 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) |
| 2183 | 2069 | AM_RANGE(0x400000, 0x40ffff) AM_READ(SYS16_MRA16_TILERAM) |
| 2184 | 2070 | AM_RANGE(0x410000, 0x410fff) AM_READ(SYS16_MRA16_TEXTRAM) |
| 2185 | 2071 | AM_RANGE(0x440000, 0x440fff) AM_READ(SYS16_MRA16_SPRITERAM) |
| 2186 | 2072 | AM_RANGE(0x840000, 0x840fff) AM_READ(SYS16_MRA16_PALETTERAM) |
| 2187 | | AM_RANGE(0xc41002, 0xc41003) AM_READ(input_port_0_word_r) // player1 |
| 2188 | | AM_RANGE(0xc41004, 0xc41005) AM_READ(input_port_1_word_r) // player2 |
| 2189 | | AM_RANGE(0xc41000, 0xc41001) AM_READ(input_port_2_word_r) // service |
| 2190 | | AM_RANGE(0xc42002, 0xc42003) AM_READ(input_port_3_word_r) // dip1 |
| 2191 | | AM_RANGE(0xc42000, 0xc42001) AM_READ(input_port_4_word_r) // dip2 |
| 2073 | AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1") |
| 2074 | AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2") |
| 2075 | AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE") |
| 2076 | AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1") |
| 2077 | AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2") |
| 2192 | 2078 | AM_RANGE(0xc46000, 0xc4601f) AM_READ(SYS16_MRA16_EXTRAM3) |
| 2193 | 2079 | AM_RANGE(0xff0000, 0xffffff) AM_READ(SYS16_MRA16_WORKINGRAM) |
| 2194 | 2080 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 2277 | 2163 | MDRV_MACHINE_RESET(wb3bbl) |
| 2278 | 2164 | MACHINE_DRIVER_END |
| 2279 | 2165 | |
| 2280 | | |
| 2281 | | |
| 2282 | 2166 | /*****************************************************************************/ |
| 2283 | 2167 | |
| 2284 | | |
| 2285 | 2168 | ROM_START( bayrtbl1 ) |
| 2286 | 2169 | ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2287 | 2170 | ROM_LOAD16_BYTE( "b4.bin", 0x000000, 0x10000, CRC(eb6646ae) SHA1(073bc0a3868e70785f44e497a949cd9e3b591a33) ) |
| r2956 | r2957 | |
| 2342 | 2225 | ROM_END |
| 2343 | 2226 | |
| 2344 | 2227 | // sys16B |
| 2345 | | |
| 2346 | 2228 | ROM_START( dduxbl ) |
| 2347 | 2229 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2348 | 2230 | ROM_LOAD16_BYTE( "dduxb03.bin", 0x000000, 0x20000, CRC(e7526012) SHA1(a1798008bfa1ce9b87dc330f3817b1978052fcfd) ) |
| r2956 | r2957 | |
| 2373 | 2255 | ROM_END |
| 2374 | 2256 | |
| 2375 | 2257 | // sys16B |
| 2376 | | |
| 2377 | | |
| 2378 | 2258 | ROM_START( eswatbl ) |
| 2379 | 2259 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2380 | 2260 | ROM_LOAD16_BYTE( "eswat_c.rom", 0x000000, 0x10000, CRC(1028cc81) SHA1(24b4cd182419a44f3d6afa1c4273353024eb278f) ) |
| r2956 | r2957 | |
| 2403 | 2283 | ROM_END |
| 2404 | 2284 | |
| 2405 | 2285 | // sys16B |
| 2406 | | |
| 2407 | | |
| 2408 | 2286 | ROM_START( fpointbl ) |
| 2409 | 2287 | ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2410 | 2288 | ROM_LOAD16_BYTE( "flpoint.003", 0x000000, 0x10000, CRC(4d6df514) SHA1(168aa1629ab7152ba1984605155406b236954a2c) ) |
| r2956 | r2957 | |
| 2513 | 2391 | |
| 2514 | 2392 | */ |
| 2515 | 2393 | |
| 2516 | | |
| 2517 | 2394 | ROM_START( goldnab2 ) |
| 2518 | 2395 | ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2519 | 2396 | ROM_LOAD16_BYTE( "ic39.1", 0x00000, 0x10000, CRC(71489c9a) SHA1(ec25463a2c63027d2635f0e27f5a971d68938fe3) ) |
| r2956 | r2957 | |
| 2565 | 2442 | ROM_LOAD( "ic46.9", 0x10000, 0x10000, CRC(634dd54e) SHA1(ac4ab0ad9c1ac634ff4dfb83232b0fa5cfb26fdd) ) |
| 2566 | 2443 | ROM_END |
| 2567 | 2444 | |
| 2568 | | |
| 2569 | | // pre16 |
| 2570 | | #ifdef UNUSED_DEFINITION |
| 2571 | | ROM_START( mjleague ) |
| 2572 | | ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2573 | | ROM_LOAD16_BYTE( "epr-7404.09b", 0x000000, 0x8000, CRC(ec1655b5) SHA1(5c1df364fa9733daa4478c5f88298089e4963c33) ) |
| 2574 | | ROM_LOAD16_BYTE( "epr-7401.06b", 0x000001, 0x8000, CRC(2befa5e0) SHA1(0a1681a4c7d62a5754ba6f3845436b4d08324246) ) |
| 2575 | | ROM_LOAD16_BYTE( "epr-7405.10b", 0x010000, 0x8000, CRC(7a4f4e38) SHA1(65a22097dd933e83f326bd64b3863915897780a6) ) |
| 2576 | | ROM_LOAD16_BYTE( "epr-7402.07b", 0x010001, 0x8000, CRC(b7bef762) SHA1(214450e0b094f99ef38dec2a3e5cbdb0b30e917d) ) |
| 2577 | | ROM_LOAD16_BYTE( "epra7406.11b", 0x020000, 0x8000, CRC(bb743639) SHA1(5d99638a79f02ce14374d3b1f3d9fbfc5c13c6e1) ) |
| 2578 | | ROM_LOAD16_BYTE( "epra7403.08b", 0x020001, 0x8000, CRC(d86250cf) SHA1(fb5dabb7b9b9fe0bbe93e28c60311c7b3256107a) ) // Fails memory test. Bad rom? |
| 2579 | | |
| 2580 | | ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */ |
| 2581 | | ROM_LOAD( "epr-7051.09a", 0x00000, 0x08000, CRC(10ca255a) SHA1(ccf58ffcac2f7fbdbfbdf32601a1b97f359cbd91) ) |
| 2582 | | ROM_LOAD( "epr-7052.10a", 0x08000, 0x08000, CRC(2550db0e) SHA1(28f8d68f43d26f12793fe295c205cc86adc4e96a) ) |
| 2583 | | ROM_LOAD( "epr-7053.11a", 0x10000, 0x08000, CRC(5bfea038) SHA1(01dc6e14cc7bba9f7930e68573c441fa2841f49a) ) |
| 2584 | | |
| 2585 | | ROM_REGION( 0x50000, REGION_GFX2, 0 ) /* sprites */ |
| 2586 | | ROM_LOAD16_BYTE( "epr-7055.05a", 0x000001, 0x8000, CRC(1fb860bd) SHA1(4a4155d0352dfae9e402a2b2f1558ef17b1303b4) ) |
| 2587 | | ROM_LOAD16_BYTE( "epr-7059.02b", 0x000000, 0x8000, CRC(3d14091d) SHA1(36208415b2012b6e948fefa15b0f7041748066be) ) |
| 2588 | | ROM_LOAD16_BYTE( "epr-7056.06a", 0x010001, 0x8000, CRC(b35dd968) SHA1(e306b5e38acf583d7b2089302622ad25ae5564b0) ) |
| 2589 | | ROM_LOAD16_BYTE( "epr-7060.03b", 0x010000, 0x8000, CRC(61bb3757) SHA1(5c87cf23be22b84e3dae746527ca057d870d6397) ) |
| 2590 | | ROM_LOAD16_BYTE( "epr-7057.07a", 0x020001, 0x8000, CRC(3e5a2b6f) SHA1(d3dbafb4acb916e02c978a156008bd75ba122fb7) ) |
| 2591 | | ROM_LOAD16_BYTE( "epr-7061.04b", 0x020000, 0x8000, CRC(c808dad5) SHA1(9b65acc8dc23b16e56327298188d1a6ab48b2b5d) ) |
| 2592 | | ROM_LOAD16_BYTE( "epr-7058.08a", 0x030001, 0x8000, CRC(b543675f) SHA1(35ffc9295a8849a18fabe156fdbc9801ea2179cd) ) |
| 2593 | | ROM_LOAD16_BYTE( "epr-7062.05b", 0x030000, 0x8000, CRC(9168eb47) SHA1(daaa7836e627a0679e65373d8f20a9383ba4c905) ) |
| 2594 | | // ROM_LOAD16_BYTE( "epr-7055.05a", 0x040001, 0x8000, CRC(1fb860bd) SHA1(4a4155d0352dfae9e402a2b2f1558ef17b1303b4) ) loaded twice?? |
| 2595 | | // ROM_LOAD16_BYTE( "epr-7059.02b", 0x040000, 0x8000, CRC(3d14091d) SHA1(36208415b2012b6e948fefa15b0f7041748066be) ) loaded twice?? |
| 2596 | | |
| 2597 | | ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */ |
| 2598 | | ROM_LOAD( "eprc7054.01b", 0x00000, 0x8000, CRC(4443b744) SHA1(73359a6e9d62b382dee47fea31b9e17eb26a0321) ) |
| 2599 | | |
| 2600 | | ROM_REGION( 0x1000, REGION_CPU3, 0 ) /* 4k for 7751 onboard ROM */ |
| 2601 | | ROM_LOAD( "7751.bin", 0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */ |
| 2602 | | |
| 2603 | | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */ |
| 2604 | | ROM_LOAD( "epr-7063.01a", 0x00000, 0x8000, CRC(45d8908a) SHA1(e61f81f953c1a744ded36fed3b55774e4747af29) ) |
| 2605 | | ROM_LOAD( "epr-7065.02a", 0x08000, 0x8000, CRC(8c8f8cff) SHA1(fca5a916a8b25800ee5e8771e2ced0ed9bd737f4) ) |
| 2606 | | ROM_LOAD( "epr-7064.03a", 0x10000, 0x8000, CRC(159f6636) SHA1(66fa3f3e95a6ef3d3ff4ded09c05ab1131d9fbbb) ) |
| 2607 | | ROM_LOAD( "epr-7066.04a", 0x18000, 0x8000, CRC(f5cfa91f) SHA1(c85d68cbcd03fe1436bed12235c033610acc11ee) ) |
| 2608 | | ROM_END |
| 2609 | | #endif |
| 2610 | | |
| 2611 | 2445 | ROM_START( passht4b ) |
| 2612 | 2446 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2613 | 2447 | ROM_LOAD16_BYTE( "pas4p.3", 0x000000, 0x10000, CRC(2d8bc946) SHA1(35d3e529d4815543d9876fd0545c3d686467abaa) ) |
| r2956 | r2957 | |
| 2632 | 2466 | ROM_END |
| 2633 | 2467 | |
| 2634 | 2468 | /* Passing Shot Bootleg is a decrypted version of Passing Shot Japanese (passshtj). It has been heavily modified */ |
| 2635 | | |
| 2636 | 2469 | ROM_START( passshtb ) |
| 2637 | 2470 | ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */ |
| 2638 | 2471 | ROM_LOAD16_BYTE( "pass3_2p.bin", 0x000000, 0x10000, CRC(26bb9299) SHA1(11bacf86dfdd8bcfbfb61f0ebc59890325c48adc) ) |
| r2956 | r2957 | |
| 2733 | 2566 | ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) ) |
| 2734 | 2567 | ROM_END |
| 2735 | 2568 | |
| 2736 | | |
| 2737 | 2569 | // sys16B |
| 2738 | | |
| 2739 | | // sys16A custom |
| 2740 | | |
| 2741 | | /* |
| 2742 | | |
| 2743 | | |
| 2744 | | */ |
| 2745 | | |
| 2746 | | // sys16B |
| 2747 | 2570 | ROM_START( tetrisbl ) |
| 2748 | 2571 | ROM_REGION( 0x040000, REGION_CPU1, ROMREGION_ERASEFF ) /* 68000 code */ |
| 2749 | 2572 | ROM_LOAD16_BYTE( "rom2.bin", 0x000000, 0x10000, CRC(4d165c38) SHA1(04706b1977ae18bd09bafaf8ea65f8e5f32e04b8) ) |
| r2956 | r2957 | |
| 2790 | 2613 | ROM_LOAD( "tt0246ff.rom", 0x20000, 0x10000, CRC(bb4bba8f) SHA1(b182a7e1d0425e93c2c1b93472aafd30a6af6907) ) |
| 2791 | 2614 | ROM_END |
| 2792 | 2615 | |
| 2793 | | |
| 2794 | 2616 | // sys16B |
| 2795 | 2617 | ROM_START( wb3bbl ) |
| 2796 | 2618 | ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */ |
| r2956 | r2957 | |
| 2830 | 2652 | |
| 2831 | 2653 | /* System16B */ |
| 2832 | 2654 | /* rom parent machine inp init */ |
| 2833 | | |
| 2834 | 2655 | GAME( 1989, bayrtbl1, bayroute, bayroute, bayroute, bayrtbl1, ROT0, "bootleg", "Bay Route (bootleg set 1)", GAME_NOT_WORKING ) |
| 2835 | 2656 | GAME( 1989, bayrtbl2, bayroute, bayroute, bayroute, bayrtbl1, ROT0, "bootleg", "Bay Route (bootleg set 2)", GAME_NOT_WORKING ) |
| 2836 | 2657 | GAME( 1989, dduxbl, ddux, dduxbl, ddux, dduxbl, ROT0, "bootleg", "Dynamite Dux (bootleg)", 0 ) |
| 2837 | 2658 | GAME( 1989, eswatbl, eswat, eswatbl, eswat, eswatbl, ROT0, "bootleg", "E-Swat - Cyber Police (bootleg)", GAME_IMPERFECT_SOUND ) |
| 2838 | | GAME( 1989, fpointbl, fpoint, fpointbl, fpoint, fpointbl, ROT0, "bootleg", "Flash Point (World, bootleg)", 0 ) |
| 2839 | | GAME( 1989, fpointbj, fpoint, fpointbl, fpointbj, fpointbl, ROT0, "bootleg", "Flash Point (Japan, bootleg)", 0 ) |
| 2659 | GAME( 1989, fpointbl, fpoint, fpointbl, fpointbl, fpointbl, ROT0, "bootleg", "Flash Point (World, bootleg)", 0 ) |
| 2660 | GAME( 1989, fpointbj, fpoint, fpointbl, fpointbl, fpointbl, ROT0, "bootleg", "Flash Point (Japan, bootleg)", 0 ) |
| 2840 | 2661 | |
| 2841 | 2662 | GAME( 1989, goldnabl, goldnaxe, goldnaxe, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (bootleg, encrypted)", GAME_NOT_WORKING ) |
| 2842 | 2663 | GAME( 1989, goldnab2, goldnaxe, goldnaxe, goldnaxe, goldnabl, ROT0, "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING ) |
| r2956 | r2957 | |
| 2901 | 2722 | |
| 2902 | 2723 | |
| 2903 | 2724 | GAME( 1991, beautyb, 0, beautyb, tetris, beautyb, ROT0, "AMT", "Beauty Block", GAME_NO_SOUND|GAME_NOT_WORKING ) |
| 2904 | | |
src/mame/drivers/taito_b.c
| r2956 | r2957 | |
| 169 | 169 | |
| 170 | 170 | #include "driver.h" |
| 171 | 171 | #include "deprecat.h" |
| 172 | #include "taitoipt.h" |
| 172 | 173 | #include "cpu/m68000/m68000.h" |
| 173 | 174 | #include "video/taitoic.h" |
| 174 | 175 | #include "machine/eeprom.h" |
| r2956 | r2957 | |
| 328 | 329 | |
| 329 | 330 | static READ16_HANDLER( tracky1_hi_r ) |
| 330 | 331 | { |
| 331 | | return input_port_read_indexed(machine,5); |
| 332 | return input_port_read(machine, "TRACKX1"); |
| 332 | 333 | } |
| 333 | 334 | static READ16_HANDLER( tracky1_lo_r ) |
| 334 | 335 | { |
| 335 | | return (input_port_read_indexed(machine,5) & 0xff) <<8; |
| 336 | return (input_port_read(machine, "TRACKX1") & 0xff) <<8; |
| 336 | 337 | } |
| 337 | 338 | static READ16_HANDLER( trackx1_hi_r ) |
| 338 | 339 | { |
| 339 | | return input_port_read_indexed(machine,6); |
| 340 | return input_port_read(machine, "TRACKY1"); |
| 340 | 341 | } |
| 341 | 342 | static READ16_HANDLER( trackx1_lo_r ) |
| 342 | 343 | { |
| 343 | | return (input_port_read_indexed(machine,6) & 0xff) <<8; |
| 344 | return (input_port_read(machine, "TRACKY1") & 0xff) <<8; |
| 344 | 345 | } |
| 345 | 346 | static READ16_HANDLER( tracky2_hi_r ) |
| 346 | 347 | { |
| 347 | | return input_port_read_indexed(machine,7); |
| 348 | return input_port_read(machine, "TRACKX2"); |
| 348 | 349 | } |
| 349 | 350 | static READ16_HANDLER( tracky2_lo_r ) |
| 350 | 351 | { |
| 351 | | return (input_port_read_indexed(machine,7) & 0xff) <<8; |
| 352 | return (input_port_read(machine, "TRACKX2") & 0xff) <<8; |
| 352 | 353 | } |
| 353 | 354 | static READ16_HANDLER( trackx2_hi_r ) |
| 354 | 355 | { |
| 355 | | return input_port_read_indexed(machine,8); |
| 356 | return input_port_read(machine, "TRACKY2"); |
| 356 | 357 | } |
| 357 | 358 | static READ16_HANDLER( trackx2_lo_r ) |
| 358 | 359 | { |
| 359 | | return (input_port_read_indexed(machine,8) & 0xff) <<8; |
| 360 | return (input_port_read(machine, "TRACKY2") & 0xff) <<8; |
| 360 | 361 | } |
| 361 | 362 | |
| 362 | 363 | |
| r2956 | r2957 | |
| 413 | 414 | int res; |
| 414 | 415 | |
| 415 | 416 | res = (eeprom_read_bit() & 0x01); |
| 416 | | res |= input_port_read_indexed(machine,1) & 0xfe; /* coin inputs */ |
| 417 | res |= input_port_read(machine, "IN1") & 0xfe; /* coin inputs */ |
| 417 | 418 | |
| 418 | 419 | return res; |
| 419 | 420 | } |
| r2956 | r2957 | |
| 482 | 483 | switch (offset) |
| 483 | 484 | { |
| 484 | 485 | case 0x01: |
| 485 | | return eeprom_r(machine,0,mem_mask) << 8; |
| 486 | return eeprom_r(machine, 0, mem_mask) << 8; |
| 486 | 487 | |
| 487 | 488 | default: |
| 488 | | return TC0640FIO_r( machine,offset ) << 8; |
| 489 | return TC0640FIO_r(machine, offset) << 8; |
| 489 | 490 | } |
| 490 | 491 | } |
| 491 | 492 | |
| r2956 | r2957 | |
| 633 | 634 | TC0180VCU_MEMR( 0x400000 ) |
| 634 | 635 | |
| 635 | 636 | AM_RANGE(0x600000, 0x60000f) AM_READ(TC0220IOC_halfword_byteswap_r) |
| 636 | | AM_RANGE(0x610000, 0x610001) AM_READ(input_port_5_word_r) /* player 3,4 inputs*/ |
| 637 | AM_RANGE(0x610000, 0x610001) AM_READ_PORT("P3_P4") |
| 637 | 638 | |
| 638 | 639 | AM_RANGE(0x700000, 0x700001) AM_READ(SMH_NOP) |
| 639 | 640 | AM_RANGE(0x700002, 0x700003) AM_READ(taitosound_comm16_msb_r) |
| r2956 | r2957 | |
| 707 | 708 | TC0180VCU_MEMR( 0x400000 ) |
| 708 | 709 | |
| 709 | 710 | AM_RANGE(0x500000, 0x50000f) AM_READ(pbobble_input_bypass_r) |
| 710 | | AM_RANGE(0x500024, 0x500025) AM_READ(input_port_5_word_r) /* shown in service mode, game omits to read it */ |
| 711 | AM_RANGE(0x500024, 0x500025) AM_READ_PORT("IN5") /* shown in service mode, game omits to read it */ |
| 711 | 712 | AM_RANGE(0x500026, 0x500027) AM_READ(eep_latch_r) /* not read by this game */ |
| 712 | | AM_RANGE(0x50002e, 0x50002f) AM_READ(input_port_6_word_r) /* shown in service mode, game omits to read it */ |
| 713 | AM_RANGE(0x50002e, 0x50002f) AM_READ_PORT("IN6") /* shown in service mode, game omits to read it */ |
| 713 | 714 | |
| 714 | 715 | AM_RANGE(0x700000, 0x700001) AM_READ(SMH_NOP) |
| 715 | 716 | AM_RANGE(0x700002, 0x700003) AM_READ(taitosound_comm16_msb_r) |
| r2956 | r2957 | |
| 741 | 742 | TC0180VCU_MEMR( 0x400000 ) |
| 742 | 743 | |
| 743 | 744 | AM_RANGE(0x500000, 0x50000f) AM_READ(pbobble_input_bypass_r) |
| 744 | | AM_RANGE(0x500024, 0x500025) AM_READ(input_port_5_word_r) |
| 745 | AM_RANGE(0x500024, 0x500025) AM_READ_PORT("IN5") |
| 745 | 746 | AM_RANGE(0x500026, 0x500027) AM_READ(eep_latch_r) |
| 746 | | AM_RANGE(0x50002e, 0x50002f) AM_READ(input_port_6_word_r) |
| 747 | AM_RANGE(0x50002e, 0x50002f) AM_READ_PORT("IN6") |
| 747 | 748 | |
| 748 | 749 | AM_RANGE(0x700000, 0x700001) AM_READ(SMH_NOP) |
| 749 | 750 | AM_RANGE(0x700002, 0x700003) AM_READ(taitosound_comm16_msb_r) |
| r2956 | r2957 | |
| 775 | 776 | TC0180VCU_MEMR( 0x500000 ) |
| 776 | 777 | |
| 777 | 778 | AM_RANGE(0x200000, 0x20000f) AM_READ(TC0220IOC_halfword_r) |
| 778 | | AM_RANGE(0x210000, 0x210001) AM_READ(input_port_5_word_r) |
| 779 | | AM_RANGE(0x220000, 0x220001) AM_READ(input_port_6_word_r) |
| 780 | | AM_RANGE(0x230000, 0x230001) AM_READ(input_port_7_word_r) |
| 779 | AM_RANGE(0x210000, 0x210001) AM_READ_PORT("IN5") |
| 780 | AM_RANGE(0x220000, 0x220001) AM_READ_PORT("IN6") |
| 781 | AM_RANGE(0x230000, 0x230001) AM_READ_PORT("IN7") |
| 781 | 782 | |
| 782 | 783 | AM_RANGE(0x100000, 0x100001) AM_READ(SMH_NOP) |
| 783 | 784 | AM_RANGE(0x100002, 0x100003) AM_READ(taitosound_comm16_msb_r) |
| r2956 | r2957 | |
| 806 | 807 | TC0180VCU_MEMR( 0x400000 ) |
| 807 | 808 | |
| 808 | 809 | AM_RANGE(0x200000, 0x20000f) AM_READ(pbobble_input_bypass_r) |
| 809 | | AM_RANGE(0x200024, 0x200025) AM_READ(input_port_5_word_r) /* player 3,4 start */ |
| 810 | AM_RANGE(0x200024, 0x200025) AM_READ_PORT("IN5") /* player 3,4 start */ |
| 810 | 811 | AM_RANGE(0x200028, 0x200029) AM_READ(player_34_coin_ctrl_r) |
| 811 | | AM_RANGE(0x20002e, 0x20002f) AM_READ(input_port_6_word_r) /* player 3,4 buttons */ |
| 812 | AM_RANGE(0x20002e, 0x20002f) AM_READ_PORT("IN6") /* player 3,4 buttons */ |
| 812 | 813 | |
| 813 | 814 | AM_RANGE(0x600000, 0x600001) AM_READ(SMH_NOP) |
| 814 | 815 | AM_RANGE(0x600002, 0x600003) AM_READ(taitosound_comm16_msb_r) |
| r2956 | r2957 | |
| 901 | 902 | TC0180VCU_MEMR( 0x500000 ) |
| 902 | 903 | |
| 903 | 904 | AM_RANGE(0x200000, 0x20000f) AM_READ(TC0220IOC_halfword_r) |
| 904 | | AM_RANGE(0x210000, 0x210001) AM_READ(input_port_5_word_r) |
| 905 | | AM_RANGE(0x220000, 0x220001) AM_READ(input_port_6_word_r) |
| 906 | | AM_RANGE(0x230000, 0x230001) AM_READ(input_port_7_word_r) |
| 905 | AM_RANGE(0x210000, 0x210001) AM_READ_PORT("IN5") |
| 906 | AM_RANGE(0x220000, 0x220001) AM_READ_PORT("IN6") |
| 907 | AM_RANGE(0x230000, 0x230001) AM_READ_PORT("IN7") |
| 907 | 908 | // AM_RANGE(0x240000, 0x240001) AM_READ(SMH_NOP) /* read 4 times at init */ |
| 908 | 909 | |
| 909 | 910 | AM_RANGE(0x100000, 0x100001) AM_READ(SMH_NOP) |
| r2956 | r2957 | |
| 1058 | 1059 | INPUT PORTS, DIPs |
| 1059 | 1060 | ***********************************************************/ |
| 1060 | 1061 | |
| 1061 | | #define TAITO_COINAGE_JAPAN_8 \ |
| 1062 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1063 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 1064 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1065 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 1066 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 1067 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1068 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1069 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 1070 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 1071 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 1072 | | |
| 1073 | | #define TAITO_COINAGE_WORLD_8 \ |
| 1074 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1075 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 1076 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 1077 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 1078 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1079 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1080 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 1081 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 1082 | | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) \ |
| 1083 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 1084 | | |
| 1085 | | #define TAITO_COINAGE_US_8 \ |
| 1086 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) \ |
| 1087 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 1088 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 1089 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 1090 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1091 | | PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) \ |
| 1092 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1093 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1094 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) \ |
| 1095 | | PORT_DIPSETTING( 0xc0, "Same as Start" ) |
| 1096 | | |
| 1097 | | #define TAITO_COINAGE_JAPAN_NEW_8 \ |
| 1098 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1099 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1100 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 1101 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1102 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 1103 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1104 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1105 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1106 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 1107 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 1108 | | |
| 1109 | | #define TAITO_DIFFICULTY_8 \ |
| 1110 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \ |
| 1111 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) \ |
| 1112 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) \ |
| 1113 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) \ |
| 1114 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1115 | | |
| 1116 | | |
| 1117 | | /* Included only the bits that are common to all sets (viofight has 3 buttons) */ |
| 1118 | | #define TAITO_B_PLAYERS_INPUT( player ) \ |
| 1119 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY \ |
| 1120 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \ |
| 1121 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \ |
| 1122 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \ |
| 1123 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ |
| 1124 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) |
| 1125 | | |
| 1126 | 1062 | #define TAITO_B_SYSTEM_INPUT \ |
| 1127 | 1063 | PORT_START_TAG("IN2") \ |
| 1128 | 1064 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) \ |
| r2956 | r2957 | |
| 1134 | 1070 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) \ |
| 1135 | 1071 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1136 | 1072 | |
| 1137 | | #define TAITO_B_DSWA_2_4 \ |
| 1138 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) \ |
| 1139 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) \ |
| 1140 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ |
| 1141 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) \ |
| 1142 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) \ |
| 1143 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ |
| 1144 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1145 | 1073 | |
| 1146 | | |
| 1147 | 1074 | static INPUT_PORTS_START( rastsag2 ) |
| 1148 | 1075 | PORT_START_TAG("DSWA") |
| 1149 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) // all 2 "unused" in manual |
| 1150 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1151 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1152 | | TAITO_B_DSWA_2_4 |
| 1153 | | TAITO_COINAGE_JAPAN_8 |
| 1076 | TAITO_MACHINE_NO_COCKTAIL // all 2 "unused" in manual |
| 1077 | TAITO_COINAGE_JAPAN_OLD |
| 1154 | 1078 | |
| 1155 | 1079 | PORT_START_TAG("DSWB") |
| 1156 | | TAITO_DIFFICULTY_8 |
| 1080 | TAITO_DIFFICULTY |
| 1157 | 1081 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1158 | 1082 | PORT_DIPSETTING( 0x0c, "100k only" ) |
| 1159 | 1083 | PORT_DIPSETTING( 0x08, "150k only" ) |
| r2956 | r2957 | |
| 1172 | 1096 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1173 | 1097 | |
| 1174 | 1098 | PORT_START_TAG("IN0") |
| 1175 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1176 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1177 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1099 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1178 | 1100 | |
| 1179 | 1101 | PORT_START_TAG("IN1") |
| 1180 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1181 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1182 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1102 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1183 | 1103 | |
| 1184 | | /* IN2 */ |
| 1185 | 1104 | TAITO_B_SYSTEM_INPUT |
| 1186 | 1105 | INPUT_PORTS_END |
| 1187 | 1106 | |
| 1188 | 1107 | static INPUT_PORTS_START( nastar ) |
| 1189 | 1108 | PORT_START_TAG("DSWA") |
| 1190 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| 1191 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1192 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1193 | | TAITO_B_DSWA_2_4 |
| 1194 | | TAITO_COINAGE_WORLD_8 |
| 1109 | TAITO_MACHINE_NO_COCKTAIL |
| 1110 | TAITO_COINAGE_WORLD |
| 1195 | 1111 | |
| 1196 | 1112 | PORT_START_TAG("DSWB") |
| 1197 | | TAITO_DIFFICULTY_8 |
| 1113 | TAITO_DIFFICULTY |
| 1198 | 1114 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1199 | 1115 | PORT_DIPSETTING( 0x0c, "100k only" ) |
| 1200 | 1116 | PORT_DIPSETTING( 0x08, "150k only" ) |
| r2956 | r2957 | |
| 1212 | 1128 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1213 | 1129 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1214 | 1130 | |
| 1215 | | PORT_START /* IN0 */ |
| 1216 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1217 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1218 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1131 | PORT_START_TAG("IN0") |
| 1132 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1219 | 1133 | |
| 1220 | | PORT_START /* IN1 */ |
| 1221 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1222 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1223 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1134 | PORT_START_TAG("IN1") |
| 1135 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1224 | 1136 | |
| 1225 | | /* IN2 */ |
| 1226 | 1137 | TAITO_B_SYSTEM_INPUT |
| 1227 | 1138 | INPUT_PORTS_END |
| 1228 | 1139 | |
| 1229 | 1140 | static INPUT_PORTS_START( nastarw ) |
| 1230 | 1141 | PORT_START_TAG("DSWA") |
| 1231 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1232 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1233 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1234 | | TAITO_B_DSWA_2_4 |
| 1235 | | TAITO_COINAGE_US_8 |
| 1142 | TAITO_MACHINE_COCKTAIL |
| 1143 | TAITO_COINAGE_US |
| 1236 | 1144 | |
| 1237 | 1145 | PORT_START_TAG("DSWB") |
| 1238 | | TAITO_DIFFICULTY_8 |
| 1146 | TAITO_DIFFICULTY |
| 1239 | 1147 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1240 | 1148 | PORT_DIPSETTING( 0x0c, "100k only" ) |
| 1241 | 1149 | PORT_DIPSETTING( 0x08, "150k only" ) |
| r2956 | r2957 | |
| 1254 | 1162 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1255 | 1163 | |
| 1256 | 1164 | PORT_START_TAG("IN0") |
| 1257 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1258 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1259 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1165 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1260 | 1166 | |
| 1261 | 1167 | PORT_START_TAG("IN1") |
| 1262 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1263 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1264 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1168 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1265 | 1169 | |
| 1266 | | /* IN2 */ |
| 1267 | 1170 | TAITO_B_SYSTEM_INPUT |
| 1268 | 1171 | INPUT_PORTS_END |
| 1269 | 1172 | |
| 1270 | 1173 | static INPUT_PORTS_START( masterw ) |
| 1271 | 1174 | PORT_START_TAG("DSWA") |
| 1272 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1273 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1274 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1275 | | TAITO_B_DSWA_2_4 |
| 1276 | | TAITO_COINAGE_WORLD_8 |
| 1175 | TAITO_MACHINE_COCKTAIL |
| 1176 | TAITO_COINAGE_WORLD |
| 1277 | 1177 | |
| 1278 | 1178 | PORT_START_TAG("DSWB") |
| 1279 | | TAITO_DIFFICULTY_8 |
| 1179 | TAITO_DIFFICULTY |
| 1280 | 1180 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1281 | 1181 | PORT_DIPSETTING( 0x08, "500k, 1000k and 1500k" ) |
| 1282 | 1182 | PORT_DIPSETTING( 0x0c, "500k and 1000k" ) |
| r2956 | r2957 | |
| 1295 | 1195 | PORT_DIPSETTING( 0x00, "Hover Cycle" ) |
| 1296 | 1196 | |
| 1297 | 1197 | PORT_START_TAG("IN0") |
| 1298 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1299 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1300 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1198 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1301 | 1199 | |
| 1302 | 1200 | PORT_START_TAG("IN1") |
| 1303 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1304 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1305 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1201 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1306 | 1202 | |
| 1307 | | /* IN2 */ |
| 1308 | 1203 | TAITO_B_SYSTEM_INPUT |
| 1309 | | |
| 1310 | 1204 | INPUT_PORTS_END |
| 1311 | 1205 | |
| 1312 | 1206 | static INPUT_PORTS_START( crimec ) |
| r2956 | r2957 | |
| 1314 | 1208 | PORT_DIPNAME( 0x01, 0x01, "Hi Score" ) |
| 1315 | 1209 | PORT_DIPSETTING( 0x01, "Scribble" ) |
| 1316 | 1210 | PORT_DIPSETTING( 0x00, "3 Characters" ) |
| 1317 | | TAITO_B_DSWA_2_4 |
| 1318 | | TAITO_COINAGE_WORLD_8 |
| 1211 | TAITO_DSWA_BITS_1_TO_3 |
| 1212 | TAITO_COINAGE_WORLD |
| 1319 | 1213 | |
| 1320 | 1214 | PORT_START_TAG("DSWB") |
| 1321 | | TAITO_DIFFICULTY_8 |
| 1215 | TAITO_DIFFICULTY |
| 1322 | 1216 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1323 | 1217 | PORT_DIPSETTING( 0x08, "every 80k" ) |
| 1324 | 1218 | PORT_DIPSETTING( 0x0c, "80k only" ) |
| r2956 | r2957 | |
| 1336 | 1230 | PORT_DIPSETTING( 0xc0, DEF_STR( On ) ) |
| 1337 | 1231 | |
| 1338 | 1232 | PORT_START_TAG("IN0") |
| 1339 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1340 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1341 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1233 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1342 | 1234 | |
| 1343 | 1235 | PORT_START_TAG("IN1") |
| 1344 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1345 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1346 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1236 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1347 | 1237 | |
| 1348 | | /* IN2 */ |
| 1349 | 1238 | TAITO_B_SYSTEM_INPUT |
| 1350 | 1239 | INPUT_PORTS_END |
| 1351 | 1240 | |
| r2956 | r2957 | |
| 1354 | 1243 | PORT_DIPNAME( 0x01, 0x01, "Hi Score" ) |
| 1355 | 1244 | PORT_DIPSETTING( 0x01, "Scribble" ) |
| 1356 | 1245 | PORT_DIPSETTING( 0x00, "3 Characters" ) |
| 1357 | | TAITO_B_DSWA_2_4 |
| 1358 | | TAITO_COINAGE_JAPAN_8 |
| 1246 | TAITO_DSWA_BITS_1_TO_3 |
| 1247 | TAITO_COINAGE_JAPAN_OLD |
| 1359 | 1248 | |
| 1360 | 1249 | PORT_START_TAG("DSWB") |
| 1361 | | TAITO_DIFFICULTY_8 |
| 1250 | TAITO_DIFFICULTY |
| 1362 | 1251 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1363 | 1252 | PORT_DIPSETTING( 0x08, "every 80k" ) |
| 1364 | 1253 | PORT_DIPSETTING( 0x0c, "80k only" ) |
| r2956 | r2957 | |
| 1376 | 1265 | PORT_DIPSETTING( 0xc0, DEF_STR( On ) ) |
| 1377 | 1266 | |
| 1378 | 1267 | PORT_START_TAG("IN0") |
| 1379 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1380 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1381 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1268 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1382 | 1269 | |
| 1383 | 1270 | PORT_START_TAG("IN1") |
| 1384 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1385 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1386 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1271 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1387 | 1272 | |
| 1388 | | /* IN2 */ |
| 1389 | 1273 | TAITO_B_SYSTEM_INPUT |
| 1390 | 1274 | INPUT_PORTS_END |
| 1391 | 1275 | |
| r2956 | r2957 | |
| 1394 | 1278 | PORT_DIPNAME( 0x01, 0x01, "Hi Score" ) |
| 1395 | 1279 | PORT_DIPSETTING( 0x01, "Scribble" ) |
| 1396 | 1280 | PORT_DIPSETTING( 0x00, "3 Characters" ) |
| 1397 | | TAITO_B_DSWA_2_4 |
| 1398 | | TAITO_COINAGE_US_8 |
| 1281 | TAITO_DSWA_BITS_1_TO_3 |
| 1282 | TAITO_COINAGE_US |
| 1399 | 1283 | |
| 1400 | 1284 | PORT_START_TAG("DSWB") |
| 1401 | | TAITO_DIFFICULTY_8 |
| 1285 | TAITO_DIFFICULTY |
| 1402 | 1286 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1403 | 1287 | PORT_DIPSETTING( 0x08, "every 80k" ) |
| 1404 | 1288 | PORT_DIPSETTING( 0x0c, "80k only" ) |
| r2956 | r2957 | |
| 1416 | 1300 | PORT_DIPSETTING( 0xc0, DEF_STR( On ) ) |
| 1417 | 1301 | |
| 1418 | 1302 | PORT_START_TAG("IN0") |
| 1419 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1420 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1421 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1303 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1422 | 1304 | |
| 1423 | 1305 | PORT_START_TAG("IN1") |
| 1424 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1425 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1426 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1306 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1427 | 1307 | |
| 1428 | | /* IN2 */ |
| 1429 | 1308 | TAITO_B_SYSTEM_INPUT |
| 1430 | 1309 | INPUT_PORTS_END |
| 1431 | 1310 | |
| r2956 | r2957 | |
| 1434 | 1313 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 1435 | 1314 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1436 | 1315 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1437 | | TAITO_B_DSWA_2_4 |
| 1438 | | TAITO_COINAGE_JAPAN_8 |
| 1316 | TAITO_DSWA_BITS_1_TO_3 |
| 1317 | TAITO_COINAGE_JAPAN_OLD |
| 1439 | 1318 | |
| 1440 | 1319 | PORT_START_TAG("DSWB") |
| 1441 | | TAITO_DIFFICULTY_8 |
| 1320 | TAITO_DIFFICULTY |
| 1442 | 1321 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1443 | 1322 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1444 | 1323 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1459 | 1338 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1460 | 1339 | |
| 1461 | 1340 | PORT_START_TAG("IN0") |
| 1462 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1463 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1464 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1341 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1465 | 1342 | |
| 1466 | 1343 | PORT_START_TAG("IN1") |
| 1467 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1468 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1469 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1344 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1470 | 1345 | |
| 1471 | | /* IN2 */ |
| 1472 | 1346 | TAITO_B_SYSTEM_INPUT |
| 1473 | 1347 | INPUT_PORTS_END |
| 1474 | 1348 | |
| 1475 | 1349 | static INPUT_PORTS_START( ashura ) |
| 1476 | 1350 | PORT_START_TAG("DSWA") |
| 1477 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1478 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1479 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1480 | | TAITO_B_DSWA_2_4 |
| 1481 | | TAITO_COINAGE_JAPAN_8 |
| 1351 | TAITO_MACHINE_COCKTAIL |
| 1352 | TAITO_COINAGE_JAPAN_OLD |
| 1482 | 1353 | |
| 1483 | 1354 | PORT_START_TAG("DSWB") |
| 1484 | | TAITO_DIFFICULTY_8 |
| 1355 | TAITO_DIFFICULTY |
| 1485 | 1356 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1486 | 1357 | PORT_DIPSETTING( 0x08, "every 100k" ) |
| 1487 | 1358 | PORT_DIPSETTING( 0x0c, "every 150k" ) |
| r2956 | r2957 | |
| 1500 | 1371 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1501 | 1372 | |
| 1502 | 1373 | PORT_START_TAG("IN0") |
| 1503 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1504 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1505 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1374 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1506 | 1375 | |
| 1507 | 1376 | PORT_START_TAG("IN1") |
| 1508 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1509 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1510 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1377 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1511 | 1378 | |
| 1512 | | /* IN2 */ |
| 1513 | 1379 | TAITO_B_SYSTEM_INPUT |
| 1514 | 1380 | INPUT_PORTS_END |
| 1515 | 1381 | |
| 1516 | 1382 | static INPUT_PORTS_START( ashurau ) |
| 1517 | 1383 | PORT_START_TAG("DSWA") |
| 1518 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1519 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1520 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1521 | | TAITO_B_DSWA_2_4 |
| 1522 | | TAITO_COINAGE_US_8 |
| 1384 | TAITO_MACHINE_COCKTAIL |
| 1385 | TAITO_COINAGE_US |
| 1523 | 1386 | |
| 1524 | 1387 | PORT_START_TAG("DSWB") |
| 1525 | | TAITO_DIFFICULTY_8 |
| 1388 | TAITO_DIFFICULTY |
| 1526 | 1389 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1527 | 1390 | PORT_DIPSETTING( 0x08, "every 100k" ) |
| 1528 | 1391 | PORT_DIPSETTING( 0x0c, "every 150k" ) |
| r2956 | r2957 | |
| 1541 | 1404 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1542 | 1405 | |
| 1543 | 1406 | PORT_START_TAG("IN0") |
| 1544 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1545 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1546 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1407 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1547 | 1408 | |
| 1548 | 1409 | PORT_START_TAG("IN1") |
| 1549 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1550 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1551 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1410 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1552 | 1411 | |
| 1553 | | /* IN2 */ |
| 1554 | 1412 | TAITO_B_SYSTEM_INPUT |
| 1555 | 1413 | INPUT_PORTS_END |
| 1556 | 1414 | |
| r2956 | r2957 | |
| 1611 | 1469 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1612 | 1470 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1613 | 1471 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1614 | | TAITO_COINAGE_JAPAN_8 |
| 1472 | TAITO_COINAGE_JAPAN_OLD |
| 1615 | 1473 | |
| 1616 | 1474 | PORT_START_TAG("DSWB") |
| 1617 | | TAITO_DIFFICULTY_8 |
| 1475 | TAITO_DIFFICULTY |
| 1618 | 1476 | PORT_DIPNAME( 0x0c, 0x0c, "Timer count" ) |
| 1619 | 1477 | PORT_DIPSETTING( 0x0c, "1 sec = 58/60" ) |
| 1620 | 1478 | PORT_DIPSETTING( 0x04, "1 sec = 56/60" ) |
| r2956 | r2957 | |
| 1663 | 1521 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 1664 | 1522 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 1665 | 1523 | |
| 1666 | | PORT_START_TAG("IN56") /* IN5 IN6 */ |
| 1524 | PORT_START_TAG("P3_P4") /* IN5 IN6 */ |
| 1667 | 1525 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) |
| 1668 | 1526 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 1669 | 1527 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| r2956 | r2957 | |
| 1684 | 1542 | |
| 1685 | 1543 | static INPUT_PORTS_START( rambo3 ) |
| 1686 | 1544 | PORT_START_TAG("DSWA") |
| 1687 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) // all 5 "unused" in manual |
| 1688 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1689 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1690 | | TAITO_B_DSWA_2_4 |
| 1691 | | TAITO_COINAGE_WORLD_8 |
| 1545 | TAITO_MACHINE_NO_COCKTAIL // all 5 "unused" in manual |
| 1546 | TAITO_COINAGE_WORLD |
| 1692 | 1547 | |
| 1693 | 1548 | PORT_START_TAG("DSWB") |
| 1694 | | TAITO_DIFFICULTY_8 |
| 1549 | TAITO_DIFFICULTY |
| 1695 | 1550 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) |
| 1696 | 1551 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1697 | 1552 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1712 | 1567 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1713 | 1568 | |
| 1714 | 1569 | PORT_START_TAG("IN0") |
| 1715 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 1716 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1717 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1570 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1718 | 1571 | |
| 1719 | 1572 | PORT_START_TAG("IN1") |
| 1720 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 1721 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1722 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1573 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1723 | 1574 | |
| 1724 | | /* IN2 */ |
| 1725 | 1575 | TAITO_B_SYSTEM_INPUT |
| 1726 | 1576 | INPUT_PORTS_END |
| 1727 | 1577 | |
| 1728 | 1578 | static INPUT_PORTS_START( rambo3a ) |
| 1729 | | PORT_START /* DSW A */ |
| 1730 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| 1731 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1732 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1733 | | TAITO_B_DSWA_2_4 |
| 1579 | PORT_START_TAG("DSWA") /* DSW A */ |
| 1580 | TAITO_MACHINE_NO_COCKTAIL |
| 1734 | 1581 | /* Coinage similar to US, but there are some differences */ |
| 1735 | 1582 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) |
| 1736 | 1583 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1744 | 1591 | PORT_DIPSETTING( 0x00, "Same as Start or 1C/1C (if Coinage 4C/3C)" ) |
| 1745 | 1592 | |
| 1746 | 1593 | PORT_START_TAG("DSWB") |
| 1747 | | TAITO_DIFFICULTY_8 |
| 1594 | TAITO_DIFFICULTY |
| 1748 | 1595 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) |
| 1749 | 1596 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1750 | 1597 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1794 | 1641 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 1795 | 1642 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 1796 | 1643 | |
| 1797 | | PORT_START_TAG("IN3") |
| 1644 | PORT_START_TAG("TRACKX1") |
| 1798 | 1645 | PORT_BIT( 0xffff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1) |
| 1799 | 1646 | |
| 1800 | | PORT_START_TAG("IN4") |
| 1647 | PORT_START_TAG("TRACKY1") |
| 1801 | 1648 | PORT_BIT( 0xffff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_PLAYER(1) |
| 1802 | 1649 | |
| 1803 | | PORT_START_TAG("IN5") |
| 1650 | PORT_START_TAG("TRACKX2") |
| 1804 | 1651 | PORT_BIT( 0xffff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(2) |
| 1805 | 1652 | |
| 1806 | | PORT_START_TAG("IN6") |
| 1653 | PORT_START_TAG("TRACKY2") |
| 1807 | 1654 | PORT_BIT( 0xffff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_PLAYER(2) |
| 1808 | 1655 | INPUT_PORTS_END |
| 1809 | 1656 | |
| r2956 | r2957 | |
| 1884 | 1731 | |
| 1885 | 1732 | static INPUT_PORTS_START( spacedxo ) |
| 1886 | 1733 | PORT_START_TAG("DSWA") |
| 1887 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) |
| 1888 | | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 1889 | | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 1890 | | TAITO_B_DSWA_2_4 |
| 1891 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 1734 | TAITO_MACHINE_COCKTAIL |
| 1735 | TAITO_COINAGE_JAPAN_NEW |
| 1892 | 1736 | |
| 1893 | 1737 | PORT_START_TAG("DSWB") |
| 1894 | | TAITO_DIFFICULTY_8 |
| 1738 | TAITO_DIFFICULTY |
| 1895 | 1739 | PORT_DIPNAME( 0x0c, 0x0c, "Match Point" ) |
| 1896 | 1740 | PORT_DIPSETTING( 0x08, "4" ) |
| 1897 | 1741 | PORT_DIPSETTING( 0x0c, "3" ) |
| r2956 | r2957 | |
| 1968 | 1812 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1969 | 1813 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1970 | 1814 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1971 | | |
| 1972 | 1815 | INPUT_PORTS_END |
| 1973 | 1816 | |
| 1974 | 1817 | static INPUT_PORTS_START( qzshowby ) |
| r2956 | r2957 | |
| 2045 | 1888 | |
| 2046 | 1889 | static INPUT_PORTS_START( viofight ) |
| 2047 | 1890 | PORT_START_TAG("DSWA") |
| 2048 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) // all 7 "unused" in manual |
| 2049 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2050 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2051 | | TAITO_B_DSWA_2_4 |
| 2052 | | TAITO_COINAGE_WORLD_8 |
| 1891 | TAITO_MACHINE_NO_COCKTAIL // all 7 "unused" in manual |
| 1892 | TAITO_COINAGE_WORLD |
| 2053 | 1893 | |
| 2054 | 1894 | PORT_START_TAG("DSWB") |
| 2055 | | TAITO_DIFFICULTY_8 |
| 1895 | TAITO_DIFFICULTY |
| 2056 | 1896 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) |
| 2057 | 1897 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2058 | 1898 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2073 | 1913 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2074 | 1914 | |
| 2075 | 1915 | PORT_START_TAG("IN0") |
| 2076 | | TAITO_B_PLAYERS_INPUT( 1 ) |
| 2077 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 2078 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1916 | TAITO_JOY_UDLR_3_BUTTONS( 1 ) |
| 2079 | 1917 | |
| 2080 | 1918 | PORT_START_TAG("IN1") |
| 2081 | | TAITO_B_PLAYERS_INPUT( 2 ) |
| 2082 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2083 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1919 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 2084 | 1920 | |
| 2085 | | /* IN2 */ |
| 2086 | 1921 | TAITO_B_SYSTEM_INPUT |
| 2087 | 1922 | INPUT_PORTS_END |
| 2088 | 1923 | |
| 2089 | 1924 | static INPUT_PORTS_START( silentd ) /* World Version */ |
| 2090 | 1925 | PORT_START_TAG("DSWA") |
| 2091 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) /* Listed as "NOT USED" in the manual and only shown as "OFF" */ |
| 2092 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2093 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2094 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 2095 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2096 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2097 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 2098 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2099 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2100 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1926 | TAITO_MACHINE_NO_COCKTAIL /* Listed as "NOT USED" in the manual and only shown as "OFF" */ |
| 2101 | 1927 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) |
| 2102 | 1928 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| 2103 | 1929 | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 2121 | 1947 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2122 | 1948 | |
| 2123 | 1949 | PORT_START_TAG("DSWB") |
| 2124 | | TAITO_DIFFICULTY_8 |
| 1950 | TAITO_DIFFICULTY |
| 2125 | 1951 | PORT_DIPNAME( 0x04, 0x04, "Invulnerability (Cheat)" ) |
| 2126 | 1952 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2127 | 1953 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2212 | 2038 | |
| 2213 | 2039 | static INPUT_PORTS_START( silentdj ) |
| 2214 | 2040 | PORT_START_TAG("DSWA") |
| 2215 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) /* Listed as "NOT USED" in the manual and only shown as "OFF" */ |
| 2216 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2217 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2218 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 2219 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2220 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2221 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 2222 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2223 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2224 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2225 | | TAITO_COINAGE_JAPAN_8 |
| 2041 | TAITO_MACHINE_NO_COCKTAIL /* Listed as "NOT USED" in the manual and only shown as "OFF" */ |
| 2042 | TAITO_COINAGE_JAPAN_OLD |
| 2226 | 2043 | |
| 2227 | 2044 | PORT_START_TAG("DSWB") |
| 2228 | | TAITO_DIFFICULTY_8 |
| 2045 | TAITO_DIFFICULTY |
| 2229 | 2046 | PORT_DIPNAME( 0x04, 0x04, "Invulnerability (Cheat)" ) |
| 2230 | 2047 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2231 | 2048 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2307 | 2124 | |
| 2308 | 2125 | static INPUT_PORTS_START( selfeena ) |
| 2309 | 2126 | PORT_START_TAG("DSWA") |
| 2310 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| 2311 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2312 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2313 | | TAITO_B_DSWA_2_4 |
| 2314 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2127 | TAITO_MACHINE_NO_COCKTAIL |
| 2128 | TAITO_COINAGE_JAPAN_NEW |
| 2315 | 2129 | |
| 2316 | 2130 | PORT_START_TAG("DSWB") |
| 2317 | | TAITO_DIFFICULTY_8 |
| 2131 | TAITO_DIFFICULTY |
| 2318 | 2132 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 2319 | 2133 | PORT_DIPSETTING( 0x0c, "100k only" ) |
| 2320 | 2134 | PORT_DIPSETTING( 0x08, "200k only" ) |
| r2956 | r2957 | |
| 2365 | 2179 | |
| 2366 | 2180 | static INPUT_PORTS_START( ryujin ) |
| 2367 | 2181 | PORT_START_TAG("DSWA") |
| 2368 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| 2369 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2370 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2371 | | TAITO_B_DSWA_2_4 |
| 2372 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2182 | TAITO_MACHINE_NO_COCKTAIL |
| 2183 | TAITO_COINAGE_JAPAN_NEW |
| 2373 | 2184 | |
| 2374 | 2185 | PORT_START_TAG("DSWB") |
| 2375 | | TAITO_DIFFICULTY_8 |
| 2186 | TAITO_DIFFICULTY |
| 2376 | 2187 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) |
| 2377 | 2188 | PORT_DIPSETTING( 0x00, "1" ) |
| 2378 | 2189 | PORT_DIPSETTING( 0x04, "2" ) |
| r2956 | r2957 | |
| 2447 | 2258 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2448 | 2259 | |
| 2449 | 2260 | PORT_START_TAG("DSWB") /* DSW B */ //+-ok |
| 2450 | | TAITO_DIFFICULTY_8 |
| 2261 | TAITO_DIFFICULTY |
| 2451 | 2262 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2452 | 2263 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2453 | 2264 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
src/mame/drivers/tmnt.c
| r2956 | r2957 | |
| 491 | 491 | |
| 492 | 492 | /* bit 3 is service button */ |
| 493 | 493 | /* bit 6 is ??? VBLANK? OBJMPX? */ |
| 494 | | res = input_port_read_indexed(machine,2); |
| 494 | res = input_port_read(machine, "COINS"); |
| 495 | 495 | if (init_eeprom_count) |
| 496 | 496 | { |
| 497 | 497 | init_eeprom_count--; |
| r2956 | r2957 | |
| 507 | 507 | |
| 508 | 508 | /* bit 0 is EEPROM data */ |
| 509 | 509 | /* bit 1 is EEPROM ready */ |
| 510 | | res = eeprom_read_bit() | input_port_read_indexed(machine,3); |
| 510 | res = eeprom_read_bit() | input_port_read(machine, "EEPROM"); |
| 511 | 511 | return res; |
| 512 | 512 | } |
| 513 | 513 | |
| r2956 | r2957 | |
| 520 | 520 | /* bit 1 is EEPROM ready */ |
| 521 | 521 | /* bit 2 is VBLANK (???) */ |
| 522 | 522 | /* bit 7 is service button */ |
| 523 | | res = eeprom_read_bit() | input_port_read_indexed(machine,3); |
| 523 | res = eeprom_read_bit() | input_port_read(machine, "EEPROM"); |
| 524 | 524 | if (init_eeprom_count) |
| 525 | 525 | { |
| 526 | 526 | init_eeprom_count--; |
| r2956 | r2957 | |
| 539 | 539 | /* bit 1 is EEPROM ready */ |
| 540 | 540 | /* bit 2 is VBLANK (???) */ |
| 541 | 541 | /* bit 3 is service button */ |
| 542 | | res = eeprom_read_bit() | input_port_read_indexed(machine,3); |
| 542 | res = eeprom_read_bit() | input_port_read(machine, "EEPROM"); |
| 543 | 543 | if (init_eeprom_count) |
| 544 | 544 | { |
| 545 | 545 | init_eeprom_count--; |
| r2956 | r2957 | |
| 598 | 598 | { |
| 599 | 599 | int res; |
| 600 | 600 | |
| 601 | | res = input_port_read_indexed(machine,0); |
| 601 | res = input_port_read(machine, "P1/COINS"); |
| 602 | 602 | if (init_eeprom_count) |
| 603 | 603 | { |
| 604 | 604 | init_eeprom_count--; |
| r2956 | r2957 | |
| 616 | 616 | /* bit 1 is EEPROM ready */ |
| 617 | 617 | /* bit 3 is VBLANK (???) */ |
| 618 | 618 | /* bit 7 is service button */ |
| 619 | | res = (eeprom_read_bit() << 8) | input_port_read_indexed(machine,1); |
| 619 | res = (eeprom_read_bit() << 8) | input_port_read(machine, "P2/EEPROM"); |
| 620 | 620 | toggle ^= 0x0800; |
| 621 | 621 | return (res ^ toggle); |
| 622 | 622 | } |
| r2956 | r2957 | |
| 650 | 650 | /* bit 9 is service button */ |
| 651 | 651 | int res; |
| 652 | 652 | |
| 653 | | res = input_port_read_indexed(machine,0); |
| 653 | res = input_port_read(machine, "P1/COINS"); |
| 654 | 654 | if (init_eeprom_count) |
| 655 | 655 | { |
| 656 | 656 | init_eeprom_count--; |
| r2956 | r2957 | |
| 663 | 663 | { |
| 664 | 664 | /* bit 8 is EEPROM data */ |
| 665 | 665 | /* bit 9 is EEPROM ready */ |
| 666 | | return (eeprom_read_bit() << 8) | input_port_read_indexed(machine,1); |
| 666 | return (eeprom_read_bit() << 8) | input_port_read(machine, "P2/EEPROM"); |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | static WRITE16_HANDLER( prmrsocr_eeprom_w ) |
| r2956 | r2957 | |
| 721 | 721 | AM_RANGE(0x040000, 0x043fff) AM_RAM /* main RAM */ |
| 722 | 722 | AM_RANGE(0x060000, 0x063fff) AM_RAM /* main RAM */ |
| 723 | 723 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(tmnt_paletteram_word_w) AM_BASE(&paletteram16) |
| 724 | | AM_RANGE(0x0a0000, 0x0a0001) AM_READWRITE(input_port_0_word_r, tmnt_0a0000_w) |
| 725 | | AM_RANGE(0x0a0002, 0x0a0003) AM_READ(input_port_1_word_r) |
| 726 | | AM_RANGE(0x0a0004, 0x0a0005) AM_READ(input_port_2_word_r) |
| 724 | AM_RANGE(0x0a0000, 0x0a0001) AM_READ_PORT("COINS") AM_WRITE(tmnt_0a0000_w) |
| 725 | AM_RANGE(0x0a0002, 0x0a0003) AM_READ_PORT("P1") |
| 726 | AM_RANGE(0x0a0004, 0x0a0005) AM_READ_PORT("P2") |
| 727 | 727 | AM_RANGE(0x0a0008, 0x0a0009) AM_WRITE(tmnt_sound_command_w) |
| 728 | | AM_RANGE(0x0a0010, 0x0a0011) AM_READWRITE(input_port_3_word_r, watchdog_reset16_w) |
| 729 | | AM_RANGE(0x0a0012, 0x0a0013) AM_READ(input_port_4_word_r) |
| 730 | | AM_RANGE(0x0a0018, 0x0a0019) AM_READ(input_port_5_word_r) |
| 728 | AM_RANGE(0x0a0010, 0x0a0011) AM_READ_PORT("DSW1") AM_WRITE(watchdog_reset16_w) |
| 729 | AM_RANGE(0x0a0012, 0x0a0013) AM_READ_PORT("DSW2") |
| 730 | AM_RANGE(0x0a0018, 0x0a0019) AM_READ_PORT("DSW3") |
| 731 | 731 | AM_RANGE(0x0b0000, 0x0b03ff) AM_READWRITE(cuebrick_nv_r, cuebrick_nv_w) |
| 732 | 732 | AM_RANGE(0x0b0400, 0x0b0401) AM_WRITE(cuebrick_nvbank_w) |
| 733 | 733 | AM_RANGE(0x0c0000, 0x0c0003) AM_READWRITE(cuebrick_snd_r, cuebrick_snd_w) |
| r2956 | r2957 | |
| 742 | 742 | AM_RANGE(0x040000, 0x043fff) AM_RAM /* main RAM */ |
| 743 | 743 | AM_RANGE(0x060000, 0x063fff) AM_RAM /* main RAM */ |
| 744 | 744 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(tmnt_paletteram_word_w) AM_BASE(&paletteram16) |
| 745 | | AM_RANGE(0x0a0000, 0x0a0001) AM_READWRITE(input_port_0_word_r, tmnt_0a0000_w) |
| 746 | | AM_RANGE(0x0a0002, 0x0a0003) AM_READ(input_port_1_word_r) |
| 747 | | AM_RANGE(0x0a0004, 0x0a0005) AM_READ(input_port_2_word_r) |
| 745 | AM_RANGE(0x0a0000, 0x0a0001) AM_READ_PORT("COINS") AM_WRITE(tmnt_0a0000_w) |
| 746 | AM_RANGE(0x0a0002, 0x0a0003) AM_READ_PORT("P1") |
| 747 | AM_RANGE(0x0a0004, 0x0a0005) AM_READ_PORT("P2") |
| 748 | 748 | AM_RANGE(0x0a0008, 0x0a0009) AM_WRITE(tmnt_sound_command_w) |
| 749 | | AM_RANGE(0x0a0010, 0x0a0011) AM_READWRITE(input_port_3_word_r, watchdog_reset16_w) |
| 750 | | AM_RANGE(0x0a0012, 0x0a0013) AM_READ(input_port_4_word_r) |
| 751 | | AM_RANGE(0x0a0018, 0x0a0019) AM_READ(input_port_5_word_r) |
| 749 | AM_RANGE(0x0a0010, 0x0a0011) AM_READ_PORT("DSW1") AM_WRITE(watchdog_reset16_w) |
| 750 | AM_RANGE(0x0a0012, 0x0a0013) AM_READ_PORT("DSW2") |
| 751 | AM_RANGE(0x0a0018, 0x0a0019) AM_READ_PORT("DSW3") |
| 752 | 752 | #if 0 |
| 753 | 753 | AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(tmnt_priority_w) |
| 754 | 754 | #endif |
| r2956 | r2957 | |
| 763 | 763 | AM_RANGE(0x000000, 0x05ffff) AM_ROM |
| 764 | 764 | AM_RANGE(0x060000, 0x063fff) AM_RAM /* main RAM */ |
| 765 | 765 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(tmnt_paletteram_word_w) AM_BASE(&paletteram16) |
| 766 | | AM_RANGE(0x0a0000, 0x0a0001) AM_READWRITE(input_port_0_word_r, tmnt_0a0000_w) |
| 767 | | AM_RANGE(0x0a0002, 0x0a0003) AM_READ(input_port_1_word_r) |
| 768 | | AM_RANGE(0x0a0004, 0x0a0005) AM_READ(input_port_2_word_r) |
| 769 | | AM_RANGE(0x0a0006, 0x0a0007) AM_READ(input_port_3_word_r) |
| 766 | AM_RANGE(0x0a0000, 0x0a0001) AM_READ_PORT("COINS") AM_WRITE(tmnt_0a0000_w) |
| 767 | AM_RANGE(0x0a0002, 0x0a0003) AM_READ_PORT("P1") |
| 768 | AM_RANGE(0x0a0004, 0x0a0005) AM_READ_PORT("P2") |
| 769 | AM_RANGE(0x0a0006, 0x0a0007) AM_READ_PORT("P3") |
| 770 | 770 | AM_RANGE(0x0a0008, 0x0a0009) AM_WRITE(tmnt_sound_command_w) |
| 771 | | AM_RANGE(0x0a0010, 0x0a0011) AM_READWRITE(input_port_4_word_r, watchdog_reset16_w) |
| 772 | | AM_RANGE(0x0a0012, 0x0a0013) AM_READ(input_port_5_word_r) |
| 773 | | AM_RANGE(0x0a0014, 0x0a0015) AM_READ(input_port_6_word_r) |
| 774 | | AM_RANGE(0x0a0018, 0x0a0019) AM_READ(input_port_7_word_r) |
| 771 | AM_RANGE(0x0a0010, 0x0a0011) AM_READ_PORT("DSW1") AM_WRITE(watchdog_reset16_w) |
| 772 | AM_RANGE(0x0a0012, 0x0a0013) AM_READ_PORT("DSW2") |
| 773 | AM_RANGE(0x0a0014, 0x0a0015) AM_READ_PORT("P4") |
| 774 | AM_RANGE(0x0a0018, 0x0a0019) AM_READ_PORT("DSW3") |
| 775 | 775 | AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(tmnt_priority_w) |
| 776 | 776 | AM_RANGE(0x100000, 0x107fff) AM_READWRITE(K052109_word_noA12_r, K052109_word_noA12_w) |
| 777 | 777 | // AM_RANGE(0x10e800, 0x10e801) AM_WRITE(SMH_NOP) ??? |
| r2956 | r2957 | |
| 784 | 784 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 785 | 785 | AM_RANGE(0x080000, 0x083fff) AM_RAM /* main RAM */ |
| 786 | 786 | AM_RANGE(0x090000, 0x090fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) |
| 787 | | AM_RANGE(0x0a0000, 0x0a0001) AM_READ(input_port_0_word_r) |
| 788 | | AM_RANGE(0x0a0002, 0x0a0003) AM_READ(input_port_1_word_r) |
| 789 | | AM_RANGE(0x0a0004, 0x0a0005) AM_READ(input_port_3_word_r) |
| 790 | | AM_RANGE(0x0a0006, 0x0a0007) AM_READ(input_port_2_word_r) |
| 787 | AM_RANGE(0x0a0000, 0x0a0001) AM_READ_PORT("DSW1/DSW2") |
| 788 | AM_RANGE(0x0a0002, 0x0a0003) AM_READ_PORT("COINS/DSW3") |
| 789 | AM_RANGE(0x0a0004, 0x0a0005) AM_READ_PORT("P3/P4") |
| 790 | AM_RANGE(0x0a0006, 0x0a0007) AM_READ_PORT("P1/P2") |
| 791 | 791 | AM_RANGE(0x0a0020, 0x0a0021) AM_WRITE(punkshot_0a0020_w) |
| 792 | 792 | AM_RANGE(0x0a0040, 0x0a0043) AM_READ(punkshot_sound_r) /* K053260 */ |
| 793 | 793 | AM_RANGE(0x0a0040, 0x0a0041) AM_WRITE(K053260_0_lsb_w) |
| r2956 | r2957 | |
| 804 | 804 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 805 | 805 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) |
| 806 | 806 | AM_RANGE(0x090000, 0x093fff) AM_RAM /*main RAM */ |
| 807 | | AM_RANGE(0x0a0000, 0x0a0001) AM_READ(input_port_0_word_r) |
| 808 | | AM_RANGE(0x0a0002, 0x0a0003) AM_READ(input_port_1_word_r) |
| 809 | | AM_RANGE(0x0a0004, 0x0a0005) AM_READ(input_port_2_word_r) |
| 810 | | AM_RANGE(0x0a0006, 0x0a0007) AM_READ(input_port_3_word_r) |
| 811 | | AM_RANGE(0x0a0008, 0x0a0009) AM_READ(input_port_4_word_r) |
| 812 | | AM_RANGE(0x0a0010, 0x0a0011) AM_READ(input_port_5_word_r) |
| 807 | AM_RANGE(0x0a0000, 0x0a0001) AM_READ_PORT("COINS") |
| 808 | AM_RANGE(0x0a0002, 0x0a0003) AM_READ_PORT("P1") |
| 809 | AM_RANGE(0x0a0004, 0x0a0005) AM_READ_PORT("P2") |
| 810 | AM_RANGE(0x0a0006, 0x0a0007) AM_READ_PORT("DSW1") |
| 811 | AM_RANGE(0x0a0008, 0x0a0009) AM_READ_PORT("DSW2") |
| 812 | AM_RANGE(0x0a0010, 0x0a0011) AM_READ_PORT("DSW3") |
| 813 | 813 | AM_RANGE(0x0a0018, 0x0a0019) AM_WRITE(lgtnfght_0a0018_w) |
| 814 | 814 | AM_RANGE(0x0a0020, 0x0a0023) AM_READ(punkshot_sound_r) /* K053260 */ |
| 815 | 815 | AM_RANGE(0x0a0020, 0x0a0021) AM_WRITE(K053260_0_lsb_w) |
| r2956 | r2957 | |
| 835 | 835 | AM_RANGE(0x400000, 0x400fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) |
| 836 | 836 | AM_RANGE(0x500000, 0x50003f) AM_READWRITE(K054000_lsb_r, K054000_lsb_w) |
| 837 | 837 | AM_RANGE(0x680000, 0x68001f) AM_READWRITE(K053244_word_noA1_r, K053244_word_noA1_w) |
| 838 | | AM_RANGE(0x700000, 0x700001) AM_READ(input_port_0_word_r) |
| 839 | | AM_RANGE(0x700002, 0x700003) AM_READ(input_port_1_word_r) |
| 838 | AM_RANGE(0x700000, 0x700001) AM_READ_PORT("P1") |
| 839 | AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P2") |
| 840 | 840 | AM_RANGE(0x700004, 0x700005) AM_READ(blswhstl_coin_r) |
| 841 | 841 | AM_RANGE(0x700006, 0x700007) AM_READ(blswhstl_eeprom_r) |
| 842 | 842 | AM_RANGE(0x700200, 0x700201) AM_WRITE(blswhstl_eeprom_w) |
| r2956 | r2957 | |
| 859 | 859 | AM_RANGE(0x114000, 0x11401f) AM_READWRITE(K053244_lsb_r, K053244_lsb_w) /* duplicate! */ |
| 860 | 860 | AM_RANGE(0x118000, 0x11801f) AM_WRITE(SMH_RAM) AM_BASE(&K053936_0_ctrl) |
| 861 | 861 | AM_RANGE(0x11c000, 0x11c01f) AM_WRITE(K053251_msb_w) |
| 862 | | AM_RANGE(0x120000, 0x120001) AM_READ(input_port_0_word_r) |
| 863 | | AM_RANGE(0x120002, 0x120003) AM_READ(input_port_1_word_r) |
| 864 | | AM_RANGE(0x120004, 0x120005) AM_READ(input_port_3_word_r) |
| 865 | | AM_RANGE(0x120006, 0x120007) AM_READ(input_port_2_word_r) |
| 862 | AM_RANGE(0x120000, 0x120001) AM_READ_PORT("P1/P2") |
| 863 | AM_RANGE(0x120002, 0x120003) AM_READ_PORT("P3/P4") |
| 864 | AM_RANGE(0x120004, 0x120005) AM_READ_PORT("COINS/DSW3") |
| 865 | AM_RANGE(0x120006, 0x120007) AM_READ_PORT("DSW1/DSW2") |
| 866 | 866 | AM_RANGE(0x121000, 0x121001) AM_READ(glfgreat_ball_r) /* returns the color of the center pixel of the roz layer */ |
| 867 | 867 | AM_RANGE(0x122000, 0x122001) AM_WRITE(glfgreat_122000_w) |
| 868 | 868 | AM_RANGE(0x124000, 0x124001) AM_WRITE(watchdog_reset16_w) |
| r2956 | r2957 | |
| 1130 | 1130 | AM_RANGE(0x104000, 0x107fff) AM_RAM AM_BASE(&sunset_104000) /* main RAM */ |
| 1131 | 1131 | AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) |
| 1132 | 1132 | AM_RANGE(0x180000, 0x183fff) AM_RAM_WRITE(K053245_scattered_word_w) AM_BASE(&spriteram16) // K053245_scattered_word_r |
| 1133 | | AM_RANGE(0x1c0000, 0x1c0001) AM_READ(input_port_0_word_r) |
| 1134 | | AM_RANGE(0x1c0002, 0x1c0003) AM_READ(input_port_1_word_r) |
| 1135 | | AM_RANGE(0x1c0004, 0x1c0005) AM_READ(input_port_4_word_r) |
| 1136 | | AM_RANGE(0x1c0006, 0x1c0007) AM_READ(input_port_5_word_r) |
| 1137 | | AM_RANGE(0x1c0100, 0x1c0101) AM_READ(input_port_2_word_r) |
| 1133 | AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("P1") |
| 1134 | AM_RANGE(0x1c0002, 0x1c0003) AM_READ_PORT("P2") |
| 1135 | AM_RANGE(0x1c0004, 0x1c0005) AM_READ_PORT("P3") |
| 1136 | AM_RANGE(0x1c0006, 0x1c0007) AM_READ_PORT("P4") |
| 1137 | AM_RANGE(0x1c0100, 0x1c0101) AM_READ_PORT("COINS") |
| 1138 | 1138 | AM_RANGE(0x1c0102, 0x1c0103) AM_READ(ssriders_eeprom_r) |
| 1139 | 1139 | AM_RANGE(0x1c0200, 0x1c0201) AM_WRITE(ssriders_eeprom_w) /* EEPROM and gfx control */ |
| 1140 | 1140 | AM_RANGE(0x1c0300, 0x1c0301) AM_WRITE(ssriders_1c0300_w) |
| r2956 | r2957 | |
| 1156 | 1156 | AM_RANGE(0x104000, 0x107fff) AM_RAM /* main RAM */ |
| 1157 | 1157 | AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16) |
| 1158 | 1158 | AM_RANGE(0x180000, 0x183fff) AM_READWRITE(K053245_scattered_word_r, K053245_scattered_word_w) AM_BASE(&spriteram16) |
| 1159 | | AM_RANGE(0x1c0000, 0x1c0001) AM_READ(input_port_0_word_r) |
| 1160 | | AM_RANGE(0x1c0002, 0x1c0003) AM_READ(input_port_1_word_r) |
| 1161 | | AM_RANGE(0x1c0004, 0x1c0005) AM_READ(input_port_4_word_r) |
| 1162 | | AM_RANGE(0x1c0006, 0x1c0007) AM_READ(input_port_5_word_r) |
| 1163 | | AM_RANGE(0x1c0100, 0x1c0101) AM_READ(input_port_2_word_r) |
| 1159 | AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("P1") |
| 1160 | AM_RANGE(0x1c0002, 0x1c0003) AM_READ_PORT("P2") |
| 1161 | AM_RANGE(0x1c0004, 0x1c0005) AM_READ_PORT("P3") |
| 1162 | AM_RANGE(0x1c0006, 0x1c0007) AM_READ_PORT("P4") |
| 1163 | AM_RANGE(0x1c0100, 0x1c0101) AM_READ_PORT("COINS") |
| 1164 | 1164 | AM_RANGE(0x1c0102, 0x1c0103) AM_READ(ssriders_eeprom_r) |
| 1165 | 1165 | AM_RANGE(0x1c0200, 0x1c0201) AM_WRITE(ssriders_eeprom_w) /* EEPROM and gfx control */ |
| 1166 | 1166 | AM_RANGE(0x1c0300, 0x1c0301) AM_WRITE(ssriders_1c0300_w) |
| r2956 | r2957 | |
| 1191 | 1191 | AM_RANGE(0x604020, 0x60402f) AM_WRITE(SMH_NOP) /* written every frame */ |
| 1192 | 1192 | AM_RANGE(0x604200, 0x604201) AM_WRITE(SMH_NOP) /* watchdog */ |
| 1193 | 1193 | AM_RANGE(0x6119e2, 0x6119e3) AM_WRITE(SMH_NOP) /* written a lot in some test menus (PC=18204) */ |
| 1194 | | AM_RANGE(0xc00000, 0xc00001) AM_READ(input_port_0_word_r) |
| 1195 | | AM_RANGE(0xc00002, 0xc00003) AM_READ(input_port_1_word_r) |
| 1196 | | AM_RANGE(0xc00004, 0xc00005) AM_READ(input_port_4_word_r) |
| 1197 | | AM_RANGE(0xc00006, 0xc00007) AM_READ(input_port_5_word_r) |
| 1194 | AM_RANGE(0xc00000, 0xc00001) AM_READ_PORT("P1") |
| 1195 | AM_RANGE(0xc00002, 0xc00003) AM_READ_PORT("P2") |
| 1196 | AM_RANGE(0xc00004, 0xc00005) AM_READ_PORT("P3") |
| 1197 | AM_RANGE(0xc00006, 0xc00007) AM_READ_PORT("P4") |
| 1198 | 1198 | AM_RANGE(0xc00200, 0xc00201) AM_WRITE(ssriders_eeprom_w) /* EEPROM and gfx control */ |
| 1199 | | AM_RANGE(0xc00404, 0xc00405) AM_READ(input_port_2_word_r) |
| 1199 | AM_RANGE(0xc00404, 0xc00405) AM_READ_PORT("COINS") |
| 1200 | 1200 | AM_RANGE(0xc00406, 0xc00407) AM_READ(sunsetbl_eeprom_r) |
| 1201 | 1201 | AM_RANGE(0xc00600, 0xc00601) AM_READWRITE(OKIM6295_status_0_lsb_r, OKIM6295_data_0_lsb_w) |
| 1202 | 1202 | AM_RANGE(0x75d288, 0x75d289) AM_READ(SMH_NOP) // read repeatedly in some test menus (PC=181f2) |
| r2956 | r2957 | |
| 1337 | 1337 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, start ) |
| 1338 | 1338 | |
| 1339 | 1339 | static INPUT_PORTS_START( cuebrick ) |
| 1340 | | PORT_START /* COINS */ |
| 1340 | PORT_START_TAG("COINS") /* COINS */ |
| 1341 | 1341 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1342 | 1342 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1343 | 1343 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 1347 | 1347 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1348 | 1348 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1349 | 1349 | |
| 1350 | | PORT_START /* PLAYER 1 */ |
| 1350 | PORT_START_TAG("P1") /* PLAYER 1 */ |
| 1351 | 1351 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_UNUSED ) |
| 1352 | 1352 | |
| 1353 | | PORT_START /* PLAYER 2 */ |
| 1353 | PORT_START_TAG("P2") /* PLAYER 2 */ |
| 1354 | 1354 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_BUTTON3, IPT_UNUSED ) |
| 1355 | 1355 | |
| 1356 | | PORT_START /* DSW1 */ |
| 1356 | PORT_START_TAG("DSW1") /* DSW1 */ |
| 1357 | 1357 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) |
| 1358 | 1358 | PORT_DIPSETTING( 0x03, "2" ) |
| 1359 | 1359 | PORT_DIPSETTING( 0x02, "3" ) |
| r2956 | r2957 | |
| 1374 | 1374 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1375 | 1375 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1376 | 1376 | |
| 1377 | | PORT_START /* DSW2 */ |
| 1377 | PORT_START_TAG("DSW2") /* DSW2 */ |
| 1378 | 1378 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| 1379 | 1379 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 1380 | 1380 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1410 | 1410 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) |
| 1411 | 1411 | // PORT_DIPSETTING( 0x00, "Invalid" ) |
| 1412 | 1412 | |
| 1413 | | PORT_START /* DSW3 */ |
| 1413 | PORT_START_TAG("DSW3") /* DSW3 */ |
| 1414 | 1414 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| 1415 | 1415 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1416 | 1416 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1422 | 1422 | INPUT_PORTS_END |
| 1423 | 1423 | |
| 1424 | 1424 | static INPUT_PORTS_START( mia ) |
| 1425 | | PORT_START /* COINS */ |
| 1425 | PORT_START_TAG("COINS") /* COINS */ |
| 1426 | 1426 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1427 | 1427 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1428 | 1428 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 1432 | 1432 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1433 | 1433 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1434 | 1434 | |
| 1435 | | PORT_START /* PLAYER 1 */ |
| 1435 | PORT_START_TAG("P1") /* PLAYER 1 */ |
| 1436 | 1436 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_UNUSED ) |
| 1437 | 1437 | |
| 1438 | | PORT_START /* PLAYER 2 */ |
| 1438 | PORT_START_TAG("P2") /* PLAYER 2 */ |
| 1439 | 1439 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_BUTTON3, IPT_UNUSED ) |
| 1440 | 1440 | |
| 1441 | | PORT_START /* DSW1 */ |
| 1441 | PORT_START_TAG("DSW1") /* DSW1 */ |
| 1442 | 1442 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| 1443 | 1443 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 1444 | 1444 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1474 | 1474 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) |
| 1475 | 1475 | // PORT_DIPSETTING( 0x00, "Invalid" ) |
| 1476 | 1476 | |
| 1477 | | PORT_START /* DSW2 */ |
| 1477 | PORT_START_TAG("DSW2") /* DSW2 */ |
| 1478 | 1478 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) |
| 1479 | 1479 | PORT_DIPSETTING( 0x03, "2" ) |
| 1480 | 1480 | PORT_DIPSETTING( 0x02, "3" ) |
| r2956 | r2957 | |
| 1495 | 1495 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1496 | 1496 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1497 | 1497 | |
| 1498 | | PORT_START /* DSW3 */ |
| 1498 | PORT_START_TAG("DSW3") /* DSW3 */ |
| 1499 | 1499 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| 1500 | 1500 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1501 | 1501 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1507 | 1507 | INPUT_PORTS_END |
| 1508 | 1508 | |
| 1509 | 1509 | static INPUT_PORTS_START( tmnt ) |
| 1510 | | PORT_START /* COINS */ |
| 1510 | PORT_START_TAG("COINS") /* COINS */ |
| 1511 | 1511 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1512 | 1512 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1513 | 1513 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 1517 | 1517 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) |
| 1518 | 1518 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 1519 | 1519 | |
| 1520 | | PORT_START /* PLAYER 1 */ |
| 1520 | PORT_START_TAG("P1") /* PLAYER 1 */ |
| 1521 | 1521 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1522 | 1522 | |
| 1523 | | PORT_START /* PLAYER 2 */ |
| 1523 | PORT_START_TAG("P2") /* PLAYER 2 */ |
| 1524 | 1524 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1525 | 1525 | |
| 1526 | | PORT_START /* PLAYER 3 */ |
| 1526 | PORT_START_TAG("P3") /* PLAYER 3 */ |
| 1527 | 1527 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1528 | 1528 | |
| 1529 | | PORT_START /* DSW1 */ |
| 1529 | PORT_START_TAG("DSW1") /* DSW1 */ |
| 1530 | 1530 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) ) |
| 1531 | 1531 | PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) |
| 1532 | 1532 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| r2956 | r2957 | |
| 1545 | 1545 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 1546 | 1546 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) |
| 1547 | 1547 | |
| 1548 | | PORT_START /* DSW2 */ |
| 1548 | PORT_START_TAG("DSW2") /* DSW2 */ |
| 1549 | 1549 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) |
| 1550 | 1550 | PORT_DIPSETTING( 0x03, "1" ) |
| 1551 | 1551 | PORT_DIPSETTING( 0x02, "2" ) |
| r2956 | r2957 | |
| 1569 | 1569 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1570 | 1570 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1571 | 1571 | |
| 1572 | | PORT_START /* PLAYER 4 */ |
| 1572 | PORT_START_TAG("P4") /* PLAYER 4 */ |
| 1573 | 1573 | KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1574 | 1574 | |
| 1575 | | PORT_START /* DSW3 */ |
| 1575 | PORT_START_TAG("DSW3") /* DSW3 */ |
| 1576 | 1576 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| 1577 | 1577 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1578 | 1578 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1587 | 1587 | INPUT_PORTS_END |
| 1588 | 1588 | |
| 1589 | 1589 | static INPUT_PORTS_START( tmnt2p ) |
| 1590 | | PORT_START /* COINS */ |
| 1590 | PORT_START_TAG("COINS") /* COINS */ |
| 1591 | 1591 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1592 | 1592 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1593 | 1593 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1597 | 1597 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1598 | 1598 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1599 | 1599 | |
| 1600 | | PORT_START /* PLAYER 1 */ |
| 1600 | PORT_START_TAG("P1") /* PLAYER 1 */ |
| 1601 | 1601 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 1602 | 1602 | |
| 1603 | | PORT_START /* PLAYER 2 */ |
| 1603 | PORT_START_TAG("P2") /* PLAYER 2 */ |
| 1604 | 1604 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) |
| 1605 | 1605 | |
| 1606 | | PORT_START /* PLAYER 3 */ |
| 1607 | | // KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) |
| 1606 | PORT_START_TAG("P3") /* PLAYER 3 */ |
| 1607 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1608 | 1608 | |
| 1609 | | PORT_START /* DSW1 */ |
| 1609 | PORT_START_TAG("DSW1") /* DSW1 */ |
| 1610 | 1610 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| 1611 | 1611 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 1612 | 1612 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1642 | 1642 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) |
| 1643 | 1643 | // PORT_DIPSETTING( 0x00, "Invalid" ) |
| 1644 | 1644 | |
| 1645 | | PORT_START /* DSW2 */ |
| 1645 | PORT_START_TAG("DSW2") /* DSW2 */ |
| 1646 | 1646 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) |
| 1647 | 1647 | PORT_DIPSETTING( 0x03, "1" ) |
| 1648 | 1648 | PORT_DIPSETTING( 0x02, "2" ) |
| r2956 | r2957 | |
| 1666 | 1666 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1667 | 1667 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1668 | 1668 | |
| 1669 | | PORT_START /* PLAYER 4 */ |
| 1670 | | // KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_START4 ) |
| 1669 | PORT_START_TAG("P4") /* PLAYER 4 */ |
| 1670 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1671 | 1671 | |
| 1672 | | PORT_START /* DSW3 */ |
| 1672 | PORT_START_TAG("DSW3") /* DSW3 */ |
| 1673 | 1673 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| 1674 | 1674 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1675 | 1675 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1684 | 1684 | INPUT_PORTS_END |
| 1685 | 1685 | |
| 1686 | 1686 | static INPUT_PORTS_START( punkshot ) |
| 1687 | | PORT_START /* DSW1/DSW2 */ |
| 1687 | PORT_START_TAG("DSW1/DSW2") /* DSW1/DSW2 */ |
| 1688 | 1688 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) |
| 1689 | 1689 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 1690 | 1690 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| r2956 | r2957 | |
| 1736 | 1736 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 1737 | 1737 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1738 | 1738 | |
| 1739 | | PORT_START /* COIN/DSW3 */ |
| 1739 | PORT_START_TAG("COINS/DSW3") /* COIN/DSW3 */ |
| 1740 | 1740 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1741 | 1741 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1742 | 1742 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 1760 | 1760 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 1761 | 1761 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1762 | 1762 | |
| 1763 | | PORT_START /* IN0/IN1 */ |
| 1763 | PORT_START_TAG("P1/P2") /* IN0/IN1 */ |
| 1764 | 1764 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1765 | 1765 | KONAMI_PLAYERS_INPUT_MSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1766 | 1766 | |
| 1767 | | PORT_START /* IN2/IN3 */ |
| 1767 | PORT_START_TAG("P3/P4") /* IN2/IN3 */ |
| 1768 | 1768 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1769 | 1769 | KONAMI_PLAYERS_INPUT_MSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1770 | 1770 | INPUT_PORTS_END |
| 1771 | 1771 | |
| 1772 | 1772 | static INPUT_PORTS_START( punksht2 ) |
| 1773 | | PORT_START /* DSW1/DSW2 */ |
| 1773 | PORT_START_TAG("DSW1/DSW2") /* DSW1/DSW2 */ |
| 1774 | 1774 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) ) |
| 1775 | 1775 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 1776 | 1776 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| r2956 | r2957 | |
| 1822 | 1822 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 1823 | 1823 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1824 | 1824 | |
| 1825 | | PORT_START /* COIN/DSW3 */ |
| 1825 | PORT_START_TAG("COINS/DSW3") /* COIN/DSW3 */ |
| 1826 | 1826 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1827 | 1827 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1828 | 1828 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1846 | 1846 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 1847 | 1847 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1848 | 1848 | |
| 1849 | | PORT_START /* IN0/IN1 */ |
| 1849 | PORT_START_TAG("P1/P2") /* IN0/IN1 */ |
| 1850 | 1850 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1851 | 1851 | KONAMI_PLAYERS_INPUT_MSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1852 | |
| 1853 | PORT_START_TAG("P3/P4") /* IN2/IN3 */ |
| 1854 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1852 | 1855 | INPUT_PORTS_END |
| 1853 | 1856 | |
| 1854 | 1857 | static INPUT_PORTS_START( lgtnfght ) |
| 1855 | | PORT_START |
| 1858 | PORT_START_TAG("COINS") |
| 1856 | 1859 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1857 | 1860 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1858 | 1861 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* vblank? checked during boot */ |
| r2956 | r2957 | |
| 1862 | 1865 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1863 | 1866 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1864 | 1867 | |
| 1865 | | PORT_START |
| 1868 | PORT_START_TAG("P1") |
| 1866 | 1869 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_UNKNOWN ) |
| 1867 | 1870 | |
| 1868 | | PORT_START |
| 1871 | PORT_START_TAG("P2") |
| 1869 | 1872 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_BUTTON3, IPT_UNKNOWN ) |
| 1870 | 1873 | |
| 1871 | | PORT_START /* DSW1 */ |
| 1874 | PORT_START_TAG("DSW1") /* DSW1 */ |
| 1872 | 1875 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) |
| 1873 | 1876 | PORT_DIPSETTING( 0x03, "2" ) |
| 1874 | 1877 | PORT_DIPSETTING( 0x02, "3" ) |
| r2956 | r2957 | |
| 1891 | 1894 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1892 | 1895 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1893 | 1896 | |
| 1894 | | PORT_START /* DSW2 */ |
| 1897 | PORT_START_TAG("DSW2") /* DSW2 */ |
| 1895 | 1898 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| 1896 | 1899 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 1897 | 1900 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 1927 | 1930 | PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) |
| 1928 | 1931 | // PORT_DIPSETTING( 0x00, "Invalid" ) |
| 1929 | 1932 | |
| 1930 | | PORT_START /* DSW3 */ |
| 1933 | PORT_START_TAG("DSW3") /* DSW3 */ |
| 1931 | 1934 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) |
| 1932 | 1935 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1933 | 1936 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1942 | 1945 | INPUT_PORTS_END |
| 1943 | 1946 | |
| 1944 | 1947 | static INPUT_PORTS_START( blswhstl ) |
| 1945 | | PORT_START /* IN0 */ |
| 1948 | PORT_START_TAG("P1") /* IN0 */ |
| 1946 | 1949 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1947 | 1950 | |
| 1948 | | PORT_START /* IN1 */ |
| 1951 | PORT_START_TAG("P2") /* IN1 */ |
| 1949 | 1952 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 1950 | 1953 | |
| 1951 | | PORT_START /* COIN */ |
| 1954 | PORT_START_TAG("COINS") /* COIN */ |
| 1952 | 1955 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1953 | 1956 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1954 | 1957 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1958 | 1961 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* VBLANK? OBJMPX? */ |
| 1959 | 1962 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1960 | 1963 | |
| 1961 | | PORT_START /* EEPROM */ |
| 1964 | PORT_START_TAG("EEPROM") /* EEPROM */ |
| 1962 | 1965 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 1963 | 1966 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 1964 | 1967 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1965 | 1968 | INPUT_PORTS_END |
| 1966 | 1969 | |
| 1967 | 1970 | static INPUT_PORTS_START( glfgreat ) |
| 1968 | | PORT_START /* IN0 */ |
| 1971 | PORT_START_TAG("P1/P2") /* IN0 */ |
| 1969 | 1972 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 1970 | 1973 | KONAMI_PLAYERS_INPUT_MSB( 2, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 1971 | 1974 | |
| 1972 | | PORT_START /* IN1 */ |
| 1975 | PORT_START_TAG("P3/P4") /* IN1 */ |
| 1973 | 1976 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(3) |
| 1974 | 1977 | KONAMI_PLAYERS_INPUT_MSB( 4, IPT_BUTTON3, IPT_BUTTON4 ) PORT_PLAYER(4) |
| 1975 | 1978 | |
| 1976 | | PORT_START |
| 1979 | PORT_START_TAG("DSW1/DSW2") |
| 1977 | 1980 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) |
| 1978 | 1981 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| 1979 | 1982 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 2030 | 2033 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 2031 | 2034 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 2032 | 2035 | |
| 2033 | | PORT_START |
| 2036 | PORT_START_TAG("COINS/DSW3") |
| 2034 | 2037 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2035 | 2038 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2036 | 2039 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 2059 | 2062 | INPUT_PORTS_END |
| 2060 | 2063 | |
| 2061 | 2064 | static INPUT_PORTS_START( ssriders ) |
| 2062 | | PORT_START /* IN0 */ |
| 2065 | PORT_START_TAG("P1") /* IN0 */ |
| 2063 | 2066 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 2064 | 2067 | |
| 2065 | | PORT_START /* IN1 */ |
| 2068 | PORT_START_TAG("P2") /* IN1 */ |
| 2066 | 2069 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) |
| 2067 | 2070 | |
| 2068 | | PORT_START /* COIN */ |
| 2071 | PORT_START_TAG("COINS") /* COIN */ |
| 2069 | 2072 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2070 | 2073 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2071 | 2074 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2075 | 2078 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2076 | 2079 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2077 | 2080 | |
| 2078 | | PORT_START /* EEPROM and service */ |
| 2081 | PORT_START_TAG("EEPROM") /* EEPROM and service */ |
| 2079 | 2082 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2080 | 2083 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 2081 | 2084 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| r2956 | r2957 | |
| 2083 | 2086 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 2084 | 2087 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2085 | 2088 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 2089 | |
| 2090 | PORT_START_TAG("P3") /* IN2 */ |
| 2091 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2092 | |
| 2093 | PORT_START_TAG("P4") /* IN3 */ |
| 2094 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2086 | 2095 | INPUT_PORTS_END |
| 2087 | 2096 | |
| 2088 | 2097 | static INPUT_PORTS_START( ssridr4p ) |
| 2089 | | PORT_START /* IN0 */ |
| 2098 | PORT_START_TAG("P1") /* IN0 */ |
| 2090 | 2099 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 2091 | 2100 | |
| 2092 | | PORT_START /* IN1 */ |
| 2101 | PORT_START_TAG("P2") /* IN1 */ |
| 2093 | 2102 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 2094 | 2103 | |
| 2095 | | PORT_START /* COIN */ |
| 2104 | PORT_START_TAG("COINS") /* COIN */ |
| 2096 | 2105 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2097 | 2106 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2098 | 2107 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 2102 | 2111 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) |
| 2103 | 2112 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 2104 | 2113 | |
| 2105 | | PORT_START /* EEPROM and service */ |
| 2114 | PORT_START_TAG("EEPROM") /* EEPROM and service */ |
| 2106 | 2115 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2107 | 2116 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 2108 | 2117 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| r2956 | r2957 | |
| 2111 | 2120 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2112 | 2121 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 2113 | 2122 | |
| 2114 | | PORT_START /* IN2 */ |
| 2123 | PORT_START_TAG("P3") /* IN2 */ |
| 2115 | 2124 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 2116 | 2125 | |
| 2117 | | PORT_START /* IN3 */ |
| 2126 | PORT_START_TAG("P4") /* IN3 */ |
| 2118 | 2127 | KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_UNKNOWN ) |
| 2119 | 2128 | INPUT_PORTS_END |
| 2120 | 2129 | |
| 2121 | 2130 | /* Same as 'ssridr4p', but additional Start button for each player. |
| 2122 | 2131 | COIN3, COIN4, SERVICE3 and SERVICE4 only have an effect in the "test mode". */ |
| 2123 | 2132 | static INPUT_PORTS_START( ssrid4ps ) |
| 2124 | | PORT_START /* IN0 */ |
| 2133 | PORT_START_TAG("P1") /* IN0 */ |
| 2125 | 2134 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 2126 | 2135 | |
| 2127 | | PORT_START /* IN1 */ |
| 2136 | PORT_START_TAG("P2") /* IN1 */ |
| 2128 | 2137 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) |
| 2129 | 2138 | |
| 2130 | | PORT_START /* COIN */ |
| 2139 | PORT_START_TAG("COINS") /* COIN */ |
| 2131 | 2140 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2132 | 2141 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2133 | 2142 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 2137 | 2146 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) |
| 2138 | 2147 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 2139 | 2148 | |
| 2140 | | PORT_START /* EEPROM and service */ |
| 2149 | PORT_START_TAG("EEPROM") /* EEPROM and service */ |
| 2141 | 2150 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2142 | 2151 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 2143 | 2152 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| r2956 | r2957 | |
| 2146 | 2155 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2147 | 2156 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 2148 | 2157 | |
| 2149 | | PORT_START /* IN2 */ |
| 2158 | PORT_START_TAG("P3") /* IN2 */ |
| 2150 | 2159 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) |
| 2151 | 2160 | |
| 2152 | | PORT_START /* IN3 */ |
| 2161 | PORT_START_TAG("P4") /* IN3 */ |
| 2153 | 2162 | KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_START4 ) |
| 2154 | 2163 | INPUT_PORTS_END |
| 2155 | 2164 | |
| 2156 | 2165 | /* Version for the bootleg, which has the service switch a little different */ |
| 2157 | 2166 | static INPUT_PORTS_START( sunsetbl ) |
| 2158 | | PORT_START /* IN0 */ |
| 2167 | PORT_START_TAG("P1") /* IN0 */ |
| 2159 | 2168 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 2160 | 2169 | |
| 2161 | | PORT_START /* IN1 */ |
| 2170 | PORT_START_TAG("P2") /* IN1 */ |
| 2162 | 2171 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) |
| 2163 | 2172 | |
| 2164 | | PORT_START /* COIN */ |
| 2173 | PORT_START_TAG("COINS") /* COIN */ |
| 2165 | 2174 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2166 | 2175 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2167 | 2176 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 2171 | 2180 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) |
| 2172 | 2181 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 2173 | 2182 | |
| 2174 | | PORT_START /* EEPROM and service */ |
| 2183 | PORT_START_TAG("EEPROM") /* EEPROM and service */ |
| 2175 | 2184 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2176 | 2185 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 2177 | 2186 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2180 | 2189 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2181 | 2190 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 2182 | 2191 | |
| 2183 | | PORT_START /* IN2 */ |
| 2192 | PORT_START_TAG("P3") /* IN2 */ |
| 2184 | 2193 | KONAMI_PLAYERS_INPUT_LSB( 3, IPT_UNKNOWN, IPT_START3 ) |
| 2185 | 2194 | |
| 2186 | | PORT_START /* IN3 */ |
| 2195 | PORT_START_TAG("P4") /* IN3 */ |
| 2187 | 2196 | KONAMI_PLAYERS_INPUT_LSB( 4, IPT_UNKNOWN, IPT_START4 ) |
| 2188 | 2197 | INPUT_PORTS_END |
| 2189 | 2198 | |
| 2190 | 2199 | static INPUT_PORTS_START( qgakumon ) |
| 2191 | | PORT_START /* IN0 */ |
| 2200 | PORT_START_TAG("P1") /* IN0 */ |
| 2192 | 2201 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // Joystick control : Left |
| 2193 | 2202 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // Joystick control : Right |
| 2194 | 2203 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // Joystick control : Up |
| r2956 | r2957 | |
| 2198 | 2207 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2199 | 2208 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2200 | 2209 | |
| 2201 | | PORT_START /* IN1 */ |
| 2210 | PORT_START_TAG("P2") /* IN1 */ |
| 2202 | 2211 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) // Joystick control : Left |
| 2203 | 2212 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // Joystick control : Right |
| 2204 | 2213 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // Joystick control : Up |
| r2956 | r2957 | |
| 2208 | 2217 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2209 | 2218 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2210 | 2219 | |
| 2211 | | PORT_START /* COIN */ |
| 2220 | PORT_START_TAG("COINS") /* COIN */ |
| 2212 | 2221 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2213 | 2222 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2214 | 2223 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2218 | 2227 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2219 | 2228 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2220 | 2229 | |
| 2221 | | PORT_START /* EEPROM and service */ |
| 2230 | PORT_START_TAG("EEPROM") /* EEPROM and service */ |
| 2222 | 2231 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2223 | 2232 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| 2224 | 2233 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: OBJMPX */ |
| r2956 | r2957 | |
| 2226 | 2235 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* ?? TMNT2: IPL0 */ |
| 2227 | 2236 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* unused? */ |
| 2228 | 2237 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 2238 | |
| 2239 | PORT_START_TAG("P3") /* IN2 */ |
| 2240 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2241 | |
| 2242 | PORT_START_TAG("P4") /* IN3 */ |
| 2243 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2229 | 2244 | INPUT_PORTS_END |
| 2230 | 2245 | |
| 2231 | 2246 | static INPUT_PORTS_START( thndrx2 ) |
| 2232 | | PORT_START |
| 2247 | PORT_START_TAG("P1/COINS") |
| 2233 | 2248 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 2234 | 2249 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2235 | 2250 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r2956 | r2957 | |
| 2240 | 2255 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2241 | 2256 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2242 | 2257 | |
| 2243 | | PORT_START /* EEPROM and service */ |
| 2258 | PORT_START_TAG("P2/EEPROM") /* EEPROM and service */ |
| 2244 | 2259 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) |
| 2245 | 2260 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2246 | 2261 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
| r2956 | r2957 | |
| 2253 | 2268 | INPUT_PORTS_END |
| 2254 | 2269 | |
| 2255 | 2270 | static INPUT_PORTS_START( prmrsocr ) |
| 2256 | | PORT_START |
| 2271 | PORT_START_TAG("P1/COINS") |
| 2257 | 2272 | KONAMI_PLAYERS_INPUT_LSB( 1, IPT_UNKNOWN, IPT_START1 ) |
| 2258 | 2273 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2259 | 2274 | PORT_SERVICE_NO_TOGGLE( 0x0200, IP_ACTIVE_LOW ) |
| r2956 | r2957 | |
| 2272 | 2287 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 2273 | 2288 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 2274 | 2289 | |
| 2275 | | PORT_START |
| 2290 | PORT_START_TAG("P2/EEPROM") |
| 2276 | 2291 | KONAMI_PLAYERS_INPUT_LSB( 2, IPT_UNKNOWN, IPT_START2 ) |
| 2277 | 2292 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* EEPROM data */ |
| 2278 | 2293 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) /* EEPROM status? - always 1 */ |
src/mame/drivers/ssv.c
| r2956 | r2957 | |
| 491 | 491 | |
| 492 | 492 | static READ16_HANDLER( gdfs_eeprom_r ) |
| 493 | 493 | { |
| 494 | | return (((gdfs_lightgun_select & 1) ? 0 : 0xff) ^ input_port_read_indexed(machine, 5 + gdfs_lightgun_select)) | (eeprom_read_bit() << 8); |
| 494 | static const char *gunnames[] = { "GUNX1", "GUNY1", "GUNX2", "GUNY2" }; |
| 495 | |
| 496 | return (((gdfs_lightgun_select & 1) ? 0 : 0xff) ^ input_port_read(machine, gunnames[gdfs_lightgun_select])) | (eeprom_read_bit() << 8); |
| 495 | 497 | } |
| 496 | 498 | |
| 497 | 499 | static WRITE16_HANDLER( gdfs_eeprom_w ) |
| r2956 | r2957 | |
| 644 | 646 | static READ16_HANDLER( hypreact_input_r ) |
| 645 | 647 | { |
| 646 | 648 | UINT16 input_sel = *ssv_input_sel; |
| 647 | | if (input_sel & 0x0001) return input_port_read_indexed(machine, 5); |
| 648 | | if (input_sel & 0x0002) return input_port_read_indexed(machine, 6); |
| 649 | | if (input_sel & 0x0004) return input_port_read_indexed(machine, 7); |
| 650 | | if (input_sel & 0x0008) return input_port_read_indexed(machine, 8); |
| 649 | if (input_sel & 0x0001) return input_port_read(machine, "KEY0"); |
| 650 | if (input_sel & 0x0002) return input_port_read(machine, "KEY1"); |
| 651 | if (input_sel & 0x0004) return input_port_read(machine, "KEY2"); |
| 652 | if (input_sel & 0x0008) return input_port_read(machine, "KEY3"); |
| 651 | 653 | logerror("CPU #0 PC %06X: unknown input read: %04X\n",activecpu_get_pc(),input_sel); |
| 652 | 654 | return 0xffff; |
| 653 | 655 | } |
| r2956 | r2957 | |
| 792 | 794 | static READ16_HANDLER( srmp4_input_r ) |
| 793 | 795 | { |
| 794 | 796 | UINT16 input_sel = *ssv_input_sel; |
| 795 | | if (input_sel & 0x0002) return input_port_read_indexed(machine, 5); |
| 796 | | if (input_sel & 0x0004) return input_port_read_indexed(machine, 6); |
| 797 | | if (input_sel & 0x0008) return input_port_read_indexed(machine, 7); |
| 798 | | if (input_sel & 0x0010) return input_port_read_indexed(machine, 8); |
| 797 | if (input_sel & 0x0002) return input_port_read(machine, "KEY0"); |
| 798 | if (input_sel & 0x0004) return input_port_read(machine, "KEY1"); |
| 799 | if (input_sel & 0x0008) return input_port_read(machine, "KEY2"); |
| 800 | if (input_sel & 0x0010) return input_port_read(machine, "KEY3"); |
| 799 | 801 | logerror("CPU #0 PC %06X: unknown input read: %04X\n",activecpu_get_pc(),input_sel); |
| 800 | 802 | return 0xffff; |
| 801 | 803 | } |
| r2956 | r2957 | |
| 841 | 843 | static READ16_HANDLER( srmp7_input_r ) |
| 842 | 844 | { |
| 843 | 845 | UINT16 input_sel = *ssv_input_sel; |
| 844 | | if (input_sel & 0x0002) return input_port_read_indexed(machine, 5); |
| 845 | | if (input_sel & 0x0004) return input_port_read_indexed(machine, 6); |
| 846 | | if (input_sel & 0x0008) return input_port_read_indexed(machine, 7); |
| 847 | | if (input_sel & 0x0010) return input_port_read_indexed(machine, 8); |
| 846 | if (input_sel & 0x0002) return input_port_read(machine, "KEY0"); |
| 847 | if (input_sel & 0x0004) return input_port_read(machine, "KEY1"); |
| 848 | if (input_sel & 0x0008) return input_port_read(machine, "KEY2"); |
| 849 | if (input_sel & 0x0010) return input_port_read(machine, "KEY3"); |
| 848 | 850 | logerror("CPU #0 PC %06X: unknown input read: %04X\n",activecpu_get_pc(),input_sel); |
| 849 | 851 | return 0xffff; |
| 850 | 852 | } |
| r2956 | r2957 | |
| 874 | 876 | |
| 875 | 877 | static ADDRESS_MAP_START( survarts_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 876 | 878 | AM_RANGE(0x210000, 0x210001) AM_READ(watchdog_reset16_r ) // Watchdog |
| 877 | | // AM_RANGE(0x290000, 0x290001) AM_READ(SMH_NOP ) // ? |
| 878 | | // AM_RANGE(0x2a0000, 0x2a0001) AM_READ(SMH_NOP ) // ? |
| 879 | // AM_RANGE(0x290000, 0x290001) AM_READ(SMH_NOP ) // ? |
| 880 | // AM_RANGE(0x2a0000, 0x2a0001) AM_READ(SMH_NOP ) // ? |
| 879 | 881 | |
| 880 | | AM_RANGE(0x400000, 0x43ffff) AM_READ(SMH_RAM) // dyna |
| 882 | AM_RANGE(0x400000, 0x43ffff) AM_READ(SMH_RAM) // dyna |
| 881 | 883 | |
| 882 | | AM_RANGE(0x500008, 0x500009) AM_READ(input_port_5_word_r ) // Extra Buttons |
| 884 | AM_RANGE(0x500008, 0x500009) AM_READ_PORT("ADD_BUTTONS") // Extra Buttons |
| 883 | 885 | SSV_READMEM( 0xf00000 ) |
| 884 | 886 | ADDRESS_MAP_END |
| 885 | 887 | static ADDRESS_MAP_START( survarts_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 886 | | // AM_RANGE(0x210002, 0x210003) AM_WRITE(SMH_NOP ) // ? 0,4 at the start |
| 887 | | AM_RANGE(0x400000, 0x43ffff) AM_WRITE(SMH_RAM) // dyna |
| 888 | // AM_RANGE(0x210002, 0x210003) AM_WRITE(SMH_NOP ) // ? 0,4 at the start |
| 889 | AM_RANGE(0x400000, 0x43ffff) AM_WRITE(SMH_RAM) // dyna |
| 888 | 890 | |
| 889 | 891 | SSV_WRITEMEM |
| 890 | 892 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 898 | 900 | |
| 899 | 901 | static READ16_HANDLER( sxyreact_ballswitch_r ) |
| 900 | 902 | { |
| 901 | | return input_port_read_indexed(machine, 5); |
| 903 | return input_port_read_safe(machine, "SERVICE", 0); |
| 902 | 904 | } |
| 903 | 905 | |
| 904 | 906 | static READ16_HANDLER( sxyreact_dial_r ) |
| r2956 | r2957 | |
| 913 | 915 | static int old; |
| 914 | 916 | |
| 915 | 917 | if (data & 0x20) |
| 916 | | serial = input_port_read_indexed(machine, 6) & 0xff; |
| 918 | serial = input_port_read_safe(machine, "PADDLE", 0) & 0xff; |
| 917 | 919 | |
| 918 | 920 | if ( (old & 0x40) && !(data & 0x40) ) // $40 -> $00 |
| 919 | 921 | serial <<= 1; // shift 1 bit |
| r2956 | r2957 | |
| 1071 | 1073 | { |
| 1072 | 1074 | switch(trackball_select) |
| 1073 | 1075 | { |
| 1074 | | case 0x60: return (input_port_read_indexed(machine, 5) >> 8) & 0xff; |
| 1075 | | case 0x40: return (input_port_read_indexed(machine, 5) >> 0) & 0xff; |
| 1076 | case 0x60: return (input_port_read(machine, "TRACKX") >> 8) & 0xff; |
| 1077 | case 0x40: return (input_port_read(machine, "TRACKX") >> 0) & 0xff; |
| 1076 | 1078 | |
| 1077 | | case 0x70: return (input_port_read_indexed(machine, 6) >> 8) & 0xff; |
| 1078 | | case 0x50: return (input_port_read_indexed(machine, 6) >> 0) & 0xff; |
| 1079 | case 0x70: return (input_port_read(machine, "TRACKY") >> 8) & 0xff; |
| 1080 | case 0x50: return (input_port_read(machine, "TRACKY") >> 0) & 0xff; |
| 1079 | 1081 | } |
| 1080 | 1082 | return 0; |
| 1081 | 1083 | } |
| r2956 | r2957 | |
| 1192 | 1194 | PORT_START_TAG("DSW2") // IN1 - $210004 |
| 1193 | 1195 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Modified below */ |
| 1194 | 1196 | |
| 1195 | | PORT_START_TAG("IN2") // IN2 - $210008 |
| 1197 | PORT_START_TAG("P1") // IN2 - $210008 |
| 1196 | 1198 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| 1197 | 1199 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 1198 | 1200 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 1202 | 1204 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 1203 | 1205 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 1204 | 1206 | |
| 1205 | | PORT_START_TAG("IN3") // IN3 - $21000a |
| 1207 | PORT_START_TAG("P2") // IN3 - $21000a |
| 1206 | 1208 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) |
| 1207 | 1209 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 1208 | 1210 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 1212 | 1214 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 1213 | 1215 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 1214 | 1216 | |
| 1215 | | PORT_START_TAG("IN4") // IN4 - $21000c |
| 1217 | PORT_START_TAG("SYSTEM") // IN4 - $21000c |
| 1216 | 1218 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) |
| 1217 | 1219 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10) |
| 1218 | 1220 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1229 | 1231 | static INPUT_PORTS_START( ssv_mahjong ) |
| 1230 | 1232 | PORT_INCLUDE(ssv_joystick) |
| 1231 | 1233 | |
| 1232 | | PORT_START_TAG("IN5") // IN5 - $800002(0) |
| 1234 | PORT_START_TAG("KEY0") // IN5 - $800002(0) |
| 1233 | 1235 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1234 | 1236 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1235 | 1237 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| r2956 | r2957 | |
| 1239 | 1241 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1240 | 1242 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1241 | 1243 | |
| 1242 | | PORT_START_TAG("IN6") // IN6 - $800002(1) |
| 1244 | PORT_START_TAG("KEY1") // IN6 - $800002(1) |
| 1243 | 1245 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1244 | 1246 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 1245 | 1247 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| r2956 | r2957 | |
| 1249 | 1251 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1250 | 1252 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1251 | 1253 | |
| 1252 | | PORT_START_TAG("IN7") // IN7 - $800002(2) |
| 1254 | PORT_START_TAG("KEY2") // IN7 - $800002(2) |
| 1253 | 1255 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) |
| 1254 | 1256 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 1255 | 1257 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| r2956 | r2957 | |
| 1259 | 1261 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1260 | 1262 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1261 | 1263 | |
| 1262 | | PORT_START_TAG("IN8") // IN8 - $800002(3) |
| 1264 | PORT_START_TAG("KEY3") // IN8 - $800002(3) |
| 1263 | 1265 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| 1264 | 1266 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 1265 | 1267 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| r2956 | r2957 | |
| 1296 | 1298 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) /* 8 sec */ |
| 1297 | 1299 | PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Modified below */ |
| 1298 | 1300 | |
| 1299 | | PORT_START_TAG("IN2") // IN2 - $210008 |
| 1301 | PORT_START_TAG("P1") // IN2 - $210008 |
| 1300 | 1302 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| 1301 | 1303 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1302 | 1304 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1306 | 1308 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 1307 | 1309 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1308 | 1310 | |
| 1309 | | PORT_START_TAG("IN3") // IN3 - $21000a |
| 1311 | PORT_START_TAG("P2") // IN3 - $21000a |
| 1310 | 1312 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) |
| 1311 | 1313 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1312 | 1314 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1316 | 1318 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1317 | 1319 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1318 | 1320 | |
| 1319 | | PORT_START_TAG("IN4") // IN4 - $21000c |
| 1321 | PORT_START_TAG("SYSTEM") // IN4 - $21000c |
| 1320 | 1322 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) |
| 1321 | 1323 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10) |
| 1322 | 1324 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1486 | 1488 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1487 | 1489 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "DSW2:8" ) |
| 1488 | 1490 | |
| 1489 | | PORT_START // IN5 - trackball x ($d00000) |
| 1491 | PORT_START_TAG("TRACKX") // IN5 - trackball x ($d00000) |
| 1490 | 1492 | PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_RESET PORT_PLAYER(1) |
| 1491 | 1493 | |
| 1492 | | PORT_START // IN6 - trackball y ($d00000) |
| 1494 | PORT_START_TAG("TRACKY") // IN6 - trackball y ($d00000) |
| 1493 | 1495 | PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_RESET PORT_PLAYER(1) |
| 1494 | 1496 | INPUT_PORTS_END |
| 1495 | 1497 | |
| r2956 | r2957 | |
| 1552 | 1554 | PORT_DIPSETTING( 0x0080, "Light" ) |
| 1553 | 1555 | PORT_DIPSETTING( 0x0000, "Heavy" ) |
| 1554 | 1556 | |
| 1555 | | PORT_START // IN5 - $540000(0) |
| 1557 | PORT_START_TAG("GUNX1") // IN5 - $540000(0) |
| 1556 | 1558 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 1557 | 1559 | |
| 1558 | | PORT_START // IN6 - $540000(1) |
| 1560 | PORT_START_TAG("GUNY1") // IN6 - $540000(1) |
| 1559 | 1561 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 1560 | 1562 | |
| 1561 | | PORT_START // IN7 - $540000(2) |
| 1563 | PORT_START_TAG("GUNX2") // IN7 - $540000(2) |
| 1562 | 1564 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 1563 | 1565 | |
| 1564 | | PORT_START // IN8 - $540000(3) |
| 1566 | PORT_START_TAG("GUNY2") // IN8 - $540000(3) |
| 1565 | 1567 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(35) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 1566 | 1568 | INPUT_PORTS_END |
| 1567 | 1569 | |
| r2956 | r2957 | |
| 1571 | 1573 | ***************************************************************************/ |
| 1572 | 1574 | |
| 1573 | 1575 | static INPUT_PORTS_START( hypreact ) |
| 1574 | | PORT_START // IN0 - $210002 |
| 1576 | PORT_START_TAG("DSW1") // IN0 - $210002 |
| 1575 | 1577 | SSV_COINAGE_STANDARD( 0, 0x07, DEF_STR( Coin_A ), "DSWA:1,2,3" ) |
| 1576 | 1578 | SSV_COINAGE_STANDARD( 3, 0x07, DEF_STR( Coin_B ), "DSWA:4,5,6" ) |
| 1577 | 1579 | PORT_DIPNAME( 0x0040, 0x0040, "Half Coins To Continue" ) PORT_DIPLOCATION( "DSWA:7" ) |
| r2956 | r2957 | |
| 1581 | 1583 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 1582 | 1584 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1583 | 1585 | |
| 1584 | | PORT_START // IN1 - $210004 |
| 1586 | PORT_START_TAG("DSW2") // IN1 - $210004 |
| 1585 | 1587 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION( "DSWB:1" ) |
| 1586 | 1588 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 1587 | 1589 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1596 | 1598 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Controls ) ) PORT_DIPLOCATION( "DSWB:5" ) |
| 1597 | 1599 | PORT_DIPSETTING( 0x0010, "Keyboard" ) |
| 1598 | 1600 | PORT_DIPSETTING( 0x0000, DEF_STR( Joystick ) ) |
| 1599 | | PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "DSWB:6" ) |
| 1600 | | PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "DSWB:7" ) |
| 1601 | PORT_DIPNAME( 0x0020, 0x0020, "Multiple coins" ) PORT_DIPLOCATION( "DSWB:6" ) |
| 1602 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 1603 | PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) |
| 1604 | PORT_DIPNAME( 0x0040, 0x0040, "Keep Status On Continue" ) PORT_DIPLOCATION( "DSWB:7" ) |
| 1605 | PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) |
| 1606 | PORT_DIPSETTING( 0x0040, DEF_STR( Yes ) ) |
| 1601 | 1607 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "DSWB:8" ) |
| 1602 | 1608 | |
| 1603 | | PORT_START // IN2 - $210008 (used in joystick mode) |
| 1609 | PORT_START_TAG("P1") // IN2 - $210008 (used in joystick mode) |
| 1604 | 1610 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| 1605 | 1611 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 1606 | 1612 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| r2956 | r2957 | |
| 1610 | 1616 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 1611 | 1617 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| 1612 | 1618 | |
| 1613 | | PORT_START // IN3 - $21000a (used in joystick mode) |
| 1619 | PORT_START_TAG("P2") // IN3 - $21000a (used in joystick mode) |
| 1614 | 1620 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) |
| 1615 | 1621 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 1616 | 1622 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| r2956 | r2957 | |
| 1620 | 1626 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1621 | 1627 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1622 | 1628 | |
| 1623 | | PORT_START // IN4 - $21000c |
| 1629 | PORT_START_TAG("SYSTEM") // IN4 - $21000c |
| 1624 | 1630 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) |
| 1625 | 1631 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10) |
| 1626 | 1632 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service coin & bet |
| 1627 | 1633 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 1628 | 1634 | PORT_BIT( 0x00f0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1629 | 1635 | |
| 1630 | | PORT_START // IN5 - $c00000(0) |
| 1636 | PORT_START_TAG("KEY0") // IN5 - $c00000(0) |
| 1631 | 1637 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 1632 | 1638 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 1633 | 1639 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 1634 | 1640 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 1635 | 1641 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 1636 | 1642 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) |
| 1637 | | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1643 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1638 | 1644 | |
| 1639 | | PORT_START // IN6 - $c00000(1) |
| 1645 | PORT_START_TAG("KEY1") // IN6 - $c00000(1) |
| 1640 | 1646 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 1641 | 1647 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 1642 | 1648 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 1643 | 1649 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 1644 | 1650 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 1645 | 1651 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) |
| 1646 | | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1652 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1647 | 1653 | |
| 1648 | | PORT_START // IN7 - $c00000(2) |
| 1654 | PORT_START_TAG("KEY2") // IN7 - $c00000(2) |
| 1649 | 1655 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 1650 | 1656 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 1651 | 1657 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 1652 | 1658 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 1653 | 1659 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 1654 | | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1660 | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1655 | 1661 | |
| 1656 | | PORT_START // IN8 - $c00000(3) |
| 1662 | PORT_START_TAG("KEY3") // IN8 - $c00000(3) |
| 1657 | 1663 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 1658 | 1664 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 1659 | 1665 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 1660 | 1666 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 1661 | | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1667 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1662 | 1668 | INPUT_PORTS_END |
| 1663 | 1669 | |
| 1664 | 1670 | |
| r2956 | r2957 | |
| 1702 | 1708 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 1703 | 1709 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "DSWB:8" ) |
| 1704 | 1710 | |
| 1705 | | PORT_START // IN5 - $500000(0) |
| 1711 | PORT_START_TAG("KEY0") // IN5 - $500000(0) |
| 1706 | 1712 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 1707 | 1713 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 1708 | 1714 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 1709 | 1715 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 1710 | 1716 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 1711 | 1717 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) |
| 1712 | | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1718 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1713 | 1719 | |
| 1714 | | PORT_START // IN6 - $500000(1) |
| 1720 | PORT_START_TAG("KEY1") // IN6 - $500000(1) |
| 1715 | 1721 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 1716 | 1722 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 1717 | 1723 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 1718 | 1724 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 1719 | 1725 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 1720 | | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1726 | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1721 | 1727 | |
| 1722 | | PORT_START // IN7 - $500000(2) |
| 1728 | PORT_START_TAG("KEY2") // IN7 - $500000(2) |
| 1723 | 1729 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 1724 | 1730 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 1725 | 1731 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 1726 | 1732 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 1727 | 1733 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 1728 | | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1734 | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1729 | 1735 | |
| 1730 | | PORT_START // IN8 - $500000(3) |
| 1736 | PORT_START_TAG("KEY3") // IN8 - $500000(3) |
| 1731 | 1737 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 1732 | 1738 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 1733 | 1739 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 1734 | 1740 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 1735 | | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1741 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1736 | 1742 | INPUT_PORTS_END |
| 1737 | 1743 | |
| 1738 | 1744 | |
| r2956 | r2957 | |
| 1961 | 1967 | ***************************************************************************/ |
| 1962 | 1968 | |
| 1963 | 1969 | static INPUT_PORTS_START( meosism ) |
| 1964 | | PORT_START // IN0 - $210002 |
| 1970 | PORT_START_TAG("DSW1") // IN0 - $210002 |
| 1965 | 1971 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "DSW1:1,2" ) |
| 1966 | 1972 | PORT_DIPSETTING( 0x0003, "1 Medal/1 Credit" ) |
| 1967 | 1973 | PORT_DIPSETTING( 0x0001, "1 Medal/5 Credits" ) |
| r2956 | r2957 | |
| 1986 | 1992 | PORT_DIPSETTING( 0x0080, DEF_STR( Low ) ) |
| 1987 | 1993 | PORT_DIPSETTING( 0x0000, DEF_STR( High ) ) |
| 1988 | 1994 | |
| 1989 | | PORT_START // IN1 - $210004 |
| 1995 | PORT_START_TAG("DSW2") // IN1 - $210004 |
| 1990 | 1996 | PORT_DIPNAME( 0x0003, 0x0003, "Game Rate" ) PORT_DIPLOCATION( "DSW2:1,2" ) |
| 1991 | 1997 | PORT_DIPSETTING( 0x0000, "80%" ) |
| 1992 | 1998 | PORT_DIPSETTING( 0x0002, "85%" ) |
| r2956 | r2957 | |
| 2005 | 2011 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 2006 | 2012 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 2007 | 2013 | |
| 2008 | | PORT_START // IN2 - $210008 |
| 2014 | PORT_START_TAG("P1") // IN2 - $210008 |
| 2009 | 2015 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) //bet |
| 2010 | 2016 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) //stop/r |
| 2011 | 2017 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) //stop/c |
| r2956 | r2957 | |
| 2015 | 2021 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) //start |
| 2016 | 2022 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| 2017 | 2023 | |
| 2018 | | PORT_START // IN3 - $21000a |
| 2024 | PORT_START_TAG("P2") // IN3 - $21000a |
| 2019 | 2025 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| 2020 | 2026 | PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW ) |
| 2021 | 2027 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| r2956 | r2957 | |
| 2025 | 2031 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| 2026 | 2032 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) //- |
| 2027 | 2033 | |
| 2028 | | PORT_START // IN4 - $21000c |
| 2034 | PORT_START_TAG("SYSTEM") // IN4 - $21000c |
| 2029 | 2035 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) |
| 2030 | 2036 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10) |
| 2031 | 2037 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) //service coin |
| r2956 | r2957 | |
| 2151 | 2157 | ***************************************************************************/ |
| 2152 | 2158 | |
| 2153 | 2159 | static INPUT_PORTS_START( srmp7 ) |
| 2154 | | PORT_START // IN0 - $210002 |
| 2160 | PORT_START_TAG("DSW1") // IN0 - $210002 |
| 2155 | 2161 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "DSW1:1,2,3" ) |
| 2156 | 2162 | PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) |
| 2157 | 2163 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| r2956 | r2957 | |
| 2171 | 2177 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 2172 | 2178 | PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) |
| 2173 | 2179 | |
| 2174 | | PORT_START // IN1 - $210004 |
| 2180 | PORT_START_TAG("DSW2") // IN1 - $210004 |
| 2175 | 2181 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Difficulty ) ) PORT_DIPLOCATION( "DSW2:1,2,3" ) |
| 2176 | 2182 | PORT_DIPSETTING( 0x0006, DEF_STR( Easiest ) ) |
| 2177 | 2183 | PORT_DIPSETTING( 0x0005, DEF_STR( Easier ) ) |
| r2956 | r2957 | |
| 2195 | 2201 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 2196 | 2202 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "DSW2:8" ) |
| 2197 | 2203 | |
| 2198 | | PORT_START // IN2 - $210008 |
| 2204 | PORT_START_TAG("P1") // IN2 - $210008 |
| 2199 | 2205 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2200 | 2206 | |
| 2201 | | PORT_START // IN3 - $21000a |
| 2207 | PORT_START_TAG("P2") // IN3 - $21000a |
| 2202 | 2208 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2203 | 2209 | |
| 2204 | | PORT_START // IN4 - $21000c |
| 2210 | PORT_START_TAG("SYSTEM") // IN4 - $21000c |
| 2205 | 2211 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(10) |
| 2206 | 2212 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(10) |
| 2207 | 2213 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 2209 | 2215 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // tested |
| 2210 | 2216 | PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2211 | 2217 | |
| 2212 | | PORT_START // IN6 - $600000(0) |
| 2218 | PORT_START_TAG("KEY0") // IN6 - $600000(0) |
| 2213 | 2219 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2214 | 2220 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 2215 | 2221 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| r2956 | r2957 | |
| 2219 | 2225 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2220 | 2226 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2221 | 2227 | |
| 2222 | | PORT_START // IN7 - $600000(1) |
| 2228 | PORT_START_TAG("KEY1") // IN7 - $600000(1) |
| 2223 | 2229 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2224 | 2230 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 2225 | 2231 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| r2956 | r2957 | |
| 2229 | 2235 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2230 | 2236 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2231 | 2237 | |
| 2232 | | PORT_START // IN8 - $600000(2) |
| 2238 | PORT_START_TAG("KEY2") // IN8 - $600000(2) |
| 2233 | 2239 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| 2234 | 2240 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 2235 | 2241 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| r2956 | r2957 | |
| 2239 | 2245 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2240 | 2246 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2241 | 2247 | |
| 2242 | | PORT_START // IN5 - $600000(3) |
| 2248 | PORT_START_TAG("KEY3") // IN5 - $600000(3) |
| 2243 | 2249 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2244 | 2250 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2245 | 2251 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| r2956 | r2957 | |
| 2327 | 2333 | PORT_DIPSETTING( 0x0080, "Heavy" ) |
| 2328 | 2334 | PORT_DIPSETTING( 0x0000, "Heaviest" ) |
| 2329 | 2335 | |
| 2330 | | PORT_START // IN5 - $500008 |
| 2336 | PORT_START_TAG("ADD_BUTTONS") // IN5 - $500008 |
| 2331 | 2337 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2332 | 2338 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 2333 | 2339 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2380 | 2386 | PORT_SERVICE_DIPLOC( 0x0040, IP_ACTIVE_LOW, "DSW2:7" ) |
| 2381 | 2387 | PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "DSW2:8" ) |
| 2382 | 2388 | |
| 2383 | | PORT_START // IN5 - $500002 |
| 2389 | PORT_START_TAG("SERVICE") // IN5 - $500002 |
| 2384 | 2390 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SERVICE2 ) // ball switch on -> handle motor off |
| 2385 | 2391 | |
| 2386 | | PORT_START // IN6 - $500004 |
| 2392 | PORT_START_TAG("PADDLE") // IN6 - $500004 |
| 2387 | 2393 | PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_MINMAX(0,0xcf) PORT_SENSITIVITY(15) PORT_KEYDELTA(15) PORT_CENTERDELTA(0) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) |
| 2388 | 2394 | INPUT_PORTS_END |
| 2389 | 2395 | |
| r2956 | r2957 | |
| 2425 | 2431 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 2426 | 2432 | PORT_SERVICE_DIPLOC( 0x0080, IP_ACTIVE_LOW, "DSW2:8" ) |
| 2427 | 2433 | |
| 2428 | | PORT_MODIFY("IN4") // IN4 - $21000c |
| 2434 | PORT_MODIFY("SYSTEM") // IN4 - $21000c |
| 2429 | 2435 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 2430 | 2436 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE4 ) |
| 2431 | 2437 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START3 ) |
src/mame/drivers/seta.c
| r2956 | r2957 | |
| 1522 | 1522 | /* DSW reading for 16 bit CPUs */ |
| 1523 | 1523 | static READ16_HANDLER( seta_dsw_r ) |
| 1524 | 1524 | { |
| 1525 | | UINT16 dsw = input_port_read_indexed(machine, 3); |
| 1525 | UINT16 dsw = input_port_read(machine, "DSW"); |
| 1526 | 1526 | if (offset == 0) return (dsw >> 8) & 0xff; |
| 1527 | 1527 | else return (dsw >> 0) & 0xff; |
| 1528 | 1528 | } |
| r2956 | r2957 | |
| 1532 | 1532 | |
| 1533 | 1533 | static READ8_HANDLER( dsw1_r ) |
| 1534 | 1534 | { |
| 1535 | | return (input_port_read_indexed(machine, 3) >> 8) & 0xff; |
| 1535 | return (input_port_read(machine, "DSW") >> 8) & 0xff; |
| 1536 | 1536 | } |
| 1537 | 1537 | |
| 1538 | 1538 | static READ8_HANDLER( dsw2_r ) |
| 1539 | 1539 | { |
| 1540 | | return (input_port_read_indexed(machine, 3) >> 0) & 0xff; |
| 1540 | return (input_port_read(machine, "DSW") >> 0) & 0xff; |
| 1541 | 1541 | } |
| 1542 | 1542 | |
| 1543 | 1543 | |
| r2956 | r2957 | |
| 1621 | 1621 | AM_RANGE(0x000000, 0x09ffff) AM_READ(SMH_ROM ) // ROM |
| 1622 | 1622 | AM_RANGE(0x100000, 0x103fff) AM_READ(seta_sound_word_r ) // Sound |
| 1623 | 1623 | AM_RANGE(0x200000, 0x200001) AM_READ(SMH_NOP ) // watchdog? (twineagl) |
| 1624 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1624 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1625 | 1625 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // Palette |
| 1626 | 1626 | AM_RANGE(0x900000, 0x901fff) AM_READ(SMH_RAM ) // VRAM |
| 1627 | 1627 | AM_RANGE(0x902000, 0x903fff) AM_READ(SMH_RAM ) // VRAM |
| r2956 | r2957 | |
| 1635 | 1635 | AM_RANGE(0x000000, 0x09ffff) AM_WRITE(SMH_ROM ) // ROM |
| 1636 | 1636 | AM_RANGE(0x100000, 0x103fff) AM_WRITE(seta_sound_word_w ) // Sound |
| 1637 | 1637 | AM_RANGE(0x200000, 0x200001) AM_WRITE(SMH_NOP ) // watchdog? |
| 1638 | | AM_RANGE(0x300000, 0x300001) AM_WRITE(SMH_NOP ) // IRQ enable/acknowledge? |
| 1638 | AM_RANGE(0x300000, 0x300001) AM_WRITE(SMH_NOP ) // IRQ enable/acknowledge? |
| 1639 | 1639 | AM_RANGE(0x400000, 0x400007) AM_WRITE(twineagl_tilebank_w ) // special tile banking to animate water in twineagl |
| 1640 | 1640 | AM_RANGE(0x500000, 0x500001) AM_WRITE(SMH_NOP ) // ? |
| 1641 | 1641 | AM_RANGE(0x700000, 0x7003ff) AM_WRITE(SMH_RAM) AM_BASE(&paletteram16 ) AM_SIZE(&seta_paletteram_size) // Palette |
| r2956 | r2957 | |
| 1656 | 1656 | |
| 1657 | 1657 | static READ16_HANDLER ( calibr50_ip_r ) |
| 1658 | 1658 | { |
| 1659 | | int dir1 = input_port_read(machine, "IN4") & 0xfff; // analog port |
| 1660 | | int dir2 = input_port_read(machine, "IN5") & 0xfff; // analog port |
| 1659 | int dir1 = input_port_read(machine, "ROT1") & 0xfff; // analog port |
| 1660 | int dir2 = input_port_read(machine, "ROT2") & 0xfff; // analog port |
| 1661 | 1661 | |
| 1662 | 1662 | switch (offset) |
| 1663 | 1663 | { |
| 1664 | | case 0x00/2: return input_port_read(machine, "IN0"); // p1 |
| 1665 | | case 0x02/2: return input_port_read(machine, "IN1"); // p2 |
| 1664 | case 0x00/2: return input_port_read(machine, "P1"); // p1 |
| 1665 | case 0x02/2: return input_port_read(machine, "P2"); // p2 |
| 1666 | 1666 | |
| 1667 | | case 0x08/2: return input_port_read_indexed(machine, 2); // Coins |
| 1667 | case 0x08/2: return input_port_read(machine, "COINS"); // Coins |
| 1668 | 1668 | |
| 1669 | 1669 | case 0x10/2: return (dir1&0xff); // lower 8 bits of p1 rotation |
| 1670 | 1670 | case 0x12/2: return (dir1>>8); // upper 4 bits of p1 rotation |
| r2956 | r2957 | |
| 1693 | 1693 | AM_RANGE(0x100000, 0x100007) AM_READ(SMH_NOP ) // ? (same as a00010-a00017?) |
| 1694 | 1694 | AM_RANGE(0x200000, 0x200fff) AM_READ(SMH_RAM ) // NVRAM |
| 1695 | 1695 | AM_RANGE(0x300000, 0x300001) AM_READ(SMH_NOP ) // ? (value's read but not used) |
| 1696 | | AM_RANGE(0x400000, 0x400001) AM_READ(watchdog_reset16_r ) // Watchdog |
| 1697 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1696 | AM_RANGE(0x400000, 0x400001) AM_READ(watchdog_reset16_r ) // Watchdog |
| 1697 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1698 | 1698 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // Palette |
| 1699 | 1699 | AM_RANGE(0x900000, 0x901fff) AM_READ(SMH_RAM ) // VRAM |
| 1700 | 1700 | AM_RANGE(0x902000, 0x903fff) AM_READ(SMH_RAM ) // VRAM |
| r2956 | r2957 | |
| 1702 | 1702 | AM_RANGE(0xa00000, 0xa00019) AM_READ(calibr50_ip_r ) // Input Ports |
| 1703 | 1703 | /**/AM_RANGE(0xd00000, 0xd00607) AM_READ(SMH_RAM ) // Sprites Y |
| 1704 | 1704 | AM_RANGE(0xe00000, 0xe03fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| 1705 | | AM_RANGE(0xb00000, 0xb00001) AM_READ(soundlatch2_word_r ) // From Sub CPU |
| 1705 | AM_RANGE(0xb00000, 0xb00001) AM_READ(soundlatch2_word_r ) // From Sub CPU |
| 1706 | 1706 | /**/AM_RANGE(0xc00000, 0xc00001) AM_READ(SMH_RAM ) // ? $4000 |
| 1707 | 1707 | ADDRESS_MAP_END |
| 1708 | 1708 | |
| r2956 | r2957 | |
| 1825 | 1825 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 1826 | 1826 | AM_RANGE(0x900000, 0x9fffff) AM_READ(SMH_RAM ) // RAM |
| 1827 | 1827 | AM_RANGE(0x100000, 0x103fff) AM_READ(seta_sound_word_r ) // Sound |
| 1828 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1828 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1829 | 1829 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // Palette |
| 1830 | 1830 | AM_RANGE(0xa00000, 0xa00607) AM_READ(SMH_RAM ) // Sprites Y |
| 1831 | | AM_RANGE(0xb00000, 0xb00001) AM_READ(input_port_0_word_r ) // P1 |
| 1832 | | AM_RANGE(0xb00002, 0xb00003) AM_READ(input_port_1_word_r ) // P2 |
| 1833 | | AM_RANGE(0xb00004, 0xb00005) AM_READ(input_port_2_word_r ) // Coins |
| 1831 | AM_RANGE(0xb00000, 0xb00001) AM_READ_PORT("P1") // P1 |
| 1832 | AM_RANGE(0xb00002, 0xb00003) AM_READ_PORT("P2") // P2 |
| 1833 | AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS") // Coins |
| 1834 | 1834 | /**/AM_RANGE(0xc00000, 0xc00001) AM_READ(SMH_RAM ) // ? 0x4000 |
| 1835 | 1835 | AM_RANGE(0xe00000, 0xe03fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| 1836 | 1836 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 1858 | 1858 | AM_RANGE(0x210000, 0x21ffff) AM_READ(SMH_RAM ) // RAM (gundhara) |
| 1859 | 1859 | AM_RANGE(0x300000, 0x30ffff) AM_READ(SMH_RAM ) // RAM (wrofaero only?) |
| 1860 | 1860 | AM_RANGE(0x500000, 0x500005) AM_READ(SMH_RAM ) // (gundhara) |
| 1861 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 1862 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 1863 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 1864 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1861 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 1862 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 1863 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 1864 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1865 | 1865 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // (rezon,jjsquawk) |
| 1866 | 1866 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 1867 | 1867 | AM_RANGE(0x701000, 0x70ffff) AM_READ(SMH_RAM ) // |
| r2956 | r2957 | |
| 1913 | 1913 | AM_RANGE(0x210000, 0x21ffff) AM_READ(SMH_RAM ) // RAM (gundhara) |
| 1914 | 1914 | AM_RANGE(0x300000, 0x30ffff) AM_READ(SMH_RAM ) // RAM (wrofaero only?) |
| 1915 | 1915 | AM_RANGE(0x500000, 0x500005) AM_READ(SMH_RAM ) // (gundhara) |
| 1916 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 1917 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 1918 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 1919 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1916 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 1917 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 1918 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 1919 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 1920 | 1920 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // (rezon,jjsquawk) |
| 1921 | 1921 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 1922 | 1922 | AM_RANGE(0x701000, 0x70ffff) AM_READ(SMH_RAM ) // |
| r2956 | r2957 | |
| 1966 | 1966 | |
| 1967 | 1967 | static READ16_HANDLER( zombraid_gun_r ) // Serial interface |
| 1968 | 1968 | { |
| 1969 | | int data = input_port_read_indexed(machine, 4 + gun_input_src); // Input Ports 5-8 |
| 1969 | static const char *portnames[] = { "GUNX1", "GUNY1", "GUNX2", "GUNY2" }; |
| 1970 | |
| 1971 | int data = input_port_read(machine, portnames[gun_input_src]); // Input Ports 5-8 |
| 1970 | 1972 | return (data >> gun_input_bit) & 1; |
| 1971 | 1973 | } |
| 1972 | 1974 | |
| r2956 | r2957 | |
| 2009 | 2011 | AM_RANGE(0x210000, 0x21ffff) AM_READ(SMH_RAM ) // RAM (gundhara) |
| 2010 | 2012 | AM_RANGE(0x300000, 0x30ffff) AM_READ(SMH_RAM ) // RAM (wrofaero only?) |
| 2011 | 2013 | AM_RANGE(0x500000, 0x500005) AM_READ(SMH_RAM ) // (gundhara) |
| 2012 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2013 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2014 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2015 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2014 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2015 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2016 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2017 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2016 | 2018 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // (rezon,jjsquawk) |
| 2017 | 2019 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 2018 | 2020 | AM_RANGE(0x701000, 0x70ffff) AM_READ(SMH_RAM ) // |
| r2956 | r2957 | |
| 2065 | 2067 | AM_RANGE(0xf00000, 0xf0ffff) AM_READ(SMH_RAM ) // RAM |
| 2066 | 2068 | AM_RANGE(0x100000, 0x100001) AM_READ(SMH_NOP ) // ? |
| 2067 | 2069 | AM_RANGE(0x200000, 0x200001) AM_READ(SMH_NOP ) // ? |
| 2068 | | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2069 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 |
| 2070 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 |
| 2071 | | AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // Coins |
| 2070 | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2071 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 2072 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 2073 | AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins |
| 2072 | 2074 | //AM_RANGE(0x600000, 0x60000f) AM_READ(krzybowl_input_r ) // P1 |
| 2073 | 2075 | AM_RANGE(0x8000f0, 0x8000f1) AM_READ(SMH_RAM ) // NVRAM |
| 2074 | 2076 | AM_RANGE(0x800100, 0x8001ff) AM_READ(SMH_RAM ) // NVRAM |
| r2956 | r2957 | |
| 2103 | 2105 | AM_RANGE(0xf00000, 0xf03fff) AM_READ(SMH_RAM ) // RAM |
| 2104 | 2106 | AM_RANGE(0xf04000, 0xf041ff) AM_READ(SMH_RAM ) // Backup RAM? |
| 2105 | 2107 | AM_RANGE(0xf05000, 0xf050ff) AM_READ(SMH_RAM ) // Backup RAM? |
| 2106 | | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2107 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 |
| 2108 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 |
| 2109 | | AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // Coins |
| 2108 | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2109 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 2110 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 2111 | AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins |
| 2110 | 2112 | AM_RANGE(0xa00000, 0xa03fff) AM_READ(seta_sound_word_r ) // Sound |
| 2111 | 2113 | AM_RANGE(0xb00000, 0xb003ff) AM_READ(SMH_RAM ) // Palette |
| 2112 | 2114 | AM_RANGE(0xc00000, 0xc03fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| r2956 | r2957 | |
| 2138 | 2140 | static ADDRESS_MAP_START( daioh_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2139 | 2141 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 2140 | 2142 | AM_RANGE(0x100000, 0x10ffff) AM_READ(SMH_RAM ) // RAM |
| 2141 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2142 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2143 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2144 | | AM_RANGE(0x500006, 0x500007) AM_READ(input_port_4_word_r ) // Buttons 4,5,6 |
| 2145 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2143 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2144 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2145 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2146 | AM_RANGE(0x500006, 0x500007) AM_READ_PORT("EXTRA") // Buttons 4,5,6 |
| 2147 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2146 | 2148 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) |
| 2147 | 2149 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 2148 | 2150 | AM_RANGE(0x701000, 0x70ffff) AM_READ(SMH_RAM ) |
| r2956 | r2957 | |
| 2190 | 2192 | AM_RANGE(0xf00000, 0xf0ffff) AM_READ(SMH_RAM ) // RAM (qzkklogy) |
| 2191 | 2193 | AM_RANGE(0xffc000, 0xffffff) AM_READ(SMH_RAM ) // RAM (drgnunit,stg) |
| 2192 | 2194 | AM_RANGE(0x100000, 0x103fff) AM_READ(seta_sound_word_r ) // Sound |
| 2193 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2195 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2194 | 2196 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // Palette |
| 2195 | 2197 | AM_RANGE(0x900000, 0x901fff) AM_READ(SMH_RAM ) // VRAM |
| 2196 | 2198 | AM_RANGE(0x902000, 0x903fff) AM_READ(SMH_RAM ) // VRAM |
| 2197 | | AM_RANGE(0xb00000, 0xb00001) AM_READ(input_port_0_word_r ) // P1 |
| 2198 | | AM_RANGE(0xb00002, 0xb00003) AM_READ(input_port_1_word_r ) // P2 |
| 2199 | | AM_RANGE(0xb00004, 0xb00005) AM_READ(input_port_2_word_r ) // Coins |
| 2199 | AM_RANGE(0xb00000, 0xb00001) AM_READ_PORT("P1") // P1 |
| 2200 | AM_RANGE(0xb00002, 0xb00003) AM_READ_PORT("P2") // P2 |
| 2201 | AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS") // Coins |
| 2200 | 2202 | AM_RANGE(0xb00006, 0xb00007) AM_READ(SMH_NOP ) // unused (qzkklogy) |
| 2201 | 2203 | /**/AM_RANGE(0xc00000, 0xc00001) AM_READ(SMH_RAM ) // ? $4000 |
| 2202 | 2204 | /**/AM_RANGE(0xd00000, 0xd00607) AM_READ(SMH_RAM ) // Sprites Y |
| r2956 | r2957 | |
| 2230 | 2232 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 2231 | 2233 | AM_RANGE(0x210000, 0x21ffff) AM_READ(SMH_RAM ) // RAM |
| 2232 | 2234 | AM_RANGE(0x220000, 0x23ffff) AM_READ(SMH_RAM ) // RAM (sokonuke) |
| 2233 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2234 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2235 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2236 | | AM_RANGE(0x400008, 0x40000b) AM_READ(seta_dsw_r ) // DSW |
| 2237 | | AM_RANGE(0x40000c, 0x40000d) AM_READ(watchdog_reset16_r ) // Watchdog (extdwnhl, MUST RETURN $FFFF) |
| 2235 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2236 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2237 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2238 | AM_RANGE(0x400008, 0x40000b) AM_READ(seta_dsw_r ) // DSW |
| 2239 | AM_RANGE(0x40000c, 0x40000d) AM_READ(watchdog_reset16_r ) // Watchdog (extdwnhl, MUST RETURN $FFFF) |
| 2238 | 2240 | AM_RANGE(0x500004, 0x500007) AM_READ(SMH_NOP ) // IRQ Ack (extdwnhl) |
| 2239 | 2241 | AM_RANGE(0x600400, 0x600fff) AM_READ(SMH_RAM ) // Palette |
| 2240 | 2242 | AM_RANGE(0x601000, 0x610bff) AM_READ(SMH_RAM ) // |
| r2956 | r2957 | |
| 2281 | 2283 | static ADDRESS_MAP_START( kamenrid_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2282 | 2284 | AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM ) // ROM |
| 2283 | 2285 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // ROM |
| 2284 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 |
| 2285 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 |
| 2286 | | AM_RANGE(0x500004, 0x500007) AM_READ(seta_dsw_r ) // DSW |
| 2287 | | AM_RANGE(0x500008, 0x500009) AM_READ(input_port_2_word_r ) // Coins |
| 2288 | | AM_RANGE(0x50000c, 0x50000d) AM_READ(watchdog_reset16_r ) // xx Watchdog? |
| 2286 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 2287 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 2288 | AM_RANGE(0x500004, 0x500007) AM_READ(seta_dsw_r ) // DSW |
| 2289 | AM_RANGE(0x500008, 0x500009) AM_READ_PORT("COINS") // Coins |
| 2290 | AM_RANGE(0x50000c, 0x50000d) AM_READ(watchdog_reset16_r ) // xx Watchdog? |
| 2289 | 2291 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // Palette |
| 2290 | 2292 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 2291 | 2293 | AM_RANGE(0x701000, 0x703fff) AM_READ(SMH_RAM ) // Palette |
| r2956 | r2957 | |
| 2332 | 2334 | static ADDRESS_MAP_START( madshark_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2333 | 2335 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 2334 | 2336 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // ROM |
| 2335 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 |
| 2336 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 |
| 2337 | | AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // Coins |
| 2338 | | AM_RANGE(0x500008, 0x50000b) AM_READ(seta_dsw_r ) // DSW |
| 2337 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 2338 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 2339 | AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins |
| 2340 | AM_RANGE(0x500008, 0x50000b) AM_READ(seta_dsw_r ) // DSW |
| 2339 | 2341 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 2340 | 2342 | AM_RANGE(0x800000, 0x801fff) AM_READ(SMH_RAM ) // VRAM 0 |
| 2341 | 2343 | AM_RANGE(0x802000, 0x803fff) AM_READ(SMH_RAM ) // VRAM 1 |
| r2956 | r2957 | |
| 2377 | 2379 | static READ16_HANDLER( krzybowl_input_r ) |
| 2378 | 2380 | { |
| 2379 | 2381 | // analog ports |
| 2380 | | int dir1x = input_port_read_indexed(machine, 4) & 0xfff; |
| 2381 | | int dir1y = input_port_read_indexed(machine, 5) & 0xfff; |
| 2382 | | int dir2x = input_port_read_indexed(machine, 6) & 0xfff; |
| 2383 | | int dir2y = input_port_read_indexed(machine, 7) & 0xfff; |
| 2382 | int dir1x = input_port_read(machine, "TRACK1_X") & 0xfff; |
| 2383 | int dir1y = input_port_read(machine, "TRACK1_Y") & 0xfff; |
| 2384 | int dir2x = input_port_read(machine, "TRACK2_X") & 0xfff; |
| 2385 | int dir2y = input_port_read(machine, "TRACK2_Y") & 0xfff; |
| 2384 | 2386 | |
| 2385 | 2387 | switch (offset) |
| 2386 | 2388 | { |
| r2956 | r2957 | |
| 2403 | 2405 | AM_RANGE(0xf00000, 0xf0ffff) AM_READ(SMH_RAM ) // RAM |
| 2404 | 2406 | AM_RANGE(0x100000, 0x100001) AM_READ(SMH_NOP ) // ? |
| 2405 | 2407 | AM_RANGE(0x200000, 0x200001) AM_READ(SMH_NOP ) // ? |
| 2406 | | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2407 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 |
| 2408 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 |
| 2409 | | AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // Coins |
| 2408 | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2409 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 2410 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 2411 | AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins |
| 2410 | 2412 | AM_RANGE(0x600000, 0x60000f) AM_READ(krzybowl_input_r ) // P1 |
| 2411 | 2413 | AM_RANGE(0x8000f0, 0x8000f1) AM_READ(SMH_RAM ) // NVRAM |
| 2412 | 2414 | AM_RANGE(0x800100, 0x8001ff) AM_READ(SMH_RAM ) // NVRAM |
| r2956 | r2957 | |
| 2452 | 2454 | AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM ) // ROM |
| 2453 | 2455 | AM_RANGE(0x100000, 0x1fffff) AM_READ(SMH_ROM ) // ROM |
| 2454 | 2456 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 2455 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2456 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2457 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2458 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2457 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2458 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2459 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2460 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2459 | 2461 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 2460 | 2462 | AM_RANGE(0x800000, 0x800607) AM_READ(SMH_RAM ) // Sprites Y |
| 2461 | 2463 | AM_RANGE(0x900000, 0x903fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| r2956 | r2957 | |
| 2506 | 2508 | AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM ) // ROM |
| 2507 | 2509 | AM_RANGE(0x100000, 0x17ffff) AM_READ(SMH_ROM ) // ROM |
| 2508 | 2510 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 2509 | | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2510 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2511 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2512 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2511 | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2512 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2513 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2514 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2513 | 2515 | AM_RANGE(0x700000, 0x703fff) AM_READ(seta_sound_word_r ) // Sound |
| 2514 | 2516 | AM_RANGE(0x800000, 0x803fff) AM_READ(SMH_RAM ) // VRAM 0&1 |
| 2515 | 2517 | AM_RANGE(0x880000, 0x883fff) AM_READ(SMH_RAM ) // VRAM 2&3 |
| r2956 | r2957 | |
| 2548 | 2550 | AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM ) // ROM |
| 2549 | 2551 | AM_RANGE(0x100000, 0x17ffff) AM_READ(SMH_ROM ) // ROM |
| 2550 | 2552 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 2551 | | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2552 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2553 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2554 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2553 | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 2554 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2555 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2556 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2555 | 2557 | AM_RANGE(0x500006, 0x500007) AM_READ(OKIM6295_status_0_lsb_r) // tfun sound |
| 2556 | 2558 | AM_RANGE(0x700000, 0x703fff) AM_READ(SMH_RAM ) // old sound |
| 2557 | 2559 | AM_RANGE(0x800000, 0x803fff) AM_READ(SMH_RAM ) // VRAM 0&1 |
| r2956 | r2957 | |
| 2602 | 2604 | { |
| 2603 | 2605 | int row_select = kiwame_nvram_r( machine,0x10a/2,0x00ff ) & 0x1f; |
| 2604 | 2606 | int i; |
| 2607 | static const char *keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" }; |
| 2605 | 2608 | |
| 2606 | 2609 | for(i = 0; i < 5; i++) |
| 2607 | 2610 | if (row_select & (1<<i)) break; |
| 2608 | 2611 | |
| 2609 | | i = 4 + (i % 5); |
| 2610 | | |
| 2611 | 2612 | switch( offset ) |
| 2612 | 2613 | { |
| 2613 | | case 0x00/2: return input_port_read_indexed(machine, i ); |
| 2614 | case 0x00/2: return input_port_read(machine, keynames[i]); |
| 2614 | 2615 | case 0x02/2: return 0xffff; |
| 2615 | | case 0x04/2: return input_port_read_indexed(machine, 2 ); |
| 2616 | case 0x04/2: return input_port_read(machine, "COINS"); |
| 2616 | 2617 | // case 0x06/2: |
| 2617 | 2618 | case 0x08/2: return 0xffff; |
| 2618 | 2619 | |
| r2956 | r2957 | |
| 2625 | 2626 | static ADDRESS_MAP_START( kiwame_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2626 | 2627 | AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM ) // ROM |
| 2627 | 2628 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 2628 | | AM_RANGE(0xfffc00, 0xffffff) AM_READ(kiwame_nvram_r ) // NVRAM + Regs ? |
| 2629 | AM_RANGE(0xfffc00, 0xffffff) AM_READ(kiwame_nvram_r ) // NVRAM + Regs ? |
| 2629 | 2630 | AM_RANGE(0x800000, 0x803fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| 2630 | 2631 | /**/AM_RANGE(0x900000, 0x900001) AM_READ(SMH_RAM ) // ? 0x4000 |
| 2631 | 2632 | /**/AM_RANGE(0xa00000, 0xa00607) AM_READ(SMH_RAM ) // Sprites Y |
| 2632 | 2633 | AM_RANGE(0xb00000, 0xb003ff) AM_READ(SMH_RAM ) // Palette |
| 2633 | 2634 | AM_RANGE(0xc00000, 0xc03fff) AM_READ(seta_sound_word_r ) // Sound |
| 2634 | | AM_RANGE(0xd00000, 0xd00009) AM_READ(kiwame_input_r ) |
| 2635 | | AM_RANGE(0xe00000, 0xe00003) AM_READ(seta_dsw_r ) // DSW |
| 2635 | AM_RANGE(0xd00000, 0xd00009) AM_READ(kiwame_input_r ) |
| 2636 | AM_RANGE(0xe00000, 0xe00003) AM_READ(seta_dsw_r ) // DSW |
| 2636 | 2637 | ADDRESS_MAP_END |
| 2637 | 2638 | |
| 2638 | 2639 | static ADDRESS_MAP_START( kiwame_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 2669 | 2670 | AM_RANGE(0x100000, 0x103fff) AM_READ(seta_sound_word_r ) // Sound |
| 2670 | 2671 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2671 | 2672 | AM_RANGE(0x700000, 0x7003ff) AM_READ(SMH_RAM ) // Palette |
| 2672 | | AM_RANGE(0xb00000, 0xb00001) AM_READ(input_port_0_word_r ) // P1 |
| 2673 | | AM_RANGE(0xb00002, 0xb00003) AM_READ(input_port_1_word_r ) // P2 |
| 2674 | | AM_RANGE(0xb00004, 0xb00005) AM_READ(input_port_2_word_r ) // Coins |
| 2673 | AM_RANGE(0xb00000, 0xb00001) AM_READ_PORT("P1") // P1 |
| 2674 | AM_RANGE(0xb00002, 0xb00003) AM_READ_PORT("P2") // P2 |
| 2675 | AM_RANGE(0xb00004, 0xb00005) AM_READ_PORT("COINS") // Coins |
| 2675 | 2676 | AM_RANGE(0xb0000c, 0xb0000d) AM_READ(thunderl_protection_r ) // Protection (not in wits) |
| 2676 | | AM_RANGE(0xb00008, 0xb00009) AM_READ(input_port_4_word_r ) // P3 (wits) |
| 2677 | | AM_RANGE(0xb0000a, 0xb0000b) AM_READ(input_port_5_word_r ) // P4 (wits) |
| 2677 | AM_RANGE(0xb00008, 0xb00009) AM_READ_PORT("P3") // P3 (wits) |
| 2678 | AM_RANGE(0xb0000a, 0xb0000b) AM_READ_PORT("P4") // P4 (wits) |
| 2678 | 2679 | /**/AM_RANGE(0xc00000, 0xc00001) AM_READ(SMH_RAM ) // ? 0x4000 |
| 2679 | 2680 | /**/AM_RANGE(0xd00000, 0xd00607) AM_READ(SMH_RAM ) // Sprites Y |
| 2680 | 2681 | AM_RANGE(0xe00000, 0xe03fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| r2956 | r2957 | |
| 2736 | 2737 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // RAM |
| 2737 | 2738 | AM_RANGE(0x300000, 0x3003ff) AM_READ(SMH_RAM ) // Palette |
| 2738 | 2739 | AM_RANGE(0x300400, 0x300fff) AM_READ(SMH_RAM ) // |
| 2739 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2740 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2741 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2742 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2740 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2741 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2742 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2743 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2743 | 2744 | AM_RANGE(0xa00000, 0xa00607) AM_READ(SMH_RAM ) // Sprites Y |
| 2744 | 2745 | /**/AM_RANGE(0xa80000, 0xa80001) AM_READ(SMH_RAM ) // ? 0x4000 |
| 2745 | 2746 | AM_RANGE(0xb00000, 0xb03fff) AM_READ(SMH_RAM ) // Sprites Code + X + Attr |
| r2956 | r2957 | |
| 2776 | 2777 | static ADDRESS_MAP_START( utoukond_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 2777 | 2778 | AM_RANGE(0x000000, 0x0fffff) AM_READ(SMH_ROM ) // ROM |
| 2778 | 2779 | AM_RANGE(0x200000, 0x20ffff) AM_READ(SMH_RAM ) // ROM |
| 2779 | | AM_RANGE(0x400000, 0x400001) AM_READ(input_port_0_word_r ) // P1 |
| 2780 | | AM_RANGE(0x400002, 0x400003) AM_READ(input_port_1_word_r ) // P2 |
| 2781 | | AM_RANGE(0x400004, 0x400005) AM_READ(input_port_2_word_r ) // Coins |
| 2782 | | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2780 | AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 |
| 2781 | AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 |
| 2782 | AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins |
| 2783 | AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r ) // DSW |
| 2783 | 2784 | AM_RANGE(0x700400, 0x700fff) AM_READ(SMH_RAM ) // Palette |
| 2784 | 2785 | AM_RANGE(0x800000, 0x801fff) AM_READ(SMH_RAM ) // VRAM 0 |
| 2785 | 2786 | AM_RANGE(0x802000, 0x803fff) AM_READ(SMH_RAM ) // VRAM 1 |
| r2956 | r2957 | |
| 2838 | 2839 | AM_RANGE(0x0800, 0x0800) AM_READ(ff_r ) // ? (bits 0/1/2/3: 1 -> do test 0-ff/100-1e0/5001-57ff/banked rom) |
| 2839 | 2840 | // AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r ) // |
| 2840 | 2841 | // AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r ) // |
| 2841 | | AM_RANGE(0x1000, 0x1000) AM_READ(input_port_0_r ) // P1 |
| 2842 | | AM_RANGE(0x1001, 0x1001) AM_READ(input_port_1_r ) // P2 |
| 2843 | | AM_RANGE(0x1002, 0x1002) AM_READ(input_port_2_r ) // Coins |
| 2842 | AM_RANGE(0x1000, 0x1000) AM_READ_PORT("P1") // P1 |
| 2843 | AM_RANGE(0x1001, 0x1001) AM_READ_PORT("P2") // P2 |
| 2844 | AM_RANGE(0x1002, 0x1002) AM_READ_PORT("COINS") // Coins |
| 2844 | 2845 | AM_RANGE(0x2001, 0x2001) AM_READ(YM2203_read_port_0_r ) |
| 2845 | 2846 | AM_RANGE(0x5000, 0x57ff) AM_READ(SMH_RAM ) // Shared RAM |
| 2846 | 2847 | AM_RANGE(0x6000, 0x7fff) AM_READ(SMH_ROM ) // ROM |
| r2956 | r2957 | |
| 2867 | 2868 | AM_RANGE(0x0000, 0x01ff) AM_READ(SMH_RAM ) // RAM |
| 2868 | 2869 | AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r ) // |
| 2869 | 2870 | AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r ) // |
| 2870 | | AM_RANGE(0x1000, 0x1000) AM_READ(input_port_0_r ) // P1 |
| 2871 | | AM_RANGE(0x1001, 0x1001) AM_READ(input_port_1_r ) // P2 |
| 2872 | | AM_RANGE(0x1002, 0x1002) AM_READ(input_port_2_r ) // Coins |
| 2871 | AM_RANGE(0x1000, 0x1000) AM_READ_PORT("P1") // P1 |
| 2872 | AM_RANGE(0x1001, 0x1001) AM_READ_PORT("P2") // P2 |
| 2873 | AM_RANGE(0x1002, 0x1002) AM_READ_PORT("COINS") // Coins |
| 2873 | 2874 | AM_RANGE(0x5000, 0x57ff) AM_READ(SMH_RAM ) // Shared RAM |
| 2874 | 2875 | AM_RANGE(0x7000, 0x7fff) AM_READ(SMH_ROM ) // ROM |
| 2875 | 2876 | AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK1 ) // Banked ROM |
| r2956 | r2957 | |
| 2891 | 2892 | |
| 2892 | 2893 | static READ8_HANDLER( downtown_ip_r ) |
| 2893 | 2894 | { |
| 2894 | | int dir1 = input_port_read_indexed(machine, 4); // analog port |
| 2895 | | int dir2 = input_port_read_indexed(machine, 5); // analog port |
| 2895 | int dir1 = input_port_read(machine, "ROT1"); // analog port |
| 2896 | int dir2 = input_port_read(machine, "ROT2"); // analog port |
| 2896 | 2897 | |
| 2897 | 2898 | dir1 = (~ (0x800 >> ((dir1 * 12)/0x100)) ) & 0xfff; |
| 2898 | 2899 | dir2 = (~ (0x800 >> ((dir2 * 12)/0x100)) ) & 0xfff; |
| 2899 | 2900 | |
| 2900 | 2901 | switch (offset) |
| 2901 | 2902 | { |
| 2902 | | case 0: return (input_port_read_indexed(machine, 2) & 0xf0) + (dir1>>8); // upper 4 bits of p1 rotation + coins |
| 2903 | | case 1: return (dir1&0xff); // lower 8 bits of p1 rotation |
| 2904 | | case 2: return input_port_read_indexed(machine, 0); // p1 |
| 2905 | | case 3: return 0xff; // ? |
| 2906 | | case 4: return (dir2>>8); // upper 4 bits of p2 rotation + ? |
| 2907 | | case 5: return (dir2&0xff); // lower 8 bits of p2 rotation |
| 2908 | | case 6: return input_port_read_indexed(machine, 1); // p2 |
| 2909 | | case 7: return 0xff; // ? |
| 2903 | case 0: return (input_port_read(machine, "COINS") & 0xf0) + (dir1 >> 8); // upper 4 bits of p1 rotation + coins |
| 2904 | case 1: return (dir1 & 0xff); // lower 8 bits of p1 rotation |
| 2905 | case 2: return input_port_read(machine, "P1"); // p1 |
| 2906 | case 3: return 0xff; // ? |
| 2907 | case 4: return (dir2 >> 8); // upper 4 bits of p2 rotation + ? |
| 2908 | case 5: return (dir2 & 0xff); // lower 8 bits of p2 rotation |
| 2909 | case 6: return input_port_read(machine, "P2"); // p2 |
| 2910 | case 7: return 0xff; // ? |
| 2910 | 2911 | } |
| 2911 | 2912 | |
| 2912 | 2913 | return 0; |
| r2956 | r2957 | |
| 2968 | 2969 | AM_RANGE(0x0000, 0x01ff) AM_READ(SMH_RAM ) // RAM |
| 2969 | 2970 | AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r ) // |
| 2970 | 2971 | AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r ) // |
| 2971 | | AM_RANGE(0x1000, 0x1000) AM_READ(input_port_2_r ) // Coins |
| 2972 | | AM_RANGE(0x1002, 0x1002) AM_READ(input_port_0_r ) // P1 |
| 2973 | | // AM_RANGE(0x1004, 0x1004) AM_READ(SMH_NOP ) // ? |
| 2974 | | AM_RANGE(0x1006, 0x1006) AM_READ(input_port_1_r ) // P2 |
| 2972 | AM_RANGE(0x1000, 0x1000) AM_READ_PORT("COINS") // Coins |
| 2973 | AM_RANGE(0x1002, 0x1002) AM_READ_PORT("P1") // P1 |
| 2974 | // AM_RANGE(0x1004, 0x1004) AM_READ(SMH_NOP ) // ? |
| 2975 | AM_RANGE(0x1006, 0x1006) AM_READ_PORT("P2") // P2 |
| 2975 | 2976 | AM_RANGE(0x5000, 0x57ff) AM_READ(SMH_RAM ) // Shared RAM |
| 2976 | 2977 | AM_RANGE(0x7000, 0x7fff) AM_READ(SMH_ROM ) // ROM |
| 2977 | 2978 | AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK1 ) // Banked ROM |
| r2956 | r2957 | |
| 3043 | 3044 | |
| 3044 | 3045 | static ADDRESS_MAP_START( pairlove_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 3045 | 3046 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM ) // ROM |
| 3046 | | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 3047 | | AM_RANGE(0x500000, 0x500001) AM_READ(input_port_0_word_r ) // P1 |
| 3048 | | AM_RANGE(0x500002, 0x500003) AM_READ(input_port_1_word_r ) // P2 |
| 3049 | | AM_RANGE(0x500004, 0x500005) AM_READ(input_port_2_word_r ) // Coins |
| 3047 | AM_RANGE(0x300000, 0x300003) AM_READ(seta_dsw_r ) // DSW |
| 3048 | AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1 |
| 3049 | AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2 |
| 3050 | AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins |
| 3050 | 3051 | AM_RANGE(0x900000, 0x9001ff) AM_READ(pairlove_prot_r) |
| 3051 | 3052 | AM_RANGE(0xa00000, 0xa03fff) AM_READ(seta_sound_word_r ) // Sound |
| 3052 | 3053 | AM_RANGE(0xb00000, 0xb00fff) AM_READ(SMH_RAM ) // Palette |
| r2956 | r2957 | |
| 3081 | 3082 | static ADDRESS_MAP_START( crazyfgt_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 3082 | 3083 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 3083 | 3084 | AM_RANGE(0x400000, 0x40ffff) AM_RAM |
| 3084 | | AM_RANGE(0x610000, 0x610001) AM_READ(input_port_0_word_r ) |
| 3085 | | AM_RANGE(0x610002, 0x610003) AM_READ(input_port_1_word_r ) |
| 3086 | | AM_RANGE(0x610004, 0x610005) AM_READ(input_port_2_word_r ) |
| 3085 | AM_RANGE(0x610000, 0x610001) AM_READ_PORT("COINS") |
| 3086 | AM_RANGE(0x610002, 0x610003) AM_READ_PORT("UNK") |
| 3087 | AM_RANGE(0x610004, 0x610005) AM_READ_PORT("INPUT") |
| 3087 | 3088 | AM_RANGE(0x610006, 0x610007) AM_WRITENOP |
| 3088 | 3089 | AM_RANGE(0x620000, 0x620003) AM_WRITENOP // protection |
| 3089 | 3090 | AM_RANGE(0x630000, 0x630003) AM_READ(seta_dsw_r) |
| r2956 | r2957 | |
| 3108 | 3109 | static READ16_HANDLER( inttoote_dsw_r ) |
| 3109 | 3110 | { |
| 3110 | 3111 | int shift = offset * 4; |
| 3111 | | return ((((input_port_read_indexed(machine, 0) >> shift) & 0xf)) << 0) | |
| 3112 | | ((((input_port_read_indexed(machine, 1) >> shift) & 0xf)) << 4) | |
| 3113 | | ((((input_port_read_indexed(machine, 1) >> (shift+8)) & 0xf)) << 8) ; |
| 3112 | return ((((input_port_read(machine, "DSW1") >> shift) & 0xf)) << 0) | |
| 3113 | ((((input_port_read(machine, "DSW2_3") >> shift) & 0xf)) << 4) | |
| 3114 | ((((input_port_read(machine, "DSW2_3") >> (shift+8)) & 0xf)) << 8) ; |
| 3114 | 3115 | } |
| 3115 | 3116 | |
| 3116 | 3117 | static UINT16 *inttoote_key_select; |
| r2956 | r2957 | |
| 3118 | 3119 | { |
| 3119 | 3120 | switch( *inttoote_key_select ) |
| 3120 | 3121 | { |
| 3121 | | case 0x08: return input_port_read_indexed(machine, 4+0); |
| 3122 | | case 0x10: return input_port_read_indexed(machine, 4+1); |
| 3123 | | case 0x20: return input_port_read_indexed(machine, 4+2); |
| 3124 | | case 0x40: return input_port_read_indexed(machine, 4+3); |
| 3125 | | case 0x80: return input_port_read_indexed(machine, 4+4); |
| 3122 | case 0x08: return input_port_read(machine, "BET0"); |
| 3123 | case 0x10: return input_port_read(machine, "BET1"); |
| 3124 | case 0x20: return input_port_read(machine, "BET2"); |
| 3125 | case 0x40: return input_port_read(machine, "BET3"); |
| 3126 | case 0x80: return input_port_read(machine, "BET4"); |
| 3126 | 3127 | } |
| 3127 | 3128 | logerror("%06X: unknown read, select = %04x\n",activecpu_get_pc(),*inttoote_key_select); |
| 3128 | 3129 | return 0xffff; |
| r2956 | r2957 | |
| 3138 | 3139 | AM_RANGE(0x000000, 0x1fffff) AM_ROM // ROM (up to 2MB) |
| 3139 | 3140 | |
| 3140 | 3141 | AM_RANGE(0x200000, 0x200001) AM_READWRITE(inttoote_key_r, SMH_RAM) AM_BASE(&inttoote_key_select) |
| 3141 | | AM_RANGE(0x200002, 0x200003) AM_READ(input_port_2_word_r) |
| 3142 | | AM_RANGE(0x200010, 0x200011) AM_READWRITE(input_port_3_word_r, SMH_NOP) |
| 3142 | AM_RANGE(0x200002, 0x200003) AM_READ_PORT("P1") |
| 3143 | AM_RANGE(0x200010, 0x200011) AM_READ_PORT("P2") AM_WRITENOP |
| 3143 | 3144 | |
| 3144 | 3145 | AM_RANGE(0x300000, 0x300001) AM_WRITE(watchdog_reset16_w) // Watchdog |
| 3145 | 3146 | |
| r2956 | r2957 | |
| 3177 | 3178 | ***************************************************************************/ |
| 3178 | 3179 | |
| 3179 | 3180 | #define JOY_TYPE1_1BUTTON(_n_) \ |
| 3180 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3181 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3182 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3183 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3184 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3185 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3186 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3187 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3181 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3182 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3183 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3184 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3185 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3186 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3187 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3188 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3188 | 3189 | |
| 3189 | 3190 | #define JOY_TYPE1_2BUTTONS(_n_) \ |
| 3190 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3191 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3192 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3193 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3194 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3195 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3196 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3197 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3191 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3192 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3193 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3194 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3195 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3196 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3197 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3198 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3198 | 3199 | |
| 3199 | 3200 | #define JOY_TYPE1_3BUTTONS(_n_) \ |
| 3200 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3201 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3202 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3203 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3204 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3205 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3206 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(_n_) \ |
| 3207 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3201 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3202 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3203 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3204 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3205 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3206 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3207 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(_n_) \ |
| 3208 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3208 | 3209 | |
| 3209 | 3210 | |
| 3210 | | |
| 3211 | 3211 | #define JOY_TYPE2_1BUTTON(_n_) \ |
| 3212 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3213 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3214 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3215 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3216 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3217 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3218 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3219 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3212 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3213 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3214 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3215 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3216 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3217 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3218 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3219 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3220 | 3220 | |
| 3221 | 3221 | #define JOY_TYPE2_2BUTTONS(_n_) \ |
| 3222 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3223 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3224 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3225 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3226 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3227 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3228 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3229 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3222 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3223 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3224 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3225 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3226 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3227 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3228 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 3229 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3230 | 3230 | |
| 3231 | 3231 | #define JOY_TYPE2_3BUTTONS(_n_) \ |
| 3232 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3233 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3234 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3235 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3236 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3237 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3238 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(_n_) \ |
| 3239 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3232 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_) \ |
| 3233 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_) \ |
| 3234 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) \ |
| 3235 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(_n_) \ |
| 3236 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_) \ |
| 3237 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_) \ |
| 3238 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(_n_) \ |
| 3239 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 3240 | 3240 | |
| 3241 | 3241 | |
| 3242 | 3242 | #define JOY_ROTATION(_n_, _left_, _right_ ) \ |
| r2956 | r2957 | |
| 3249 | 3249 | ***************************************************************************/ |
| 3250 | 3250 | |
| 3251 | 3251 | static INPUT_PORTS_START( arbalest ) |
| 3252 | | PORT_START_TAG("IN0") // Player 1 |
| 3252 | PORT_START_TAG("P1") // Player 1 |
| 3253 | 3253 | JOY_TYPE2_2BUTTONS(1) |
| 3254 | 3254 | |
| 3255 | | PORT_START_TAG("IN1") // Player 2 |
| 3255 | PORT_START_TAG("P2") // Player 2 |
| 3256 | 3256 | JOY_TYPE2_2BUTTONS(2) |
| 3257 | 3257 | |
| 3258 | | PORT_START_TAG("IN2") // Coins |
| 3259 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3260 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3261 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3262 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3263 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 3264 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3258 | PORT_START_TAG("COINS") // Coins |
| 3259 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3260 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3261 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3262 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3263 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 3264 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3265 | 3265 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3266 | 3266 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3267 | 3267 | |
| 3268 | | PORT_START_TAG("IN3") // 2 DSWs - $600001 & 3.b |
| 3268 | PORT_START_TAG("DSW") // 2 DSWs - $600001 & 3.b |
| 3269 | 3269 | PORT_DIPNAME( 0x4001, 0x0000, "Licensed To" ) |
| 3270 | 3270 | PORT_DIPSETTING( 0x0000, "Taito" ) |
| 3271 | 3271 | // PORT_DIPSETTING( 0x4000, "Taito" ) |
| r2956 | r2957 | |
| 3316 | 3316 | ***************************************************************************/ |
| 3317 | 3317 | |
| 3318 | 3318 | static INPUT_PORTS_START( atehate ) |
| 3319 | | PORT_START_TAG("IN0") // Player 1 |
| 3320 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 3321 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 3322 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3323 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3324 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3325 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3326 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3327 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 3319 | PORT_START_TAG("P1") // Player 1 |
| 3320 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 3321 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 3322 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3323 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3324 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3325 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3326 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3327 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 3328 | 3328 | |
| 3329 | | PORT_START_TAG("IN1") // Player 2 |
| 3330 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 3331 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 3332 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3333 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3334 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3335 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3336 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3337 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 3329 | PORT_START_TAG("P2") // Player 2 |
| 3330 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 3331 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 3332 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3333 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3334 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3335 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3336 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3337 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 3338 | 3338 | |
| 3339 | | PORT_START_TAG("IN2") // Coins |
| 3339 | PORT_START_TAG("COINS") // Coins |
| 3340 | 3340 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3341 | 3341 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3342 | 3342 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(5) |
| 3343 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3344 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 4 Bits Called "Cut DSW" |
| 3345 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3346 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3347 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3343 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3344 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 4 Bits Called "Cut DSW" |
| 3345 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3346 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3347 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3348 | 3348 | |
| 3349 | | PORT_START_TAG("IN3") // 2 DSWs - $e00001 & 3.b |
| 3349 | PORT_START_TAG("DSW") // 2 DSWs - $e00001 & 3.b |
| 3350 | 3350 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 3351 | 3351 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| 3352 | 3352 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 3397 | 3397 | ***************************************************************************/ |
| 3398 | 3398 | |
| 3399 | 3399 | static INPUT_PORTS_START( blandia ) |
| 3400 | | PORT_START_TAG("IN0") //Player 1 - $400000.w |
| 3400 | PORT_START_TAG("P1") //Player 1 - $400000.w |
| 3401 | 3401 | JOY_TYPE1_3BUTTONS(1) |
| 3402 | 3402 | |
| 3403 | | PORT_START_TAG("IN1") //Player 2 - $400002.w |
| 3403 | PORT_START_TAG("P2") //Player 2 - $400002.w |
| 3404 | 3404 | JOY_TYPE1_3BUTTONS(2) |
| 3405 | 3405 | |
| 3406 | | PORT_START_TAG("IN2") //Coins - $400004.w |
| 3406 | PORT_START_TAG("COINS") //Coins - $400004.w |
| 3407 | 3407 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3408 | 3408 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3409 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3410 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3411 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3412 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3413 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3414 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3409 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3410 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3411 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3412 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3413 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3414 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3415 | 3415 | |
| 3416 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 3416 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 3417 | 3417 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") |
| 3418 | 3418 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 3419 | 3419 | PORT_DIPSETTING( 0x0001, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3468 | 3468 | ***************************************************************************/ |
| 3469 | 3469 | |
| 3470 | 3470 | static INPUT_PORTS_START( blockcar ) |
| 3471 | | PORT_START_TAG("IN0") //Player 1 - $500001.b |
| 3471 | PORT_START_TAG("P1") //Player 1 - $500001.b |
| 3472 | 3472 | JOY_TYPE1_2BUTTONS(1) // button2 = speed up |
| 3473 | 3473 | |
| 3474 | | PORT_START_TAG("IN1") //Player 2 - $500003.b |
| 3474 | PORT_START_TAG("P2") //Player 2 - $500003.b |
| 3475 | 3475 | JOY_TYPE1_2BUTTONS(2) |
| 3476 | 3476 | |
| 3477 | | PORT_START_TAG("IN2") //Coins + DSW - $500005.b |
| 3477 | PORT_START_TAG("COINS") //Coins + DSW - $500005.b |
| 3478 | 3478 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3479 | 3479 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3480 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3481 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3480 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3481 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3482 | 3482 | PORT_DIPNAME( 0x0010, 0x0000, "Title" ) /* This is a jumper pad */ |
| 3483 | 3483 | PORT_DIPSETTING( 0x0010, "Thunder & Lightning 2" ) |
| 3484 | 3484 | PORT_DIPSETTING( 0x0000, "Block Carnival" ) |
| 3485 | 3485 | |
| 3486 | | PORT_START_TAG("IN3") //2 DSWs - $300003 & 1.b |
| 3486 | PORT_START_TAG("DSW") //2 DSWs - $300003 & 1.b |
| 3487 | 3487 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 3488 | 3488 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 3489 | 3489 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 3533 | 3533 | ***************************************************************************/ |
| 3534 | 3534 | |
| 3535 | 3535 | static INPUT_PORTS_START( calibr50 ) |
| 3536 | | PORT_START_TAG("IN0") //Player 1 |
| 3536 | PORT_START_TAG("P1") //Player 1 |
| 3537 | 3537 | JOY_TYPE2_2BUTTONS(1) |
| 3538 | 3538 | |
| 3539 | | PORT_START_TAG("IN1") //Player 2 |
| 3539 | PORT_START_TAG("P2") //Player 2 |
| 3540 | 3540 | JOY_TYPE2_2BUTTONS(2) |
| 3541 | 3541 | |
| 3542 | | PORT_START_TAG("IN2") //Coins |
| 3543 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3544 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3545 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3546 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3547 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 3548 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3542 | PORT_START_TAG("COINS") //Coins |
| 3543 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3544 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3545 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3546 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3547 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 3548 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3549 | 3549 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3550 | 3550 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3551 | 3551 | |
| 3552 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 3552 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 3553 | 3553 | PORT_DIPNAME( 0x4001, 0x4000, "Licensed To" ) |
| 3554 | 3554 | PORT_DIPSETTING( 0x0001, "Romstar" ) |
| 3555 | 3555 | PORT_DIPSETTING( 0x4001, "Taito America" ) |
| r2956 | r2957 | |
| 3595 | 3595 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 3596 | 3596 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3597 | 3597 | |
| 3598 | | PORT_START_TAG("IN4") // Rotation Player 1 |
| 3598 | PORT_START_TAG("ROT1") // Rotation Player 1 |
| 3599 | 3599 | JOY_ROTATION(1, Z, X) |
| 3600 | 3600 | |
| 3601 | | PORT_START_TAG("IN5") // Rotation Player 2 |
| 3601 | PORT_START_TAG("ROT2") // Rotation Player 2 |
| 3602 | 3602 | JOY_ROTATION(2, N, M) |
| 3603 | 3603 | INPUT_PORTS_END |
| 3604 | 3604 | |
| r2956 | r2957 | |
| 3607 | 3607 | ***************************************************************************/ |
| 3608 | 3608 | |
| 3609 | 3609 | static INPUT_PORTS_START( daioh ) |
| 3610 | | PORT_START_TAG("IN0") |
| 3610 | PORT_START_TAG("P1") |
| 3611 | 3611 | JOY_TYPE1_3BUTTONS(1) |
| 3612 | 3612 | |
| 3613 | | PORT_START_TAG("IN1") |
| 3613 | PORT_START_TAG("P2") |
| 3614 | 3614 | JOY_TYPE1_3BUTTONS(2) |
| 3615 | 3615 | |
| 3616 | | PORT_START_TAG("IN2") |
| 3616 | PORT_START_TAG("COINS") |
| 3617 | 3617 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3618 | 3618 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3619 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3620 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3619 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3620 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3621 | 3621 | /* These are NOT Dip Switches but jumpers */ |
| 3622 | 3622 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) // JP9 |
| 3623 | 3623 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 3632 | 3632 | PORT_DIPSETTING( 0x0080, "USA (6 buttons)" ) |
| 3633 | 3633 | PORT_DIPSETTING( 0x0000, "Japan (2 buttons)" ) |
| 3634 | 3634 | |
| 3635 | | PORT_START_TAG("IN3") |
| 3635 | PORT_START_TAG("DSW") |
| 3636 | 3636 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 3637 | 3637 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| 3638 | 3638 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 3678 | 3678 | PORT_DIPSETTING( 0x4000, "800k and 2000k only" ) |
| 3679 | 3679 | PORT_DIPSETTING( 0x0000, "1000k Only" ) |
| 3680 | 3680 | |
| 3681 | | PORT_START_TAG("IN4") |
| 3682 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 3683 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 3684 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 3685 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 3686 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 3687 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 3688 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3689 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3681 | PORT_START_TAG("EXTRA") |
| 3682 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 3683 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 3684 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 3685 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 3686 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 3687 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 3688 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3689 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3690 | 3690 | INPUT_PORTS_END |
| 3691 | 3691 | |
| 3692 | 3692 | /*************************************************************************** |
| r2956 | r2957 | |
| 3694 | 3694 | ***************************************************************************/ |
| 3695 | 3695 | |
| 3696 | 3696 | static INPUT_PORTS_START( drgnunit ) |
| 3697 | | PORT_START_TAG("IN0") //Player 1 |
| 3697 | PORT_START_TAG("P1") //Player 1 |
| 3698 | 3698 | JOY_TYPE1_3BUTTONS(1) |
| 3699 | 3699 | |
| 3700 | | PORT_START_TAG("IN1") //Player 2 |
| 3700 | PORT_START_TAG("P2") //Player 2 |
| 3701 | 3701 | JOY_TYPE1_3BUTTONS(2) |
| 3702 | 3702 | |
| 3703 | | PORT_START_TAG("IN2") //Coins |
| 3703 | PORT_START_TAG("COINS") //Coins |
| 3704 | 3704 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3705 | 3705 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3706 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3707 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3706 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3707 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3708 | 3708 | PORT_DIPNAME( 0x0010, 0x0010, "Coinage Type" ) // not supported |
| 3709 | 3709 | PORT_DIPSETTING( 0x0010, "1" ) |
| 3710 | 3710 | PORT_DIPSETTING( 0x0000, "2" ) |
| r2956 | r2957 | |
| 3717 | 3717 | PORT_DIPSETTING( 0x0040, "Seta USA / Taito America" ) |
| 3718 | 3718 | PORT_DIPSETTING( 0x0000, "Seta USA / Romstar" ) |
| 3719 | 3719 | |
| 3720 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 3720 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 3721 | 3721 | PORT_DIPNAME( 0x0003, 0x0002, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:1,2") |
| 3722 | 3722 | PORT_DIPSETTING( 0x0003, DEF_STR( Easy ) ) |
| 3723 | 3723 | PORT_DIPSETTING( 0x0002, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 3765 | 3765 | ***************************************************************************/ |
| 3766 | 3766 | |
| 3767 | 3767 | static INPUT_PORTS_START( downtown ) |
| 3768 | | PORT_START_TAG("IN0") //Player 1 |
| 3768 | PORT_START_TAG("P1") //Player 1 |
| 3769 | 3769 | JOY_TYPE2_2BUTTONS(1) |
| 3770 | 3770 | |
| 3771 | | PORT_START_TAG("IN1") //Player 2 |
| 3771 | PORT_START_TAG("P2") //Player 2 |
| 3772 | 3772 | JOY_TYPE2_2BUTTONS(2) |
| 3773 | 3773 | |
| 3774 | | PORT_START_TAG("IN2") //Coins |
| 3775 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3776 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3777 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3778 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3779 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 3780 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3774 | PORT_START_TAG("COINS") //Coins |
| 3775 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3776 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3777 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3778 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3779 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 3780 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3781 | 3781 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3782 | 3782 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3783 | 3783 | |
| 3784 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 3784 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 3785 | 3785 | PORT_DIPNAME( 0x0001, 0x0000, "Sales" ) PORT_DIPLOCATION("SW1:1") /* Manual for USA version says "Always Off" */ |
| 3786 | 3786 | PORT_DIPSETTING( 0x0001, "Japan Only" ) |
| 3787 | 3787 | PORT_DIPSETTING( 0x0000, DEF_STR( World ) ) |
| r2956 | r2957 | |
| 3838 | 3838 | PORT_DIPSETTING( 0x8000, "1" ) |
| 3839 | 3839 | PORT_DIPSETTING( 0x0000, "2" ) |
| 3840 | 3840 | |
| 3841 | | PORT_START_TAG("IN4") //Rotation Player 1 |
| 3841 | PORT_START_TAG("ROT1") //Rotation Player 1 |
| 3842 | 3842 | JOY_ROTATION(1, Z, X) |
| 3843 | 3843 | |
| 3844 | | PORT_START_TAG("IN5") //Rotation Player 2 |
| 3844 | PORT_START_TAG("ROT2") //Rotation Player 2 |
| 3845 | 3845 | JOY_ROTATION(2, N, M) |
| 3846 | 3846 | INPUT_PORTS_END |
| 3847 | 3847 | |
| r2956 | r2957 | |
| 3852 | 3852 | ***************************************************************************/ |
| 3853 | 3853 | |
| 3854 | 3854 | static INPUT_PORTS_START( eightfrc ) |
| 3855 | | PORT_START_TAG("IN0") //Player 1 |
| 3855 | PORT_START_TAG("P1") //Player 1 |
| 3856 | 3856 | JOY_TYPE1_2BUTTONS(1) |
| 3857 | 3857 | |
| 3858 | | PORT_START_TAG("IN1") //Player 2 |
| 3858 | PORT_START_TAG("P2") //Player 2 |
| 3859 | 3859 | JOY_TYPE1_2BUTTONS(2) |
| 3860 | 3860 | |
| 3861 | | PORT_START_TAG("IN2") //Coins |
| 3861 | PORT_START_TAG("COINS") //Coins |
| 3862 | 3862 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3863 | 3863 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3864 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3865 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3866 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3867 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3868 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3869 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3864 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3865 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 3866 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3867 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3868 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3869 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3870 | 3870 | |
| 3871 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 3871 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 3872 | 3872 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 3873 | 3873 | PORT_DIPSETTING( 0x0004, DEF_STR( 4C_1C ) ) |
| 3874 | 3874 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 3923 | 3923 | ***************************************************************************/ |
| 3924 | 3924 | |
| 3925 | 3925 | static INPUT_PORTS_START( extdwnhl ) |
| 3926 | | PORT_START_TAG("IN0") //Player 1 |
| 3927 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) |
| 3928 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 3929 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3930 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3931 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3932 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3933 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3934 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 3926 | PORT_START_TAG("P1") //Player 1 |
| 3927 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) |
| 3928 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 3929 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3930 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3931 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3932 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3933 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3934 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 3935 | 3935 | |
| 3936 | | PORT_START_TAG("IN1") //Player 2 |
| 3937 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) |
| 3938 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) |
| 3939 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3940 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3941 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3942 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3943 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3944 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 3936 | PORT_START_TAG("P2") //Player 2 |
| 3937 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2) |
| 3938 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2) |
| 3939 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3940 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3941 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3942 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3943 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3944 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 3945 | 3945 | |
| 3946 | | PORT_START_TAG("IN2") //Coins |
| 3946 | PORT_START_TAG("COINS") //Coins |
| 3947 | 3947 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 3948 | 3948 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 3949 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3950 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE ) // "test" |
| 3949 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3950 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE ) // "test" |
| 3951 | 3951 | /* These are NOT Dip Switches but jumpers */ |
| 3952 | 3952 | PORT_DIPNAME( 0x0030, 0x0030, "Country" ) |
| 3953 | 3953 | PORT_DIPSETTING( 0x0030, DEF_STR( World ) ) |
| r2956 | r2957 | |
| 3961 | 3961 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 3962 | 3962 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 3963 | 3963 | |
| 3964 | | PORT_START_TAG("IN3") //2 DSWs - $400009 & b.b |
| 3964 | PORT_START_TAG("DSW") //2 DSWs - $400009 & b.b |
| 3965 | 3965 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1") |
| 3966 | 3966 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 3967 | 3967 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 4017 | 4017 | ***************************************************************************/ |
| 4018 | 4018 | |
| 4019 | 4019 | static INPUT_PORTS_START( gundhara ) |
| 4020 | | PORT_START_TAG("IN0") //Player 1 |
| 4020 | PORT_START_TAG("P1") //Player 1 |
| 4021 | 4021 | JOY_TYPE1_3BUTTONS(1) |
| 4022 | 4022 | |
| 4023 | | PORT_START_TAG("IN1") //Player 2 |
| 4023 | PORT_START_TAG("P2") //Player 2 |
| 4024 | 4024 | JOY_TYPE1_3BUTTONS(2) |
| 4025 | 4025 | |
| 4026 | | PORT_START_TAG("IN2") //Coins |
| 4026 | PORT_START_TAG("COINS") //Coins |
| 4027 | 4027 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4028 | 4028 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4029 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4029 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4030 | 4030 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW) |
| 4031 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4032 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4033 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4034 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4031 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4032 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4033 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4034 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4035 | 4035 | |
| 4036 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4036 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4037 | 4037 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 4038 | 4038 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| 4039 | 4039 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 4086 | 4086 | ***************************************************************************/ |
| 4087 | 4087 | |
| 4088 | 4088 | static INPUT_PORTS_START( zombraid ) |
| 4089 | | PORT_START_TAG("IN0") //Player 1 |
| 4090 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4091 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4092 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4093 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4094 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Trigger") |
| 4095 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Reload") |
| 4096 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4097 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 4089 | PORT_START_TAG("P1") //Player 1 |
| 4090 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4091 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4092 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4093 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4094 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Trigger") |
| 4095 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Reload") |
| 4096 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4097 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 4098 | 4098 | |
| 4099 | | PORT_START_TAG("IN1") //Player 2 |
| 4100 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4101 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4102 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4103 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4104 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Trigger") |
| 4105 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Reload") |
| 4106 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4107 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 4099 | PORT_START_TAG("P2") //Player 2 |
| 4100 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4101 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4102 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4103 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4104 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Trigger") |
| 4105 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Reload") |
| 4106 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4107 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 4108 | 4108 | |
| 4109 | | PORT_START_TAG("IN2") //Coins |
| 4109 | PORT_START_TAG("COINS") //Coins |
| 4110 | 4110 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4111 | 4111 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4112 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4113 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4114 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4115 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4116 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4117 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4112 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4113 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4114 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4115 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4116 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4117 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4118 | 4118 | |
| 4119 | | PORT_START_TAG("IN3") |
| 4119 | PORT_START_TAG("DSW") |
| 4120 | 4120 | PORT_DIPNAME( 0x0001, 0x0001, "Vertical Screen Flip" ) PORT_DIPLOCATION("SW2:1") |
| 4121 | 4121 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4122 | 4122 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 4164 | 4164 | /* The user calibrated values are lost each time MAME starts, so the gun always needs to be re-calibrated. */ |
| 4165 | 4165 | /* Either NVRAM or battery backed up RAM is not emulated. */ |
| 4166 | 4166 | /* For now it is best to just use a Save State after calibration to remember the setting. */ |
| 4167 | | PORT_START_TAG("IN5") /* Player 1 Gun X ($f00003) */ |
| 4167 | PORT_START_TAG("GUNX1") /* Player 1 Gun X ($f00003) */ |
| 4168 | 4168 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) |
| 4169 | | PORT_START_TAG("IN6") /* Player 1 Gun Y ($f00003) */ |
| 4169 | PORT_START_TAG("GUNY1") /* Player 1 Gun Y ($f00003) */ |
| 4170 | 4170 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| 4171 | 4171 | |
| 4172 | | PORT_START_TAG("IN7") /* Player 2 Gun X ($f00003) */ |
| 4172 | PORT_START_TAG("GUNX2") /* Player 2 Gun X ($f00003) */ |
| 4173 | 4173 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2) |
| 4174 | | PORT_START_TAG("IN8") /* Player 2 Gun Y ($f00003) */ |
| 4174 | PORT_START_TAG("GUNY2") /* Player 2 Gun Y ($f00003) */ |
| 4175 | 4175 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) |
| 4176 | 4176 | INPUT_PORTS_END |
| 4177 | 4177 | |
| r2956 | r2957 | |
| 4181 | 4181 | ***************************************************************************/ |
| 4182 | 4182 | |
| 4183 | 4183 | static INPUT_PORTS_START( jjsquawk ) |
| 4184 | | PORT_START_TAG("IN0") //Player 1 - $400000.w |
| 4184 | PORT_START_TAG("P1") //Player 1 - $400000.w |
| 4185 | 4185 | JOY_TYPE1_2BUTTONS(1) |
| 4186 | 4186 | |
| 4187 | | PORT_START_TAG("IN1") //Player 2 - $400002.w |
| 4187 | PORT_START_TAG("P2") //Player 2 - $400002.w |
| 4188 | 4188 | JOY_TYPE1_2BUTTONS(2) |
| 4189 | 4189 | |
| 4190 | | PORT_START_TAG("IN2") //Coins - $400004.w |
| 4190 | PORT_START_TAG("COINS") //Coins - $400004.w |
| 4191 | 4191 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4192 | 4192 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4193 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4194 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4195 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4196 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4197 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4198 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4193 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4194 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4195 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4196 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4197 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4198 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4199 | 4199 | |
| 4200 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4200 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4201 | 4201 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 4202 | 4202 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| 4203 | 4203 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 4249 | 4249 | ***************************************************************************/ |
| 4250 | 4250 | |
| 4251 | 4251 | static INPUT_PORTS_START( kamenrid ) |
| 4252 | | PORT_START_TAG("IN0") //Player 1 |
| 4252 | PORT_START_TAG("P1") //Player 1 |
| 4253 | 4253 | JOY_TYPE1_2BUTTONS(1) // BUTTON3 in "test mode" only |
| 4254 | 4254 | |
| 4255 | | PORT_START_TAG("IN1") //Player 2 |
| 4255 | PORT_START_TAG("P2") //Player 2 |
| 4256 | 4256 | JOY_TYPE1_2BUTTONS(2) // BUTTON3 in "test mode" only |
| 4257 | 4257 | |
| 4258 | | PORT_START_TAG("IN2") //Coins |
| 4258 | PORT_START_TAG("COINS") //Coins |
| 4259 | 4259 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4260 | 4260 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4261 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4262 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 4261 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4262 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 4263 | 4263 | /* These are NOT Dip Switches but jumpers */ |
| 4264 | 4264 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) |
| 4265 | 4265 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 4274 | 4274 | PORT_DIPSETTING( 0x0080, DEF_STR( USA ) ) |
| 4275 | 4275 | PORT_DIPSETTING( 0x0000, DEF_STR( Japan ) ) |
| 4276 | 4276 | |
| 4277 | | PORT_START // IN3 - 2 DSWs - $500005 & 7.b |
| 4277 | PORT_START_TAG("DSW") // IN3 - 2 DSWs - $500005 & 7.b |
| 4278 | 4278 | PORT_SERVICE( 0x0001, IP_ACTIVE_LOW ) |
| 4279 | 4279 | PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unused ) ) |
| 4280 | 4280 | PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 4335 | 4335 | PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_##_dir_ ) PORT_PLAYER(_n_) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_REVERSE |
| 4336 | 4336 | |
| 4337 | 4337 | static INPUT_PORTS_START( krzybowl ) |
| 4338 | | PORT_START_TAG("IN0") //Player 1 |
| 4338 | PORT_START_TAG("P1") //Player 1 |
| 4339 | 4339 | JOY_TYPE1_3BUTTONS(1) |
| 4340 | 4340 | |
| 4341 | | PORT_START_TAG("IN1") //Player 2 |
| 4341 | PORT_START_TAG("P2") //Player 2 |
| 4342 | 4342 | JOY_TYPE1_3BUTTONS(2) |
| 4343 | 4343 | |
| 4344 | | PORT_START_TAG("IN2") //Coins |
| 4344 | PORT_START_TAG("COINS") //Coins |
| 4345 | 4345 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4346 | 4346 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4347 | 4347 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(5) |
| 4348 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4349 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4350 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4351 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4352 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4348 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4349 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4350 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4351 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4352 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4353 | 4353 | |
| 4354 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4354 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4355 | 4355 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1") |
| 4356 | 4356 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4357 | 4357 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 4399 | 4399 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 4400 | 4400 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 4401 | 4401 | |
| 4402 | | PORT_START_TAG("IN4") //Rotation X Player 1 |
| 4402 | PORT_START_TAG("TRACK1_X") //Rotation X Player 1 |
| 4403 | 4403 | KRZYBOWL_TRACKBALL(X,1) |
| 4404 | 4404 | |
| 4405 | | PORT_START_TAG("IN5") //Rotation Y Player 1 |
| 4405 | PORT_START_TAG("TRACK1_Y") //Rotation Y Player 1 |
| 4406 | 4406 | KRZYBOWL_TRACKBALL(Y,1) |
| 4407 | 4407 | |
| 4408 | | PORT_START_TAG("IN6") //Rotation X Player 2 |
| 4408 | PORT_START_TAG("TRACK2_X") //Rotation X Player 2 |
| 4409 | 4409 | KRZYBOWL_TRACKBALL(X,2) PORT_REVERSE |
| 4410 | 4410 | |
| 4411 | | PORT_START_TAG("IN7") //Rotation Y Player 2 |
| 4411 | PORT_START_TAG("TRACK2_Y") //Rotation Y Player 2 |
| 4412 | 4412 | KRZYBOWL_TRACKBALL(Y,2) |
| 4413 | 4413 | INPUT_PORTS_END |
| 4414 | 4414 | |
| r2956 | r2957 | |
| 4418 | 4418 | ***************************************************************************/ |
| 4419 | 4419 | |
| 4420 | 4420 | static INPUT_PORTS_START( madshark ) |
| 4421 | | PORT_START_TAG("IN0") //Player 1 |
| 4421 | PORT_START_TAG("P1") //Player 1 |
| 4422 | 4422 | JOY_TYPE1_2BUTTONS(1) |
| 4423 | 4423 | |
| 4424 | | PORT_START_TAG("IN1") //Player 2 |
| 4424 | PORT_START_TAG("P2") //Player 2 |
| 4425 | 4425 | JOY_TYPE1_2BUTTONS(2) |
| 4426 | 4426 | |
| 4427 | | PORT_START_TAG("IN2") //Coins |
| 4427 | PORT_START_TAG("COINS") //Coins |
| 4428 | 4428 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4429 | 4429 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4430 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4431 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 4430 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4431 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 4432 | 4432 | /* These are NOT Dip Switches but jumpers */ |
| 4433 | 4433 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) |
| 4434 | 4434 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 4443 | 4443 | PORT_DIPSETTING( 0x0080, DEF_STR( Japan ) ) |
| 4444 | 4444 | PORT_DIPSETTING( 0x0000, DEF_STR( World ) ) |
| 4445 | 4445 | |
| 4446 | | PORT_START_TAG("IN3") //2 DSWs |
| 4446 | PORT_START_TAG("DSW") //2 DSWs |
| 4447 | 4447 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1") |
| 4448 | 4448 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 4449 | 4449 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 4494 | 4494 | ***************************************************************************/ |
| 4495 | 4495 | |
| 4496 | 4496 | static INPUT_PORTS_START( metafox ) |
| 4497 | | PORT_START_TAG("IN0") //Player 1 |
| 4497 | PORT_START_TAG("P1") //Player 1 |
| 4498 | 4498 | JOY_TYPE2_2BUTTONS(1) |
| 4499 | 4499 | |
| 4500 | | PORT_START_TAG("IN1") //Player 2 |
| 4500 | PORT_START_TAG("P2") //Player 2 |
| 4501 | 4501 | JOY_TYPE2_2BUTTONS(2) |
| 4502 | 4502 | |
| 4503 | | PORT_START_TAG("IN2") //Coins |
| 4504 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4505 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4506 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4507 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4508 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 4509 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4503 | PORT_START_TAG("COINS") //Coins |
| 4504 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4505 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4506 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4507 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4508 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT ) |
| 4509 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4510 | 4510 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4511 | 4511 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4512 | 4512 | |
| 4513 | | PORT_START_TAG("IN3") //$600001 & 3.b |
| 4513 | PORT_START_TAG("DSW") //$600001 & 3.b |
| 4514 | 4514 | PORT_DIPNAME( 0x4001, 0x4001, "Licensed To" ) |
| 4515 | 4515 | PORT_DIPSETTING( 0x0001, "Jordan" ) |
| 4516 | 4516 | PORT_DIPSETTING( 0x4001, "Romstar" ) |
| r2956 | r2957 | |
| 4563 | 4563 | |
| 4564 | 4564 | |
| 4565 | 4565 | static INPUT_PORTS_START( msgundam ) |
| 4566 | | PORT_START_TAG("IN0") //Player 1 - $400000.w |
| 4566 | PORT_START_TAG("P1") //Player 1 - $400000.w |
| 4567 | 4567 | JOY_TYPE1_2BUTTONS(1) |
| 4568 | 4568 | |
| 4569 | | PORT_START_TAG("IN1") //Player 2 - $400002.w |
| 4569 | PORT_START_TAG("P2") //Player 2 - $400002.w |
| 4570 | 4570 | JOY_TYPE1_2BUTTONS(2) |
| 4571 | 4571 | |
| 4572 | | PORT_START_TAG("IN2") //Coins - $400004.w |
| 4572 | PORT_START_TAG("COINS") //Coins - $400004.w |
| 4573 | 4573 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4574 | 4574 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4575 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4576 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 4577 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4578 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4579 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4575 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4576 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 4577 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4578 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4579 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4580 | 4580 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Language ) ) |
| 4581 | 4581 | PORT_DIPSETTING( 0x0080, DEF_STR( English ) ) |
| 4582 | 4582 | PORT_DIPSETTING( 0x0000, DEF_STR( Japanese ) ) |
| 4583 | 4583 | |
| 4584 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4584 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4585 | 4585 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 4586 | 4586 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) |
| 4587 | 4587 | PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 4633 | 4633 | static INPUT_PORTS_START( msgunda1 ) |
| 4634 | 4634 | PORT_INCLUDE(msgundam) |
| 4635 | 4635 | |
| 4636 | | PORT_MODIFY("IN2") // IN2 - Coins - $400004.w |
| 4636 | PORT_MODIFY("COINS") // IN2 - Coins - $400004.w |
| 4637 | 4637 | /* this set seems to be a japan set, english mode doesn't work correctly */ |
| 4638 | 4638 | PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Language ) ) |
| 4639 | 4639 | // PORT_DIPSETTING( 0x0080, DEF_STR( English ) ) |
| r2956 | r2957 | |
| 4646 | 4646 | ***************************************************************************/ |
| 4647 | 4647 | |
| 4648 | 4648 | static INPUT_PORTS_START( oisipuzl ) |
| 4649 | | PORT_START_TAG("IN0") //Player 1 |
| 4649 | PORT_START_TAG("P1") //Player 1 |
| 4650 | 4650 | JOY_TYPE1_2BUTTONS(1) |
| 4651 | 4651 | |
| 4652 | | PORT_START_TAG("IN1") //Player 2 |
| 4652 | PORT_START_TAG("P2") //Player 2 |
| 4653 | 4653 | JOY_TYPE1_2BUTTONS(2) |
| 4654 | 4654 | |
| 4655 | | PORT_START_TAG("IN2") //Coins |
| 4656 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4657 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4658 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4655 | PORT_START_TAG("COINS") //Coins |
| 4656 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4657 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4658 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4659 | 4659 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 4660 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4661 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4662 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4663 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4660 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4661 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4662 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4663 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4664 | 4664 | |
| 4665 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4665 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4666 | 4666 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 4667 | 4667 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 4668 | 4668 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 4706 | 4706 | ***************************************************************************/ |
| 4707 | 4707 | |
| 4708 | 4708 | static INPUT_PORTS_START( kiwame ) |
| 4709 | | PORT_START_TAG("IN0") //Unused |
| 4710 | | PORT_START_TAG("IN1") //Unused |
| 4709 | PORT_START_TAG("P1") //Unused |
| 4710 | PORT_START_TAG("P2") //Unused |
| 4711 | 4711 | |
| 4712 | | PORT_START_TAG("IN2") //Coins |
| 4712 | PORT_START_TAG("COINS") //Coins |
| 4713 | 4713 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4714 | 4714 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4715 | 4715 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(5) |
| 4716 | 4716 | |
| 4717 | | PORT_START_TAG("IN3") //2 DSWs - $e00001 & 3.b |
| 4717 | PORT_START_TAG("DSW") //2 DSWs - $e00001 & 3.b |
| 4718 | 4718 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 4719 | 4719 | PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) |
| 4720 | 4720 | PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 4773 | 4773 | 5 st bt |
| 4774 | 4774 | */ |
| 4775 | 4775 | |
| 4776 | | PORT_START_TAG("IN4") |
| 4777 | | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) |
| 4778 | | PORT_BIT (0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4779 | | PORT_BIT (0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4780 | | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) |
| 4781 | | PORT_BIT (0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4776 | PORT_START_TAG("KEY0") |
| 4777 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) |
| 4778 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4779 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4780 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) |
| 4781 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4782 | 4782 | |
| 4783 | | PORT_START_TAG("IN5") |
| 4784 | | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 4785 | | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 4786 | | PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 4787 | | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 4788 | | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 4789 | | PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) |
| 4790 | | PORT_BIT (0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4783 | PORT_START_TAG("KEY1") |
| 4784 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 4785 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 4786 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 4787 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 4788 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 4789 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) |
| 4790 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4791 | 4791 | |
| 4792 | | PORT_START_TAG("IN6") |
| 4793 | | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 4794 | | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 4795 | | PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 4796 | | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 4797 | | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 4792 | PORT_START_TAG("KEY2") |
| 4793 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 4794 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 4795 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 4796 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 4797 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 4798 | 4798 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 ) |
| 4799 | | PORT_BIT (0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4799 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4800 | 4800 | |
| 4801 | | PORT_START_TAG("IN7") |
| 4802 | | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 4803 | | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 4804 | | PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 4805 | | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 4806 | | PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 4807 | | PORT_BIT (0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4801 | PORT_START_TAG("KEY3") |
| 4802 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 4803 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 4804 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 4805 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 4806 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 4807 | PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4808 | 4808 | |
| 4809 | | PORT_START_TAG("IN8") |
| 4810 | | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 4811 | | PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 4812 | | PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 4813 | | PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 4814 | | PORT_BIT (0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4809 | PORT_START_TAG("KEY4") |
| 4810 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 4811 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 4812 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 4813 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 4814 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4815 | 4815 | INPUT_PORTS_END |
| 4816 | 4816 | |
| 4817 | 4817 | |
| r2956 | r2957 | |
| 4821 | 4821 | ***************************************************************************/ |
| 4822 | 4822 | |
| 4823 | 4823 | static INPUT_PORTS_START( qzkklogy ) |
| 4824 | | PORT_START_TAG("IN0") //Player 1 - $b00001.b |
| 4825 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 4826 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 4827 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 4828 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 4829 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("P1 Pause (Cheat)")// pause (cheat) |
| 4830 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4831 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4832 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 4824 | PORT_START_TAG("P1") //Player 1 - $b00001.b |
| 4825 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 4826 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 4827 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 4828 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 4829 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME("P1 Pause (Cheat)")// pause (cheat) |
| 4830 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4831 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4832 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 4833 | 4833 | |
| 4834 | | PORT_START_TAG("IN1") //Player 2 - $b00003.b |
| 4835 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 4836 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 4837 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 4838 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 4839 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_PLAYER(2) PORT_NAME("P2 Pause (Cheat)")// pause (cheat) |
| 4840 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4841 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4842 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 4834 | PORT_START_TAG("P2") //Player 2 - $b00003.b |
| 4835 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 4836 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 4837 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 4838 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 4839 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_PLAYER(2) PORT_NAME("P2 Pause (Cheat)")// pause (cheat) |
| 4840 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4841 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4842 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 4843 | 4843 | |
| 4844 | | PORT_START_TAG("IN2") //Coins - $b00005.b |
| 4844 | PORT_START_TAG("COINS") //Coins - $b00005.b |
| 4845 | 4845 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4846 | 4846 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4847 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4848 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4847 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4848 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4849 | 4849 | |
| 4850 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4850 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4851 | 4851 | PORT_DIPNAME( 0x0003, 0x0003, "Unknown 1-0&1*" ) /* Manual States dips 1-5 are unused */ |
| 4852 | 4852 | PORT_DIPSETTING( 0x0000, "0" ) |
| 4853 | 4853 | PORT_DIPSETTING( 0x0001, "1" ) |
| r2956 | r2957 | |
| 4901 | 4901 | ***************************************************************************/ |
| 4902 | 4902 | |
| 4903 | 4903 | static INPUT_PORTS_START( qzkklgy2 ) |
| 4904 | | PORT_START_TAG("IN0") //Player 1 - $b00001.b |
| 4905 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 4906 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 4907 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 4908 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 4909 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4910 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4911 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4912 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 4904 | PORT_START_TAG("P1") //Player 1 - $b00001.b |
| 4905 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 4906 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 4907 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 4908 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 4909 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4910 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4911 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4912 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 4913 | 4913 | |
| 4914 | | PORT_START_TAG("IN1") //Player 2 - $b00003.b |
| 4915 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 4916 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 4917 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 4918 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 4919 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4920 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4921 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4922 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 4914 | PORT_START_TAG("P2") //Player 2 - $b00003.b |
| 4915 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 4916 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 4917 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 4918 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 4919 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4920 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4921 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4922 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 4923 | 4923 | |
| 4924 | | PORT_START_TAG("IN2") //Coins - $b00005.b |
| 4924 | PORT_START_TAG("COINS") //Coins - $b00005.b |
| 4925 | 4925 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4926 | 4926 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4927 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4928 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4927 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4928 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4929 | 4929 | |
| 4930 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4930 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 4931 | 4931 | PORT_DIPNAME( 0x0003, 0x0003, "Unknown 1-0&1*" ) /* Manual States dips 1-5 are unused */ |
| 4932 | 4932 | PORT_DIPSETTING( 0x0000, "0" ) |
| 4933 | 4933 | PORT_DIPSETTING( 0x0001, "1" ) |
| r2956 | r2957 | |
| 4980 | 4980 | ***************************************************************************/ |
| 4981 | 4981 | |
| 4982 | 4982 | static INPUT_PORTS_START( rezon ) |
| 4983 | | PORT_START_TAG("IN0") //Player 1 |
| 4983 | PORT_START_TAG("P1") //Player 1 |
| 4984 | 4984 | JOY_TYPE1_3BUTTONS(1) // 1 used?? |
| 4985 | 4985 | |
| 4986 | | PORT_START_TAG("IN1") //Player 2 |
| 4986 | PORT_START_TAG("P2") //Player 2 |
| 4987 | 4987 | JOY_TYPE1_3BUTTONS(2) // 1 used ?? |
| 4988 | 4988 | |
| 4989 | | PORT_START_TAG("IN2") //Coins |
| 4989 | PORT_START_TAG("COINS") //Coins |
| 4990 | 4990 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 4991 | 4991 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 4992 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4992 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4993 | 4993 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW) |
| 4994 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no taito logo |
| 4995 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4996 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4997 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4994 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no taito logo |
| 4995 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4996 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4997 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4998 | 4998 | |
| 4999 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 4999 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5000 | 5000 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1") |
| 5001 | 5001 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 5002 | 5002 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5046 | 5046 | |
| 5047 | 5047 | PORT_INCLUDE( rezon ) |
| 5048 | 5048 | |
| 5049 | | PORT_MODIFY("IN2") |
| 5050 | | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gives the taito logo |
| 5049 | PORT_MODIFY("COINS") |
| 5050 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gives the taito logo |
| 5051 | 5051 | INPUT_PORTS_END |
| 5052 | 5052 | |
| 5053 | 5053 | /*************************************************************************** |
| r2956 | r2957 | |
| 5059 | 5059 | pressing P1's button3 freezes the game (pressing P2's button3 resumes it). |
| 5060 | 5060 | */ |
| 5061 | 5061 | static INPUT_PORTS_START( neobattl ) |
| 5062 | | PORT_START_TAG("IN0") // Player 1 - $400000.w |
| 5062 | PORT_START_TAG("P1") // Player 1 - $400000.w |
| 5063 | 5063 | JOY_TYPE1_1BUTTON(1) // bump to 3 buttons for freezing to work |
| 5064 | 5064 | |
| 5065 | | PORT_START_TAG("IN1") //Player 2 - $400002.w |
| 5065 | PORT_START_TAG("P2") //Player 2 - $400002.w |
| 5066 | 5066 | JOY_TYPE1_1BUTTON(2) // bump to 3 buttons for freezing to work |
| 5067 | 5067 | |
| 5068 | | PORT_START_TAG("IN2") //Coins - $400004.w |
| 5068 | PORT_START_TAG("COINS") //Coins - $400004.w |
| 5069 | 5069 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5070 | 5070 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5071 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5072 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5073 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5074 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5075 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5076 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5071 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5072 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5073 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5074 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5075 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5076 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5077 | 5077 | |
| 5078 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 5078 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5079 | 5079 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) |
| 5080 | 5080 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 5081 | 5081 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5135 | 5135 | ***************************************************************************/ |
| 5136 | 5136 | |
| 5137 | 5137 | static INPUT_PORTS_START( sokonuke ) |
| 5138 | | PORT_START_TAG("IN0") //Player 1 |
| 5138 | PORT_START_TAG("P1") //Player 1 |
| 5139 | 5139 | JOY_TYPE1_1BUTTON(1) |
| 5140 | 5140 | |
| 5141 | | PORT_START_TAG("IN1") //Player 2 |
| 5141 | PORT_START_TAG("P2") //Player 2 |
| 5142 | 5142 | JOY_TYPE1_1BUTTON(2) |
| 5143 | 5143 | |
| 5144 | | PORT_START_TAG("IN2") //Coins |
| 5144 | PORT_START_TAG("COINS") //Coins |
| 5145 | 5145 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5146 | 5146 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5147 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5147 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5148 | 5148 | PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) |
| 5149 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5150 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5151 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5152 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5149 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5150 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5151 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5152 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5153 | 5153 | |
| 5154 | | PORT_START_TAG("IN3") //2 DSWs - $400009 & b.b |
| 5154 | PORT_START_TAG("DSW") //2 DSWs - $400009 & b.b |
| 5155 | 5155 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) |
| 5156 | 5156 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 5157 | 5157 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5207 | 5207 | ***************************************************************************/ |
| 5208 | 5208 | |
| 5209 | 5209 | static INPUT_PORTS_START( stg ) |
| 5210 | | PORT_START_TAG("IN0") //Player 1 - $b00001.b |
| 5210 | PORT_START_TAG("P1") //Player 1 - $b00001.b |
| 5211 | 5211 | JOY_TYPE1_2BUTTONS(1) |
| 5212 | 5212 | |
| 5213 | | PORT_START_TAG("IN1") //Player 2 - $b00003.b |
| 5213 | PORT_START_TAG("P2") //Player 2 - $b00003.b |
| 5214 | 5214 | JOY_TYPE1_2BUTTONS(2) |
| 5215 | 5215 | |
| 5216 | | PORT_START_TAG("IN2") //Coins - $b00005.b |
| 5216 | PORT_START_TAG("COINS") //Coins - $b00005.b |
| 5217 | 5217 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5218 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5219 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5220 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5218 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5219 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5220 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5221 | 5221 | // PORT_DIPNAME( 0x00f0, 0x00f0, "Title" ) |
| 5222 | 5222 | /* This is the index in a table with pointers to the |
| 5223 | 5223 | title logo, but the table is filled with just 1 value */ |
| 5224 | 5224 | |
| 5225 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 5225 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5226 | 5226 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 5227 | 5227 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) // 0 |
| 5228 | 5228 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) // 4 |
| r2956 | r2957 | |
| 5264 | 5264 | ***************************************************************************/ |
| 5265 | 5265 | |
| 5266 | 5266 | static INPUT_PORTS_START( thunderl ) |
| 5267 | | PORT_START_TAG("IN0") //Player 1 |
| 5267 | PORT_START_TAG("P1") //Player 1 |
| 5268 | 5268 | JOY_TYPE1_2BUTTONS(1) // button2 = speed up |
| 5269 | 5269 | |
| 5270 | | PORT_START_TAG("IN1") //Player 2 |
| 5270 | PORT_START_TAG("P2") //Player 2 |
| 5271 | 5271 | JOY_TYPE1_2BUTTONS(2) |
| 5272 | 5272 | |
| 5273 | | PORT_START_TAG("IN2") //Coins + DSW |
| 5273 | PORT_START_TAG("COINS") //Coins + DSW |
| 5274 | 5274 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5275 | 5275 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5276 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5277 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5276 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5277 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5278 | 5278 | PORT_DIPNAME( 0x0010, 0x0000, "Force 1 Life" ) |
| 5279 | 5279 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 5280 | 5280 | PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5288 | 5288 | // PORT_DIPSETTING( 0x0020, DEF_STR( None ) ) |
| 5289 | 5289 | // PORT_DIPSETTING( 0x0000, DEF_STR( None ) ) |
| 5290 | 5290 | |
| 5291 | | PORT_START_TAG("IN3") //2 DSWs - $600003 & 1.b |
| 5291 | PORT_START_TAG("DSW") //2 DSWs - $600003 & 1.b |
| 5292 | 5292 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 5293 | 5293 | PORT_DIPSETTING( 0x000c, DEF_STR( 4C_1C ) ) |
| 5294 | 5294 | PORT_DIPSETTING( 0x000d, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 5345 | 5345 | PORT_DIPSETTING( 0xc000, DEF_STR( Normal ) ) |
| 5346 | 5346 | PORT_DIPSETTING( 0x4000, DEF_STR( Hard ) ) |
| 5347 | 5347 | PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) |
| 5348 | |
| 5349 | /* These are needed due to the memory map shared with Wit's */ |
| 5350 | PORT_START_TAG("P3") |
| 5351 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 5352 | |
| 5353 | PORT_START_TAG("P4") //Player 4 |
| 5354 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 5348 | 5355 | INPUT_PORTS_END |
| 5349 | 5356 | |
| 5350 | 5357 | |
| r2956 | r2957 | |
| 5354 | 5361 | ***************************************************************************/ |
| 5355 | 5362 | |
| 5356 | 5363 | static INPUT_PORTS_START( tndrcade ) |
| 5357 | | PORT_START_TAG("IN0") //Player 1 |
| 5364 | PORT_START_TAG("P1") //Player 1 |
| 5358 | 5365 | JOY_TYPE1_2BUTTONS(1) |
| 5359 | 5366 | |
| 5360 | | PORT_START_TAG("IN1") //Player 2 |
| 5367 | PORT_START_TAG("P2") //Player 2 |
| 5361 | 5368 | JOY_TYPE1_2BUTTONS(2) |
| 5362 | 5369 | |
| 5363 | | PORT_START_TAG("IN2") //Coins |
| 5370 | PORT_START_TAG("COINS") //Coins |
| 5364 | 5371 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5365 | 5372 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5366 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 5367 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 ) |
| 5368 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5369 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_TILT ) |
| 5370 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5371 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5373 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 5374 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 ) |
| 5375 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5376 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_TILT ) |
| 5377 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5378 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5372 | 5379 | |
| 5373 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 5380 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5374 | 5381 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 5375 | 5382 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 5376 | 5383 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 5423 | 5430 | static INPUT_PORTS_START( tndrcadj ) |
| 5424 | 5431 | PORT_INCLUDE(tndrcade) |
| 5425 | 5432 | |
| 5426 | | PORT_MODIFY("IN3") //2 DSWs - $600001 & 3.b |
| 5433 | PORT_MODIFY("DSW") //2 DSWs - $600001 & 3.b |
| 5427 | 5434 | PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8") |
| 5428 | 5435 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 5429 | 5436 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5440 | 5447 | ***************************************************************************/ |
| 5441 | 5448 | |
| 5442 | 5449 | static INPUT_PORTS_START( twineagl ) |
| 5443 | | PORT_START_TAG("IN0") //Player 1 |
| 5450 | PORT_START_TAG("P1") //Player 1 |
| 5444 | 5451 | JOY_TYPE1_2BUTTONS(1) |
| 5445 | 5452 | |
| 5446 | | PORT_START_TAG("IN1") //Player 2 |
| 5453 | PORT_START_TAG("P2") //Player 2 |
| 5447 | 5454 | JOY_TYPE1_2BUTTONS(2) |
| 5448 | 5455 | |
| 5449 | | PORT_START_TAG("IN2") //Coins |
| 5456 | PORT_START_TAG("COINS") //Coins |
| 5450 | 5457 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5451 | 5458 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5452 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 5453 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 ) |
| 5454 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5455 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_TILT ) |
| 5456 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5457 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5459 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 5460 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 ) |
| 5461 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5462 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_TILT ) |
| 5463 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5464 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5458 | 5465 | |
| 5459 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 5466 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5460 | 5467 | PORT_DIPNAME( 0x4001, 0x4001, "Copyright" ) // Always "Seta" if sim. players = 1 |
| 5461 | 5468 | PORT_DIPSETTING( 0x4001, "Seta (Taito license)" ) |
| 5462 | 5469 | PORT_DIPSETTING( 0x0001, "Taito" ) |
| r2956 | r2957 | |
| 5506 | 5513 | ***************************************************************************/ |
| 5507 | 5514 | |
| 5508 | 5515 | static INPUT_PORTS_START( umanclub ) |
| 5509 | | PORT_START_TAG("IN0") //Player 1 |
| 5516 | PORT_START_TAG("P1") //Player 1 |
| 5510 | 5517 | JOY_TYPE1_2BUTTONS(1) |
| 5511 | 5518 | |
| 5512 | | PORT_START_TAG("IN1") //Player 2 |
| 5519 | PORT_START_TAG("P2") //Player 2 |
| 5513 | 5520 | JOY_TYPE1_2BUTTONS(2) |
| 5514 | 5521 | |
| 5515 | | PORT_START_TAG("IN2") //Coins |
| 5522 | PORT_START_TAG("COINS") //Coins |
| 5516 | 5523 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5517 | 5524 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5518 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5519 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5520 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5521 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5522 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5523 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5525 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5526 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5527 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5528 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5529 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5530 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5524 | 5531 | |
| 5525 | | PORT_START_TAG("IN3") //2 DSWs |
| 5532 | PORT_START_TAG("DSW") //2 DSWs |
| 5526 | 5533 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) |
| 5527 | 5534 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 5528 | 5535 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5581 | 5588 | ***************************************************************************/ |
| 5582 | 5589 | |
| 5583 | 5590 | static INPUT_PORTS_START( utoukond ) |
| 5584 | | PORT_START_TAG("IN0") //Player 1 |
| 5591 | PORT_START_TAG("P1") //Player 1 |
| 5585 | 5592 | JOY_TYPE1_3BUTTONS(1) |
| 5586 | 5593 | |
| 5587 | | PORT_START_TAG("IN1") //Player 2 |
| 5594 | PORT_START_TAG("P2") //Player 2 |
| 5588 | 5595 | JOY_TYPE1_3BUTTONS(2) |
| 5589 | 5596 | |
| 5590 | | PORT_START_TAG("IN2") //Coins |
| 5597 | PORT_START_TAG("COINS") //Coins |
| 5591 | 5598 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5592 | 5599 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5593 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5594 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5600 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5601 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5595 | 5602 | /* These are NOT Dip Switches but jumpers */ |
| 5596 | 5603 | PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) |
| 5597 | 5604 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 5606 | 5613 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 5607 | 5614 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 5608 | 5615 | |
| 5609 | | PORT_START_TAG("IN3") //2 DSWs |
| 5616 | PORT_START_TAG("DSW") //2 DSWs |
| 5610 | 5617 | PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3,4") |
| 5611 | 5618 | PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) ) |
| 5612 | 5619 | PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 5760 | 5767 | ***************************************************************************/ |
| 5761 | 5768 | |
| 5762 | 5769 | static INPUT_PORTS_START( wrofaero ) |
| 5763 | | PORT_START_TAG("IN0") //Player 1 - $400000.w |
| 5770 | PORT_START_TAG("P1") //Player 1 - $400000.w |
| 5764 | 5771 | JOY_TYPE1_3BUTTONS(1) // 3rd button selects the weapon |
| 5765 | 5772 | // when the dsw for cheating is on |
| 5766 | 5773 | |
| 5767 | | PORT_START_TAG("IN1") //Player 2 - $400002.w |
| 5774 | PORT_START_TAG("P2") //Player 2 - $400002.w |
| 5768 | 5775 | JOY_TYPE1_3BUTTONS(2) |
| 5769 | 5776 | |
| 5770 | | PORT_START_TAG("IN2") //Coins - $400004.w |
| 5777 | PORT_START_TAG("COINS") //Coins - $400004.w |
| 5771 | 5778 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5772 | 5779 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5773 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5774 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5775 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5776 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5777 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5778 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5780 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5781 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5782 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5783 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5784 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5785 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5779 | 5786 | |
| 5780 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 5787 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5781 | 5788 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:1") |
| 5782 | 5789 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 5783 | 5790 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5831 | 5838 | ***************************************************************************/ |
| 5832 | 5839 | |
| 5833 | 5840 | static INPUT_PORTS_START( wits ) |
| 5834 | | PORT_START_TAG("IN0") //Player 1 |
| 5841 | PORT_START_TAG("P1") //Player 1 |
| 5835 | 5842 | JOY_TYPE1_2BUTTONS(1) |
| 5836 | 5843 | |
| 5837 | | PORT_START_TAG("IN1") //Player 2 |
| 5844 | PORT_START_TAG("P2") //Player 2 |
| 5838 | 5845 | JOY_TYPE1_2BUTTONS(2) |
| 5839 | 5846 | |
| 5840 | | PORT_START_TAG("IN2") //Coins + DSW |
| 5847 | PORT_START_TAG("COINS") //Coins + DSW |
| 5841 | 5848 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5842 | 5849 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5843 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5844 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5850 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5851 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5845 | 5852 | PORT_DIPNAME( 0x0010, 0x0010, "Unknown 3-4*" ) // Jumpers, I guess |
| 5846 | 5853 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| 5847 | 5854 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5854 | 5861 | PORT_DIPSETTING( 0x0040, "Visco (Japan Only)" ) |
| 5855 | 5862 | PORT_DIPSETTING( 0x0000, "Athena (Japan Only)" ) |
| 5856 | 5863 | |
| 5857 | | PORT_START_TAG("IN3") //2 DSWs - $600003 & 1.b |
| 5864 | PORT_START_TAG("DSW") //2 DSWs - $600003 & 1.b |
| 5858 | 5865 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") |
| 5859 | 5866 | PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) ) |
| 5860 | 5867 | PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 5898 | 5905 | PORT_DIPSETTING( 0x4000, DEF_STR( 1C_4C ) ) |
| 5899 | 5906 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) ) |
| 5900 | 5907 | |
| 5901 | | PORT_START_TAG("IN4") //Player 3 |
| 5908 | PORT_START_TAG("P3") //Player 3 |
| 5902 | 5909 | JOY_TYPE1_2BUTTONS(3) |
| 5903 | 5910 | |
| 5904 | | PORT_START_TAG("IN5") //Player 4 |
| 5911 | PORT_START_TAG("P4") //Player 4 |
| 5905 | 5912 | JOY_TYPE1_2BUTTONS(4) |
| 5906 | 5913 | INPUT_PORTS_END |
| 5907 | 5914 | |
| r2956 | r2957 | |
| 5911 | 5918 | ***************************************************************************/ |
| 5912 | 5919 | |
| 5913 | 5920 | static INPUT_PORTS_START( zingzip ) |
| 5914 | | PORT_START_TAG("IN0") //Player 1 - $400000.w |
| 5921 | PORT_START_TAG("P1") //Player 1 - $400000.w |
| 5915 | 5922 | JOY_TYPE1_2BUTTONS(1) |
| 5916 | 5923 | |
| 5917 | | PORT_START_TAG("IN1") //Player 2 - $400002.w |
| 5924 | PORT_START_TAG("P2") //Player 2 - $400002.w |
| 5918 | 5925 | JOY_TYPE1_2BUTTONS(2) |
| 5919 | 5926 | |
| 5920 | | PORT_START_TAG("IN2") //Coins - $400004.w |
| 5927 | PORT_START_TAG("COINS") //Coins - $400004.w |
| 5921 | 5928 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5922 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no coin 2 |
| 5923 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5924 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5925 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5926 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5927 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5928 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5929 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no coin 2 |
| 5930 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5931 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5932 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5933 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5934 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5935 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 5929 | 5936 | |
| 5930 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 5937 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 5931 | 5938 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1") |
| 5932 | 5939 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 5933 | 5940 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 5975 | 5982 | *************************************/ |
| 5976 | 5983 | |
| 5977 | 5984 | static INPUT_PORTS_START( pairlove ) |
| 5978 | | PORT_START_TAG("IN0") //Player 1 - $500001.b |
| 5985 | PORT_START_TAG("P1") //Player 1 - $500001.b |
| 5979 | 5986 | JOY_TYPE1_2BUTTONS(1) // button2 = speed up |
| 5980 | 5987 | |
| 5981 | | PORT_START_TAG("IN1") //Player 2 - $500003.b |
| 5988 | PORT_START_TAG("P2") //Player 2 - $500003.b |
| 5982 | 5989 | JOY_TYPE1_2BUTTONS(2) |
| 5983 | 5990 | |
| 5984 | | PORT_START_TAG("IN2") //Coins + DSW - $500005.b |
| 5991 | PORT_START_TAG("COINS") //Coins + DSW - $500005.b |
| 5985 | 5992 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 5986 | 5993 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 5987 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5988 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5994 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 5995 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) |
| 5989 | 5996 | |
| 5990 | 5997 | PORT_START_TAG("DSW") // 2 DIP switches |
| 5991 | 5998 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1") |
| r2956 | r2957 | |
| 6032 | 6039 | ***************************************************************************/ |
| 6033 | 6040 | |
| 6034 | 6041 | static INPUT_PORTS_START( orbs ) |
| 6035 | | PORT_START_TAG("IN0") //Player 1 |
| 6042 | PORT_START_TAG("P1") //Player 1 |
| 6036 | 6043 | JOY_TYPE1_1BUTTON(1) |
| 6037 | 6044 | |
| 6038 | | PORT_START_TAG("IN1") //Player 2 ?? |
| 6045 | PORT_START_TAG("P2") //Player 2 ?? |
| 6039 | 6046 | JOY_TYPE1_1BUTTON(2) |
| 6040 | 6047 | |
| 6041 | | PORT_START_TAG("IN2") //Coins |
| 6048 | PORT_START_TAG("COINS") //Coins |
| 6042 | 6049 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) |
| 6043 | 6050 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) |
| 6044 | 6051 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_IMPULSE(5) |
| 6045 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6046 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6047 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6048 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6049 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6052 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6053 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6054 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6055 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6056 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6050 | 6057 | |
| 6051 | | PORT_START_TAG("IN3") //2 DSWs - $600001 & 3.b |
| 6058 | PORT_START_TAG("DSW") //2 DSWs - $600001 & 3.b |
| 6052 | 6059 | PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1") |
| 6053 | 6060 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 6054 | 6061 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 6102 | 6109 | ***************************************************************************/ |
| 6103 | 6110 | |
| 6104 | 6111 | static INPUT_PORTS_START( crazyfgt ) |
| 6105 | | PORT_START_TAG("IN0") //Coins - $610000.w |
| 6112 | PORT_START_TAG("COINS") //Coins - $610000.w |
| 6106 | 6113 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 6107 | 6114 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 6108 | 6115 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 6112 | 6119 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6113 | 6120 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) // protection |
| 6114 | 6121 | |
| 6115 | | PORT_START_TAG("IN1") //? - $610002.w |
| 6116 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6117 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6118 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6119 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6120 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6121 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6122 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6123 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6122 | PORT_START_TAG("UNK") //? - $610002.w |
| 6123 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6124 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6125 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6126 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6127 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6128 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6129 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6130 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6124 | 6131 | |
| 6125 | | PORT_START_TAG("IN2") //Player - $610004.w |
| 6132 | PORT_START_TAG("INPUT") //Player - $610004.w |
| 6126 | 6133 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("top-center") PORT_CODE(KEYCODE_5_PAD) |
| 6127 | 6134 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("bottom-center") PORT_CODE(KEYCODE_2_PAD) |
| 6128 | 6135 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("top-left") PORT_CODE(KEYCODE_4_PAD) |
| r2956 | r2957 | |
| 6132 | 6139 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6133 | 6140 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SERVICE1 ) // ticket |
| 6134 | 6141 | |
| 6135 | | PORT_START_TAG("IN3") //2 DSWs - $630001 & 3.b |
| 6142 | PORT_START_TAG("DSW") //2 DSWs - $630001 & 3.b |
| 6136 | 6143 | PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW2:1,2,3") |
| 6137 | 6144 | PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) |
| 6138 | 6145 | PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) ) |
| r2956 | r2957 | |
| 6183 | 6190 | ***************************************************************************/ |
| 6184 | 6191 | |
| 6185 | 6192 | static INPUT_PORTS_START( inttoote ) |
| 6186 | | PORT_START_TAG("IN0") // DSW 1 |
| 6193 | PORT_START_TAG("DSW1") // DSW 1 |
| 6187 | 6194 | PORT_DIPNAME( 0x03, 0x03, "Max Bet" ) |
| 6188 | 6195 | PORT_DIPSETTING( 0x03, "10" ) |
| 6189 | 6196 | PORT_DIPSETTING( 0x02, "20" ) |
| r2956 | r2957 | |
| 6208 | 6215 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 6209 | 6216 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 6210 | 6217 | |
| 6211 | | PORT_START_TAG("IN1") // DSW 2&3 |
| 6218 | PORT_START_TAG("DSW2_3") // DSW 2&3 |
| 6212 | 6219 | PORT_DIPNAME( 0x0001, 0x0001, "Unknown 2-0" ) |
| 6213 | 6220 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 6214 | 6221 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 6262 | 6269 | PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) |
| 6263 | 6270 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 6264 | 6271 | |
| 6265 | | PORT_START_TAG("IN2") |
| 6272 | PORT_START_TAG("IN0") |
| 6266 | 6273 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6267 | 6274 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6268 | 6275 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) // P1 coin out |
| r2956 | r2957 | |
| 6280 | 6287 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6281 | 6288 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6282 | 6289 | |
| 6283 | | PORT_START_TAG("IN3") |
| 6290 | PORT_START_TAG("IN1") |
| 6284 | 6291 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Door Open") PORT_TOGGLE |
| 6285 | 6292 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) |
| 6286 | 6293 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Question Mark") |
| r2956 | r2957 | |
| 6306 | 6313 | 5 1-6 (5H) |
| 6307 | 6314 | 6 (6) |
| 6308 | 6315 | */ |
| 6309 | | PORT_START_TAG("IN4") // 200000.w (0x08) |
| 6316 | PORT_START_TAG("BET0") // 200000.w (0x08) |
| 6310 | 6317 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1") PORT_CODE(KEYCODE_1_PAD) |
| 6311 | 6318 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2") PORT_CODE(KEYCODE_2_PAD) |
| 6312 | 6319 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3") PORT_CODE(KEYCODE_3_PAD) |
| r2956 | r2957 | |
| 6324 | 6331 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6325 | 6332 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6326 | 6333 | |
| 6327 | | PORT_START_TAG("IN5") // 200000.w (0x10) |
| 6334 | PORT_START_TAG("BET1") // 200000.w (0x10) |
| 6328 | 6335 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 6") PORT_CODE(KEYCODE_6_PAD) |
| 6329 | 6336 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Collect") |
| 6330 | 6337 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 6342 | 6349 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6343 | 6350 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6344 | 6351 | |
| 6345 | | PORT_START_TAG("IN6") // 200000.w (0x20) |
| 6352 | PORT_START_TAG("BET2") // 200000.w (0x20) |
| 6346 | 6353 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-2") PORT_CODE(KEYCODE_Q) |
| 6347 | 6354 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-3") PORT_CODE(KEYCODE_A) |
| 6348 | 6355 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 1-4") PORT_CODE(KEYCODE_Z) |
| r2956 | r2957 | |
| 6360 | 6367 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6361 | 6368 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6362 | 6369 | |
| 6363 | | PORT_START_TAG("IN7") // 200000.w (0x40) |
| 6370 | PORT_START_TAG("BET3") // 200000.w (0x40) |
| 6364 | 6371 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-3") PORT_CODE(KEYCODE_W) |
| 6365 | 6372 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-4") PORT_CODE(KEYCODE_S) |
| 6366 | 6373 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 2-5") PORT_CODE(KEYCODE_X) |
| r2956 | r2957 | |
| 6378 | 6385 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6379 | 6386 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6380 | 6387 | |
| 6381 | | PORT_START_TAG("IN8") // 200000.w (0x80) |
| 6388 | PORT_START_TAG("BET4") // 200000.w (0x80) |
| 6382 | 6389 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3-5") PORT_CODE(KEYCODE_D) |
| 6383 | 6390 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 3-6") PORT_CODE(KEYCODE_C) |
| 6384 | 6391 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Bet 4-5") PORT_CODE(KEYCODE_R) |
src/mame/drivers/tnzs.c
| r2956 | r2957 | |
| 247 | 247 | |
| 248 | 248 | #include "driver.h" |
| 249 | 249 | #include "deprecat.h" |
| 250 | #include "taitoipt.h" |
| 250 | 251 | #include "cpu/i8x41/i8x41.h" |
| 251 | 252 | #include "sound/2203intf.h" |
| 252 | 253 | #include "sound/dac.h" |
| r2956 | r2957 | |
| 444 | 445 | AM_RANGE(0x8000, 0x9fff) AM_READ(SMH_BANK2) |
| 445 | 446 | AM_RANGE(0xb000, 0xb000) AM_READ(YM2203_status_port_0_r) |
| 446 | 447 | AM_RANGE(0xb001, 0xb001) AM_READ(YM2203_read_port_0_r) |
| 447 | | AM_RANGE(0xc000, 0xc000) AM_READ(input_port_2_r) |
| 448 | | AM_RANGE(0xc001, 0xc001) AM_READ(input_port_3_r) |
| 449 | | AM_RANGE(0xc002, 0xc002) AM_READ(input_port_4_r) |
| 448 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") |
| 449 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN1") |
| 450 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("IN2") |
| 450 | 451 | AM_RANGE(0xd000, 0xdfff) AM_READ(SMH_RAM) |
| 451 | 452 | AM_RANGE(0xe000, 0xefff) AM_READ(tnzs_sharedram_r) |
| 452 | 453 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 472 | 473 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 473 | 474 | AM_RANGE(0x8000, 0x9fff) AM_ROMBANK(2) |
| 474 | 475 | AM_RANGE(0xa000, 0xa000) AM_WRITE(tnzs_bankswitch1_w) |
| 475 | | AM_RANGE(0xb002, 0xb002) AM_READ(input_port_0_r) |
| 476 | | AM_RANGE(0xb003, 0xb003) AM_READ(input_port_1_r) |
| 476 | AM_RANGE(0xb002, 0xb002) AM_READ_PORT("DSWA") |
| 477 | AM_RANGE(0xb003, 0xb003) AM_READ_PORT("DSWB") |
| 477 | 478 | AM_RANGE(0xb004, 0xb004) AM_WRITE(tnzsb_sound_command_w) |
| 478 | | AM_RANGE(0xc000, 0xc000) AM_READ(input_port_2_r) |
| 479 | | AM_RANGE(0xc001, 0xc001) AM_READ(input_port_3_r) |
| 480 | | AM_RANGE(0xc002, 0xc002) AM_READ(input_port_4_r) |
| 479 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") |
| 480 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN1") |
| 481 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("IN2") |
| 481 | 482 | AM_RANGE(0xd000, 0xdfff) AM_RAM |
| 482 | 483 | AM_RANGE(0xe000, 0xefff) AM_READWRITE(tnzs_sharedram_r, tnzs_sharedram_w) |
| 483 | 484 | AM_RANGE(0xf000, 0xf003) AM_READ(SMH_RAM) |
| r2956 | r2957 | |
| 488 | 489 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 489 | 490 | AM_RANGE(0x8000, 0x9fff) AM_ROMBANK(2) |
| 490 | 491 | AM_RANGE(0xa000, 0xa000) AM_WRITE(tnzs_bankswitch1_w) |
| 491 | | AM_RANGE(0xb002, 0xb002) AM_READ(input_port_0_r) |
| 492 | | AM_RANGE(0xb003, 0xb003) AM_READ(input_port_1_r) |
| 492 | AM_RANGE(0xb002, 0xb002) AM_READ_PORT("DSWA") |
| 493 | AM_RANGE(0xb003, 0xb003) AM_READ_PORT("DSWB") |
| 493 | 494 | AM_RANGE(0xb004, 0xb004) AM_WRITE(tnzsb_sound_command_w) |
| 494 | | AM_RANGE(0xc000, 0xc000) AM_READ(input_port_2_r) |
| 495 | | AM_RANGE(0xc001, 0xc001) AM_READ(input_port_3_r) |
| 496 | | AM_RANGE(0xc002, 0xc002) AM_READ(input_port_4_r) |
| 495 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN0") |
| 496 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN1") |
| 497 | AM_RANGE(0xc002, 0xc002) AM_READ_PORT("IN2") |
| 497 | 498 | AM_RANGE(0xd000, 0xdfff) AM_RAM |
| 498 | 499 | AM_RANGE(0xe000, 0xefff) AM_READWRITE(tnzs_sharedram_r, tnzs_sharedram_w) |
| 499 | 500 | AM_RANGE(0xf800, 0xfbff) AM_WRITE(paletteram_xRRRRRGGGGGBBBBB_le_w) AM_BASE(&paletteram) |
| r2956 | r2957 | |
| 536 | 537 | static ADDRESS_MAP_START( i8742_readport, ADDRESS_SPACE_IO, 8 ) |
| 537 | 538 | AM_RANGE(I8X41_p1, I8X41_p1) AM_READ(tnzs_port1_r) |
| 538 | 539 | AM_RANGE(I8X41_p2, I8X41_p2) AM_READ(tnzs_port2_r) |
| 539 | | AM_RANGE(I8X41_t0, I8X41_t0) AM_READ(input_port_5_r) |
| 540 | | AM_RANGE(I8X41_t1, I8X41_t1) AM_READ(input_port_6_r) |
| 540 | AM_RANGE(I8X41_t0, I8X41_t0) AM_READ_PORT("COIN1") |
| 541 | AM_RANGE(I8X41_t1, I8X41_t1) AM_READ_PORT("COIN2") |
| 541 | 542 | ADDRESS_MAP_END |
| 542 | 543 | |
| 543 | 544 | static ADDRESS_MAP_START( i8742_writeport, ADDRESS_SPACE_IO, 8 ) |
| r2956 | r2957 | |
| 602 | 603 | AM_RANGE(0x8000, 0x9fff) AM_READWRITE(SMH_BANK2, SMH_ROM) |
| 603 | 604 | |
| 604 | 605 | AM_RANGE(0xa000, 0xa000) AM_WRITE(jpopnics_subbankswitch_w) |
| 605 | | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_0_r) AM_WRITE(YM2151_register_port_0_w) |
| 606 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("IN0") AM_WRITE(YM2151_register_port_0_w) |
| 606 | 607 | AM_RANGE(0xb001, 0xb001) AM_READWRITE(YM2151_status_port_0_r, YM2151_data_port_0_w) |
| 607 | | AM_RANGE(0xc000, 0xc000) AM_READ(input_port_1_r) |
| 608 | | AM_RANGE(0xc001, 0xc001) AM_READ(input_port_2_r) |
| 609 | | AM_RANGE(0xc600, 0xc600) AM_READ(input_port_3_r) |
| 610 | | AM_RANGE(0xc601, 0xc601) AM_READ(input_port_4_r) |
| 608 | AM_RANGE(0xc000, 0xc000) AM_READ_PORT("IN1") |
| 609 | AM_RANGE(0xc001, 0xc001) AM_READ_PORT("IN2") |
| 610 | AM_RANGE(0xc600, 0xc600) AM_READ_PORT("DSWA") |
| 611 | AM_RANGE(0xc601, 0xc601) AM_READ_PORT("DSWB") |
| 611 | 612 | |
| 612 | 613 | AM_RANGE(0xd000, 0xdfff) AM_RAM |
| 613 | 614 | AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE(1) |
| r2956 | r2957 | |
| 615 | 616 | AM_RANGE(0xf000, 0xf003) AM_READ(arknoid2_sh_f000_r) |
| 616 | 617 | ADDRESS_MAP_END |
| 617 | 618 | |
| 618 | | #define TNZS_PLAYER_INPUT(_n_)\ |
| 619 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_)\ |
| 620 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_)\ |
| 621 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(_n_)\ |
| 622 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(_n_)\ |
| 623 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(_n_)\ |
| 624 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(_n_)\ |
| 625 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 626 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##_n_ ) |
| 627 | | |
| 628 | 619 | #define COMMON_IN2\ |
| 629 | 620 | PORT_START_TAG("IN2")\ |
| 630 | 621 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )\ |
| r2956 | r2957 | |
| 646 | 637 | PORT_BIT( 0x01, coinstate, IPT_COIN2 )\ |
| 647 | 638 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 648 | 639 | |
| 649 | | #define TAITO_COINAGE_JAPAN_8\ |
| 650 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )\ |
| 651 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )\ |
| 652 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )\ |
| 653 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )\ |
| 654 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )\ |
| 655 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )\ |
| 656 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) )\ |
| 657 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) )\ |
| 658 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) )\ |
| 659 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 660 | | |
| 661 | | #define TAITO_COINAGE_WORLD_8\ |
| 662 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )\ |
| 663 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )\ |
| 664 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) )\ |
| 665 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )\ |
| 666 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )\ |
| 667 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )\ |
| 668 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )\ |
| 669 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )\ |
| 670 | | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) )\ |
| 671 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 672 | | |
| 673 | 640 | static INPUT_PORTS_START( extrmatn ) |
| 674 | 641 | PORT_START_TAG("DSWA") |
| 675 | 642 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| r2956 | r2957 | |
| 682 | 649 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) |
| 683 | 650 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 684 | 651 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 685 | | TAITO_COINAGE_JAPAN_8 |
| 652 | TAITO_COINAGE_JAPAN_OLD |
| 686 | 653 | |
| 687 | 654 | PORT_START_TAG("DSWB") |
| 688 | 655 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| r2956 | r2957 | |
| 709 | 676 | PORT_DIPSETTING( 0x00, "*3" ) |
| 710 | 677 | |
| 711 | 678 | PORT_START_TAG("IN0") |
| 712 | | TNZS_PLAYER_INPUT(1) |
| 679 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 713 | 680 | |
| 714 | | |
| 715 | 681 | PORT_START_TAG("IN1") |
| 716 | | TNZS_PLAYER_INPUT(2) |
| 682 | TAITO_JOY_LRUD_2_BUTTONS_START( 2 ) |
| 717 | 683 | |
| 718 | 684 | COMMON_IN2 |
| 719 | 685 | COMMON_COIN1(IP_ACTIVE_HIGH) |
| 720 | 686 | COMMON_COIN2(IP_ACTIVE_HIGH) |
| 721 | 687 | INPUT_PORTS_END |
| 722 | 688 | |
| 723 | | #define ARKNOI2_COMMON\ |
| 724 | | PORT_START_TAG("DSWB")\ |
| 725 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )\ |
| 726 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )\ |
| 727 | | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )\ |
| 728 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )\ |
| 729 | | PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) )\ |
| 730 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )\ |
| 731 | | PORT_DIPSETTING( 0x00, "50k 150k" )\ |
| 732 | | PORT_DIPSETTING( 0x0c, "100k 200k" )\ |
| 733 | | PORT_DIPSETTING( 0x04, "50k Only" )\ |
| 734 | | PORT_DIPSETTING( 0x08, "100k Only" )\ |
| 735 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )\ |
| 736 | | PORT_DIPSETTING( 0x20, "2" )\ |
| 737 | | PORT_DIPSETTING( 0x30, "3" )\ |
| 738 | | PORT_DIPSETTING( 0x10, "4" )\ |
| 739 | | PORT_DIPSETTING( 0x00, "5" )\ |
| 740 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )\ |
| 741 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) )\ |
| 742 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) )\ |
| 743 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) )\ |
| 744 | | PORT_DIPSETTING( 0x80, DEF_STR( No ) )\ |
| 745 | | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )\ |
| 746 | | PORT_START_TAG("IN1") /* read at c000 (sound cpu) */\ |
| 747 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)\ |
| 748 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 749 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 750 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )\ |
| 751 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )\ |
| 752 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 753 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 754 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )\ |
| 755 | | PORT_START_TAG("EMPTY")\ |
| 756 | | COMMON_IN2\ |
| 757 | | COMMON_COIN1(IP_ACTIVE_HIGH)\ |
| 758 | | COMMON_COIN2(IP_ACTIVE_HIGH)\ |
| 759 | | PORT_START_TAG("AN1") /* spinner 1 - read at f000/1 */\ |
| 760 | | PORT_BIT ( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15)\ |
| 761 | | PORT_BIT ( 0x1000, IP_ACTIVE_LOW, IPT_COIN2 ) /* Mirrored for service mode */\ |
| 762 | | PORT_BIT ( 0x2000, IP_ACTIVE_HIGH, IPT_SERVICE1 ) /* Mirrored for service mode */\ |
| 763 | | PORT_BIT ( 0x4000, IP_ACTIVE_LOW, IPT_COIN1 ) /* Mirrored for service mode */\ |
| 764 | | PORT_BIT ( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 765 | | PORT_START_TAG("AN2") /* spinner 2 - read at f002/3 */\ |
| 766 | | PORT_BIT ( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2)\ |
| 767 | | PORT_BIT ( 0xf000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 768 | | |
| 769 | 689 | static INPUT_PORTS_START( arknoid2 ) |
| 770 | 690 | PORT_START_TAG("DSWA") |
| 771 | 691 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| r2956 | r2957 | |
| 778 | 698 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 779 | 699 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 780 | 700 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 781 | | TAITO_COINAGE_WORLD_8 |
| 782 | | ARKNOI2_COMMON |
| 701 | TAITO_COINAGE_WORLD |
| 702 | |
| 703 | PORT_START_TAG("DSWB") |
| 704 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 705 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 706 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| 707 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 708 | PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) |
| 709 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 710 | PORT_DIPSETTING( 0x00, "50k 150k" ) |
| 711 | PORT_DIPSETTING( 0x0c, "100k 200k" ) |
| 712 | PORT_DIPSETTING( 0x04, "50k Only" ) |
| 713 | PORT_DIPSETTING( 0x08, "100k Only" ) |
| 714 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) |
| 715 | PORT_DIPSETTING( 0x20, "2" ) |
| 716 | PORT_DIPSETTING( 0x30, "3" ) |
| 717 | PORT_DIPSETTING( 0x10, "4" ) |
| 718 | PORT_DIPSETTING( 0x00, "5" ) |
| 719 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 720 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 721 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 722 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) |
| 723 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) |
| 724 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 725 | |
| 726 | PORT_START_TAG("IN0") /* read at c000 (sound cpu) */ |
| 727 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 728 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 729 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 730 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) |
| 731 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 732 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 733 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 734 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 735 | |
| 736 | PORT_START_TAG("IN1") |
| 737 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 738 | |
| 739 | COMMON_IN2 |
| 740 | COMMON_COIN1(IP_ACTIVE_HIGH) |
| 741 | COMMON_COIN2(IP_ACTIVE_HIGH) |
| 742 | |
| 743 | PORT_START_TAG("AN1") /* spinner 1 - read at f000/1 */\ |
| 744 | PORT_BIT ( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15)\ |
| 745 | PORT_BIT ( 0x1000, IP_ACTIVE_LOW, IPT_COIN2 ) /* Mirrored for service mode */\ |
| 746 | PORT_BIT ( 0x2000, IP_ACTIVE_HIGH, IPT_SERVICE1 ) /* Mirrored for service mode */\ |
| 747 | PORT_BIT ( 0x4000, IP_ACTIVE_LOW, IPT_COIN1 ) /* Mirrored for service mode */\ |
| 748 | PORT_BIT ( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 749 | |
| 750 | PORT_START_TAG("AN2") /* spinner 2 - read at f002/3 */\ |
| 751 | PORT_BIT ( 0x0fff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2)\ |
| 752 | PORT_BIT ( 0xf000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 783 | 753 | INPUT_PORTS_END |
| 784 | 754 | |
| 785 | 755 | static INPUT_PORTS_START( arknid2u ) |
| 786 | | PORT_START_TAG("DSWA") |
| 787 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 788 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 789 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 790 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 791 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 792 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 793 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 794 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 795 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 796 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 797 | | TAITO_COINAGE_JAPAN_8 |
| 798 | | ARKNOI2_COMMON |
| 756 | PORT_INCLUDE( arknoid2 ) |
| 757 | |
| 758 | PORT_MODIFY("DSWA") |
| 759 | TAITO_COINAGE_JAPAN_OLD |
| 799 | 760 | INPUT_PORTS_END |
| 800 | 761 | |
| 801 | 762 | static INPUT_PORTS_START( plumppop ) |
| r2956 | r2957 | |
| 810 | 771 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 811 | 772 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 812 | 773 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 813 | | TAITO_COINAGE_JAPAN_8 |
| 774 | TAITO_COINAGE_JAPAN_OLD |
| 814 | 775 | |
| 815 | 776 | PORT_START_TAG("DSWB") |
| 816 | 777 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| r2956 | r2957 | |
| 877 | 838 | |
| 878 | 839 | |
| 879 | 840 | static INPUT_PORTS_START( jpopnics ) |
| 880 | | PORT_START |
| 841 | PORT_START_TAG("IN0") |
| 881 | 842 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 882 | 843 | |
| 883 | | PORT_START |
| 844 | PORT_START_TAG("IN1") |
| 884 | 845 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 885 | 846 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 886 | 847 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button 2 (Cheat)") |
| 887 | 848 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 888 | 849 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 889 | 850 | |
| 890 | | |
| 891 | | PORT_START |
| 851 | PORT_START_TAG("IN2") |
| 892 | 852 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 893 | 853 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 894 | 854 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button 2 (Cheat)") PORT_PLAYER(2) |
| 895 | 855 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 896 | 856 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 897 | 857 | |
| 898 | | PORT_START |
| 858 | PORT_START_TAG("DSWA") |
| 899 | 859 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 900 | 860 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 901 | 861 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 906 | 866 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 907 | 867 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 908 | 868 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 909 | | TAITO_COINAGE_JAPAN_8 |
| 869 | TAITO_COINAGE_JAPAN_OLD |
| 910 | 870 | |
| 911 | | PORT_START |
| 871 | PORT_START_TAG("DSWB") |
| 912 | 872 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 913 | 873 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 914 | 874 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) |
| r2956 | r2957 | |
| 931 | 891 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 932 | 892 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 933 | 893 | |
| 934 | | PORT_START |
| 935 | | PORT_START |
| 894 | PORT_START_TAG("COIN1") |
| 895 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 936 | 896 | |
| 897 | PORT_START_TAG("COIN2") |
| 898 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 937 | 899 | |
| 938 | 900 | PORT_START_TAG("AN1") /* spinner 1 - read at f000/1 */ |
| 939 | 901 | PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) |
| r2956 | r2957 | |
| 942 | 904 | PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2) |
| 943 | 905 | INPUT_PORTS_END |
| 944 | 906 | |
| 945 | | |
| 946 | | #define DRTOPP_COMMON\ |
| 947 | | PORT_START_TAG("DSWB")\ |
| 948 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )\ |
| 949 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )\ |
| 950 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) )\ |
| 951 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )\ |
| 952 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )\ |
| 953 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )\ |
| 954 | | PORT_DIPSETTING( 0x0c, "30000" )\ |
| 955 | | PORT_DIPSETTING( 0x00, DEF_STR( Unknown ) )\ |
| 956 | | PORT_DIPSETTING( 0x04, DEF_STR( Unknown ) )\ |
| 957 | | PORT_DIPSETTING( 0x08, DEF_STR( Unknown ) )\ |
| 958 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )\ |
| 959 | | PORT_DIPSETTING( 0x20, "2" )\ |
| 960 | | PORT_DIPSETTING( 0x30, "3" )\ |
| 961 | | PORT_DIPSETTING( 0x10, "4" )\ |
| 962 | | PORT_DIPSETTING( 0x00, "5" )\ |
| 963 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )\ |
| 964 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) )\ |
| 965 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) )\ |
| 966 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )\ |
| 967 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) )\ |
| 968 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) )\ |
| 969 | | PORT_START_TAG("IN0")\ |
| 970 | | TNZS_PLAYER_INPUT(1)\ |
| 971 | | PORT_START_TAG("IN1")\ |
| 972 | | TNZS_PLAYER_INPUT(2)\ |
| 973 | | COMMON_IN2\ |
| 974 | | COMMON_COIN1(IP_ACTIVE_HIGH)\ |
| 975 | | COMMON_COIN2(IP_ACTIVE_HIGH) |
| 976 | | |
| 977 | 907 | static INPUT_PORTS_START( drtoppel ) |
| 978 | 908 | PORT_START_TAG("DSWA") |
| 979 | 909 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| r2956 | r2957 | |
| 986 | 916 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 987 | 917 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 988 | 918 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 989 | | TAITO_COINAGE_WORLD_8 |
| 990 | | DRTOPP_COMMON |
| 991 | | INPUT_PORTS_END |
| 919 | TAITO_COINAGE_WORLD |
| 992 | 920 | |
| 993 | | static INPUT_PORTS_START( drtopplu ) |
| 994 | | PORT_START_TAG("DSWA") |
| 995 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 996 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 997 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 998 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 999 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 921 | PORT_START_TAG("DSWB") |
| 922 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 923 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 924 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) |
| 925 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 926 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 927 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 928 | PORT_DIPSETTING( 0x0c, "30000" ) |
| 929 | PORT_DIPSETTING( 0x00, DEF_STR( Unknown ) ) |
| 930 | PORT_DIPSETTING( 0x04, DEF_STR( Unknown ) ) |
| 931 | PORT_DIPSETTING( 0x08, DEF_STR( Unknown ) ) |
| 932 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) |
| 933 | PORT_DIPSETTING( 0x20, "2" ) |
| 934 | PORT_DIPSETTING( 0x30, "3" ) |
| 935 | PORT_DIPSETTING( 0x10, "4" ) |
| 936 | PORT_DIPSETTING( 0x00, "5" ) |
| 937 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 938 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1000 | 939 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1001 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1002 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1003 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1004 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1005 | | TAITO_COINAGE_JAPAN_8 |
| 1006 | | DRTOPP_COMMON |
| 1007 | | INPUT_PORTS_END |
| 940 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 941 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 942 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1008 | 943 | |
| 1009 | | #define CHUKA_COMMON\ |
| 1010 | | PORT_START_TAG("DSWB")\ |
| 1011 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )\ |
| 1012 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )\ |
| 1013 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) )\ |
| 1014 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )\ |
| 1015 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )\ |
| 1016 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )\ |
| 1017 | | PORT_DIPSETTING( 0x08, "100k 300k 440k" )\ |
| 1018 | | PORT_DIPSETTING( 0x00, "100k 300k 500k" )\ |
| 1019 | | PORT_DIPSETTING( 0x0c, "100k 400k" )\ |
| 1020 | | PORT_DIPSETTING( 0x04, "100k 500k" )\ |
| 1021 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )\ |
| 1022 | | PORT_DIPSETTING( 0x00, "1" )\ |
| 1023 | | PORT_DIPSETTING( 0x10, "2" )\ |
| 1024 | | PORT_DIPSETTING( 0x30, "3" )\ |
| 1025 | | PORT_DIPSETTING( 0x20, "4" )\ |
| 1026 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )\ |
| 1027 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) )\ |
| 1028 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) )\ |
| 1029 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )\ |
| 1030 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) )\ |
| 1031 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) )\ |
| 1032 | | PORT_START_TAG("IN0")\ |
| 1033 | | TNZS_PLAYER_INPUT(1)\ |
| 1034 | | PORT_START_TAG("IN1")\ |
| 1035 | | TNZS_PLAYER_INPUT(2)\ |
| 1036 | | COMMON_IN2\ |
| 1037 | | COMMON_COIN1(IP_ACTIVE_HIGH)\ |
| 944 | PORT_START_TAG("IN0") |
| 945 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 946 | |
| 947 | PORT_START_TAG("IN1") |
| 948 | TAITO_JOY_LRUD_2_BUTTONS_START( 2 ) |
| 949 | |
| 950 | COMMON_IN2 |
| 951 | COMMON_COIN1(IP_ACTIVE_HIGH) |
| 1038 | 952 | COMMON_COIN2(IP_ACTIVE_HIGH) |
| 953 | INPUT_PORTS_END |
| 1039 | 954 | |
| 955 | static INPUT_PORTS_START( drtopplu ) |
| 956 | PORT_INCLUDE( drtoppel ) |
| 957 | |
| 958 | PORT_MODIFY("DSWA") |
| 959 | TAITO_COINAGE_JAPAN_OLD |
| 960 | INPUT_PORTS_END |
| 961 | |
| 1040 | 962 | static INPUT_PORTS_START( chukatai ) |
| 1041 | 963 | PORT_START_TAG("DSWA") |
| 1042 | 964 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| r2956 | r2957 | |
| 1049 | 971 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1050 | 972 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1051 | 973 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1052 | | TAITO_COINAGE_WORLD_8 |
| 974 | TAITO_COINAGE_WORLD |
| 1053 | 975 | |
| 1054 | | CHUKA_COMMON |
| 976 | PORT_START_TAG("DSWB") |
| 977 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 978 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 979 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) |
| 980 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 981 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 982 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 983 | PORT_DIPSETTING( 0x08, "100k 300k 440k" ) |
| 984 | PORT_DIPSETTING( 0x00, "100k 300k 500k" ) |
| 985 | PORT_DIPSETTING( 0x0c, "100k 400k" ) |
| 986 | PORT_DIPSETTING( 0x04, "100k 500k" ) |
| 987 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) |
| 988 | PORT_DIPSETTING( 0x00, "1" ) |
| 989 | PORT_DIPSETTING( 0x10, "2" ) |
| 990 | PORT_DIPSETTING( 0x30, "3" ) |
| 991 | PORT_DIPSETTING( 0x20, "4" ) |
| 992 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 993 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 994 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 995 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 996 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 997 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 998 | |
| 999 | PORT_START_TAG("IN0") |
| 1000 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 1001 | |
| 1002 | PORT_START_TAG("IN1") |
| 1003 | TAITO_JOY_LRUD_2_BUTTONS_START( 2 ) |
| 1004 | |
| 1005 | COMMON_IN2 |
| 1006 | COMMON_COIN1(IP_ACTIVE_HIGH) |
| 1007 | COMMON_COIN2(IP_ACTIVE_HIGH) |
| 1055 | 1008 | INPUT_PORTS_END |
| 1056 | 1009 | |
| 1057 | 1010 | static INPUT_PORTS_START( chukatau ) |
| 1058 | | PORT_START_TAG("DSWA") |
| 1059 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1060 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1061 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1062 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 1063 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1064 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1065 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1066 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1067 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1068 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1069 | | TAITO_COINAGE_JAPAN_8 |
| 1011 | PORT_INCLUDE( chukatai ) |
| 1070 | 1012 | |
| 1071 | | CHUKA_COMMON |
| 1013 | PORT_MODIFY("DSWA") |
| 1014 | TAITO_COINAGE_JAPAN_OLD |
| 1072 | 1015 | INPUT_PORTS_END |
| 1073 | 1016 | |
| 1074 | | #define TNZS_COMMON\ |
| 1075 | | PORT_START_TAG("DSWB")\ |
| 1076 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )\ |
| 1077 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )\ |
| 1078 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) )\ |
| 1079 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )\ |
| 1080 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )\ |
| 1081 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )\ |
| 1082 | | PORT_DIPSETTING( 0x00, "50000 150000" )\ |
| 1083 | | PORT_DIPSETTING( 0x0c, "70000 200000" )\ |
| 1084 | | PORT_DIPSETTING( 0x04, "100000 250000" )\ |
| 1085 | | PORT_DIPSETTING( 0x08, "200000 300000" )\ |
| 1086 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )\ |
| 1087 | | PORT_DIPSETTING( 0x20, "2" )\ |
| 1088 | | PORT_DIPSETTING( 0x30, "3" )\ |
| 1089 | | PORT_DIPSETTING( 0x00, "4" )\ |
| 1090 | | PORT_DIPSETTING( 0x10, "5" )\ |
| 1091 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )\ |
| 1092 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) )\ |
| 1093 | | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )\ |
| 1094 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )\ |
| 1095 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) )\ |
| 1096 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) )\ |
| 1097 | | PORT_START_TAG("IN0")\ |
| 1098 | | TNZS_PLAYER_INPUT(1) |
| 1099 | | |
| 1100 | 1017 | static INPUT_PORTS_START( tnzs ) |
| 1101 | 1018 | PORT_START_TAG("DSWA") |
| 1102 | 1019 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| r2956 | r2957 | |
| 1109 | 1026 | PORT_DIPNAME( 0x08, 0x08, "Invulnerability (Debug)" ) // see notes |
| 1110 | 1027 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1111 | 1028 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1112 | | TAITO_COINAGE_JAPAN_8 |
| 1029 | TAITO_COINAGE_JAPAN_OLD |
| 1113 | 1030 | |
| 1114 | | TNZS_COMMON |
| 1031 | PORT_START_TAG("DSWB") |
| 1032 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 1033 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 1034 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) |
| 1035 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 1036 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1037 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1038 | PORT_DIPSETTING( 0x00, "50000 150000" ) |
| 1039 | PORT_DIPSETTING( 0x0c, "70000 200000" ) |
| 1040 | PORT_DIPSETTING( 0x04, "100000 250000" ) |
| 1041 | PORT_DIPSETTING( 0x08, "200000 300000" ) |
| 1042 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) |
| 1043 | PORT_DIPSETTING( 0x20, "2" ) |
| 1044 | PORT_DIPSETTING( 0x30, "3" ) |
| 1045 | PORT_DIPSETTING( 0x00, "4" ) |
| 1046 | PORT_DIPSETTING( 0x10, "5" ) |
| 1047 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) |
| 1048 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1049 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| 1050 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 1051 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1052 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1115 | 1053 | |
| 1054 | PORT_START_TAG("IN0") |
| 1055 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 1056 | |
| 1116 | 1057 | PORT_START_TAG("IN1") |
| 1117 | | TNZS_PLAYER_INPUT(2) |
| 1058 | TAITO_JOY_LRUD_2_BUTTONS_START( 2 ) |
| 1118 | 1059 | |
| 1119 | 1060 | COMMON_IN2 |
| 1120 | 1061 | COMMON_COIN1(IP_ACTIVE_LOW) |
| 1121 | 1062 | COMMON_COIN2(IP_ACTIVE_LOW) |
| 1122 | | |
| 1123 | 1063 | INPUT_PORTS_END |
| 1124 | 1064 | |
| 1125 | 1065 | static INPUT_PORTS_START( tnzsb ) |
| 1126 | | PORT_START_TAG("DSWA") |
| 1127 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1128 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1129 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1130 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 1131 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1132 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1133 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1134 | | PORT_DIPNAME( 0x08, 0x08, "Invulnerability (Debug)" ) // see notes |
| 1135 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1136 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1137 | | TAITO_COINAGE_WORLD_8 |
| 1066 | PORT_INCLUDE( tnzs ) |
| 1138 | 1067 | |
| 1139 | | TNZS_COMMON |
| 1068 | PORT_MODIFY("DSWA") |
| 1069 | TAITO_COINAGE_WORLD |
| 1140 | 1070 | |
| 1141 | | PORT_START_TAG("IN1") |
| 1071 | PORT_MODIFY("IN1") |
| 1142 | 1072 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL |
| 1143 | 1073 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL |
| 1144 | 1074 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL |
| r2956 | r2957 | |
| 1148 | 1078 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1149 | 1079 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2) |
| 1150 | 1080 | |
| 1151 | | PORT_START_TAG("IN2") |
| 1152 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1153 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) |
| 1154 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1155 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1081 | PORT_MODIFY("IN2") |
| 1156 | 1082 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1157 | 1083 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1158 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1159 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1160 | 1084 | |
| 1085 | PORT_MODIFY("COIN1") /* not present in the bootleg */ |
| 1086 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1087 | |
| 1088 | PORT_MODIFY("COIN2") /* not present in the bootleg */ |
| 1089 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1161 | 1090 | INPUT_PORTS_END |
| 1162 | 1091 | |
| 1163 | 1092 | static INPUT_PORTS_START( tnzs2 ) |
| 1164 | | PORT_START_TAG("DSWA") |
| 1165 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1166 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1167 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1168 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 1169 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1170 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1171 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1093 | PORT_INCLUDE( tnzs ) |
| 1094 | |
| 1095 | PORT_MODIFY("DSWA") |
| 1172 | 1096 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 1173 | 1097 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1174 | 1098 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1175 | | TAITO_COINAGE_WORLD_8 |
| 1099 | TAITO_COINAGE_WORLD |
| 1176 | 1100 | |
| 1177 | | PORT_START_TAG("DSWB") |
| 1178 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| 1179 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 1180 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) |
| 1181 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 1182 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1101 | PORT_MODIFY("DSWB") |
| 1183 | 1102 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1184 | 1103 | PORT_DIPSETTING( 0x00, "10000 100000" ) |
| 1185 | 1104 | PORT_DIPSETTING( 0x0c, "10000 150000" ) |
| 1186 | 1105 | PORT_DIPSETTING( 0x08, "10000 200000" ) |
| 1187 | 1106 | PORT_DIPSETTING( 0x04, "10000 300000" ) |
| 1188 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) |
| 1189 | | PORT_DIPSETTING( 0x20, "2" ) |
| 1190 | | PORT_DIPSETTING( 0x30, "3" ) |
| 1191 | | PORT_DIPSETTING( 0x00, "4" ) |
| 1192 | | PORT_DIPSETTING( 0x10, "5" ) |
| 1193 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) |
| 1194 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 1195 | | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| 1196 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 1197 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1198 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1199 | | |
| 1200 | | PORT_START_TAG("IN0") |
| 1201 | | TNZS_PLAYER_INPUT(1) |
| 1202 | | |
| 1203 | | PORT_START_TAG("IN1") |
| 1204 | | TNZS_PLAYER_INPUT(2) |
| 1205 | | |
| 1206 | | COMMON_IN2 |
| 1207 | | COMMON_COIN1(IP_ACTIVE_LOW) |
| 1208 | | COMMON_COIN2(IP_ACTIVE_LOW) |
| 1209 | 1107 | INPUT_PORTS_END |
| 1210 | 1108 | |
| 1211 | 1109 | static INPUT_PORTS_START( kabukiz ) |
| r2956 | r2957 | |
| 1245 | 1143 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 1246 | 1144 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1247 | 1145 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1248 | | TAITO_COINAGE_JAPAN_8 |
| 1146 | TAITO_COINAGE_JAPAN_OLD |
| 1249 | 1147 | |
| 1250 | 1148 | PORT_START_TAG("IN0") |
| 1251 | | TNZS_PLAYER_INPUT(1) |
| 1149 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 1252 | 1150 | |
| 1253 | 1151 | PORT_START_TAG("IN1") |
| 1254 | 1152 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL |
| r2956 | r2957 | |
| 1284 | 1182 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1285 | 1183 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1286 | 1184 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1287 | | TAITO_COINAGE_WORLD_8 |
| 1185 | TAITO_COINAGE_WORLD |
| 1288 | 1186 | |
| 1289 | 1187 | PORT_START_TAG("DSWB") |
| 1290 | 1188 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| r2956 | r2957 | |
| 1310 | 1208 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1311 | 1209 | |
| 1312 | 1210 | PORT_START_TAG("IN0") |
| 1313 | | TNZS_PLAYER_INPUT(1) |
| 1211 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 1212 | |
| 1314 | 1213 | PORT_START_TAG("IN1") |
| 1315 | | TNZS_PLAYER_INPUT(2) |
| 1214 | TAITO_JOY_LRUD_2_BUTTONS_START( 2 ) |
| 1316 | 1215 | |
| 1317 | 1216 | PORT_START_TAG("IN2") |
| 1318 | 1217 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 1337 | 1236 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1338 | 1237 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1339 | 1238 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1340 | | TAITO_COINAGE_JAPAN_8 |
| 1239 | TAITO_COINAGE_JAPAN_OLD |
| 1341 | 1240 | |
| 1342 | 1241 | PORT_START_TAG("DSWB") |
| 1343 | 1242 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) |
| r2956 | r2957 | |
| 1365 | 1264 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 1366 | 1265 | |
| 1367 | 1266 | PORT_START_TAG("IN0") |
| 1368 | | TNZS_PLAYER_INPUT(1) |
| 1267 | TAITO_JOY_LRUD_2_BUTTONS_START( 1 ) |
| 1268 | |
| 1369 | 1269 | PORT_START_TAG("IN1") |
| 1370 | | TNZS_PLAYER_INPUT(2) |
| 1270 | TAITO_JOY_LRUD_2_BUTTONS_START( 2 ) |
| 1371 | 1271 | |
| 1372 | 1272 | PORT_START_TAG("IN2") |
| 1373 | 1273 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
src/mame/drivers/stv.c
| r2956 | r2957 | |
| 468 | 468 | return_data = 0x20 ^ 0xff; |
| 469 | 469 | |
| 470 | 470 | if (offset == 0x75)//PDR1 read |
| 471 | | return_data = input_port_read_indexed(machine, 0); |
| 471 | return_data = input_port_read(machine, "DSW1"); |
| 472 | 472 | |
| 473 | 473 | if (offset == 0x77)//PDR2 read |
| 474 | 474 | return_data= (0xfe | eeprom_read_bit()); |
| 475 | 475 | |
| 476 | 476 | // if (offset == 0x33) //country code |
| 477 | | // return_data = input_port_read_indexed(machine, 7); |
| 477 | // return_data = input_port_read(machine, "FAKE"); |
| 478 | 478 | |
| 479 | 479 | if (activecpu_get_pc()==0x060020E6) return_data = 0x10;//??? |
| 480 | 480 | |
| r2956 | r2957 | |
| 633 | 633 | |
| 634 | 634 | smpc_ram[0x31]=0x00; //? |
| 635 | 635 | |
| 636 | | //smpc_ram[0x33]=input_port_read_indexed(machine, 7); |
| 636 | //smpc_ram[0x33]=input_port_read(machine, "FAKE"); |
| 637 | 637 | |
| 638 | 638 | smpc_ram[0x35]=0x00; |
| 639 | 639 | smpc_ram[0x37]=0x00; |
| r2956 | r2957 | |
| 902 | 902 | case 0: |
| 903 | 903 | switch(port_sel) |
| 904 | 904 | { |
| 905 | | case 0x77: return 0xff000000|(input_port_read_indexed(machine, 2) << 16) |0x0000ff00|(input_port_read_indexed(machine, 3)); |
| 905 | case 0x77: return 0xff000000|(input_port_read(machine, "P1") << 16) |0x0000ff00|(input_port_read(machine, "P2")); |
| 906 | 906 | case 0x67: |
| 907 | 907 | { |
| 908 | 908 | switch(mux_data) |
| 909 | 909 | { |
| 910 | 910 | /*Mahjong panel interface,bit wise(ACTIVE LOW)*/ |
| 911 | | case 0xfe: return 0xff000000 | (input_port_read_indexed(machine, 7) << 16) | 0x0000ff00 | (input_port_read_indexed(machine, 12)); |
| 912 | | case 0xfd: return 0xff000000 | (input_port_read_indexed(machine, 8) << 16) | 0x0000ff00 | (input_port_read_indexed(machine, 13)); |
| 913 | | case 0xfb: return 0xff000000 | (input_port_read_indexed(machine, 9) << 16) | 0x0000ff00 | (input_port_read_indexed(machine, 14)); |
| 914 | | case 0xf7: return 0xff000000 | (input_port_read_indexed(machine, 10) << 16) | 0x0000ff00 | (input_port_read_indexed(machine, 15)); |
| 915 | | case 0xef: return 0xff000000 | (input_port_read_indexed(machine, 11) << 16) | 0x0000ff00 | (input_port_read_indexed(machine, 16)); |
| 911 | case 0xfe: return 0xff000000 | (input_port_read_safe(machine, "KEY0", 0) << 16) | 0x0000ff00 | (input_port_read_safe(machine, "KEY5", 0)); |
| 912 | case 0xfd: return 0xff000000 | (input_port_read_safe(machine, "KEY1", 0) << 16) | 0x0000ff00 | (input_port_read_safe(machine, "KEY6", 0)); |
| 913 | case 0xfb: return 0xff000000 | (input_port_read_safe(machine, "KEY2", 0) << 16) | 0x0000ff00 | (input_port_read_safe(machine, "KEY7", 0)); |
| 914 | case 0xf7: return 0xff000000 | (input_port_read_safe(machine, "KEY3", 0) << 16) | 0x0000ff00 | (input_port_read_safe(machine, "KEY8", 0)); |
| 915 | case 0xef: return 0xff000000 | (input_port_read_safe(machine, "KEY4", 0) << 16) | 0x0000ff00 | (input_port_read_safe(machine, "KEY9", 0)); |
| 916 | 916 | /*Joystick panel*/ |
| 917 | 917 | default: |
| 918 | 918 | //popmessage("%02x MUX DATA",mux_data); |
| 919 | | return (input_port_read_indexed(machine, 2) << 16) | (input_port_read_indexed(machine, 3)); |
| 919 | return (input_port_read(machine, "P1") << 16) | (input_port_read(machine, "P2")); |
| 920 | 920 | } |
| 921 | 921 | } |
| 922 | 922 | case 0x47: |
| r2956 | r2957 | |
| 926 | 926 | int data1 = 0, data2 = 0; |
| 927 | 927 | |
| 928 | 928 | /* Critter Crusher */ |
| 929 | | data1 = input_port_read_indexed(machine, 7); |
| 929 | data1 = input_port_read(machine, "LIGHTX"); |
| 930 | 930 | data1 = BITSWAP8(data1, 2, 3, 0, 1, 6, 7, 5, 4) & 0xf3; |
| 931 | | data1 |= (input_port_read_indexed(machine, 2) & 1) ? 0x0 : 0x4; |
| 932 | | data2 = input_port_read_indexed(machine, 8); |
| 931 | data1 |= (input_port_read(machine, "P1") & 1) ? 0x0 : 0x4; |
| 932 | data2 = input_port_read(machine, "LIGHTY"); |
| 933 | 933 | data2 = BITSWAP8(data2, 2, 3, 0, 1, 6, 7, 5, 4) & 0xf3; |
| 934 | | data2 |= (input_port_read_indexed(machine, 2) & 1) ? 0x0 : 0x4; |
| 934 | data2 |= (input_port_read(machine, "P1") & 1) ? 0x0 : 0x4; |
| 935 | 935 | |
| 936 | 936 | return 0xff000000 | data1 << 16 | 0x0000ff00 | data2; |
| 937 | 937 | } |
| r2956 | r2957 | |
| 939 | 939 | //default: |
| 940 | 940 | default: |
| 941 | 941 | //popmessage("%02x PORT SEL",port_sel); |
| 942 | | return (input_port_read_indexed(machine, 2) << 16) | (input_port_read_indexed(machine, 3)); |
| 942 | return (input_port_read(machine, "P1") << 16) | (input_port_read(machine, "P2")); |
| 943 | 943 | } |
| 944 | 944 | case 1: |
| 945 | 945 | if ( strcmp(machine->gamedrv->name,"critcrsh") == 0 ) |
| 946 | 946 | { |
| 947 | | return ((input_port_read_indexed(machine, 4) << 16) & ((input_port_read_indexed(machine, 2) & 1) ? 0xffef0000 : 0xffff0000)) | (ioga[1]); |
| 947 | return ((input_port_read(machine, "SYSTEM") << 16) & ((input_port_read(machine, "P1") & 1) ? 0xffef0000 : 0xffff0000)) | (ioga[1]); |
| 948 | 948 | } |
| 949 | 949 | else |
| 950 | 950 | { |
| 951 | | return (input_port_read_indexed(machine, 4) << 16) | (ioga[1]); |
| 951 | return (input_port_read(machine, "SYSTEM") << 16) | (ioga[1]); |
| 952 | 952 | } |
| 953 | 953 | case 2: |
| 954 | 954 | switch(port_sel) |
| 955 | 955 | { |
| 956 | | case 0x77: return (input_port_read_indexed(machine, 5) << 16) | (input_port_read_indexed(machine, 6)); |
| 956 | case 0x77: return (input_port_read(machine, "UNUSED") << 16) | (input_port_read(machine, "EXTRA")); |
| 957 | 957 | case 0x67: return 0xffffffff;/**/ |
| 958 | 958 | case 0x20: return 0xffff0000 | (ioga[2] & 0xffff); |
| 959 | 959 | case 0x10: return ((ioga[2] & 0xffff) << 16) | 0xffff; |
| r2956 | r2957 | |
| 2019 | 2019 | #endif |
| 2020 | 2020 | |
| 2021 | 2021 | static ADDRESS_MAP_START( stv_mem, ADDRESS_SPACE_PROGRAM, 32 ) |
| 2022 | | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM // bios |
| 2022 | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM AM_SHARE(6) // bios |
| 2023 | 2023 | AM_RANGE(0x00100000, 0x0010007f) AM_READWRITE(stv_SMPC_r32, stv_SMPC_w32) |
| 2024 | 2024 | AM_RANGE(0x00180000, 0x0018ffff) AM_RAM AM_SHARE(1) AM_BASE(&stv_backupram) |
| 2025 | 2025 | AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_MIRROR(0x100000) AM_SHARE(2) AM_BASE(&stv_workram_l) |
| r2956 | r2957 | |
| 2028 | 2028 | AM_RANGE(0x01406f40, 0x01406f43) AM_WRITE(minit_w) // prikura seems to write here .. |
| 2029 | 2029 | // AM_RANGE(0x01000000, 0x01000003) AM_WRITE(minit_w) AM_MIRROR(0x00080000) |
| 2030 | 2030 | AM_RANGE(0x01800000, 0x01800003) AM_WRITE(sinit_w) |
| 2031 | | AM_RANGE(0x02000000, 0x04ffffff) AM_ROM AM_ROMBANK(1) AM_REGION(REGION_USER1, 0) // cartridge |
| 2031 | AM_RANGE(0x02000000, 0x04ffffff) AM_ROM AM_ROMBANK(1) AM_SHARE(7) AM_REGION(REGION_USER1, 0) // cartridge |
| 2032 | 2032 | AM_RANGE(0x05800000, 0x0589ffff) AM_READWRITE(stvcd_r, stvcd_w) |
| 2033 | 2033 | /* Sound */ |
| 2034 | 2034 | AM_RANGE(0x05a00000, 0x05a7ffff) AM_READWRITE(stv_sh2_soundram_r, stv_sh2_soundram_w) |
| r2956 | r2957 | |
| 2047 | 2047 | AM_RANGE(0x05f80000, 0x05fbffff) AM_READWRITE(stv_vdp2_regs_r, stv_vdp2_regs_w) |
| 2048 | 2048 | AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(stv_scu_r32, stv_scu_w32) |
| 2049 | 2049 | AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_MIRROR(0x01f00000) AM_SHARE(3) AM_BASE(&stv_workram_h) |
| 2050 | AM_RANGE(0x20000000, 0x2007ffff) AM_ROM AM_SHARE(6) // bios mirror |
| 2051 | AM_RANGE(0x22000000, 0x24ffffff) AM_ROM AM_SHARE(7) // cart mirror |
| 2050 | 2052 | ADDRESS_MAP_END |
| 2051 | 2053 | |
| 2052 | 2054 | static ADDRESS_MAP_START( sound_mem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2956 | r2957 | |
| 2065 | 2067 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_) |
| 2066 | 2068 | |
| 2067 | 2069 | static INPUT_PORTS_START( stv ) |
| 2068 | | PORT_START |
| 2070 | PORT_START_TAG("DSW1") |
| 2069 | 2071 | PORT_DIPNAME( 0x01, 0x01, "PDR1" ) |
| 2070 | 2072 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2071 | 2073 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2091 | 2093 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2092 | 2094 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2093 | 2095 | |
| 2094 | | PORT_START |
| 2096 | PORT_START_TAG("DSW2") |
| 2095 | 2097 | PORT_DIPNAME( 0x01, 0x01, "PDR2" ) |
| 2096 | 2098 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2097 | 2099 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2117 | 2119 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2118 | 2120 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2119 | 2121 | |
| 2120 | | PORT_START |
| 2122 | PORT_START_TAG("P1") |
| 2121 | 2123 | STV_PLAYER_INPUTS(1, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2122 | 2124 | |
| 2123 | | PORT_START |
| 2125 | PORT_START_TAG("P2") |
| 2124 | 2126 | STV_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2125 | 2127 | /* |
| 2126 | | PORT_START |
| 2128 | PORT_START_TAG("P3") |
| 2127 | 2129 | STV_PLAYER_INPUTS(3, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2128 | 2130 | |
| 2129 | | PORT_START |
| 2131 | PORT_START_TAG("P4") |
| 2130 | 2132 | STV_PLAYER_INPUTS(4, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2131 | 2133 | */ |
| 2132 | 2134 | |
| 2133 | | PORT_START |
| 2135 | PORT_START_TAG("SYSTEM") |
| 2134 | 2136 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2135 | 2137 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2136 | 2138 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) |
| r2956 | r2957 | |
| 2140 | 2142 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) |
| 2141 | 2143 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8) |
| 2142 | 2144 | |
| 2143 | | /*This *might* be unused...*/ |
| 2144 | | PORT_START |
| 2145 | /* This *might* be unused... */ |
| 2146 | PORT_START_TAG("UNUSED") |
| 2145 | 2147 | PORT_BIT ( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2146 | 2148 | |
| 2147 | | /*Extra button layout,used by Power Instinct 3 & Suikoenbu*/ |
| 2148 | | PORT_START |
| 2149 | /* Extra button layout,used by Power Instinct 3 & Suikoenbu */ |
| 2150 | PORT_START_TAG("EXTRA") |
| 2149 | 2151 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2150 | 2152 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 2151 | 2153 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2155 | 2157 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 2156 | 2158 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2157 | 2159 | |
| 2158 | | /*We don't need these,AFAIK the country code doesn't work either...*/ |
| 2160 | /* We don't need these, AFAIK the country code doesn't work either... */ |
| 2159 | 2161 | #if 0 |
| 2160 | | PORT_START //7 |
| 2162 | PORT_START_TAG("FAKE") //7 |
| 2161 | 2163 | PORT_DIPNAME( 0x0f, 0x01, "Country" ) |
| 2162 | 2164 | PORT_DIPSETTING( 0x01, DEF_STR( Japan ) ) |
| 2163 | 2165 | PORT_DIPSETTING( 0x02, "Asia Ntsc" ) |
| r2956 | r2957 | |
| 2168 | 2170 | PORT_DIPSETTING( 0x0c, "Europe/Other Pal" ) |
| 2169 | 2171 | PORT_DIPSETTING( 0x0d, "Sud America Pal" ) |
| 2170 | 2172 | |
| 2171 | | PORT_START /* Pad data 1a */ |
| 2173 | PORT_START_TAG("PAD1A") /* Pad data 1a */ |
| 2172 | 2174 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("B") PORT_CODE(KEYCODE_U) |
| 2173 | 2175 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("C") PORT_CODE(KEYCODE_Y) |
| 2174 | 2176 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("A") PORT_CODE(KEYCODE_T) |
| r2956 | r2957 | |
| 2178 | 2180 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Left") PORT_CODE(KEYCODE_J) |
| 2179 | 2181 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Right") PORT_CODE(KEYCODE_L) |
| 2180 | 2182 | |
| 2181 | | PORT_START /* Pad data 1b */ |
| 2183 | PORT_START_TAG("PAD1B") /* Pad data 1b */ |
| 2182 | 2184 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L trig") PORT_CODE(KEYCODE_A) |
| 2183 | 2185 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Z") PORT_CODE(KEYCODE_Q) |
| 2184 | 2186 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Y") PORT_CODE(KEYCODE_W) |
| r2956 | r2957 | |
| 2188 | 2190 | INPUT_PORTS_END |
| 2189 | 2191 | |
| 2190 | 2192 | static INPUT_PORTS_START( critcrsh ) |
| 2191 | | |
| 2192 | 2193 | PORT_INCLUDE( stv ) |
| 2193 | 2194 | |
| 2194 | 2195 | /* IN 7 */ |
| 2195 | | PORT_START /* mask default type sens delta min max */ |
| 2196 | PORT_START_TAG("LIGHTX") /* mask default type sens delta min max */ |
| 2196 | 2197 | PORT_BIT( 0x3f, 0x00, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0,0x3f) PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_PLAYER(1) |
| 2197 | 2198 | |
| 2198 | 2199 | /* IN 8 */ |
| 2199 | | PORT_START |
| 2200 | PORT_START_TAG("LIGHTY") |
| 2200 | 2201 | PORT_BIT( 0x3f, 0x00, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0x0,0x3f) PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_PLAYER(1) |
| 2201 | 2202 | |
| 2202 | 2203 | INPUT_PORTS_END |
| 2203 | 2204 | |
| 2204 | | /*Same as the regular one,but with an additional & optional mahjong panel*/ |
| 2205 | /* Same as the regular one,but with an additional & optional mahjong panel */ |
| 2205 | 2206 | static INPUT_PORTS_START( stvmp ) |
| 2206 | | PORT_START |
| 2207 | | PORT_DIPNAME( 0x01, 0x01, "PDR1" ) |
| 2208 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2209 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2210 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 2211 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2212 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2213 | | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2214 | | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2215 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2216 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 2217 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2218 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2219 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 2220 | | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2221 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2222 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 2223 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2224 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2225 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 2226 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2227 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2228 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 2229 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2230 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2207 | PORT_INCLUDE( stv ) |
| 2231 | 2208 | |
| 2232 | | PORT_START |
| 2233 | | PORT_DIPNAME( 0x01, 0x01, "PDR2" ) |
| 2234 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2235 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2236 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 2237 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2238 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2239 | | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2240 | | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2241 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2242 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 2243 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2244 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2245 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 2246 | | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 2247 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2248 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 2249 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 2250 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2251 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 2252 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2253 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2254 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 2255 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2256 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2257 | | |
| 2258 | | PORT_START |
| 2259 | | STV_PLAYER_INPUTS(1, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2260 | | |
| 2261 | | PORT_START |
| 2262 | | STV_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2263 | | /* |
| 2264 | | PORT_START |
| 2265 | | STV_PLAYER_INPUTS(3, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2266 | | |
| 2267 | | PORT_START |
| 2268 | | STV_PLAYER_INPUTS(4, BUTTON1, BUTTON2, BUTTON3, BUTTON4) |
| 2269 | | */ |
| 2270 | | |
| 2271 | | PORT_START |
| 2272 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2273 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2274 | | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) |
| 2275 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2276 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 2277 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 2278 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7) |
| 2279 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8) |
| 2280 | | |
| 2281 | | /*This *might* be unused...*/ |
| 2282 | | PORT_START |
| 2283 | | PORT_BIT ( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2284 | | |
| 2285 | | /*Extra button layout,used by Power Instinct 3*/ |
| 2286 | | PORT_START |
| 2287 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2288 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 2289 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 2290 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2291 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 2292 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 2293 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 2294 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2295 | | |
| 2296 | | /*Mahjong panel/player 1 side*/ |
| 2297 | | PORT_START/*7*/ |
| 2209 | /* Mahjong panel/player 1 side */ |
| 2210 | PORT_START_TAG("KEY0") /*7*/ |
| 2298 | 2211 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 2299 | 2212 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 2300 | 2213 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2304 | 2217 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 2305 | 2218 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 2306 | 2219 | |
| 2307 | | PORT_START/*8*/ |
| 2220 | PORT_START_TAG("KEY1") /*8*/ |
| 2308 | 2221 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 2309 | 2222 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2310 | 2223 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2314 | 2227 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 2315 | 2228 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 2316 | 2229 | |
| 2317 | | PORT_START/*9*/ |
| 2230 | PORT_START_TAG("KEY2") /*9*/ |
| 2318 | 2231 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 2319 | 2232 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2320 | 2233 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2324 | 2237 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 2325 | 2238 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 2326 | 2239 | |
| 2327 | | PORT_START/*10*/ |
| 2240 | PORT_START_TAG("KEY3") /*10*/ |
| 2328 | 2241 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2329 | 2242 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2330 | 2243 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2334 | 2247 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 2335 | 2248 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 2336 | 2249 | |
| 2337 | | PORT_START/*11*/ |
| 2250 | PORT_START_TAG("KEY4") /*11*/ |
| 2338 | 2251 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2339 | 2252 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2340 | 2253 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2344 | 2257 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) |
| 2345 | 2258 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2346 | 2259 | |
| 2347 | | /*Mahjong panel/player 2 side*/ |
| 2348 | | PORT_START/*12*/ |
| 2260 | /* Mahjong panel/player 2 side */ |
| 2261 | PORT_START_TAG("KEY5") /*12*/ |
| 2349 | 2262 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2) |
| 2350 | 2263 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 2351 | 2264 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2355 | 2268 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2) |
| 2356 | 2269 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2) |
| 2357 | 2270 | |
| 2358 | | PORT_START/*13*/ |
| 2271 | PORT_START_TAG("KEY6") /*13*/ |
| 2359 | 2272 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2) |
| 2360 | 2273 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2361 | 2274 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2365 | 2278 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2) |
| 2366 | 2279 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2) |
| 2367 | 2280 | |
| 2368 | | PORT_START/*14*/ |
| 2281 | PORT_START_TAG("KEY7") /*14*/ |
| 2369 | 2282 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2) |
| 2370 | 2283 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2371 | 2284 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2375 | 2288 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2) |
| 2376 | 2289 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2) |
| 2377 | 2290 | |
| 2378 | | PORT_START/*15*/ |
| 2291 | PORT_START_TAG("KEY8") /*15*/ |
| 2379 | 2292 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2380 | 2293 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2381 | 2294 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2385 | 2298 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2) |
| 2386 | 2299 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2) |
| 2387 | 2300 | |
| 2388 | | PORT_START/*16*/ |
| 2301 | PORT_START_TAG("KEY9") /*16*/ |
| 2389 | 2302 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2390 | 2303 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2391 | 2304 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2956 | r2957 | |
| 2434 | 2347 | |
| 2435 | 2348 | install_stvbios_speedups(machine); |
| 2436 | 2349 | |
| 2350 | // do strict overwrite verification - maruchan and rsgun crash after coinup without this. |
| 2351 | // todo: test what games need this and don't turn it on for them... |
| 2352 | cpunum_set_info_int(0, CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_STRICT_VERIFY); |
| 2353 | cpunum_set_info_int(1, CPUINFO_INT_SH2_DRC_OPTIONS, SH2DRC_STRICT_VERIFY); |
| 2354 | |
| 2437 | 2355 | /* debug .. watch the command buffer rsgun, cottonbm etc. appear to use to communicate between cpus */ |
| 2438 | 2356 | memory_install_write32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc44, 0x60ffc47, 0, 0, w60ffc44_write ); |
| 2439 | 2357 | memory_install_write32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc48, 0x60ffc4b, 0, 0, w60ffc48_write ); |
| r2956 | r2957 | |
| 2448 | 2366 | smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 2449 | 2367 | smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 2450 | 2368 | smpc_ram[0x31] = 0x00; //CTG1=0 CTG0=0 (correct??) |
| 2451 | | // smpc_ram[0x33] = input_port_read_indexed(machine, 7); |
| 2369 | // smpc_ram[0x33] = input_port_read(machine, "FAKE"); |
| 2452 | 2370 | smpc_ram[0x5f] = 0x10; |
| 2453 | 2371 | |
| 2454 | 2372 | #ifdef MAME_DEBUG |
| r2956 | r2957 | |
| 2701 | 2619 | #define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \ |
| 2702 | 2620 | ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(bios+1)) /* Note '+1' */ |
| 2703 | 2621 | |
| 2622 | /* BIOS rev info found at 0x800 (byte swapped): |
| 2623 | |
| 2624 | erp-17740 - Japan STVB1.10J0950131 95/01/31 v1.10 - Found on a early board dated 02/1995 |
| 2625 | epr-17951a - Japan STVB1.13J0950425 95/04/25 v1.13 |
| 2626 | epr-17952a - USA STVB1.13U0950425 95/04/25 v1.13 |
| 2627 | epr-17953a - Taiwan STVB1.13T0950425 95/04/25 v1.13 |
| 2628 | epr-17954a - Europe STVB1.13E0950425 95/04/25 v1.13 |
| 2629 | |
| 2630 | epr-18343 - ????? STVB1.30S0950727 95/07/27 v1.30 - Special version used on Sports Fishing 2 (CD based) |
| 2631 | epr-19730 - Japan PCD11.13J0970217 97/02/17 v1.13 - Enhanced version for CD based units? |
| 2632 | epr-20091 - Japan PCS11.13J0970821 97/08/21 v1.13 - Enhanced version for ??? |
| 2633 | |
| 2634 | stv110.bin - Debug STVB1.10D0950113 95/01/13 v1.10 |
| 2635 | stv1061.bin - ST-V Dev Bios (1.061) - Sega 1994, Noted "ST-V Ver 1.061 94/11/25" on EPROM sticker, Coming from a S-TV SG5001A dev board |
| 2636 | |
| 2637 | Regions found listed in the BIOS: |
| 2638 | Japan |
| 2639 | Taiwan and Philipines |
| 2640 | USA and Canada |
| 2641 | Brazil |
| 2642 | Korea |
| 2643 | Asia PAL area |
| 2644 | Europe |
| 2645 | Latin America |
| 2646 | |
| 2647 | ROM_SYSTEM_BIOS( x, "saturn", "Saturn bios" ) \ |
| 2648 | ROM_LOAD16_WORD_SWAP_BIOS( x, "saturn.bin", 0x000000, 0x080000, CRC(653ff2d8) SHA1(20994ae7ee177ddaf3a430b010c7620dca000fb4) ) - Saturn Eu Bios |
| 2649 | |
| 2650 | */ |
| 2651 | |
| 2704 | 2652 | #define STV_BIOS \ |
| 2705 | 2653 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ \ |
| 2706 | | ROM_SYSTEM_BIOS( 0, "japan", "Japan (bios epr19730)" ) \ |
| 2707 | | ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr19730.ic8", 0x000000, 0x080000, CRC(d0e0889d) SHA1(fae53107c894e0c41c49e191dbe706c9cd6e50bd) ) /* jp */ \ |
| 2708 | | ROM_SYSTEM_BIOS( 1, "japana", "Japan (bios mp17951a)" ) \ |
| 2709 | | ROM_LOAD16_WORD_SWAP_BIOS( 1, "mp17951a.s", 0x000000, 0x080000, CRC(2672f9d8) SHA1(63cf4a6432f6c87952f9cf3ab0f977aed2367303) ) /* jp alt */ \ |
| 2710 | | ROM_SYSTEM_BIOS( 2, "us", "USA (bios mp17952a)" ) \ |
| 2711 | | ROM_LOAD16_WORD_SWAP_BIOS( 2, "mp17952a.s", 0x000000, 0x080000, CRC(d1be2adf) SHA1(eaf1c3e5d602e1139d2090a78d7e19f04f916794) ) /* us */ \ |
| 2712 | | ROM_SYSTEM_BIOS( 3, "japanb", "Japan (bios 20091)" ) \ |
| 2713 | | ROM_LOAD16_WORD_SWAP_BIOS( 3, "20091.bin", 0x000000, 0x080000, CRC(59ed40f4) SHA1(eff0f54c70bce05ff3a289bf30b1027e1c8cd117) ) /* jp alt 2 */ \ |
| 2714 | | ROM_SYSTEM_BIOS( 4, "taiwan", "Taiwan (bios mp17953a)" ) \ |
| 2715 | | ROM_LOAD16_WORD_SWAP_BIOS( 4, "mp17953a.ic8", 0x000000, 0x080000, CRC(a4c47570) SHA1(9efc73717ec8a13417e65c54344ded9fc25bf5ef) ) /* taiwan */ \ |
| 2716 | | ROM_SYSTEM_BIOS( 5, "europe", "Europe (bios mp17954a)" ) \ |
| 2717 | | ROM_LOAD16_WORD_SWAP_BIOS( 5, "mp17954a.s", 0x000000, 0x080000, CRC(f7722da3) SHA1(af79cff317e5b57d49e463af16a9f616ed1eee08) ) /* Europe */ \ |
| 2718 | | ROM_SYSTEM_BIOS( 6, "unknown", "Unknown (debug?)" ) \ |
| 2719 | | ROM_LOAD16_WORD_SWAP_BIOS( 6, "stv110.bin", 0x000000, 0x080000, CRC(3dfeda92) SHA1(8eb33192a57df5f3a1dfb57263054867c6b2db6d) ) /* ?? */ \ |
| 2720 | | ROM_SYSTEM_BIOS( 7, "dev1061", "Development (bios 1.061)" ) \ |
| 2721 | | ROM_LOAD16_WORD_SWAP_BIOS( 7, "stv1061.bin", 0x000000, 0x080000, CRC(728dbca3) SHA1(0ed2030177f0aa8285645c395ae9ad9f568ab1d6) ) /* ST-V Dev Bios (1.061) - Sega 1994, Noted "ST-V Ver 1.061 94/11/25" on EPROM sticker, Coming from a S-TV SG5001A dev board */ \ |
| 2722 | | ROM_SYSTEM_BIOS( 8, "japanc", "Japan (bios epr17740)" ) \ |
| 2723 | | ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-17740.bin", 0x000000, 0x080000, CRC(5c5aa63d) SHA1(06860d96923b81afbc21e0ad32ee19487d8ff6e7) ) /* ST-V Bios (Japan early) - Sega 1995, Found on a early board dated 02/1995 */ \ |
| 2724 | | /*ROM_SYSTEM_BIOS( 9, "saturn", "Saturn bios :)" ) */ \ |
| 2725 | | /*ROM_LOAD16_WORD_SWAP_BIOS( 9, "saturn.bin", 0x000000, 0x080000, CRC(653ff2d8) SHA1(20994ae7ee177ddaf3a430b010c7620dca000fb4) )*/ /* Saturn Eu Bios */ \ |
| 2654 | ROM_SYSTEM_BIOS( 0, "Japan (97/08/21)", "Japan (bios epr-20091)" ) \ |
| 2655 | ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-20091.ic8", 0x000000, 0x080000, CRC(59ed40f4) SHA1(eff0f54c70bce05ff3a289bf30b1027e1c8cd117) ) \ |
| 2656 | ROM_SYSTEM_BIOS( 1, "Japan (97/02/17)", "Japan (bios epr-19730)" ) \ |
| 2657 | ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-19730.ic8", 0x000000, 0x080000, CRC(d0e0889d) SHA1(fae53107c894e0c41c49e191dbe706c9cd6e50bd) ) \ |
| 2658 | ROM_SYSTEM_BIOS( 2, "Japan (95/04/25)", "Japan (bios epr-17951a)" ) \ |
| 2659 | ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-17951a.ic8", 0x000000, 0x080000, CRC(2672f9d8) SHA1(63cf4a6432f6c87952f9cf3ab0f977aed2367303) ) \ |
| 2660 | ROM_SYSTEM_BIOS( 3, "Japan (95/01/31)", "Japan (bios epr-17740)" ) \ |
| 2661 | ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-17740.ic8", 0x000000, 0x080000, CRC(5c5aa63d) SHA1(06860d96923b81afbc21e0ad32ee19487d8ff6e7) ) \ |
| 2662 | ROM_SYSTEM_BIOS( 4, "Europe (95/04/25)", "Europe (bios epr-17954a)" ) \ |
| 2663 | ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-17954a.ic8", 0x000000, 0x080000, CRC(f7722da3) SHA1(af79cff317e5b57d49e463af16a9f616ed1eee08) ) \ |
| 2664 | ROM_SYSTEM_BIOS( 5, "USA (95/04/25)", "USA (bios epr-17952a)" ) \ |
| 2665 | ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-17952a.ic8", 0x000000, 0x080000, CRC(d1be2adf) SHA1(eaf1c3e5d602e1139d2090a78d7e19f04f916794) ) \ |
| 2666 | ROM_SYSTEM_BIOS( 6, "Taiwan (95/04/25)", "Taiwan (bios epr-17953a)" ) \ |
| 2667 | ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-17953a.ic8", 0x000000, 0x080000, CRC(a4c47570) SHA1(9efc73717ec8a13417e65c54344ded9fc25bf5ef) ) \ |
| 2668 | ROM_SYSTEM_BIOS( 7, "Debug (95/01/13)", "Debug" ) \ |
| 2669 | ROM_LOAD16_WORD_SWAP_BIOS( 7, "stv110.bin", 0x000000, 0x080000, CRC(3dfeda92) SHA1(8eb33192a57df5f3a1dfb57263054867c6b2db6d) ) \ |
| 2670 | ROM_SYSTEM_BIOS( 8, "Dev1061","Development (bios 1.061)" ) \ |
| 2671 | ROM_LOAD16_WORD_SWAP_BIOS( 8, "stv1061.bin", 0x000000, 0x080000, CRC(728dbca3) SHA1(0ed2030177f0aa8285645c395ae9ad9f568ab1d6) ) \ |
| 2726 | 2672 | ROM_REGION( 0x080000, REGION_CPU2, 0 ) /* SH2 code */ \ |
| 2727 | 2673 | ROM_COPY( REGION_CPU1,0,0,0x080000) \ |
| 2728 | 2674 | |
| r2956 | r2957 | |
| 2854 | 2800 | ROM_LOAD16_WORD_SWAP( "mpr18972.6", 0x1400000, 0x0400000, CRC(45c64fca) SHA1(ae2f678b9885426ce99b615b7f62a451f9ef83f9) ) // good (was .5) |
| 2855 | 2801 | ROM_END |
| 2856 | 2802 | |
| 2857 | | ROM_START( diehard ) |
| 2858 | | STV_BIOS // must use USA |
| 2803 | ROM_START( diehard ) /* must use USA, Europe or Taiwan BIOS */ |
| 2804 | STV_BIOS |
| 2805 | |
| 2859 | 2806 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ |
| 2860 | 2807 | ROM_LOAD( "fpr19119.13", 0x0000000, 0x0100000, CRC(de5c4f7c) SHA1(35f670a15e9c86edbe2fe718470f5a75b5b096ac) ) |
| 2861 | 2808 | ROM_RELOAD ( 0x0100000, 0x0100000 ) |
| r2956 | r2957 | |
| 3224 | 3171 | STV_BIOS |
| 3225 | 3172 | |
| 3226 | 3173 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ |
| 3227 | | ROM_FILL( 0x0000000, 0x0200000, 0x00 ) |
| 3174 | ROM_FILL( 0x0000000, 0x0200000, 0x00 ) |
| 3228 | 3175 | ROM_LOAD16_BYTE( "th-ic7_2.stv", 0x0200000, 0x0080000, CRC(c4e993de) SHA1(7aa433bc2623cb19a09d4ef4c8233a2d29901020) ) |
| 3229 | 3176 | ROM_LOAD16_BYTE( "th-ic7_1.stv", 0x0200001, 0x0080000, CRC(1355cc18) SHA1(a9b731228a807b2b01f933fe0f7dcdbadaf89b7e) ) |
| 3230 | 3177 | |
| r2956 | r2957 | |
| 3238 | 3185 | STV_BIOS |
| 3239 | 3186 | |
| 3240 | 3187 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ |
| 3241 | | ROM_FILL( 0x0000000, 0x0400000, 0x00 ) |
| 3242 | | ROM_LOAD16_BYTE( "2.ic13_2", 0x0200000, 0x0080000, CRC(6cae2926) SHA1(e8d5745b4228de24672da5017cb3dab58344f59f) ) |
| 3188 | ROM_FILL( 0x0000000, 0x0400000, 0x00 ) |
| 3189 | ROM_LOAD16_BYTE( "2.ic13_2", 0x0200000, 0x0080000, CRC(6cae2926) SHA1(e8d5745b4228de24672da5017cb3dab58344f59f) ) |
| 3243 | 3190 | ROM_LOAD16_BYTE( "1.ic13_1", 0x0200001, 0x0080000, CRC(460727c8) SHA1(da7171b65734264e10692e3408ac93beb374c65e) ) |
| 3244 | 3191 | |
| 3245 | 3192 | ROM_LOAD( "bom210-10.ic2", 0x1c00000, 0x0400000, CRC(f59d0827) SHA1(2bed4b2c78e9b4e9332f576e1b264a6343f4cfff) ) |
| 3246 | | ROM_RELOAD( 0x0400000, 0x0400000 ) |
| 3193 | ROM_RELOAD( 0x0400000, 0x0400000 ) |
| 3247 | 3194 | ROM_LOAD( "bom210-11.ic3", 0x2000000, 0x0400000, CRC(44e5a13e) SHA1(aee3c06662a1d083f3bd01292cf2694132f63533) ) |
| 3248 | | ROM_RELOAD( 0x0800000, 0x0400000 ) |
| 3195 | ROM_RELOAD( 0x0800000, 0x0400000 ) |
| 3249 | 3196 | ROM_LOAD( "bom210-12.ic4", 0x2400000, 0x0400000, CRC(deabc701) SHA1(cb313ae9bf6f115682fc76647a999e12c98f6120) ) |
| 3250 | | ROM_RELOAD( 0x0c00000, 0x0400000 ) |
| 3197 | ROM_RELOAD( 0x0c00000, 0x0400000 ) |
| 3251 | 3198 | ROM_LOAD( "bom210-13.ic5", 0x2800000, 0x0400000, CRC(5ece1d5c) SHA1(6d88f71b485bf2b3c164fa22f1c7ecaba4b3f5b1) ) |
| 3252 | | ROM_RELOAD( 0x1000000, 0x0400000 ) |
| 3199 | ROM_RELOAD( 0x1000000, 0x0400000 ) |
| 3253 | 3200 | ROM_END |
| 3254 | 3201 | |
| 3255 | 3202 | |
| r2956 | r2957 | |
| 3330 | 3277 | ROM_LOAD16_WORD_SWAP( "mpr19633.3", 0x0800000, 0x0400000, CRC(e2f0b037) SHA1(97861d09e10ce5d2b10bf5559574b3f489e28077) ) // good |
| 3331 | 3278 | ROM_END |
| 3332 | 3279 | |
| 3333 | | ROM_START( smleague ) |
| 3334 | | STV_BIOS // must use USA |
| 3280 | ROM_START( smleague ) /* must use USA BIOS so we include it in this set */ |
| 3281 | |
| 3282 | ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* SH2 code */ |
| 3283 | ROM_LOAD16_WORD_SWAP( "epr-17952a.ic8", 0x000000, 0x080000, CRC(d1be2adf) SHA1(eaf1c3e5d602e1139d2090a78d7e19f04f916794) ) |
| 3284 | ROM_REGION( 0x080000, REGION_CPU2, 0 ) /* SH2 code */ |
| 3285 | ROM_COPY( REGION_CPU1,0,0,0x080000) |
| 3286 | |
| 3335 | 3287 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ |
| 3336 | 3288 | ROM_LOAD( "epr18777.13", 0x0000000, 0x0080000, CRC(8d180866) SHA1(d47ebabab6e06400312d39f68cd818852e496b96) ) |
| 3337 | 3289 | ROM_RELOAD ( 0x0080000, 0x0080000 ) |
| r2956 | r2957 | |
| 3577 | 3529 | |
| 3578 | 3530 | */ |
| 3579 | 3531 | |
| 3580 | | ROM_START( critcrsh ) |
| 3532 | ROM_START( critcrsh ) /* Must use Europe or Asia BIOS */ |
| 3581 | 3533 | STV_BIOS |
| 3582 | 3534 | |
| 3583 | 3535 | ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */ |
src/mame/drivers/snk68.c
| r2956 | r2957 | |
| 13 | 13 | |
| 14 | 14 | For some strange reason version 2 of Street Smart runs on Pow hardware! |
| 15 | 15 | |
| 16 | | Emulation by Bryan McPhail, mish@tendril.co.uk |
| 16 | Driver by Bryan McPhail, Acho A. Tang, Nicola Salmoria |
| 17 | 17 | |
| 18 | 18 | |
| 19 | | Change Log: |
| 20 | | |
| 21 | | FEB-2003 (AT) |
| 22 | | |
| 23 | | - bug fixes: |
| 24 | | |
| 25 | | pow37b5yel: incorrect sprite priority |
| 26 | | powj36rc2gre: scrambled Japanese text in cut scenes |
| 27 | | |
| 28 | 19 | Notes: |
| 20 | ------ |
| 21 | - All evidence suggests that the sprite hardware doesn't have a frame buffer |
| 22 | but just a raster line buffer, like NeoGeo (unsurprisingly). The maths |
| 23 | confirm this: |
| 24 | 384 pixels per raster line at 4 clocks per pixel = 1536 clocks per line |
| 25 | 96 sprites * 16 pixels per sprite = 1536 clocks to draw the sprites |
| 29 | 26 | |
| 30 | | Sprite flickerings and pop-up's not fixed. They look more like |
| 31 | | sloppy programming than emulation issues. Also suggest redumping |
| 32 | | sound ROM "dg7", it might be the cause of pow060gre. |
| 27 | While this board doesn't have a raster interrupt capability, the way how |
| 28 | sprites are drawn needs to be kept in consideration because at least in one |
| 29 | case the program modifies the sprite list in the middle of the frame: |
| 30 | bug 00871: pow: At 3/4 of the 1st level, there is a large pillar, which pops up too late. |
| 31 | The problem in this case is that the sprite list is built by the IRQ handler, |
| 32 | however there is code in the main loop that clears some portions of sprite |
| 33 | RAM under certain conditions. Usually, this isn't a problem, but in that |
| 34 | specific point the sprites added by the IRQ handler are erased during the |
| 35 | frame. |
| 36 | To avoid glitches in that case, we force a partial screen update every time |
| 37 | sprite RAM changes. It's possible that there are other unknown small glitches |
| 38 | fixed by this (earlier notes in this driver talked about "sprite flickerings |
| 39 | and pop-ups" but I don't know where they happened). |
| 33 | 40 | |
| 41 | TODO: |
| 42 | ----- |
| 43 | - Number of raster lines unknown. Currently set to 264 which gives a 59.19Hz |
| 44 | refresh rate. |
| 45 | |
| 34 | 46 | ***************************************************************************/ |
| 35 | 47 | |
| 36 | 48 | #include "driver.h" |
| r2956 | r2957 | |
| 38 | 50 | #include "sound/3812intf.h" |
| 39 | 51 | #include "sound/upd7759.h" |
| 40 | 52 | |
| 53 | extern UINT16* pow_fg_videoram; |
| 54 | |
| 41 | 55 | VIDEO_START( pow ); |
| 42 | 56 | VIDEO_START( searchar ); |
| 43 | | VIDEO_START( ikari3 ); |
| 44 | 57 | VIDEO_UPDATE( pow ); |
| 45 | | VIDEO_UPDATE( searchar ); |
| 46 | 58 | WRITE16_HANDLER( pow_paletteram16_word_w ); |
| 47 | 59 | WRITE16_HANDLER( pow_flipscreen16_w ); |
| 48 | | WRITE16_HANDLER( pow_video16_w ); |
| 60 | WRITE16_HANDLER( searchar_flipscreen16_w ); |
| 61 | READ16_HANDLER( pow_spriteram_r ); |
| 62 | WRITE16_HANDLER( pow_spriteram_w ); |
| 63 | READ16_HANDLER( pow_fg_videoram_r ); |
| 64 | WRITE16_HANDLER( pow_fg_videoram_w ); |
| 65 | WRITE16_HANDLER( searchar_fg_videoram_w ); |
| 49 | 66 | |
| 50 | 67 | static int invert_controls; |
| 68 | static int sound_status; |
| 51 | 69 | |
| 52 | 70 | /******************************************************************************/ |
| 53 | 71 | |
| 54 | | static READ16_HANDLER( sound_cpu_r ) |
| 72 | static READ16_HANDLER( sound_status_r ) |
| 55 | 73 | { |
| 56 | | return 0x0100; |
| 74 | return (sound_status << 8); |
| 57 | 75 | } |
| 58 | 76 | |
| 59 | | static READ16_HANDLER( pow_video16_r ) |
| 77 | static WRITE8_HANDLER( sound_status_w ) |
| 60 | 78 | { |
| 61 | | UINT16 data = videoram16[offset]; |
| 62 | | return data; |
| 79 | sound_status = data; |
| 63 | 80 | } |
| 64 | 81 | |
| 65 | | static WRITE16_HANDLER( pow_spriteram16_w ) |
| 66 | | { |
| 67 | | /* DWORD aligned bytes should be $ff */ |
| 68 | | if (!(offset & 1)) |
| 69 | | data |= 0xff00; |
| 70 | | COMBINE_DATA(&spriteram16[offset]); |
| 71 | | } |
| 72 | | |
| 73 | | static READ16_HANDLER( pow_spriteram16_r ) |
| 74 | | { |
| 75 | | return spriteram16[offset]; |
| 76 | | } |
| 77 | | |
| 78 | 82 | static READ16_HANDLER( control_1_r ) |
| 79 | 83 | { |
| 80 | | return (input_port_read(machine, "IN0") + (input_port_read(machine, "IN1") << 8)); |
| 84 | return (input_port_read(machine, "P1") + (input_port_read(machine, "P2") << 8)); |
| 81 | 85 | } |
| 82 | 86 | |
| 83 | 87 | static READ16_HANDLER( control_2_r ) |
| 84 | 88 | { |
| 85 | | return input_port_read(machine, "IN2"); |
| 89 | return input_port_read(machine, "SYSTEM"); |
| 86 | 90 | } |
| 87 | 91 | |
| 88 | | static READ16_HANDLER( dip_1_r ) |
| 89 | | { |
| 90 | | return input_port_read(machine, "DSW1") << 8; |
| 91 | | } |
| 92 | | |
| 93 | | static READ16_HANDLER( dip_2_r ) |
| 94 | | { |
| 95 | | return input_port_read(machine, "DSW2") << 8; |
| 96 | | } |
| 97 | | |
| 98 | 92 | static READ16_HANDLER( rotary_1_r ) |
| 99 | 93 | { |
| 100 | 94 | return (( ~(1 << input_port_read(machine, "ROT1")) )<<8)&0xff00; |
| r2956 | r2957 | |
| 113 | 107 | |
| 114 | 108 | static READ16_HANDLER( protcontrols_r ) |
| 115 | 109 | { |
| 116 | | return input_port_read_indexed(machine, offset) ^ invert_controls; |
| 110 | static const char *portnames[] = { "P1", "P2", "SYSTEM" }; |
| 111 | return input_port_read(machine, portnames[offset]) ^ invert_controls; |
| 117 | 112 | } |
| 118 | 113 | |
| 119 | 114 | static WRITE16_HANDLER( protection_w ) |
| r2956 | r2957 | |
| 126 | 121 | |
| 127 | 122 | static WRITE16_HANDLER( sound_w ) |
| 128 | 123 | { |
| 129 | | soundlatch_w(machine,0,(data>>8)&0xff); |
| 130 | | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); |
| 124 | if (ACCESSING_BITS_8_15) |
| 125 | { |
| 126 | soundlatch_w(machine, 0, data >> 8); |
| 127 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); |
| 128 | } |
| 131 | 129 | } |
| 132 | 130 | |
| 133 | 131 | /*******************************************************************************/ |
| 134 | 132 | |
| 135 | | static ADDRESS_MAP_START( pow_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 136 | | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) |
| 137 | | AM_RANGE(0x040000, 0x043fff) AM_READ(SMH_RAM) |
| 133 | static ADDRESS_MAP_START( pow_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 134 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 135 | AM_RANGE(0x040000, 0x043fff) AM_RAM |
| 138 | 136 | AM_RANGE(0x080000, 0x080001) AM_READ(control_1_r) |
| 137 | AM_RANGE(0x080000, 0x080001) AM_WRITE(sound_w) |
| 139 | 138 | AM_RANGE(0x0c0000, 0x0c0001) AM_READ(control_2_r) |
| 140 | | AM_RANGE(0x0e0000, 0x0e0001) AM_READ(SMH_NOP) /* Watchdog or IRQ ack */ |
| 141 | | AM_RANGE(0x0e8000, 0x0e8001) AM_READ(SMH_NOP) /* Watchdog or IRQ ack */ |
| 142 | | AM_RANGE(0x0f0000, 0x0f0001) AM_READ(dip_1_r) |
| 143 | | AM_RANGE(0x0f0008, 0x0f0009) AM_READ(dip_2_r) |
| 144 | | AM_RANGE(0x100000, 0x100fff) AM_READ(pow_video16_r) |
| 145 | | AM_RANGE(0x200000, 0x207fff) AM_READ(pow_spriteram16_r) |
| 146 | | AM_RANGE(0x400000, 0x400fff) AM_READ(SMH_RAM) |
| 139 | AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(pow_flipscreen16_w) // + char bank |
| 140 | AM_RANGE(0x0e0000, 0x0e0001) AM_READNOP /* Watchdog or IRQ ack */ |
| 141 | AM_RANGE(0x0e8000, 0x0e8001) AM_READNOP /* Watchdog or IRQ ack */ |
| 142 | AM_RANGE(0x0f0000, 0x0f0001) AM_READ_PORT("DSW1") |
| 143 | AM_RANGE(0x0f0008, 0x0f0009) AM_READ_PORT("DSW2") |
| 144 | // AM_RANGE(0x0f0008, 0x0f0009) AM_WRITENOP /* ?? */ |
| 145 | AM_RANGE(0x100000, 0x100fff) AM_READWRITE(pow_fg_videoram_r, pow_fg_videoram_w) AM_MIRROR(0x1000) AM_BASE(&pow_fg_videoram) // 8-bit |
| 146 | AM_RANGE(0x200000, 0x207fff) AM_READWRITE(pow_spriteram_r, pow_spriteram_w) AM_BASE(&spriteram16) // only partially populated |
| 147 | AM_RANGE(0x400000, 0x400fff) AM_RAM_WRITE(pow_paletteram16_word_w) AM_BASE(&paletteram16) |
| 147 | 148 | ADDRESS_MAP_END |
| 148 | 149 | |
| 149 | | static ADDRESS_MAP_START( pow_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 150 | | AM_RANGE(0x000000, 0x03ffff) AM_WRITE(SMH_ROM) |
| 151 | | AM_RANGE(0x040000, 0x043fff) AM_WRITE(SMH_RAM) |
| 152 | | AM_RANGE(0x080000, 0x080001) AM_WRITE(sound_w) |
| 153 | | AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(pow_flipscreen16_w) |
| 154 | | AM_RANGE(0x0f0008, 0x0f0009) AM_WRITE(SMH_NOP) |
| 155 | | AM_RANGE(0x100000, 0x100fff) AM_WRITE(pow_video16_w) AM_BASE(&videoram16) |
| 156 | | AM_RANGE(0x101000, 0x101fff) AM_WRITE(SMH_NOP) // unknown register writes |
| 157 | | AM_RANGE(0x200000, 0x207fff) AM_WRITE(pow_spriteram16_w) AM_BASE(&spriteram16) |
| 158 | | AM_RANGE(0x400000, 0x400fff) AM_WRITE(pow_paletteram16_word_w) AM_BASE(&paletteram16) |
| 159 | | ADDRESS_MAP_END |
| 160 | | |
| 161 | | static ADDRESS_MAP_START( searchar_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 162 | | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) |
| 163 | | AM_RANGE(0x040000, 0x043fff) AM_READ(SMH_RAM) |
| 150 | static ADDRESS_MAP_START( searchar_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 151 | AM_RANGE(0x000000, 0x03ffff) AM_ROM |
| 152 | AM_RANGE(0x040000, 0x043fff) AM_RAM |
| 164 | 153 | AM_RANGE(0x080000, 0x080005) AM_READ(protcontrols_r) /* Player 1 & 2 */ |
| 154 | AM_RANGE(0x080000, 0x080001) AM_WRITE(sound_w) |
| 155 | AM_RANGE(0x080006, 0x080007) AM_WRITE(protection_w) /* top byte unknown, bottom is protection in ikari3 and streetsm */ |
| 156 | AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(searchar_flipscreen16_w) |
| 165 | 157 | AM_RANGE(0x0c0000, 0x0c0001) AM_READ(rotary_1_r) /* Player 1 rotary */ |
| 166 | 158 | AM_RANGE(0x0c8000, 0x0c8001) AM_READ(rotary_2_r) /* Player 2 rotary */ |
| 167 | 159 | AM_RANGE(0x0d0000, 0x0d0001) AM_READ(rotary_lsb_r) /* Extra rotary bits */ |
| 168 | | AM_RANGE(0x0e0000, 0x0e0001) AM_READ(SMH_NOP) /* Watchdog or IRQ ack */ |
| 169 | | AM_RANGE(0x0e8000, 0x0e8001) AM_READ(SMH_NOP) /* Watchdog or IRQ ack */ |
| 170 | | AM_RANGE(0x0f0000, 0x0f0001) AM_READ(dip_1_r) |
| 171 | | AM_RANGE(0x0f0008, 0x0f0009) AM_READ(dip_2_r) |
| 172 | | AM_RANGE(0x0f8000, 0x0f8001) AM_READ(sound_cpu_r) |
| 173 | | AM_RANGE(0x100000, 0x107fff) AM_READ(pow_spriteram16_r) |
| 174 | | AM_RANGE(0x200000, 0x200fff) AM_READ(pow_video16_r) |
| 175 | | AM_RANGE(0x300000, 0x33ffff) AM_READ(SMH_BANK1) /* Extra code bank */ |
| 176 | | AM_RANGE(0x400000, 0x400fff) AM_READ(SMH_RAM) |
| 160 | AM_RANGE(0x0e0000, 0x0e0001) AM_READNOP /* Watchdog or IRQ ack */ |
| 161 | AM_RANGE(0x0e8000, 0x0e8001) AM_READNOP /* Watchdog or IRQ ack */ |
| 162 | // AM_RANGE(0x0f0000, 0x0f0001) AM_WRITENOP /* ?? */ |
| 163 | AM_RANGE(0x0f0000, 0x0f0001) AM_READ_PORT("DSW1") |
| 164 | AM_RANGE(0x0f0008, 0x0f0009) AM_READ_PORT("DSW2") |
| 165 | AM_RANGE(0x0f8000, 0x0f8001) AM_READ(sound_status_r) |
| 166 | AM_RANGE(0x100000, 0x107fff) AM_READWRITE(pow_spriteram_r, pow_spriteram_w) AM_BASE(&spriteram16) // only partially populated |
| 167 | AM_RANGE(0x200000, 0x200fff) AM_RAM_WRITE(searchar_fg_videoram_w) AM_MIRROR(0x1000) AM_BASE(&pow_fg_videoram) /* Mirror is used by Ikari 3 */ |
| 168 | AM_RANGE(0x300000, 0x33ffff) AM_ROMBANK(1) /* Extra code bank */ |
| 169 | AM_RANGE(0x400000, 0x400fff) AM_RAM_WRITE(pow_paletteram16_word_w) AM_BASE(&paletteram16) |
| 177 | 170 | ADDRESS_MAP_END |
| 178 | 171 | |
| 179 | | static ADDRESS_MAP_START( searchar_writemem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 180 | | AM_RANGE(0x000000, 0x03ffff) AM_WRITE(SMH_ROM) |
| 181 | | AM_RANGE(0x040000, 0x043fff) AM_WRITE(SMH_RAM) |
| 182 | | AM_RANGE(0x080000, 0x080001) AM_WRITE(sound_w) |
| 183 | | AM_RANGE(0x080006, 0x080007) AM_WRITE(protection_w) /* top byte unknown, bottom is protection in ikari3 and streetsm */ |
| 184 | | AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(pow_flipscreen16_w) |
| 185 | | AM_RANGE(0x0f0000, 0x0f0001) AM_WRITE(SMH_NOP) |
| 186 | | AM_RANGE(0x100000, 0x107fff) AM_WRITE(pow_spriteram16_w) AM_BASE(&spriteram16) |
| 187 | | AM_RANGE(0x200000, 0x200fff) AM_WRITE(pow_video16_w) AM_BASE(&videoram16) |
| 188 | | AM_RANGE(0x201000, 0x201fff) AM_WRITE(pow_video16_w) /* Mirror used by Ikari 3 */ |
| 189 | | AM_RANGE(0x400000, 0x400fff) AM_WRITE(pow_paletteram16_word_w) AM_BASE(&paletteram16) |
| 190 | | ADDRESS_MAP_END |
| 191 | | |
| 192 | 172 | /******************************************************************************/ |
| 193 | 173 | |
| 194 | | static ADDRESS_MAP_START( sound_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 195 | | AM_RANGE(0x0000, 0xefff) AM_READ(SMH_ROM) |
| 196 | | AM_RANGE(0xf000, 0xf7ff) AM_READ(SMH_RAM) |
| 197 | | AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) |
| 174 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 175 | AM_RANGE(0x0000, 0xefff) AM_ROM |
| 176 | AM_RANGE(0xf000, 0xf7ff) AM_RAM |
| 177 | AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) AM_WRITE(sound_status_w) |
| 198 | 178 | ADDRESS_MAP_END |
| 199 | 179 | |
| 200 | | static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 201 | | AM_RANGE(0x0000, 0xefff) AM_WRITE(SMH_ROM) |
| 202 | | AM_RANGE(0xf000, 0xf7ff) AM_WRITE(SMH_RAM) |
| 203 | | ADDRESS_MAP_END |
| 204 | | |
| 205 | 180 | static WRITE8_HANDLER( D7759_write_port_0_w ) |
| 206 | 181 | { |
| 207 | 182 | upd7759_port_w(offset,data); |
| 208 | | upd7759_start_w (0,0); |
| 209 | | upd7759_start_w (0,1); |
| 183 | upd7759_start_w(0,0); |
| 184 | upd7759_start_w(0,1); |
| 210 | 185 | } |
| 211 | 186 | |
| 212 | | static ADDRESS_MAP_START( sound_readport, ADDRESS_SPACE_IO, 8 ) |
| 187 | static ADDRESS_MAP_START( sound_io_map, ADDRESS_SPACE_IO, 8 ) |
| 213 | 188 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 214 | | AM_RANGE(0x00, 0x00) AM_READ(YM3812_status_port_0_r) |
| 215 | | ADDRESS_MAP_END |
| 216 | | |
| 217 | | static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 ) |
| 218 | | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 219 | | AM_RANGE(0x00, 0x00) AM_WRITE(YM3812_control_port_0_w) |
| 189 | AM_RANGE(0x00, 0x00) AM_READWRITE(YM3812_status_port_0_r, YM3812_control_port_0_w) |
| 220 | 190 | AM_RANGE(0x20, 0x20) AM_WRITE(YM3812_write_port_0_w) |
| 221 | 191 | AM_RANGE(0x40, 0x40) AM_WRITE(D7759_write_port_0_w) |
| 222 | 192 | AM_RANGE(0x80, 0x80) AM_WRITE(upd7759_0_reset_w) |
| 223 | 193 | ADDRESS_MAP_END |
| 224 | 194 | |
| 225 | 195 | /******************************************************************************/ |
| 226 | | #define POW_IN0\ |
| 227 | | PORT_START_TAG("IN0") /* Player 1 controls */\ |
| 228 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY\ |
| 229 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY\ |
| 230 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY\ |
| 231 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY\ |
| 232 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )\ |
| 233 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )\ |
| 234 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )\ |
| 196 | |
| 197 | static INPUT_PORTS_START( pow ) |
| 198 | PORT_START_TAG("P1") /* Player 1 controls */ |
| 199 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 200 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 201 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 202 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 203 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 204 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 205 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 235 | 206 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 236 | 207 | |
| 237 | | #define POW_IN1\ |
| 238 | | PORT_START_TAG("IN1") /* Player 2 controls */\ |
| 239 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)\ |
| 240 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)\ |
| 241 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)\ |
| 242 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)\ |
| 243 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)\ |
| 244 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)\ |
| 245 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)\ |
| 246 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 208 | PORT_START_TAG("P2") /* Player 2 controls */ |
| 209 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 210 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 211 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 212 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 213 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 214 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 215 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 216 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 247 | 217 | |
| 248 | | #define POW_IN2\ |
| 249 | | PORT_START_TAG("IN2")\ |
| 250 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )\ |
| 251 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */\ |
| 252 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 253 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 254 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )\ |
| 255 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )\ |
| 256 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\ |
| 218 | PORT_START_TAG("SYSTEM") |
| 219 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 220 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ |
| 221 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 222 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 223 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 224 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 225 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 257 | 226 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 258 | 227 | |
| 259 | | #define POW_DSW2\ |
| 260 | | PORT_START_TAG("DSW2") /* Dip switch bank 2, all active high */\ |
| 261 | | PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )\ |
| 262 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Allow_Continue ) )\ |
| 263 | | PORT_DIPSETTING( 0x02, DEF_STR( No ) )\ |
| 264 | | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )\ |
| 265 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )\ |
| 266 | | PORT_DIPSETTING( 0x00, "20k 50k" )\ |
| 267 | | PORT_DIPSETTING( 0x08, "40k 100k" )\ |
| 268 | | PORT_DIPSETTING( 0x04, "60k 150k" )\ |
| 269 | | PORT_DIPSETTING( 0x0c, DEF_STR( None ) )\ |
| 270 | | PORT_DIPNAME( 0x30, 0x00, "Game Mode" )\ |
| 271 | | PORT_DIPSETTING( 0x00, "Demo Sounds On" )\ |
| 272 | | PORT_DIPSETTING( 0x20, "Demo Sounds Off" )\ |
| 273 | | PORT_DIPSETTING( 0x30, "Freeze" )\ |
| 274 | | PORT_DIPSETTING( 0x10, "Infinite Lives (Cheat)")\ |
| 275 | | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )\ |
| 276 | | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )\ |
| 277 | | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )\ |
| 278 | | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )\ |
| 279 | | PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) ) |
| 228 | PORT_START_TAG("DSW1") |
| 229 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 230 | PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Coin_B ) ) |
| 231 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) |
| 232 | PORT_DIPSETTING( 0x0200, DEF_STR( 1C_2C ) ) |
| 233 | PORT_DIPSETTING( 0x0100, DEF_STR( 1C_3C ) ) |
| 234 | PORT_DIPSETTING( 0x0300, DEF_STR( 1C_4C ) ) |
| 235 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Coin_A ) ) |
| 236 | PORT_DIPSETTING( 0x0c00, DEF_STR( 4C_1C ) ) |
| 237 | PORT_DIPSETTING( 0x0400, DEF_STR( 3C_1C ) ) |
| 238 | PORT_DIPSETTING( 0x0800, DEF_STR( 2C_1C ) ) |
| 239 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) |
| 240 | PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Lives ) ) |
| 241 | PORT_DIPSETTING( 0x0000, "2" ) |
| 242 | PORT_DIPSETTING( 0x1000, "3" ) |
| 243 | PORT_DIPNAME( 0x2000, 0x0000, "Bonus Occurrence" ) |
| 244 | PORT_DIPSETTING( 0x0000, "1st & 2nd only" ) |
| 245 | PORT_DIPSETTING( 0x2000, "1st & every 2nd" ) |
| 246 | PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Language ) ) |
| 247 | PORT_DIPSETTING( 0x0000, DEF_STR( English ) ) |
| 248 | PORT_DIPSETTING( 0x4000, DEF_STR( Japanese ) ) |
| 249 | PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen ) ) |
| 250 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 251 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| 280 | 252 | |
| 281 | | static INPUT_PORTS_START( pow ) |
| 282 | | POW_IN0 |
| 283 | | POW_IN1 |
| 284 | | POW_IN2 |
| 285 | | |
| 286 | | PORT_START_TAG("DSW1") /* Dip switch bank 1, all active high */ |
| 287 | | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) ) |
| 288 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 289 | | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) |
| 290 | | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) |
| 291 | | PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) ) |
| 292 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) ) |
| 293 | | PORT_DIPSETTING( 0x0c, DEF_STR( 4C_1C ) ) |
| 294 | | PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) |
| 295 | | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| 296 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 297 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) ) |
| 298 | | PORT_DIPSETTING( 0x00, "2" ) |
| 299 | | PORT_DIPSETTING( 0x10, "3" ) |
| 300 | | PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" ) |
| 301 | | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) |
| 302 | | PORT_DIPSETTING( 0x20, "1st & every 2nd" ) |
| 303 | | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Language ) ) |
| 304 | | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 305 | | PORT_DIPSETTING( 0x40, DEF_STR( Japanese ) ) |
| 306 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) |
| 307 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 308 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 309 | | |
| 310 | | POW_DSW2 |
| 253 | PORT_START_TAG("DSW2") |
| 254 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 255 | PORT_SERVICE( 0x0100, IP_ACTIVE_HIGH ) |
| 256 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Allow_Continue ) ) |
| 257 | PORT_DIPSETTING( 0x0200, DEF_STR( No ) ) |
| 258 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| 259 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Bonus_Life ) ) |
| 260 | PORT_DIPSETTING( 0x0000, "20k 50k" ) |
| 261 | PORT_DIPSETTING( 0x0800, "40k 100k" ) |
| 262 | PORT_DIPSETTING( 0x0400, "60k 150k" ) |
| 263 | PORT_DIPSETTING( 0x0c00, DEF_STR( None ) ) |
| 264 | PORT_DIPNAME( 0x3000, 0x0000, "Game Mode" ) |
| 265 | PORT_DIPSETTING( 0x2000, "Demo Sounds Off" ) |
| 266 | PORT_DIPSETTING( 0x0000, "Demo Sounds On" ) |
| 267 | PORT_DIPSETTING( 0x3000, "Freeze" ) |
| 268 | PORT_DIPSETTING( 0x1000, "Infinite Lives (Cheat)") |
| 269 | PORT_DIPNAME( 0xc000, 0x0000, DEF_STR( Difficulty ) ) |
| 270 | PORT_DIPSETTING( 0x8000, DEF_STR( Easy ) ) |
| 271 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) |
| 272 | PORT_DIPSETTING( 0x4000, DEF_STR( Hard ) ) |
| 273 | PORT_DIPSETTING( 0xc000, DEF_STR( Hardest ) ) |
| 311 | 274 | INPUT_PORTS_END |
| 312 | 275 | |
| 313 | 276 | /* Identical to pow, but the Language dip switch has no effect */ |
| 314 | 277 | static INPUT_PORTS_START( powj ) |
| 315 | | POW_IN0 |
| 316 | | POW_IN1 |
| 317 | | POW_IN2 |
| 278 | PORT_INCLUDE( pow ) |
| 318 | 279 | |
| 319 | | PORT_START_TAG("DSW1") /* Dip switch bank 1, all active high */ |
| 320 | | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) ) |
| 321 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 322 | | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) |
| 323 | | PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) |
| 324 | | PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) ) |
| 325 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) ) |
| 326 | | PORT_DIPSETTING( 0x0c, DEF_STR( 4C_1C ) ) |
| 327 | | PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) |
| 328 | | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| 329 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 330 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) ) |
| 331 | | PORT_DIPSETTING( 0x00, "2" ) |
| 332 | | PORT_DIPSETTING( 0x10, "3" ) |
| 333 | | PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" ) |
| 334 | | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) |
| 335 | | PORT_DIPSETTING( 0x20, "1st & every 2nd" ) |
| 336 | | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 337 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 338 | | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 339 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) |
| 340 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 341 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 342 | | |
| 343 | | POW_DSW2 |
| 280 | PORT_MODIFY("DSW1") |
| 281 | PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) |
| 282 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 283 | PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) |
| 344 | 284 | INPUT_PORTS_END |
| 345 | 285 | |
| 286 | |
| 346 | 287 | static INPUT_PORTS_START( searchar ) |
| 347 | | PORT_START_TAG("IN0") /* Player 1 controls */ |
| 288 | PORT_START_TAG("P1") /* Player 1 controls */ |
| 348 | 289 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 349 | 290 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 350 | 291 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r2956 | r2957 | |
| 354 | 295 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 355 | 296 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 356 | 297 | |
| 357 | | PORT_START_TAG("IN1") /* Player 2 controls */ |
| 298 | PORT_START_TAG("P2") /* Player 2 controls */ |
| 358 | 299 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 359 | 300 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 360 | 301 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| r2956 | r2957 | |
| 362 | 303 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 363 | 304 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 364 | 305 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 365 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 306 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 366 | 307 | |
| 367 | | POW_IN2 |
| 308 | PORT_START_TAG("SYSTEM") |
| 309 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 310 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ |
| 311 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 312 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 313 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 314 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 315 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 316 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 368 | 317 | |
| 369 | 318 | PORT_START_TAG("DSW1") |
| 370 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Joystick ) ) |
| 371 | | PORT_DIPSETTING( 0x00, "Rotary Joystick" ) |
| 372 | | PORT_DIPSETTING( 0x01, "Standard Joystick" ) |
| 373 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 374 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 375 | | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 376 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) ) |
| 377 | | PORT_DIPSETTING( 0x08, "2" ) |
| 378 | | PORT_DIPSETTING( 0x00, "3" ) |
| 379 | | PORT_DIPSETTING( 0x04, "4" ) |
| 380 | | PORT_DIPSETTING( 0x0c, "5" ) |
| 381 | | PORT_DIPNAME( 0x30, 0x00, "Coin A & B" ) |
| 382 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) |
| 383 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 384 | | PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) |
| 385 | | PORT_DIPSETTING( 0x30, DEF_STR( Free_Play ) ) |
| 386 | | PORT_DIPNAME( 0x40, 0x00, "Bonus Occurrence" ) |
| 387 | | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) |
| 388 | | PORT_DIPSETTING( 0x40, "1st & every 2nd" ) |
| 389 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) |
| 390 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 391 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 319 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 320 | PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Joystick ) ) |
| 321 | PORT_DIPSETTING( 0x0000, "Rotary Joystick" ) |
| 322 | PORT_DIPSETTING( 0x0100, "Standard Joystick" ) |
| 323 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) ) |
| 324 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 325 | PORT_DIPSETTING( 0x0200, DEF_STR( On ) ) |
| 326 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Lives ) ) |
| 327 | PORT_DIPSETTING( 0x0800, "2" ) |
| 328 | PORT_DIPSETTING( 0x0000, "3" ) |
| 329 | PORT_DIPSETTING( 0x0400, "4" ) |
| 330 | PORT_DIPSETTING( 0x0c00, "5" ) |
| 331 | PORT_DIPNAME( 0x3000, 0x0000, "Coin A & B" ) |
| 332 | PORT_DIPSETTING( 0x2000, DEF_STR( 2C_1C ) ) |
| 333 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) |
| 334 | PORT_DIPSETTING( 0x1000, DEF_STR( 1C_2C ) ) |
| 335 | PORT_DIPSETTING( 0x3000, DEF_STR( Free_Play ) ) |
| 336 | PORT_DIPNAME( 0x4000, 0x0000, "Bonus Occurrence" ) |
| 337 | PORT_DIPSETTING( 0x0000, "1st & 2nd only" ) |
| 338 | PORT_DIPSETTING( 0x4000, "1st & every 2nd" ) |
| 339 | PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen ) ) |
| 340 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 341 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| 392 | 342 | |
| 393 | 343 | PORT_START_TAG("DSW2") |
| 394 | | PORT_SERVICE( 0x01, IP_ACTIVE_HIGH ) |
| 395 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Allow_Continue ) ) |
| 396 | | PORT_DIPSETTING( 0x02, DEF_STR( No ) ) |
| 397 | | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 398 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) |
| 399 | | PORT_DIPSETTING( 0x00, "50k 200k" ) |
| 400 | | PORT_DIPSETTING( 0x08, "70k 270k" ) |
| 401 | | PORT_DIPSETTING( 0x04, "90k 350k" ) |
| 402 | | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) |
| 403 | | PORT_DIPNAME( 0x30, 0x00, "Game Mode" ) |
| 404 | | PORT_DIPSETTING( 0x20, "Demo Sounds Off" ) |
| 405 | | PORT_DIPSETTING( 0x00, "Demo Sounds On" ) |
| 406 | | PORT_DIPSETTING( 0x30, "Freeze" ) |
| 407 | | PORT_DIPSETTING( 0x10, "Infinite Lives (Cheat)") |
| 408 | | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) ) |
| 409 | | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) ) |
| 410 | | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 411 | | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 412 | | PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) ) |
| 344 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 345 | PORT_SERVICE( 0x0100, IP_ACTIVE_HIGH ) |
| 346 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Allow_Continue ) ) |
| 347 | PORT_DIPSETTING( 0x0200, DEF_STR( No ) ) |
| 348 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| 349 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Bonus_Life ) ) |
| 350 | PORT_DIPSETTING( 0x0000, "50k 200k" ) |
| 351 | PORT_DIPSETTING( 0x0800, "70k 270k" ) |
| 352 | PORT_DIPSETTING( 0x0400, "90k 350k" ) |
| 353 | PORT_DIPSETTING( 0x0c00, DEF_STR( None ) ) |
| 354 | PORT_DIPNAME( 0x3000, 0x0000, "Game Mode" ) |
| 355 | PORT_DIPSETTING( 0x2000, "Demo Sounds Off" ) |
| 356 | PORT_DIPSETTING( 0x0000, "Demo Sounds On" ) |
| 357 | PORT_DIPSETTING( 0x3000, "Freeze" ) |
| 358 | PORT_DIPSETTING( 0x1000, "Infinite Lives (Cheat)") |
| 359 | PORT_DIPNAME( 0xc000, 0x0000, DEF_STR( Difficulty ) ) |
| 360 | PORT_DIPSETTING( 0x8000, DEF_STR( Easy ) ) |
| 361 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) |
| 362 | PORT_DIPSETTING( 0x4000, DEF_STR( Hard ) ) |
| 363 | PORT_DIPSETTING( 0xc000, DEF_STR( Hardest ) ) |
| 413 | 364 | |
| 414 | 365 | PORT_START_TAG("ROT1") /* player 1 12-way rotary control */ |
| 415 | 366 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(5) PORT_KEYDELTA(5) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| r2956 | r2957 | |
| 418 | 369 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(5) PORT_KEYDELTA(5) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| 419 | 370 | INPUT_PORTS_END |
| 420 | 371 | |
| 421 | | #define STREETS_IN0\ |
| 422 | | PORT_START_TAG("IN0") /* Player 1 controls */\ |
| 423 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY\ |
| 424 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY\ |
| 425 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY\ |
| 426 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY\ |
| 427 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )\ |
| 428 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )\ |
| 429 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )\ |
| 372 | |
| 373 | static INPUT_PORTS_START( streetsm ) |
| 374 | PORT_START_TAG("P1") /* Player 1 controls */ |
| 375 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 376 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 377 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 378 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 379 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 380 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 381 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 430 | 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 431 | 383 | |
| 432 | | #define STREETS_IN1\ |
| 433 | | PORT_START_TAG("IN1") /* Player 2 controls */\ |
| 434 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)\ |
| 435 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)\ |
| 436 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)\ |
| 437 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)\ |
| 438 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)\ |
| 439 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)\ |
| 440 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)\ |
| 441 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 384 | PORT_START_TAG("P2") /* Player 2 controls */ |
| 385 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 386 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 387 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 388 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 389 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 390 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 391 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 392 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 442 | 393 | |
| 443 | | #define STREETS_REST\ |
| 444 | | PORT_START_TAG("DSW2") /* Dip switches (Active high) */\ |
| 445 | | PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )\ |
| 446 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Allow_Continue ) )\ |
| 447 | | PORT_DIPSETTING( 0x02, DEF_STR( No ) )\ |
| 448 | | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )\ |
| 449 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )\ |
| 450 | | PORT_DIPSETTING( 0x00, "200k 400k" )\ |
| 451 | | PORT_DIPSETTING( 0x08, "400k 600k" )\ |
| 452 | | PORT_DIPSETTING( 0x04, "600k 800k" )\ |
| 453 | | PORT_DIPSETTING( 0x0c, DEF_STR( None ) )\ |
| 454 | | PORT_DIPNAME( 0x30, 0x00, "Game Mode" )\ |
| 455 | | PORT_DIPSETTING( 0x20, "Demo Sounds Off" )\ |
| 456 | | PORT_DIPSETTING( 0x00, "Demo Sounds On" )\ |
| 457 | | PORT_DIPSETTING( 0x30, "Freeze" )\ |
| 458 | | PORT_DIPSETTING( 0x10, "Infinite Lives (Cheat)")\ |
| 459 | | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )\ |
| 460 | | PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )\ |
| 461 | | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )\ |
| 462 | | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )\ |
| 463 | | PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) )\ |
| 464 | | PORT_START_TAG("ROT1") /* player 1 12-way rotary control - not used in this game */\ |
| 465 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )\ |
| 466 | | PORT_START_TAG("ROT2") /* player 2 12-way rotary control - not used in this game */\ |
| 467 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 394 | PORT_START_TAG("SYSTEM") |
| 395 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 396 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ |
| 397 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 398 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 399 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 400 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 401 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 402 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 468 | 403 | |
| 469 | | static INPUT_PORTS_START( streetsm ) |
| 470 | | STREETS_IN0 |
| 471 | | STREETS_IN1 |
| 472 | | POW_IN2 |
| 473 | | |
| 474 | 404 | PORT_START_TAG("DSW1") /* Dip switches (Active high) */ |
| 475 | | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| 476 | | PORT_DIPSETTING( 0x02, "1" ) |
| 477 | | PORT_DIPSETTING( 0x00, "2" ) |
| 478 | | PORT_DIPSETTING( 0x01, "3" ) |
| 479 | | PORT_DIPSETTING( 0x03, "4" ) |
| 480 | | PORT_DIPNAME( 0x0c, 0x00, "Coin A & B" ) |
| 481 | | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| 482 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 483 | | PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) ) |
| 484 | | PORT_DIPSETTING( 0x0c, DEF_STR( Free_Play ) ) |
| 485 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| 486 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 487 | | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 488 | | PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" ) |
| 489 | | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) |
| 490 | | PORT_DIPSETTING( 0x20, "1st & every 2nd" ) |
| 491 | | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 492 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 493 | | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 494 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) |
| 495 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 496 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 497 | | STREETS_REST |
| 405 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 406 | PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Lives ) ) |
| 407 | PORT_DIPSETTING( 0x0200, "1" ) |
| 408 | PORT_DIPSETTING( 0x0000, "2" ) |
| 409 | PORT_DIPSETTING( 0x0100, "3" ) |
| 410 | PORT_DIPSETTING( 0x0300, "4" ) |
| 411 | PORT_DIPNAME( 0x0c00, 0x0000, "Coin A & B" ) |
| 412 | PORT_DIPSETTING( 0x0800, DEF_STR( 2C_1C ) ) |
| 413 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) |
| 414 | PORT_DIPSETTING( 0x0400, DEF_STR( 1C_2C ) ) |
| 415 | PORT_DIPSETTING( 0x0c00, DEF_STR( Free_Play ) ) |
| 416 | PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) |
| 417 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 418 | PORT_DIPSETTING( 0x1000, DEF_STR( On ) ) |
| 419 | PORT_DIPNAME( 0x2000, 0x0000, "Bonus Occurrence" ) |
| 420 | PORT_DIPSETTING( 0x0000, "1st & 2nd only" ) |
| 421 | PORT_DIPSETTING( 0x2000, "1st & every 2nd" ) |
| 422 | PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) |
| 423 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 424 | PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) |
| 425 | PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen ) ) |
| 426 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 427 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| 498 | 428 | |
| 429 | PORT_START_TAG("DSW2") /* Dip switches (Active high) */ |
| 430 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 431 | PORT_SERVICE( 0x0100, IP_ACTIVE_HIGH ) |
| 432 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Allow_Continue ) ) |
| 433 | PORT_DIPSETTING( 0x0200, DEF_STR( No ) ) |
| 434 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| 435 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Bonus_Life ) ) |
| 436 | PORT_DIPSETTING( 0x0000, "200k 400k" ) |
| 437 | PORT_DIPSETTING( 0x0800, "400k 600k" ) |
| 438 | PORT_DIPSETTING( 0x0400, "600k 800k" ) |
| 439 | PORT_DIPSETTING( 0x0c00, DEF_STR( None ) ) |
| 440 | PORT_DIPNAME( 0x3000, 0x0000, "Game Mode" ) |
| 441 | PORT_DIPSETTING( 0x2000, "Demo Sounds Off" ) |
| 442 | PORT_DIPSETTING( 0x0000, "Demo Sounds On" ) |
| 443 | PORT_DIPSETTING( 0x3000, "Freeze" ) |
| 444 | PORT_DIPSETTING( 0x1000, "Infinite Lives (Cheat)") |
| 445 | PORT_DIPNAME( 0xc000, 0x0000, DEF_STR( Difficulty ) ) |
| 446 | PORT_DIPSETTING( 0x8000, DEF_STR( Easy ) ) |
| 447 | PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) |
| 448 | PORT_DIPSETTING( 0x4000, DEF_STR( Hard ) ) |
| 449 | PORT_DIPSETTING( 0xc000, DEF_STR( Hardest ) ) |
| 450 | |
| 451 | PORT_START_TAG("ROT1") /* player 1 12-way rotary control - not used in this game */ |
| 452 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 453 | |
| 454 | PORT_START_TAG("ROT2") /* player 2 12-way rotary control - not used in this game */ |
| 455 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 499 | 456 | INPUT_PORTS_END |
| 500 | 457 | |
| 501 | 458 | /* Same as streetsm, but Coinage is different */ |
| 502 | 459 | static INPUT_PORTS_START( streetsj ) |
| 503 | | STREETS_IN0 |
| 504 | | STREETS_IN1 |
| 505 | | POW_IN2 |
| 460 | PORT_INCLUDE( streetsm ) |
| 506 | 461 | |
| 507 | | PORT_START_TAG("DSW1") /* Dip switches (Active high) */ |
| 508 | | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| 509 | | PORT_DIPSETTING( 0x02, "1" ) |
| 510 | | PORT_DIPSETTING( 0x00, "2" ) |
| 511 | | PORT_DIPSETTING( 0x01, "3" ) |
| 512 | | PORT_DIPSETTING( 0x03, "4" ) |
| 513 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) ) |
| 514 | | PORT_DIPSETTING( 0x0c, "A 4/1 B 1/4" ) |
| 515 | | PORT_DIPSETTING( 0x04, "A 3/1 B 1/3" ) |
| 516 | | PORT_DIPSETTING( 0x08, "A 2/1 B 1/2" ) |
| 517 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 518 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| 519 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 520 | | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 521 | | PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" ) |
| 522 | | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) |
| 523 | | PORT_DIPSETTING( 0x20, "1st & every 2nd" ) |
| 524 | | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 525 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 526 | | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 527 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) |
| 528 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 529 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 530 | | |
| 531 | | STREETS_REST |
| 462 | PORT_MODIFY("DSW1") |
| 463 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Coinage ) ) |
| 464 | PORT_DIPSETTING( 0x0c00, "A 4/1 B 1/4" ) |
| 465 | PORT_DIPSETTING( 0x0400, "A 3/1 B 1/3" ) |
| 466 | PORT_DIPSETTING( 0x0800, "A 2/1 B 1/2" ) |
| 467 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) |
| 532 | 468 | INPUT_PORTS_END |
| 533 | 469 | |
| 470 | |
| 534 | 471 | static INPUT_PORTS_START( ikari3 ) |
| 535 | | PORT_START_TAG("IN0") /* Player 1 controls, maybe all are active_high? */ |
| 472 | PORT_START_TAG("P1") /* Player 1 controls, maybe all are active_high? */ |
| 536 | 473 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 537 | 474 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 538 | 475 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r2956 | r2957 | |
| 542 | 479 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 543 | 480 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 544 | 481 | |
| 545 | | PORT_START_TAG("IN1") /* Player 2 controls */ |
| 482 | PORT_START_TAG("P2") /* Player 2 controls */ |
| 546 | 483 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 547 | 484 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 548 | 485 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| r2956 | r2957 | |
| 550 | 487 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 551 | 488 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 552 | 489 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 553 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 490 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 554 | 491 | |
| 555 | | POW_IN2 |
| 492 | PORT_START_TAG("SYSTEM") |
| 493 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 494 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the service mode dsw */ |
| 495 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 496 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 497 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 498 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 499 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 500 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 556 | 501 | |
| 557 | 502 | PORT_START_TAG("DSW1") /* Dip switches (Active high) */ |
| 558 | | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| 559 | | PORT_DIPSETTING( 0x02, "2" ) |
| 560 | | PORT_DIPSETTING( 0x00, "3" ) |
| 561 | | PORT_DIPSETTING( 0x01, "4" ) |
| 562 | | PORT_DIPSETTING( 0x03, "5" ) |
| 563 | | PORT_DIPNAME( 0x0c, 0x00, "Coin A & B" ) |
| 564 | | PORT_DIPSETTING( 0x08, "First 2 Coins/1 Credit then 1/1" ) |
| 565 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 566 | | PORT_DIPSETTING( 0x04, "First 1 Coin/2 Credits then 1/1" ) |
| 567 | | PORT_DIPSETTING( 0x0c, DEF_STR( Free_Play ) ) |
| 568 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| 569 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 570 | | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 571 | | PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" ) |
| 572 | | PORT_DIPSETTING( 0x00, "1st & 2nd only" ) |
| 573 | | PORT_DIPSETTING( 0x20, "1st & every 2nd" ) |
| 574 | | PORT_DIPNAME( 0x40, 0x00, "Blood" ) |
| 575 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 576 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 577 | | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) ) |
| 578 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 579 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 503 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 504 | PORT_DIPNAME( 0x0300, 0x0000, DEF_STR( Lives ) ) |
| 505 | PORT_DIPSETTING( 0x0200, "2" ) |
| 506 | PORT_DIPSETTING( 0x0000, "3" ) |
| 507 | PORT_DIPSETTING( 0x0100, "4" ) |
| 508 | PORT_DIPSETTING( 0x0300, "5" ) |
| 509 | PORT_DIPNAME( 0x0c00, 0x0000, "Coin A & B" ) |
| 510 | PORT_DIPSETTING( 0x0800, "First 2 Coins/1 Credit then 1/1" ) |
| 511 | PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) |
| 512 | PORT_DIPSETTING( 0x0400, "First 1 Coin/2 Credits then 1/1" ) |
| 513 | PORT_DIPSETTING( 0x0c00, DEF_STR( Free_Play ) ) |
| 514 | PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) |
| 515 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 516 | PORT_DIPSETTING( 0x1000, DEF_STR( On ) ) |
| 517 | PORT_DIPNAME( 0x2000, 0x0000, "Bonus Occurrence" ) |
| 518 | PORT_DIPSETTING( 0x0000, "1st & 2nd only" ) |
| 519 | PORT_DIPSETTING( 0x2000, "1st & every 2nd" ) |
| 520 | PORT_DIPNAME( 0x4000, 0x0000, "Blood" ) |
| 521 | PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) |
| 522 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 523 | PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Flip_Screen ) ) |
| 524 | PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) |
| 525 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| 580 | 526 | |
| 581 | 527 | PORT_START_TAG("DSW2") /* Dip switches (Active high) */ |
| 582 | | PORT_SERVICE( 0x01, IP_ACTIVE_HIGH ) |
| 583 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Allow_Continue ) ) |
| 584 | | PORT_DIPSETTING( 0x02, DEF_STR( No ) ) |
| 585 | | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 586 | | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) |
| 587 | | PORT_DIPSETTING( 0x00, "20k 50k" ) |
| 588 | | PORT_DIPSETTING( 0x08, "40k 100k" ) |
| 589 | | PORT_DIPSETTING( 0x04, "60k 150k" ) |
| 590 | | PORT_DIPSETTING( 0x0c, DEF_STR( None ) ) |
| 591 | | PORT_DIPNAME( 0x30, 0x00, "Game Mode" ) |
| 592 | | PORT_DIPSETTING( 0x20, "Demo Sounds Off" ) |
| 593 | | PORT_DIPSETTING( 0x00, "Demo Sounds On" ) |
| 594 | | PORT_DIPSETTING( 0x30, "Freeze" ) |
| 595 | | PORT_DIPSETTING( 0x10, "Infinite Lives (Cheat)") |
| 596 | | PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) ) |
| 597 | | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 598 | | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) |
| 599 | | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| 600 | | PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) ) |
| 528 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 529 | PORT_SERVICE( 0x0100, IP_ACTIVE_HIGH ) |
| 530 | PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Allow_Continue ) ) |
| 531 | PORT_DIPSETTING( 0x0200, DEF_STR( No ) ) |
| 532 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| 533 | PORT_DIPNAME( 0x0c00, 0x0000, DEF_STR( Bonus_Life ) ) |
| 534 | PORT_DIPSETTING( 0x0000, "20k 50k" ) |
| 535 | PORT_DIPSETTING( 0x0800, "40k 100k" ) |
| 536 | PORT_DIPSETTING( 0x0400, "60k 150k" ) |
| 537 | PORT_DIPSETTING( 0x0c00, DEF_STR( None ) ) |
| 538 | PORT_DIPNAME( 0x3000, 0x0000, "Game Mode" ) |
| 539 | PORT_DIPSETTING( 0x2000, "Demo Sounds Off" ) |
| 540 | PORT_DIPSETTING( 0x0000, "Demo Sounds On" ) |
| 541 | PORT_DIPSETTING( 0x3000, "Freeze" ) |
| 542 | PORT_DIPSETTING( 0x1000, "Infinite Lives (Cheat)") |
| 543 | PORT_DIPNAME( 0xc000, 0x8000, DEF_STR( Difficulty ) ) |
| 544 | PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) |
| 545 | PORT_DIPSETTING( 0x8000, DEF_STR( Normal ) ) |
| 546 | PORT_DIPSETTING( 0x4000, DEF_STR( Hard ) ) |
| 547 | PORT_DIPSETTING( 0xc000, DEF_STR( Hardest ) ) |
| 601 | 548 | |
| 602 | 549 | PORT_START_TAG("ROT1") /* player 1 12-way rotary control */ |
| 603 | 550 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(5) PORT_KEYDELTA(5) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| r2956 | r2957 | |
| 610 | 557 | |
| 611 | 558 | static const gfx_layout charlayout = |
| 612 | 559 | { |
| 613 | | 8,8, /* 8*8 chars */ |
| 614 | | 2048, |
| 615 | | 4, /* 4 bits per pixel */ |
| 616 | | { 0, 4, 0x8000*8, (0x8000*8)+4 }, |
| 617 | | { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 }, |
| 618 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 619 | | 16*8 /* every char takes 8 consecutive bytes */ |
| 560 | 8,8, |
| 561 | RGN_FRAC(1,2), |
| 562 | 4, |
| 563 | { 0, 4, RGN_FRAC(1,2), RGN_FRAC(1,2)+4 }, |
| 564 | { STEP4(8*8+3,-1), STEP4(3,-1) }, |
| 565 | { STEP8(0,8) }, |
| 566 | 16*8 |
| 620 | 567 | }; |
| 621 | 568 | |
| 622 | | static const gfx_layout pow_spritelayout = |
| 569 | static const gfx_layout spritelayout = |
| 623 | 570 | { |
| 624 | | 16,16, /* 16*16 sprites */ |
| 625 | | 4096*4, |
| 626 | | 4, /* 4 bits per pixel */ |
| 627 | | { 0, 0x80000*8, 0x100000*8, 0x180000*8 }, |
| 628 | | { 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0, |
| 629 | | 7, 6, 5, 4, 3, 2, 1, 0 }, |
| 630 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, |
| 631 | | 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, |
| 632 | | 8*32 /* every sprite takes 32 consecutive bytes */ |
| 633 | | }; |
| 634 | | |
| 635 | | static const gfx_layout searchar_spritelayout = |
| 636 | | { |
| 637 | 571 | 16,16, |
| 638 | | 0x6000, |
| 572 | RGN_FRAC(1,2), |
| 639 | 573 | 4, |
| 640 | | { 0, 8,0x180000*8, 0x180000*8+8 }, |
| 641 | | { 32*8+7, 32*8+6, 32*8+5, 32*8+4, 32*8+3, 32*8+2, 32*8+1, 32*8+0, |
| 642 | | 7, 6, 5, 4, 3, 2, 1, 0 |
| 643 | | }, |
| 644 | | { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, |
| 645 | | 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 |
| 646 | | }, |
| 574 | { 0, 8, RGN_FRAC(1,2), RGN_FRAC(1,2)+8 }, |
| 575 | { STEP8(32*8+7,-1), STEP8(7,-1) }, |
| 576 | { STEP16(0,16) }, |
| 647 | 577 | 64*8 |
| 648 | 578 | }; |
| 649 | 579 | |
| 650 | | static const gfx_layout ikari3_spritelayout = |
| 651 | | { |
| 652 | | 16,16, /* 16*16 sprites */ |
| 653 | | 4096*5, |
| 654 | | 4, /* 4 bits per pixel */ |
| 655 | | { 0x140000*8, 0, 0xa0000*8, 0x1e0000*8 }, |
| 656 | | { 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0, |
| 657 | | 7, 6, 5, 4, 3, 2, 1, 0 }, |
| 658 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, |
| 659 | | 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, |
| 660 | | 8*32 /* every sprite takes 32 consecutive bytes */ |
| 661 | | }; |
| 662 | | |
| 663 | 580 | static GFXDECODE_START( pow ) |
| 664 | | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 128 ) |
| 665 | | GFXDECODE_ENTRY( REGION_GFX2, 0, pow_spritelayout, 0, 128 ) |
| 581 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 0x80>>4 ) |
| 582 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 0, 0x800>>4 ) |
| 666 | 583 | GFXDECODE_END |
| 667 | 584 | |
| 668 | | static GFXDECODE_START( searchar ) |
| 669 | | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) |
| 670 | | GFXDECODE_ENTRY( REGION_GFX2, 0, searchar_spritelayout, 0, 128 ) |
| 671 | | GFXDECODE_END |
| 672 | | |
| 673 | | static GFXDECODE_START( ikari3 ) |
| 674 | | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) |
| 675 | | GFXDECODE_ENTRY( REGION_GFX2, 0, ikari3_spritelayout, 0, 128 ) |
| 676 | | GFXDECODE_END |
| 677 | | |
| 678 | 585 | /******************************************************************************/ |
| 679 | 586 | |
| 680 | 587 | static void irqhandler(running_machine *machine, int irq) |
| r2956 | r2957 | |
| 694 | 601 | |
| 695 | 602 | /******************************************************************************/ |
| 696 | 603 | |
| 697 | | static MACHINE_DRIVER_START( ikari3 ) |
| 698 | | |
| 699 | | /* basic machine hardware */ |
| 700 | | MDRV_CPU_ADD(M68000, 10000000) /* Accurate */ |
| 701 | | MDRV_CPU_PROGRAM_MAP(searchar_readmem,searchar_writemem) |
| 702 | | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 703 | | |
| 704 | | MDRV_CPU_ADD(Z80, 4000000) |
| 705 | | /* audio CPU */ /* Accurate */ |
| 706 | | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 707 | | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 708 | | |
| 709 | | /* video hardware */ |
| 710 | | MDRV_SCREEN_ADD("main", RASTER) |
| 711 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 712 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 713 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 714 | | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 715 | | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 716 | | |
| 717 | | MDRV_GFXDECODE(ikari3) |
| 718 | | MDRV_PALETTE_LENGTH(2048) |
| 719 | | |
| 720 | | MDRV_VIDEO_START(ikari3) |
| 721 | | MDRV_VIDEO_UPDATE(searchar) |
| 722 | | |
| 723 | | /* sound hardware */ |
| 724 | | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 725 | | |
| 726 | | MDRV_SOUND_ADD(YM3812, 4000000) |
| 727 | | MDRV_SOUND_CONFIG(ym3812_interface) |
| 728 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 729 | | |
| 730 | | MDRV_SOUND_ADD(UPD7759, UPD7759_STANDARD_CLOCK) |
| 731 | | MDRV_SOUND_CONFIG(upd7759_interface) |
| 732 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 733 | | MACHINE_DRIVER_END |
| 734 | | |
| 735 | | |
| 736 | 604 | static MACHINE_DRIVER_START( pow ) |
| 737 | 605 | |
| 738 | 606 | /* basic machine hardware */ |
| 739 | | MDRV_CPU_ADD(M68000, 10000000) /* Accurate */ |
| 740 | | MDRV_CPU_PROGRAM_MAP(pow_readmem,pow_writemem) |
| 607 | MDRV_CPU_ADD_TAG("main", M68000, XTAL_18MHz/2) /* verified on pcb */ |
| 608 | MDRV_CPU_PROGRAM_MAP(pow_map,0) |
| 741 | 609 | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 742 | 610 | |
| 743 | | MDRV_CPU_ADD(Z80, 4000000) |
| 744 | | /* audio CPU */ /* Accurate */ |
| 745 | | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 746 | | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 611 | MDRV_CPU_ADD_TAG("sound", Z80, XTAL_8MHz/2) /* verified on pcb */ |
| 612 | MDRV_CPU_PROGRAM_MAP(sound_map,0) |
| 613 | MDRV_CPU_IO_MAP(sound_io_map,0) |
| 747 | 614 | |
| 748 | 615 | /* video hardware */ |
| 749 | 616 | MDRV_SCREEN_ADD("main", RASTER) |
| 750 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 751 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 752 | 617 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 753 | | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 754 | | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 618 | MDRV_SCREEN_RAW_PARAMS(XTAL_24MHz/4, 384, 0, 256, 264, 16, 240) // inaccurate |
| 755 | 619 | |
| 756 | 620 | MDRV_GFXDECODE(pow) |
| 757 | | MDRV_PALETTE_LENGTH(2048) |
| 621 | MDRV_PALETTE_LENGTH(0x800) |
| 758 | 622 | |
| 759 | 623 | MDRV_VIDEO_START(pow) |
| 760 | 624 | MDRV_VIDEO_UPDATE(pow) |
| r2956 | r2957 | |
| 762 | 626 | /* sound hardware */ |
| 763 | 627 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 764 | 628 | |
| 765 | | MDRV_SOUND_ADD(YM3812, 4000000) |
| 629 | MDRV_SOUND_ADD(YM3812, XTAL_8MHz/2) /* verified on pcb */ |
| 766 | 630 | MDRV_SOUND_CONFIG(ym3812_interface) |
| 767 | 631 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 768 | 632 | |
| r2956 | r2957 | |
| 774 | 638 | |
| 775 | 639 | static MACHINE_DRIVER_START( searchar ) |
| 776 | 640 | |
| 777 | | /* basic machine hardware */ |
| 778 | | MDRV_CPU_ADD(M68000, XTAL_18MHz/2) /* verified on pcb */ |
| 779 | | MDRV_CPU_PROGRAM_MAP(searchar_readmem,searchar_writemem) |
| 780 | | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 641 | MDRV_IMPORT_FROM(pow) |
| 781 | 642 | |
| 782 | | MDRV_CPU_ADD(Z80, XTAL_8MHz/2) /* verified on pcb */ |
| 783 | | /* audio CPU */ |
| 784 | | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 785 | | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 643 | MDRV_CPU_MODIFY("main") |
| 644 | MDRV_CPU_PROGRAM_MAP(searchar_map,0) |
| 786 | 645 | |
| 787 | | /* video hardware */ |
| 788 | | MDRV_SCREEN_ADD("main", RASTER) |
| 789 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 790 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 791 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 792 | | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 793 | | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 794 | | |
| 795 | | MDRV_GFXDECODE(searchar) |
| 796 | | MDRV_PALETTE_LENGTH(2048) |
| 797 | | |
| 798 | 646 | MDRV_VIDEO_START(searchar) |
| 799 | | MDRV_VIDEO_UPDATE(searchar) |
| 800 | | |
| 801 | | /* sound hardware */ |
| 802 | | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 803 | | |
| 804 | | MDRV_SOUND_ADD(YM3812, XTAL_8MHz/2) /* verified on pcb */ |
| 805 | | MDRV_SOUND_CONFIG(ym3812_interface) |
| 806 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 807 | | |
| 808 | | MDRV_SOUND_ADD(UPD7759, UPD7759_STANDARD_CLOCK) |
| 809 | | MDRV_SOUND_CONFIG(upd7759_interface) |
| 810 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 811 | 647 | MACHINE_DRIVER_END |
| 812 | 648 | |
| 813 | 649 | |
| 814 | | static MACHINE_DRIVER_START( streetsm ) |
| 815 | | |
| 816 | | /* basic machine hardware */ |
| 817 | | MDRV_CPU_ADD(M68000, 10000000) /* Accurate */ |
| 818 | | MDRV_CPU_PROGRAM_MAP(pow_readmem,pow_writemem) |
| 819 | | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 820 | | |
| 821 | | MDRV_CPU_ADD(Z80, 4000000) |
| 822 | | /* audio CPU */ /* Accurate */ |
| 823 | | MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) |
| 824 | | MDRV_CPU_IO_MAP(sound_readport,sound_writeport) |
| 825 | | |
| 826 | | /* video hardware */ |
| 827 | | MDRV_SCREEN_ADD("main", RASTER) |
| 828 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 829 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 830 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 831 | | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 832 | | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 833 | | |
| 834 | | MDRV_GFXDECODE(searchar) |
| 835 | | MDRV_PALETTE_LENGTH(2048) |
| 836 | | |
| 837 | | MDRV_VIDEO_START(pow) |
| 838 | | MDRV_VIDEO_UPDATE(searchar) |
| 839 | | |
| 840 | | /* sound hardware */ |
| 841 | | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 842 | | |
| 843 | | MDRV_SOUND_ADD(YM3812, 4000000) |
| 844 | | MDRV_SOUND_CONFIG(ym3812_interface) |
| 845 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 846 | | |
| 847 | | MDRV_SOUND_ADD(UPD7759, UPD7759_STANDARD_CLOCK) |
| 848 | | MDRV_SOUND_CONFIG(upd7759_interface) |
| 849 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 850 | | MACHINE_DRIVER_END |
| 851 | | |
| 852 | 650 | /******************************************************************************/ |
| 853 | 651 | |
| 854 | 652 | ROM_START( pow ) |
| r2956 | r2957 | |
| 864 | 662 | ROM_LOAD( "dg10.m25", 0x008000, 0x08000, CRC(9e470d53) SHA1(f7dc6ac39ade573480e87170a2781f0f72930580) ) |
| 865 | 663 | |
| 866 | 664 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 867 | | ROM_LOAD( "snk880.11a", 0x000000, 0x20000, CRC(e70fd906) SHA1(b9e734c074ee1c8ae73e6041d739ab30d2df7d62) ) |
| 868 | | ROM_LOAD( "snk880.12a", 0x020000, 0x20000, CRC(628b1aed) SHA1(1065ef835da03f7d9776e81c225c3ecdd2affae2) ) |
| 869 | | ROM_LOAD( "snk880.13a", 0x040000, 0x20000, CRC(19dc8868) SHA1(82aaf93fc8f4b3bf947d373d0f41cc0044207c34) ) /* Also can be labeled as DG13 */ |
| 870 | | ROM_LOAD( "snk880.14a", 0x060000, 0x20000, CRC(47cd498b) SHA1(7fbc007f2d817c26af02fef233f5e0681a17052a) ) |
| 871 | | ROM_LOAD( "snk880.15a", 0x080000, 0x20000, CRC(7a90e957) SHA1(9650d7cdbcbbbcdd7f75a1c3c08a195aa456e169) ) |
| 872 | | ROM_LOAD( "snk880.16a", 0x0a0000, 0x20000, CRC(e40a6c13) SHA1(7ad9dfc65f8c8b316933f0fdd3bc7a243d6eff65) ) |
| 873 | | ROM_LOAD( "snk880.17a", 0x0c0000, 0x20000, CRC(c7931cc2) SHA1(908313d9b7fa4395b5fb79925d068e4f5d354b21) ) |
| 874 | | ROM_LOAD( "snk880.18a", 0x0e0000, 0x20000, CRC(eed72232) SHA1(ad614e752cf1d3eac9a04cbc90435f988e90ace7) ) |
| 875 | | ROM_LOAD( "snk880.19a", 0x100000, 0x20000, CRC(1775b8dd) SHA1(c01154749379be6e18baa99f4d94d97942f3dd85) ) |
| 876 | | ROM_LOAD( "snk880.20a", 0x120000, 0x20000, CRC(f8e752ec) SHA1(1e1e178303f9af84cbb15249c49a870193ef805f) ) |
| 877 | | ROM_LOAD( "snk880.21a", 0x140000, 0x20000, CRC(27e9fffe) SHA1(e8058db40832b986c5addd22dd69b0308d10ec71) ) |
| 878 | | ROM_LOAD( "snk880.22a", 0x160000, 0x20000, CRC(aa9c00d8) SHA1(1017ed1cc036c6084b71204a998fd05557a6e59f) ) |
| 879 | | ROM_LOAD( "snk880.23a", 0x180000, 0x20000, CRC(adb6ad68) SHA1(ed4323d2dfa3efaa496b17f4719f9566d56725e5) ) |
| 880 | | ROM_LOAD( "snk880.24a", 0x1a0000, 0x20000, CRC(dd41865a) SHA1(c86f14342beca896784b88920d9e0879af4179ab) ) |
| 881 | | ROM_LOAD( "snk880.25a", 0x1c0000, 0x20000, CRC(055759ad) SHA1(f9b12320f142075d49d447fb107af99272567d58) ) |
| 882 | | ROM_LOAD( "snk880.26a", 0x1e0000, 0x20000, CRC(9bc261c5) SHA1(f07fef465191d48ccc149d1a62e6382d3fc0ef9f) ) |
| 665 | ROM_LOAD16_BYTE( "snk880.11a", 0x000000, 0x20000, CRC(e70fd906) SHA1(b9e734c074ee1c8ae73e6041d739ab30d2df7d62) ) |
| 666 | ROM_LOAD16_BYTE( "snk880.15a", 0x000001, 0x20000, CRC(7a90e957) SHA1(9650d7cdbcbbbcdd7f75a1c3c08a195aa456e169) ) |
| 667 | ROM_LOAD16_BYTE( "snk880.12a", 0x040000, 0x20000, CRC(628b1aed) SHA1(1065ef835da03f7d9776e81c225c3ecdd2affae2) ) |
| 668 | ROM_LOAD16_BYTE( "snk880.16a", 0x040001, 0x20000, CRC(e40a6c13) SHA1(7ad9dfc65f8c8b316933f0fdd3bc7a243d6eff65) ) |
| 669 | ROM_LOAD16_BYTE( "snk880.13a", 0x080000, 0x20000, CRC(19dc8868) SHA1(82aaf93fc8f4b3bf947d373d0f41cc0044207c34) ) /* Also can be labeled as DG13 */ |
| 670 | ROM_LOAD16_BYTE( "snk880.17a", 0x080001, 0x20000, CRC(c7931cc2) SHA1(908313d9b7fa4395b5fb79925d068e4f5d354b21) ) |
| 671 | ROM_LOAD16_BYTE( "snk880.14a", 0x0c0000, 0x20000, CRC(47cd498b) SHA1(7fbc007f2d817c26af02fef233f5e0681a17052a) ) |
| 672 | ROM_LOAD16_BYTE( "snk880.18a", 0x0c0001, 0x20000, CRC(eed72232) SHA1(ad614e752cf1d3eac9a04cbc90435f988e90ace7) ) |
| 673 | ROM_LOAD16_BYTE( "snk880.19a", 0x100000, 0x20000, CRC(1775b8dd) SHA1(c01154749379be6e18baa99f4d94d97942f3dd85) ) |
| 674 | ROM_LOAD16_BYTE( "snk880.23a", 0x100001, 0x20000, CRC(adb6ad68) SHA1(ed4323d2dfa3efaa496b17f4719f9566d56725e5) ) |
| 675 | ROM_LOAD16_BYTE( "snk880.20a", 0x140000, 0x20000, CRC(f8e752ec) SHA1(1e1e178303f9af84cbb15249c49a870193ef805f) ) |
| 676 | ROM_LOAD16_BYTE( "snk880.24a", 0x140001, 0x20000, CRC(dd41865a) SHA1(c86f14342beca896784b88920d9e0879af4179ab) ) |
| 677 | ROM_LOAD16_BYTE( "snk880.21a", 0x180000, 0x20000, CRC(27e9fffe) SHA1(e8058db40832b986c5addd22dd69b0308d10ec71) ) |
| 678 | ROM_LOAD16_BYTE( "snk880.25a", 0x180001, 0x20000, CRC(055759ad) SHA1(f9b12320f142075d49d447fb107af99272567d58) ) |
| 679 | ROM_LOAD16_BYTE( "snk880.22a", 0x1c0000, 0x20000, CRC(aa9c00d8) SHA1(1017ed1cc036c6084b71204a998fd05557a6e59f) ) |
| 680 | ROM_LOAD16_BYTE( "snk880.26a", 0x1c0001, 0x20000, CRC(9bc261c5) SHA1(f07fef465191d48ccc149d1a62e6382d3fc0ef9f) ) |
| 883 | 681 | |
| 884 | 682 | ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 885 | 683 | ROM_LOAD( "dg7.d20", 0x000000, 0x10000, CRC(aba9a9d3) SHA1(5098cd3a064b8ede24797de8879a277d79e79d75) ) |
| r2956 | r2957 | |
| 901 | 699 | ROM_LOAD( "dg10.m25", 0x008000, 0x08000, CRC(9e470d53) SHA1(f7dc6ac39ade573480e87170a2781f0f72930580) ) |
| 902 | 700 | |
| 903 | 701 | ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 904 | | ROM_LOAD( "snk880.11a", 0x000000, 0x20000, CRC(e70fd906) SHA1(b9e734c074ee1c8ae73e6041d739ab30d2df7d62) ) |
| 905 | | ROM_LOAD( "snk880.12a", 0x020000, 0x20000, CRC(628b1aed) SHA1(1065ef835da03f7d9776e81c225c3ecdd2affae2) ) |
| 906 | | ROM_LOAD( "snk880.13a", 0x040000, 0x20000, CRC(19dc8868) SHA1(82aaf93fc8f4b3bf947d373d0f41cc0044207c34) ) /* Also can be labeled as DG13 */ |
| 907 | | ROM_LOAD( "snk880.14a", 0x060000, 0x20000, CRC(47cd498b) SHA1(7fbc007f2d817c26af02fef233f5e0681a17052a) ) |
| 908 | | ROM_LOAD( "snk880.15a", 0x080000, 0x20000, CRC(7a90e957) SHA1(9650d7cdbcbbbcdd7f75a1c3c08a195aa456e169) ) |
| 909 | | ROM_LOAD( "snk880.16a", 0x0a0000, 0x20000, CRC(e40a6c13) SHA1(7ad9dfc65f8c8b316933f0fdd3bc7a243d6eff65) ) |
| 910 | | ROM_LOAD( "snk880.17a", 0x0c0000, 0x20000, CRC(c7931cc2) SHA1(908313d9b7fa4395b5fb79925d068e4f5d354b21) ) |
| 911 | | ROM_LOAD( "snk880.18a", 0x0e0000, 0x20000, CRC(eed72232) SHA1(ad614e752cf1d3eac9a04cbc90435f988e90ace7) ) |
| 912 | | ROM_LOAD( "snk880.19a", 0x100000, 0x20000, CRC(1775b8dd) SHA1(c01154749379be6e18baa99f4d94d97942f3dd85) ) |
| 913 | | ROM_LOAD( "snk880.20a", 0x120000, 0x20000, CRC(f8e752ec) SHA1(1e1e178303f9af84cbb15249c49a870193ef805f) ) |
| 914 | | ROM_LOAD( "snk880.21a", 0x140000, 0x20000, CRC(27e9fffe) SHA1(e8058db40832b986c5addd22dd69b0308d10ec71) ) |
| 915 | | ROM_LOAD( "snk880.22a", 0x160000, 0x20000, CRC(aa9c00d8) SHA1(1017ed1cc036c6084b71204a998fd05557a6e59f) ) |
| 916 | | ROM_LOAD( "snk880.23a", 0x180000, 0x20000, CRC(adb6ad68) SHA1(ed4323d2dfa3efaa496b17f4719f9566d56725e5) ) |
| 917 | | ROM_LOAD( "snk880.24a", 0x1a0000, 0x20000, CRC(dd41865a) SHA1(c86f14342beca896784b88920d9e0879af4179ab) ) |
| 918 | | ROM_LOAD( "snk880.25a", 0x1c0000, 0x20000, CRC(055759ad) SHA1(f9b12320f142075d49d447fb107af99272567d58) ) |
| 919 | | ROM_LOAD( "snk880.26a", 0x1e0000, 0x20000, CRC(9bc261c5) SHA1(f07fef465191d48ccc149d1a62e6382d3fc0ef9f) ) |
| 702 | ROM_LOAD16_BYTE( "snk880.11a", 0x000000, 0x20000, CRC(e70fd906) SHA1(b9e734c074ee1c8ae73e6041d739ab30d2df7d62) ) |
| 703 | ROM_LOAD16_BYTE( "snk880.15a", 0x000001, 0x20000, CRC(7a90e957) SHA1(9650d7cdbcbbbcdd7f75a1c3c08a195aa456e169) ) |
| 704 | ROM_LOAD16_BYTE( "snk880.12a", 0x040000, 0x20000, CRC(628b1aed) SHA1(1065ef835da03f7d9776e81c225c3ecdd2affae2) ) |
| 705 | ROM_LOAD16_BYTE( "snk880.16a", 0x040001, 0x20000, CRC(e40a6c13) SHA1(7ad9dfc65f8c8b316933f0fdd3bc7a243d6eff65) ) |
| 706 | ROM_LOAD16_BYTE( "snk880.13a", 0x080000, 0x20000, CRC(19dc8868) SHA1(82aaf93fc8f4b3bf947d373d0f41cc0044207c34) ) /* Also can be labeled as DG13 */ |
| 707 | ROM_LOAD16_BYTE( "snk880.17a", 0x080001, 0x20000, CRC(c7931cc2) SHA1(908313d9b7fa4395b5fb79925d068e4f5d354b21) ) |
| 708 | ROM_LOAD16_BYTE( "snk880.14a", 0x0c0000, 0x20000, CRC(47cd498b) SHA1(7fbc007f2d817c26af02fef233f5e0681a17052a) ) |
| 709 | ROM_LOAD16_BYTE( "snk880.18a", 0x0c0001, 0x20000, CRC(eed72232) SHA1(ad614e752cf1d3eac9a04cbc90435f988e90ace7) ) |
| 710 | ROM_LOAD16_BYTE( "snk880.19a", 0x100000, 0x20000, CRC(1775b8dd) SHA1(c01154749379be6e18baa99f4d94d97942f3dd85) ) |
| 711 | ROM_LOAD16_BYTE( "snk880.23a", 0x100001, 0x20000, CRC(adb6ad68) SHA1(ed4323d2dfa3efaa496b17f4719f9566d56725e5) ) |
| 712 | ROM_LOAD16_BYTE( "snk880.20a", 0x140000, 0x20000, CRC(f8e752ec) SHA1(1e1e178303f9af84cbb15249c49a870193ef805f) ) |
| 713 | ROM_LOAD16_BYTE( "snk880.24a", 0x140001, 0x20000, CRC(dd41865a) SHA1(c86f14342beca896784b88920d9e0879af4179ab) ) |
| 714 | ROM_LOAD16_BYTE( "snk880.21a", 0x180000, 0x20000, CRC(27e9fffe) SHA1(e8058db40832b986c5addd22dd69b0308d10ec71) ) |
| 715 | ROM_LOAD16_BYTE( "snk880.25a", 0x180001, 0x20000, CRC(055759ad) SHA1(f9b12320f142075d49d447fb107af99272567d58) ) |
| 716 | ROM_LOAD16_BYTE( "snk880.22a", 0x1c0000, 0x20000, CRC(aa9c00d8) SHA1(1017ed1cc036c6084b71204a998fd05557a6e59f) ) |
| 717 | ROM_LOAD16_BYTE( "snk880.26a", 0x1c0001, 0x20000, CRC(9bc261c5) SHA1(f07fef465191d48ccc149d1a62e6382d3fc0ef9f) ) |
| 920 | 718 | |
| 921 | 719 | ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 922 | 720 | ROM_LOAD( "dg7.d20", 0x000000, 0x10000, CRC(aba9a9d3) SHA1(5098cd3a064b8ede24797de8879a277d79e79d75) ) |
| r2956 | r2957 | |
| 925 | 723 | ROM_LOAD( "pal20l10.a6", 0x0000, 0x00cc, CRC(c3d9e729) SHA1(f05f03eecf12b4d0793124ecd3195307be04046b) ) |
| 926 | 724 | ROM_END |
| 927 | 725 | |
| 928 | | ROM_START( searchar ) |
| 929 | | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 930 | | ROM_LOAD16_BYTE( "bhw.2", 0x000000, 0x20000, CRC(e1430138) SHA1(eddc192524a13b2c09bd2bddcd5f8e8b771ceb21) ) |
| 931 | | ROM_LOAD16_BYTE( "bhw.3", 0x000001, 0x20000, CRC(ee1f9374) SHA1(fd41c74fd69d65713d8e1a9b8078328381119379) ) |
| 932 | | |
| 933 | | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 934 | | ROM_LOAD( "bh.5", 0x000000, 0x10000, CRC(53e2fa76) SHA1(cf25b1def82545a1fd013822ab3cf02483074623) ) |
| 935 | | |
| 936 | | ROM_REGION( 0x010000, REGION_GFX1, ROMREGION_DISPOSE ) /* characters */ |
| 937 | | ROM_LOAD( "bh.7", 0x000000, 0x08000, CRC(b0f1b049) SHA1(ec276984d91b5759a5e2b6815d1db2abc37b99f8) ) |
| 938 | | ROM_LOAD( "bh.8", 0x008000, 0x08000, CRC(174ddba7) SHA1(7b19087cd2ccc409878aefe7fa08bb2e9953d352) ) |
| 939 | | |
| 940 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 941 | | ROM_LOAD( "bh.c1", 0x000000, 0x80000, CRC(1fb8f0ae) SHA1(d63c7376aa5f01bc009176b23324e720bada4286) ) |
| 942 | | ROM_LOAD( "bh.c3", 0x080000, 0x80000, CRC(fd8bc407) SHA1(88d750293808bf6ea23864b22070314b14fbee3c) ) |
| 943 | | ROM_LOAD( "bh.c5", 0x100000, 0x80000, CRC(1d30acc3) SHA1(e5ca39853779475b83fe37304e7bed2c293bd587) ) |
| 944 | | ROM_LOAD( "bh.c2", 0x180000, 0x80000, CRC(7c803767) SHA1(992516fbb28d00feabbed5769fa3a5748199a7d8) ) |
| 945 | | ROM_LOAD( "bh.c4", 0x200000, 0x80000, CRC(eede7c43) SHA1(7645acf0beb4fff9ec92205dcf34124360cd52f6) ) |
| 946 | | ROM_LOAD( "bh.c6", 0x280000, 0x80000, CRC(9f785cd9) SHA1(e5c7797ae7a3139e1814b068c5ecfe5c6bf30d0f) ) |
| 947 | | |
| 948 | | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 949 | | ROM_LOAD( "bh.v1", 0x000000, 0x20000, CRC(07a6114b) SHA1(224df4616b77a56f33974d3b1793473d48ad52ca) ) |
| 950 | | |
| 951 | | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) /* Extra code bank */ |
| 952 | | ROM_LOAD16_BYTE( "bhw.1", 0x000000, 0x20000, CRC(62b60066) SHA1(f7e7985c8f5f8191c580e777e1b7ed29d944d23f) ) |
| 953 | | ROM_LOAD16_BYTE( "bhw.4", 0x000001, 0x20000, CRC(16d8525c) SHA1(0098b0a7fcb23de2661bbec9a05254aa46579bb2) ) |
| 954 | | ROM_END |
| 955 | | |
| 956 | | ROM_START( sercharu ) |
| 957 | | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 958 | | ROM_LOAD16_BYTE( "bh.2", 0x000000, 0x20000, CRC(c852e2e2) SHA1(c4b1b366f452122549046a3dec9b6b375bc273af) ) |
| 959 | | ROM_LOAD16_BYTE( "bh.3", 0x000001, 0x20000, CRC(bc04a4a1) SHA1(aa91583b987248a3e99813ab5e8ee03c02dac9b9) ) |
| 960 | | |
| 961 | | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 962 | | ROM_LOAD( "bh.5", 0x000000, 0x10000, CRC(53e2fa76) SHA1(cf25b1def82545a1fd013822ab3cf02483074623) ) |
| 963 | | |
| 964 | | ROM_REGION( 0x010000, REGION_GFX1, ROMREGION_DISPOSE ) /* characters */ |
| 965 | | ROM_LOAD( "bh.7", 0x000000, 0x08000, CRC(b0f1b049) SHA1(ec276984d91b5759a5e2b6815d1db2abc37b99f8) ) |
| 966 | | ROM_LOAD( "bh.8", 0x008000, 0x08000, CRC(174ddba7) SHA1(7b19087cd2ccc409878aefe7fa08bb2e9953d352) ) |
| 967 | | |
| 968 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 969 | | ROM_LOAD( "bh.c1", 0x000000, 0x80000, CRC(1fb8f0ae) SHA1(d63c7376aa5f01bc009176b23324e720bada4286) ) |
| 970 | | ROM_LOAD( "bh.c3", 0x080000, 0x80000, CRC(fd8bc407) SHA1(88d750293808bf6ea23864b22070314b14fbee3c) ) |
| 971 | | ROM_LOAD( "bh.c5", 0x100000, 0x80000, CRC(1d30acc3) SHA1(e5ca39853779475b83fe37304e7bed2c293bd587) ) |
| 972 | | ROM_LOAD( "bh.c2", 0x180000, 0x80000, CRC(7c803767) SHA1(992516fbb28d00feabbed5769fa3a5748199a7d8) ) |
| 973 | | ROM_LOAD( "bh.c4", 0x200000, 0x80000, CRC(eede7c43) SHA1(7645acf0beb4fff9ec92205dcf34124360cd52f6) ) |
| 974 | | ROM_LOAD( "bh.c6", 0x280000, 0x80000, CRC(9f785cd9) SHA1(e5c7797ae7a3139e1814b068c5ecfe5c6bf30d0f) ) |
| 975 | | |
| 976 | | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 977 | | ROM_LOAD( "bh.v1", 0x000000, 0x20000, CRC(07a6114b) SHA1(224df4616b77a56f33974d3b1793473d48ad52ca) ) |
| 978 | | |
| 979 | | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) /* Extra code bank */ |
| 980 | | ROM_LOAD16_BYTE( "bh.1", 0x000000, 0x20000, CRC(ba9ca70b) SHA1(c46727473673554cbe4bbbc0288d66357f99a80e) ) |
| 981 | | ROM_LOAD16_BYTE( "bh.4", 0x000001, 0x20000, CRC(eabc5ddf) SHA1(08a2a8fcdf6a08a2694e00f4232a5bfbec98fd27) ) |
| 982 | | ROM_END |
| 983 | | |
| 984 | | ROM_START( sercharj ) |
| 985 | | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 986 | | ROM_LOAD16_BYTE( "bh2ver3j.9c", 0x000000, 0x20000, CRC(7ef7b172) SHA1(85669ba72f59e4ff3a483bf611bf41c73f4e1930) ) |
| 987 | | ROM_LOAD16_BYTE( "bh3ver3j.10c", 0x000001, 0x20000, CRC(3fdea793) SHA1(49bafb53466afb7e4486a4894e4fd6fa08ea2eb2) ) |
| 988 | | |
| 989 | | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 990 | | ROM_LOAD( "bh.5", 0x000000, 0x10000, CRC(53e2fa76) SHA1(cf25b1def82545a1fd013822ab3cf02483074623) ) |
| 991 | | |
| 992 | | ROM_REGION( 0x010000, REGION_GFX1, ROMREGION_DISPOSE ) /* characters */ |
| 993 | | ROM_LOAD( "bh.7", 0x000000, 0x08000, CRC(b0f1b049) SHA1(ec276984d91b5759a5e2b6815d1db2abc37b99f8) ) |
| 994 | | ROM_LOAD( "bh.8", 0x008000, 0x08000, CRC(174ddba7) SHA1(7b19087cd2ccc409878aefe7fa08bb2e9953d352) ) |
| 995 | | |
| 996 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 997 | | ROM_LOAD( "bh.c1", 0x000000, 0x80000, CRC(1fb8f0ae) SHA1(d63c7376aa5f01bc009176b23324e720bada4286) ) |
| 998 | | ROM_LOAD( "bh.c3", 0x080000, 0x80000, CRC(fd8bc407) SHA1(88d750293808bf6ea23864b22070314b14fbee3c) ) |
| 999 | | ROM_LOAD( "bh.c5", 0x100000, 0x80000, CRC(1d30acc3) SHA1(e5ca39853779475b83fe37304e7bed2c293bd587) ) |
| 1000 | | ROM_LOAD( "bh.c2", 0x180000, 0x80000, CRC(7c803767) SHA1(992516fbb28d00feabbed5769fa3a5748199a7d8) ) |
| 1001 | | ROM_LOAD( "bh.c4", 0x200000, 0x80000, CRC(eede7c43) SHA1(7645acf0beb4fff9ec92205dcf34124360cd52f6) ) |
| 1002 | | ROM_LOAD( "bh.c6", 0x280000, 0x80000, CRC(9f785cd9) SHA1(e5c7797ae7a3139e1814b068c5ecfe5c6bf30d0f) ) |
| 1003 | | |
| 1004 | | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1005 | | ROM_LOAD( "bh.v1", 0x000000, 0x20000, CRC(07a6114b) SHA1(224df4616b77a56f33974d3b1793473d48ad52ca) ) |
| 1006 | | |
| 1007 | | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) /* Extra code bank */ |
| 1008 | | ROM_LOAD16_BYTE( "bhw.1", 0x000000, 0x20000, CRC(62b60066) SHA1(f7e7985c8f5f8191c580e777e1b7ed29d944d23f) ) |
| 1009 | | ROM_LOAD16_BYTE( "bhw.4", 0x000001, 0x20000, CRC(16d8525c) SHA1(0098b0a7fcb23de2661bbec9a05254aa46579bb2) ) |
| 1010 | | ROM_END |
| 1011 | | |
| 1012 | 726 | ROM_START( streetsm ) |
| 1013 | 727 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 1014 | 728 | ROM_LOAD16_BYTE( "s2-1ver2.14h", 0x00000, 0x20000, CRC(655f4773) SHA1(5374a6cf0b895c5ff839b0f52402df4cc53241cf) ) |
| r2956 | r2957 | |
| 1021 | 735 | ROM_LOAD( "s2-9.25l", 0x000000, 0x08000, CRC(09b6ac67) SHA1(0b1ef51d9cd755eacc25b33360811cc86c32c0b7) ) |
| 1022 | 736 | ROM_LOAD( "s2-10.25m", 0x008000, 0x08000, CRC(89e4ee6f) SHA1(21797286836ad71d2497e3e6d4df1fbe545562ab) ) |
| 1023 | 737 | |
| 1024 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 738 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 1025 | 739 | ROM_LOAD( "stsmart.900", 0x000000, 0x80000, CRC(a8279a7e) SHA1(244bdacb29b00f71da93ed8ddddbcffcce110be8) ) |
| 1026 | 740 | ROM_LOAD( "stsmart.902", 0x080000, 0x80000, CRC(2f021aa1) SHA1(699d0b5ac79e34e4fc4cef70eb448f21f1c3e9e2) ) |
| 1027 | 741 | ROM_LOAD( "stsmart.904", 0x100000, 0x80000, CRC(167346f7) SHA1(fb4ea412622245db49ec15449ee4fa0d90922f06) ) |
| 1028 | | ROM_LOAD( "stsmart.901", 0x180000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 1029 | | ROM_LOAD( "stsmart.903", 0x200000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 1030 | | ROM_LOAD( "stsmart.905", 0x280000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 742 | // 180000-1fffff empty |
| 743 | ROM_LOAD( "stsmart.901", 0x200000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 744 | ROM_LOAD( "stsmart.903", 0x280000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 745 | ROM_LOAD( "stsmart.905", 0x300000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 746 | // 380000-3fffff empty |
| 1031 | 747 | |
| 1032 | 748 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1033 | 749 | ROM_LOAD( "s2-6.18d", 0x000000, 0x20000, CRC(47db1605) SHA1(ae00e633eb98567f04ff97e3d63e04e049d955ec) ) |
| r2956 | r2957 | |
| 1048 | 764 | ROM_LOAD( "s2-7.15l", 0x000000, 0x08000, CRC(22bedfe5) SHA1(64efb2281c32afe5a06f35cce939e6a53226c6ed) ) |
| 1049 | 765 | ROM_LOAD( "s2-8.15m", 0x008000, 0x08000, CRC(6a1c70ab) SHA1(019538ddcb713d0810b26b6aa65f6e4596931621) ) |
| 1050 | 766 | |
| 1051 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 767 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 1052 | 768 | ROM_LOAD( "stsmart.900", 0x000000, 0x80000, CRC(a8279a7e) SHA1(244bdacb29b00f71da93ed8ddddbcffcce110be8) ) |
| 1053 | 769 | ROM_LOAD( "stsmart.902", 0x080000, 0x80000, CRC(2f021aa1) SHA1(699d0b5ac79e34e4fc4cef70eb448f21f1c3e9e2) ) |
| 1054 | 770 | ROM_LOAD( "stsmart.904", 0x100000, 0x80000, CRC(167346f7) SHA1(fb4ea412622245db49ec15449ee4fa0d90922f06) ) |
| 1055 | | ROM_LOAD( "stsmart.901", 0x180000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 1056 | | ROM_LOAD( "stsmart.903", 0x200000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 1057 | | ROM_LOAD( "stsmart.905", 0x280000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 771 | // 180000-1fffff empty |
| 772 | ROM_LOAD( "stsmart.901", 0x200000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 773 | ROM_LOAD( "stsmart.903", 0x280000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 774 | ROM_LOAD( "stsmart.905", 0x300000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 775 | // 380000-3fffff empty |
| 1058 | 776 | |
| 1059 | 777 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1060 | 778 | ROM_LOAD( "s2-6.18d", 0x000000, 0x20000, CRC(47db1605) SHA1(ae00e633eb98567f04ff97e3d63e04e049d955ec) ) |
| r2956 | r2957 | |
| 1072 | 790 | ROM_LOAD( "s2-7.15l", 0x000000, 0x08000, CRC(22bedfe5) SHA1(64efb2281c32afe5a06f35cce939e6a53226c6ed) ) |
| 1073 | 791 | ROM_LOAD( "s2-8.15m", 0x008000, 0x08000, CRC(6a1c70ab) SHA1(019538ddcb713d0810b26b6aa65f6e4596931621) ) |
| 1074 | 792 | |
| 1075 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 793 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 1076 | 794 | ROM_LOAD( "stsmart.900", 0x000000, 0x80000, CRC(a8279a7e) SHA1(244bdacb29b00f71da93ed8ddddbcffcce110be8) ) |
| 1077 | 795 | ROM_LOAD( "stsmart.902", 0x080000, 0x80000, CRC(2f021aa1) SHA1(699d0b5ac79e34e4fc4cef70eb448f21f1c3e9e2) ) |
| 1078 | 796 | ROM_LOAD( "stsmart.904", 0x100000, 0x80000, CRC(167346f7) SHA1(fb4ea412622245db49ec15449ee4fa0d90922f06) ) |
| 1079 | | ROM_LOAD( "stsmart.901", 0x180000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 1080 | | ROM_LOAD( "stsmart.903", 0x200000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 1081 | | ROM_LOAD( "stsmart.905", 0x280000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 797 | // 180000-1fffff empty |
| 798 | ROM_LOAD( "stsmart.901", 0x200000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 799 | ROM_LOAD( "stsmart.903", 0x280000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 800 | ROM_LOAD( "stsmart.905", 0x300000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 801 | // 380000-3fffff empty |
| 1082 | 802 | |
| 1083 | 803 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1084 | 804 | ROM_LOAD( "s2-6.18d", 0x000000, 0x20000, CRC(47db1605) SHA1(ae00e633eb98567f04ff97e3d63e04e049d955ec) ) |
| r2956 | r2957 | |
| 1096 | 816 | ROM_LOAD( "s2-7.15l", 0x000000, 0x08000, CRC(22bedfe5) SHA1(64efb2281c32afe5a06f35cce939e6a53226c6ed) ) |
| 1097 | 817 | ROM_LOAD( "s2-8.15m", 0x008000, 0x08000, CRC(6a1c70ab) SHA1(019538ddcb713d0810b26b6aa65f6e4596931621) ) |
| 1098 | 818 | |
| 1099 | | ROM_REGION( 0x300000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 819 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 1100 | 820 | ROM_LOAD( "stsmart.900", 0x000000, 0x80000, CRC(a8279a7e) SHA1(244bdacb29b00f71da93ed8ddddbcffcce110be8) ) |
| 1101 | 821 | ROM_LOAD( "stsmart.902", 0x080000, 0x80000, CRC(2f021aa1) SHA1(699d0b5ac79e34e4fc4cef70eb448f21f1c3e9e2) ) |
| 1102 | 822 | ROM_LOAD( "stsmart.904", 0x100000, 0x80000, CRC(167346f7) SHA1(fb4ea412622245db49ec15449ee4fa0d90922f06) ) |
| 1103 | | ROM_LOAD( "stsmart.901", 0x180000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 1104 | | ROM_LOAD( "stsmart.903", 0x200000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 1105 | | ROM_LOAD( "stsmart.905", 0x280000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 823 | // 180000-1fffff empty |
| 824 | ROM_LOAD( "stsmart.901", 0x200000, 0x80000, CRC(c305af12) SHA1(18b5d448fe9608efcd2e5bb8faa24808d1489ec8) ) |
| 825 | ROM_LOAD( "stsmart.903", 0x280000, 0x80000, CRC(73c16d35) SHA1(40cf7a58926c649f89b08917afb35b08918d1a0f) ) |
| 826 | ROM_LOAD( "stsmart.905", 0x300000, 0x80000, CRC(a5beb4e2) SHA1(c26b7eee2ca32bd73fb7a09c6ef52c2ae1c7fc1c) ) |
| 827 | // 380000-3fffff empty |
| 1106 | 828 | |
| 1107 | 829 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1108 | 830 | ROM_LOAD( "s2-6.18d", 0x000000, 0x20000, CRC(47db1605) SHA1(ae00e633eb98567f04ff97e3d63e04e049d955ec) ) |
| r2956 | r2957 | |
| 1120 | 842 | ROM_LOAD( "ik3-7.bin", 0x000000, 0x08000, CRC(0b4804df) SHA1(66d16d245bfc404366164823faaea0bfec83e487) ) |
| 1121 | 843 | ROM_LOAD( "ik3-8.bin", 0x008000, 0x08000, CRC(10ab4e50) SHA1(dee8416eb720848cf6471e568dadc1cfc6c2e67f) ) |
| 1122 | 844 | |
| 1123 | | ROM_REGION( 0x280000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 1124 | | ROM_LOAD( "ik3-13.bin", 0x000000, 0x20000, CRC(9a56bd32) SHA1(9301b48f970b71a909fb44514b2e93c3f1516b38) ) |
| 1125 | | ROM_LOAD( "ik3-12.bin", 0x020000, 0x20000, CRC(0ce6a10a) SHA1(13a231aa0002b2c5a0d9404ba05a879e212d638e) ) |
| 1126 | | ROM_LOAD( "ik3-11.bin", 0x040000, 0x20000, CRC(e4e2be43) SHA1(959d2799708ddae909b017c0696694c46a52697e) ) |
| 1127 | | ROM_LOAD( "ik3-10.bin", 0x060000, 0x20000, CRC(ac222372) SHA1(8a17e37699d691b962a6d0256a18550cc73ddfef) ) |
| 1128 | | ROM_LOAD( "ik3-9.bin", 0x080000, 0x20000, CRC(c33971c2) SHA1(91f3eb301803f5a7027da1ff7dd2a28bc97e5125) ) |
| 1129 | | ROM_LOAD( "ik3-14.bin", 0x0a0000, 0x20000, CRC(453bea77) SHA1(f8f8d0c048fcf32ad99e1de622d9ab635bb86eae) ) |
| 1130 | | ROM_LOAD( "ik3-15.bin", 0x0c0000, 0x20000, CRC(781a81fc) SHA1(e08a6cf9c632d1002176afe618605bc06168e8aa) ) |
| 1131 | | ROM_LOAD( "ik3-16.bin", 0x0e0000, 0x20000, CRC(80ba400b) SHA1(2cc3e53c45f239516a60c461ad9cfa5955164262) ) |
| 1132 | | ROM_LOAD( "ik3-17.bin", 0x100000, 0x20000, CRC(0cc3ce4a) SHA1(7b34435d0bbb089055a183b821ab255170db6bec) ) |
| 1133 | | ROM_LOAD( "ik3-18.bin", 0x120000, 0x20000, CRC(ba106245) SHA1(ac609ec3046c21fe6058f91dd4528c5c6448dc15) ) |
| 1134 | | ROM_LOAD( "ik3-23.bin", 0x140000, 0x20000, CRC(d0fd5c77) SHA1(c171c64ad252f0ba5b0bbdf37808102fca37b488) ) |
| 1135 | | ROM_LOAD( "ik3-22.bin", 0x160000, 0x20000, CRC(4878d883) SHA1(8cdb541bad00e707fb65399d637b7cc9288ada77) ) |
| 1136 | | ROM_LOAD( "ik3-21.bin", 0x180000, 0x20000, CRC(50d0fbf0) SHA1(9ff5fbea8d35d0f9a38ddd7eb093edcd91d9f874) ) |
| 1137 | | ROM_LOAD( "ik3-20.bin", 0x1a0000, 0x20000, CRC(9a851efc) SHA1(bc7be338ee4da7fbfe6fe44a9c7889817416bc44) ) |
| 1138 | | ROM_LOAD( "ik3-19.bin", 0x1c0000, 0x20000, CRC(4ebdba89) SHA1(f3ecfef4c9d2aba58dc3e6aa3cf5813d68686909) ) |
| 1139 | | ROM_LOAD( "ik3-24.bin", 0x1e0000, 0x20000, CRC(e9b26d68) SHA1(067d582d33157ed4b7980bd87f2f260ab74c347b) ) |
| 1140 | | ROM_LOAD( "ik3-25.bin", 0x200000, 0x20000, CRC(073b03f1) SHA1(b8053139799fa06c7324cee928154c89d4425ab1) ) |
| 1141 | | ROM_LOAD( "ik3-26.bin", 0x220000, 0x20000, CRC(9c613561) SHA1(fc7c9a642b18faa94e6a2ba53f35a4d756a25da3) ) |
| 1142 | | ROM_LOAD( "ik3-27.bin", 0x240000, 0x20000, CRC(16dd227e) SHA1(db3b1718dea65bc9a1a736aa62aa2be389313baf) ) |
| 1143 | | ROM_LOAD( "ik3-28.bin", 0x260000, 0x20000, CRC(711715ae) SHA1(90978c86884ca3d23c138d95b654e2fb3afc6f9a) ) |
| 845 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 846 | ROM_LOAD16_BYTE( "ik3-23.bin", 0x000000, 0x20000, CRC(d0fd5c77) SHA1(c171c64ad252f0ba5b0bbdf37808102fca37b488) ) |
| 847 | ROM_LOAD16_BYTE( "ik3-13.bin", 0x000001, 0x20000, CRC(9a56bd32) SHA1(9301b48f970b71a909fb44514b2e93c3f1516b38) ) |
| 848 | ROM_LOAD16_BYTE( "ik3-22.bin", 0x040000, 0x20000, CRC(4878d883) SHA1(8cdb541bad00e707fb65399d637b7cc9288ada77) ) |
| 849 | ROM_LOAD16_BYTE( "ik3-12.bin", 0x040001, 0x20000, CRC(0ce6a10a) SHA1(13a231aa0002b2c5a0d9404ba05a879e212d638e) ) |
| 850 | ROM_LOAD16_BYTE( "ik3-21.bin", 0x080000, 0x20000, CRC(50d0fbf0) SHA1(9ff5fbea8d35d0f9a38ddd7eb093edcd91d9f874) ) |
| 851 | ROM_LOAD16_BYTE( "ik3-11.bin", 0x080001, 0x20000, CRC(e4e2be43) SHA1(959d2799708ddae909b017c0696694c46a52697e) ) |
| 852 | ROM_LOAD16_BYTE( "ik3-20.bin", 0x0c0000, 0x20000, CRC(9a851efc) SHA1(bc7be338ee4da7fbfe6fe44a9c7889817416bc44) ) |
| 853 | ROM_LOAD16_BYTE( "ik3-10.bin", 0x0c0001, 0x20000, CRC(ac222372) SHA1(8a17e37699d691b962a6d0256a18550cc73ddfef) ) |
| 854 | ROM_LOAD16_BYTE( "ik3-19.bin", 0x100000, 0x20000, CRC(4ebdba89) SHA1(f3ecfef4c9d2aba58dc3e6aa3cf5813d68686909) ) |
| 855 | ROM_LOAD16_BYTE( "ik3-9.bin", 0x100001, 0x20000, CRC(c33971c2) SHA1(91f3eb301803f5a7027da1ff7dd2a28bc97e5125) ) |
| 856 | // 140000-1fffff empty |
| 857 | ROM_LOAD16_BYTE( "ik3-14.bin", 0x200000, 0x20000, CRC(453bea77) SHA1(f8f8d0c048fcf32ad99e1de622d9ab635bb86eae) ) |
| 858 | ROM_LOAD16_BYTE( "ik3-24.bin", 0x200001, 0x20000, CRC(e9b26d68) SHA1(067d582d33157ed4b7980bd87f2f260ab74c347b) ) |
| 859 | ROM_LOAD16_BYTE( "ik3-15.bin", 0x240000, 0x20000, CRC(781a81fc) SHA1(e08a6cf9c632d1002176afe618605bc06168e8aa) ) |
| 860 | ROM_LOAD16_BYTE( "ik3-25.bin", 0x240001, 0x20000, CRC(073b03f1) SHA1(b8053139799fa06c7324cee928154c89d4425ab1) ) |
| 861 | ROM_LOAD16_BYTE( "ik3-16.bin", 0x280000, 0x20000, CRC(80ba400b) SHA1(2cc3e53c45f239516a60c461ad9cfa5955164262) ) |
| 862 | ROM_LOAD16_BYTE( "ik3-26.bin", 0x280001, 0x20000, CRC(9c613561) SHA1(fc7c9a642b18faa94e6a2ba53f35a4d756a25da3) ) |
| 863 | ROM_LOAD16_BYTE( "ik3-17.bin", 0x2c0000, 0x20000, CRC(0cc3ce4a) SHA1(7b34435d0bbb089055a183b821ab255170db6bec) ) |
| 864 | ROM_LOAD16_BYTE( "ik3-27.bin", 0x2c0001, 0x20000, CRC(16dd227e) SHA1(db3b1718dea65bc9a1a736aa62aa2be389313baf) ) |
| 865 | ROM_LOAD16_BYTE( "ik3-18.bin", 0x300000, 0x20000, CRC(ba106245) SHA1(ac609ec3046c21fe6058f91dd4528c5c6448dc15) ) |
| 866 | ROM_LOAD16_BYTE( "ik3-28.bin", 0x300001, 0x20000, CRC(711715ae) SHA1(90978c86884ca3d23c138d95b654e2fb3afc6f9a) ) |
| 867 | // 340000-3fffff empty |
| 1144 | 868 | |
| 1145 | 869 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1146 | 870 | ROM_LOAD( "ik3-6.bin", 0x000000, 0x20000, CRC(59d256a4) SHA1(1e7b33329f761c695bc9a817bbc0c5e13386d073) ) |
| r2956 | r2957 | |
| 1162 | 886 | ROM_LOAD( "ik3-7.bin", 0x000000, 0x08000, CRC(0b4804df) SHA1(66d16d245bfc404366164823faaea0bfec83e487) ) |
| 1163 | 887 | ROM_LOAD( "ik3-8.bin", 0x008000, 0x08000, CRC(10ab4e50) SHA1(dee8416eb720848cf6471e568dadc1cfc6c2e67f) ) |
| 1164 | 888 | |
| 1165 | | ROM_REGION( 0x280000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 1166 | | ROM_LOAD( "ik3-13.bin", 0x000000, 0x20000, CRC(9a56bd32) SHA1(9301b48f970b71a909fb44514b2e93c3f1516b38) ) |
| 1167 | | ROM_LOAD( "ik3-12.bin", 0x020000, 0x20000, CRC(0ce6a10a) SHA1(13a231aa0002b2c5a0d9404ba05a879e212d638e) ) |
| 1168 | | ROM_LOAD( "ik3-11.bin", 0x040000, 0x20000, CRC(e4e2be43) SHA1(959d2799708ddae909b017c0696694c46a52697e) ) |
| 1169 | | ROM_LOAD( "ik3-10.bin", 0x060000, 0x20000, CRC(ac222372) SHA1(8a17e37699d691b962a6d0256a18550cc73ddfef) ) |
| 1170 | | ROM_LOAD( "ik3-9.bin", 0x080000, 0x20000, CRC(c33971c2) SHA1(91f3eb301803f5a7027da1ff7dd2a28bc97e5125) ) |
| 1171 | | ROM_LOAD( "ik3-14.bin", 0x0a0000, 0x20000, CRC(453bea77) SHA1(f8f8d0c048fcf32ad99e1de622d9ab635bb86eae) ) |
| 1172 | | ROM_LOAD( "ik3-15.bin", 0x0c0000, 0x20000, CRC(781a81fc) SHA1(e08a6cf9c632d1002176afe618605bc06168e8aa) ) |
| 1173 | | ROM_LOAD( "ik3-16.bin", 0x0e0000, 0x20000, CRC(80ba400b) SHA1(2cc3e53c45f239516a60c461ad9cfa5955164262) ) |
| 1174 | | ROM_LOAD( "ik3-17.bin", 0x100000, 0x20000, CRC(0cc3ce4a) SHA1(7b34435d0bbb089055a183b821ab255170db6bec) ) |
| 1175 | | ROM_LOAD( "ik3-18.bin", 0x120000, 0x20000, CRC(ba106245) SHA1(ac609ec3046c21fe6058f91dd4528c5c6448dc15) ) |
| 1176 | | ROM_LOAD( "ik3-23.bin", 0x140000, 0x20000, CRC(d0fd5c77) SHA1(c171c64ad252f0ba5b0bbdf37808102fca37b488) ) |
| 1177 | | ROM_LOAD( "ik3-22.bin", 0x160000, 0x20000, CRC(4878d883) SHA1(8cdb541bad00e707fb65399d637b7cc9288ada77) ) |
| 1178 | | ROM_LOAD( "ik3-21.bin", 0x180000, 0x20000, CRC(50d0fbf0) SHA1(9ff5fbea8d35d0f9a38ddd7eb093edcd91d9f874) ) |
| 1179 | | ROM_LOAD( "ik3-20.bin", 0x1a0000, 0x20000, CRC(9a851efc) SHA1(bc7be338ee4da7fbfe6fe44a9c7889817416bc44) ) |
| 1180 | | ROM_LOAD( "ik3-19.bin", 0x1c0000, 0x20000, CRC(4ebdba89) SHA1(f3ecfef4c9d2aba58dc3e6aa3cf5813d68686909) ) |
| 1181 | | ROM_LOAD( "ik3-24.bin", 0x1e0000, 0x20000, CRC(e9b26d68) SHA1(067d582d33157ed4b7980bd87f2f260ab74c347b) ) |
| 1182 | | ROM_LOAD( "ik3-25.bin", 0x200000, 0x20000, CRC(073b03f1) SHA1(b8053139799fa06c7324cee928154c89d4425ab1) ) |
| 1183 | | ROM_LOAD( "ik3-26.bin", 0x220000, 0x20000, CRC(9c613561) SHA1(fc7c9a642b18faa94e6a2ba53f35a4d756a25da3) ) |
| 1184 | | ROM_LOAD( "ik3-27.bin", 0x240000, 0x20000, CRC(16dd227e) SHA1(db3b1718dea65bc9a1a736aa62aa2be389313baf) ) |
| 1185 | | ROM_LOAD( "ik3-28.bin", 0x260000, 0x20000, CRC(711715ae) SHA1(90978c86884ca3d23c138d95b654e2fb3afc6f9a) ) |
| 889 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 890 | ROM_LOAD16_BYTE( "ik3-23.bin", 0x000000, 0x20000, CRC(d0fd5c77) SHA1(c171c64ad252f0ba5b0bbdf37808102fca37b488) ) |
| 891 | ROM_LOAD16_BYTE( "ik3-13.bin", 0x000001, 0x20000, CRC(9a56bd32) SHA1(9301b48f970b71a909fb44514b2e93c3f1516b38) ) |
| 892 | ROM_LOAD16_BYTE( "ik3-22.bin", 0x040000, 0x20000, CRC(4878d883) SHA1(8cdb541bad00e707fb65399d637b7cc9288ada77) ) |
| 893 | ROM_LOAD16_BYTE( "ik3-12.bin", 0x040001, 0x20000, CRC(0ce6a10a) SHA1(13a231aa0002b2c5a0d9404ba05a879e212d638e) ) |
| 894 | ROM_LOAD16_BYTE( "ik3-21.bin", 0x080000, 0x20000, CRC(50d0fbf0) SHA1(9ff5fbea8d35d0f9a38ddd7eb093edcd91d9f874) ) |
| 895 | ROM_LOAD16_BYTE( "ik3-11.bin", 0x080001, 0x20000, CRC(e4e2be43) SHA1(959d2799708ddae909b017c0696694c46a52697e) ) |
| 896 | ROM_LOAD16_BYTE( "ik3-20.bin", 0x0c0000, 0x20000, CRC(9a851efc) SHA1(bc7be338ee4da7fbfe6fe44a9c7889817416bc44) ) |
| 897 | ROM_LOAD16_BYTE( "ik3-10.bin", 0x0c0001, 0x20000, CRC(ac222372) SHA1(8a17e37699d691b962a6d0256a18550cc73ddfef) ) |
| 898 | ROM_LOAD16_BYTE( "ik3-19.bin", 0x100000, 0x20000, CRC(4ebdba89) SHA1(f3ecfef4c9d2aba58dc3e6aa3cf5813d68686909) ) |
| 899 | ROM_LOAD16_BYTE( "ik3-9.bin", 0x100001, 0x20000, CRC(c33971c2) SHA1(91f3eb301803f5a7027da1ff7dd2a28bc97e5125) ) |
| 900 | // 140000-1fffff empty |
| 901 | ROM_LOAD16_BYTE( "ik3-14.bin", 0x200000, 0x20000, CRC(453bea77) SHA1(f8f8d0c048fcf32ad99e1de622d9ab635bb86eae) ) |
| 902 | ROM_LOAD16_BYTE( "ik3-24.bin", 0x200001, 0x20000, CRC(e9b26d68) SHA1(067d582d33157ed4b7980bd87f2f260ab74c347b) ) |
| 903 | ROM_LOAD16_BYTE( "ik3-15.bin", 0x240000, 0x20000, CRC(781a81fc) SHA1(e08a6cf9c632d1002176afe618605bc06168e8aa) ) |
| 904 | ROM_LOAD16_BYTE( "ik3-25.bin", 0x240001, 0x20000, CRC(073b03f1) SHA1(b8053139799fa06c7324cee928154c89d4425ab1) ) |
| 905 | ROM_LOAD16_BYTE( "ik3-16.bin", 0x280000, 0x20000, CRC(80ba400b) SHA1(2cc3e53c45f239516a60c461ad9cfa5955164262) ) |
| 906 | ROM_LOAD16_BYTE( "ik3-26.bin", 0x280001, 0x20000, CRC(9c613561) SHA1(fc7c9a642b18faa94e6a2ba53f35a4d756a25da3) ) |
| 907 | ROM_LOAD16_BYTE( "ik3-17.bin", 0x2c0000, 0x20000, CRC(0cc3ce4a) SHA1(7b34435d0bbb089055a183b821ab255170db6bec) ) |
| 908 | ROM_LOAD16_BYTE( "ik3-27.bin", 0x2c0001, 0x20000, CRC(16dd227e) SHA1(db3b1718dea65bc9a1a736aa62aa2be389313baf) ) |
| 909 | ROM_LOAD16_BYTE( "ik3-18.bin", 0x300000, 0x20000, CRC(ba106245) SHA1(ac609ec3046c21fe6058f91dd4528c5c6448dc15) ) |
| 910 | ROM_LOAD16_BYTE( "ik3-28.bin", 0x300001, 0x20000, CRC(711715ae) SHA1(90978c86884ca3d23c138d95b654e2fb3afc6f9a) ) |
| 911 | // 340000-3fffff empty |
| 1186 | 912 | |
| 1187 | 913 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1188 | 914 | ROM_LOAD( "ik3-6.bin", 0x000000, 0x20000, CRC(59d256a4) SHA1(1e7b33329f761c695bc9a817bbc0c5e13386d073) ) |
| r2956 | r2957 | |
| 1192 | 918 | ROM_LOAD16_BYTE( "ik3-4.c12", 0x000001, 0x10000, CRC(a43af6b5) SHA1(1ad3acadbadd21642932028ecd7c282f7fd02856) ) |
| 1193 | 919 | ROM_END |
| 1194 | 920 | |
| 921 | ROM_START( searchar ) |
| 922 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 923 | ROM_LOAD16_BYTE( "bhw.2", 0x000000, 0x20000, CRC(e1430138) SHA1(eddc192524a13b2c09bd2bddcd5f8e8b771ceb21) ) |
| 924 | ROM_LOAD16_BYTE( "bhw.3", 0x000001, 0x20000, CRC(ee1f9374) SHA1(fd41c74fd69d65713d8e1a9b8078328381119379) ) |
| 925 | |
| 926 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 927 | ROM_LOAD( "bh.5", 0x000000, 0x10000, CRC(53e2fa76) SHA1(cf25b1def82545a1fd013822ab3cf02483074623) ) |
| 928 | |
| 929 | ROM_REGION( 0x010000, REGION_GFX1, ROMREGION_DISPOSE ) /* characters */ |
| 930 | ROM_LOAD( "bh.7", 0x000000, 0x08000, CRC(b0f1b049) SHA1(ec276984d91b5759a5e2b6815d1db2abc37b99f8) ) |
| 931 | ROM_LOAD( "bh.8", 0x008000, 0x08000, CRC(174ddba7) SHA1(7b19087cd2ccc409878aefe7fa08bb2e9953d352) ) |
| 932 | |
| 933 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 934 | ROM_LOAD( "bh.c1", 0x000000, 0x80000, CRC(1fb8f0ae) SHA1(d63c7376aa5f01bc009176b23324e720bada4286) ) |
| 935 | ROM_LOAD( "bh.c3", 0x080000, 0x80000, CRC(fd8bc407) SHA1(88d750293808bf6ea23864b22070314b14fbee3c) ) |
| 936 | ROM_LOAD( "bh.c5", 0x100000, 0x80000, CRC(1d30acc3) SHA1(e5ca39853779475b83fe37304e7bed2c293bd587) ) |
| 937 | // 180000-1fffff empty |
| 938 | ROM_LOAD( "bh.c2", 0x200000, 0x80000, CRC(7c803767) SHA1(992516fbb28d00feabbed5769fa3a5748199a7d8) ) |
| 939 | ROM_LOAD( "bh.c4", 0x280000, 0x80000, CRC(eede7c43) SHA1(7645acf0beb4fff9ec92205dcf34124360cd52f6) ) |
| 940 | ROM_LOAD( "bh.c6", 0x300000, 0x80000, CRC(9f785cd9) SHA1(e5c7797ae7a3139e1814b068c5ecfe5c6bf30d0f) ) |
| 941 | // 380000-3fffff empty |
| 942 | |
| 943 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 944 | ROM_LOAD( "bh.v1", 0x000000, 0x20000, CRC(07a6114b) SHA1(224df4616b77a56f33974d3b1793473d48ad52ca) ) |
| 945 | |
| 946 | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) /* Extra code bank */ |
| 947 | ROM_LOAD16_BYTE( "bhw.1", 0x000000, 0x20000, CRC(62b60066) SHA1(f7e7985c8f5f8191c580e777e1b7ed29d944d23f) ) |
| 948 | ROM_LOAD16_BYTE( "bhw.4", 0x000001, 0x20000, CRC(16d8525c) SHA1(0098b0a7fcb23de2661bbec9a05254aa46579bb2) ) |
| 949 | ROM_END |
| 950 | |
| 951 | ROM_START( sercharu ) |
| 952 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 953 | ROM_LOAD16_BYTE( "bh.2", 0x000000, 0x20000, CRC(c852e2e2) SHA1(c4b1b366f452122549046a3dec9b6b375bc273af) ) |
| 954 | ROM_LOAD16_BYTE( "bh.3", 0x000001, 0x20000, CRC(bc04a4a1) SHA1(aa91583b987248a3e99813ab5e8ee03c02dac9b9) ) |
| 955 | |
| 956 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 957 | ROM_LOAD( "bh.5", 0x000000, 0x10000, CRC(53e2fa76) SHA1(cf25b1def82545a1fd013822ab3cf02483074623) ) |
| 958 | |
| 959 | ROM_REGION( 0x010000, REGION_GFX1, ROMREGION_DISPOSE ) /* characters */ |
| 960 | ROM_LOAD( "bh.7", 0x000000, 0x08000, CRC(b0f1b049) SHA1(ec276984d91b5759a5e2b6815d1db2abc37b99f8) ) |
| 961 | ROM_LOAD( "bh.8", 0x008000, 0x08000, CRC(174ddba7) SHA1(7b19087cd2ccc409878aefe7fa08bb2e9953d352) ) |
| 962 | |
| 963 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 964 | ROM_LOAD( "bh.c1", 0x000000, 0x80000, CRC(1fb8f0ae) SHA1(d63c7376aa5f01bc009176b23324e720bada4286) ) |
| 965 | ROM_LOAD( "bh.c3", 0x080000, 0x80000, CRC(fd8bc407) SHA1(88d750293808bf6ea23864b22070314b14fbee3c) ) |
| 966 | ROM_LOAD( "bh.c5", 0x100000, 0x80000, CRC(1d30acc3) SHA1(e5ca39853779475b83fe37304e7bed2c293bd587) ) |
| 967 | // 180000-1fffff empty |
| 968 | ROM_LOAD( "bh.c2", 0x200000, 0x80000, CRC(7c803767) SHA1(992516fbb28d00feabbed5769fa3a5748199a7d8) ) |
| 969 | ROM_LOAD( "bh.c4", 0x280000, 0x80000, CRC(eede7c43) SHA1(7645acf0beb4fff9ec92205dcf34124360cd52f6) ) |
| 970 | ROM_LOAD( "bh.c6", 0x300000, 0x80000, CRC(9f785cd9) SHA1(e5c7797ae7a3139e1814b068c5ecfe5c6bf30d0f) ) |
| 971 | // 380000-3fffff empty |
| 972 | |
| 973 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 974 | ROM_LOAD( "bh.v1", 0x000000, 0x20000, CRC(07a6114b) SHA1(224df4616b77a56f33974d3b1793473d48ad52ca) ) |
| 975 | |
| 976 | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) /* Extra code bank */ |
| 977 | ROM_LOAD16_BYTE( "bh.1", 0x000000, 0x20000, CRC(ba9ca70b) SHA1(c46727473673554cbe4bbbc0288d66357f99a80e) ) |
| 978 | ROM_LOAD16_BYTE( "bh.4", 0x000001, 0x20000, CRC(eabc5ddf) SHA1(08a2a8fcdf6a08a2694e00f4232a5bfbec98fd27) ) |
| 979 | ROM_END |
| 980 | |
| 981 | ROM_START( sercharj ) |
| 982 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) |
| 983 | ROM_LOAD16_BYTE( "bh2ver3j.9c", 0x000000, 0x20000, CRC(7ef7b172) SHA1(85669ba72f59e4ff3a483bf611bf41c73f4e1930) ) |
| 984 | ROM_LOAD16_BYTE( "bh3ver3j.10c", 0x000001, 0x20000, CRC(3fdea793) SHA1(49bafb53466afb7e4486a4894e4fd6fa08ea2eb2) ) |
| 985 | |
| 986 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 987 | ROM_LOAD( "bh.5", 0x000000, 0x10000, CRC(53e2fa76) SHA1(cf25b1def82545a1fd013822ab3cf02483074623) ) |
| 988 | |
| 989 | ROM_REGION( 0x010000, REGION_GFX1, ROMREGION_DISPOSE ) /* characters */ |
| 990 | ROM_LOAD( "bh.7", 0x000000, 0x08000, CRC(b0f1b049) SHA1(ec276984d91b5759a5e2b6815d1db2abc37b99f8) ) |
| 991 | ROM_LOAD( "bh.8", 0x008000, 0x08000, CRC(174ddba7) SHA1(7b19087cd2ccc409878aefe7fa08bb2e9953d352) ) |
| 992 | |
| 993 | ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE ) /* sprites */ |
| 994 | ROM_LOAD( "bh.c1", 0x000000, 0x80000, CRC(1fb8f0ae) SHA1(d63c7376aa5f01bc009176b23324e720bada4286) ) |
| 995 | ROM_LOAD( "bh.c3", 0x080000, 0x80000, CRC(fd8bc407) SHA1(88d750293808bf6ea23864b22070314b14fbee3c) ) |
| 996 | ROM_LOAD( "bh.c5", 0x100000, 0x80000, CRC(1d30acc3) SHA1(e5ca39853779475b83fe37304e7bed2c293bd587) ) |
| 997 | // 180000-1fffff empty |
| 998 | ROM_LOAD( "bh.c2", 0x200000, 0x80000, CRC(7c803767) SHA1(992516fbb28d00feabbed5769fa3a5748199a7d8) ) |
| 999 | ROM_LOAD( "bh.c4", 0x280000, 0x80000, CRC(eede7c43) SHA1(7645acf0beb4fff9ec92205dcf34124360cd52f6) ) |
| 1000 | ROM_LOAD( "bh.c6", 0x300000, 0x80000, CRC(9f785cd9) SHA1(e5c7797ae7a3139e1814b068c5ecfe5c6bf30d0f) ) |
| 1001 | // 380000-3fffff empty |
| 1002 | |
| 1003 | ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* UPD7759 samples */ |
| 1004 | ROM_LOAD( "bh.v1", 0x000000, 0x20000, CRC(07a6114b) SHA1(224df4616b77a56f33974d3b1793473d48ad52ca) ) |
| 1005 | |
| 1006 | ROM_REGION16_BE( 0x40000, REGION_USER1, 0 ) /* Extra code bank */ |
| 1007 | ROM_LOAD16_BYTE( "bhw.1", 0x000000, 0x20000, CRC(62b60066) SHA1(f7e7985c8f5f8191c580e777e1b7ed29d944d23f) ) |
| 1008 | ROM_LOAD16_BYTE( "bhw.4", 0x000001, 0x20000, CRC(16d8525c) SHA1(0098b0a7fcb23de2661bbec9a05254aa46579bb2) ) |
| 1009 | ROM_END |
| 1010 | |
| 1195 | 1011 | /******************************************************************************/ |
| 1196 | 1012 | |
| 1197 | 1013 | static DRIVER_INIT( searchar ) |
| r2956 | r2957 | |
| 1201 | 1017 | |
| 1202 | 1018 | /******************************************************************************/ |
| 1203 | 1019 | |
| 1204 | | GAME( 1988, pow, 0, pow, pow, 0, ROT0, "SNK", "P.O.W. - Prisoners of War (US version 1)", 0 ) |
| 1205 | | GAME( 1988, powj, pow, pow, powj, 0, ROT0, "SNK", "Datsugoku - Prisoners of War (Japan)", 0 ) |
| 1206 | | GAME( 1989, searchar, 0, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (World)", 0 ) |
| 1207 | | GAME( 1989, sercharu, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (US)", 0 ) |
| 1208 | | GAME( 1989, sercharj, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (Japan)", 0 ) |
| 1209 | | GAME( 1989, streetsm, 0, streetsm, streetsm, 0, ROT0, "SNK", "Street Smart (US version 2)", 0 ) |
| 1020 | GAME( 1988, pow, 0, pow, pow, 0, ROT0, "SNK", "P.O.W. - Prisoners of War (US version 1)", 0 ) |
| 1021 | GAME( 1988, powj, pow, pow, powj, 0, ROT0, "SNK", "Datsugoku - Prisoners of War (Japan)", 0 ) |
| 1022 | GAME( 1989, streetsm, 0, pow, streetsm, 0, ROT0, "SNK", "Street Smart (US version 2)", 0 ) |
| 1210 | 1023 | GAME( 1989, streets1, streetsm, searchar, streetsm, 0, ROT0, "SNK", "Street Smart (US version 1)", 0 ) |
| 1211 | 1024 | GAME( 1989, streetsw, streetsm, searchar, streetsj, 0, ROT0, "SNK", "Street Smart (World version 1)", 0 ) |
| 1212 | 1025 | GAME( 1989, streetsj, streetsm, searchar, streetsj, 0, ROT0, "SNK", "Street Smart (Japan version 1)", 0 ) |
| 1213 | | GAME( 1989, ikari3, 0, ikari3, ikari3, searchar, ROT0, "SNK", "Ikari III - The Rescue (Rotary Joystick)", 0 ) |
| 1214 | | GAME( 1989, ikari3nr, ikari3, ikari3, ikari3, searchar, ROT0, "SNK", "Ikari III - The Rescue (8-Way Joystick)", 0 ) |
| 1215 | | |
| 1026 | GAME( 1989, ikari3, 0, searchar, ikari3, searchar, ROT0, "SNK", "Ikari III - The Rescue (Rotary Joystick)", 0 ) |
| 1027 | GAME( 1989, ikari3nr, ikari3, searchar, ikari3, searchar, ROT0, "SNK", "Ikari III - The Rescue (8-Way Joystick)", 0 ) |
| 1028 | GAME( 1989, searchar, 0, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (World)", 0 ) |
| 1029 | GAME( 1989, sercharu, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (US)", 0 ) |
| 1030 | GAME( 1989, sercharj, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (Japan)", 0 ) |
src/mame/drivers/taito_z.c
| r2956 | r2957 | |
| 771 | 771 | ***************************************************************************/ |
| 772 | 772 | |
| 773 | 773 | #include "driver.h" |
| 774 | #include "taitoipt.h" |
| 774 | 775 | #include "cpu/m68000/m68000.h" |
| 775 | 776 | #include "machine/eeprom.h" |
| 776 | 777 | #include "video/taitoic.h" |
| r2956 | r2957 | |
| 1013 | 1014 | break; |
| 1014 | 1015 | |
| 1015 | 1016 | default: |
| 1016 | | TC0220IOC_w( machine,offset,data ); /* might be a 510NIO ! */ |
| 1017 | TC0220IOC_w(machine, offset, data); /* might be a 510NIO ! */ |
| 1017 | 1018 | } |
| 1018 | 1019 | } |
| 1019 | 1020 | |
| r2956 | r2957 | |
| 1026 | 1027 | { |
| 1027 | 1028 | /* Bypass TC0220IOC controller for analog input */ |
| 1028 | 1029 | |
| 1029 | | UINT8 port = TC0220IOC_port_r(machine,0); /* read port number */ |
| 1030 | UINT8 port = TC0220IOC_port_r(machine, 0); /* read port number */ |
| 1030 | 1031 | int steer = 0; |
| 1031 | | int fake = input_port_read_indexed(machine,6); |
| 1032 | int fake = input_port_read(machine, "FAKE"); |
| 1032 | 1033 | |
| 1033 | | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1034 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1034 | 1035 | { |
| 1035 | 1036 | /* center around zero and reduce span to 0xc0 */ |
| 1036 | | steer = ((input_port_read_indexed(machine,5) - 0x80) * 0xc0) / 0x100; |
| 1037 | steer = ((input_port_read(machine, "STEER") - 0x80) * 0xc0) / 0x100; |
| 1037 | 1038 | |
| 1038 | 1039 | } |
| 1039 | 1040 | else /* Digital steer */ |
| 1040 | 1041 | { |
| 1041 | | if (fake &0x4) |
| 1042 | if (fake & 0x04) |
| 1042 | 1043 | { |
| 1043 | 1044 | steer = 0x60; |
| 1044 | 1045 | } |
| 1045 | | else if (fake &0x8) |
| 1046 | else if (fake & 0x08) |
| 1046 | 1047 | { |
| 1047 | 1048 | steer = 0xff9f; |
| 1048 | 1049 | } |
| r2956 | r2957 | |
| 1051 | 1052 | switch (port) |
| 1052 | 1053 | { |
| 1053 | 1054 | case 0x08: |
| 1054 | | return steer &0xff; |
| 1055 | return steer & 0xff; |
| 1055 | 1056 | |
| 1056 | 1057 | case 0x09: |
| 1057 | 1058 | return steer >> 8; |
| 1058 | 1059 | |
| 1059 | 1060 | default: |
| 1060 | | return TC0220IOC_portreg_r( machine,offset ); |
| 1061 | return TC0220IOC_portreg_r(machine, offset); |
| 1061 | 1062 | } |
| 1062 | 1063 | } |
| 1063 | 1064 | |
| r2956 | r2957 | |
| 1066 | 1067 | { |
| 1067 | 1068 | /* Bypass TC0220IOC controller for extra inputs */ |
| 1068 | 1069 | |
| 1069 | | UINT8 port = TC0220IOC_port_r(machine,0); /* read port number */ |
| 1070 | UINT8 port = TC0220IOC_port_r(machine, 0); /* read port number */ |
| 1070 | 1071 | int steer = 0; |
| 1071 | | int fake = input_port_read_indexed(machine,10); |
| 1072 | int fake = input_port_read(machine, "FAKE"); |
| 1072 | 1073 | |
| 1073 | | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1074 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1074 | 1075 | { |
| 1075 | 1076 | /* center around zero */ |
| 1076 | | steer = input_port_read_indexed(machine,9) - 0x80; |
| 1077 | steer = input_port_read(machine, "STEER") - 0x80; |
| 1077 | 1078 | } |
| 1078 | 1079 | else /* Digital steer */ |
| 1079 | 1080 | { |
| 1080 | | if (fake &0x4) |
| 1081 | if (fake & 0x04) |
| 1081 | 1082 | { |
| 1082 | 1083 | steer = 0xff80; |
| 1083 | 1084 | } |
| 1084 | | else if (fake &0x8) |
| 1085 | else if (fake & 0x08) |
| 1085 | 1086 | { |
| 1086 | 1087 | steer = 0x7f; |
| 1087 | 1088 | } |
| r2956 | r2957 | |
| 1090 | 1091 | switch (port) |
| 1091 | 1092 | { |
| 1092 | 1093 | case 0x08: |
| 1093 | | return input_port_read_indexed(machine,5); |
| 1094 | return input_port_read(machine, "UNK1"); |
| 1094 | 1095 | |
| 1095 | 1096 | case 0x09: |
| 1096 | | return input_port_read_indexed(machine,6); |
| 1097 | return input_port_read(machine, "UNK2"); |
| 1097 | 1098 | |
| 1098 | 1099 | case 0x0a: |
| 1099 | | return input_port_read_indexed(machine,7); |
| 1100 | return input_port_read(machine, "UNK3"); |
| 1100 | 1101 | |
| 1101 | 1102 | case 0x0b: |
| 1102 | | return input_port_read_indexed(machine,8); |
| 1103 | return input_port_read(machine, "UNK4"); |
| 1103 | 1104 | |
| 1104 | 1105 | case 0x0c: |
| 1105 | | return steer &0xff; |
| 1106 | return steer & 0xff; |
| 1106 | 1107 | |
| 1107 | 1108 | case 0x0d: |
| 1108 | 1109 | return steer >> 8; |
| 1109 | 1110 | |
| 1110 | 1111 | default: |
| 1111 | | return TC0220IOC_portreg_r( machine, offset ); |
| 1112 | return TC0220IOC_portreg_r(machine, offset); |
| 1112 | 1113 | } |
| 1113 | 1114 | } |
| 1114 | 1115 | |
| r2956 | r2957 | |
| 1118 | 1119 | switch (offset) |
| 1119 | 1120 | { |
| 1120 | 1121 | case 0x00: |
| 1121 | | return input_port_read_indexed(machine,5); |
| 1122 | return input_port_read(machine, "STICKX"); |
| 1122 | 1123 | |
| 1123 | 1124 | case 0x01: |
| 1124 | | return input_port_read_indexed(machine,6); |
| 1125 | return input_port_read(machine, "X_ADJUST"); |
| 1125 | 1126 | |
| 1126 | 1127 | case 0x02: |
| 1127 | | return input_port_read_indexed(machine,7); |
| 1128 | return input_port_read(machine, "STICKY"); |
| 1128 | 1129 | |
| 1129 | 1130 | case 0x03: |
| 1130 | | return input_port_read_indexed(machine,8); |
| 1131 | return input_port_read(machine, "Y_ADJUST"); |
| 1131 | 1132 | } |
| 1132 | 1133 | |
| 1133 | | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n",activecpu_get_pc(),offset); |
| 1134 | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n", activecpu_get_pc(), offset); |
| 1134 | 1135 | |
| 1135 | 1136 | return 0xff; |
| 1136 | 1137 | } |
| r2956 | r2957 | |
| 1141 | 1142 | switch (offset) |
| 1142 | 1143 | { |
| 1143 | 1144 | case 0x00: |
| 1144 | | return input_port_read_indexed(machine,5); |
| 1145 | return input_port_read(machine, "STICKX"); |
| 1145 | 1146 | |
| 1146 | 1147 | case 0x01: |
| 1147 | | return input_port_read_indexed(machine,6); |
| 1148 | return input_port_read(machine, "STICKY"); |
| 1148 | 1149 | |
| 1149 | 1150 | case 0x02: |
| 1150 | | return input_port_read_indexed(machine,7); |
| 1151 | return input_port_read(machine, "X_ADJUST"); |
| 1151 | 1152 | |
| 1152 | 1153 | case 0x03: |
| 1153 | | return input_port_read_indexed(machine,8); |
| 1154 | return input_port_read(machine, "Y_ADJUST"); |
| 1154 | 1155 | } |
| 1155 | 1156 | |
| 1156 | | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n",activecpu_get_pc(),offset); |
| 1157 | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n", activecpu_get_pc(), offset); |
| 1157 | 1158 | |
| 1158 | 1159 | return 0xff; |
| 1159 | 1160 | } |
| r2956 | r2957 | |
| 1173 | 1174 | static READ16_HANDLER( sci_steer_input_r ) |
| 1174 | 1175 | { |
| 1175 | 1176 | int steer = 0; |
| 1176 | | int fake = input_port_read_indexed(machine,6); |
| 1177 | int fake = input_port_read(machine, "FAKE"); |
| 1177 | 1178 | |
| 1178 | | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1179 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1179 | 1180 | { |
| 1180 | 1181 | /* center around zero and reduce span to 0xc0 */ |
| 1181 | | steer = ((input_port_read_indexed(machine,5) - 0x80) * 0xc0) / 0x100; |
| 1182 | steer = ((input_port_read(machine, "STEER") - 0x80) * 0xc0) / 0x100; |
| 1182 | 1183 | } |
| 1183 | 1184 | else /* Digital steer */ |
| 1184 | 1185 | { |
| 1185 | | if (fake &0x4) |
| 1186 | if (fake & 0x04) |
| 1186 | 1187 | { |
| 1187 | 1188 | steer = 0xffa0; |
| 1188 | 1189 | } |
| 1189 | | else if (fake &0x8) |
| 1190 | else if (fake & 0x08) |
| 1190 | 1191 | { |
| 1191 | 1192 | steer = 0x5f; |
| 1192 | 1193 | } |
| r2956 | r2957 | |
| 1201 | 1202 | return (steer & 0xff00) >> 8; |
| 1202 | 1203 | } |
| 1203 | 1204 | |
| 1204 | | logerror("CPU #0 PC %06x: warning - read unmapped steer input offset %06x\n",activecpu_get_pc(),offset); |
| 1205 | logerror("CPU #0 PC %06x: warning - read unmapped steer input offset %06x\n", activecpu_get_pc(), offset); |
| 1205 | 1206 | |
| 1206 | 1207 | return 0xff; |
| 1207 | 1208 | } |
| r2956 | r2957 | |
| 1215 | 1216 | return eeprom_r(); |
| 1216 | 1217 | |
| 1217 | 1218 | default: |
| 1218 | | return TC0220IOC_r( machine, offset ); /* might be a 510NIO ! */ |
| 1219 | return TC0220IOC_r(machine, offset); /* might be a 510NIO ! */ |
| 1219 | 1220 | } |
| 1220 | 1221 | } |
| 1221 | 1222 | |
| r2956 | r2957 | |
| 1224 | 1225 | switch (offset) |
| 1225 | 1226 | { |
| 1226 | 1227 | case 0x00: |
| 1227 | | return input_port_read_indexed(machine,5); /* P1X */ |
| 1228 | return input_port_read(machine, "STICKX1"); |
| 1228 | 1229 | |
| 1229 | 1230 | case 0x01: |
| 1230 | | return input_port_read_indexed(machine,6); /* P1Y */ |
| 1231 | return input_port_read(machine, "STICKY1"); |
| 1231 | 1232 | |
| 1232 | 1233 | case 0x02: |
| 1233 | | return input_port_read_indexed(machine,7); /* P2X */ |
| 1234 | return input_port_read(machine, "STICKX2"); |
| 1234 | 1235 | |
| 1235 | 1236 | case 0x03: |
| 1236 | | return input_port_read_indexed(machine,8); /* P2Y */ |
| 1237 | return input_port_read(machine, "STICKY2"); |
| 1237 | 1238 | } |
| 1238 | 1239 | |
| 1239 | | return 0x0; |
| 1240 | return 0x00; |
| 1240 | 1241 | } |
| 1241 | 1242 | |
| 1242 | 1243 | static WRITE16_HANDLER( spacegun_lightgun_w ) |
| r2956 | r2957 | |
| 1256 | 1257 | static READ16_HANDLER( dblaxle_steer_input_r ) |
| 1257 | 1258 | { |
| 1258 | 1259 | int steer = 0; |
| 1259 | | int fake = input_port_read_indexed(machine,6); |
| 1260 | int fake = input_port_read(machine, "FAKE"); |
| 1260 | 1261 | |
| 1261 | | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1262 | if (!(fake & 0x10)) /* Analogue steer (the real control method) */ |
| 1262 | 1263 | { |
| 1263 | 1264 | /* center around zero and reduce span to 0x80 */ |
| 1264 | | steer = ((input_port_read_indexed(machine,5) - 0x80) * 0x80) / 0x100; |
| 1265 | steer = ((input_port_read(machine, "STEER") - 0x80) * 0x80) / 0x100; |
| 1265 | 1266 | } |
| 1266 | 1267 | else /* Digital steer */ |
| 1267 | 1268 | { |
| 1268 | | if (fake &0x4) |
| 1269 | if (fake & 0x04) |
| 1269 | 1270 | { |
| 1270 | 1271 | steer = 0xffc0; |
| 1271 | 1272 | } |
| 1272 | | else if (fake &0x8) |
| 1273 | else if (fake & 0x08) |
| 1273 | 1274 | { |
| 1274 | 1275 | steer = 0x3f; |
| 1275 | 1276 | } |
| r2956 | r2957 | |
| 1281 | 1282 | return steer >> 8; |
| 1282 | 1283 | |
| 1283 | 1284 | case 0x05: |
| 1284 | | return steer &0xff; |
| 1285 | return steer & 0xff; |
| 1285 | 1286 | } |
| 1286 | 1287 | |
| 1287 | | logerror("CPU #0 PC %06x: warning - read unmapped steer input offset %02x\n",activecpu_get_pc(),offset); |
| 1288 | logerror("CPU #0 PC %06x: warning - read unmapped steer input offset %02x\n", activecpu_get_pc(), offset); |
| 1289 | |
| 1288 | 1290 | return 0x00; |
| 1289 | 1291 | } |
| 1290 | 1292 | |
| r2956 | r2957 | |
| 1405 | 1407 | static WRITE16_HANDLER( spacegun_pancontrol ) |
| 1406 | 1408 | { |
| 1407 | 1409 | if (ACCESSING_BITS_0_7) |
| 1408 | | taitoz_pancontrol(machine,offset,data & 0xff); |
| 1410 | taitoz_pancontrol(machine, offset, data & 0xff); |
| 1409 | 1411 | } |
| 1410 | 1412 | |
| 1411 | 1413 | |
| r2956 | r2957 | |
| 2189 | 2191 | PORT_DIPSETTING( 0xfe, "+7E" ) \ |
| 2190 | 2192 | PORT_DIPSETTING( 0xff, "+7F" ) |
| 2191 | 2193 | |
| 2192 | | #define TAITO_Z_COINAGE_JAPAN_8 \ |
| 2193 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW A:5,6") \ |
| 2194 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 2195 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 2196 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 2197 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 2198 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW A:7,8") \ |
| 2199 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 2200 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 2201 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 2202 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 2203 | 2194 | |
| 2204 | | #define TAITO_Z_COINAGE_WORLD_8 \ |
| 2205 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW A:5,6") \ |
| 2206 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 2207 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 2208 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 2209 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 2210 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW A:7,8") \ |
| 2211 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 2212 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 2213 | | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) \ |
| 2214 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 2215 | | |
| 2216 | | #define TAITO_Z_COINAGE_US_8 \ |
| 2217 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW A:5,6") \ |
| 2218 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 2219 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 2220 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 2221 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 2222 | | PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) PORT_DIPLOCATION("SW A:7,8") \ |
| 2223 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 2224 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 2225 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) \ |
| 2226 | | PORT_DIPSETTING( 0xc0, "Same as Start" ) |
| 2227 | | |
| 2228 | | #define TAITO_Z_DIFFICULTY_8 \ |
| 2229 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:1,2")\ |
| 2230 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) \ |
| 2231 | | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) \ |
| 2232 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) \ |
| 2233 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 2234 | | |
| 2235 | | |
| 2236 | 2195 | static INPUT_PORTS_START( contcirc ) |
| 2237 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2196 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2238 | 2197 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW A:1") |
| 2239 | 2198 | PORT_DIPSETTING( 0x01, DEF_STR( Upright ) ) |
| 2240 | 2199 | PORT_DIPSETTING( 0x00, "Cockpit" ) // analogue accelerator pedal |
| r2956 | r2957 | |
| 2245 | 2204 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2246 | 2205 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2247 | 2206 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2248 | | TAITO_Z_COINAGE_WORLD_8 |
| 2207 | TAITO_COINAGE_WORLD_LOC(SW A) |
| 2249 | 2208 | |
| 2250 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2209 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2251 | 2210 | PORT_DIPNAME( 0x03, 0x03, "Difficulty 1 (time/speed)" ) PORT_DIPLOCATION("SW B:1,2") |
| 2252 | 2211 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 2253 | 2212 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 2267 | 2226 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW B:7" ) |
| 2268 | 2227 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW B:8" ) |
| 2269 | 2228 | |
| 2270 | | PORT_START /* IN0 */ |
| 2229 | PORT_START_TAG("IN0") /* IN0 */ |
| 2271 | 2230 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2272 | 2231 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2273 | 2232 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| r2956 | r2957 | |
| 2277 | 2236 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2278 | 2237 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) /* main accel key */ |
| 2279 | 2238 | |
| 2280 | | PORT_START /* IN1: b3 not mapped: standardized on holding b4=lo gear */ |
| 2239 | PORT_START_TAG("IN1") /* IN1: b3 not mapped: standardized on holding b4=lo gear */ |
| 2281 | 2240 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2282 | 2241 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2283 | 2242 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| r2956 | r2957 | |
| 2287 | 2246 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 2288 | 2247 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) /* main brake key */ |
| 2289 | 2248 | |
| 2290 | | PORT_START /* IN2, unused */ |
| 2249 | PORT_START_TAG("IN2") /* IN2, unused */ |
| 2250 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2291 | 2251 | |
| 2292 | | PORT_START /* IN3, "handle" i.e. steering */ |
| 2252 | PORT_START_TAG("STEER") /* IN3, "handle" i.e. steering */ |
| 2293 | 2253 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) |
| 2294 | 2254 | |
| 2295 | | PORT_START /* IN4, fake allowing digital steer */ |
| 2255 | PORT_START_TAG("FAKE") /* IN4, fake allowing digital steer */ |
| 2296 | 2256 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) |
| 2297 | 2257 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 2298 | 2258 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) |
| r2956 | r2957 | |
| 2303 | 2263 | static INPUT_PORTS_START( contcrcu ) |
| 2304 | 2264 | PORT_INCLUDE(contcirc) |
| 2305 | 2265 | |
| 2306 | | PORT_MODIFY("DSW1") |
| 2307 | | TAITO_Z_COINAGE_JAPAN_8 // confirmed |
| 2266 | PORT_MODIFY("DSWA") // confirmed |
| 2267 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2308 | 2268 | INPUT_PORTS_END |
| 2309 | 2269 | |
| 2310 | 2270 | static INPUT_PORTS_START( chasehq ) // IN3-6 perhaps used with cockpit setup? // |
| 2311 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2271 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2312 | 2272 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW A:1,2") /* US Manual states DIPS 1 & 2 "MUST REMAIN OFF" */ |
| 2313 | 2273 | PORT_DIPSETTING( 0x03, "Upright / Steering Lock" ) |
| 2314 | 2274 | PORT_DIPSETTING( 0x02, "Upright / No Steering Lock" ) |
| r2956 | r2957 | |
| 2318 | 2278 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2319 | 2279 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2320 | 2280 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2321 | | TAITO_Z_COINAGE_WORLD_8 |
| 2281 | TAITO_COINAGE_WORLD_LOC(SW A) |
| 2322 | 2282 | |
| 2323 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2324 | | TAITO_Z_DIFFICULTY_8 |
| 2283 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2284 | TAITO_DIFFICULTY_LOC(SW B) |
| 2325 | 2285 | PORT_DIPNAME( 0x0c, 0x0c, "Timer Setting" ) PORT_DIPLOCATION("SW B:3,4") |
| 2326 | 2286 | PORT_DIPSETTING( 0x08, "70 Seconds" ) |
| 2327 | 2287 | PORT_DIPSETTING( 0x04, "65 Seconds" ) |
| r2956 | r2957 | |
| 2340 | 2300 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2341 | 2301 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 2342 | 2302 | |
| 2343 | | PORT_START /* IN0 */ |
| 2303 | PORT_START_TAG("IN0") /* IN0 */ |
| 2344 | 2304 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2345 | 2305 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2346 | 2306 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r2956 | r2957 | |
| 2350 | 2310 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2351 | 2311 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2352 | 2312 | |
| 2353 | | PORT_START /* IN1 */ |
| 2313 | PORT_START_TAG("IN1") /* IN1 */ |
| 2354 | 2314 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* turbo */ |
| 2355 | 2315 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) |
| 2356 | 2316 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2360 | 2320 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2361 | 2321 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2362 | 2322 | |
| 2363 | | PORT_START /* IN2, unused */ |
| 2323 | PORT_START_TAG("IN2") /* IN2, unused */ |
| 2324 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2364 | 2325 | |
| 2365 | | PORT_START /* IN3, ??? */ |
| 2326 | PORT_START_TAG("UNK1") /* IN3, ??? */ |
| 2366 | 2327 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2367 | 2328 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2368 | 2329 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2372 | 2333 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2373 | 2334 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2374 | 2335 | |
| 2375 | | PORT_START /* IN4, ??? */ |
| 2336 | PORT_START_TAG("UNK2") /* IN4, ??? */ |
| 2376 | 2337 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2377 | 2338 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2378 | 2339 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2382 | 2343 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2383 | 2344 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2384 | 2345 | |
| 2385 | | PORT_START /* IN5, ??? */ |
| 2346 | PORT_START_TAG("UNK3") /* IN5, ??? */ |
| 2386 | 2347 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2387 | 2348 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2388 | 2349 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2392 | 2353 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2393 | 2354 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2394 | 2355 | |
| 2395 | | PORT_START /* IN6, ??? */ |
| 2356 | PORT_START_TAG("UNK4") /* IN6, ??? */ |
| 2396 | 2357 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2397 | 2358 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2398 | 2359 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2402 | 2363 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2403 | 2364 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2404 | 2365 | |
| 2405 | | PORT_START /* IN7, steering */ |
| 2366 | PORT_START_TAG("STEER") /* IN7, steering */ |
| 2406 | 2367 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| 2407 | 2368 | |
| 2408 | | PORT_START /* IN8, fake allowing digital steer */ |
| 2369 | PORT_START_TAG("FAKE") /* IN8, fake allowing digital steer */ |
| 2409 | 2370 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) |
| 2410 | 2371 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 2411 | 2372 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) |
| r2956 | r2957 | |
| 2416 | 2377 | static INPUT_PORTS_START( chasehqj ) |
| 2417 | 2378 | PORT_INCLUDE(chasehq) |
| 2418 | 2379 | |
| 2419 | | PORT_MODIFY("DSW1") |
| 2420 | | TAITO_Z_COINAGE_JAPAN_8 |
| 2380 | PORT_MODIFY("DSWA") |
| 2381 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2421 | 2382 | INPUT_PORTS_END |
| 2422 | 2383 | |
| 2423 | 2384 | static INPUT_PORTS_START( enforce ) |
| 2424 | | PORT_START /* DSW A */ |
| 2385 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2425 | 2386 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW A:1" ) |
| 2426 | 2387 | PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW A:2" ) |
| 2427 | 2388 | PORT_SERVICE_DIPLOC( 0x04, 0x04, "SW A:3" ) |
| 2428 | 2389 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2429 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // Says SHIFT HI in test mode !? |
| 2390 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // Says SHIFT HI in test mode !? |
| 2430 | 2391 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) // Says SHIFT LO in test mode !? |
| 2431 | | TAITO_Z_COINAGE_JAPAN_8 |
| 2392 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2432 | 2393 | |
| 2433 | | PORT_START /* DSW B */ |
| 2434 | | TAITO_Z_DIFFICULTY_8 |
| 2394 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2395 | TAITO_DIFFICULTY_LOC(SW B) |
| 2435 | 2396 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW B:3" ) |
| 2436 | 2397 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW B:4" ) |
| 2437 | 2398 | PORT_DIPNAME( 0x10, 0x00, "Background scenery" ) PORT_DIPLOCATION("SW B:5") |
| r2956 | r2957 | |
| 2441 | 2402 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW B:7" ) |
| 2442 | 2403 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW B:8" ) |
| 2443 | 2404 | |
| 2444 | | PORT_START /* IN0 */ |
| 2405 | PORT_START_TAG("IN0") /* IN0 */ |
| 2445 | 2406 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2446 | 2407 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2447 | 2408 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| r2956 | r2957 | |
| 2451 | 2412 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 2452 | 2413 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 2453 | 2414 | |
| 2454 | | PORT_START /* IN1 */ |
| 2415 | PORT_START_TAG("IN1") /* IN1 */ |
| 2455 | 2416 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) /* Bomb */ |
| 2456 | 2417 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* Laser */ |
| 2457 | 2418 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| r2956 | r2957 | |
| 2460 | 2421 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2461 | 2422 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2462 | 2423 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 2424 | |
| 2425 | PORT_START_TAG("IN2") /* IN2, unused */ |
| 2426 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2463 | 2427 | INPUT_PORTS_END |
| 2464 | 2428 | |
| 2465 | 2429 | static INPUT_PORTS_START( bshark ) |
| 2466 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2430 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2467 | 2431 | PORT_DIPNAME( 0x01, 0x01, "Mirror screen" ) PORT_DIPLOCATION("SW A:1") // manual says it must be off |
| 2468 | 2432 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 2469 | 2433 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2472 | 2436 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2473 | 2437 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2474 | 2438 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2475 | | TAITO_Z_COINAGE_US_8 |
| 2439 | TAITO_COINAGE_US_LOC(SW A) |
| 2476 | 2440 | |
| 2477 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2478 | | TAITO_Z_DIFFICULTY_8 |
| 2441 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2442 | TAITO_DIFFICULTY_LOC(SW B) |
| 2479 | 2443 | PORT_DIPNAME( 0x0c, 0x04, "Speed of Sight" ) PORT_DIPLOCATION("SW B:3,4") |
| 2480 | 2444 | PORT_DIPSETTING( 0x0c, "Slow" ) |
| 2481 | 2445 | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) |
| r2956 | r2957 | |
| 2486 | 2450 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW B:7" ) |
| 2487 | 2451 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW B:8" ) |
| 2488 | 2452 | |
| 2489 | | PORT_START /* IN0 */ |
| 2453 | PORT_START_TAG("IN0") /* IN0 */ |
| 2490 | 2454 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2491 | 2455 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2492 | 2456 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r2956 | r2957 | |
| 2496 | 2460 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2497 | 2461 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2498 | 2462 | |
| 2499 | | PORT_START /* IN1, unused */ |
| 2463 | PORT_START_TAG("IN1") /* IN1, unused */ |
| 2464 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2500 | 2465 | |
| 2501 | | PORT_START /* IN2, b2-5 affect sound num in service mode but otherwise useless (?) */ |
| 2466 | PORT_START_TAG("IN2") /* IN2, b2-5 affect sound num in service mode but otherwise useless (?) */ |
| 2502 | 2467 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 2503 | 2468 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 2504 | 2469 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2508 | 2473 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) /* "Fire" */ |
| 2509 | 2474 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) /* same as "Fire" */ |
| 2510 | 2475 | |
| 2511 | | PORT_START /* values chosen to match allowed crosshair area */ |
| 2476 | PORT_START_TAG("STICKX") /* values chosen to match allowed crosshair area */ |
| 2512 | 2477 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_MINMAX(0xcc,0x35) PORT_SENSITIVITY(20) PORT_KEYDELTA(4) PORT_REVERSE PORT_PLAYER(1) |
| 2513 | 2478 | |
| 2514 | | PORT_START /* "X adjust" */ /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2479 | PORT_START_TAG("X_ADJUST") /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2515 | 2480 | TAITO_Z_ANALOG_ADJUST( "Adjust Stick H (VARIABLE REGISTER)" ) |
| 2516 | 2481 | |
| 2517 | | PORT_START /* values chosen to match allowed crosshair area */ |
| 2482 | PORT_START_TAG("STICKY") /* values chosen to match allowed crosshair area */ |
| 2518 | 2483 | PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_MINMAX(0xd5,0x32) PORT_SENSITIVITY(20) PORT_KEYDELTA(4) PORT_PLAYER(1) |
| 2519 | 2484 | |
| 2520 | | PORT_START /* "Y adjust" */ /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2485 | PORT_START_TAG("Y_ADJUST") /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2521 | 2486 | TAITO_Z_ANALOG_ADJUST( "Adjust Stick V (VARIABLE REGISTER)" ) |
| 2522 | 2487 | INPUT_PORTS_END |
| 2523 | 2488 | |
| 2524 | 2489 | static INPUT_PORTS_START( bsharkj ) |
| 2525 | 2490 | PORT_INCLUDE(bshark) |
| 2526 | 2491 | |
| 2527 | | PORT_MODIFY("DSW1") |
| 2528 | | TAITO_Z_COINAGE_JAPAN_8 |
| 2492 | PORT_MODIFY("DSWA") |
| 2493 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2529 | 2494 | INPUT_PORTS_END |
| 2530 | 2495 | |
| 2531 | 2496 | static INPUT_PORTS_START( sci ) |
| 2532 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2497 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2533 | 2498 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW A:1") |
| 2534 | 2499 | PORT_DIPSETTING( 0x01, "Cockpit" ) |
| 2535 | 2500 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| r2956 | r2957 | |
| 2538 | 2503 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2539 | 2504 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2540 | 2505 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2541 | | TAITO_Z_COINAGE_WORLD_8 |
| 2506 | TAITO_COINAGE_WORLD_LOC(SW A) |
| 2542 | 2507 | |
| 2543 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2544 | | TAITO_Z_DIFFICULTY_8 |
| 2508 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2509 | TAITO_DIFFICULTY_LOC(SW B) |
| 2545 | 2510 | PORT_DIPNAME( 0x0c, 0x0c, "Timer Setting" ) PORT_DIPLOCATION("SW B:3,4") |
| 2546 | 2511 | PORT_DIPSETTING( 0x08, "70 Seconds" ) |
| 2547 | 2512 | PORT_DIPSETTING( 0x04, "65 Seconds" ) |
| r2956 | r2957 | |
| 2560 | 2525 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) |
| 2561 | 2526 | PORT_DIPSETTING( 0x00, DEF_STR( Low ) ) |
| 2562 | 2527 | |
| 2563 | | PORT_START /* IN0 */ |
| 2528 | PORT_START_TAG("IN0") /* IN0 */ |
| 2564 | 2529 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2565 | 2530 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* fire */ |
| 2566 | 2531 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2956 | r2957 | |
| 2570 | 2535 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2571 | 2536 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2572 | 2537 | |
| 2573 | | PORT_START /* IN1 */ |
| 2538 | PORT_START_TAG("IN1") /* IN1 */ |
| 2574 | 2539 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* turbo */ |
| 2575 | 2540 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) |
| 2576 | 2541 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) /* "center" */ |
| r2956 | r2957 | |
| 2580 | 2545 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2581 | 2546 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2582 | 2547 | |
| 2583 | | PORT_START /* IN2, unused */ |
| 2548 | PORT_START_TAG("IN2") /* IN2, unused */ |
| 2549 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2584 | 2550 | |
| 2585 | | PORT_START /* IN3, steering */ |
| 2551 | PORT_START_TAG("STEER") /* IN3, steering */ |
| 2586 | 2552 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| 2587 | 2553 | |
| 2588 | | PORT_START /* IN4, fake allowing digital steer */ |
| 2554 | PORT_START_TAG("FAKE") /* IN4, fake allowing digital steer */ |
| 2589 | 2555 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) |
| 2590 | 2556 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 2591 | 2557 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) |
| r2956 | r2957 | |
| 2596 | 2562 | static INPUT_PORTS_START( sciu ) |
| 2597 | 2563 | PORT_INCLUDE(sci) |
| 2598 | 2564 | |
| 2599 | | PORT_MODIFY("DSW1") |
| 2600 | | TAITO_Z_COINAGE_US_8 |
| 2565 | PORT_MODIFY("DSWA") |
| 2566 | TAITO_COINAGE_US_LOC(SW A) |
| 2601 | 2567 | INPUT_PORTS_END |
| 2602 | 2568 | |
| 2603 | 2569 | static INPUT_PORTS_START( scij ) |
| 2604 | 2570 | PORT_INCLUDE(sci) |
| 2605 | 2571 | |
| 2606 | | PORT_MODIFY("DSW1") |
| 2607 | | TAITO_Z_COINAGE_JAPAN_8 |
| 2572 | PORT_MODIFY("DSWA") |
| 2573 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2608 | 2574 | INPUT_PORTS_END |
| 2609 | 2575 | |
| 2610 | 2576 | static INPUT_PORTS_START( nightstr ) |
| 2611 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2577 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2612 | 2578 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW A:1") |
| 2613 | 2579 | PORT_DIPSETTING( 0x01, "Cockpit" ) |
| 2614 | 2580 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| r2956 | r2957 | |
| 2617 | 2583 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2618 | 2584 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2619 | 2585 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2620 | | TAITO_Z_COINAGE_WORLD_8 |
| 2586 | TAITO_COINAGE_WORLD_LOC(SW A) |
| 2621 | 2587 | |
| 2622 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2623 | | TAITO_Z_DIFFICULTY_8 |
| 2588 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2589 | TAITO_DIFFICULTY_LOC(SW B) |
| 2624 | 2590 | PORT_DIPNAME( 0x0c, 0x0c, "Bonus Shields" ) PORT_DIPLOCATION("SW B:3,4") |
| 2625 | 2591 | PORT_DIPSETTING( 0x08, "3" ) |
| 2626 | 2592 | PORT_DIPSETTING( 0x04, "2" ) |
| r2956 | r2957 | |
| 2638 | 2604 | PORT_DIPSETTING( 0x80, "7 Shots / Second" ) |
| 2639 | 2605 | PORT_DIPSETTING( 0x00, "10 Shots / Second" ) |
| 2640 | 2606 | |
| 2641 | | PORT_START /* IN0 */ |
| 2607 | PORT_START_TAG("IN0") /* IN0 */ |
| 2642 | 2608 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2643 | 2609 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2644 | 2610 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2648 | 2614 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2649 | 2615 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) |
| 2650 | 2616 | |
| 2651 | | PORT_START /* IN1, unused */ |
| 2617 | PORT_START_TAG("IN1") /* IN1, unused */ |
| 2618 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2652 | 2619 | |
| 2653 | | PORT_START /* IN2 */ |
| 2620 | PORT_START_TAG("IN2") /* IN2 */ |
| 2654 | 2621 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 2655 | 2622 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 2656 | 2623 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2660 | 2627 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2661 | 2628 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 2662 | 2629 | |
| 2663 | | PORT_START |
| 2630 | PORT_START_TAG("STICKX") |
| 2664 | 2631 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| 2665 | 2632 | |
| 2666 | | PORT_START |
| 2633 | PORT_START_TAG("STICKY") |
| 2667 | 2634 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) |
| 2668 | 2635 | |
| 2669 | | PORT_START /* X offset */ /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2636 | PORT_START_TAG("X_ADJUST") /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2670 | 2637 | TAITO_Z_ANALOG_ADJUST( "Adjust Stick H (VARIABLE REGISTER)" ) |
| 2671 | 2638 | |
| 2672 | | PORT_START /* Y offset */ /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2639 | PORT_START_TAG("Y_ADJUST") /* declare as DIP SWITCH instead of VARIABLE REGISTER */ |
| 2673 | 2640 | TAITO_Z_ANALOG_ADJUST( "Adjust Stick V (VARIABLE REGISTER)" ) |
| 2674 | 2641 | INPUT_PORTS_END |
| 2675 | 2642 | |
| 2676 | 2643 | static INPUT_PORTS_START( nghtstrj ) |
| 2677 | 2644 | PORT_INCLUDE( nightstr ) |
| 2678 | 2645 | |
| 2679 | | PORT_MODIFY("DSW1") |
| 2680 | | TAITO_Z_COINAGE_JAPAN_8 |
| 2646 | PORT_MODIFY("DSWA") |
| 2647 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2681 | 2648 | INPUT_PORTS_END |
| 2682 | 2649 | |
| 2683 | 2650 | static INPUT_PORTS_START( nghtstru ) |
| 2684 | 2651 | PORT_INCLUDE( nightstr ) |
| 2685 | 2652 | |
| 2686 | | PORT_MODIFY("DSW1") |
| 2687 | | TAITO_Z_COINAGE_US_8 |
| 2653 | PORT_MODIFY("DSWA") |
| 2654 | TAITO_COINAGE_US_LOC(SW A) |
| 2688 | 2655 | INPUT_PORTS_END |
| 2689 | 2656 | |
| 2690 | 2657 | static INPUT_PORTS_START( aquajack ) |
| 2691 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2658 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2692 | 2659 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW A:1") |
| 2693 | 2660 | PORT_DIPSETTING( 0x80, "Cockpit" ) |
| 2694 | 2661 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| r2956 | r2957 | |
| 2708 | 2675 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_4C ) ) /* 2 Coins to Continue */ |
| 2709 | 2676 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) /* 3 Coins to Continue */ |
| 2710 | 2677 | |
| 2711 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2678 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2712 | 2679 | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:2,1") |
| 2713 | 2680 | PORT_DIPSETTING( 0x40, DEF_STR( Easy ) ) |
| 2714 | 2681 | PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 2734 | 2701 | /* PORT_DIPSETTING( 0x01, "Normal Game" ) */ |
| 2735 | 2702 | /* PORT_DIPSETTING( 0x00, "Endless Game" ) */ |
| 2736 | 2703 | |
| 2737 | | PORT_START /* IN0 */ |
| 2704 | PORT_START_TAG("IN0") /* IN0 */ |
| 2738 | 2705 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2739 | 2706 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2740 | 2707 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2956 | r2957 | |
| 2744 | 2711 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2745 | 2712 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2746 | 2713 | |
| 2747 | | PORT_START /* IN1 */ |
| 2714 | PORT_START_TAG("IN1") /* IN1 */ |
| 2748 | 2715 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 2749 | 2716 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 2750 | 2717 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2754 | 2721 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2755 | 2722 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2756 | 2723 | |
| 2757 | | PORT_START /* IN2, what is it ??? */ |
| 2724 | PORT_START_TAG("IN2") /* IN2, what is it ??? */ |
| 2758 | 2725 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 2759 | 2726 | INPUT_PORTS_END |
| 2760 | 2727 | |
| 2761 | 2728 | static INPUT_PORTS_START( aquajckj ) |
| 2762 | 2729 | PORT_INCLUDE(aquajack) |
| 2763 | 2730 | |
| 2764 | | PORT_MODIFY("DSW1") |
| 2731 | PORT_MODIFY("DSWA") |
| 2765 | 2732 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW A:6,5") |
| 2766 | 2733 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| 2767 | 2734 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) |
| r2956 | r2957 | |
| 2775 | 2742 | INPUT_PORTS_END |
| 2776 | 2743 | |
| 2777 | 2744 | static INPUT_PORTS_START( spacegun ) |
| 2778 | | PORT_START /* DSW A */ |
| 2745 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2779 | 2746 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW A:1" ) // Manual says Always Off |
| 2780 | 2747 | PORT_DIPNAME( 0x02, 0x02, "Always have gunsight power up" ) PORT_DIPLOCATION("SW A:2") |
| 2781 | 2748 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| r2956 | r2957 | |
| 2784 | 2751 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2785 | 2752 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2786 | 2753 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2787 | | TAITO_Z_COINAGE_WORLD_8 |
| 2754 | TAITO_COINAGE_WORLD_LOC(SW A) |
| 2788 | 2755 | |
| 2789 | | PORT_START /* DSW B */ |
| 2790 | | TAITO_Z_DIFFICULTY_8 |
| 2756 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2757 | TAITO_DIFFICULTY_LOC(SW B) |
| 2791 | 2758 | PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW B:3" ) // Manual lists dips 3 through 6 and 8 as Always off |
| 2792 | 2759 | PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW B:4" ) |
| 2793 | 2760 | PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW B:5" ) |
| r2956 | r2957 | |
| 2799 | 2766 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2800 | 2767 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2801 | 2768 | |
| 2802 | | PORT_START /* IN0 */ |
| 2769 | PORT_START_TAG("IN0") /* IN0 */ |
| 2803 | 2770 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 2804 | 2771 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2805 | 2772 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r2956 | r2957 | |
| 2809 | 2776 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1) |
| 2810 | 2777 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2) |
| 2811 | 2778 | |
| 2812 | | PORT_START /* IN1, unused */ |
| 2779 | PORT_START_TAG("IN1") /* IN1, unused */ |
| 2780 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2813 | 2781 | |
| 2814 | | PORT_START /* IN2 */ |
| 2782 | PORT_START_TAG("IN2") /* IN2 */ |
| 2815 | 2783 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2816 | 2784 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2817 | 2785 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2821 | 2789 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2822 | 2790 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2823 | 2791 | |
| 2824 | | PORT_START |
| 2792 | PORT_START_TAG("STICKX1") |
| 2825 | 2793 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(22) PORT_REVERSE PORT_PLAYER(1) |
| 2826 | 2794 | |
| 2827 | | PORT_START |
| 2795 | PORT_START_TAG("STICKY1") |
| 2828 | 2796 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(22) PORT_PLAYER(1) |
| 2829 | 2797 | |
| 2830 | | PORT_START |
| 2798 | PORT_START_TAG("STICKX2") |
| 2831 | 2799 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(22) PORT_REVERSE PORT_PLAYER(2) |
| 2832 | 2800 | |
| 2833 | | PORT_START |
| 2801 | PORT_START_TAG("STICKY2") |
| 2834 | 2802 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(22) PORT_PLAYER(2) |
| 2835 | 2803 | INPUT_PORTS_END |
| 2836 | 2804 | |
| 2837 | 2805 | static INPUT_PORTS_START( dblaxle ) |
| 2838 | | PORT_START_TAG("DSW1") /* DSW A */ |
| 2806 | PORT_START_TAG("DSWA") /* DSW A */ |
| 2839 | 2807 | PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW A:1" ) |
| 2840 | 2808 | PORT_DIPNAME( 0x02, 0x02, "Gear shift" ) PORT_DIPLOCATION("SW A:2") |
| 2841 | 2809 | PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 2844 | 2812 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW A:4") |
| 2845 | 2813 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2846 | 2814 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2847 | | TAITO_Z_COINAGE_US_8 |
| 2815 | TAITO_COINAGE_US_LOC(SW A) |
| 2848 | 2816 | |
| 2849 | | PORT_START_TAG("DSW2") /* DSW B */ |
| 2850 | | TAITO_Z_DIFFICULTY_8 |
| 2817 | PORT_START_TAG("DSWB") /* DSW B */ |
| 2818 | TAITO_DIFFICULTY_LOC(SW B) |
| 2851 | 2819 | PORT_DIPNAME( 0x04, 0x00, "Multi-machine hookup ?" ) PORT_DIPLOCATION("SW B:3") // doesn't boot if on |
| 2852 | 2820 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2853 | 2821 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2861 | 2829 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW B:7" ) |
| 2862 | 2830 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW B:8" ) |
| 2863 | 2831 | |
| 2864 | | PORT_START /* IN0 */ |
| 2832 | PORT_START_TAG("IN0") /* IN0 */ |
| 2865 | 2833 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2866 | 2834 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) /* shift */ |
| 2867 | 2835 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2956 | r2957 | |
| 2871 | 2839 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2872 | 2840 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* "back" */ |
| 2873 | 2841 | |
| 2874 | | PORT_START /* IN1 */ |
| 2842 | PORT_START_TAG("IN1") /* IN1 */ |
| 2875 | 2843 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* nitro */ |
| 2876 | 2844 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_TILT ) |
| 2877 | 2845 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) /* "center" */ |
| r2956 | r2957 | |
| 2881 | 2849 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2882 | 2850 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2883 | 2851 | |
| 2884 | | PORT_START /* IN2, unused */ |
| 2852 | PORT_START_TAG("IN2") /* IN2, unused */ |
| 2853 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2885 | 2854 | |
| 2886 | | PORT_START /* IN3, steering */ |
| 2855 | PORT_START_TAG("STEER") /* IN3, steering */ |
| 2887 | 2856 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 2888 | 2857 | |
| 2889 | | PORT_START /* IN4, fake allowing digital steer */ |
| 2858 | PORT_START_TAG("FAKE") /* IN4, fake allowing digital steer */ |
| 2890 | 2859 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1) |
| 2891 | 2860 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1) |
| 2892 | 2861 | PORT_DIPNAME( 0x10, 0x00, "Steering type" ) |
| r2956 | r2957 | |
| 2897 | 2866 | static INPUT_PORTS_START( pwheelsj ) |
| 2898 | 2867 | PORT_INCLUDE(dblaxle) |
| 2899 | 2868 | |
| 2900 | | PORT_MODIFY("DSW1") |
| 2901 | | TAITO_Z_COINAGE_JAPAN_8 |
| 2869 | PORT_MODIFY("DSWA") |
| 2870 | TAITO_COINAGE_JAPAN_OLD_LOC(SW A) |
| 2902 | 2871 | INPUT_PORTS_END |
| 2903 | 2872 | |
| 2904 | 2873 | |
| r2956 | r2957 | |
| 4693 | 4662 | GAME( 1991, dblaxle, 0, dblaxle, dblaxle, taitoz, ROT0, "Taito America Corporation", "Double Axle (US)", GAME_IMPERFECT_GRAPHICS ) |
| 4694 | 4663 | GAME( 1991, pwheelsj, dblaxle, dblaxle, pwheelsj, taitoz, ROT0, "Taito Corporation", "Power Wheels (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 4695 | 4664 | GAME( 1991, racingb, 0, racingb, dblaxle, taitoz, ROT0, "Taito Corporation Japan", "Racing Beat (World)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 4696 | | |
src/mame/drivers/slapfght.c
| r2956 | r2957 | |
| 183 | 183 | $8609 - $860f High score characters to display to screen for highest score |
| 184 | 184 | |
| 185 | 185 | |
| 186 | **************************************************************************** |
| 187 | |
| 188 | Stephh's notes (based on the games Z80 code and some tests) : |
| 189 | |
| 190 | 0) all games |
| 191 | |
| 192 | - All these games have a specific way of handling inputs : |
| 193 | * when cabinet is set to "Upright", any player can use inputs |
| 194 | from player 1 OR from player 2 |
| 195 | * when cabinet is set to "Cocktail", each player has its own inputs |
| 196 | See Mantis bug ID 01746 attached files with Z80 explanations |
| 197 | |
| 198 | |
| 199 | 1) 'tigerh' and clones |
| 200 | |
| 201 | 1a) 'tigerh' |
| 202 | |
| 203 | - US version |
| 204 | - MCU dumped and emulated |
| 205 | - Game inputs aren't working after heliport 4 (area 35); |
| 206 | I can't tell at the moment if it's an ingame bug or not. |
| 207 | See Mantis bug ID 01785 for more details. |
| 208 | |
| 209 | 1b) 'tigerhj' |
| 210 | |
| 211 | - Japan version |
| 212 | - MCU dumped and emulated |
| 213 | - Game inputs aren't working after heliport 4 (area 35); |
| 214 | I can't tell at the moment if it's an ingame bug or not. |
| 215 | See Mantis bug ID 01785 for more details. |
| 216 | |
| 217 | 1c) 'tigerhb1' |
| 218 | |
| 219 | - Bootleg based on 'tigerhj' |
| 220 | - I can't tell if a specific MCU is required for this game : |
| 221 | * MCU status doesn't seem to be required |
| 222 | (see nop instructions at 0x10da, 0x10db, 0x10e5 and 0x10e6) |
| 223 | * there is patched code at 0x0f9c which is called instead of |
| 224 | standard call to 0x10cc, and there is no call to 0x0f88 |
| 225 | * there are writes to unknown ports 0x0e and 0x0f |
| 226 | * hardware test is still computed at 0x109d but there is |
| 227 | no delay to wait for correct value (0x83) to be returned |
| 228 | (thus the need of specific read/write handlers) |
| 229 | - Game inputs aren't working after heliport 4 (area 35); |
| 230 | I can't tell at the moment if it's an ingame bug or not. |
| 231 | See Mantis bug ID 01785 for more details. |
| 232 | |
| 233 | 1d) 'tigerhb2' |
| 234 | |
| 235 | - Bootleg based on 'tigerhj' |
| 236 | - MCU reads/writes are patched.as well as ROM check |
| 237 | - Game inputs are still working after heliport 4 (area 35); |
| 238 | This is the ONLY set with this behaviour ! |
| 239 | See Mantis bug ID 01785 for more details. |
| 240 | |
| 241 | 1e) 'tigerhb3' |
| 242 | |
| 243 | - Bootleg based on 'tigerhj' |
| 244 | - MCU reads/writes are patched. |
| 245 | - There is extra code at 0x10e2 (where MCU status was checked) |
| 246 | that prevents player to get any extra lives (even by collecting |
| 247 | 10 diamonds) when Dip Switch is set to "20k then every 80k" |
| 248 | (see Mantis bug ID 00652 with Z80 explanations). |
| 249 | - Game inputs aren't working after heliport 4 (area 35); |
| 250 | I can't tell at the moment if it's an ingame bug or not. |
| 251 | See Mantis bug ID 01785 for more details. |
| 252 | |
| 253 | |
| 254 | 2) 'getstar' and clones |
| 255 | |
| 256 | 2a) 'getstar' |
| 257 | |
| 258 | - US version, licenced to Kitkorp - name "Guardian". |
| 259 | - MCU missing and simulated. |
| 260 | - Difficulty determines the number of energy bars you get. |
| 261 | - Each hit removes 1 enegy bar. |
| 262 | - According to the manual, default difficulty shall be set to "Hard". |
| 263 | - You can only get ONE extra life. |
| 264 | - I don't know if it's an ingame bug, but you always have to enter |
| 265 | your initials after a game ends, even if you score less than 10th place. |
| 266 | |
| 267 | 2b) 'getstarj' |
| 268 | |
| 269 | - Japan version - name "Get Star". |
| 270 | - MCU missing and simulated. |
| 271 | - You always get 4 energy bars. |
| 272 | - Difficulty determines how many energy bars you lose when you get hit. |
| 273 | - I don't know what default difficulty shall be, so I set it to "Easy". |
| 274 | - You can get multiple extra lives. |
| 275 | |
| 276 | 2c) 'gtstarb1' |
| 277 | |
| 278 | - Bootleg based on 'getstarj' |
| 279 | - MCU reads/writes are patched, but this hasn't been done in the "test mode". |
| 280 | - The game seems to have its own protection on startup (check code at 0x6d1a). |
| 281 | |
| 282 | 2d) 'gtstarb2' |
| 283 | |
| 284 | - Bootleg based on 'getstarj' |
| 285 | - MCU reads/writes are patched, but this hasn't been done in the "test mode". |
| 286 | - The game seems to have its own protection (check code at 0x0569 and 0x0ac6). |
| 287 | - Patches are coded diffrently than in 'gtstarb1' and code isn't always perfect |
| 288 | (lazy coding ?) which causes LOTS of ingames bugs or strange behaviours : |
| 289 | * patched command 0x20 : NO continue play |
| 290 | * patched command 0x21 : as soon as a player loses all his lives, |
| 291 | the game is over (even if other player still has lives) |
| 292 | * patched command 0x22 : difficulty is ALWAYS set to "Easy" at start |
| 293 | so "Difficulty" Dip Switches have no effect when you are playing |
| 294 | (it still has an effect in the "test mode" though) |
| 295 | * patched command 0x23 : different lives settings |
| 296 | (thus the need of a specific INPUT_PORTS definition for this game) |
| 297 | * patched command 0x25 : right and down directions are swapped |
| 298 | (thus the need of a specific INPUT_PORTS definition for this game) |
| 299 | * patched command 0x2a : player flag (which determines if player 1 or |
| 300 | player 2 is playing) is NOT updated, causing the following things : |
| 301 | . current player score will ALWAYS be dusplayed under player 1 |
| 302 | . when cabinet is set to "Cocktail", player 2 uses player 1 inputs |
| 303 | * patched command 0x38 : laser position does NOT change according to |
| 304 | player position (it ALWATS starts from the middle of the screen) |
| 305 | |
| 186 | 306 | ***************************************************************************/ |
| 187 | 307 | |
| 188 | 308 | #include "driver.h" |
| r2956 | r2957 | |
| 191 | 311 | #include "sound/ay8910.h" |
| 192 | 312 | #include "includes/slapfght.h" |
| 193 | 313 | |
| 314 | int getstar_id; |
| 315 | |
| 316 | |
| 194 | 317 | static ADDRESS_MAP_START( perfrman_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 195 | 318 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 196 | 319 | AM_RANGE(0x8000, 0x87ff) AM_READ(SMH_RAM) |
| r2956 | r2957 | |
| 382 | 505 | AM_RANGE(0xd000, 0xffff) AM_WRITE(SMH_RAM) |
| 383 | 506 | ADDRESS_MAP_END |
| 384 | 507 | |
| 385 | | #define COMMON_START\ |
| 386 | | PORT_START_TAG("IN0")\ |
| 387 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY\ |
| 388 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY\ |
| 389 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY\ |
| 390 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY\ |
| 391 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL\ |
| 392 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL\ |
| 393 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL\ |
| 394 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL\ |
| 395 | | PORT_START_TAG("IN1")\ |
| 396 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )\ |
| 397 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )\ |
| 398 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL\ |
| 399 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL\ |
| 400 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )\ |
| 401 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )\ |
| 402 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )\ |
| 508 | |
| 509 | static INPUT_PORTS_START( slapfght_generic ) |
| 510 | PORT_START_TAG("IN0") |
| 511 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 512 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 513 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 514 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 515 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 516 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 517 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 518 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 519 | |
| 520 | PORT_START_TAG("IN1") |
| 521 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 522 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 523 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 524 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 525 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 526 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 527 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 403 | 528 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 404 | 529 | |
| 405 | | static INPUT_PORTS_START( perfrman ) |
| 406 | | COMMON_START |
| 407 | 530 | PORT_START_TAG("DSW1") |
| 408 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) |
| 409 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 410 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 411 | | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 412 | | /* Actually, the following DIPSW doesnt seem to do anything */ |
| 413 | | PORT_DIPNAME( 0x20, 0x20, "Screen Test" ) PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 414 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 415 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 416 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) |
| 417 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 418 | | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 419 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 420 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 421 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 422 | | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 423 | | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| 424 | | // PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 531 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:8,7,6") |
| 532 | // PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| 533 | PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 425 | 534 | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 426 | 535 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) |
| 427 | 536 | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 428 | 537 | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) |
| 429 | 538 | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 430 | 539 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 540 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5") |
| 541 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 542 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 543 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:4") |
| 544 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 545 | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 546 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:3") |
| 547 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 548 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 549 | PORT_SERVICE_DIPLOC(0x40, IP_ACTIVE_LOW, "SW1:2" ) |
| 550 | PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:1" ) |
| 431 | 551 | |
| 432 | 552 | PORT_START_TAG("DSW2") |
| 433 | | PORT_DIPNAME( 0xf0, 0x70, DEF_STR( Bonus_Life ) ) |
| 434 | | PORT_DIPSETTING( 0xb0, "20k, then each 100k" ) |
| 435 | | PORT_DIPSETTING( 0xa0, "40k, then each 100k" ) |
| 436 | | PORT_DIPSETTING( 0x90, "60k, then each 100k" ) |
| 437 | | PORT_DIPSETTING( 0x70, "20k, then each 200k" ) |
| 438 | | PORT_DIPSETTING( 0x60, "40k, then each 200k" ) |
| 439 | | PORT_DIPSETTING( 0x50, "60k, then each 200k" ) |
| 440 | | PORT_DIPSETTING( 0x30, "20k, then each 300k" ) |
| 441 | | PORT_DIPSETTING( 0x20, "40k, then each 300k" ) |
| 442 | | PORT_DIPSETTING( 0x10, "60k, then each 300k" ) |
| 443 | | PORT_DIPSETTING( 0xf0, "20k" ) |
| 444 | | PORT_DIPSETTING( 0xe0, "40k" ) |
| 445 | | PORT_DIPSETTING( 0xd0, "60k" ) |
| 446 | | PORT_DIPSETTING( 0xc0, DEF_STR( None ) ) |
| 447 | | PORT_DIPNAME( 0x0c, 0x0c, "Game Level" ) |
| 448 | | PORT_DIPSETTING( 0x0c, "0" ) |
| 449 | | PORT_DIPSETTING( 0x08, "1" ) |
| 450 | | PORT_DIPSETTING( 0x04, "2" ) |
| 451 | | PORT_DIPSETTING( 0x00, "3" ) |
| 452 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) |
| 553 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:8,7") |
| 453 | 554 | PORT_DIPSETTING( 0x01, "1" ) |
| 454 | 555 | PORT_DIPSETTING( 0x00, "2" ) |
| 455 | 556 | PORT_DIPSETTING( 0x03, "3" ) |
| 456 | 557 | PORT_DIPSETTING( 0x02, "5" ) |
| 558 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,5") |
| 559 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) |
| 560 | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) |
| 561 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 562 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 563 | /* Filled by "Bonus Lives" settings */ |
| 564 | PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW2:4" ) |
| 565 | PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:3" ) |
| 566 | PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:2" ) |
| 567 | PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:1" ) |
| 457 | 568 | INPUT_PORTS_END |
| 458 | 569 | |
| 459 | | static INPUT_PORTS_START( tigerh ) |
| 460 | | COMMON_START |
| 461 | | PORT_START_TAG("DSW1") |
| 462 | | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 463 | | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| 464 | | // PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 465 | | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 466 | | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) |
| 467 | | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 468 | | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) |
| 469 | | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 470 | | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 471 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 472 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 473 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 474 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) |
| 475 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 476 | | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 477 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 570 | |
| 571 | static INPUT_PORTS_START( perfrman ) |
| 572 | PORT_INCLUDE(slapfght_generic) |
| 573 | |
| 574 | PORT_MODIFY("DSW1") |
| 575 | PORT_DIPNAME( 0x20, 0x20, "Intermissions" ) PORT_DIPLOCATION("SW1:3") /* "Screen Test" in the "test mode" */ |
| 478 | 576 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 479 | 577 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 480 | | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 481 | | PORT_DIPNAME( 0x80, 0x80, "Player Speed" ) |
| 578 | |
| 579 | PORT_MODIFY("DSW2") |
| 580 | PORT_DIPNAME( 0xf0, 0x70, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4,3,2,1") |
| 581 | PORT_DIPSETTING( 0xb0, "20k, 120k, then every 100k" ) |
| 582 | PORT_DIPSETTING( 0xa0, "40k, 120k, then every 100k" ) |
| 583 | PORT_DIPSETTING( 0x90, "60k, 160k, then every 100k" ) |
| 584 | PORT_DIPSETTING( 0x80, "Every 100k" ) |
| 585 | PORT_DIPSETTING( 0x70, "20k, 220k, then every 200k" ) |
| 586 | PORT_DIPSETTING( 0x60, "40k, 240k, then every 200k" ) |
| 587 | PORT_DIPSETTING( 0x50, "60k, 260k, then every 200k" ) |
| 588 | PORT_DIPSETTING( 0x40, "Every 200k" ) |
| 589 | PORT_DIPSETTING( 0x30, "20k, 320k, then every 300k" ) |
| 590 | PORT_DIPSETTING( 0x20, "40k, 340k, then every 300k" ) |
| 591 | PORT_DIPSETTING( 0x10, "60k, 360k, then every 300k" ) |
| 592 | PORT_DIPSETTING( 0x00, "Every 300k" ) |
| 593 | PORT_DIPSETTING( 0xf0, "20k only" ) |
| 594 | PORT_DIPSETTING( 0xe0, "40k only" ) |
| 595 | PORT_DIPSETTING( 0xd0, "60k only" ) |
| 596 | PORT_DIPSETTING( 0xc0, DEF_STR( None ) ) |
| 597 | INPUT_PORTS_END |
| 598 | |
| 599 | |
| 600 | static INPUT_PORTS_START( tigerh ) |
| 601 | PORT_INCLUDE(slapfght_generic) |
| 602 | |
| 603 | PORT_MODIFY("DSW1") |
| 604 | PORT_DIPNAME( 0x80, 0x80, "Player Speed" ) PORT_DIPLOCATION("SW1:1") |
| 482 | 605 | PORT_DIPSETTING( 0x80, DEF_STR( Normal ) ) |
| 483 | 606 | PORT_DIPSETTING( 0x00, "Fast" ) |
| 484 | 607 | |
| 485 | | PORT_START_TAG("DSW2") |
| 486 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) |
| 608 | PORT_MODIFY("DSW2") |
| 609 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:8,7") |
| 487 | 610 | PORT_DIPSETTING( 0x01, "1" ) |
| 488 | 611 | PORT_DIPSETTING( 0x00, "2" ) |
| 489 | 612 | PORT_DIPSETTING( 0x03, "3" ) |
| 490 | 613 | PORT_DIPSETTING( 0x02, "5" ) |
| 491 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) |
| 614 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:6,5") |
| 492 | 615 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) |
| 493 | 616 | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) |
| 494 | 617 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 495 | 618 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 496 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) |
| 497 | | PORT_DIPSETTING( 0x10, "20000 80000" ) |
| 498 | | PORT_DIPSETTING( 0x00, "50000 120000" ) |
| 499 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 500 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 501 | | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 502 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 503 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 504 | | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 505 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 506 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 507 | | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 619 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") |
| 620 | PORT_DIPSETTING( 0x10, "20k, 100k, then every 80k" ) // see notes for 'tigerhb3' |
| 621 | PORT_DIPSETTING( 0x00, "50k, 170k, then every 120k" ) |
| 622 | PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:3" ) |
| 623 | PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:2" ) |
| 624 | PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:1" ) |
| 508 | 625 | INPUT_PORTS_END |
| 509 | 626 | |
| 627 | |
| 510 | 628 | static INPUT_PORTS_START( slapfigh ) |
| 511 | | COMMON_START |
| 512 | | PORT_START_TAG("DSW1") |
| 629 | PORT_INCLUDE(slapfght_generic) |
| 630 | |
| 631 | PORT_MODIFY("DSW1") |
| 513 | 632 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) |
| 514 | 633 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) |
| 515 | 634 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) |
| r2956 | r2957 | |
| 533 | 652 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 534 | 653 | PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) ) |
| 535 | 654 | |
| 536 | | PORT_START_TAG("DSW2") |
| 655 | PORT_MODIFY("DSW2") |
| 537 | 656 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 538 | 657 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 539 | 658 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 557 | 676 | |
| 558 | 677 | |
| 559 | 678 | static INPUT_PORTS_START( getstar ) |
| 560 | | PORT_START_TAG("IN0") |
| 561 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 562 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 563 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 564 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 565 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 566 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 567 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 568 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 569 | | PORT_START_TAG("IN1") |
| 570 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 571 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 572 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 573 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 574 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 575 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 576 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 577 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 679 | PORT_INCLUDE(slapfght_generic) |
| 578 | 680 | |
| 579 | | PORT_START_TAG("DSW1") |
| 580 | | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 581 | | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| 582 | | // PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 583 | | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 584 | | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) |
| 585 | | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 586 | | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) |
| 587 | | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 588 | | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 589 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 590 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 591 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 592 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) |
| 593 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 594 | | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 595 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 596 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 597 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 598 | | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 599 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 600 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 601 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 681 | PORT_MODIFY("DSW2") |
| 682 | /* harder default difficulty (confirmed by manual) */ |
| 683 | PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,5") |
| 684 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) |
| 685 | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) |
| 686 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 687 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 688 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4,3") |
| 689 | PORT_DIPSETTING( 0x30, "50k only" ) |
| 690 | PORT_DIPSETTING( 0x20, "100k only" ) |
| 691 | PORT_DIPSETTING( 0x10, "150k only" ) |
| 692 | PORT_DIPSETTING( 0x00, "200k only" ) |
| 693 | INPUT_PORTS_END |
| 602 | 694 | |
| 603 | | PORT_START_TAG("DSW2") |
| 604 | | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) |
| 605 | | PORT_DIPSETTING( 0x02, "3" ) |
| 606 | | PORT_DIPSETTING( 0x01, "4" ) |
| 607 | | PORT_DIPSETTING( 0x00, "5" ) |
| 608 | | PORT_DIPSETTING( 0x03, "240 (Cheat)") |
| 609 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) |
| 695 | static INPUT_PORTS_START( getstarj ) |
| 696 | PORT_INCLUDE(getstar) |
| 697 | |
| 698 | /* easier default difficulty (to be confirmed) and different bonus lives settings */ |
| 699 | PORT_MODIFY("DSW2") |
| 700 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,5") |
| 610 | 701 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) |
| 611 | 702 | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) |
| 612 | 703 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 613 | 704 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 614 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) |
| 615 | | PORT_DIPSETTING( 0x10, "30000 100000" ) |
| 616 | | PORT_DIPSETTING( 0x00, "50000 150000" ) |
| 617 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 618 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 619 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 620 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 621 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 622 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 623 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 624 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 625 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 705 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:4") |
| 706 | PORT_DIPSETTING( 0x10, "30k, 130k, then every 100k" ) |
| 707 | PORT_DIPSETTING( 0x00, "50k, 200k, then every 150k" ) |
| 708 | PORT_DIPUNUSED_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW2:3" ) |
| 626 | 709 | INPUT_PORTS_END |
| 627 | 710 | |
| 628 | | static INPUT_PORTS_START( gtstarba ) |
| 629 | | PORT_START_TAG("IN0") |
| 630 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 631 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 632 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 633 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 634 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 635 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 636 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 637 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 638 | | PORT_START_TAG("IN1") |
| 639 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 640 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 641 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 642 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 643 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 644 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 645 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 646 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 711 | static INPUT_PORTS_START( gtstarb2 ) |
| 712 | PORT_INCLUDE(getstarj) |
| 647 | 713 | |
| 648 | | PORT_START_TAG("DSW1") |
| 649 | | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 650 | | PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) |
| 651 | | // PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) |
| 652 | | PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) ) |
| 653 | | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) |
| 654 | | PORT_DIPSETTING( 0x03, DEF_STR( 2C_3C ) ) |
| 655 | | PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) |
| 656 | | PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) |
| 657 | | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 658 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 659 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 660 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 661 | | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) |
| 662 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 663 | | PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) |
| 664 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) |
| 665 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 666 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 667 | | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 668 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 669 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 670 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 714 | /* RIGHT and DOWN are swapped due to code at 0x0551 */ |
| 715 | PORT_MODIFY("IN0") |
| 716 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 717 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 718 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 719 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 671 | 720 | |
| 672 | | PORT_START_TAG("DSW2") |
| 673 | | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) |
| 721 | /* different lives settings due to code at 0x0e36 */ |
| 722 | PORT_MODIFY("DSW2") |
| 723 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:8,7") |
| 674 | 724 | PORT_DIPSETTING( 0x02, "3" ) |
| 675 | 725 | PORT_DIPSETTING( 0x01, "4" ) |
| 676 | 726 | PORT_DIPSETTING( 0x00, "5" ) |
| 677 | 727 | PORT_DIPSETTING( 0x03, "240 (Cheat)") |
| 678 | | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) |
| 679 | | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) |
| 680 | | PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) |
| 681 | | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 682 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 683 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) ) |
| 684 | | PORT_DIPSETTING( 0x10, "30000 100000" ) |
| 685 | | PORT_DIPSETTING( 0x00, "50000 150000" ) |
| 686 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 687 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 688 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 689 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 690 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 691 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 692 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 693 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 694 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 728 | /* difficulty settings have no effect due to code at 0x0e7c */ |
| 729 | /* I don't mark the Dips as "unused" because they are still read in the "test mode" */ |
| 695 | 730 | INPUT_PORTS_END |
| 696 | 731 | |
| 697 | 732 | |
| r2956 | r2957 | |
| 935 | 970 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 936 | 971 | MACHINE_DRIVER_END |
| 937 | 972 | |
| 973 | |
| 938 | 974 | static MACHINE_DRIVER_START( slapfigh ) |
| 939 | 975 | |
| 940 | 976 | /* basic machine hardware */ |
| r2956 | r2957 | |
| 981 | 1017 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 982 | 1018 | MACHINE_DRIVER_END |
| 983 | 1019 | |
| 984 | | |
| 985 | 1020 | /* identical to slapfigh_ but writemem has different scroll registers */ |
| 986 | 1021 | static MACHINE_DRIVER_START( slapbtuk ) |
| 987 | 1022 | |
| r2956 | r2957 | |
| 1087 | 1122 | ROM_LOAD( "pal16r4a.2e", 0x0000, 0x0104, NO_DUMP ) /* PAL is read protected */ |
| 1088 | 1123 | ROM_END |
| 1089 | 1124 | |
| 1090 | | ROM_START( tigerh2 ) |
| 1125 | ROM_START( tigerhj ) |
| 1091 | 1126 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1092 | | ROM_LOAD( "b0.5", 0x00000, 0x4000, CRC(6ae7e13c) SHA1(47ef34635f8648e883a850293d92a46e95976a50) ) |
| 1127 | ROM_LOAD( "a47_00.bin", 0x00000, 0x4000, CRC(cbdbe3cc) SHA1(5badf76cdf4a7f0ae9e85ee602420ba5c128efef) ) |
| 1093 | 1128 | ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, CRC(65df2152) SHA1(8e1516905a4af379cb0d0b9d42ff1cc3179c3589) ) |
| 1094 | 1129 | ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, CRC(633d324b) SHA1(70a17d17ebe003bfb2246e92e925a343a92553e5) ) |
| 1095 | 1130 | |
| r2956 | r2957 | |
| 1097 | 1132 | ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, CRC(d105260f) SHA1(f6a0e393e29354bb37fb723828f3267d030a45ea) ) |
| 1098 | 1133 | |
| 1099 | 1134 | ROM_REGION( 0x0800, REGION_CPU3, 0 ) |
| 1100 | | /* is this the right mcu for this set? the mcu handling code in the roms seems patched and it doesn't |
| 1101 | | work correctly */ |
| 1102 | 1135 | ROM_LOAD( "a47_14.6a", 0x0000, 0x0800, CRC(4042489f) SHA1(b977e0821b6b1aa5a0a0f349cd78150af1a231df) ) |
| 1103 | 1136 | |
| 1104 | 1137 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) |
| r2956 | r2957 | |
| 1123 | 1156 | ROM_LOAD( "82s129.12n", 0x0200, 0x0100, CRC(25f273f2) SHA1(2c696745f42fa09b64295a39536aeba08ab58d67) ) |
| 1124 | 1157 | ROM_END |
| 1125 | 1158 | |
| 1126 | | ROM_START( tigerhj ) |
| 1159 | ROM_START( tigerhb1 ) |
| 1127 | 1160 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1128 | | ROM_LOAD( "a47_00.bin", 0x00000, 0x4000, CRC(cbdbe3cc) SHA1(5badf76cdf4a7f0ae9e85ee602420ba5c128efef) ) |
| 1161 | ROM_LOAD( "b0.5", 0x00000, 0x4000, CRC(6ae7e13c) SHA1(47ef34635f8648e883a850293d92a46e95976a50) ) |
| 1129 | 1162 | ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, CRC(65df2152) SHA1(8e1516905a4af379cb0d0b9d42ff1cc3179c3589) ) |
| 1130 | 1163 | ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, CRC(633d324b) SHA1(70a17d17ebe003bfb2246e92e925a343a92553e5) ) |
| 1131 | 1164 | |
| 1132 | 1165 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1133 | 1166 | ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, CRC(d105260f) SHA1(f6a0e393e29354bb37fb723828f3267d030a45ea) ) |
| 1134 | 1167 | |
| 1135 | | ROM_REGION( 0x0800, REGION_CPU3, 0 ) |
| 1136 | | ROM_LOAD( "a47_14.6a", 0x0000, 0x0800, CRC(4042489f) SHA1(b977e0821b6b1aa5a0a0f349cd78150af1a231df) ) |
| 1168 | ROM_REGION( 0x0800, REGION_CPU3, ROMREGION_ERASEFF ) // probably doesn't have an MCU |
| 1169 | /* is this the right mcu for this set? the mcu handling code in the roms seems patched and it doesn't work correctly */ |
| 1170 | // ROM_LOAD( "a47_14.6a", 0x0000, 0x0800, CRC(4042489f) SHA1(b977e0821b6b1aa5a0a0f349cd78150af1a231df) ) |
| 1137 | 1171 | |
| 1138 | 1172 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1139 | 1173 | ROM_LOAD( "a47_05.bin", 0x00000, 0x2000, CRC(c5325b49) SHA1(6df9051e7545dcac4995340f80957510457aaf64) ) /* Chars */ |
| r2956 | r2957 | |
| 1157 | 1191 | ROM_LOAD( "82s129.12n", 0x0200, 0x0100, CRC(25f273f2) SHA1(2c696745f42fa09b64295a39536aeba08ab58d67) ) |
| 1158 | 1192 | ROM_END |
| 1159 | 1193 | |
| 1160 | | ROM_START( tigerhb1 ) |
| 1194 | ROM_START( tigerhb2 ) |
| 1161 | 1195 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1162 | | ROM_LOAD( "14", 0x00000, 0x4000, CRC(ca59dd73) SHA1(c07961fcc209ec10ace3830d79c8ccc1cfda9765) ) |
| 1163 | | ROM_LOAD( "13", 0x04000, 0x4000, CRC(38bd54db) SHA1(75e999f606c410d7481bc4d29c4b523d45847649) ) |
| 1164 | | ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, CRC(633d324b) SHA1(70a17d17ebe003bfb2246e92e925a343a92553e5) ) |
| 1196 | ROM_LOAD( "rom00_09.bin", 0x00000, 0x4000, CRC(ef738c68) SHA1(c78c802d885b7f7c5e312ec079d52b8817590735) ) |
| 1197 | ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, CRC(65df2152) SHA1(8e1516905a4af379cb0d0b9d42ff1cc3179c3589) ) |
| 1198 | ROM_LOAD( "rom02_07.bin", 0x08000, 0x4000, CRC(36e250b9) SHA1(79bd86bde81981e4d0dbee420bc0a10c80b5241e) ) |
| 1165 | 1199 | |
| 1166 | 1200 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1167 | 1201 | ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, CRC(d105260f) SHA1(f6a0e393e29354bb37fb723828f3267d030a45ea) ) |
| r2956 | r2957 | |
| 1188 | 1222 | ROM_LOAD( "82s129.12n", 0x0200, 0x0100, CRC(25f273f2) SHA1(2c696745f42fa09b64295a39536aeba08ab58d67) ) |
| 1189 | 1223 | ROM_END |
| 1190 | 1224 | |
| 1191 | | ROM_START( tigerhb2 ) |
| 1225 | ROM_START( tigerhb3 ) |
| 1192 | 1226 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1193 | | ROM_LOAD( "rom00_09.bin", 0x00000, 0x4000, CRC(ef738c68) SHA1(c78c802d885b7f7c5e312ec079d52b8817590735) ) |
| 1194 | | ROM_LOAD( "a47_01.bin", 0x04000, 0x4000, CRC(65df2152) SHA1(8e1516905a4af379cb0d0b9d42ff1cc3179c3589) ) |
| 1195 | | ROM_LOAD( "rom02_07.bin", 0x08000, 0x4000, CRC(36e250b9) SHA1(79bd86bde81981e4d0dbee420bc0a10c80b5241e) ) |
| 1227 | ROM_LOAD( "14", 0x00000, 0x4000, CRC(ca59dd73) SHA1(c07961fcc209ec10ace3830d79c8ccc1cfda9765) ) |
| 1228 | ROM_LOAD( "13", 0x04000, 0x4000, CRC(38bd54db) SHA1(75e999f606c410d7481bc4d29c4b523d45847649) ) |
| 1229 | ROM_LOAD( "a47_02.bin", 0x08000, 0x4000, CRC(633d324b) SHA1(70a17d17ebe003bfb2246e92e925a343a92553e5) ) |
| 1196 | 1230 | |
| 1197 | 1231 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1198 | 1232 | ROM_LOAD( "a47_03.bin", 0x0000, 0x2000, CRC(d105260f) SHA1(f6a0e393e29354bb37fb723828f3267d030a45ea) ) |
| r2956 | r2957 | |
| 1255 | 1289 | /* dump labeled Alcon, but GFX in tile roms clearly read Slap Fight */ |
| 1256 | 1290 | ROM_START( slapfiga ) |
| 1257 | 1291 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1258 | | ROM_LOAD( "a76-00.bin", 0x00000, 0x4000, CRC(ac22bb86) SHA1(3ecff006fc487d494f21adb7bff6f8c56eb5d707) ) |
| 1259 | | ROM_LOAD( "a76-01.bin", 0x04000, 0x4000, CRC(d6b4f02e) SHA1(37f840c444ba7dcc75810580c9da83289670d5cc) ) |
| 1260 | | ROM_LOAD( "a76-02.bin", 0x10000, 0x8000, CRC(9dd0971f) SHA1(92bd0b54635bf5c4118a53e0f897c65f5eb2984a) ) /* banked at 8000 */ |
| 1292 | ROM_LOAD( "a76-00.bin", 0x00000, 0x4000, CRC(ac22bb86) SHA1(3ecff006fc487d494f21adb7bff6f8c56eb5d707) ) |
| 1293 | ROM_LOAD( "a76-01.bin", 0x04000, 0x4000, CRC(d6b4f02e) SHA1(37f840c444ba7dcc75810580c9da83289670d5cc) ) |
| 1294 | ROM_LOAD( "a76-02.bin", 0x10000, 0x8000, CRC(9dd0971f) SHA1(92bd0b54635bf5c4118a53e0f897c65f5eb2984a) ) /* banked at 8000 */ |
| 1261 | 1295 | |
| 1262 | 1296 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1263 | 1297 | ROM_LOAD( "a76-03.bin", 0x0000, 0x2000, CRC(87f4705a) SHA1(a90d5644ce268f3321047a4f96df96ac294d2f1b) ) |
| r2956 | r2957 | |
| 1287 | 1321 | ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) |
| 1288 | 1322 | ROM_END |
| 1289 | 1323 | |
| 1290 | | ROM_START( slapbtjp ) |
| 1324 | ROM_START( alcon ) |
| 1291 | 1325 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1292 | | ROM_LOAD( "sf_r19jb.bin", 0x00000, 0x8000, CRC(9a7ac8b3) SHA1(01fbad9b4fc80f2406eff18db20e196e212d0c17) ) |
| 1293 | | ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, CRC(3c42e4a7) SHA1(8e4da1e6e73603e484ba4f5609ac9ea92999a526) ) /* banked at 8000 */ |
| 1326 | ROM_LOAD( "00", 0x00000, 0x8000, CRC(2ba82d60) SHA1(b37659aa18a3f96a3cc7fa93db2439f36487b8c8) ) |
| 1327 | ROM_LOAD( "01", 0x10000, 0x8000, CRC(18bb2f12) SHA1(7c16d4bbb8b5e22f227aff170e5e6326c5968968) ) /* banked at 8000 */ |
| 1294 | 1328 | |
| 1295 | 1329 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1296 | 1330 | ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, CRC(87f4705a) SHA1(a90d5644ce268f3321047a4f96df96ac294d2f1b) ) |
| 1297 | 1331 | |
| 1332 | ROM_REGION( 0x0800, REGION_CPU3, 0 ) /* 2k for the microcontroller */ |
| 1333 | ROM_LOAD( "68705.bin", 0x0000, 0x0800, NO_DUMP ) |
| 1334 | |
| 1298 | 1335 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1299 | | ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, CRC(2ac7b943) SHA1(d0c3560bb1f0c2647aeff807cb4b09450237b955) ) /* Chars */ |
| 1300 | | ROM_LOAD( "sf_r10.bin", 0x02000, 0x2000, CRC(33cadc93) SHA1(59ffc206c62a651d2ac0ef52f519dd56edf2c021) ) |
| 1336 | ROM_LOAD( "04", 0x00000, 0x2000, CRC(31003483) SHA1(7014ceb6313ac5a3d2dcb735643dfd8bfabaa185) ) /* Chars */ |
| 1337 | ROM_LOAD( "03", 0x02000, 0x2000, CRC(404152c0) SHA1(d05bc9baa1f336475fffc2f19f1018e9f0547f10) ) |
| 1301 | 1338 | |
| 1302 | 1339 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 1303 | 1340 | ROM_LOAD( "sf_r06.bin", 0x00000, 0x8000, CRC(b6358305) SHA1(c7bb4236a75ec6b88f011bc30f8fb9a718e2ca3e) ) /* Tiles */ |
| r2956 | r2957 | |
| 1317 | 1354 | ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) |
| 1318 | 1355 | ROM_END |
| 1319 | 1356 | |
| 1320 | | ROM_START( slapbtuk ) |
| 1357 | ROM_START( slapbtjp ) |
| 1321 | 1358 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1322 | | ROM_LOAD( "sf_r19eb.bin", 0x00000, 0x4000, CRC(2efe47af) SHA1(69ce3e83a0d8fa5ee4737c741d31cf32db6b9919) ) |
| 1323 | | ROM_LOAD( "sf_r20eb.bin", 0x04000, 0x4000, CRC(f42c7951) SHA1(d76e7a72f6ced67b550ba68cd42987f7111f5468) ) |
| 1359 | ROM_LOAD( "sf_r19jb.bin", 0x00000, 0x8000, CRC(9a7ac8b3) SHA1(01fbad9b4fc80f2406eff18db20e196e212d0c17) ) |
| 1324 | 1360 | ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, CRC(3c42e4a7) SHA1(8e4da1e6e73603e484ba4f5609ac9ea92999a526) ) /* banked at 8000 */ |
| 1325 | 1361 | |
| 1326 | 1362 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| r2956 | r2957 | |
| 1348 | 1384 | ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) |
| 1349 | 1385 | ROM_END |
| 1350 | 1386 | |
| 1351 | | /* very similar to slapbtuk, is slapbtuk missing the logo rom? */ |
| 1352 | | ROM_START( slapfgtr ) |
| 1387 | ROM_START( slapbtuk ) |
| 1353 | 1388 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1354 | | ROM_LOAD( "k1-10.u90", 0x00000, 0x4000, CRC(2efe47af) SHA1(69ce3e83a0d8fa5ee4737c741d31cf32db6b9919) ) |
| 1355 | | ROM_LOAD( "k1-09.u89", 0x04000, 0x4000, CRC(17c187c5) SHA1(6e1fd651f56036d1c6c830de8479df25fc182c10) ) |
| 1356 | | ROM_LOAD( "k1-08.u88", 0x0e000, 0x2000, CRC(945af97f) SHA1(4d901be477b6101338eb1d86497e1bdc57f9c1b4) ) // contains another copy of the logo tilemap read at ec00! |
| 1357 | | ROM_LOAD( "k1-07.u87", 0x10000, 0x8000, CRC(3c42e4a7) SHA1(8e4da1e6e73603e484ba4f5609ac9ea92999a526) ) /* banked at 8000 */ |
| 1389 | ROM_LOAD( "sf_r19eb.bin", 0x00000, 0x4000, CRC(2efe47af) SHA1(69ce3e83a0d8fa5ee4737c741d31cf32db6b9919) ) |
| 1390 | ROM_LOAD( "sf_r20eb.bin", 0x04000, 0x4000, CRC(f42c7951) SHA1(d76e7a72f6ced67b550ba68cd42987f7111f5468) ) |
| 1391 | ROM_LOAD( "sf_rh.bin", 0x10000, 0x8000, CRC(3c42e4a7) SHA1(8e4da1e6e73603e484ba4f5609ac9ea92999a526) ) /* banked at 8000 */ |
| 1358 | 1392 | |
| 1359 | 1393 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1360 | | ROM_LOAD( "k1-11.u89", 0x0000, 0x2000, CRC(87f4705a) SHA1(a90d5644ce268f3321047a4f96df96ac294d2f1b) ) |
| 1394 | ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, CRC(87f4705a) SHA1(a90d5644ce268f3321047a4f96df96ac294d2f1b) ) |
| 1361 | 1395 | |
| 1362 | 1396 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1363 | | ROM_LOAD( "k1-02.u57", 0x00000, 0x2000, CRC(2ac7b943) SHA1(d0c3560bb1f0c2647aeff807cb4b09450237b955) ) /* Chars */ |
| 1364 | | ROM_LOAD( "k1-03.u58", 0x02000, 0x2000, CRC(33cadc93) SHA1(59ffc206c62a651d2ac0ef52f519dd56edf2c021) ) |
| 1397 | ROM_LOAD( "sf_r11.bin", 0x00000, 0x2000, CRC(2ac7b943) SHA1(d0c3560bb1f0c2647aeff807cb4b09450237b955) ) /* Chars */ |
| 1398 | ROM_LOAD( "sf_r10.bin", 0x02000, 0x2000, CRC(33cadc93) SHA1(59ffc206c62a651d2ac0ef52f519dd56edf2c021) ) |
| 1365 | 1399 | |
| 1366 | 1400 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 1367 | | ROM_LOAD( "k1-01.u49", 0x00000, 0x8000, CRC(b6358305) SHA1(c7bb4236a75ec6b88f011bc30f8fb9a718e2ca3e) ) /* Tiles */ |
| 1368 | | ROM_LOAD( "k1-04.u62", 0x08000, 0x8000, CRC(e92d9d60) SHA1(2554617e0e6615ca8c85a49299a4a0e762478339) ) |
| 1369 | | ROM_LOAD( "k1-05.u63", 0x10000, 0x8000, CRC(5faeeea3) SHA1(696fba24bcf1f3a7e914a4403854da5eededaf7f) ) |
| 1370 | | ROM_LOAD( "k1-06.u64", 0x18000, 0x8000, CRC(974e2ea9) SHA1(3840550fc3a833828dad8f3e300d2ea583d69ce7) ) |
| 1401 | ROM_LOAD( "sf_r06.bin", 0x00000, 0x8000, CRC(b6358305) SHA1(c7bb4236a75ec6b88f011bc30f8fb9a718e2ca3e) ) /* Tiles */ |
| 1402 | ROM_LOAD( "sf_r09.bin", 0x08000, 0x8000, CRC(e92d9d60) SHA1(2554617e0e6615ca8c85a49299a4a0e762478339) ) |
| 1403 | ROM_LOAD( "sf_r08.bin", 0x10000, 0x8000, CRC(5faeeea3) SHA1(696fba24bcf1f3a7e914a4403854da5eededaf7f) ) |
| 1404 | ROM_LOAD( "sf_r07.bin", 0x18000, 0x8000, CRC(974e2ea9) SHA1(3840550fc3a833828dad8f3e300d2ea583d69ce7) ) |
| 1371 | 1405 | |
| 1372 | 1406 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE ) |
| 1373 | | ROM_LOAD( "k1-15.u60", 0x00000, 0x8000, CRC(8545d397) SHA1(9a1fd5bfd8fb830b8e46643c08eef32ba968fc23) ) /* Sprites */ |
| 1374 | | ROM_LOAD( "k1-13.u50", 0x08000, 0x8000, CRC(b1b7b925) SHA1(199b0b52bbeb384211171eca5c50a1c0ebf6826f) ) |
| 1375 | | ROM_LOAD( "k1-14.u59", 0x10000, 0x8000, CRC(422d946b) SHA1(c251ef9597a11ec8de39be4fcbddaba84e649ef2) ) |
| 1376 | | ROM_LOAD( "k1-12.u49", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) |
| 1407 | ROM_LOAD( "sf_r03.bin", 0x00000, 0x8000, CRC(8545d397) SHA1(9a1fd5bfd8fb830b8e46643c08eef32ba968fc23) ) /* Sprites */ |
| 1408 | ROM_LOAD( "sf_r01.bin", 0x08000, 0x8000, CRC(b1b7b925) SHA1(199b0b52bbeb384211171eca5c50a1c0ebf6826f) ) |
| 1409 | ROM_LOAD( "sf_r04.bin", 0x10000, 0x8000, CRC(422d946b) SHA1(c251ef9597a11ec8de39be4fcbddaba84e649ef2) ) |
| 1410 | ROM_LOAD( "sf_r02.bin", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) |
| 1377 | 1411 | |
| 1378 | 1412 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) |
| 1379 | 1413 | ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, CRC(a0efaf99) SHA1(5df01663480acad1f89abab8662d437617a66d1c) ) |
| r2956 | r2957 | |
| 1381 | 1415 | ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) |
| 1382 | 1416 | ROM_END |
| 1383 | 1417 | |
| 1384 | | ROM_START( alcon ) |
| 1418 | /* very similar to slapbtuk, is slapbtuk missing the logo rom? */ |
| 1419 | ROM_START( slapfgtr ) |
| 1385 | 1420 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1386 | | ROM_LOAD( "00", 0x00000, 0x8000, CRC(2ba82d60) SHA1(b37659aa18a3f96a3cc7fa93db2439f36487b8c8) ) |
| 1387 | | ROM_LOAD( "01", 0x10000, 0x8000, CRC(18bb2f12) SHA1(7c16d4bbb8b5e22f227aff170e5e6326c5968968) ) /* banked at 8000 */ |
| 1421 | ROM_LOAD( "k1-10.u90", 0x00000, 0x4000, CRC(2efe47af) SHA1(69ce3e83a0d8fa5ee4737c741d31cf32db6b9919) ) |
| 1422 | ROM_LOAD( "k1-09.u89", 0x04000, 0x4000, CRC(17c187c5) SHA1(6e1fd651f56036d1c6c830de8479df25fc182c10) ) |
| 1423 | ROM_LOAD( "k1-08.u88", 0x0e000, 0x2000, CRC(945af97f) SHA1(4d901be477b6101338eb1d86497e1bdc57f9c1b4) ) // contains another copy of the logo tilemap read at ec00! |
| 1424 | ROM_LOAD( "k1-07.u87", 0x10000, 0x8000, CRC(3c42e4a7) SHA1(8e4da1e6e73603e484ba4f5609ac9ea92999a526) ) /* banked at 8000 */ |
| 1388 | 1425 | |
| 1389 | 1426 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1390 | | ROM_LOAD( "sf_r05.bin", 0x0000, 0x2000, CRC(87f4705a) SHA1(a90d5644ce268f3321047a4f96df96ac294d2f1b) ) |
| 1427 | ROM_LOAD( "k1-11.u89", 0x0000, 0x2000, CRC(87f4705a) SHA1(a90d5644ce268f3321047a4f96df96ac294d2f1b) ) |
| 1391 | 1428 | |
| 1392 | | ROM_REGION( 0x0800, REGION_CPU3, 0 ) /* 2k for the microcontroller */ |
| 1393 | | ROM_LOAD( "68705.bin", 0x0000, 0x0800, NO_DUMP ) |
| 1394 | | |
| 1395 | 1429 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1396 | | ROM_LOAD( "04", 0x00000, 0x2000, CRC(31003483) SHA1(7014ceb6313ac5a3d2dcb735643dfd8bfabaa185) ) /* Chars */ |
| 1397 | | ROM_LOAD( "03", 0x02000, 0x2000, CRC(404152c0) SHA1(d05bc9baa1f336475fffc2f19f1018e9f0547f10) ) |
| 1430 | ROM_LOAD( "k1-02.u57", 0x00000, 0x2000, CRC(2ac7b943) SHA1(d0c3560bb1f0c2647aeff807cb4b09450237b955) ) /* Chars */ |
| 1431 | ROM_LOAD( "k1-03.u58", 0x02000, 0x2000, CRC(33cadc93) SHA1(59ffc206c62a651d2ac0ef52f519dd56edf2c021) ) |
| 1398 | 1432 | |
| 1399 | 1433 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 1400 | | ROM_LOAD( "sf_r06.bin", 0x00000, 0x8000, CRC(b6358305) SHA1(c7bb4236a75ec6b88f011bc30f8fb9a718e2ca3e) ) /* Tiles */ |
| 1401 | | ROM_LOAD( "sf_r09.bin", 0x08000, 0x8000, CRC(e92d9d60) SHA1(2554617e0e6615ca8c85a49299a4a0e762478339) ) |
| 1402 | | ROM_LOAD( "sf_r08.bin", 0x10000, 0x8000, CRC(5faeeea3) SHA1(696fba24bcf1f3a7e914a4403854da5eededaf7f) ) |
| 1403 | | ROM_LOAD( "sf_r07.bin", 0x18000, 0x8000, CRC(974e2ea9) SHA1(3840550fc3a833828dad8f3e300d2ea583d69ce7) ) |
| 1434 | ROM_LOAD( "k1-01.u49", 0x00000, 0x8000, CRC(b6358305) SHA1(c7bb4236a75ec6b88f011bc30f8fb9a718e2ca3e) ) /* Tiles */ |
| 1435 | ROM_LOAD( "k1-04.u62", 0x08000, 0x8000, CRC(e92d9d60) SHA1(2554617e0e6615ca8c85a49299a4a0e762478339) ) |
| 1436 | ROM_LOAD( "k1-05.u63", 0x10000, 0x8000, CRC(5faeeea3) SHA1(696fba24bcf1f3a7e914a4403854da5eededaf7f) ) |
| 1437 | ROM_LOAD( "k1-06.u64", 0x18000, 0x8000, CRC(974e2ea9) SHA1(3840550fc3a833828dad8f3e300d2ea583d69ce7) ) |
| 1404 | 1438 | |
| 1405 | 1439 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE ) |
| 1406 | | ROM_LOAD( "sf_r03.bin", 0x00000, 0x8000, CRC(8545d397) SHA1(9a1fd5bfd8fb830b8e46643c08eef32ba968fc23) ) /* Sprites */ |
| 1407 | | ROM_LOAD( "sf_r01.bin", 0x08000, 0x8000, CRC(b1b7b925) SHA1(199b0b52bbeb384211171eca5c50a1c0ebf6826f) ) |
| 1408 | | ROM_LOAD( "sf_r04.bin", 0x10000, 0x8000, CRC(422d946b) SHA1(c251ef9597a11ec8de39be4fcbddaba84e649ef2) ) |
| 1409 | | ROM_LOAD( "sf_r02.bin", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) |
| 1440 | ROM_LOAD( "k1-15.u60", 0x00000, 0x8000, CRC(8545d397) SHA1(9a1fd5bfd8fb830b8e46643c08eef32ba968fc23) ) /* Sprites */ |
| 1441 | ROM_LOAD( "k1-13.u50", 0x08000, 0x8000, CRC(b1b7b925) SHA1(199b0b52bbeb384211171eca5c50a1c0ebf6826f) ) |
| 1442 | ROM_LOAD( "k1-14.u59", 0x10000, 0x8000, CRC(422d946b) SHA1(c251ef9597a11ec8de39be4fcbddaba84e649ef2) ) |
| 1443 | ROM_LOAD( "k1-12.u49", 0x18000, 0x8000, CRC(587113ae) SHA1(90abe961494a1af7c87693a419fbabf7a58a5dee) ) |
| 1410 | 1444 | |
| 1411 | 1445 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) |
| 1412 | 1446 | ROM_LOAD( "sf_col21.bin", 0x0000, 0x0100, CRC(a0efaf99) SHA1(5df01663480acad1f89abab8662d437617a66d1c) ) |
| r2956 | r2957 | |
| 1477 | 1511 | ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) |
| 1478 | 1512 | |
| 1479 | 1513 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) |
| 1480 | | ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) |
| 1481 | | ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) |
| 1482 | | ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) |
| 1514 | ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) |
| 1515 | ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) |
| 1516 | ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) |
| 1483 | 1517 | ROM_END |
| 1484 | 1518 | |
| 1485 | | ROM_START( getstarb ) |
| 1519 | ROM_START( gtstarb1 ) |
| 1486 | 1520 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) /* Region 0 - main cpu code */ |
| 1487 | | ROM_LOAD( "gs_14.rom", 0x00000, 0x4000, CRC(1a57a920) SHA1(b1e9d5b29c0e3632eec3ad1ee51bf3392e4b816d) ) |
| 1488 | | ROM_LOAD( "gs_13.rom", 0x04000, 0x4000, CRC(805f8e77) SHA1(c3ad6eae842d2d10f716998d5a803038fa7b338f) ) |
| 1489 | | ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, CRC(3567da17) SHA1(29d698606d0bd30abfc3171d79bfad95b0de89fc) ) |
| 1521 | ROM_LOAD( "gs_rb_1.bin", 0x00000, 0x4000, CRC(9afad7e0) SHA1(6b2e82a6b7fcbfed5f4d250959ecc571fdf0cbc2) ) |
| 1522 | ROM_LOAD( "gs_rb_2.bin", 0x04000, 0x4000, CRC(5feb0a60) SHA1(b1300055180ddf6ca96475eb3a27a17722273fc6) ) |
| 1523 | ROM_LOAD( "gs_rb_3.bin", 0x10000, 0x8000, CRC(e3cfb1ba) SHA1(bd21655c82a14e18ff9df4539c4d0bb2484c73f1) ) |
| 1490 | 1524 | |
| 1491 | 1525 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Region 3 - sound cpu code */ |
| 1492 | | ROM_LOAD( "a68-03", 0x0000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) |
| 1526 | ROM_LOAD( "a68-03", 0x00000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) |
| 1493 | 1527 | |
| 1494 | 1528 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) /* Region 1 - temporary for gfx */ |
| 1529 | /* these roms were in the set, but they're corrupt */ |
| 1530 | // ROM_LOAD( "gs_rb_8.bin", 0x00000, 0x2000, CRC(a30aaf04) SHA1(2509554c3851a68eaec1cadc01f4d69c7aa2c09d) ) /* Chars */ |
| 1531 | // ROM_LOAD( "gs_rb_7.bin", 0x02000, 0x2000, CRC(f47a93c6) SHA1(441fee1fb195bb2583d220f30dfcff617a31742a) ) |
| 1532 | /* use the original roms instead */ |
| 1495 | 1533 | ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, CRC(e3d409e7) SHA1(0b6be4767f110729f4dd1a472ef8d9a0c718b684) ) /* Chars */ |
| 1496 | 1534 | ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, CRC(6e5ac9d4) SHA1(74f90b7a1ceb3b1c2fd92dff100d92dea0155530) ) |
| 1497 | 1535 | |
| 1536 | |
| 1498 | 1537 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) /* Region 1 - temporary for gfx */ |
| 1499 | 1538 | ROM_LOAD( "a68_09", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */ |
| 1500 | 1539 | ROM_LOAD( "a68_08", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) ) |
| r2956 | r2957 | |
| 1508 | 1547 | ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) |
| 1509 | 1548 | |
| 1510 | 1549 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) |
| 1511 | | ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) |
| 1512 | | ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) |
| 1513 | | ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) |
| 1550 | ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) |
| 1551 | ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) |
| 1552 | ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) |
| 1514 | 1553 | ROM_END |
| 1515 | 1554 | |
| 1516 | | ROM_START( gtstarba ) |
| 1555 | ROM_START( gtstarb2 ) |
| 1517 | 1556 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) /* Region 0 - main cpu code */ |
| 1518 | | ROM_LOAD( "gs_rb_1.bin", 0x00000, 0x4000, CRC(9afad7e0) SHA1(6b2e82a6b7fcbfed5f4d250959ecc571fdf0cbc2) ) |
| 1519 | | ROM_LOAD( "gs_rb_2.bin", 0x04000, 0x4000, CRC(5feb0a60) SHA1(b1300055180ddf6ca96475eb3a27a17722273fc6) ) |
| 1520 | | ROM_LOAD( "gs_rb_3.bin", 0x10000, 0x8000, CRC(e3cfb1ba) SHA1(bd21655c82a14e18ff9df4539c4d0bb2484c73f1) ) |
| 1557 | ROM_LOAD( "gs_14.rom", 0x00000, 0x4000, CRC(1a57a920) SHA1(b1e9d5b29c0e3632eec3ad1ee51bf3392e4b816d) ) |
| 1558 | ROM_LOAD( "gs_13.rom", 0x04000, 0x4000, CRC(805f8e77) SHA1(c3ad6eae842d2d10f716998d5a803038fa7b338f) ) |
| 1559 | ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, CRC(3567da17) SHA1(29d698606d0bd30abfc3171d79bfad95b0de89fc) ) |
| 1521 | 1560 | |
| 1522 | 1561 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Region 3 - sound cpu code */ |
| 1523 | | ROM_LOAD( "a68-03", 0x00000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) |
| 1562 | ROM_LOAD( "a68-03", 0x0000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) |
| 1524 | 1563 | |
| 1525 | 1564 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) /* Region 1 - temporary for gfx */ |
| 1526 | | /* these roms were in the set, but they're corrupt */ |
| 1527 | | // ROM_LOAD( "gs_rb_8.bin", 0x00000, 0x2000, CRC(a30aaf04) SHA1(2509554c3851a68eaec1cadc01f4d69c7aa2c09d) ) /* Chars */ |
| 1528 | | // ROM_LOAD( "gs_rb_7.bin", 0x02000, 0x2000, CRC(f47a93c6) SHA1(441fee1fb195bb2583d220f30dfcff617a31742a) ) |
| 1529 | | /* use the original roms instead */ |
| 1530 | 1565 | ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, CRC(e3d409e7) SHA1(0b6be4767f110729f4dd1a472ef8d9a0c718b684) ) /* Chars */ |
| 1531 | 1566 | ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, CRC(6e5ac9d4) SHA1(74f90b7a1ceb3b1c2fd92dff100d92dea0155530) ) |
| 1532 | 1567 | |
| 1533 | | |
| 1534 | 1568 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) /* Region 1 - temporary for gfx */ |
| 1535 | 1569 | ROM_LOAD( "a68_09", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */ |
| 1536 | 1570 | ROM_LOAD( "a68_08", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) ) |
| r2956 | r2957 | |
| 1544 | 1578 | ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) |
| 1545 | 1579 | |
| 1546 | 1580 | ROM_REGION( 0x0300, REGION_PROMS, 0 ) |
| 1547 | | ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) |
| 1548 | | ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) |
| 1549 | | ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) |
| 1581 | ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) |
| 1582 | ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) |
| 1583 | ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) |
| 1550 | 1584 | ROM_END |
| 1551 | 1585 | |
| 1586 | |
| 1552 | 1587 | static DRIVER_INIT( tigerh ) |
| 1553 | 1588 | { |
| 1554 | 1589 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe803, 0xe803, 0, 0, tigerh_mcu_r, tigerh_mcu_w ); |
| 1555 | | |
| 1556 | 1590 | } |
| 1557 | 1591 | |
| 1558 | | static READ8_HANDLER( getstar_mcu_r ) |
| 1592 | static DRIVER_INIT( tigerhb ) |
| 1559 | 1593 | { |
| 1560 | | /* pass the first check only */ |
| 1561 | | return 0x76; |
| 1594 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe803, 0xe803, 0, 0, tigerhb_e803_r, tigerhb_e803_w ); |
| 1562 | 1595 | } |
| 1563 | 1596 | |
| 1564 | | static DRIVER_INIT( getstar ) |
| 1565 | | { |
| 1566 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe803, 0xe803, 0, 0, getstar_mcu_r ); |
| 1567 | | // memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe803, 0xe803, 0, 0, getstar_mcu_w ); |
| 1568 | | } |
| 1569 | 1597 | |
| 1570 | | static DRIVER_INIT( getstarb ) |
| 1598 | static READ8_HANDLER( gtstarb1_port_0_read ) |
| 1571 | 1599 | { |
| 1572 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe803, 0xe803, 0, 0, getstar_e803_r ); |
| 1573 | | } |
| 1600 | /* The bootleg has it's own 'protection' on startup ? |
| 1601 | 6D1A: 06 04 ld b,$04 |
| 1602 | 6D1C: DB 00 in a,($00) |
| 1603 | 6D1E: E6 06 and $06 |
| 1604 | 6D20: 20 FA jr nz,$6D1C |
| 1605 | 6D22: DB 00 in a,($00) |
| 1606 | 6D24: E6 06 and $06 |
| 1607 | 6D26: FE 06 cp $06 |
| 1608 | 6D28: 20 F8 jr nz,$6D22 |
| 1609 | 6D2A: DB 00 in a,($00) |
| 1610 | 6D2C: E6 06 and $06 |
| 1611 | 6D2E: FE 02 cp $02 |
| 1612 | 6D30: 20 F8 jr nz,$6D2A |
| 1613 | 6D32: DB 00 in a,($00) |
| 1614 | 6D34: E6 06 and $06 |
| 1615 | 6D36: FE 04 cp $04 |
| 1616 | 6D38: 20 F8 jr nz,$6D32 |
| 1617 | 6D3A: 10 E0 djnz $6D1C |
| 1618 | */ |
| 1619 | if (activecpu_get_pc() == 0x6d1e) return 0; |
| 1620 | if (activecpu_get_pc() == 0x6d24) return 6; |
| 1621 | if (activecpu_get_pc() == 0x6d2c) return 2; |
| 1622 | if (activecpu_get_pc() == 0x6d34) return 4; |
| 1574 | 1623 | |
| 1575 | | static READ8_HANDLER( gtstarba_port_0_read ) |
| 1576 | | { |
| 1577 | | /* the bootleg has it's own 'protection' on startup? */ |
| 1578 | | if (activecpu_get_pc()==0x6d1e) return 0; |
| 1579 | | if (activecpu_get_pc()==0x6d24) return 6; |
| 1580 | | if (activecpu_get_pc()==0x6d2c) return 2; |
| 1581 | | if (activecpu_get_pc()==0x6d34) return 4; |
| 1624 | /* The bootleg hangs in the "test mode" before diplaying (wrong) lives settings : |
| 1625 | 6AD4: DB 00 in a,($00) |
| 1626 | 6AD6: CB 4F bit 1,a |
| 1627 | 6AD8: 28 FA jr z,$6AD4 |
| 1628 | 6ADA: 3E 23 ld a,$23 |
| 1629 | 6ADC: CD 52 11 call $1152 |
| 1630 | 6ADF: 32 03 E8 ld ($E803),a |
| 1631 | 6AE2: DB 00 in a,($00) |
| 1632 | 6AE4: CB 4F bit 1,a |
| 1633 | 6AE6: 28 FA jr z,$6AE2 |
| 1634 | 6AE8: 3A 0A C8 ld a,($C80A) |
| 1635 | 6AEB: E6 03 and $03 |
| 1636 | 6AED: CD 52 11 call $1152 |
| 1637 | 6AF0: 32 03 E8 ld ($E803),a |
| 1638 | 6AF3: DB 00 in a,($00) |
| 1639 | 6AF5: CB 57 bit 2,a |
| 1640 | 6AF7: 20 FA jr nz,$6AF3 |
| 1641 | This seems to be what used to be the MCU status. |
| 1642 | */ |
| 1643 | if (activecpu_get_pc() == 0x6ad6) return 2; /* bit 1 must be ON */ |
| 1644 | if (activecpu_get_pc() == 0x6ae4) return 2; /* bit 1 must be ON */ |
| 1645 | if (activecpu_get_pc() == 0x6af5) return 0; /* bit 2 must be OFF */ |
| 1582 | 1646 | |
| 1583 | 1647 | logerror("Port Read PC=%04x\n",activecpu_get_pc()); |
| 1584 | 1648 | |
| 1585 | 1649 | return 0; |
| 1586 | 1650 | } |
| 1587 | 1651 | |
| 1588 | | static READ8_HANDLER( gtstarba_dpram_r ) |
| 1652 | static READ8_HANDLER( gtstarb1_dpram_r ) |
| 1589 | 1653 | { |
| 1590 | 1654 | /* requires this or it gets stuck with 'rom test' on screen */ |
| 1591 | 1655 | /* it is possible the program roms are slighly corrupt like the gfx roms, or |
| 1592 | | that the bootleg simply shouldn't execute the code due to the modified |
| 1593 | | roms */ |
| 1656 | that the bootleg simply shouldn't execute the code due to the modified roms */ |
| 1594 | 1657 | if (activecpu_get_pc()==0x6d54) return 0xff; |
| 1595 | 1658 | return slapfight_dpram[offset]; |
| 1596 | 1659 | } |
| 1597 | 1660 | |
| 1598 | | static DRIVER_INIT( gtstarba ) |
| 1661 | static void getstar_init( running_machine *machine ) |
| 1599 | 1662 | { |
| 1600 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x0, 0x0, 0, 0, gtstarba_port_0_read ); |
| 1601 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc800, 0xc80f, 0, 0, gtstarba_dpram_r ); |
| 1663 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe803, 0xe803, 0, 0, getstar_e803_r, getstar_e803_w ); |
| 1602 | 1664 | } |
| 1603 | 1665 | |
| 1666 | static DRIVER_INIT( getstar ) |
| 1667 | { |
| 1668 | getstar_id = GETSTAR; |
| 1669 | getstar_init(machine); |
| 1670 | } |
| 1604 | 1671 | |
| 1672 | static DRIVER_INIT( getstarj ) |
| 1673 | { |
| 1674 | getstar_id = GETSTARJ; |
| 1675 | getstar_init(machine); |
| 1676 | } |
| 1677 | |
| 1678 | static DRIVER_INIT( gtstarb1 ) |
| 1679 | { |
| 1680 | getstar_id = GTSTARB1; |
| 1681 | getstar_init(machine); |
| 1682 | |
| 1683 | /* specific handlers for this bootleg */ |
| 1684 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_IO, 0x0, 0x0, 0, 0, gtstarb1_port_0_read ); |
| 1685 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc800, 0xc80f, 0, 0, gtstarb1_dpram_r ); |
| 1686 | } |
| 1687 | |
| 1688 | static DRIVER_INIT( gtstarb2 ) |
| 1689 | { |
| 1690 | getstar_id = GTSTARB2; |
| 1691 | getstar_init(machine); |
| 1692 | } |
| 1693 | |
| 1694 | |
| 1605 | 1695 | static int slapfigh_prot_pos; |
| 1606 | 1696 | |
| 1607 | 1697 | static READ8_HANDLER( slapfigh_mcu_r ) |
| r2956 | r2957 | |
| 1638 | 1728 | GAME( 1985, perfrman, 0, perfrman, perfrman, 0, ROT270, "[Toaplan] Data East Corporation", "Performan (Japan)", 0 ) |
| 1639 | 1729 | GAME( 1985, perfrmau, perfrman, perfrman, perfrman, 0, ROT270, "[Toaplan] Data East USA", "Performan (US)", 0 ) |
| 1640 | 1730 | GAME( 1985, tigerh, 0, tigerh, tigerh, tigerh, ROT270, "Taito America Corp.", "Tiger Heli (US)", GAME_NO_COCKTAIL ) |
| 1641 | | GAME( 1985, tigerh2, tigerh, tigerh, tigerh, tigerh, ROT270, "Taito", "Tiger Heli (Japan set 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1642 | | GAME( 1985, tigerhj, tigerh, tigerh, tigerh, tigerh, ROT270, "Taito", "Tiger Heli (Japan set 2)", GAME_NO_COCKTAIL ) |
| 1643 | | GAME( 1985, tigerhb1, tigerh, tigerhb, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg set 1)", 0 ) |
| 1731 | GAME( 1985, tigerhj, tigerh, tigerh, tigerh, tigerh, ROT270, "Taito", "Tiger Heli (Japan)", GAME_NO_COCKTAIL ) |
| 1732 | GAME( 1985, tigerhb1, tigerh, tigerhb, tigerh, tigerhb, ROT270, "bootleg", "Tiger Heli (bootleg set 1)", GAME_NO_COCKTAIL ) |
| 1644 | 1733 | GAME( 1985, tigerhb2, tigerh, tigerhb, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg set 2)", GAME_NO_COCKTAIL ) |
| 1734 | GAME( 1985, tigerhb3, tigerh, tigerhb, tigerh, 0, ROT270, "bootleg", "Tiger Heli (bootleg set 3)", GAME_NO_COCKTAIL ) |
| 1645 | 1735 | GAME( 1986, slapfigh, 0, slapfigh, slapfigh, slapfigh, ROT270, "Taito", "Slap Fight (set 1)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1646 | 1736 | GAME( 1986, slapfiga, slapfigh, slapfigh, slapfigh, slapfigh, ROT270, "Taito", "Slap Fight (set 2)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1737 | GAME( 1986, alcon, slapfigh, slapfigh, slapfigh, slapfigh, ROT270, "Taito America Corp.", "Alcon", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1647 | 1738 | GAME( 1986, slapbtjp, slapfigh, slapfigh, slapfigh, 0, ROT270, "bootleg", "Slap Fight (Japan bootleg)", GAME_NO_COCKTAIL ) |
| 1648 | 1739 | GAME( 1986, slapbtuk, slapfigh, slapbtuk, slapfigh, 0, ROT270, "bootleg", "Slap Fight (English bootleg)", GAME_NO_COCKTAIL ) |
| 1649 | 1740 | GAME( 1986, slapfgtr, slapfigh, slapbtuk, slapfigh, 0, ROT270, "bootleg", "Slap Fight (bootleg)", GAME_NO_COCKTAIL ) // PCB labeled 'slap fighter' |
| 1650 | | GAME( 1986, alcon, slapfigh, slapfigh, slapfigh, slapfigh, ROT270, "Taito America Corp.", "Alcon", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1651 | | GAME( 1986, getstar, 0, slapfigh, getstar, getstar, ROT0, "Taito", "Guardian", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1652 | | GAME( 1986, getstarj, getstar, slapfigh, getstar, getstar, ROT0, "Taito", "Get Star (Japan)", GAME_NOT_WORKING | GAME_NO_COCKTAIL ) |
| 1653 | | GAME( 1986, getstarb, getstar, slapfigh, getstar, getstarb, ROT0, "bootleg", "Get Star (bootleg set 1)", GAME_NO_COCKTAIL ) |
| 1654 | | GAME( 1986, gtstarba, getstar, slapfigh, gtstarba, gtstarba, ROT0, "bootleg", "Get Star (bootleg set 2)", GAME_NO_COCKTAIL ) |
| 1741 | GAME( 1986, getstar, 0, slapfigh, getstar, getstar, ROT0, "Taito America Corporation (Kitkorp license)", "Guardian (US)", GAME_NO_COCKTAIL ) |
| 1742 | GAME( 1986, getstarj, getstar, slapfigh, getstarj, getstarj, ROT0, "Taito", "Get Star (Japan)", GAME_NO_COCKTAIL ) |
| 1743 | GAME( 1986, gtstarb1, getstar, slapfigh, getstarj, gtstarb1, ROT0, "bootleg", "Get Star (bootleg set 1)", GAME_NO_COCKTAIL ) |
| 1744 | GAME( 1986, gtstarb2, getstar, slapfigh, gtstarb2, gtstarb2, ROT0, "bootleg", "Get Star (bootleg set 2)", GAME_NO_COCKTAIL ) |
src/mame/drivers/stvinit.c
| r2956 | r2957 | |
| 11 | 11 | #include "machine/stvprot.h" |
| 12 | 12 | #include "includes/stv.h" |
| 13 | 13 | |
| 14 | #define FIRST_SPEEDUP_SLOT (2) // in case we remove/alter the BIOS speedups later |
| 15 | |
| 14 | 16 | /* |
| 15 | 17 | IC-13 rom shifter routine,on 2000000-21fffff the game maps the rom bytes on the |
| 16 | 18 | ODD (in every sense) bytes.This gets the IC-13 rom status to good and ends a emulation |
| r2956 | r2957 | |
| 174 | 176 | |
| 175 | 177 | static READ32_HANDLER( stv_speedup_r ) |
| 176 | 178 | { |
| 177 | | if (activecpu_get_pc()==0x60154b4) cpu_spinuntil_int(); // bios menus.. |
| 179 | if (activecpu_get_pc()==0x60154b2) cpu_spinuntil_int(); // bios menus.. |
| 180 | cpu_spinuntil_int(); |
| 178 | 181 | |
| 179 | 182 | return stv_workram_h[0x0335d0/4]; |
| 180 | 183 | } |
| 181 | 184 | |
| 182 | 185 | static READ32_HANDLER( stv_speedup2_r ) |
| 183 | 186 | { |
| 184 | | if (activecpu_get_pc()==0x6013af0) cpu_spinuntil_int(); // for use in japan |
| 187 | if (activecpu_get_pc()==0x6013aee) cpu_spinuntil_int(); // for use in japan |
| 185 | 188 | |
| 189 | cpu_spinuntil_int(); |
| 190 | |
| 186 | 191 | return stv_workram_h[0x0335bc/4]; |
| 187 | 192 | } |
| 188 | 193 | |
| 189 | 194 | void install_stvbios_speedups(running_machine *machine) |
| 190 | 195 | { |
| 196 | // flushes 0 & 1 on both CPUs are for the BIOS speedups |
| 197 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, 0); |
| 198 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60154b2); |
| 199 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, 1); |
| 200 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013aee); |
| 201 | |
| 202 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, 0); |
| 203 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60154b2); |
| 204 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, 1); |
| 205 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013aee); |
| 206 | |
| 191 | 207 | /* idle skip bios? .. not 100% sure this is safe .. we'll see */ |
| 192 | 208 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60335d0, 0x60335d3, 0, 0, stv_speedup_r ); |
| 193 | 209 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60335bc, 0x60335bf, 0, 0, stv_speedup2_r ); |
| r2956 | r2957 | |
| 195 | 211 | |
| 196 | 212 | static READ32_HANDLER( shienryu_slave_speedup_r ) |
| 197 | 213 | { |
| 198 | | if (activecpu_get_pc()==0x06004410) |
| 214 | if (activecpu_get_pc()==0x0600440e) |
| 199 | 215 | cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // is this safe... we can't skip till vbl because its not a vbl wait loop |
| 200 | 216 | |
| 201 | 217 | return stv_workram_h[0x0ae8e4/4]; |
| r2956 | r2957 | |
| 204 | 220 | |
| 205 | 221 | static READ32_HANDLER( shienryu_speedup_r ) |
| 206 | 222 | { |
| 207 | | if (activecpu_get_pc()==0x060041C8) cpu_spinuntil_int(); // after you enable the sound cpu ... |
| 223 | if (activecpu_get_pc()==0x060041C6) cpu_spinuntil_int(); // after you enable the sound cpu ... |
| 208 | 224 | return stv_workram_h[0x0ae8e0/4]; |
| 209 | 225 | } |
| 210 | 226 | |
| r2956 | r2957 | |
| 214 | 230 | stv_default_eeprom = shienryu_default_eeprom; |
| 215 | 231 | stv_default_eeprom_length = sizeof(shienryu_default_eeprom); |
| 216 | 232 | |
| 233 | // master |
| 234 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 235 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60041c6); |
| 236 | // slave |
| 237 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 238 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x600440e); |
| 239 | |
| 217 | 240 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ae8e0, 0x60ae8e3, 0, 0, shienryu_speedup_r ); // after you enable sound cpu |
| 218 | 241 | memory_install_read32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x60ae8e4, 0x60ae8e7, 0, 0, shienryu_slave_speedup_r ); // after you enable sound cpu |
| 219 | 242 | |
| r2956 | r2957 | |
| 222 | 245 | |
| 223 | 246 | static READ32_HANDLER( prikura_speedup_r ) |
| 224 | 247 | { |
| 225 | | if (activecpu_get_pc()==0x6018642) cpu_spinuntil_int(); // after you enable the sound cpu ... |
| 248 | if (activecpu_get_pc()==0x6018640) cpu_spinuntil_int(); // after you enable the sound cpu ... |
| 226 | 249 | return stv_workram_h[0x0b9228/4]; |
| 227 | 250 | } |
| 228 | 251 | |
| 229 | 252 | static void prikura_slave_speedup( UINT32 data ) |
| 230 | 253 | { |
| 231 | | if ( activecpu_get_pc() == 0x06018c70 ) |
| 254 | if ( activecpu_get_pc() == 0x06018c6e ) |
| 232 | 255 | if ( (data & 0x00800000) == 0 ) |
| 233 | 256 | cpunum_spinuntil_trigger(1, 1000); |
| 234 | 257 | } |
| r2956 | r2957 | |
| 242 | 265 | |
| 243 | 266 | (loops for 263473 instructions) |
| 244 | 267 | */ |
| 268 | // master |
| 269 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 270 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6018640); |
| 271 | // slave |
| 272 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 273 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6018c6e); |
| 274 | |
| 245 | 275 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60b9228, 0x60b922b, 0, 0, prikura_speedup_r ); |
| 246 | 276 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)prikura_slave_speedup ); |
| 247 | 277 | |
| r2956 | r2957 | |
| 255 | 285 | |
| 256 | 286 | static READ32_HANDLER( hanagumi_speedup_r ) |
| 257 | 287 | { |
| 258 | | if (activecpu_get_pc()==0x06010162) cpu_spinuntil_int(); // title logos |
| 288 | if (activecpu_get_pc()==0x06010160) cpu_spinuntil_int(); // title logos |
| 259 | 289 | |
| 260 | 290 | return stv_workram_h[0x94188/4]; |
| 261 | 291 | } |
| r2956 | r2957 | |
| 287 | 317 | |
| 288 | 318 | (loops for 288688 instructions) |
| 289 | 319 | */ |
| 320 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 321 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6010160); |
| 322 | |
| 290 | 323 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6094188, 0x609418b, 0, 0, hanagumi_speedup_r ); |
| 291 | 324 | memory_install_read32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x6015438, 0x601543b, 0, 0, hanagumi_slave_off ); |
| 292 | 325 | |
| r2956 | r2957 | |
| 314 | 347 | |
| 315 | 348 | static READ32_HANDLER( puyosun_speedup_r ) |
| 316 | 349 | { |
| 317 | | if (activecpu_get_pc()==0x6021CF2) cpu_spinuntil_time(ATTOTIME_IN_USEC(400)); // spinuntilint breaks controls again .. urgh |
| 350 | if (activecpu_get_pc()==0x6021CF0) cpu_spinuntil_time(ATTOTIME_IN_USEC(400)); // spinuntilint breaks controls again .. urgh |
| 318 | 351 | |
| 319 | 352 | |
| 320 | 353 | return stv_workram_h[0x0ffc10/4]; |
| r2956 | r2957 | |
| 322 | 355 | |
| 323 | 356 | static void puyosun_slave_speedup( UINT32 data ) |
| 324 | 357 | { |
| 325 | | if ( activecpu_get_pc() == 0x6023700 ) |
| 358 | if ( activecpu_get_pc() == 0x60236fe ) |
| 326 | 359 | if ( (data & 0x00800000) == 0 ) |
| 327 | 360 | cpunum_spinuntil_trigger(1, 1000); |
| 328 | 361 | } |
| 329 | 362 | |
| 330 | 363 | DRIVER_INIT(puyosun) |
| 331 | 364 | { |
| 365 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 366 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6021cf0); |
| 367 | |
| 368 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 369 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60236fe); |
| 370 | |
| 332 | 371 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, puyosun_speedup_r ); // idle loop of main cpu |
| 333 | 372 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)puyosun_slave_speedup ); |
| 334 | 373 | |
| r2956 | r2957 | |
| 350 | 389 | |
| 351 | 390 | static READ32_HANDLER( mausuke_speedup_r ) |
| 352 | 391 | { |
| 353 | | if (activecpu_get_pc()==0x060461A2) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // spinuntilint breaks controls again .. urgh |
| 392 | if (activecpu_get_pc()==0x060461A0) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // spinuntilint breaks controls again .. urgh |
| 354 | 393 | |
| 355 | 394 | return stv_workram_h[0x0ffc10/4]; |
| 356 | 395 | } |
| 357 | 396 | |
| 358 | 397 | DRIVER_INIT(mausuke) |
| 359 | 398 | { |
| 399 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 400 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60461A0); |
| 401 | |
| 360 | 402 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, mausuke_speedup_r ); // idle loop of main cpu |
| 361 | 403 | |
| 362 | 404 | DRIVER_INIT_CALL(ic13); |
| r2956 | r2957 | |
| 367 | 409 | |
| 368 | 410 | static READ32_HANDLER( cottonbm_speedup_r ) |
| 369 | 411 | { |
| 370 | | if (activecpu_get_pc()==0x06030EE4) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // spinuntilint breaks lots of things |
| 412 | if (activecpu_get_pc()==0x06030EE2) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // spinuntilint breaks lots of things |
| 371 | 413 | |
| 372 | 414 | return stv_workram_h[0x0ffc10/4]; |
| 373 | 415 | } |
| 374 | 416 | |
| 375 | 417 | static void cottonbm_slave_speedup( UINT32 data ) |
| 376 | 418 | { |
| 377 | | if (activecpu_get_pc() == 0x6032b54) |
| 419 | if (activecpu_get_pc() == 0x6032b52) |
| 378 | 420 | if ( (data & 0x00800000) == 0 ) |
| 379 | 421 | { |
| 380 | 422 | if ( |
| r2956 | r2957 | |
| 394 | 436 | |
| 395 | 437 | DRIVER_INIT(cottonbm) |
| 396 | 438 | { |
| 439 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 440 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6030EE2); |
| 441 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 442 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6032b52); |
| 443 | |
| 397 | 444 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, cottonbm_speedup_r ); // idle loop of main cpu |
| 398 | 445 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)cottonbm_slave_speedup ); |
| 399 | 446 | |
| r2956 | r2957 | |
| 404 | 451 | |
| 405 | 452 | static READ32_HANDLER( cotton2_speedup_r ) |
| 406 | 453 | { |
| 407 | | if (activecpu_get_pc()==0x06031c7c) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // spinuntilint breaks lots of things |
| 454 | if (activecpu_get_pc()==0x06031c7a) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); // spinuntilint breaks lots of things |
| 408 | 455 | |
| 409 | 456 | return stv_workram_h[0x0ffc10/4]; |
| 410 | 457 | } |
| 411 | 458 | |
| 412 | 459 | static void cotton2_slave_speedup( UINT32 data ) |
| 413 | 460 | { |
| 414 | | if (activecpu_get_pc() == 0x60338ec) |
| 461 | if (activecpu_get_pc() == 0x60338ea) |
| 415 | 462 | if ( (data & 0x00800000) == 0 ) |
| 416 | 463 | { |
| 417 | 464 | if ( |
| r2956 | r2957 | |
| 430 | 477 | |
| 431 | 478 | DRIVER_INIT(cotton2) |
| 432 | 479 | { |
| 480 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 481 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6031c7a); |
| 482 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 483 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60338ea); |
| 484 | |
| 433 | 485 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, cotton2_speedup_r ); // idle loop of main cpu |
| 434 | 486 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)cotton2_slave_speedup ); |
| 435 | 487 | |
| r2956 | r2957 | |
| 442 | 494 | |
| 443 | 495 | static READ32_HANDLER( dnmtdeka_speedup_r ) |
| 444 | 496 | { |
| 445 | | if (activecpu_get_pc()==0x6027c92) cpu_spinuntil_int();//cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 497 | if (activecpu_get_pc()==0x6027c90) cpu_spinuntil_int();//cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 446 | 498 | return stv_workram_h[0x0985a0/4]; |
| 447 | 499 | } |
| 448 | 500 | |
| 449 | 501 | static WRITE32_HANDLER(dnmtdeka_cmd_write) |
| 450 | 502 | { |
| 451 | 503 | COMBINE_DATA(&stv_workram_h[0x0e0ad4/4 + offset]); |
| 452 | | if ( (cpu_getactivecpu() == 0) && (activecpu_get_pc() == 0x00000d06) ) |
| 504 | if ( (cpu_getactivecpu() == 0) && (activecpu_get_pc() == 0x00000d04) ) |
| 453 | 505 | return; |
| 454 | 506 | |
| 455 | 507 | if ( data != 0 ) dnmtdeka_pending_commands++; |
| r2956 | r2957 | |
| 460 | 512 | static READ32_HANDLER(dnmtdeka_cmd_read) |
| 461 | 513 | { |
| 462 | 514 | //logerror( "CMD: Read by cpu=%d, at = %08X, offset = %08X, data = %08X, commands = %d\n", cpu_getactivecpu(), activecpu_get_pc(), offset, stv_workram_h[0xe0bd0/4 + offset], dnmtdeka_pending_commands ); |
| 463 | | if ( activecpu_get_pc() == 0x060051f4 ) |
| 515 | if ( activecpu_get_pc() == 0x060051f2 ) |
| 464 | 516 | { |
| 465 | 517 | if ( stv_workram_h[0x0e0ad4/4 + offset] == 0 ) |
| 466 | 518 | { |
| r2956 | r2957 | |
| 479 | 531 | |
| 480 | 532 | DRIVER_INIT(dnmtdeka) |
| 481 | 533 | { |
| 534 | // install all 3 speedups on both master and slave |
| 535 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 536 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c90); |
| 537 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 538 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04); |
| 539 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2); |
| 540 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2); |
| 541 | |
| 542 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 543 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c90); |
| 544 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 545 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04); |
| 546 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2); |
| 547 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2); |
| 548 | |
| 482 | 549 | dnmtdeka_pending_commands = 0; |
| 483 | 550 | |
| 484 | 551 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60985a0, 0x60985a3, 0, 0, dnmtdeka_speedup_r ); // idle loop of main cpu |
| r2956 | r2957 | |
| 491 | 558 | |
| 492 | 559 | static READ32_HANDLER(diehard_speedup_r) |
| 493 | 560 | { |
| 494 | | if ( activecpu_get_pc() == 0x06027c9a ) cpu_spinuntil_int(); |
| 561 | if ( activecpu_get_pc() == 0x06027c98 ) cpu_spinuntil_int(); |
| 495 | 562 | return stv_workram_h[0x000986ac/4]; |
| 496 | 563 | } |
| 497 | 564 | |
| 498 | 565 | static WRITE32_HANDLER(diehard_cmd_write) |
| 499 | 566 | { |
| 500 | 567 | COMBINE_DATA(&stv_workram_h[0xe0bd0/4 + offset]); |
| 501 | | if ( (cpu_getactivecpu() == 0) && (activecpu_get_pc() == 0x00000d06) ) |
| 568 | if ( (cpu_getactivecpu() == 0) && (activecpu_get_pc() == 0x00000d04) ) |
| 502 | 569 | return; |
| 503 | 570 | |
| 504 | 571 | if ( data != 0 ) diehard_pending_commands++; |
| r2956 | r2957 | |
| 509 | 576 | static READ32_HANDLER(diehard_cmd_read) |
| 510 | 577 | { |
| 511 | 578 | //logerror( "CMD: Read by cpu=%d, at = %08X, offset = %08X, data = %08X, commands = %d\n", cpu_getactivecpu(), activecpu_get_pc(), offset, stv_workram_h[0xe0bd0/4 + offset], diehard_pending_commands ); |
| 512 | | if ( activecpu_get_pc() == 0x060051f4 ) |
| 579 | if ( activecpu_get_pc() == 0x060051f2 ) |
| 513 | 580 | { |
| 514 | 581 | if ( stv_workram_h[0xe0bd0/4 + offset] == 0 ) |
| 515 | 582 | { |
| r2956 | r2957 | |
| 553 | 620 | { |
| 554 | 621 | diehard_pending_commands = 0; |
| 555 | 622 | |
| 623 | // install all 3 speedups on both master and slave |
| 624 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 625 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c98); |
| 626 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 627 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04); |
| 628 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2); |
| 629 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2); |
| 630 | |
| 631 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 632 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6027c98); |
| 633 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 634 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0xd04); |
| 635 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2); |
| 636 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60051f2); |
| 637 | |
| 638 | |
| 556 | 639 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060986ac, 0x060986af, 0, 0, diehard_speedup_r ); |
| 557 | 640 | memory_install_write32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060e0bd0, 0x060e0dcf, 0, 0, diehard_cmd_write ); |
| 558 | 641 | memory_install_read32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x060e0bd0, 0x060e0dcf, 0, 0, diehard_cmd_read ); |
| r2956 | r2957 | |
| 562 | 645 | |
| 563 | 646 | |
| 564 | 647 | DRIVER_INIT_CALL(ic13); |
| 565 | | |
| 566 | 648 | } |
| 567 | 649 | |
| 568 | 650 | static READ32_HANDLER( fhboxers_speedup_r ) |
| 569 | 651 | { |
| 570 | | if (activecpu_get_pc()==0x060041c4) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 652 | if (activecpu_get_pc()==0x060041c2) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 571 | 653 | |
| 572 | 654 | return stv_workram_h[0x00420c/4]; |
| 573 | 655 | } |
| 574 | 656 | |
| 575 | 657 | static READ32_HANDLER( fhboxers_speedup2_r ) |
| 576 | 658 | { |
| 577 | | if (activecpu_get_pc()==0x0600bb0c) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 659 | if (activecpu_get_pc()==0x0600bb0a) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 578 | 660 | |
| 579 | 661 | |
| 580 | 662 | return stv_workram_h[0x090740/4]; |
| r2956 | r2957 | |
| 582 | 664 | |
| 583 | 665 | static READ32_HANDLER( fhboxers_speedup3_r ) |
| 584 | 666 | { |
| 585 | | if (activecpu_get_pc()==0x0600b320 ) |
| 667 | if (activecpu_get_pc()==0x0600b31e ) |
| 586 | 668 | cpu_spinuntil_int(); |
| 587 | 669 | |
| 588 | 670 | return stv_workram_h[0x90bb4/4]; |
| r2956 | r2957 | |
| 590 | 672 | |
| 591 | 673 | DRIVER_INIT(fhboxers) |
| 592 | 674 | { |
| 675 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 676 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60041c2); |
| 677 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 678 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x600bb0a); |
| 679 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2); |
| 680 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x600b31e); |
| 681 | |
| 593 | 682 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x600420c, 0x600420f, 0, 0, fhboxers_speedup_r ); // idle loop of main cpu |
| 594 | 683 | memory_install_read32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x6090740, 0x6090743, 0, 0, fhboxers_speedup2_r ); // idle loop of second cpu |
| 595 | 684 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x06090bb4, 0x06090bb7, 0, 0, fhboxers_speedup3_r ); // idle loop of main cpu |
| r2956 | r2957 | |
| 600 | 689 | |
| 601 | 690 | static READ32_HANDLER( bakubaku_speedup_r ) |
| 602 | 691 | { |
| 603 | | if (activecpu_get_pc()==0x06036dc8) cpu_spinuntil_int(); // title logos |
| 692 | if (activecpu_get_pc()==0x06036dc6) cpu_spinuntil_int(); // title logos |
| 604 | 693 | |
| 605 | 694 | return stv_workram_h[0x0833f0/4]; |
| 606 | 695 | } |
| 607 | 696 | |
| 608 | 697 | static READ32_HANDLER( bakubaku_speedup2_r ) |
| 609 | 698 | { |
| 610 | | if (activecpu_get_pc()==0x06033762) cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); |
| 699 | if (activecpu_get_pc()==0x06033760) cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); |
| 611 | 700 | |
| 612 | 701 | return stv_workram_h[0x0033762/4]; |
| 613 | 702 | } |
| 614 | 703 | |
| 615 | | #ifdef UNUSED_FUNCTION |
| 616 | | static READ32_HANDLER( bakubaku_hangskip_r ) |
| 704 | DRIVER_INIT(bakubaku) |
| 617 | 705 | { |
| 618 | | if (activecpu_get_pc()==0x060335e4) stv_workram_h[0x0335e6/4] = 0x32300909; |
| 706 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 707 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6036dc6); |
| 708 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 709 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6033760); |
| 619 | 710 | |
| 620 | | return stv_workram_h[0x033660/4]; |
| 621 | | } |
| 622 | | #endif |
| 623 | | |
| 624 | | DRIVER_INIT(bakubaku) |
| 625 | | { |
| 626 | 711 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60833f0, 0x60833f3, 0, 0, bakubaku_speedup_r ); // idle loop of main cpu |
| 627 | 712 | memory_install_read32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x60fdfe8, 0x60fdfeb, 0, 0, bakubaku_speedup2_r ); // turn off slave sh2, is it needed after boot ?? |
| 628 | | //memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6033660, 0x6033663, 0, 0, bakubaku_hangskip_r ); // it waits for a ram address to change what should change it? |
| 629 | 713 | |
| 630 | 714 | DRIVER_INIT_CALL(ic13); |
| 631 | 715 | } |
| 632 | 716 | |
| 633 | 717 | static READ32_HANDLER( groovef_hack1_r ) |
| 634 | 718 | { |
| 635 | | if(activecpu_get_pc() == 0x6005e7e) stv_workram_h[0x0fffcc/4] = 0x00000000; |
| 719 | if(activecpu_get_pc() == 0x6005e7c) stv_workram_h[0x0fffcc/4] = 0x00000000; |
| 636 | 720 | // popmessage("1 %08x",activecpu_get_pc()); |
| 637 | 721 | return stv_workram_h[0x0fffcc/4]; |
| 638 | 722 | } |
| 639 | 723 | |
| 640 | 724 | static READ32_HANDLER( groovef_hack2_r ) |
| 641 | 725 | { |
| 642 | | if(activecpu_get_pc() == 0x6005e88) stv_workram_h[0x0ca6cc/4] = 0x00000000; |
| 726 | if(activecpu_get_pc() == 0x6005e86) stv_workram_h[0x0ca6cc/4] = 0x00000000; |
| 643 | 727 | // popmessage("2 %08x",activecpu_get_pc()); |
| 644 | 728 | return stv_workram_h[0x0ca6cc/4]; |
| 645 | 729 | } |
| r2956 | r2957 | |
| 647 | 731 | static READ32_HANDLER( groovef_speedup_r ) |
| 648 | 732 | { |
| 649 | 733 | // logerror ("groove speedup \n"); |
| 650 | | if (activecpu_get_pc()==0x060a4972) |
| 734 | if (activecpu_get_pc()==0x060a4970) |
| 651 | 735 | { |
| 652 | 736 | cpu_spinuntil_int(); // title logos |
| 653 | 737 | // logerror ("groove speedup skipping\n"); |
| r2956 | r2957 | |
| 666 | 750 | |
| 667 | 751 | static void groovef_slave_speedup( UINT32 data ) |
| 668 | 752 | { |
| 669 | | if ( activecpu_get_pc() == 0x060060c4 ) |
| 753 | if ( activecpu_get_pc() == 0x060060c2 ) |
| 670 | 754 | if ( (data & 0x00800000) == 0 ) |
| 671 | 755 | cpunum_spinuntil_trigger(1, 1000); |
| 672 | 756 | } |
| 673 | 757 | |
| 674 | 758 | DRIVER_INIT( groovef ) |
| 675 | 759 | { |
| 760 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 761 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6005e7c); |
| 762 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 763 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6005e86); |
| 764 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+2); |
| 765 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60a4970); |
| 766 | |
| 767 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 768 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60060c2); |
| 769 | |
| 676 | 770 | /* prevent game from hanging on startup -- todo: remove these hacks */ |
| 677 | 771 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ca6cc, 0x60ca6cf, 0, 0, groovef_hack2_r ); |
| 678 | 772 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60fffcc, 0x60fffcf, 0, 0, groovef_hack1_r ); |
| r2956 | r2957 | |
| 717 | 811 | static READ32_HANDLER( danchih_hack_r ) |
| 718 | 812 | { |
| 719 | 813 | logerror( "DMASt_SCU1: Read at PC=%08x, value = %08x\n", activecpu_get_pc(), stv_workram_h[0x0ffcbc/4] ); |
| 720 | | if (activecpu_get_pc()==0x06028b2a) return 0x0e0c0000; |
| 814 | if (activecpu_get_pc()==0x06028b28) return 0x0e0c0000; |
| 721 | 815 | |
| 722 | 816 | return stv_workram_h[0x0ffcbc/4]; |
| 723 | 817 | } |
| 724 | 818 | |
| 725 | 819 | static READ32_HANDLER( danchih_speedup_r ) |
| 726 | 820 | { |
| 727 | | if (activecpu_get_pc()==0x06028c90) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 821 | if (activecpu_get_pc()==0x06028c8e) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 728 | 822 | return stv_workram_h[0x0ffc10/4]; |
| 729 | 823 | } |
| 730 | 824 | |
| 731 | 825 | static void danchih_slave_speedup( UINT32 data ) |
| 732 | 826 | { |
| 733 | | if ( activecpu_get_pc() == 0x0602ae28 ) |
| 827 | if ( activecpu_get_pc() == 0x0602ae26 ) |
| 734 | 828 | if ( (data & 0x00800000) == 0 ) |
| 735 | 829 | cpunum_spinuntil_trigger(1, 1000); |
| 736 | 830 | } |
| 737 | 831 | |
| 738 | 832 | DRIVER_INIT( danchih ) |
| 739 | 833 | { |
| 834 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 835 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6028b28); |
| 836 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 837 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6028c8e); |
| 838 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 839 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602ae26); |
| 840 | |
| 740 | 841 | /* prevent game from hanging on title screen -- todo: remove these hacks */ |
| 741 | 842 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffcbc, 0x60ffcbf, 0, 0, danchih_hack_r ); |
| 742 | 843 | |
| r2956 | r2957 | |
| 771 | 872 | |
| 772 | 873 | static READ32_HANDLER( astrass_hack_r ) |
| 773 | 874 | { |
| 774 | | if(activecpu_get_pc()==0x60011bc) return 0x00000000; |
| 875 | if(activecpu_get_pc()==0x60011b8) return 0x00000000; |
| 775 | 876 | |
| 776 | 877 | return stv_workram_h[0x000770/4]; |
| 777 | 878 | } |
| 778 | 879 | |
| 779 | 880 | static READ32_HANDLER( astrass_speedup_r ) |
| 780 | 881 | { |
| 781 | | if(activecpu_get_pc() == 0x0605b9dc ) |
| 882 | if(activecpu_get_pc() == 0x0605b9da ) |
| 782 | 883 | cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 783 | 884 | |
| 784 | 885 | return stv_workram_h[0x8e4d8/4]; |
| r2956 | r2957 | |
| 786 | 887 | |
| 787 | 888 | DRIVER_INIT( astrass ) |
| 788 | 889 | { |
| 890 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 891 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60011b8); |
| 892 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 893 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605b9da); |
| 894 | |
| 789 | 895 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6000770, 0x6000773, 0, 0, astrass_hack_r ); |
| 790 | 896 | |
| 791 | 897 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0608e4d8, 0x0608e4db, 0, 0, astrass_speedup_r ); |
| r2956 | r2957 | |
| 799 | 905 | |
| 800 | 906 | static READ32_HANDLER(thunt_speedup_r) |
| 801 | 907 | { |
| 802 | | if (activecpu_get_pc() == 0x0602A026) cpu_spinuntil_int(); |
| 908 | if (activecpu_get_pc() == 0x0602A024) cpu_spinuntil_int(); |
| 803 | 909 | return stv_workram_h[0x00031424/4]; |
| 804 | 910 | } |
| 805 | 911 | |
| 806 | 912 | static READ32_HANDLER(thunt_speedup2_r) |
| 807 | 913 | { |
| 808 | | if (activecpu_get_pc() == 0x06013EEC) cpu_spinuntil_int(); |
| 914 | if (activecpu_get_pc() == 0x06013EEA) cpu_spinuntil_int(); |
| 809 | 915 | return stv_workram_h[0x00075958/4]; |
| 810 | 916 | } |
| 811 | 917 | |
| 812 | 918 | static void thunt_slave_speedup(UINT32 data) |
| 813 | 919 | { |
| 814 | | if (activecpu_get_pc() == 0x0602AAFA) |
| 920 | if (activecpu_get_pc() == 0x0602AAF8) |
| 815 | 921 | if ( (data & 0x00800000) == 0 ) |
| 816 | 922 | cpunum_spinuntil_trigger(1, 1000); |
| 817 | 923 | } |
| 818 | 924 | |
| 819 | 925 | DRIVER_INIT(thunt) |
| 820 | 926 | { |
| 927 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 928 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602A024); |
| 929 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 930 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013EEA); |
| 931 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 932 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602AAF8); |
| 933 | |
| 821 | 934 | /* |
| 822 | 935 | 0602A024: MOV.L @R6,R0 // 06031424 |
| 823 | 936 | 0602A026: TST R0,R0 |
| r2956 | r2957 | |
| 854 | 967 | |
| 855 | 968 | static READ32_HANDLER(sandor_speedup_r) |
| 856 | 969 | { |
| 857 | | if (activecpu_get_pc() == 0x0602a0fa) cpu_spinuntil_int(); |
| 970 | if (activecpu_get_pc() == 0x0602a0f8) cpu_spinuntil_int(); |
| 858 | 971 | return stv_workram_h[0x000314f8/4]; |
| 859 | 972 | } |
| 860 | 973 | |
| 861 | 974 | static READ32_HANDLER(sandor_speedup2_r) |
| 862 | 975 | { |
| 863 | | if (activecpu_get_pc() == 0x06013fc0) cpu_spinuntil_int(); |
| 976 | if (activecpu_get_pc() == 0x06013fbe) cpu_spinuntil_int(); |
| 864 | 977 | return stv_workram_h[0x00075a2c/4]; |
| 865 | 978 | } |
| 866 | 979 | |
| 867 | 980 | |
| 868 | 981 | static void sandor_slave_speedup(UINT32 data) |
| 869 | 982 | { |
| 870 | | if (activecpu_get_pc() == 0x0602abce) |
| 983 | if (activecpu_get_pc() == 0x0602abcc) |
| 871 | 984 | if ( (data & 0x00800000) == 0 ) |
| 872 | 985 | cpunum_spinuntil_trigger(1, 1000); |
| 873 | 986 | } |
| 874 | 987 | |
| 875 | 988 | DRIVER_INIT(sandor) |
| 876 | 989 | { |
| 990 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 991 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602a0f8); |
| 992 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT+1); |
| 993 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013fbe); |
| 994 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 995 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602abcc); |
| 996 | |
| 877 | 997 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060314f8, 0x060314fb, 0, 0, sandor_speedup_r ); |
| 878 | 998 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x06075a2c, 0x06075a2f, 0, 0, sandor_speedup2_r ); |
| 879 | 999 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf *)sandor_slave_speedup); |
| r2956 | r2957 | |
| 884 | 1004 | |
| 885 | 1005 | static READ32_HANDLER(grdforce_speedup_r) |
| 886 | 1006 | { |
| 887 | | if ( activecpu_get_pc() == 0x06041E34 ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1007 | if ( activecpu_get_pc() == 0x06041E32 ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 888 | 1008 | return stv_workram_h[0x000ffc10/4]; |
| 889 | 1009 | } |
| 890 | 1010 | |
| 891 | 1011 | static void grdforce_slave_speedup( UINT32 data ) |
| 892 | 1012 | { |
| 893 | | if (activecpu_get_pc() == 0x06043aa4) |
| 1013 | if (activecpu_get_pc() == 0x06043aa2) |
| 894 | 1014 | if ( (data & 0x00800000) == 0 ) |
| 895 | 1015 | { |
| 896 | 1016 | if ( |
| r2956 | r2957 | |
| 910 | 1030 | |
| 911 | 1031 | DRIVER_INIT(grdforce) |
| 912 | 1032 | { |
| 1033 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1034 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6041e32); |
| 1035 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1036 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6043aa2); |
| 913 | 1037 | /* |
| 914 | 1038 | 06041E2C: MOV.L @($03C8,GBR),R0 |
| 915 | 1039 | 06041E2E: JSR R0 |
| r2956 | r2957 | |
| 932 | 1056 | static READ32_HANDLER( batmanfr_speedup_r ) |
| 933 | 1057 | { |
| 934 | 1058 | //logerror( "batmanfr speedup: pc = %08x, mem = %08x\n", activecpu_get_pc(), stv_workram_h[0x0002acf0/4] ); |
| 935 | | if ( activecpu_get_pc() != 0x060121c2 ) |
| 1059 | if ( activecpu_get_pc() != 0x060121c0 ) |
| 936 | 1060 | cpu_spinuntil_int(); |
| 937 | 1061 | |
| 938 | 1062 | return stv_workram_h[0x0002acf0/4]; |
| r2956 | r2957 | |
| 940 | 1064 | |
| 941 | 1065 | static void batmanfr_slave_speedup( UINT32 data ) |
| 942 | 1066 | { |
| 943 | | if (activecpu_get_pc() == 0x060125be ) |
| 1067 | if (activecpu_get_pc() == 0x060125bc ) |
| 944 | 1068 | if ( (data & 0x00800000) == 0 ) |
| 945 | 1069 | cpunum_spinuntil_trigger(1, 1000); |
| 946 | 1070 | } |
| r2956 | r2957 | |
| 948 | 1072 | |
| 949 | 1073 | DRIVER_INIT(batmanfr) |
| 950 | 1074 | { |
| 1075 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1076 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60121c0); |
| 1077 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1078 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60125bc); |
| 1079 | |
| 951 | 1080 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0602acf0, 0x0602acf3, 0, 0, batmanfr_speedup_r ); |
| 952 | 1081 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)batmanfr_slave_speedup ); |
| 953 | 1082 | |
| r2956 | r2957 | |
| 959 | 1088 | |
| 960 | 1089 | static void colmns97_slave_speedup( UINT32 data ) |
| 961 | 1090 | { |
| 962 | | if (activecpu_get_pc() == 0x060298a4 ) |
| 1091 | if (activecpu_get_pc() == 0x060298a2 ) |
| 963 | 1092 | if ( (data & 0x00800000) == 0 ) |
| 964 | 1093 | if ( (stv_workram_h[0x0ffc48/4] != 0x260ef3fc) ) |
| 965 | 1094 | { |
| r2956 | r2957 | |
| 971 | 1100 | |
| 972 | 1101 | DRIVER_INIT(colmns97) |
| 973 | 1102 | { |
| 1103 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1104 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60298a2); |
| 1105 | |
| 974 | 1106 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)colmns97_slave_speedup ); |
| 975 | 1107 | |
| 976 | 1108 | DRIVER_INIT_CALL(ic13); |
| r2956 | r2957 | |
| 981 | 1113 | |
| 982 | 1114 | static READ32_HANDLER(winterht_speedup_r) |
| 983 | 1115 | { |
| 984 | | if ( activecpu_get_pc() == 0x06098aec ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20));//cpu_spinuntil_int(); |
| 1116 | if ( activecpu_get_pc() == 0x06098aea ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20));//cpu_spinuntil_int(); |
| 985 | 1117 | return stv_workram_h[0x000ffc10/4]; |
| 986 | 1118 | } |
| 987 | 1119 | |
| 988 | 1120 | static void winterht_slave_speedup( UINT32 data ) |
| 989 | 1121 | { |
| 990 | | if (activecpu_get_pc() == 0x0609ae50 ) |
| 1122 | if (activecpu_get_pc() == 0x0609ae4e ) |
| 991 | 1123 | if ( (data & 0x00800000) == 0 ) |
| 992 | 1124 | cpunum_spinuntil_trigger(1, 1000); |
| 993 | 1125 | } |
| 994 | 1126 | |
| 995 | 1127 | DRIVER_INIT(winterht) |
| 996 | 1128 | { |
| 1129 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1130 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6098aea); |
| 1131 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1132 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x609ae4e); |
| 1133 | |
| 997 | 1134 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060ffc10, 0x060ffc13, 0, 0, winterht_speedup_r ); |
| 998 | 1135 | |
| 999 | 1136 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)winterht_slave_speedup ); |
| r2956 | r2957 | |
| 1005 | 1142 | |
| 1006 | 1143 | static READ32_HANDLER(seabass_speedup_r) |
| 1007 | 1144 | { |
| 1008 | | if ( activecpu_get_pc() == 0x0602cbfc ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1145 | if ( activecpu_get_pc() == 0x0602cbfa ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1009 | 1146 | return stv_workram_h[0x000ffc10/4]; |
| 1010 | 1147 | } |
| 1011 | 1148 | |
| 1012 | 1149 | static void seabass_slave_speedup( UINT32 data ) |
| 1013 | 1150 | { |
| 1014 | | if (activecpu_get_pc() == 0x060321f0 ) |
| 1151 | if (activecpu_get_pc() == 0x060321ee ) |
| 1015 | 1152 | if ( (data & 0x00800000) == 0 ) |
| 1016 | 1153 | cpunum_spinuntil_trigger(1, 1000); |
| 1017 | 1154 | } |
| r2956 | r2957 | |
| 1019 | 1156 | |
| 1020 | 1157 | DRIVER_INIT(seabass) |
| 1021 | 1158 | { |
| 1159 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1160 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602cbfa); |
| 1161 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1162 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60321ee); |
| 1163 | |
| 1022 | 1164 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060ffc10, 0x060ffc13, 0, 0, seabass_speedup_r ); |
| 1023 | 1165 | |
| 1024 | 1166 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)seabass_slave_speedup ); |
| r2956 | r2957 | |
| 1030 | 1172 | |
| 1031 | 1173 | static void vfremix_slave_speedup( UINT32 data ) |
| 1032 | 1174 | { |
| 1033 | | if (activecpu_get_pc() == 0x0604C334 ) |
| 1175 | if (activecpu_get_pc() == 0x0604C332 ) |
| 1034 | 1176 | if ( (data & 0x00800000) == 0 ) |
| 1035 | 1177 | cpunum_spinuntil_trigger(1, 1000); |
| 1036 | 1178 | } |
| 1037 | 1179 | |
| 1038 | 1180 | static READ32_HANDLER(vfremix_speedup_r) |
| 1039 | 1181 | { |
| 1040 | | if ( activecpu_get_pc() == 0x0602c30e ) cpu_spinuntil_int(); |
| 1182 | if ( activecpu_get_pc() == 0x0602c30c ) cpu_spinuntil_int(); |
| 1041 | 1183 | return stv_workram_h[0x00074f98/4]; |
| 1042 | 1184 | } |
| 1043 | 1185 | |
| 1044 | 1186 | DRIVER_INIT(vfremix) |
| 1045 | 1187 | { |
| 1188 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1189 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602c30c); |
| 1190 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1191 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x604c332); |
| 1192 | |
| 1046 | 1193 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x06074f98, 0x06074f9b, 0, 0, vfremix_speedup_r ); |
| 1047 | 1194 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)vfremix_slave_speedup ); |
| 1048 | 1195 | |
| r2956 | r2957 | |
| 1054 | 1201 | |
| 1055 | 1202 | static READ32_HANDLER(sss_speedup_r) |
| 1056 | 1203 | { |
| 1057 | | if ( activecpu_get_pc() == 0x0602639a ) cpu_spinuntil_int(); |
| 1204 | if ( activecpu_get_pc() == 0x06026398 ) cpu_spinuntil_int(); |
| 1058 | 1205 | return stv_workram_h[0x000ffc10/4]; |
| 1059 | 1206 | } |
| 1060 | 1207 | |
| 1061 | 1208 | static void sss_slave_speedup( UINT32 data ) |
| 1062 | 1209 | { |
| 1063 | | if (activecpu_get_pc() == 0x06028cd8 ) |
| 1210 | if (activecpu_get_pc() == 0x06028cd6 ) |
| 1064 | 1211 | if ( (data & 0x00800000) == 0 ) |
| 1065 | 1212 | cpunum_spinuntil_trigger(1, 1000); |
| 1066 | 1213 | } |
| 1067 | 1214 | |
| 1068 | 1215 | DRIVER_INIT(sss) |
| 1069 | 1216 | { |
| 1217 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1218 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6026398); |
| 1219 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1220 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6028cd6); |
| 1221 | |
| 1070 | 1222 | install_standard_protection(machine); |
| 1071 | 1223 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060ffc10, 0x060ffc13, 0, 0, sss_speedup_r ); |
| 1072 | 1224 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)sss_slave_speedup ); |
| r2956 | r2957 | |
| 1078 | 1230 | |
| 1079 | 1231 | static READ32_HANDLER(othellos_speedup_r) |
| 1080 | 1232 | { |
| 1081 | | if ( activecpu_get_pc() == 0x0602bcc0 ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1233 | if ( activecpu_get_pc() == 0x0602bcbe ) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1082 | 1234 | return stv_workram_h[0x000ffc10/4]; |
| 1083 | 1235 | } |
| 1084 | 1236 | |
| 1085 | 1237 | static void othellos_slave_speedup( UINT32 data ) |
| 1086 | 1238 | { |
| 1087 | | if (activecpu_get_pc() == 0x0602d930 ) |
| 1239 | if (activecpu_get_pc() == 0x0602d92e ) |
| 1088 | 1240 | if ( (data & 0x00800000) == 0 ) |
| 1089 | 1241 | if ( (stv_workram_h[0x0ffc48/4] != 0x260fd25c ) ) |
| 1090 | 1242 | { |
| r2956 | r2957 | |
| 1095 | 1247 | |
| 1096 | 1248 | DRIVER_INIT(othellos) |
| 1097 | 1249 | { |
| 1250 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1251 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602bcbe); |
| 1252 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1253 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602d92e); |
| 1254 | |
| 1098 | 1255 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060ffc10, 0x060ffc13, 0, 0, othellos_speedup_r ); |
| 1099 | 1256 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)othellos_slave_speedup ); |
| 1100 | 1257 | |
| r2956 | r2957 | |
| 1106 | 1263 | |
| 1107 | 1264 | static void sasissu_slave_speedup( UINT32 data ) |
| 1108 | 1265 | { |
| 1109 | | if ( activecpu_get_pc() == 0x060710C0 ) |
| 1266 | if ( activecpu_get_pc() == 0x060710be ) |
| 1110 | 1267 | if ( (data & 0x00800000) == 0 ) |
| 1111 | 1268 | cpunum_spinuntil_trigger(1, 1000); |
| 1112 | 1269 | } |
| 1113 | 1270 | |
| 1114 | 1271 | DRIVER_INIT(sasissu) |
| 1115 | 1272 | { |
| 1273 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1274 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60710be); |
| 1275 | |
| 1116 | 1276 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)sasissu_slave_speedup ); |
| 1117 | 1277 | |
| 1118 | 1278 | DRIVER_INIT_CALL(ic13); |
| r2956 | r2957 | |
| 1122 | 1282 | |
| 1123 | 1283 | static READ32_HANDLER(gaxeduel_speedup_r) |
| 1124 | 1284 | { |
| 1125 | | if ( activecpu_get_pc() == 0x06012ee6 ) cpu_spinuntil_int(); |
| 1285 | if ( activecpu_get_pc() == 0x06012ee4 ) cpu_spinuntil_int(); |
| 1126 | 1286 | return stv_workram_l[0x000f4068 / 4]; |
| 1127 | 1287 | } |
| 1128 | 1288 | |
| 1129 | 1289 | DRIVER_INIT(gaxeduel) |
| 1130 | 1290 | { |
| 1291 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1292 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6012ee4); |
| 1293 | |
| 1131 | 1294 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x002f4068, 0x002f406b, 0, 0, gaxeduel_speedup_r); |
| 1132 | 1295 | DRIVER_INIT_CALL(ic13); |
| 1133 | 1296 | } |
| 1134 | 1297 | |
| 1135 | 1298 | static READ32_HANDLER(suikoenb_speedup_r) |
| 1136 | 1299 | { |
| 1137 | | if ( activecpu_get_pc() == 0x06013f7c ) cpu_spinuntil_int(); |
| 1300 | if ( activecpu_get_pc() == 0x06013f7a ) cpu_spinuntil_int(); |
| 1138 | 1301 | return stv_workram_h[0x000705d0 / 4]; |
| 1139 | 1302 | } |
| 1140 | 1303 | |
| 1141 | 1304 | DRIVER_INIT(suikoenb) |
| 1142 | 1305 | { |
| 1306 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1307 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6013f7a); |
| 1308 | |
| 1143 | 1309 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060705d0, 0x060705d3, 0, 0, suikoenb_speedup_r); |
| 1144 | 1310 | DRIVER_INIT_CALL(ic13); |
| 1145 | 1311 | } |
| r2956 | r2957 | |
| 1148 | 1314 | { |
| 1149 | 1315 | logerror( "SlaveSH2: Idle loop skip, data = %08X\n", data ); |
| 1150 | 1316 | if (stv_enable_slave_sh2) |
| 1151 | | if ( activecpu_get_pc() == 0x0605eec2 ) |
| 1317 | if ( activecpu_get_pc() == 0x0605eec0 ) |
| 1152 | 1318 | if ( (data & 0x00800000) == 0 ) |
| 1153 | 1319 | cpunum_spinuntil_trigger(1, 1000); |
| 1154 | 1320 | } |
| 1155 | 1321 | |
| 1156 | 1322 | static READ32_HANDLER(sokyugrt_speedup_r) |
| 1157 | 1323 | { |
| 1158 | | if ( activecpu_get_pc() == 0x0605d9dc ) cpu_spinuntil_int(); |
| 1324 | if ( activecpu_get_pc() == 0x0605d9da ) cpu_spinuntil_int(); |
| 1159 | 1325 | return stv_workram_h[0x000788cc / 4]; |
| 1160 | 1326 | } |
| 1161 | 1327 | |
| 1162 | 1328 | DRIVER_INIT(sokyugrt) |
| 1163 | 1329 | { |
| 1330 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1331 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605d9da); |
| 1332 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1333 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605eec0); |
| 1334 | |
| 1164 | 1335 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)sokyugrt_slave_speedup ); |
| 1165 | 1336 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060788cc, 0x060788cf, 0, 0, sokyugrt_speedup_r); |
| 1166 | 1337 | DRIVER_INIT_CALL(ic13); |
| r2956 | r2957 | |
| 1170 | 1341 | |
| 1171 | 1342 | static READ32_HANDLER( znpwfv_speedup_r ) |
| 1172 | 1343 | { |
| 1173 | | if (activecpu_get_pc()==0x6012ec4) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1344 | if (activecpu_get_pc()==0x6012ec2) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1174 | 1345 | return stv_workram_h[0x0ffc10/4]; |
| 1175 | 1346 | } |
| 1176 | 1347 | |
| 1177 | 1348 | static void znpwfv_slave_speedup( UINT32 data ) |
| 1178 | 1349 | { |
| 1179 | | if ( activecpu_get_pc() == 0x060175a8 ) |
| 1350 | if ( activecpu_get_pc() == 0x060175a6 ) |
| 1180 | 1351 | if ( (data & 0x00800000) == 0 ) |
| 1181 | 1352 | { |
| 1182 | 1353 | if ( |
| r2956 | r2957 | |
| 1194 | 1365 | |
| 1195 | 1366 | DRIVER_INIT(znpwfv) |
| 1196 | 1367 | { |
| 1368 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1369 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6012ec2); |
| 1370 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1371 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x60175a6); |
| 1372 | |
| 1197 | 1373 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)znpwfv_slave_speedup ); |
| 1198 | 1374 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, znpwfv_speedup_r ); |
| 1199 | 1375 | |
| r2956 | r2957 | |
| 1203 | 1379 | |
| 1204 | 1380 | static READ32_HANDLER( twcup98_speedup_r ) |
| 1205 | 1381 | { |
| 1206 | | if (activecpu_get_pc()==0x605ede0) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1382 | if (activecpu_get_pc()==0x605edde) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1207 | 1383 | return stv_workram_h[0x0ffc10/4]; |
| 1208 | 1384 | } |
| 1209 | 1385 | |
| 1210 | 1386 | static void twcup98_slave_speedup( UINT32 data ) |
| 1211 | 1387 | { |
| 1212 | | if ( activecpu_get_pc() == 0x06062bcc ) |
| 1388 | if ( activecpu_get_pc() == 0x06062bca ) |
| 1213 | 1389 | if ( (data & 0x00800000) == 0 ) |
| 1214 | 1390 | cpunum_spinuntil_trigger(1, 1000); |
| 1215 | 1391 | } |
| 1216 | 1392 | |
| 1217 | 1393 | DRIVER_INIT(twcup98) |
| 1218 | 1394 | { |
| 1395 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1396 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605edde); |
| 1397 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1398 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6062bca); |
| 1399 | |
| 1219 | 1400 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)twcup98_slave_speedup ); |
| 1220 | 1401 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, twcup98_speedup_r ); |
| 1221 | 1402 | |
| r2956 | r2957 | |
| 1227 | 1408 | |
| 1228 | 1409 | static READ32_HANDLER( smleague_speedup_r ) |
| 1229 | 1410 | { |
| 1230 | | if (activecpu_get_pc()==0x6063bf6) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1411 | if (activecpu_get_pc()==0x6063bf4) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1231 | 1412 | return stv_workram_h[0x0ffc10/4]; |
| 1232 | 1413 | } |
| 1233 | 1414 | |
| 1234 | 1415 | static void smleague_slave_speedup( UINT32 data ) |
| 1235 | 1416 | { |
| 1236 | | if ( activecpu_get_pc() == 0x06062bcc ) |
| 1417 | if ( activecpu_get_pc() == 0x06062bca ) |
| 1237 | 1418 | if ( (data & 0x00800000) == 0 ) |
| 1238 | 1419 | cpunum_spinuntil_trigger(1, 1000); |
| 1239 | 1420 | } |
| 1240 | 1421 | |
| 1241 | 1422 | DRIVER_INIT(smleague) |
| 1242 | 1423 | { |
| 1424 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1425 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6063bf4); |
| 1426 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1427 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6062bca); |
| 1428 | |
| 1243 | 1429 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)smleague_slave_speedup ); |
| 1244 | 1430 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, smleague_speedup_r ); |
| 1245 | 1431 | |
| r2956 | r2957 | |
| 1250 | 1436 | |
| 1251 | 1437 | static READ32_HANDLER( finlarch_speedup_r ) |
| 1252 | 1438 | { |
| 1253 | | if (activecpu_get_pc()==0x6064d62) cpu_spinuntil_int(); |
| 1439 | if (activecpu_get_pc()==0x6064d60) cpu_spinuntil_int(); |
| 1254 | 1440 | return stv_workram_h[0x0ffc10/4]; |
| 1255 | 1441 | } |
| 1256 | 1442 | |
| 1257 | 1443 | |
| 1258 | 1444 | DRIVER_INIT(finlarch) |
| 1259 | 1445 | { |
| 1446 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1447 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6064d60); |
| 1448 | |
| 1260 | 1449 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, finlarch_speedup_r ); |
| 1261 | 1450 | |
| 1262 | 1451 | DRIVER_INIT_CALL(ic13); |
| r2956 | r2957 | |
| 1265 | 1454 | |
| 1266 | 1455 | static READ32_HANDLER( maruchan_speedup_r ) |
| 1267 | 1456 | { |
| 1268 | | if (activecpu_get_pc()==0x06012a54) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1457 | if (activecpu_get_pc()==0x06012a52) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1269 | 1458 | return stv_workram_h[0x0ffc10/4]; |
| 1270 | 1459 | } |
| 1271 | 1460 | |
| 1272 | 1461 | static void maruchan_slave_speedup( UINT32 data ) |
| 1273 | 1462 | { |
| 1274 | | if ( activecpu_get_pc() == 0x0601ba48 ) |
| 1463 | if ( activecpu_get_pc() == 0x0601ba46 ) |
| 1275 | 1464 | if ( (data & 0x00800000) == 0 ) |
| 1276 | 1465 | if ( |
| 1277 | 1466 | (stv_workram_h[0x0ffc48/4] != 0x260ef3c8) && |
| r2956 | r2957 | |
| 1287 | 1476 | |
| 1288 | 1477 | DRIVER_INIT(maruchan) |
| 1289 | 1478 | { |
| 1479 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1480 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x601ba46); |
| 1481 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1482 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x601ba46); |
| 1483 | |
| 1290 | 1484 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)maruchan_slave_speedup ); |
| 1291 | 1485 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, maruchan_speedup_r ); |
| 1292 | 1486 | |
| r2956 | r2957 | |
| 1297 | 1491 | |
| 1298 | 1492 | static READ32_HANDLER( pblbeach_speedup_r ) |
| 1299 | 1493 | { |
| 1300 | | if (activecpu_get_pc()==0x0605eb7a) |
| 1494 | if (activecpu_get_pc()==0x0605eb78) |
| 1301 | 1495 | if (stv_workram_h[0x006c398/4] != 0) |
| 1302 | 1496 | cpu_spinuntil_int(); |
| 1303 | 1497 | return stv_workram_h[0x006c398/4]; |
| r2956 | r2957 | |
| 1305 | 1499 | |
| 1306 | 1500 | DRIVER_INIT(pblbeach) |
| 1307 | 1501 | { |
| 1502 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1503 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605eb78); |
| 1504 | |
| 1308 | 1505 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0606c398, 0x0606c39b, 0, 0, pblbeach_speedup_r ); |
| 1309 | 1506 | |
| 1310 | 1507 | DRIVER_INIT_CALL(ic13); |
| r2956 | r2957 | |
| 1312 | 1509 | |
| 1313 | 1510 | static READ32_HANDLER( shanhigw_speedup_r ) |
| 1314 | 1511 | { |
| 1315 | | if (activecpu_get_pc()==0x06020c5e) |
| 1512 | if (activecpu_get_pc()==0x06020c5c) |
| 1316 | 1513 | cpu_spinuntil_int(); |
| 1317 | 1514 | return stv_workram_h[0x95cd8/4]; |
| 1318 | 1515 | } |
| 1319 | 1516 | |
| 1320 | 1517 | DRIVER_INIT(shanhigw) |
| 1321 | 1518 | { |
| 1519 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1520 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6020c5c); |
| 1521 | |
| 1322 | 1522 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x06095cd8, 0x06095cdb, 0, 0, shanhigw_speedup_r ); |
| 1323 | 1523 | |
| 1324 | 1524 | DRIVER_INIT_CALL(stv); |
| r2956 | r2957 | |
| 1326 | 1526 | |
| 1327 | 1527 | static READ32_HANDLER( elandore_speedup_r ) |
| 1328 | 1528 | { |
| 1329 | | if (activecpu_get_pc()==0x0604eac2) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1529 | if (activecpu_get_pc()==0x0604eac0) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1330 | 1530 | return stv_workram_h[0x0ffc10/4]; |
| 1331 | 1531 | } |
| 1332 | 1532 | |
| 1333 | 1533 | |
| 1334 | 1534 | static void elandore_slave_speedup(UINT32 data) |
| 1335 | 1535 | { |
| 1336 | | if (activecpu_get_pc() == 0x0605340c) |
| 1536 | if (activecpu_get_pc() == 0x0605340a) |
| 1337 | 1537 | if ( (data & 0x00800000) == 0 ) |
| 1338 | 1538 | if ( (stv_workram_h[0x0ffc48/4] != 0x260ee018) ) |
| 1339 | 1539 | { |
| r2956 | r2957 | |
| 1345 | 1545 | |
| 1346 | 1546 | DRIVER_INIT(elandore) |
| 1347 | 1547 | { |
| 1548 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1549 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x604eac0); |
| 1550 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1551 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605340a); |
| 1552 | |
| 1348 | 1553 | install_standard_protection(machine); |
| 1349 | 1554 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, elandore_speedup_r ); |
| 1350 | 1555 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf *)elandore_slave_speedup); |
| r2956 | r2957 | |
| 1355 | 1560 | |
| 1356 | 1561 | static READ32_HANDLER( rsgun_speedup_r ) |
| 1357 | 1562 | { |
| 1358 | | if (activecpu_get_pc()==0x06034d06) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1563 | if (activecpu_get_pc()==0x06034d04) cpu_spinuntil_time(ATTOTIME_IN_USEC(20)); |
| 1359 | 1564 | return stv_workram_h[0x0ffc10/4]; |
| 1360 | 1565 | } |
| 1361 | 1566 | |
| 1362 | 1567 | static void rsgun_slave_speedup(UINT32 data) |
| 1363 | 1568 | { |
| 1364 | | if (activecpu_get_pc() == 0x06036154) |
| 1569 | if (activecpu_get_pc() == 0x06036152) |
| 1365 | 1570 | if ( (data & 0x00800000) == 0 ) |
| 1366 | 1571 | if ((stv_workram_h[0x0ffc48/4] != 0x260efc50)) |
| 1367 | 1572 | { |
| r2956 | r2957 | |
| 1373 | 1578 | |
| 1374 | 1579 | DRIVER_INIT(rsgun) |
| 1375 | 1580 | { |
| 1581 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1582 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6034d04); |
| 1583 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1584 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x6036152); |
| 1585 | |
| 1376 | 1586 | install_standard_protection(machine); |
| 1377 | 1587 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60ffc10, 0x60ffc13, 0, 0, rsgun_speedup_r ); |
| 1378 | 1588 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf *)rsgun_slave_speedup); |
| r2956 | r2957 | |
| 1397 | 1607 | |
| 1398 | 1608 | static READ32_HANDLER( nameclv3_speedup_r ) |
| 1399 | 1609 | { |
| 1400 | | if (activecpu_get_pc()==0x601eb4e) cpu_spinuntil_time(ATTOTIME_IN_USEC(30)); |
| 1610 | if (activecpu_get_pc()==0x601eb4c) cpu_spinuntil_time(ATTOTIME_IN_USEC(30)); |
| 1401 | 1611 | return stv_workram_h[0x0452c0/4]; |
| 1402 | 1612 | } |
| 1403 | 1613 | |
| 1404 | 1614 | static void nameclv3_slave_speedup( UINT32 data ) |
| 1405 | 1615 | { |
| 1406 | | if ( activecpu_get_pc() == 0x0602B810 ) |
| 1616 | if ( activecpu_get_pc() == 0x0602B80e ) |
| 1407 | 1617 | if ( (data & 0x00800000) == 0 ) |
| 1408 | 1618 | cpunum_spinuntil_trigger(1, 1000); |
| 1409 | 1619 | } |
| 1410 | 1620 | |
| 1411 | 1621 | DRIVER_INIT(nameclv3) |
| 1412 | 1622 | { |
| 1623 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1624 | cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x601eb4c); |
| 1625 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT); |
| 1626 | cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x602b80e); |
| 1627 | |
| 1413 | 1628 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x60452c0, 0x60452c3, 0, 0, nameclv3_speedup_r ); |
| 1414 | 1629 | cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)nameclv3_slave_speedup ); |
| 1415 | 1630 | DRIVER_INIT_CALL(stv); |
src/mame/drivers/taito_f2.c
| r2956 | r2957 | |
| 289 | 289 | ***************************************************************************/ |
| 290 | 290 | |
| 291 | 291 | #include "driver.h" |
| 292 | #include "taitoipt.h" |
| 292 | 293 | #include "cpu/m68000/m68000.h" |
| 293 | 294 | #include "video/taitoic.h" |
| 294 | 295 | #include "audio/taitosnd.h" |
| r2956 | r2957 | |
| 359 | 360 | switch (offset) |
| 360 | 361 | { |
| 361 | 362 | case 0x00: |
| 362 | | return input_port_read_indexed(machine,3); /* DSW A */ |
| 363 | return input_port_read(machine, "DSWA"); |
| 363 | 364 | |
| 364 | 365 | case 0x01: |
| 365 | | return input_port_read_indexed(machine,4); /* DSW B */ |
| 366 | return input_port_read(machine, "DSWB"); |
| 366 | 367 | } |
| 367 | 368 | |
| 368 | | logerror("CPU #0 PC %06x: warning - read unmapped dsw_r offset %06x\n",activecpu_get_pc(),offset); |
| 369 | logerror("CPU #0 PC %06x: warning - read unmapped dsw_r offset %06x\n", activecpu_get_pc(), offset); |
| 369 | 370 | |
| 370 | 371 | return 0xff; |
| 371 | 372 | } |
| r2956 | r2957 | |
| 375 | 376 | switch (offset) |
| 376 | 377 | { |
| 377 | 378 | case 0x00: |
| 378 | | return input_port_read_indexed(machine,0); /* IN0 */ |
| 379 | return input_port_read(machine, "IN0"); |
| 379 | 380 | |
| 380 | 381 | case 0x01: |
| 381 | | return input_port_read_indexed(machine,1); /* IN1 */ |
| 382 | return input_port_read(machine, "IN1"); |
| 382 | 383 | |
| 383 | 384 | case 0x02: |
| 384 | | return input_port_read_indexed(machine,2); /* IN2 */ |
| 385 | return input_port_read(machine, "IN2"); |
| 385 | 386 | |
| 386 | 387 | } |
| 387 | 388 | |
| 388 | | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| 389 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n", activecpu_get_pc(), offset); |
| 389 | 390 | |
| 390 | 391 | return 0xff; |
| 391 | 392 | } |
| r2956 | r2957 | |
| 395 | 396 | switch (offset) |
| 396 | 397 | { |
| 397 | 398 | case 0x00: |
| 398 | | return input_port_read_indexed(machine,3); /* DSW A */ |
| 399 | return input_port_read(machine, "DSWA"); |
| 399 | 400 | |
| 400 | 401 | case 0x01: |
| 401 | | return input_port_read_indexed(machine,4); /* DSW B */ |
| 402 | return input_port_read(machine, "DSWB"); |
| 402 | 403 | |
| 403 | 404 | case 0x02: |
| 404 | | return input_port_read_indexed(machine,2); /* IN2 */ |
| 405 | return input_port_read(machine, "IN2"); |
| 405 | 406 | |
| 406 | 407 | // case 0x03: |
| 407 | 408 | // return (coin_word & mem_mask); |
| 408 | 409 | |
| 409 | 410 | case 0x05: |
| 410 | | return input_port_read_indexed(machine,0); /* IN0 */ |
| 411 | return input_port_read(machine, "IN0"); |
| 411 | 412 | |
| 412 | 413 | case 0x06: |
| 413 | | return input_port_read_indexed(machine,1); /* IN1 */ |
| 414 | return input_port_read(machine, "IN1"); |
| 414 | 415 | |
| 415 | 416 | case 0x07: |
| 416 | | return input_port_read_indexed(machine,5); /* IN3 */ |
| 417 | return input_port_read(machine, "IN3"); |
| 417 | 418 | |
| 418 | 419 | case 0x08: |
| 419 | | return input_port_read_indexed(machine,6); /* IN4 */ |
| 420 | return input_port_read(machine, "IN4"); |
| 420 | 421 | } |
| 421 | 422 | |
| 422 | | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n",activecpu_get_pc(),offset); |
| 423 | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n", activecpu_get_pc(), offset); |
| 423 | 424 | |
| 424 | 425 | return 0xff; |
| 425 | 426 | } |
| r2956 | r2957 | |
| 429 | 430 | switch (offset) |
| 430 | 431 | { |
| 431 | 432 | case 0x00: |
| 432 | | return (input_port_read_indexed(machine,3) << 8); /* DSW A */ |
| 433 | return (input_port_read(machine, "DSWA") << 8); |
| 433 | 434 | |
| 434 | 435 | case 0x01: |
| 435 | | return (input_port_read_indexed(machine,4) << 8); /* DSW B */ |
| 436 | return (input_port_read(machine, "DSWB") << 8); |
| 436 | 437 | |
| 437 | 438 | case 0x02: |
| 438 | | return (input_port_read_indexed(machine,0) << 8); /* IN 0 */ |
| 439 | return (input_port_read(machine, "IN0") << 8); |
| 439 | 440 | |
| 440 | 441 | case 0x03: |
| 441 | | return (input_port_read_indexed(machine,1) << 8); /* IN 1 */ |
| 442 | return (input_port_read(machine, "IN1") << 8); |
| 442 | 443 | |
| 443 | 444 | case 0x04: |
| 444 | | return (input_port_read_indexed(machine,5) << 8); /* IN 3 */ |
| 445 | return (input_port_read(machine, "IN3") << 8); |
| 445 | 446 | |
| 446 | 447 | case 0x05: |
| 447 | | return (input_port_read_indexed(machine,6) << 8); /* IN 4 */ |
| 448 | return (input_port_read(machine, "IN4") << 8); |
| 448 | 449 | |
| 449 | 450 | case 0x06: |
| 450 | | return (input_port_read_indexed(machine,2) << 8); /* IN 2 */ |
| 451 | return (input_port_read(machine, "IN2") << 8); |
| 451 | 452 | |
| 452 | 453 | // case 0x07: |
| 453 | 454 | // return (coin_word & mem_mask); |
| 454 | 455 | } |
| 455 | 456 | |
| 456 | | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n",activecpu_get_pc(),offset); |
| 457 | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n", activecpu_get_pc(), offset); |
| 457 | 458 | |
| 458 | 459 | return 0xff; |
| 459 | 460 | } |
| r2956 | r2957 | |
| 466 | 467 | switch (offset) |
| 467 | 468 | { |
| 468 | 469 | case 0x00: |
| 469 | | curr = input_port_read_indexed(machine,5); /* Paddle A */ |
| 470 | curr = input_port_read(machine, "PADDLE1"); |
| 470 | 471 | res = curr - last[0]; |
| 471 | 472 | last[0] = curr; |
| 472 | 473 | return res; |
| 473 | 474 | |
| 474 | 475 | case 0x02: |
| 475 | | curr = input_port_read_indexed(machine,6); /* Paddle B */ |
| 476 | curr = input_port_read(machine, "PADDLE2"); |
| 476 | 477 | res = curr - last[1]; |
| 477 | 478 | last[1] = curr; |
| 478 | 479 | return res; |
| 479 | 480 | } |
| 480 | 481 | |
| 481 | | logerror("CPU #0 PC %06x: warning - read unmapped paddle offset %06x\n",activecpu_get_pc(),offset); |
| 482 | logerror("CPU #0 PC %06x: warning - read unmapped paddle offset %06x\n", activecpu_get_pc(), offset); |
| 482 | 483 | |
| 483 | 484 | return 0; |
| 484 | 485 | } |
| r2956 | r2957 | |
| 488 | 489 | switch (offset) |
| 489 | 490 | { |
| 490 | 491 | case 0x00: |
| 491 | | return input_port_read_indexed(machine,5); /* Paddle A */ |
| 492 | return input_port_read(machine, "PADDLE1"); |
| 492 | 493 | |
| 493 | 494 | case 0x01: |
| 494 | | return input_port_read_indexed(machine,6); /* Paddle B */ |
| 495 | return input_port_read(machine, "PADDLE2"); |
| 495 | 496 | } |
| 496 | 497 | |
| 497 | | logerror("CPU #0 PC %06x: warning - read unmapped paddle offset %06x\n",activecpu_get_pc(),offset); |
| 498 | logerror("CPU #0 PC %06x: warning - read unmapped paddle offset %06x\n", activecpu_get_pc(), offset); |
| 498 | 499 | |
| 499 | 500 | return 0xff; |
| 500 | 501 | } |
| r2956 | r2957 | |
| 504 | 505 | switch (offset) |
| 505 | 506 | { |
| 506 | 507 | case 0x00: |
| 507 | | return input_port_read_indexed(machine,3); /* DSW A */ |
| 508 | return input_port_read(machine, "DSWA"); |
| 508 | 509 | |
| 509 | 510 | case 0x01: |
| 510 | | return input_port_read_indexed(machine,4); /* DSW B */ |
| 511 | return input_port_read(machine, "DSWB"); |
| 511 | 512 | |
| 512 | 513 | case 0x02: |
| 513 | | return input_port_read_indexed(machine,2); /* IN2 */ |
| 514 | return input_port_read(machine, "IN2"); |
| 514 | 515 | |
| 515 | 516 | // case 0x03: |
| 516 | 517 | // return (coin_word & mem_mask); |
| 517 | 518 | |
| 518 | 519 | case 0x05: |
| 519 | | return input_port_read_indexed(machine,0); /* IN0 */ |
| 520 | return input_port_read(machine, "IN0"); |
| 520 | 521 | |
| 521 | 522 | case 0x06: |
| 522 | | return input_port_read_indexed(machine,1); /* IN1 */ |
| 523 | return input_port_read(machine, "IN1"); |
| 523 | 524 | } |
| 524 | 525 | |
| 525 | | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n",activecpu_get_pc(),offset); |
| 526 | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n", activecpu_get_pc(), offset); |
| 526 | 527 | |
| 527 | 528 | return 0xff; |
| 528 | 529 | } |
| r2956 | r2957 | |
| 533 | 534 | { |
| 534 | 535 | case 0x00: |
| 535 | 536 | { |
| 536 | | return (input_port_read_indexed(machine,5) << 8) + input_port_read_indexed(machine,7); /* DSW A + coin */ |
| 537 | return (input_port_read(machine, "IN5") << 8) + input_port_read(machine, "DSWA"); /* DSW A + coin */ |
| 537 | 538 | } |
| 538 | 539 | |
| 539 | 540 | case 0x01: |
| 540 | 541 | { |
| 541 | | return (input_port_read_indexed(machine,6) << 8) + input_port_read_indexed(machine,8); /* DSW B + coin */ |
| 542 | return (input_port_read(machine, "IN6") << 8) + input_port_read(machine, "DSWB"); /* DSW B + coin */ |
| 542 | 543 | } |
| 543 | 544 | } |
| 544 | 545 | |
| 545 | | logerror("CPU #0 PC %06x: warning - read unmapped dsw_r offset %06x\n",activecpu_get_pc(),offset); |
| 546 | logerror("CPU #0 PC %06x: warning - read unmapped dsw_r offset %06x\n", activecpu_get_pc(), offset); |
| 546 | 547 | |
| 547 | 548 | return 0xff; |
| 548 | 549 | } |
| r2956 | r2957 | |
| 552 | 553 | switch (mjnquest_input) |
| 553 | 554 | { |
| 554 | 555 | case 0x01: |
| 555 | | return input_port_read_indexed(machine,0); /* IN0 */ |
| 556 | return input_port_read(machine, "IN0"); |
| 556 | 557 | |
| 557 | 558 | case 0x02: |
| 558 | | return input_port_read_indexed(machine,1); /* IN1 */ |
| 559 | return input_port_read(machine, "IN1"); |
| 559 | 560 | |
| 560 | 561 | case 0x04: |
| 561 | | return input_port_read_indexed(machine,2); /* IN2 */ |
| 562 | return input_port_read(machine, "IN2"); |
| 562 | 563 | |
| 563 | 564 | case 0x08: |
| 564 | | return input_port_read_indexed(machine,3); /* IN3 */ |
| 565 | return input_port_read(machine, "IN3"); |
| 565 | 566 | |
| 566 | 567 | case 0x10: |
| 567 | | return input_port_read_indexed(machine,4); /* IN4 */ |
| 568 | return input_port_read(machine, "IN4"); |
| 568 | 569 | |
| 569 | 570 | } |
| 570 | 571 | |
| 571 | | logerror("CPU #0 mjnquest_input %06x: warning - read unknown input %06x\n",activecpu_get_pc(),mjnquest_input); |
| 572 | logerror("CPU #0 mjnquest_input %06x: warning - read unknown input %06x\n", activecpu_get_pc(), mjnquest_input); |
| 572 | 573 | |
| 573 | 574 | return 0xff; |
| 574 | 575 | } |
| r2956 | r2957 | |
| 583 | 584 | switch (offset) |
| 584 | 585 | { |
| 585 | 586 | case 0x00: |
| 586 | | return input_port_read_indexed(machine,4); /* DSW B */ |
| 587 | return input_port_read(machine, "DSWB"); |
| 587 | 588 | |
| 588 | 589 | case 0x01: |
| 589 | | return input_port_read_indexed(machine,0); /* IN0 */ |
| 590 | return input_port_read(machine, "IN0"); |
| 590 | 591 | } |
| 591 | 592 | |
| 592 | | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| 593 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n", activecpu_get_pc(), offset); |
| 593 | 594 | |
| 594 | 595 | return 0xff; |
| 595 | 596 | } |
| r2956 | r2957 | |
| 599 | 600 | switch (offset) |
| 600 | 601 | { |
| 601 | 602 | case 0x00: |
| 602 | | return input_port_read_indexed(machine,3); /* DSW A */ |
| 603 | return input_port_read(machine, "DSWA"); |
| 603 | 604 | |
| 604 | 605 | case 0x01: |
| 605 | | return input_port_read_indexed(machine,1); /* IN1 */ |
| 606 | return input_port_read(machine, "IN1"); |
| 606 | 607 | |
| 607 | 608 | case 0x02: |
| 608 | | return input_port_read_indexed(machine,2); /* IN2 */ |
| 609 | return input_port_read(machine, "IN2"); |
| 609 | 610 | } |
| 610 | 611 | |
| 611 | | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| 612 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n", activecpu_get_pc(), offset); |
| 612 | 613 | |
| 613 | 614 | return 0xff; |
| 614 | 615 | } |
| r2956 | r2957 | |
| 618 | 619 | switch (offset) |
| 619 | 620 | { |
| 620 | 621 | case 0x00: |
| 621 | | return input_port_read_indexed(machine,0); /* IN0 */ |
| 622 | return input_port_read(machine, "IN0"); |
| 622 | 623 | |
| 623 | 624 | /* case 0x01 only used if "printer" DSW is on, and appears to |
| 624 | 625 | be printer status byte */ |
| 625 | 626 | |
| 626 | 627 | case 0x02: |
| 627 | | return input_port_read_indexed(machine,1); /* IN1 */ |
| 628 | return input_port_read(machine, "IN1"); |
| 628 | 629 | } |
| 629 | 630 | |
| 630 | | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| 631 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n", activecpu_get_pc(), offset); |
| 631 | 632 | |
| 632 | 633 | return 0x0; |
| 633 | 634 | } |
| r2956 | r2957 | |
| 635 | 636 | static READ16_HANDLER( yesnoj_dsw_r ) |
| 636 | 637 | { |
| 637 | 638 | #ifdef MAME_DEBUG |
| 638 | | logerror("CPU #0 PC = %06x: read yesnoj DSW %01x\n",activecpu_get_pc(),yesnoj_dsw); |
| 639 | logerror("CPU #0 PC = %06x: read yesnoj DSW %01x\n", activecpu_get_pc(), yesnoj_dsw); |
| 639 | 640 | #endif |
| 640 | 641 | |
| 641 | 642 | yesnoj_dsw = 1 - yesnoj_dsw; /* game reads same word twice to get DSW A then B so we toggle */ |
| 642 | 643 | |
| 643 | 644 | if (yesnoj_dsw) |
| 644 | 645 | { |
| 645 | | return input_port_read_indexed(machine,2); |
| 646 | return input_port_read(machine, "DSWA"); |
| 646 | 647 | } |
| 647 | 648 | else |
| 648 | 649 | { |
| 649 | | return input_port_read_indexed(machine,3); |
| 650 | return input_port_read(machine, "DSWB"); |
| 650 | 651 | } |
| 651 | 652 | } |
| 652 | 653 | |
| r2956 | r2957 | |
| 1166 | 1167 | AM_RANGE(0x300000, 0x30000f) AM_READ(growl_dsw_r) |
| 1167 | 1168 | AM_RANGE(0x320000, 0x32000f) AM_READ(growl_input_r) |
| 1168 | 1169 | AM_RANGE(0x400000, 0x400003) AM_READ(taitof2_msb_sound_r) |
| 1169 | | AM_RANGE(0x508000, 0x50800f) AM_READ(input_port_5_word_r) /* IN3 */ |
| 1170 | | AM_RANGE(0x50c000, 0x50c00f) AM_READ(input_port_6_word_r) /* IN4 */ |
| 1170 | AM_RANGE(0x508000, 0x50800f) AM_READ_PORT("IN3") |
| 1171 | AM_RANGE(0x50c000, 0x50c00f) AM_READ_PORT("IN4") |
| 1171 | 1172 | AM_RANGE(0x800000, 0x80ffff) AM_READ(TC0100SCN_word_0_r) /* tilemaps */ |
| 1172 | 1173 | AM_RANGE(0x820000, 0x82000f) AM_READ(TC0100SCN_ctrl_word_0_r) |
| 1173 | 1174 | AM_RANGE(0x900000, 0x90ffff) AM_READ(SMH_RAM) |
| r2956 | r2957 | |
| 1741 | 1742 | INPUT PORTS, DIPs |
| 1742 | 1743 | ***********************************************************/ |
| 1743 | 1744 | |
| 1744 | | #define TAITO_COINAGE_WORLD_8 \ |
| 1745 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1746 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 1747 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 1748 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 1749 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1750 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1751 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 1752 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 1753 | | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) \ |
| 1754 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 1755 | | |
| 1756 | | #define TAITO_COINAGE_JAPAN_8 \ |
| 1757 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1758 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 1759 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1760 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 1761 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 1762 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1763 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1764 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 1765 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 1766 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 1767 | | |
| 1768 | | /* This is a new Japanese coinage used in later TAITO games */ |
| 1769 | | #define TAITO_COINAGE_JAPAN_NEW_8 \ |
| 1770 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1771 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1772 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 1773 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1774 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 1775 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1776 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1777 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1778 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 1779 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 1780 | | |
| 1781 | | #define TAITO_COINAGE_US_8 \ |
| 1782 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) \ |
| 1783 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 1784 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 1785 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 1786 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1787 | | PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) \ |
| 1788 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1789 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1790 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) \ |
| 1791 | | PORT_DIPSETTING( 0xc0, "Same as Start" ) |
| 1792 | | |
| 1793 | | #define TAITO_DIFFICULTY_8 \ |
| 1794 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \ |
| 1795 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) \ |
| 1796 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) \ |
| 1797 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) \ |
| 1798 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1799 | | |
| 1800 | | #define TAITO_F2_PLAYERS_INPUT( player ) \ |
| 1801 | | PORT_START \ |
| 1802 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY \ |
| 1803 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \ |
| 1804 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \ |
| 1805 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \ |
| 1806 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ |
| 1807 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) |
| 1808 | | /* 0x40 and 0x80 are not always the same in all games, so they are not included here */ |
| 1809 | | |
| 1810 | 1745 | #define TAITO_F2_SYSTEM_INPUT \ |
| 1811 | | PORT_START \ |
| 1812 | 1746 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) \ |
| 1813 | 1747 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ |
| 1814 | 1748 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) \ |
| r2956 | r2957 | |
| 1829 | 1763 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1830 | 1764 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1831 | 1765 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1832 | | TAITO_COINAGE_WORLD_8 |
| 1766 | TAITO_COINAGE_WORLD |
| 1833 | 1767 | |
| 1834 | 1768 | PORT_START_TAG("DSWB") |
| 1835 | | TAITO_DIFFICULTY_8 |
| 1769 | TAITO_DIFFICULTY |
| 1836 | 1770 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1837 | 1771 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1838 | 1772 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1852 | 1786 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1853 | 1787 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1854 | 1788 | |
| 1855 | | /* IN0 */ |
| 1856 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 1857 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 1858 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1789 | PORT_START_TAG("IN0") |
| 1790 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 1859 | 1791 | |
| 1860 | | /* IN1 */ |
| 1861 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 1862 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 1863 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1792 | PORT_START_TAG("IN1") |
| 1793 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 1864 | 1794 | |
| 1865 | | /* IN2 */ |
| 1795 | PORT_START_TAG("IN2") |
| 1866 | 1796 | TAITO_F2_SYSTEM_INPUT /* controls below are DIP selectable */ |
| 1867 | 1797 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) /* 1P sen.sw.? */ |
| 1868 | 1798 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) /* 1P ducking? */ |
| r2956 | r2957 | |
| 1874 | 1804 | PORT_INCLUDE(finalb) |
| 1875 | 1805 | |
| 1876 | 1806 | PORT_MODIFY("DSWA") |
| 1877 | | TAITO_COINAGE_JAPAN_8 |
| 1807 | TAITO_COINAGE_JAPAN_OLD |
| 1878 | 1808 | INPUT_PORTS_END |
| 1879 | 1809 | |
| 1880 | 1810 | |
| r2956 | r2957 | |
| 1890 | 1820 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1891 | 1821 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1892 | 1822 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1893 | | TAITO_COINAGE_WORLD_8 |
| 1823 | TAITO_COINAGE_WORLD |
| 1894 | 1824 | |
| 1895 | 1825 | PORT_START_TAG("DSWB") |
| 1896 | | TAITO_DIFFICULTY_8 |
| 1826 | TAITO_DIFFICULTY |
| 1897 | 1827 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1898 | 1828 | PORT_DIPSETTING( 0x0c, "10k and 100k" ) |
| 1899 | 1829 | PORT_DIPSETTING( 0x08, "10k and 150k" ) |
| r2956 | r2957 | |
| 1911 | 1841 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1912 | 1842 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1913 | 1843 | |
| 1914 | | /* IN0 */ |
| 1915 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 1916 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1917 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1844 | PORT_START_TAG("IN0") |
| 1845 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 1918 | 1846 | |
| 1919 | | /* IN1 */ |
| 1920 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 1921 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1922 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1847 | PORT_START_TAG("IN1") |
| 1848 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 1923 | 1849 | |
| 1924 | | /* IN2 */ |
| 1850 | PORT_START_TAG("IN2") |
| 1925 | 1851 | TAITO_F2_SYSTEM_INPUT |
| 1926 | 1852 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1927 | 1853 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 1933 | 1859 | PORT_INCLUDE(dondokod) |
| 1934 | 1860 | |
| 1935 | 1861 | PORT_MODIFY("DSWA") |
| 1936 | | TAITO_COINAGE_US_8 |
| 1862 | TAITO_COINAGE_US |
| 1937 | 1863 | INPUT_PORTS_END |
| 1938 | 1864 | |
| 1939 | 1865 | static INPUT_PORTS_START( dondokdj ) |
| 1940 | 1866 | PORT_INCLUDE(dondokod) |
| 1941 | 1867 | |
| 1942 | 1868 | PORT_MODIFY("DSWA") |
| 1943 | | TAITO_COINAGE_JAPAN_8 |
| 1869 | TAITO_COINAGE_JAPAN_OLD |
| 1944 | 1870 | INPUT_PORTS_END |
| 1945 | 1871 | |
| 1946 | 1872 | |
| r2956 | r2957 | |
| 1956 | 1882 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1957 | 1883 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1958 | 1884 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1959 | | TAITO_COINAGE_WORLD_8 |
| 1885 | TAITO_COINAGE_WORLD |
| 1960 | 1886 | |
| 1961 | 1887 | PORT_START_TAG("DSWB") |
| 1962 | | TAITO_DIFFICULTY_8 |
| 1888 | TAITO_DIFFICULTY |
| 1963 | 1889 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1964 | 1890 | PORT_DIPSETTING( 0x0c, "100k only" ) |
| 1965 | 1891 | PORT_DIPSETTING( 0x04, "150k only" ) |
| r2956 | r2957 | |
| 1977 | 1903 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1978 | 1904 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1979 | 1905 | |
| 1980 | | /* IN0 */ |
| 1981 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 1982 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1983 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1906 | PORT_START_TAG("IN0") |
| 1907 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1984 | 1908 | |
| 1985 | | /* IN1 */ |
| 1986 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 1987 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1988 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1909 | PORT_START_TAG("IN1") |
| 1910 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1989 | 1911 | |
| 1990 | | /* IN2 */ |
| 1912 | PORT_START_TAG("IN2") |
| 1991 | 1913 | TAITO_F2_SYSTEM_INPUT |
| 1992 | 1914 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1993 | 1915 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| r2956 | r2957 | |
| 1999 | 1921 | PORT_INCLUDE(megab) |
| 2000 | 1922 | |
| 2001 | 1923 | PORT_MODIFY("DSWA") |
| 2002 | | TAITO_COINAGE_JAPAN_8 |
| 1924 | TAITO_COINAGE_JAPAN_OLD |
| 2003 | 1925 | INPUT_PORTS_END |
| 2004 | 1926 | |
| 2005 | 1927 | |
| r2956 | r2957 | |
| 2015 | 1937 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2016 | 1938 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2017 | 1939 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2018 | | TAITO_COINAGE_WORLD_8 |
| 1940 | TAITO_COINAGE_WORLD |
| 2019 | 1941 | |
| 2020 | 1942 | PORT_START_TAG("DSWB") |
| 2021 | | TAITO_DIFFICULTY_8 |
| 1943 | TAITO_DIFFICULTY |
| 2022 | 1944 | PORT_DIPNAME( 0x04, 0x04, "Timer" ) |
| 2023 | 1945 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2024 | 1946 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2037 | 1959 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 2038 | 1960 | PORT_DIPSETTING( 0x80, DEF_STR( Dual ) ) |
| 2039 | 1961 | |
| 2040 | | /* IN0 */ |
| 2041 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2042 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 2043 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1962 | PORT_START_TAG("IN0") |
| 1963 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 2044 | 1964 | |
| 2045 | | /* IN0 */ |
| 2046 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2047 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2048 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1965 | PORT_START_TAG("IN1") |
| 1966 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 2049 | 1967 | |
| 2050 | | /* IN2 */ |
| 1968 | PORT_START_TAG("IN2") |
| 2051 | 1969 | TAITO_F2_SYSTEM_INPUT |
| 2052 | 1970 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2053 | 1971 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2059 | 1977 | PORT_INCLUDE(thundfox) |
| 2060 | 1978 | |
| 2061 | 1979 | PORT_MODIFY("DSWA") |
| 2062 | | TAITO_COINAGE_US_8 |
| 1980 | TAITO_COINAGE_US |
| 2063 | 1981 | INPUT_PORTS_END |
| 2064 | 1982 | |
| 2065 | 1983 | static INPUT_PORTS_START( thndfoxj ) |
| 2066 | 1984 | PORT_INCLUDE(thundfox) |
| 2067 | 1985 | |
| 2068 | 1986 | PORT_MODIFY("DSWA") |
| 2069 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 1987 | TAITO_COINAGE_JAPAN_NEW |
| 2070 | 1988 | INPUT_PORTS_END |
| 2071 | 1989 | |
| 2072 | 1990 | |
| r2956 | r2957 | |
| 2082 | 2000 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2083 | 2001 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2084 | 2002 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2085 | | TAITO_COINAGE_US_8 |
| 2003 | TAITO_COINAGE_US |
| 2086 | 2004 | |
| 2087 | 2005 | PORT_START_TAG("DSWB") |
| 2088 | | TAITO_DIFFICULTY_8 |
| 2006 | TAITO_DIFFICULTY |
| 2089 | 2007 | PORT_DIPNAME( 0x0c, 0x0c, "Start remain time" ) |
| 2090 | 2008 | PORT_DIPSETTING( 0x00, "35" ) |
| 2091 | 2009 | PORT_DIPSETTING( 0x04, "40" ) |
| r2956 | r2957 | |
| 2103 | 2021 | PORT_DIPSETTING( 0x80, DEF_STR( Single ) ) |
| 2104 | 2022 | PORT_DIPSETTING( 0x00, DEF_STR( Dual ) ) |
| 2105 | 2023 | |
| 2106 | | PORT_START /* IN0 */ |
| 2024 | PORT_START_TAG("IN0") |
| 2107 | 2025 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2108 | 2026 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2109 | 2027 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2113 | 2031 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2114 | 2032 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2115 | 2033 | |
| 2116 | | PORT_START /* IN1 */ |
| 2034 | PORT_START_TAG("IN1") |
| 2117 | 2035 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2118 | 2036 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2119 | 2037 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2123 | 2041 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2124 | 2042 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2125 | 2043 | |
| 2126 | | /* IN2 */ |
| 2044 | PORT_START_TAG("IN2") |
| 2127 | 2045 | TAITO_F2_SYSTEM_INPUT |
| 2128 | 2046 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2129 | 2047 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2130 | 2048 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2131 | 2049 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2132 | 2050 | |
| 2133 | | PORT_START /* Paddle A */ |
| 2051 | PORT_START_TAG("PADDLE1") /* Paddle A */ |
| 2134 | 2052 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_PLAYER(1) |
| 2135 | 2053 | |
| 2136 | | PORT_START /* Paddle B */ |
| 2054 | PORT_START_TAG("PADDLE2") /* Paddle B */ |
| 2137 | 2055 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_PLAYER(2) |
| 2138 | 2056 | INPUT_PORTS_END |
| 2139 | 2057 | |
| r2956 | r2957 | |
| 2141 | 2059 | PORT_INCLUDE(cameltry) |
| 2142 | 2060 | |
| 2143 | 2061 | PORT_MODIFY("DSWA") |
| 2144 | | TAITO_COINAGE_JAPAN_8 |
| 2062 | TAITO_COINAGE_JAPAN_OLD |
| 2145 | 2063 | INPUT_PORTS_END |
| 2146 | 2064 | |
| 2147 | 2065 | static INPUT_PORTS_START( qtorimon ) |
| r2956 | r2957 | |
| 2156 | 2074 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) |
| 2157 | 2075 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2158 | 2076 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2159 | | TAITO_COINAGE_JAPAN_8 |
| 2077 | TAITO_COINAGE_JAPAN_OLD |
| 2160 | 2078 | |
| 2161 | 2079 | PORT_START_TAG("DSWB") |
| 2162 | | TAITO_DIFFICULTY_8 |
| 2080 | TAITO_DIFFICULTY |
| 2163 | 2081 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) |
| 2164 | 2082 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2165 | 2083 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2178 | 2096 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2179 | 2097 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2180 | 2098 | |
| 2181 | | PORT_START /* IN0 */ |
| 2099 | PORT_START_TAG("IN0") |
| 2182 | 2100 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2183 | 2101 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 2184 | 2102 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2188 | 2106 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2189 | 2107 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2190 | 2108 | |
| 2191 | | PORT_START /* IN1 */ |
| 2109 | PORT_START_TAG("IN1") |
| 2192 | 2110 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2193 | 2111 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 2194 | 2112 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 2198 | 2116 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2199 | 2117 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2200 | 2118 | |
| 2201 | | /* IN2 */ |
| 2119 | PORT_START_TAG("IN2") |
| 2202 | 2120 | TAITO_F2_SYSTEM_INPUT |
| 2203 | 2121 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2204 | 2122 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2218 | 2136 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2219 | 2137 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2220 | 2138 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2221 | | TAITO_COINAGE_WORLD_8 |
| 2139 | TAITO_COINAGE_WORLD |
| 2222 | 2140 | |
| 2223 | 2141 | PORT_START_TAG("DSWB") |
| 2224 | | TAITO_DIFFICULTY_8 |
| 2142 | TAITO_DIFFICULTY |
| 2225 | 2143 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 2226 | 2144 | PORT_DIPSETTING( 0x0c, "30k and 100k" ) |
| 2227 | 2145 | PORT_DIPSETTING( 0x08, "30k and 150k" ) |
| r2956 | r2957 | |
| 2239 | 2157 | PORT_DIPSETTING( 0x80, DEF_STR( Single ) ) |
| 2240 | 2158 | PORT_DIPSETTING( 0x00, DEF_STR( Dual ) ) |
| 2241 | 2159 | |
| 2242 | | /* IN0 */ |
| 2243 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2244 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2245 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2160 | PORT_START_TAG("IN0") |
| 2161 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2246 | 2162 | |
| 2247 | | /* IN1 */ |
| 2248 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2249 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2250 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2163 | PORT_START_TAG("IN1") |
| 2164 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 2251 | 2165 | |
| 2252 | | /* IN2 */ |
| 2166 | PORT_START_TAG("IN2") |
| 2253 | 2167 | TAITO_F2_SYSTEM_INPUT |
| 2254 | 2168 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2255 | 2169 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2261 | 2175 | PORT_INCLUDE(liquidk) |
| 2262 | 2176 | |
| 2263 | 2177 | PORT_MODIFY("DSWA") |
| 2264 | | TAITO_COINAGE_US_8 |
| 2178 | TAITO_COINAGE_US |
| 2265 | 2179 | INPUT_PORTS_END |
| 2266 | 2180 | |
| 2267 | 2181 | |
| r2956 | r2957 | |
| 2277 | 2191 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2278 | 2192 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2279 | 2193 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2280 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2194 | TAITO_COINAGE_JAPAN_NEW |
| 2281 | 2195 | |
| 2282 | 2196 | PORT_START_TAG("DSWB") |
| 2283 | | TAITO_DIFFICULTY_8 |
| 2197 | TAITO_DIFFICULTY |
| 2284 | 2198 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 2285 | 2199 | PORT_DIPSETTING( 0x0c, "30k and 100k" ) |
| 2286 | 2200 | PORT_DIPSETTING( 0x08, "30k and 150k" ) |
| r2956 | r2957 | |
| 2298 | 2212 | PORT_DIPSETTING( 0x80, DEF_STR( Single ) ) |
| 2299 | 2213 | PORT_DIPSETTING( 0x00, DEF_STR( Dual ) ) |
| 2300 | 2214 | |
| 2301 | | /* IN0 */ |
| 2302 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2303 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2304 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2215 | PORT_START_TAG("IN0") |
| 2216 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2305 | 2217 | |
| 2306 | | /* IN1 */ |
| 2307 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2308 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2309 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2218 | PORT_START_TAG("IN1") |
| 2219 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 2310 | 2220 | |
| 2311 | | /* IN2 */ |
| 2221 | PORT_START_TAG("IN2") |
| 2312 | 2222 | TAITO_F2_SYSTEM_INPUT |
| 2313 | 2223 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2314 | 2224 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2328 | 2238 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2329 | 2239 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2330 | 2240 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2331 | | TAITO_COINAGE_WORLD_8 |
| 2241 | TAITO_COINAGE_WORLD |
| 2332 | 2242 | |
| 2333 | 2243 | PORT_START_TAG("DSWB") |
| 2334 | | TAITO_DIFFICULTY_8 |
| 2244 | TAITO_DIFFICULTY |
| 2335 | 2245 | PORT_DIPNAME( 0x0c, 0x0c, "Shields" ) |
| 2336 | 2246 | PORT_DIPSETTING( 0x00, DEF_STR( None )) |
| 2337 | 2247 | PORT_DIPSETTING( 0x0c, "1") |
| r2956 | r2957 | |
| 2349 | 2259 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2350 | 2260 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 2351 | 2261 | |
| 2352 | | /* IN0 */ |
| 2353 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2354 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2355 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2262 | PORT_START_TAG("IN0") |
| 2263 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2356 | 2264 | |
| 2357 | | /* IN1 */ |
| 2358 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2359 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2360 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2265 | PORT_START_TAG("IN1") |
| 2266 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 2361 | 2267 | |
| 2362 | | /* IN2 */ |
| 2268 | PORT_START_TAG("IN2") |
| 2363 | 2269 | TAITO_F2_SYSTEM_INPUT |
| 2364 | 2270 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2365 | 2271 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2371 | 2277 | PORT_INCLUDE(ssi) |
| 2372 | 2278 | |
| 2373 | 2279 | PORT_MODIFY("DSWA") |
| 2374 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2280 | TAITO_COINAGE_JAPAN_NEW |
| 2375 | 2281 | INPUT_PORTS_END |
| 2376 | 2282 | |
| 2377 | 2283 | |
| 2378 | 2284 | static INPUT_PORTS_START( growl ) |
| 2379 | | /* IN0 */ |
| 2380 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2381 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 2382 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2285 | PORT_START_TAG("IN0") |
| 2286 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 2383 | 2287 | |
| 2384 | | /* IN1 */ |
| 2385 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2386 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2387 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2288 | PORT_START_TAG("IN1") |
| 2289 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 2388 | 2290 | |
| 2389 | | /* IN2 */ |
| 2291 | PORT_START_TAG("IN2") |
| 2390 | 2292 | TAITO_F2_SYSTEM_INPUT |
| 2391 | 2293 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2392 | 2294 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2404 | 2306 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2405 | 2307 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2406 | 2308 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2407 | | TAITO_COINAGE_WORLD_8 |
| 2309 | TAITO_COINAGE_WORLD |
| 2408 | 2310 | |
| 2409 | 2311 | PORT_START_TAG("DSWB") |
| 2410 | | TAITO_DIFFICULTY_8 |
| 2312 | TAITO_DIFFICULTY |
| 2411 | 2313 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) |
| 2412 | 2314 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2413 | 2315 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2426 | 2328 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2427 | 2329 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2428 | 2330 | |
| 2429 | | PORT_START /* IN3 */ |
| 2331 | PORT_START_TAG("IN3") |
| 2430 | 2332 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) |
| 2431 | 2333 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 2432 | 2334 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| r2956 | r2957 | |
| 2444 | 2346 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) |
| 2445 | 2347 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START4 ) |
| 2446 | 2348 | |
| 2447 | | PORT_START /* IN4 */ |
| 2349 | PORT_START_TAG("IN4") |
| 2448 | 2350 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 2449 | 2351 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 2450 | 2352 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| r2956 | r2957 | |
| 2459 | 2361 | PORT_INCLUDE(growl) |
| 2460 | 2362 | |
| 2461 | 2363 | PORT_MODIFY("DSWA") |
| 2462 | | TAITO_COINAGE_US_8 |
| 2364 | TAITO_COINAGE_US |
| 2463 | 2365 | INPUT_PORTS_END |
| 2464 | 2366 | |
| 2465 | 2367 | static INPUT_PORTS_START( runark ) |
| 2466 | 2368 | PORT_INCLUDE(growl) |
| 2467 | 2369 | |
| 2468 | 2370 | PORT_MODIFY("DSWA") |
| 2469 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2371 | TAITO_COINAGE_JAPAN_NEW |
| 2470 | 2372 | INPUT_PORTS_END |
| 2471 | 2373 | |
| 2472 | 2374 | |
| r2956 | r2957 | |
| 2482 | 2384 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2483 | 2385 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2484 | 2386 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2485 | | TAITO_COINAGE_WORLD_8 |
| 2387 | TAITO_COINAGE_WORLD |
| 2486 | 2388 | |
| 2487 | 2389 | PORT_START_TAG("DSWB") |
| 2488 | | TAITO_DIFFICULTY_8 |
| 2390 | TAITO_DIFFICULTY |
| 2489 | 2391 | PORT_DIPNAME( 0x0c, 0x0c, "Magic" ) |
| 2490 | 2392 | PORT_DIPSETTING( 0x0c, "3" ) |
| 2491 | 2393 | PORT_DIPSETTING( 0x08, "4" ) |
| r2956 | r2957 | |
| 2503 | 2405 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 2504 | 2406 | PORT_DIPSETTING( 0x80, DEF_STR( Dual ) ) |
| 2505 | 2407 | |
| 2506 | | /* IN0 */ |
| 2507 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2508 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 2509 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2408 | PORT_START_TAG("IN0") |
| 2409 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 2510 | 2410 | |
| 2511 | | /* IN1 */ |
| 2512 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2513 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2514 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2411 | PORT_START_TAG("IN1") |
| 2412 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 2515 | 2413 | |
| 2516 | | /* IN2 */ |
| 2414 | PORT_START_TAG("IN2") |
| 2517 | 2415 | TAITO_F2_SYSTEM_INPUT |
| 2518 | 2416 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2519 | 2417 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2525 | 2423 | PORT_INCLUDE(pulirula) |
| 2526 | 2424 | |
| 2527 | 2425 | PORT_MODIFY("DSWA") |
| 2528 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2426 | TAITO_COINAGE_JAPAN_NEW |
| 2529 | 2427 | INPUT_PORTS_END |
| 2530 | 2428 | |
| 2531 | 2429 | |
| r2956 | r2957 | |
| 2541 | 2439 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2542 | 2440 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2543 | 2441 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2544 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2442 | TAITO_COINAGE_JAPAN_NEW |
| 2545 | 2443 | |
| 2546 | 2444 | PORT_START_TAG("DSWB") |
| 2547 | | TAITO_DIFFICULTY_8 //?? |
| 2445 | TAITO_DIFFICULTY //?? |
| 2548 | 2446 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2549 | 2447 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2550 | 2448 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2564 | 2462 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2565 | 2463 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2566 | 2464 | |
| 2567 | | PORT_START /* IN0 */ |
| 2465 | PORT_START_TAG("IN0") |
| 2568 | 2466 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2569 | 2467 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 2570 | 2468 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2574 | 2472 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2575 | 2473 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2576 | 2474 | |
| 2577 | | PORT_START /* IN1 */ |
| 2475 | PORT_START_TAG("IN1") |
| 2578 | 2476 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2579 | 2477 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 2580 | 2478 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 2584 | 2482 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2585 | 2483 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2586 | 2484 | |
| 2587 | | /* IN2 */ |
| 2485 | PORT_START_TAG("IN2") |
| 2588 | 2486 | TAITO_F2_SYSTEM_INPUT |
| 2589 | 2487 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2590 | 2488 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2604 | 2502 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2605 | 2503 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2606 | 2504 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2607 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2505 | TAITO_COINAGE_JAPAN_NEW |
| 2608 | 2506 | |
| 2609 | 2507 | PORT_START_TAG("DSWB") |
| 2610 | | TAITO_DIFFICULTY_8 //?? |
| 2508 | TAITO_DIFFICULTY //?? |
| 2611 | 2509 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2612 | 2510 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2613 | 2511 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2627 | 2525 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2628 | 2526 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2629 | 2527 | |
| 2630 | | PORT_START /* IN0 */ |
| 2528 | PORT_START_TAG("IN0") |
| 2631 | 2529 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2632 | 2530 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 2633 | 2531 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 2637 | 2535 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2638 | 2536 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2639 | 2537 | |
| 2640 | | PORT_START /* IN1 */ |
| 2538 | PORT_START_TAG("IN1") |
| 2641 | 2539 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2642 | 2540 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 2643 | 2541 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 2647 | 2545 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2648 | 2546 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2649 | 2547 | |
| 2650 | | /* IN2 */ |
| 2548 | PORT_START_TAG("IN2") |
| 2651 | 2549 | TAITO_F2_SYSTEM_INPUT |
| 2652 | 2550 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2653 | 2551 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2656 | 2554 | INPUT_PORTS_END |
| 2657 | 2555 | |
| 2658 | 2556 | static INPUT_PORTS_START( footchmp ) |
| 2659 | | /* IN0 */ |
| 2660 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2661 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2662 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2557 | PORT_START_TAG("IN0") |
| 2558 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2663 | 2559 | |
| 2664 | | /* IN1 */ |
| 2665 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2666 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2667 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2560 | PORT_START_TAG("IN1") |
| 2561 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 2668 | 2562 | |
| 2669 | | PORT_START /* IN2 */ |
| 2563 | PORT_START_TAG("IN2") |
| 2670 | 2564 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2671 | 2565 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2672 | 2566 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r2956 | r2957 | |
| 2687 | 2581 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2688 | 2582 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2689 | 2583 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2690 | | TAITO_COINAGE_WORLD_8 |
| 2584 | TAITO_COINAGE_WORLD |
| 2691 | 2585 | |
| 2692 | 2586 | PORT_START_TAG("DSWB") |
| 2693 | | TAITO_DIFFICULTY_8 |
| 2587 | TAITO_DIFFICULTY |
| 2694 | 2588 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Game_Time ) ) |
| 2695 | 2589 | PORT_DIPSETTING( 0x00, "1.5 Minutes" ) |
| 2696 | 2590 | PORT_DIPSETTING( 0x0c, " 2 Minutes" ) |
| r2956 | r2957 | |
| 2708 | 2602 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 2709 | 2603 | PORT_DIPSETTING( 0x80, "European" ) |
| 2710 | 2604 | |
| 2711 | | /* IN3 */ |
| 2712 | | TAITO_F2_PLAYERS_INPUT( 3 ) |
| 2713 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2714 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) |
| 2605 | PORT_START_TAG("IN3") |
| 2606 | TAITO_JOY_UDLR_2_BUTTONS_START( 3 ) |
| 2715 | 2607 | |
| 2716 | | /* IN4 */ |
| 2717 | | TAITO_F2_PLAYERS_INPUT( 4 ) |
| 2718 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2719 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) |
| 2608 | PORT_START_TAG("IN4") |
| 2609 | TAITO_JOY_UDLR_2_BUTTONS_START( 4 ) |
| 2720 | 2610 | INPUT_PORTS_END |
| 2721 | 2611 | |
| 2722 | 2612 | static INPUT_PORTS_START( hthero ) |
| r2956 | r2957 | |
| 2769 | 2659 | INPUT_PORTS_END |
| 2770 | 2660 | |
| 2771 | 2661 | static INPUT_PORTS_START( ninjak ) |
| 2772 | | /* IN0 */ |
| 2773 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2774 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2775 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2662 | PORT_START_TAG("IN0") |
| 2663 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2776 | 2664 | |
| 2777 | | /* IN1 */ |
| 2778 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2779 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2780 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2665 | PORT_START_TAG("IN1") |
| 2666 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 2781 | 2667 | |
| 2782 | | PORT_START /* IN2 */ |
| 2668 | PORT_START_TAG("IN2") |
| 2783 | 2669 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) |
| 2784 | 2670 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2785 | 2671 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| r2956 | r2957 | |
| 2800 | 2686 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2801 | 2687 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2802 | 2688 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2803 | | TAITO_COINAGE_WORLD_8 |
| 2689 | TAITO_COINAGE_WORLD |
| 2804 | 2690 | |
| 2805 | 2691 | PORT_START_TAG("DSWB") |
| 2806 | | TAITO_DIFFICULTY_8 |
| 2692 | TAITO_DIFFICULTY |
| 2807 | 2693 | PORT_DIPNAME( 0x0c, 0x0c, "Cabinet Type" ) |
| 2808 | 2694 | PORT_DIPSETTING( 0x0c, "2 players" ) |
| 2809 | 2695 | PORT_DIPSETTING( 0x08, "TROG (4 players / 2 coin slots)" ) |
| r2956 | r2957 | |
| 2821 | 2707 | PORT_DIPSETTING( 0x00, "1 Player only" ) |
| 2822 | 2708 | PORT_DIPSETTING( 0x80, "Multiplayer" ) |
| 2823 | 2709 | |
| 2824 | | /* IN3 */ |
| 2825 | | TAITO_F2_PLAYERS_INPUT( 3 ) |
| 2826 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2827 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 ) |
| 2710 | PORT_START_TAG("IN3") |
| 2711 | TAITO_JOY_UDLR_2_BUTTONS_START( 3 ) |
| 2828 | 2712 | |
| 2829 | | /* IN4 */ |
| 2830 | | TAITO_F2_PLAYERS_INPUT( 4 ) |
| 2831 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2832 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 ) |
| 2713 | PORT_START_TAG("IN4") |
| 2714 | TAITO_JOY_UDLR_2_BUTTONS_START( 4 ) |
| 2833 | 2715 | INPUT_PORTS_END |
| 2834 | 2716 | |
| 2835 | 2717 | static INPUT_PORTS_START( ninjaku ) |
| 2836 | 2718 | PORT_INCLUDE(ninjak) |
| 2837 | 2719 | |
| 2838 | 2720 | PORT_MODIFY("DSWA") |
| 2839 | | TAITO_COINAGE_US_8 |
| 2721 | TAITO_COINAGE_US |
| 2840 | 2722 | INPUT_PORTS_END |
| 2841 | 2723 | |
| 2842 | 2724 | static INPUT_PORTS_START( ninjakj ) |
| 2843 | 2725 | PORT_INCLUDE(ninjak) |
| 2844 | 2726 | |
| 2845 | 2727 | PORT_MODIFY("DSWA") |
| 2846 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2728 | TAITO_COINAGE_JAPAN_NEW |
| 2847 | 2729 | INPUT_PORTS_END |
| 2848 | 2730 | |
| 2849 | 2731 | |
| r2956 | r2957 | |
| 2859 | 2741 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2860 | 2742 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2861 | 2743 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2862 | | TAITO_COINAGE_JAPAN_8 |
| 2744 | TAITO_COINAGE_JAPAN_OLD |
| 2863 | 2745 | |
| 2864 | 2746 | PORT_START_TAG("DSWB") |
| 2865 | | TAITO_DIFFICULTY_8 |
| 2747 | TAITO_DIFFICULTY |
| 2866 | 2748 | PORT_DIPNAME( 0x0c, 0x0c, "Control" ) /* correct acc. to service mode */ |
| 2867 | 2749 | PORT_DIPSETTING( 0x0c, DEF_STR( Joystick ) ) |
| 2868 | 2750 | PORT_DIPSETTING( 0x08, "Paddle" ) |
| r2956 | r2957 | |
| 2881 | 2763 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2882 | 2764 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2883 | 2765 | |
| 2884 | | /* IN0 */ |
| 2885 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2886 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2887 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2766 | PORT_START_TAG("IN0") |
| 2767 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2888 | 2768 | |
| 2889 | | PORT_START /* IN1 */ |
| 2769 | PORT_START_TAG("IN1") |
| 2890 | 2770 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* 2P not used? */ |
| 2891 | 2771 | |
| 2892 | | /* IN2 */ |
| 2772 | PORT_START_TAG("IN2") |
| 2893 | 2773 | TAITO_F2_SYSTEM_INPUT |
| 2894 | 2774 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2895 | 2775 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2896 | 2776 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2897 | 2777 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2898 | 2778 | |
| 2899 | | PORT_START /* Paddle A */ |
| 2779 | PORT_START_TAG("PADDLE1") /* Paddle A */ |
| 2900 | 2780 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 2901 | 2781 | |
| 2902 | | PORT_START /* Paddle B */ |
| 2782 | PORT_START_TAG("PADDLE2") /* Paddle B */ |
| 2903 | 2783 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| 2904 | 2784 | INPUT_PORTS_END |
| 2905 | 2785 | |
| r2956 | r2957 | |
| 2915 | 2795 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2916 | 2796 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2917 | 2797 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2918 | | TAITO_COINAGE_WORLD_8 |
| 2798 | TAITO_COINAGE_WORLD |
| 2919 | 2799 | |
| 2920 | 2800 | PORT_START_TAG("DSWB") |
| 2921 | | TAITO_DIFFICULTY_8 |
| 2801 | TAITO_DIFFICULTY |
| 2922 | 2802 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 2923 | 2803 | PORT_DIPSETTING( 0x08, "10k and every 80k" ) |
| 2924 | 2804 | PORT_DIPSETTING( 0x0c, "20k and every 80k" ) |
| r2956 | r2957 | |
| 2936 | 2816 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 2937 | 2817 | PORT_DIPSETTING( 0x80, DEF_STR( Dual ) ) |
| 2938 | 2818 | |
| 2939 | | /* IN0 */ |
| 2940 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 2941 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2942 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2819 | PORT_START_TAG("IN0") |
| 2820 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 2943 | 2821 | |
| 2944 | | /* IN1 */ |
| 2945 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 2946 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2947 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2822 | PORT_START_TAG("IN1") |
| 2823 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 2948 | 2824 | |
| 2949 | | /* IN2 */ |
| 2825 | PORT_START_TAG("IN2") |
| 2950 | 2826 | TAITO_F2_SYSTEM_INPUT |
| 2951 | 2827 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2952 | 2828 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 2958 | 2834 | PORT_INCLUDE(gunfront) |
| 2959 | 2835 | |
| 2960 | 2836 | PORT_MODIFY("DSWA") |
| 2961 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2837 | TAITO_COINAGE_JAPAN_NEW |
| 2962 | 2838 | INPUT_PORTS_END |
| 2963 | 2839 | |
| 2964 | 2840 | |
| r2956 | r2957 | |
| 2974 | 2850 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2975 | 2851 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2976 | 2852 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2977 | | TAITO_COINAGE_WORLD_8 |
| 2853 | TAITO_COINAGE_WORLD |
| 2978 | 2854 | |
| 2979 | 2855 | PORT_START_TAG("DSWB") |
| 2980 | | TAITO_DIFFICULTY_8 |
| 2856 | TAITO_DIFFICULTY |
| 2981 | 2857 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 2982 | 2858 | PORT_DIPSETTING( 0x04, "80k and every 160k" ) |
| 2983 | 2859 | PORT_DIPSETTING( 0x0c, "70k and every 150k" ) |
| r2956 | r2957 | |
| 2995 | 2871 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 2996 | 2872 | PORT_DIPSETTING( 0x80, DEF_STR( Dual ) ) |
| 2997 | 2873 | |
| 2998 | | /* IN0 */ |
| 2999 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 3000 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 3001 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2874 | PORT_START_TAG("IN0") |
| 2875 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 3002 | 2876 | |
| 3003 | | /* IN1 */ |
| 3004 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 3005 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 3006 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2877 | PORT_START_TAG("IN1") |
| 2878 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 3007 | 2879 | |
| 3008 | | /* IN2 */ |
| 2880 | PORT_START_TAG("IN2") |
| 3009 | 2881 | TAITO_F2_SYSTEM_INPUT |
| 3010 | 2882 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3011 | 2883 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3017 | 2889 | PORT_INCLUDE(metalb) |
| 3018 | 2890 | |
| 3019 | 2891 | PORT_MODIFY("DSWA") |
| 3020 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2892 | TAITO_COINAGE_JAPAN_NEW |
| 3021 | 2893 | INPUT_PORTS_END |
| 3022 | 2894 | |
| 3023 | 2895 | |
| 3024 | 2896 | static INPUT_PORTS_START( deadconx ) |
| 3025 | | /* IN0 */ |
| 3026 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 3027 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3028 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2897 | PORT_START_TAG("IN0") |
| 2898 | TAITO_JOY_UDLR_2_BUTTONS_START( 1 ) |
| 3029 | 2899 | |
| 3030 | | /* IN1 */ |
| 3031 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 3032 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3033 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2900 | PORT_START_TAG("IN1") |
| 2901 | TAITO_JOY_UDLR_2_BUTTONS_START( 2 ) |
| 3034 | 2902 | |
| 3035 | | PORT_START /* IN2 */ |
| 2903 | PORT_START_TAG("IN2") |
| 3036 | 2904 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3037 | 2905 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3038 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service A") PORT_CODE(KEYCODE_9) |
| 3039 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service B") PORT_CODE(KEYCODE_0) |
| 3040 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service C") PORT_CODE(KEYCODE_MINUS) |
| 2906 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service A") PORT_CODE(KEYCODE_9) |
| 2907 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service B") PORT_CODE(KEYCODE_0) |
| 2908 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service C") PORT_CODE(KEYCODE_MINUS) |
| 3041 | 2909 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) |
| 3042 | 2910 | |
| 3043 | 2911 | PORT_START_TAG("DSWA") |
| r2956 | r2957 | |
| 3051 | 2919 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3052 | 2920 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3053 | 2921 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3054 | | TAITO_COINAGE_WORLD_8 |
| 2922 | TAITO_COINAGE_WORLD |
| 3055 | 2923 | |
| 3056 | 2924 | PORT_START_TAG("DSWB") /* DSW B, missing a timer speed maybe? */ |
| 3057 | | TAITO_DIFFICULTY_8 |
| 2925 | TAITO_DIFFICULTY |
| 3058 | 2926 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 3059 | 2927 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 3060 | 2928 | PORT_DIPSETTING( 0x00, DEF_STR( On) ) |
| r2956 | r2957 | |
| 3078 | 2946 | PORT_INCLUDE(deadconx) |
| 3079 | 2947 | |
| 3080 | 2948 | PORT_MODIFY("DSWA") |
| 3081 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 2949 | TAITO_COINAGE_JAPAN_NEW |
| 3082 | 2950 | INPUT_PORTS_END |
| 3083 | 2951 | |
| 3084 | 2952 | |
| r2956 | r2957 | |
| 3094 | 2962 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3095 | 2963 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3096 | 2964 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3097 | | TAITO_COINAGE_WORLD_8 |
| 2965 | TAITO_COINAGE_WORLD |
| 3098 | 2966 | |
| 3099 | 2967 | PORT_START_TAG("DSWB") |
| 3100 | | TAITO_DIFFICULTY_8 |
| 2968 | TAITO_DIFFICULTY |
| 3101 | 2969 | PORT_DIPNAME( 0x0c, 0x0c, "Damage" ) |
| 3102 | 2970 | PORT_DIPSETTING( 0x08, "Small" ) |
| 3103 | 2971 | PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) |
| r2956 | r2957 | |
| 3116 | 2984 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 3117 | 2985 | PORT_DIPSETTING( 0x80, DEF_STR( Dual ) ) |
| 3118 | 2986 | |
| 3119 | | /* IN0 */ |
| 3120 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 3121 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 3122 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2987 | PORT_START_TAG("IN0") |
| 2988 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 3123 | 2989 | |
| 3124 | | /* IN1 */ |
| 3125 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 3126 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 3127 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 2990 | PORT_START_TAG("IN1") |
| 2991 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 3128 | 2992 | |
| 3129 | | /* IN2 */ |
| 2993 | PORT_START_TAG("IN2") |
| 3130 | 2994 | TAITO_F2_SYSTEM_INPUT |
| 3131 | 2995 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3132 | 2996 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3138 | 3002 | PORT_INCLUDE(dinorex) |
| 3139 | 3003 | |
| 3140 | 3004 | PORT_MODIFY("DSWA") |
| 3141 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3005 | TAITO_COINAGE_JAPAN_NEW |
| 3142 | 3006 | INPUT_PORTS_END |
| 3143 | 3007 | |
| 3144 | 3008 | |
| 3145 | 3009 | static INPUT_PORTS_START( solfigtr ) |
| 3146 | | /* IN0 */ |
| 3147 | | TAITO_F2_PLAYERS_INPUT( 1 ) |
| 3148 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 3149 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 3010 | PORT_START_TAG("IN0") |
| 3011 | TAITO_JOY_UDLR_3_BUTTONS_START( 1 ) |
| 3150 | 3012 | |
| 3151 | | /* IN1 */ |
| 3152 | | TAITO_F2_PLAYERS_INPUT( 2 ) |
| 3153 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 3154 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 3013 | PORT_START_TAG("IN1") |
| 3014 | TAITO_JOY_UDLR_3_BUTTONS_START( 2 ) |
| 3155 | 3015 | |
| 3156 | | /* IN2 */ |
| 3016 | PORT_START_TAG("IN2") |
| 3157 | 3017 | TAITO_F2_SYSTEM_INPUT |
| 3158 | 3018 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3159 | 3019 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3171 | 3031 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3172 | 3032 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3173 | 3033 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3174 | | TAITO_COINAGE_WORLD_8 |
| 3034 | TAITO_COINAGE_WORLD |
| 3175 | 3035 | |
| 3176 | 3036 | PORT_START_TAG("DSWB") |
| 3177 | | TAITO_DIFFICULTY_8 |
| 3037 | TAITO_DIFFICULTY |
| 3178 | 3038 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 3179 | 3039 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 3180 | 3040 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3196 | 3056 | INPUT_PORTS_END |
| 3197 | 3057 | |
| 3198 | 3058 | static INPUT_PORTS_START( koshien ) |
| 3199 | | PORT_START /* DSW A, one lets you control fielders ? */ |
| 3059 | PORT_START_TAG("DSWA") /* DSW A, one lets you control fielders ? */ |
| 3200 | 3060 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 3201 | 3061 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 3202 | 3062 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3207 | 3067 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3208 | 3068 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3209 | 3069 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3210 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3070 | TAITO_COINAGE_JAPAN_NEW |
| 3211 | 3071 | |
| 3212 | 3072 | PORT_START_TAG("DSWB") |
| 3213 | | TAITO_DIFFICULTY_8 |
| 3073 | TAITO_DIFFICULTY |
| 3214 | 3074 | PORT_DIPNAME( 0x04, 0x04, "Timer" ) |
| 3215 | 3075 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3216 | 3076 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3229 | 3089 | PORT_DIPSETTING( 0x00, DEF_STR( Single ) ) |
| 3230 | 3090 | PORT_DIPSETTING( 0x80, DEF_STR( Dual ) ) |
| 3231 | 3091 | |
| 3232 | | PORT_START /* IN1 */ |
| 3092 | PORT_START_TAG("IN0") |
| 3233 | 3093 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3234 | 3094 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3235 | 3095 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 3239 | 3099 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 3240 | 3100 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 3241 | 3101 | |
| 3242 | | /* IN2 */ |
| 3102 | PORT_START_TAG("IN1") |
| 3243 | 3103 | TAITO_F2_SYSTEM_INPUT |
| 3244 | 3104 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3245 | 3105 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3246 | 3106 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3247 | 3107 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3248 | 3108 | |
| 3249 | | PORT_START /* IN0 */ |
| 3109 | PORT_START_TAG("IN2") |
| 3250 | 3110 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 3251 | 3111 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 3252 | 3112 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| r2956 | r2957 | |
| 3258 | 3118 | INPUT_PORTS_END |
| 3259 | 3119 | |
| 3260 | 3120 | static INPUT_PORTS_START( quizhq ) |
| 3261 | | PORT_START /* IN0 */ |
| 3121 | PORT_START_TAG("IN0") |
| 3262 | 3122 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3263 | 3123 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3264 | 3124 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 3268 | 3128 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3269 | 3129 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 3270 | 3130 | |
| 3271 | | PORT_START /* IN1 */ |
| 3131 | PORT_START_TAG("IN1") |
| 3272 | 3132 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3273 | 3133 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3274 | 3134 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 3278 | 3138 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3279 | 3139 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 3280 | 3140 | |
| 3281 | | /* IN2 */ |
| 3141 | PORT_START_TAG("IN2") |
| 3282 | 3142 | TAITO_F2_SYSTEM_INPUT |
| 3283 | 3143 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3284 | 3144 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3296 | 3156 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3297 | 3157 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3298 | 3158 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3299 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3159 | TAITO_COINAGE_JAPAN_NEW |
| 3300 | 3160 | |
| 3301 | 3161 | PORT_START_TAG("DSWB") |
| 3302 | | TAITO_DIFFICULTY_8 |
| 3162 | TAITO_DIFFICULTY |
| 3303 | 3163 | PORT_DIPNAME( 0x0c, 0x0c, "Time" ) |
| 3304 | 3164 | PORT_DIPSETTING( 0x0c, "5 seconds" ) |
| 3305 | 3165 | PORT_DIPSETTING( 0x08, "10 seconds" ) |
| r2956 | r2957 | |
| 3330 | 3190 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3331 | 3191 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3332 | 3192 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3333 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3193 | TAITO_COINAGE_JAPAN_NEW |
| 3334 | 3194 | |
| 3335 | 3195 | PORT_START_TAG("DSWB") |
| 3336 | | TAITO_DIFFICULTY_8 |
| 3196 | TAITO_DIFFICULTY |
| 3337 | 3197 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 3338 | 3198 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 3339 | 3199 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3353 | 3213 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 3354 | 3214 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 3355 | 3215 | |
| 3356 | | PORT_START /* IN0 */ |
| 3216 | PORT_START_TAG("IN0") |
| 3357 | 3217 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3358 | 3218 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3359 | 3219 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 3363 | 3223 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3364 | 3224 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 3365 | 3225 | |
| 3366 | | PORT_START /* IN1 */ |
| 3226 | PORT_START_TAG("IN1") |
| 3367 | 3227 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3368 | 3228 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3369 | 3229 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 3373 | 3233 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3374 | 3234 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 3375 | 3235 | |
| 3376 | | /* IN2 */ |
| 3236 | PORT_START_TAG("IN2") |
| 3377 | 3237 | TAITO_F2_SYSTEM_INPUT |
| 3378 | 3238 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3379 | 3239 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3391 | 3251 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3392 | 3252 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3393 | 3253 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3394 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3254 | TAITO_COINAGE_JAPAN_NEW |
| 3395 | 3255 | |
| 3396 | 3256 | PORT_START_TAG("DSWB") |
| 3397 | | TAITO_DIFFICULTY_8 |
| 3257 | TAITO_DIFFICULTY |
| 3398 | 3258 | PORT_DIPNAME( 0x0c, 0x0c, "Default Time" ) /* Can be affected ingame by some items and/or player location */ |
| 3399 | 3259 | PORT_DIPSETTING( 0x00, "6 seconds" ) |
| 3400 | 3260 | PORT_DIPSETTING( 0x04, "7 seconds" ) |
| r2956 | r2957 | |
| 3405 | 3265 | PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) |
| 3406 | 3266 | PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) |
| 3407 | 3267 | |
| 3408 | | PORT_START /* IN0 */ |
| 3268 | PORT_START_TAG("IN0") |
| 3409 | 3269 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3410 | 3270 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3411 | 3271 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 3415 | 3275 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3416 | 3276 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 3417 | 3277 | |
| 3418 | | PORT_START /* IN1 */ |
| 3278 | PORT_START_TAG("IN1") |
| 3419 | 3279 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3420 | 3280 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3421 | 3281 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 3425 | 3285 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3426 | 3286 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 3427 | 3287 | |
| 3428 | | /* IN2 */ |
| 3288 | PORT_START_TAG("IN2") |
| 3429 | 3289 | TAITO_F2_SYSTEM_INPUT |
| 3430 | 3290 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3431 | 3291 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3443 | 3303 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3444 | 3304 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3445 | 3305 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3446 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3306 | TAITO_COINAGE_JAPAN_NEW |
| 3447 | 3307 | |
| 3448 | 3308 | PORT_START_TAG("DSWB") |
| 3449 | | TAITO_DIFFICULTY_8 |
| 3309 | TAITO_DIFFICULTY |
| 3450 | 3310 | PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW ) /* These 2 Dip Switches were designed to change the default timer */ |
| 3451 | 3311 | PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW ) /* but the 10 seconds setting is duplicated 4 times in the tables */ |
| 3452 | 3312 | PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW ) |
| r2956 | r2957 | |
| 3456 | 3316 | PORT_DIPSETTING( 0x80, DEF_STR( Joystick ) ) |
| 3457 | 3317 | PORT_DIPSETTING( 0x00, "4 Buttons" ) |
| 3458 | 3318 | |
| 3459 | | PORT_START /* IN0 */ |
| 3319 | PORT_START_TAG("IN0") |
| 3460 | 3320 | /* Joystick Control */ |
| 3461 | 3321 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) |
| 3462 | 3322 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) |
| r2956 | r2957 | |
| 3476 | 3336 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) |
| 3477 | 3337 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) |
| 3478 | 3338 | |
| 3479 | | PORT_START /* IN1 */ |
| 3339 | PORT_START_TAG("IN1") |
| 3480 | 3340 | /* Joystick Control */ |
| 3481 | 3341 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) |
| 3482 | 3342 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x80) |
| r2956 | r2957 | |
| 3496 | 3356 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) |
| 3497 | 3357 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSWB",0x80,PORTCOND_EQUALS,0x00) |
| 3498 | 3358 | |
| 3499 | | /* IN2 */ |
| 3359 | PORT_START_TAG("IN2") |
| 3500 | 3360 | TAITO_F2_SYSTEM_INPUT |
| 3501 | 3361 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3502 | 3362 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3516 | 3376 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3517 | 3377 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3518 | 3378 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3519 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3379 | TAITO_COINAGE_JAPAN_NEW |
| 3520 | 3380 | |
| 3521 | 3381 | PORT_START_TAG("DSWB") |
| 3522 | | TAITO_DIFFICULTY_8 |
| 3382 | TAITO_DIFFICULTY |
| 3523 | 3383 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 3524 | 3384 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 3525 | 3385 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3539 | 3399 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 3540 | 3400 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 3541 | 3401 | |
| 3542 | | PORT_START /* IN0 */ |
| 3402 | PORT_START_TAG("IN0") |
| 3543 | 3403 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3544 | 3404 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3545 | 3405 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| r2956 | r2957 | |
| 3549 | 3409 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3550 | 3410 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 3551 | 3411 | |
| 3552 | | PORT_START /* IN1 */ |
| 3412 | PORT_START_TAG("IN1") |
| 3553 | 3413 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3554 | 3414 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3555 | 3415 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| r2956 | r2957 | |
| 3559 | 3419 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3560 | 3420 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 3561 | 3421 | |
| 3562 | | /* IN2 */ |
| 3422 | PORT_START_TAG("IN2") |
| 3563 | 3423 | TAITO_F2_SYSTEM_INPUT |
| 3564 | 3424 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3565 | 3425 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2956 | r2957 | |
| 3568 | 3428 | INPUT_PORTS_END |
| 3569 | 3429 | |
| 3570 | 3430 | static INPUT_PORTS_START( mjnquest ) |
| 3571 | | PORT_START /* IN0 */ |
| 3572 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 3573 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 3574 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 3575 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 3576 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 3431 | PORT_START_TAG("IN0") |
| 3432 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) |
| 3433 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) |
| 3434 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) |
| 3435 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) |
| 3436 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) |
| 3577 | 3437 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 3578 | 3438 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3579 | 3439 | |
| 3580 | | PORT_START /* IN1 */ |
| 3581 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 3582 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 3583 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 3584 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 3585 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 3440 | PORT_START_TAG("IN1") |
| 3441 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) |
| 3442 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) |
| 3443 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) |
| 3444 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) |
| 3445 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) |
| 3586 | 3446 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3587 | 3447 | |
| 3588 | | PORT_START /* IN2 */ |
| 3589 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 3590 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 3591 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 3592 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 3593 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 3448 | PORT_START_TAG("IN2") |
| 3449 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) |
| 3450 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) |
| 3451 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) |
| 3452 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) |
| 3453 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) |
| 3594 | 3454 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3595 | 3455 | |
| 3596 | | PORT_START /* IN3 */ |
| 3597 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 3598 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 3599 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 3600 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 3456 | PORT_START_TAG("IN3") |
| 3457 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) |
| 3458 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) |
| 3459 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) |
| 3460 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) |
| 3601 | 3461 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3602 | 3462 | |
| 3603 | | PORT_START /* IN4 */ |
| 3463 | PORT_START_TAG("IN4") |
| 3604 | 3464 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3605 | 3465 | |
| 3606 | | PORT_START /* IN5 */ |
| 3466 | PORT_START_TAG("IN5") |
| 3607 | 3467 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) |
| 3608 | 3468 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // ? |
| 3609 | 3469 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3610 | 3470 | |
| 3611 | | PORT_START /* IN6 */ |
| 3471 | PORT_START_TAG("IN6") |
| 3612 | 3472 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3613 | 3473 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3614 | 3474 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3615 | 3475 | |
| 3616 | | PORT_START /* IN7:DSW A */ |
| 3476 | PORT_START_TAG("DSWA") |
| 3617 | 3477 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 3618 | 3478 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 3619 | 3479 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3624 | 3484 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 3625 | 3485 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3626 | 3486 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 3627 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 3487 | TAITO_COINAGE_JAPAN_NEW |
| 3628 | 3488 | |
| 3629 | | PORT_START /* IN8:DSW B */ |
| 3630 | | TAITO_DIFFICULTY_8 |
| 3489 | PORT_START_TAG("DSWB") |
| 3490 | TAITO_DIFFICULTY |
| 3631 | 3491 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 3632 | 3492 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 3633 | 3493 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3649 | 3509 | INPUT_PORTS_END |
| 3650 | 3510 | |
| 3651 | 3511 | static INPUT_PORTS_START( yesnoj ) // apparently no test mode, though text in rom suggests printer test |
| 3652 | | PORT_START /* IN0 */ |
| 3512 | PORT_START_TAG("IN0") |
| 3653 | 3513 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 3654 | 3514 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 3655 | 3515 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 3656 | 3516 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 3657 | 3517 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3658 | 3518 | |
| 3659 | | /* IN1 */ |
| 3519 | PORT_START_TAG("IN1") |
| 3660 | 3520 | TAITO_F2_SYSTEM_INPUT |
| 3661 | 3521 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3662 | 3522 | |
| 3663 | | PORT_START /* DSW A ??? */ |
| 3523 | PORT_START_TAG("DSWA") /* DSW A ??? */ |
| 3664 | 3524 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 3665 | 3525 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 3666 | 3526 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 3686 | 3546 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 3687 | 3547 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 3688 | 3548 | |
| 3689 | | PORT_START /* DSW B ? */ |
| 3549 | PORT_START_TAG("DSWB") /* DSW B ? */ |
| 3690 | 3550 | PORT_DIPNAME( 0x01, 0x00, "Results Printer" ) |
| 3691 | 3551 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 3692 | 3552 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
src/mame/drivers/taito_l.c
| r2956 | r2957 | |
| 49 | 49 | |
| 50 | 50 | */ |
| 51 | 51 | |
| 52 | | |
| 53 | 52 | #include "driver.h" |
| 54 | 53 | #include "deprecat.h" |
| 54 | #include "taitoipt.h" |
| 55 | 55 | #include "cpu/z80/z80.h" |
| 56 | 56 | #include "audio/taitosnd.h" |
| 57 | 57 | #include "sound/2203intf.h" |
| r2956 | r2957 | |
| 540 | 540 | switch(mux_ctrl) |
| 541 | 541 | { |
| 542 | 542 | case 0: |
| 543 | | return input_port_read_indexed(machine, 0); |
| 543 | return input_port_read(machine, "DSWA"); |
| 544 | 544 | case 1: |
| 545 | | return input_port_read_indexed(machine, 1); |
| 545 | return input_port_read(machine, "DSWB"); |
| 546 | 546 | case 2: |
| 547 | | return input_port_read_indexed(machine, 2); |
| 547 | return input_port_read(machine, "IN0"); |
| 548 | 548 | case 3: |
| 549 | | return input_port_read_indexed(machine, 3); |
| 549 | return input_port_read(machine, "IN1"); |
| 550 | 550 | case 7: |
| 551 | | return input_port_read_indexed(machine, 4); |
| 551 | return input_port_read(machine, "IN2"); |
| 552 | 552 | default: |
| 553 | 553 | logerror("Mux read from unknown port %d (%04x)\n", mux_ctrl, activecpu_get_pc()); |
| 554 | 554 | return 0xff; |
| r2956 | r2957 | |
| 660 | 660 | |
| 661 | 661 | |
| 662 | 662 | |
| 663 | | |
| 664 | 663 | #define COMMON_BANKS_READ \ |
| 665 | 664 | AM_RANGE(0x0000, 0x5fff) AM_READ(SMH_ROM) \ |
| 666 | 665 | AM_RANGE(0x6000, 0x7fff) AM_READ(SMH_BANK1) \ |
| r2956 | r2957 | |
| 719 | 718 | AM_RANGE(0xc800, 0xc800) AM_READ(SMH_NOP) |
| 720 | 719 | AM_RANGE(0xc801, 0xc801) AM_READ(taitosound_comm_r) |
| 721 | 720 | AM_RANGE(0xe000, 0xffff) AM_READ(shared_r) |
| 722 | | AM_RANGE(0xd000, 0xd000) AM_READ(input_port_0_r) |
| 723 | | AM_RANGE(0xd001, 0xd001) AM_READ(input_port_1_r) |
| 724 | | AM_RANGE(0xd002, 0xd002) AM_READ(input_port_2_r) |
| 725 | | AM_RANGE(0xd003, 0xd003) AM_READ(input_port_3_r) |
| 726 | | AM_RANGE(0xd007, 0xd007) AM_READ(input_port_4_r) |
| 721 | AM_RANGE(0xd000, 0xd000) AM_READ_PORT("DSWA") |
| 722 | AM_RANGE(0xd001, 0xd001) AM_READ_PORT("DSWB") |
| 723 | AM_RANGE(0xd002, 0xd002) AM_READ_PORT("IN0") |
| 724 | AM_RANGE(0xd003, 0xd003) AM_READ_PORT("IN1") |
| 725 | AM_RANGE(0xd007, 0xd007) AM_READ_PORT("IN2") |
| 727 | 726 | ADDRESS_MAP_END |
| 728 | 727 | |
| 729 | 728 | static ADDRESS_MAP_START( fhawk_2_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2956 | r2957 | |
| 840 | 839 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 841 | 840 | AM_RANGE(0x8000, 0xbfff) AM_READ(SMH_BANK6) |
| 842 | 841 | AM_RANGE(0xc000, 0xdfff) AM_READ(shared_r) |
| 843 | | AM_RANGE(0xe000, 0xe000) AM_READ(input_port_0_r) |
| 844 | | AM_RANGE(0xe001, 0xe001) AM_READ(input_port_1_r) |
| 845 | | AM_RANGE(0xe002, 0xe002) AM_READ(input_port_2_r) |
| 846 | | AM_RANGE(0xe003, 0xe003) AM_READ(input_port_3_r) |
| 847 | | AM_RANGE(0xe007, 0xe007) AM_READ(input_port_4_r) |
| 842 | AM_RANGE(0xe000, 0xe000) AM_READ_PORT("DSWA") |
| 843 | AM_RANGE(0xe001, 0xe001) AM_READ_PORT("DSWB") |
| 844 | AM_RANGE(0xe002, 0xe002) AM_READ_PORT("IN0") |
| 845 | AM_RANGE(0xe003, 0xe003) AM_READ_PORT("IN1") |
| 846 | AM_RANGE(0xe007, 0xe007) AM_READ_PORT("IN2") |
| 848 | 847 | AM_RANGE(0xe008, 0xe00f) AM_READ(SMH_NOP) |
| 849 | 848 | AM_RANGE(0xe800, 0xe800) AM_READ(SMH_NOP) |
| 850 | 849 | AM_RANGE(0xe801, 0xe801) AM_READ(taitosound_comm_r) |
| r2956 | r2957 | |
| 907 | 906 | AM_RANGE(0xe000, 0xe7ff) AM_READ(shared_r) |
| 908 | 907 | AM_RANGE(0xe800, 0xe800) AM_READ(YM2203_status_port_0_r) |
| 909 | 908 | #if 0 |
| 910 | | AM_RANGE(0xd000, 0xd000) AM_READ(input_port_0_r) |
| 911 | | AM_RANGE(0xd001, 0xd001) AM_READ(input_port_1_r) |
| 912 | | AM_RANGE(0xd002, 0xd002) AM_READ(input_port_2_r) |
| 913 | | AM_RANGE(0xd003, 0xd003) AM_READ(input_port_3_r) |
| 914 | | AM_RANGE(0xd007, 0xd007) AM_READ(input_port_4_r) |
| 909 | AM_RANGE(0xd000, 0xd000) AM_READ_PORT("DSWA") |
| 910 | AM_RANGE(0xd001, 0xd001) AM_READ_PORT("DSWB") |
| 911 | AM_RANGE(0xd002, 0xd002) AM_READ_PORT("IN0") |
| 912 | AM_RANGE(0xd003, 0xd003) AM_READ_PORT("IN1") |
| 913 | AM_RANGE(0xd007, 0xd007) AM_READ_PORT("IN2") |
| 915 | 914 | #endif |
| 916 | 915 | ADDRESS_MAP_END |
| 917 | 916 | |
| r2956 | r2957 | |
| 982 | 981 | static ADDRESS_MAP_START( palamed_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 983 | 982 | COMMON_BANKS_READ |
| 984 | 983 | COMMON_SINGLE_READ |
| 985 | | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_2_r) |
| 986 | | AM_RANGE(0xa801, 0xa801) AM_READ(input_port_3_r) |
| 987 | | AM_RANGE(0xa802, 0xa802) AM_READ(input_port_4_r) |
| 984 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN0") |
| 985 | AM_RANGE(0xa801, 0xa801) AM_READ_PORT("IN1") |
| 986 | AM_RANGE(0xa802, 0xa802) AM_READ_PORT("IN2") |
| 988 | 987 | AM_RANGE(0xb001, 0xb001) AM_READ(SMH_NOP) // Watchdog or interrupt ack |
| 989 | 988 | ADDRESS_MAP_END |
| 990 | 989 | |
| r2956 | r2957 | |
| 999 | 998 | static ADDRESS_MAP_START( cachat_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 1000 | 999 | COMMON_BANKS_READ |
| 1001 | 1000 | COMMON_SINGLE_READ |
| 1002 | | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_2_r) |
| 1003 | | AM_RANGE(0xa801, 0xa801) AM_READ(input_port_3_r) |
| 1004 | | AM_RANGE(0xa802, 0xa802) AM_READ(input_port_4_r) |
| 1001 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN0") |
| 1002 | AM_RANGE(0xa801, 0xa801) AM_READ_PORT("IN1") |
| 1003 | AM_RANGE(0xa802, 0xa802) AM_READ_PORT("IN2") |
| 1005 | 1004 | AM_RANGE(0xb001, 0xb001) AM_READ(SMH_NOP) // Watchdog or interrupt ack (value ignored) |
| 1006 | 1005 | AM_RANGE(0xfff8, 0xfff8) AM_READ(rombankswitch_r) |
| 1007 | 1006 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 1038 | 1037 | COMMON_BANKS_READ |
| 1039 | 1038 | AM_RANGE(0x8000, 0x9fff) AM_READ(SMH_RAM) |
| 1040 | 1039 | AM_RANGE(0xa000, 0xa7ff) AM_READ(SMH_RAM) |
| 1041 | | AM_RANGE(0xa800, 0xa800) AM_READ(input_port_0_r) |
| 1042 | | AM_RANGE(0xa801, 0xa801) AM_READ(input_port_1_r) |
| 1043 | | AM_RANGE(0xa802, 0xa802) AM_READ(input_port_2_r) |
| 1044 | | AM_RANGE(0xa803, 0xa803) AM_READ(input_port_3_r) |
| 1045 | | AM_RANGE(0xa807, 0xa807) AM_READ(input_port_4_r) |
| 1040 | AM_RANGE(0xa800, 0xa800) AM_READ_PORT("DSWA") |
| 1041 | AM_RANGE(0xa801, 0xa801) AM_READ_PORT("DSWB") |
| 1042 | AM_RANGE(0xa802, 0xa802) AM_READ_PORT("IN0") |
| 1043 | AM_RANGE(0xa803, 0xa803) AM_READ_PORT("IN1") |
| 1044 | AM_RANGE(0xa807, 0xa807) AM_READ_PORT("IN2") |
| 1046 | 1045 | ADDRESS_MAP_END |
| 1047 | 1046 | |
| 1048 | 1047 | |
| r2956 | r2957 | |
| 1087 | 1086 | INPUT PORTS, DIPs |
| 1088 | 1087 | ***********************************************************/ |
| 1089 | 1088 | |
| 1090 | | #define TAITO_COINAGE_WORLD_8 \ |
| 1091 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1092 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 1093 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 1094 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 1095 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1096 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1097 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) ) \ |
| 1098 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) \ |
| 1099 | | PORT_DIPSETTING( 0x40, DEF_STR( 1C_4C ) ) \ |
| 1100 | | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 1101 | | |
| 1102 | | #define TAITO_COINAGE_JAPAN_8 \ |
| 1103 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1104 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 1105 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1106 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 1107 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 1108 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1109 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1110 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 1111 | | PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) \ |
| 1112 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 1113 | | |
| 1114 | | #define TAITO_COINAGE_JAPAN_NEW_8 \ |
| 1115 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) \ |
| 1116 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1117 | | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) \ |
| 1118 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1119 | | PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) \ |
| 1120 | | PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) \ |
| 1121 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1122 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1123 | | PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) ) \ |
| 1124 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) |
| 1125 | | |
| 1126 | | #define TAITO_COINAGE_US_8 \ |
| 1127 | | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) \ |
| 1128 | | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| 1129 | | PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) \ |
| 1130 | | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) \ |
| 1131 | | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) \ |
| 1132 | | PORT_DIPNAME( 0xc0, 0xc0, "Price to Continue" ) \ |
| 1133 | | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) \ |
| 1134 | | PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) \ |
| 1135 | | PORT_DIPSETTING( 0x80, DEF_STR( 1C_1C ) ) \ |
| 1136 | | PORT_DIPSETTING( 0xc0, "Same as Start" ) |
| 1137 | | |
| 1138 | | #define TAITO_DIFFICULTY_8 \ |
| 1139 | | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) \ |
| 1140 | | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) \ |
| 1141 | | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) \ |
| 1142 | | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) \ |
| 1143 | | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1144 | | |
| 1145 | | #define TAITO_L_PLAYERS_INPUT( player ) \ |
| 1146 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(player) PORT_8WAY \ |
| 1147 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(player) PORT_8WAY \ |
| 1148 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(player) PORT_8WAY \ |
| 1149 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(player) PORT_8WAY \ |
| 1150 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \ |
| 1151 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \ |
| 1152 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1153 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1154 | | |
| 1155 | 1089 | #define TAITO_L_SYSTEM_INPUT( type, impulse ) \ |
| 1156 | | PORT_START_TAG("IN3")\ |
| 1090 | PORT_START_TAG("IN2")\ |
| 1157 | 1091 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) \ |
| 1158 | 1092 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ |
| 1159 | 1093 | PORT_BIT( 0x04, type, IPT_COIN1 ) PORT_IMPULSE(impulse) \ |
| r2956 | r2957 | |
| 1163 | 1097 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) \ |
| 1164 | 1098 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1165 | 1099 | |
| 1166 | | #define TAITO_L_DSWA_2_4 \ |
| 1167 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) \ |
| 1168 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) \ |
| 1169 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ |
| 1170 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) \ |
| 1171 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) \ |
| 1172 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ |
| 1173 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1174 | | |
| 1175 | 1100 | static INPUT_PORTS_START( fhawk ) |
| 1176 | 1101 | PORT_START_TAG("DSWA") |
| 1177 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1178 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1179 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1180 | | TAITO_L_DSWA_2_4 |
| 1181 | | TAITO_COINAGE_WORLD_8 |
| 1102 | TAITO_MACHINE_COCKTAIL |
| 1103 | TAITO_COINAGE_WORLD |
| 1182 | 1104 | |
| 1183 | 1105 | PORT_START_TAG("DSWB") |
| 1184 | | TAITO_DIFFICULTY_8 |
| 1106 | TAITO_DIFFICULTY |
| 1185 | 1107 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) // all in manual |
| 1186 | 1108 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1187 | 1109 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1201 | 1123 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1202 | 1124 | |
| 1203 | 1125 | PORT_START_TAG("IN0") |
| 1204 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1126 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1127 | |
| 1205 | 1128 | PORT_START_TAG("IN1") |
| 1206 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1129 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1207 | 1130 | |
| 1208 | 1131 | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_LOW, 4 ) |
| 1209 | 1132 | INPUT_PORTS_END |
| 1210 | 1133 | |
| 1211 | 1134 | static INPUT_PORTS_START( fhawkj ) |
| 1212 | 1135 | PORT_START_TAG("DSWA") |
| 1213 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1214 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1215 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1216 | | TAITO_L_DSWA_2_4 |
| 1217 | | TAITO_COINAGE_JAPAN_8 |
| 1136 | TAITO_MACHINE_COCKTAIL |
| 1137 | TAITO_COINAGE_JAPAN_OLD |
| 1218 | 1138 | |
| 1219 | 1139 | PORT_START_TAG("DSWB") |
| 1220 | | TAITO_DIFFICULTY_8 |
| 1140 | TAITO_DIFFICULTY |
| 1221 | 1141 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) // all in manual |
| 1222 | 1142 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1223 | 1143 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1237 | 1157 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1238 | 1158 | |
| 1239 | 1159 | PORT_START_TAG("IN0") |
| 1240 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1160 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1161 | |
| 1241 | 1162 | PORT_START_TAG("IN1") |
| 1242 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1163 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1164 | |
| 1243 | 1165 | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_LOW, 4 ) |
| 1244 | 1166 | INPUT_PORTS_END |
| 1245 | 1167 | |
| 1246 | 1168 | static INPUT_PORTS_START( raimais ) |
| 1247 | 1169 | PORT_START_TAG("DSWA") |
| 1248 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1249 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1250 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1251 | | TAITO_L_DSWA_2_4 |
| 1252 | | TAITO_COINAGE_WORLD_8 |
| 1170 | TAITO_MACHINE_COCKTAIL |
| 1171 | TAITO_COINAGE_WORLD |
| 1253 | 1172 | |
| 1254 | 1173 | PORT_START_TAG("DSWB") |
| 1255 | | TAITO_DIFFICULTY_8 |
| 1174 | TAITO_DIFFICULTY |
| 1256 | 1175 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1257 | 1176 | PORT_DIPSETTING( 0x08, "80k and 160k" ) |
| 1258 | 1177 | PORT_DIPSETTING( 0x0c, "80k only" ) |
| r2956 | r2957 | |
| 1271 | 1190 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1272 | 1191 | |
| 1273 | 1192 | PORT_START_TAG("IN0") |
| 1274 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1193 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1275 | 1194 | |
| 1195 | |
| 1276 | 1196 | PORT_START_TAG("IN1") |
| 1277 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1197 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1278 | 1198 | |
| 1279 | 1199 | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_HIGH, 1 ) |
| 1280 | 1200 | INPUT_PORTS_END |
| 1281 | 1201 | |
| 1282 | 1202 | static INPUT_PORTS_START( raimaisj ) |
| 1283 | 1203 | PORT_START_TAG("DSWA") |
| 1284 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1285 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1286 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1287 | | TAITO_L_DSWA_2_4 |
| 1288 | | TAITO_COINAGE_JAPAN_8 |
| 1204 | TAITO_MACHINE_COCKTAIL |
| 1205 | TAITO_COINAGE_JAPAN_OLD |
| 1289 | 1206 | |
| 1290 | 1207 | PORT_START_TAG("DSWB") |
| 1291 | | TAITO_DIFFICULTY_8 |
| 1208 | TAITO_DIFFICULTY |
| 1292 | 1209 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) |
| 1293 | 1210 | PORT_DIPSETTING( 0x08, "80k and 160k" ) |
| 1294 | 1211 | PORT_DIPSETTING( 0x0c, "80k only" ) |
| r2956 | r2957 | |
| 1307 | 1224 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1308 | 1225 | |
| 1309 | 1226 | PORT_START_TAG("IN0") |
| 1310 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1227 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1311 | 1228 | |
| 1312 | 1229 | PORT_START_TAG("IN1") |
| 1313 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1230 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1314 | 1231 | |
| 1315 | 1232 | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_HIGH, 1 ) |
| 1316 | 1233 | INPUT_PORTS_END |
| 1317 | 1234 | |
| 1318 | | #define CHAMPWR_DSWB \ |
| 1319 | | PORT_START_TAG("DSWB") \ |
| 1320 | | TAITO_DIFFICULTY_8 \ |
| 1321 | | PORT_DIPNAME( 0x0c, 0x0c, "Time" ) \ |
| 1322 | | PORT_DIPSETTING( 0x08, "2 minutes" ) \ |
| 1323 | | PORT_DIPSETTING( 0x0c, "3 minutes" ) \ |
| 1324 | | PORT_DIPSETTING( 0x04, "4 minutes" ) \ |
| 1325 | | PORT_DIPSETTING( 0x00, "5 minutes" ) \ |
| 1326 | | PORT_DIPNAME( 0x30, 0x30, "'1 minute' Lasts:" ) \ |
| 1327 | | PORT_DIPSETTING( 0x00, "30 sec" ) \ |
| 1328 | | PORT_DIPSETTING( 0x10, "40 sec" ) \ |
| 1329 | | PORT_DIPSETTING( 0x30, "50 sec" ) \ |
| 1330 | | PORT_DIPSETTING( 0x20, "60 sec" ) \ |
| 1331 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) \ |
| 1332 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ |
| 1333 | | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) \ |
| 1334 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) \ |
| 1335 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) \ |
| 1336 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1337 | | |
| 1338 | | #define CHAMPWR_INPUTS \ |
| 1339 | | PORT_START_TAG("IN0") \ |
| 1340 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) \ |
| 1341 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) \ |
| 1342 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) \ |
| 1343 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) \ |
| 1344 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) \ |
| 1345 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) \ |
| 1346 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) \ |
| 1347 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) \ |
| 1348 | | \ |
| 1349 | | PORT_START_TAG("IN1") \ |
| 1350 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) \ |
| 1351 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) \ |
| 1352 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1353 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1354 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1355 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1356 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1357 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) \ |
| 1358 | | \ |
| 1359 | | PORT_START_TAG("IN2") \ |
| 1360 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) \ |
| 1361 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) \ |
| 1362 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) \ |
| 1363 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) \ |
| 1364 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) \ |
| 1365 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) \ |
| 1366 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) \ |
| 1367 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 1368 | | |
| 1369 | 1235 | static INPUT_PORTS_START( champwr ) |
| 1370 | 1236 | PORT_START_TAG("DSWA") |
| 1371 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) // all 2 in manual |
| 1372 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1237 | TAITO_MACHINE_NO_COCKTAIL // all 2 in manual |
| 1238 | TAITO_COINAGE_WORLD |
| 1239 | |
| 1240 | PORT_START_TAG("DSWB") |
| 1241 | TAITO_DIFFICULTY |
| 1242 | PORT_DIPNAME( 0x0c, 0x0c, "Time" ) |
| 1243 | PORT_DIPSETTING( 0x08, "2 minutes" ) |
| 1244 | PORT_DIPSETTING( 0x0c, "3 minutes" ) |
| 1245 | PORT_DIPSETTING( 0x04, "4 minutes" ) |
| 1246 | PORT_DIPSETTING( 0x00, "5 minutes" ) |
| 1247 | PORT_DIPNAME( 0x30, 0x30, "'1 minute' Lasts:" ) |
| 1248 | PORT_DIPSETTING( 0x00, "30 sec" ) |
| 1249 | PORT_DIPSETTING( 0x10, "40 sec" ) |
| 1250 | PORT_DIPSETTING( 0x30, "50 sec" ) |
| 1251 | PORT_DIPSETTING( 0x20, "60 sec" ) |
| 1252 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) |
| 1253 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1254 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1255 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) |
| 1256 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1373 | 1257 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1374 | | TAITO_L_DSWA_2_4 |
| 1375 | | TAITO_COINAGE_WORLD_8 |
| 1376 | 1258 | |
| 1377 | | CHAMPWR_DSWB |
| 1259 | PORT_START_TAG("IN0") |
| 1260 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 1261 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1262 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) |
| 1263 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) |
| 1264 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1265 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1266 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) |
| 1267 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1378 | 1268 | |
| 1379 | | CHAMPWR_INPUTS |
| 1269 | PORT_START_TAG("IN1") |
| 1270 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) |
| 1271 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) |
| 1272 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1273 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1274 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1275 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1276 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1277 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1278 | |
| 1279 | PORT_START_TAG("IN2") |
| 1280 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 1281 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 1282 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 1283 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 1284 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 1285 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 1286 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 1287 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) |
| 1380 | 1288 | INPUT_PORTS_END |
| 1381 | 1289 | |
| 1382 | 1290 | static INPUT_PORTS_START( champwrj ) |
| 1383 | | PORT_START_TAG("DSWA") |
| 1384 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| 1385 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1386 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1387 | | TAITO_L_DSWA_2_4 |
| 1388 | | TAITO_COINAGE_JAPAN_8 |
| 1291 | PORT_INCLUDE( champwr ) |
| 1389 | 1292 | |
| 1390 | | CHAMPWR_DSWB |
| 1391 | | |
| 1392 | | CHAMPWR_INPUTS |
| 1293 | PORT_MODIFY("DSWA") |
| 1294 | TAITO_COINAGE_JAPAN_OLD |
| 1393 | 1295 | INPUT_PORTS_END |
| 1394 | 1296 | |
| 1395 | 1297 | static INPUT_PORTS_START( champwru ) |
| 1396 | | PORT_START_TAG("DSWA") |
| 1397 | | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) |
| 1398 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1399 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1400 | | TAITO_L_DSWA_2_4 |
| 1401 | | TAITO_COINAGE_US_8 |
| 1298 | PORT_INCLUDE( champwr ) |
| 1402 | 1299 | |
| 1403 | | CHAMPWR_DSWB |
| 1404 | | |
| 1405 | | CHAMPWR_INPUTS |
| 1300 | PORT_MODIFY("DSWA") |
| 1301 | TAITO_COINAGE_US |
| 1406 | 1302 | INPUT_PORTS_END |
| 1407 | 1303 | |
| 1408 | | #define KURIKIN_DSWB \ |
| 1409 | | PORT_START_TAG("DSWB") \ |
| 1410 | | TAITO_DIFFICULTY_8 \ |
| 1411 | | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) \ |
| 1412 | | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) \ |
| 1413 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ |
| 1414 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) \ |
| 1415 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) \ |
| 1416 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ |
| 1417 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) \ |
| 1418 | | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) \ |
| 1419 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ |
| 1420 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) \ |
| 1421 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) \ |
| 1422 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) \ |
| 1423 | | PORT_DIPNAME( 0x40, 0x40, "Bosses' messages" ) \ |
| 1424 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) \ |
| 1425 | | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) \ |
| 1426 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) \ |
| 1427 | | PORT_DIPSETTING( 0x80, "5 Times" ) \ |
| 1428 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1429 | | |
| 1430 | 1304 | static INPUT_PORTS_START( kurikint ) |
| 1431 | 1305 | PORT_START_TAG("DSWA") |
| 1432 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1433 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1434 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1435 | | TAITO_L_DSWA_2_4 |
| 1436 | | TAITO_COINAGE_WORLD_8 |
| 1306 | TAITO_MACHINE_COCKTAIL |
| 1307 | TAITO_COINAGE_WORLD |
| 1437 | 1308 | |
| 1438 | | KURIKIN_DSWB |
| 1309 | PORT_START_TAG("DSWB") |
| 1310 | TAITO_DIFFICULTY |
| 1311 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1312 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1313 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1314 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 1315 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1316 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1317 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 1318 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1319 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1320 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 1321 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1322 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1323 | PORT_DIPNAME( 0x40, 0x40, "Bosses' messages" ) |
| 1324 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1325 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1326 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) |
| 1327 | PORT_DIPSETTING( 0x80, "5 Times" ) |
| 1328 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1439 | 1329 | |
| 1440 | 1330 | PORT_START_TAG("IN0") |
| 1441 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1331 | TAITO_JOY_UDLR_2_BUTTONS( 1 ) |
| 1442 | 1332 | |
| 1443 | 1333 | PORT_START_TAG("IN1") |
| 1444 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1334 | TAITO_JOY_UDLR_2_BUTTONS( 2 ) |
| 1445 | 1335 | |
| 1446 | 1336 | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_HIGH, 4 ) |
| 1447 | 1337 | INPUT_PORTS_END |
| 1448 | 1338 | |
| 1449 | 1339 | static INPUT_PORTS_START( kurikinj ) |
| 1450 | | PORT_START_TAG("DSWA") |
| 1451 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1452 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1453 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1454 | | TAITO_L_DSWA_2_4 |
| 1455 | | TAITO_COINAGE_JAPAN_8 |
| 1340 | PORT_INCLUDE( kurikint ) |
| 1456 | 1341 | |
| 1457 | | KURIKIN_DSWB |
| 1458 | | |
| 1459 | | PORT_START_TAG("IN0") |
| 1460 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1461 | | |
| 1462 | | PORT_START_TAG("IN1") |
| 1463 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1464 | | |
| 1465 | | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_HIGH, 4 ) |
| 1342 | PORT_MODIFY("DSWA") |
| 1343 | TAITO_COINAGE_JAPAN_OLD |
| 1466 | 1344 | INPUT_PORTS_END |
| 1467 | 1345 | |
| 1468 | 1346 | static INPUT_PORTS_START( kurikina ) |
| 1469 | | PORT_START_TAG("DSWA") |
| 1347 | PORT_INCLUDE( kurikint ) |
| 1348 | |
| 1349 | PORT_MODIFY("DSWA") |
| 1470 | 1350 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1471 | 1351 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1472 | 1352 | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| r2956 | r2957 | |
| 1479 | 1359 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 1480 | 1360 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1481 | 1361 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1482 | | TAITO_COINAGE_WORLD_8 |
| 1362 | TAITO_COINAGE_WORLD |
| 1483 | 1363 | |
| 1484 | | PORT_START_TAG("DSWB") |
| 1364 | PORT_MODIFY("DSWB") |
| 1485 | 1365 | PORT_DIPNAME( 0x01, 0x01, "Level Select (Cheat)") |
| 1486 | 1366 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1487 | 1367 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1505 | 1385 | PORT_DIPNAME( 0x80, 0x80, "Slow Motion (Cheat)") |
| 1506 | 1386 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1507 | 1387 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1508 | | |
| 1509 | | PORT_START_TAG("IN0") |
| 1510 | | TAITO_L_PLAYERS_INPUT( 1 ) |
| 1511 | | |
| 1512 | | PORT_START_TAG("IN1") |
| 1513 | | TAITO_L_PLAYERS_INPUT( 2 ) |
| 1514 | | |
| 1515 | | TAITO_L_SYSTEM_INPUT( IP_ACTIVE_HIGH, 4 ) |
| 1516 | 1388 | INPUT_PORTS_END |
| 1517 | 1389 | |
| 1518 | 1390 | static INPUT_PORTS_START( puzznic ) |
| 1519 | 1391 | PORT_START_TAG("DSWA") |
| 1520 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 1521 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 1522 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 1523 | | TAITO_L_DSWA_2_4 |
| 1392 | TAITO_MACHINE_COCKTAIL |
| 1524 | 1393 | /* There is no Coin B in the Manuals */ |
| 1525 | 1394 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) |
| 1526 | 1395 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| r2956 | r2957 | |
| 1536 | 1405 | |
| 1537 | 1406 | PORT_START_TAG("DSWB") |
| 1538 | 1407 | /* Difficulty controls the Timer Speed (how many seconds are there in a minute) */ |
| 1539 | | TAITO_DIFFICULTY_8 |
| 1408 | TAITO_DIFFICULTY |
| 1540 | 1409 | PORT_DIPNAME( 0x0c, 0x0c, "Retries" ) |
| 1541 | 1410 | PORT_DIPSETTING( 0x00, "0" ) |
| 1542 | 1411 | PORT_DIPSETTING( 0x04, "1" ) |
| r2956 | r2957 | |
| 1590 | 1459 | PORT_DIPNAME( 0x01, 0x01, "Play Mode" ) |
| 1591 | 1460 | PORT_DIPSETTING( 0x00, "1 Player" ) |
| 1592 | 1461 | PORT_DIPSETTING( 0x01, "2 Player" ) |
| 1593 | | TAITO_L_DSWA_2_4 |
| 1594 | | TAITO_COINAGE_WORLD_8 |
| 1462 | TAITO_DSWA_BITS_1_TO_3 |
| 1463 | TAITO_COINAGE_WORLD |
| 1595 | 1464 | |
| 1596 | 1465 | PORT_START_TAG("DSWB") |
| 1597 | | TAITO_DIFFICULTY_8 |
| 1466 | TAITO_DIFFICULTY |
| 1598 | 1467 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1599 | 1468 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1600 | 1469 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1639 | 1508 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 1640 | 1509 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1641 | 1510 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1642 | | TAITO_L_DSWA_2_4 |
| 1643 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 1511 | TAITO_DSWA_BITS_1_TO_3 |
| 1512 | TAITO_COINAGE_JAPAN_NEW |
| 1644 | 1513 | |
| 1645 | 1514 | PORT_START_TAG("DSWB") |
| 1646 | 1515 | /* Difficulty controls how fast the dice lines fall*/ |
| 1647 | | TAITO_DIFFICULTY_8 |
| 1516 | TAITO_DIFFICULTY |
| 1648 | 1517 | PORT_DIPNAME( 0x0c, 0x0c, "Games for VS Victory" ) |
| 1649 | 1518 | PORT_DIPSETTING( 0x08, "1 Game" ) |
| 1650 | 1519 | PORT_DIPSETTING( 0x0c, "2 Games" ) |
| r2956 | r2957 | |
| 1698 | 1567 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 1699 | 1568 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1700 | 1569 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1701 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) |
| 1702 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1703 | | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1704 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1705 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1706 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1707 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1708 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 1570 | TAITO_DSWA_BITS_1_TO_3 |
| 1571 | TAITO_COINAGE_JAPAN_NEW |
| 1709 | 1572 | |
| 1710 | 1573 | PORT_START_TAG("DSWB") |
| 1711 | | TAITO_DIFFICULTY_8 |
| 1574 | TAITO_DIFFICULTY |
| 1712 | 1575 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1713 | 1576 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1714 | 1577 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1764 | 1627 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 1765 | 1628 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1766 | 1629 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1767 | | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) ) |
| 1768 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1769 | | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1770 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1771 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1772 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1773 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1774 | | TAITO_COINAGE_WORLD_8 |
| 1630 | TAITO_DSWA_BITS_1_TO_3 |
| 1631 | TAITO_COINAGE_WORLD |
| 1775 | 1632 | |
| 1776 | 1633 | PORT_START_TAG("DSWB") |
| 1777 | | TAITO_DIFFICULTY_8 |
| 1634 | TAITO_DIFFICULTY |
| 1778 | 1635 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1779 | 1636 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1780 | 1637 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1830 | 1687 | PORT_DIPNAME( 0x01, 0x01, "Beer Frame Message" ) |
| 1831 | 1688 | PORT_DIPSETTING( 0x01, "Break Time" ) |
| 1832 | 1689 | PORT_DIPSETTING( 0x00, "Beer Frame" ) |
| 1833 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) |
| 1834 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1835 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1836 | | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 1837 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 1838 | | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1839 | | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 1840 | | TAITO_COINAGE_US_8 /* According to the "United States Version" manual listing */ |
| 1690 | TAITO_DSWA_BITS_1_TO_3 |
| 1691 | TAITO_COINAGE_US /* According to the "United States Version" manual listing */ |
| 1841 | 1692 | |
| 1842 | 1693 | PORT_START_TAG("DSWB") |
| 1843 | 1694 | /* Not for sure, the CPU seems to play better when set to Hardest */ |
| 1844 | | TAITO_DIFFICULTY_8 |
| 1695 | TAITO_DIFFICULTY |
| 1845 | 1696 | PORT_DIPNAME( 0x0c, 0x0c, "Time" ) |
| 1846 | 1697 | PORT_DIPSETTING( 0x08, "20 sec" ) |
| 1847 | 1698 | PORT_DIPSETTING( 0x0c, "30 sec" ) |
| r2956 | r2957 | |
| 1914 | 1765 | |
| 1915 | 1766 | PORT_START_TAG("DSWB") |
| 1916 | 1767 | /* Difficulty controls the Ball Speed */ |
| 1917 | | TAITO_DIFFICULTY_8 |
| 1768 | TAITO_DIFFICULTY |
| 1918 | 1769 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1919 | 1770 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1920 | 1771 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 1977 | 1828 | PORT_DIPNAME( 0x08, 0x08, "Coin Mode" ) /* Coin Mode B not supported yet */ |
| 1978 | 1829 | PORT_DIPSETTING( 0x08, "Mode A" ) |
| 1979 | 1830 | PORT_DIPSETTING( 0x00, "Mode B" ) |
| 1980 | | TAITO_COINAGE_JAPAN_8 |
| 1831 | TAITO_COINAGE_JAPAN_OLD |
| 1981 | 1832 | /* |
| 1982 | 1833 | |
| 1983 | 1834 | Coin 1 is DSW 1, 5&6 - Coin 2 is DSW 1, 7&8 |
| r2956 | r2957 | |
| 1997 | 1848 | |
| 1998 | 1849 | PORT_START_TAG("DSWB") |
| 1999 | 1850 | /* Difficulty controls the number of hits requiered to destroy enemies */ |
| 2000 | | TAITO_DIFFICULTY_8 |
| 1851 | TAITO_DIFFICULTY |
| 2001 | 1852 | PORT_DIPNAME( 0x04, 0x04, "Time" ) /* Simply listed as "Time", what exactly does it refer to? */ |
| 2002 | 1853 | PORT_DIPSETTING( 0x04, "2 Seconds" ) |
| 2003 | 1854 | PORT_DIPSETTING( 0x00, "3 Seconds" ) |
| r2956 | r2957 | |
| 2059 | 1910 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 2060 | 1911 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2061 | 1912 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 2062 | | TAITO_COINAGE_JAPAN_NEW_8 |
| 1913 | TAITO_COINAGE_JAPAN_NEW |
| 2063 | 1914 | |
| 2064 | 1915 | PORT_START_TAG("DSWB") |
| 2065 | | TAITO_DIFFICULTY_8 |
| 1916 | TAITO_DIFFICULTY |
| 2066 | 1917 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 2067 | 1918 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2068 | 1919 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2114 | 1965 | INPUT_PORTS_END |
| 2115 | 1966 | |
| 2116 | 1967 | static INPUT_PORTS_START( evilston ) |
| 2117 | | |
| 2118 | 1968 | PORT_START_TAG("DSWA") |
| 2119 | | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) |
| 2120 | | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 2121 | | PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) |
| 2122 | | TAITO_L_DSWA_2_4 |
| 2123 | | TAITO_COINAGE_WORLD_8 |
| 1969 | TAITO_MACHINE_COCKTAIL |
| 1970 | TAITO_COINAGE_WORLD |
| 2124 | 1971 | |
| 2125 | 1972 | PORT_START_TAG("DSWB") |
| 2126 | | TAITO_DIFFICULTY_8 |
| 1973 | TAITO_DIFFICULTY |
| 2127 | 1974 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) |
| 2128 | 1975 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2129 | 1976 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r2956 | r2957 | |
| 2135 | 1982 | PORT_DIPSETTING( 0x20, "2" ) |
| 2136 | 1983 | PORT_DIPSETTING( 0x10, "1" ) |
| 2137 | 1984 | PORT_DIPSETTING( 0x00, "4" ) |
| 2138 | | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Language ) ) |
| 2139 | | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 2140 | | PORT_DIPSETTING( 0x80, DEF_STR( English ) ) |
| 2141 | | PORT_DIPSETTING( 0x40, DEF_STR( English ) ) |
| 2142 | | PORT_DIPSETTING( 0xc0, DEF_STR( Japanese ) ) |
| 1985 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Language ) ) |
| 1986 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 1987 | PORT_DIPSETTING( 0x80, DEF_STR( English ) ) |
| 1988 | PORT_DIPSETTING( 0x40, DEF_STR( English ) ) |
| 1989 | PORT_DIPSETTING( 0xc0, DEF_STR( Japanese ) ) |
| 2143 | 1990 | |
| 2144 | 1991 | PORT_START_TAG("IN0") |
| 2145 | 1992 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r2956 | r2957 | |
| 2164 | 2011 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 2165 | 2012 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 2166 | 2013 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 2167 | | |
| 2168 | 2014 | INPUT_PORTS_END |
| 2169 | 2015 | |
| 2170 | 2016 | |
src/mame/drivers/champbas.c
| r2956 | r2957 | |
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | | Championship Baseball |
| 3 | Talbot - (c) 1982 Alpha Denshi Co. |
| 4 | Champion Base Ball - (c) 1983 Alpha Denshi Co. |
| 5 | Champion Base Ball Part-2 - (c) 1983 Alpha Denshi Co. |
| 6 | Exciting Soccer - (c) 1983 Alpha Denshi Co. |
| 7 | Exciting Soccer II - (c) 1984 Alpha Denshi Co. |
| 4 | 8 | |
| 5 | | driver by Nicola Salmoria |
| 9 | driver by Ernesto Corvi, Jarek Parchanski, Nicola Salmoria |
| 6 | 10 | ALPHA 8201 MCU handling by Tatsuyuki satoh |
| 7 | 11 | |
| 8 | 12 | Note: the Champion Baseball II unofficial schematics show a 8302 instead of |
| 9 | 13 | the 8201, however the MCU is used like a plain 8201, 830x extra instructions |
| 10 | 14 | are not used. |
| 11 | 15 | |
| 12 | | TODO: |
| 13 | | champbb2 , sometime mcu err and ACCESS VIOLATION trap. |
| 14 | | |
| 15 | 16 | champbbj and champbb2 has Alpha8201 mcu for protection. |
| 16 | 17 | champbja is a patched version of champbbj with different protection. |
| 17 | 18 | |
| r2956 | r2957 | |
| 63 | 64 | it on boot and hang if it is not 0. Also, the Talbot MCU does a security check |
| 64 | 65 | and crashes if the bit doesn't match bit 2 of RAM location 0x8c00. |
| 65 | 66 | |
| 67 | - The Exciting Soccer bootleg runs on a modified Champion Baseball board. The |
| 68 | original board has vastly improved sound hardware which is thereforew missing |
| 69 | from the bootleg. |
| 70 | |
| 71 | TODO: |
| 72 | ----- |
| 73 | - champbb2, sometime mcu err and ACCESS VIOLATION trap. |
| 74 | |
| 75 | - Exciting Soccer: interrupt source for sound CPU is unknown. |
| 76 | |
| 77 | - Exciting Soccer: sound CPU writes to unknown ports on startup. Timer configure? |
| 78 | |
| 79 | - Exciting Soccer: Unknown writes to 8910 I/O ports (filters?) |
| 80 | |
| 66 | 81 | ***************************************************************************/ |
| 67 | 82 | |
| 68 | 83 | #include "driver.h" |
| r2956 | r2957 | |
| 73 | 88 | #define CPUTAG_MCU "MCU" |
| 74 | 89 | |
| 75 | 90 | extern UINT8 *champbas_bg_videoram; |
| 76 | | WRITE8_HANDLER( champbas_bg_videoram_w ); |
| 77 | | WRITE8_HANDLER( champbas_gfxbank_w ); |
| 78 | | WRITE8_HANDLER( champbas_palette_bank_w ); |
| 79 | | WRITE8_HANDLER( champbas_flipscreen_w ); |
| 80 | 91 | |
| 81 | | PALETTE_INIT( champbas ); |
| 82 | | VIDEO_START( champbas ); |
| 83 | | VIDEO_UPDATE( champbas ); |
| 92 | extern WRITE8_HANDLER( champbas_bg_videoram_w ); |
| 93 | extern WRITE8_HANDLER( champbas_gfxbank_w ); |
| 94 | extern WRITE8_HANDLER( champbas_palette_bank_w ); |
| 95 | extern WRITE8_HANDLER( champbas_flipscreen_w ); |
| 84 | 96 | |
| 97 | extern PALETTE_INIT( champbas ); |
| 98 | extern PALETTE_INIT( exctsccr ); |
| 99 | extern VIDEO_START( champbas ); |
| 100 | extern VIDEO_START( exctsccr ); |
| 101 | extern VIDEO_UPDATE( champbas ); |
| 102 | extern VIDEO_UPDATE( exctsccr ); |
| 85 | 103 | |
| 104 | |
| 86 | 105 | static int champbas_watchdog_count; |
| 87 | 106 | |
| 88 | 107 | |
| r2956 | r2957 | |
| 105 | 124 | } |
| 106 | 125 | |
| 107 | 126 | |
| 108 | | static WRITE8_HANDLER( irq_ack_w ) |
| 127 | static WRITE8_HANDLER( irq_enable_w ) |
| 109 | 128 | { |
| 110 | | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); |
| 129 | int bit = data & 1; |
| 130 | |
| 131 | cpu_interrupt_enable(0,bit); |
| 132 | if (!bit) |
| 133 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); |
| 111 | 134 | } |
| 112 | 135 | |
| 113 | 136 | |
| 137 | static TIMER_CALLBACK( exctsccr_fm_callback ) |
| 138 | { |
| 139 | cpunum_set_input_line_and_vector(machine, 1, 0, HOLD_LINE, 0xff ); |
| 140 | } |
| 141 | |
| 142 | static MACHINE_START( exctsccr ) |
| 143 | { |
| 144 | // FIXME |
| 145 | timer_pulse(ATTOTIME_IN_HZ(75), NULL, 0, exctsccr_fm_callback); /* updates fm */ |
| 146 | } |
| 147 | |
| 148 | |
| 149 | // Champion Baseball has only one DAC |
| 114 | 150 | static WRITE8_HANDLER( champbas_dac_w ) |
| 115 | 151 | { |
| 116 | | DAC_signed_data_w(0,data<<2); |
| 152 | DAC_signed_data_w(0, data << 2); |
| 117 | 153 | } |
| 118 | 154 | |
| 155 | // Exciting Soccer has two |
| 156 | static WRITE8_HANDLER( exctsccr_DAC_data_w ) |
| 157 | { |
| 158 | DAC_signed_data_w(offset, data << 2); |
| 159 | } |
| 160 | |
| 161 | |
| 119 | 162 | /////////////////////////////////////////////////////////////////////////// |
| 120 | 163 | // protection handling |
| 121 | 164 | /////////////////////////////////////////////////////////////////////////// |
| r2956 | r2957 | |
| 138 | 181 | cpunum_set_input_line(machine, cpunum, INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE); |
| 139 | 182 | } |
| 140 | 183 | |
| 184 | |
| 141 | 185 | /* champbja another protection */ |
| 142 | 186 | static READ8_HANDLER( champbja_alt_protection_r ) |
| 143 | 187 | { |
| r2956 | r2957 | |
| 170 | 214 | |
| 171 | 215 | |
| 172 | 216 | |
| 173 | | static ADDRESS_MAP_START( talbot_main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 217 | static ADDRESS_MAP_START( talbot_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 174 | 218 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 175 | 219 | AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE(1) /* MCU shared RAM */ |
| 176 | 220 | AM_RANGE(0x7000, 0x7000) AM_WRITE(AY8910_write_port_0_w) |
| r2956 | r2957 | |
| 179 | 223 | AM_RANGE(0x8800, 0x8fef) AM_RAM |
| 180 | 224 | AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 181 | 225 | |
| 182 | | AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_ack_w) |
| 226 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 227 | AM_RANGE(0xa040, 0xa040) AM_READ(input_port_1_r) |
| 228 | AM_RANGE(0xa080, 0xa080) AM_READ(input_port_2_r) |
| 229 | AM_RANGE(0xa0c0, 0xa0c0) AM_READ(input_port_3_r) |
| 230 | |
| 231 | AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) |
| 183 | 232 | AM_RANGE(0xa001, 0xa001) AM_WRITENOP // !WORK board output (no use?) |
| 184 | 233 | AM_RANGE(0xa002, 0xa002) AM_WRITENOP |
| 185 | 234 | AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) |
| r2956 | r2957 | |
| 188 | 237 | AM_RANGE(0xa006, 0xa006) AM_WRITE(champbas_mcu_halt_w) |
| 189 | 238 | AM_RANGE(0xa007, 0xa007) AM_WRITE(champbas_mcu_switch_w) |
| 190 | 239 | |
| 191 | | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 192 | | AM_RANGE(0xa040, 0xa040) AM_READ(input_port_1_r) |
| 193 | 240 | AM_RANGE(0xa060, 0xa06f) AM_WRITE(SMH_RAM) AM_BASE(&spriteram_2) |
| 194 | | AM_RANGE(0xa080, 0xa080) AM_READ(input_port_2_r) |
| 195 | | AM_RANGE(0xa0c0, 0xa0c0) AM_READWRITE(input_port_3_r, champbas_watchdog_reset_w) |
| 241 | AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w) |
| 196 | 242 | ADDRESS_MAP_END |
| 197 | 243 | |
| 198 | | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 244 | |
| 245 | static ADDRESS_MAP_START( champbas_main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 199 | 246 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 200 | 247 | AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE(1) |
| 201 | | |
| 202 | 248 | AM_RANGE(0x7000, 0x7000) AM_WRITE(AY8910_write_port_0_w) |
| 203 | 249 | AM_RANGE(0x7001, 0x7001) AM_WRITE(AY8910_control_port_0_w) |
| 204 | 250 | AM_RANGE(0x7800, 0x7fff) AM_ROM // champbb2 only |
| 205 | | |
| 206 | 251 | AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_BASE(&champbas_bg_videoram) |
| 207 | 252 | AM_RANGE(0x8800, 0x8fef) AM_RAM |
| 208 | 253 | AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 209 | 254 | |
| 210 | | AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_ack_w) AM_READ(input_port_0_r) |
| 255 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 256 | AM_RANGE(0xa040, 0xa040) AM_READ(input_port_1_r) |
| 257 | AM_RANGE(0xa080, 0xa080) AM_READ(input_port_2_r) |
| 258 | AM_RANGE(0xa0c0, 0xa0c0) AM_READ(input_port_3_r) |
| 259 | |
| 260 | AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) |
| 211 | 261 | AM_RANGE(0xa001, 0xa001) AM_WRITENOP // !WORK board output (no use?) |
| 212 | 262 | AM_RANGE(0xa002, 0xa002) AM_WRITE(champbas_gfxbank_w) |
| 213 | 263 | AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) |
| r2956 | r2957 | |
| 216 | 266 | AM_RANGE(0xa006, 0xa006) AM_WRITE(champbas_mcu_halt_w) // MCU not present/not used in champbas |
| 217 | 267 | AM_RANGE(0xa007, 0xa007) AM_WRITE(champbas_mcu_switch_w) // MCU not present/not used in champbas |
| 218 | 268 | |
| 219 | | AM_RANGE(0xa040, 0xa040) AM_READ(input_port_1_r) |
| 220 | 269 | AM_RANGE(0xa060, 0xa06f) AM_RAM AM_BASE(&spriteram_2) |
| 221 | | AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) AM_READ(input_port_2_r) |
| 270 | AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) |
| 222 | 271 | /* AM_RANGE(0xa0a0, 0xa0a0) ???? */ |
| 223 | | AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w) AM_READ(input_port_3_r) |
| 272 | AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w) |
| 224 | 273 | |
| 225 | 274 | /* champbja only */ |
| 226 | 275 | AM_RANGE(0x6800, 0x68ff) AM_READ(champbja_alt_protection_r) |
| 276 | ADDRESS_MAP_END |
| 227 | 277 | |
| 278 | static ADDRESS_MAP_START( exctsccb_main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 279 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 280 | // AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE(1) // MCU not used (though it's present on the board) |
| 281 | AM_RANGE(0x7000, 0x7000) AM_WRITE(AY8910_write_port_0_w) |
| 282 | AM_RANGE(0x7001, 0x7001) AM_WRITE(AY8910_control_port_0_w) |
| 283 | // AM_RANGE(0x7800, 0x7fff) AM_ROM // champbb2 only |
| 284 | AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_BASE(&champbas_bg_videoram) |
| 285 | AM_RANGE(0x8800, 0x8fff) AM_RAM AM_BASE(&spriteram_2) /* ??? */ |
| 286 | |
| 287 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 288 | AM_RANGE(0xa040, 0xa040) AM_READ(input_port_1_r) |
| 289 | AM_RANGE(0xa080, 0xa080) AM_READ(input_port_2_r) |
| 290 | AM_RANGE(0xa0c0, 0xa0c0) AM_READ(input_port_3_r) |
| 291 | |
| 292 | AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) |
| 293 | AM_RANGE(0xa001, 0xa001) AM_WRITENOP /* ??? */ |
| 294 | AM_RANGE(0xa002, 0xa002) AM_WRITE(champbas_gfxbank_w) |
| 295 | AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) |
| 296 | AM_RANGE(0xa006, 0xa006) AM_WRITENOP /* MCU is not used, but some leftover code still writes here */ |
| 297 | AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* MCU is not used, but some leftover code still writes here */ |
| 298 | |
| 299 | AM_RANGE(0xa040, 0xa06f) AM_WRITE(SMH_RAM) AM_BASE(&spriteram) /* Sprite Pos */ |
| 300 | AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) |
| 301 | AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) |
| 228 | 302 | ADDRESS_MAP_END |
| 229 | 303 | |
| 230 | | static ADDRESS_MAP_START( sub_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 304 | |
| 305 | static ADDRESS_MAP_START( exctsccr_main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 231 | 306 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 307 | AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE(1) |
| 308 | AM_RANGE(0x7c00, 0x7fff) AM_RAM |
| 309 | AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_BASE(&champbas_bg_videoram) |
| 310 | AM_RANGE(0x8800, 0x8bff) AM_RAM AM_BASE(&spriteram_2) /* ??? */ |
| 311 | |
| 312 | AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) |
| 313 | AM_RANGE(0xa040, 0xa040) AM_READ(input_port_1_r) |
| 314 | AM_RANGE(0xa080, 0xa080) AM_READ(input_port_2_r) |
| 315 | AM_RANGE(0xa0c0, 0xa0c0) AM_READ(input_port_3_r) |
| 316 | |
| 317 | AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_enable_w) |
| 318 | // AM_RANGE(0xa001, 0xa001) AM_WRITENOP /* ??? */ |
| 319 | AM_RANGE(0xa002, 0xa002) AM_WRITE(champbas_gfxbank_w) |
| 320 | AM_RANGE(0xa003, 0xa003) AM_WRITE(champbas_flipscreen_w) |
| 321 | AM_RANGE(0xa006, 0xa006) AM_WRITE(champbas_mcu_halt_w) |
| 322 | AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* This is also MCU control, but i dont need it */ |
| 323 | |
| 324 | AM_RANGE(0xa040, 0xa06f) AM_WRITE(SMH_RAM) AM_BASE(&spriteram) /* Sprite pos */ |
| 325 | AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) |
| 326 | AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) |
| 327 | ADDRESS_MAP_END |
| 328 | |
| 329 | |
| 330 | |
| 331 | static ADDRESS_MAP_START( champbas_sub_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 332 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 232 | 333 | AM_RANGE(0x6000, 0x7fff) AM_READ(soundlatch_r) |
| 233 | 334 | AM_RANGE(0x8000, 0x9fff) AM_WRITENOP // 4-bit return code to main CPU (not used) |
| 234 | 335 | AM_RANGE(0xa000, 0xbfff) AM_WRITE(soundlatch_clear_w) |
| r2956 | r2957 | |
| 236 | 337 | AM_RANGE(0xe000, 0xe3ff) AM_MIRROR(0x1c00) AM_RAM |
| 237 | 338 | ADDRESS_MAP_END |
| 238 | 339 | |
| 340 | |
| 341 | static ADDRESS_MAP_START( exctsccr_sub_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 342 | AM_RANGE(0x0000, 0x8fff) AM_ROM |
| 343 | AM_RANGE(0xa000, 0xa7ff) AM_RAM |
| 344 | AM_RANGE(0xc008, 0xc009) AM_WRITE(exctsccr_DAC_data_w) |
| 345 | AM_RANGE(0xc00c, 0xc00c) AM_WRITE(soundlatch_clear_w) |
| 346 | AM_RANGE(0xc00d, 0xc00d) AM_READ(soundlatch_r) |
| 347 | // AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP /* ??? */ |
| 348 | ADDRESS_MAP_END |
| 349 | |
| 350 | static ADDRESS_MAP_START( exctsccr_sound_writeport, ADDRESS_SPACE_IO, 8 ) |
| 351 | ADDRESS_MAP_GLOBAL_MASK( 0x00ff ) |
| 352 | AM_RANGE(0x82, 0x82) AM_WRITE(AY8910_write_port_0_w) |
| 353 | AM_RANGE(0x83, 0x83) AM_WRITE(AY8910_control_port_0_w) |
| 354 | AM_RANGE(0x86, 0x86) AM_WRITE(AY8910_write_port_1_w) |
| 355 | AM_RANGE(0x87, 0x87) AM_WRITE(AY8910_control_port_1_w) |
| 356 | AM_RANGE(0x8a, 0x8a) AM_WRITE(AY8910_write_port_2_w) |
| 357 | AM_RANGE(0x8b, 0x8b) AM_WRITE(AY8910_control_port_2_w) |
| 358 | AM_RANGE(0x8e, 0x8e) AM_WRITE(AY8910_write_port_3_w) |
| 359 | AM_RANGE(0x8f, 0x8f) AM_WRITE(AY8910_control_port_3_w) |
| 360 | ADDRESS_MAP_END |
| 361 | |
| 362 | |
| 239 | 363 | static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 240 | 364 | AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE(1) /* main CPU shared RAM */ |
| 241 | 365 | ADDRESS_MAP_END |
| r2956 | r2957 | |
| 351 | 475 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 352 | 476 | INPUT_PORTS_END |
| 353 | 477 | |
| 478 | static INPUT_PORTS_START( exctsccr ) |
| 479 | PORT_START /* IN0 */ |
| 480 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 481 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 482 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 483 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 484 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 485 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 486 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 487 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 354 | 488 | |
| 489 | PORT_START /* IN1 */ |
| 490 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 491 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 492 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 493 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 494 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 495 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 496 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 497 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 355 | 498 | |
| 499 | PORT_START /* DSW0 */ |
| 500 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) |
| 501 | PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) |
| 502 | PORT_DIPSETTING( 0x03, "A 1C/1C B 3C/1C" ) |
| 503 | PORT_DIPSETTING( 0x01, "A 1C/2C B 1C/4C" ) |
| 504 | PORT_DIPSETTING( 0x00, "A 1C/3C B 1C/6C" ) |
| 505 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) |
| 506 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 507 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 508 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) |
| 509 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 510 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| 511 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) ) |
| 512 | PORT_DIPSETTING( 0x10, DEF_STR( Easy ) ) |
| 513 | PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) |
| 514 | PORT_DIPNAME( 0x60, 0x00, DEF_STR( Game_Time ) ) |
| 515 | PORT_DIPSETTING( 0x20, "1 Min." ) |
| 516 | PORT_DIPSETTING( 0x00, "2 Min." ) |
| 517 | PORT_DIPSETTING( 0x60, "3 Min." ) |
| 518 | PORT_DIPSETTING( 0x40, "4 Min." ) |
| 519 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(champbas_watchdog_bit2, 0) // bit 2 of the watchdog counter |
| 520 | |
| 521 | PORT_START /* IN2 */ |
| 522 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 523 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 524 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 525 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 526 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 527 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 528 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 529 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 530 | INPUT_PORTS_END |
| 531 | |
| 532 | |
| 533 | |
| 356 | 534 | static const gfx_layout charlayout = |
| 357 | 535 | { |
| 358 | 536 | 8,8, |
| r2956 | r2957 | |
| 376 | 554 | }; |
| 377 | 555 | |
| 378 | 556 | static GFXDECODE_START( talbot ) |
| 379 | | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0x100, 0x100/4 ) |
| 380 | | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 0x000, 0x100/4 ) |
| 557 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0x100, 0x100>>2 ) |
| 558 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 0x000, 0x100>>2 ) |
| 381 | 559 | GFXDECODE_END |
| 382 | 560 | |
| 383 | 561 | static GFXDECODE_START( champbas ) |
| 384 | | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 0x200/4 ) |
| 385 | | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 0, 0x200/4 ) |
| 562 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 0x200>>2 ) |
| 563 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout, 0, 0x200>>2 ) |
| 386 | 564 | GFXDECODE_END |
| 387 | 565 | |
| 388 | 566 | |
| 389 | 567 | |
| 568 | static const gfx_layout charlayout_3bpp = |
| 569 | { |
| 570 | 8,8, |
| 571 | RGN_FRAC(1,2), |
| 572 | 3, |
| 573 | { RGN_FRAC(1,2)+4, 0, 4 }, |
| 574 | { STEP4(8*8,1), STEP4(0,1) }, |
| 575 | { STEP8(0,8) }, |
| 576 | 16*8 |
| 577 | }; |
| 390 | 578 | |
| 579 | static const gfx_layout spritelayout_3bpp = |
| 580 | { |
| 581 | 16,16, |
| 582 | RGN_FRAC(1,2), |
| 583 | 3, |
| 584 | { RGN_FRAC(1,2)+4, 0, 4 }, |
| 585 | { STEP4(8*8,1), STEP4(16*8,1), STEP4(24*8,1), STEP4(0,1) }, |
| 586 | { STEP8(0,8), STEP8(32*8,8) }, |
| 587 | 64*8 |
| 588 | }; |
| 589 | |
| 590 | static const gfx_layout spritelayout_4bpp = |
| 591 | { |
| 592 | 16,16, |
| 593 | RGN_FRAC(1,2), |
| 594 | 4, |
| 595 | { RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+4, 0, 4 }, |
| 596 | { STEP4(8*8,1), STEP4(16*8,1), STEP4(24*8,1), STEP4(0,1) }, |
| 597 | { STEP8(0,8), STEP8(32*8,8) }, |
| 598 | 64*8 |
| 599 | }; |
| 600 | |
| 601 | static GFXDECODE_START( exctsccr ) |
| 602 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout_3bpp, 0x000, 0x080>>3 ) /* chars */ |
| 603 | GFXDECODE_ENTRY( REGION_GFX2, 0, spritelayout_3bpp, 0x080, 0x080>>3 ) /* sprites */ |
| 604 | GFXDECODE_ENTRY( REGION_GFX3, 0, spritelayout_4bpp, 0x100, 0x100>>4 ) /* sprites */ |
| 605 | GFXDECODE_END |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 391 | 610 | static MACHINE_DRIVER_START( talbot ) |
| 392 | 611 | |
| 393 | 612 | /* basic machine hardware */ |
| 394 | 613 | |
| 395 | 614 | MDRV_CPU_ADD(Z80, XTAL_18_432MHz/6) |
| 396 | | MDRV_CPU_PROGRAM_MAP(talbot_main_map, 0) |
| 615 | MDRV_CPU_PROGRAM_MAP(talbot_map, 0) |
| 397 | 616 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) |
| 398 | 617 | |
| 399 | 618 | /* MCU */ |
| r2956 | r2957 | |
| 423 | 642 | |
| 424 | 643 | |
| 425 | 644 | static MACHINE_DRIVER_START( champbas ) |
| 426 | | |
| 427 | 645 | /* basic machine hardware */ |
| 428 | 646 | |
| 429 | 647 | /* main cpu */ |
| 430 | 648 | MDRV_CPU_ADD(Z80, XTAL_18_432MHz/6) |
| 431 | | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 649 | MDRV_CPU_PROGRAM_MAP(champbas_main_map,0) |
| 432 | 650 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) |
| 433 | 651 | |
| 434 | 652 | /* audio CPU */ |
| 435 | 653 | MDRV_CPU_ADD(Z80, XTAL_18_432MHz/6) |
| 436 | | MDRV_CPU_PROGRAM_MAP(sub_map,0) |
| 654 | MDRV_CPU_PROGRAM_MAP(champbas_sub_map,0) |
| 437 | 655 | |
| 438 | 656 | /* video hardware */ |
| 439 | 657 | MDRV_SCREEN_ADD("main", RASTER) |
| r2956 | r2957 | |
| 473 | 691 | MDRV_INTERLEAVE(50) |
| 474 | 692 | MACHINE_DRIVER_END |
| 475 | 693 | |
| 476 | | /*************************************************************************** |
| 477 | 694 | |
| 478 | | Game driver(s) |
| 695 | static MACHINE_DRIVER_START( exctsccr ) |
| 479 | 696 | |
| 480 | | ***************************************************************************/ |
| 697 | /* basic machine hardware */ |
| 698 | MDRV_CPU_ADD(Z80, 4000000) /* 4.0 MHz (?) */ |
| 699 | MDRV_CPU_PROGRAM_MAP(exctsccr_main_map,0) |
| 700 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) |
| 481 | 701 | |
| 702 | MDRV_CPU_ADD(Z80, 4123456) /* ??? with 4 MHz, nested NMIs might happen */ |
| 703 | MDRV_CPU_PROGRAM_MAP(exctsccr_sub_map,0) |
| 704 | MDRV_CPU_IO_MAP(0,exctsccr_sound_writeport) |
| 705 | MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 4000) /* 4 kHz, updates the dac */ |
| 706 | |
| 707 | /* MCU */ |
| 708 | MDRV_CPU_ADD_TAG(CPUTAG_MCU, ALPHA8301, XTAL_18_432MHz/6/8) |
| 709 | MDRV_CPU_PROGRAM_MAP(mcu_map,0) |
| 710 | |
| 711 | MDRV_MACHINE_START(exctsccr) |
| 712 | |
| 713 | /* video hardware */ |
| 714 | MDRV_SCREEN_ADD("main", RASTER) |
| 715 | MDRV_SCREEN_REFRESH_RATE(60) |
| 716 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 717 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 718 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 719 | |
| 720 | MDRV_GFXDECODE(exctsccr) |
| 721 | MDRV_PALETTE_LENGTH(0x200) |
| 722 | |
| 723 | MDRV_PALETTE_INIT(exctsccr) |
| 724 | MDRV_VIDEO_START(exctsccr) |
| 725 | MDRV_VIDEO_UPDATE(exctsccr) |
| 726 | MDRV_VIDEO_EOF(champbas) |
| 727 | |
| 728 | /* sound hardware */ |
| 729 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 730 | |
| 731 | MDRV_SOUND_ADD(AY8910, 1500000) |
| 732 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08) |
| 733 | |
| 734 | MDRV_SOUND_ADD(AY8910, 1500000) |
| 735 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08) |
| 736 | |
| 737 | MDRV_SOUND_ADD(AY8910, 1500000) |
| 738 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08) |
| 739 | |
| 740 | MDRV_SOUND_ADD(AY8910, 1500000) |
| 741 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.08) |
| 742 | |
| 743 | MDRV_SOUND_ADD(DAC, 0) |
| 744 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 745 | |
| 746 | MDRV_SOUND_ADD(DAC, 0) |
| 747 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 748 | MACHINE_DRIVER_END |
| 749 | |
| 750 | /* Bootleg running on a modified Champion Baseball board */ |
| 751 | static MACHINE_DRIVER_START( exctsccb ) |
| 752 | |
| 753 | /* basic machine hardware */ |
| 754 | MDRV_CPU_ADD(Z80, XTAL_18_432MHz/6) |
| 755 | MDRV_CPU_PROGRAM_MAP(exctsccb_main_map,0) |
| 756 | MDRV_CPU_VBLANK_INT("main", irq0_line_assert) |
| 757 | |
| 758 | MDRV_CPU_ADD(Z80, XTAL_18_432MHz/6) |
| 759 | MDRV_CPU_PROGRAM_MAP(champbas_sub_map,0) |
| 760 | |
| 761 | /* video hardware */ |
| 762 | MDRV_SCREEN_ADD("main", RASTER) |
| 763 | MDRV_SCREEN_REFRESH_RATE(60) |
| 764 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 765 | MDRV_SCREEN_SIZE(32*8, 32*8) |
| 766 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 767 | |
| 768 | MDRV_GFXDECODE(exctsccr) |
| 769 | MDRV_PALETTE_LENGTH(0x200) |
| 770 | |
| 771 | MDRV_PALETTE_INIT(exctsccr) |
| 772 | MDRV_VIDEO_START(exctsccr) |
| 773 | MDRV_VIDEO_UPDATE(exctsccr) |
| 774 | MDRV_VIDEO_EOF(champbas) |
| 775 | |
| 776 | /* sound hardware */ |
| 777 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 778 | |
| 779 | MDRV_SOUND_ADD(AY8910, XTAL_18_432MHz/12) |
| 780 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 781 | |
| 782 | MDRV_SOUND_ADD(DAC, 0) |
| 783 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) |
| 784 | MACHINE_DRIVER_END |
| 785 | |
| 786 | |
| 787 | |
| 482 | 788 | ROM_START( talbot ) |
| 483 | 789 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 484 | 790 | ROM_LOAD( "11.10g", 0x0000, 0x1000, CRC(0368607d) SHA1(275a29fb018bd327e64cf4fcc04590099c90290a) ) |
| r2956 | r2957 | |
| 624 | 930 | ROM_LOAD( "pr5956", 0x0020, 0x100, CRC(872dd450) SHA1(6c1e2c4a2fc072f4bf4996c731adb0b01b347506) ) /* look-up table */ |
| 625 | 931 | ROM_END |
| 626 | 932 | |
| 933 | ROM_START( exctsccr ) |
| 934 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 935 | ROM_LOAD( "1_g10.bin", 0x0000, 0x2000, CRC(aa68df66) SHA1(f10cac5a4c5aad1e1eb8835174dc8d517bb2921a) ) |
| 936 | ROM_LOAD( "2_h10.bin", 0x2000, 0x2000, CRC(2d8f8326) SHA1(8809e7b081fa2a1966cb51ac969fd7b468d35be0) ) |
| 937 | ROM_LOAD( "3_j10.bin", 0x4000, 0x2000, CRC(dce4a04d) SHA1(9c015e4597ec8921bea213d9841fc69c776a4e6d) ) |
| 627 | 938 | |
| 939 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 940 | ROM_LOAD( "0_h6.bin", 0x0000, 0x2000, CRC(3babbd6b) SHA1(b81bd47c4449f4f21f2d55d01eb9cb6db10664c7) ) |
| 941 | ROM_LOAD( "9_f6.bin", 0x2000, 0x2000, CRC(639998f5) SHA1(c4ff5e5e75d53dea38449f323186d08d5b57bf90) ) |
| 942 | ROM_LOAD( "8_d6.bin", 0x4000, 0x2000, CRC(88651ee1) SHA1(2052e1b3f9784439369f464e31f4a2b0d1bb0565) ) |
| 943 | ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) |
| 944 | ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) |
| 628 | 945 | |
| 946 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars |
| 947 | ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */ |
| 948 | ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */ |
| 949 | |
| 950 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only sprites |
| 951 | ROM_LOAD( "5_b5.bin", 0x0000, 0x2000, CRC(35f4f8c9) SHA1(cdf5bbfea9abdd338938e5f4499d2d71ce3c6237) ) /* planes 0,1 */ |
| 952 | |
| 953 | ROM_REGION( 0x02000, REGION_GFX3, ROMREGION_DISPOSE ) // 4bpp sprites |
| 954 | ROM_LOAD( "2_k5.bin", 0x0000, 0x1000, CRC(7f9cace2) SHA1(bf05a31716f3ca1c2fd1034cd1f39e2d21cdaed3) ) |
| 955 | ROM_LOAD( "3_l5.bin", 0x1000, 0x1000, CRC(db2d9e0d) SHA1(6ec09a47f7aea6bf31eb0ee78f44012f4d92de8a) ) |
| 956 | |
| 957 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 958 | ROM_LOAD( "prom1.e1", 0x0000, 0x0020, CRC(d9b10bf0) SHA1(bc1263331968f4bf37eb70ec4f56a8cb763c29d2) ) /* palette */ |
| 959 | ROM_LOAD( "prom3.k5", 0x0020, 0x0100, CRC(b5db1c2c) SHA1(900aaaac6b674a9c5c7b7804a4b0c3d5cce761aa) ) /* lookup table */ |
| 960 | ROM_LOAD( "prom2.8r", 0x0120, 0x0100, CRC(8a9c0edf) SHA1(8aad387e9409cff0eeb42eeb57e9ea88770a8c9a) ) /* lookup table */ |
| 961 | ROM_END |
| 962 | |
| 963 | ROM_START( exctscca ) |
| 964 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 965 | ROM_LOAD( "1_g10.bin", 0x0000, 0x2000, CRC(aa68df66) SHA1(f10cac5a4c5aad1e1eb8835174dc8d517bb2921a) ) |
| 966 | ROM_LOAD( "2_h10.bin", 0x2000, 0x2000, CRC(2d8f8326) SHA1(8809e7b081fa2a1966cb51ac969fd7b468d35be0) ) |
| 967 | ROM_LOAD( "3_j10.bin", 0x4000, 0x2000, CRC(dce4a04d) SHA1(9c015e4597ec8921bea213d9841fc69c776a4e6d) ) |
| 968 | |
| 969 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 970 | ROM_LOAD( "exctsccc.000", 0x0000, 0x2000, CRC(642fc42f) SHA1(cfc849d18e347e3e23fc31c1ce7f2580d5d9b2b0) ) |
| 971 | ROM_LOAD( "exctsccc.009", 0x2000, 0x2000, CRC(d88b3236) SHA1(80f083fb15243e9e68978677caed8aee8e3109a0) ) |
| 972 | ROM_LOAD( "8_d6.bin", 0x4000, 0x2000, CRC(88651ee1) SHA1(2052e1b3f9784439369f464e31f4a2b0d1bb0565) ) |
| 973 | ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) |
| 974 | ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) |
| 975 | |
| 976 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars |
| 977 | ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */ |
| 978 | ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */ |
| 979 | |
| 980 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only sprites |
| 981 | ROM_LOAD( "5_b5.bin", 0x0000, 0x2000, CRC(35f4f8c9) SHA1(cdf5bbfea9abdd338938e5f4499d2d71ce3c6237) ) /* planes 0,1 */ |
| 982 | |
| 983 | ROM_REGION( 0x02000, REGION_GFX3, ROMREGION_DISPOSE ) // 4bpp sprites |
| 984 | ROM_LOAD( "2_k5.bin", 0x0000, 0x1000, CRC(7f9cace2) SHA1(bf05a31716f3ca1c2fd1034cd1f39e2d21cdaed3) ) |
| 985 | ROM_LOAD( "3_l5.bin", 0x1000, 0x1000, CRC(db2d9e0d) SHA1(6ec09a47f7aea6bf31eb0ee78f44012f4d92de8a) ) |
| 986 | |
| 987 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 988 | ROM_LOAD( "prom1.e1", 0x0000, 0x0020, CRC(d9b10bf0) SHA1(bc1263331968f4bf37eb70ec4f56a8cb763c29d2) ) /* palette */ |
| 989 | ROM_LOAD( "prom3.k5", 0x0020, 0x0100, CRC(b5db1c2c) SHA1(900aaaac6b674a9c5c7b7804a4b0c3d5cce761aa) ) /* lookup table */ |
| 990 | ROM_LOAD( "prom2.8r", 0x0120, 0x0100, CRC(8a9c0edf) SHA1(8aad387e9409cff0eeb42eeb57e9ea88770a8c9a) ) /* lookup table */ |
| 991 | ROM_END |
| 992 | |
| 993 | /* |
| 994 | The Kazutomi bootleg board is a conversion from Champion Baseball: |
| 995 | Alpha denshi co. LTD made in Japan |
| 996 | cpu board 58AS1 |
| 997 | Display board 58AS2 |
| 998 | Voice board 58AS3 |
| 999 | KAZUTOMI board |
| 1000 | 1x Alpha8201 (CPU board) |
| 1001 | 1x AY-3-8910 (CPU board) |
| 1002 | 1x Sharp Z80ACPU (CPU board) |
| 1003 | 1x Sharp Z80ACPU (VOICE board) |
| 1004 | 3x 2764 (CPU board) (1-2-3) |
| 1005 | 3x 2764 (VOICE board) (a-b-c) |
| 1006 | 2x 2764 (DISPLAY board) (4-5) |
| 1007 | 1x 2764 (daughter board kazutomi) (6) |
| 1008 | 2x 2732 (daughter board kazutomi) (7-8) |
| 1009 | */ |
| 1010 | ROM_START( exctsccb ) |
| 1011 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1012 | ROM_LOAD( "es-1.e2", 0x0000, 0x2000, CRC(997c6a82) SHA1(60fe27a12eedd22c775b7e65c5ba692cfcf5ac74) ) |
| 1013 | ROM_LOAD( "es-2.g2", 0x2000, 0x2000, CRC(5c66e792) SHA1(f7a7f32806965fa926261217cee3159ccd198d49) ) |
| 1014 | ROM_LOAD( "es-3.h2", 0x4000, 0x2000, CRC(e0d504c0) SHA1(d9a9f37b3a44a05a3f3389aa9617c419a2cee661) ) |
| 1015 | |
| 1016 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound */ |
| 1017 | ROM_LOAD( "es-a.k2", 0x0000, 0x2000, CRC(99e87b78) SHA1(f12006ff3f6f3c706e06288c97a1446141373432) ) |
| 1018 | ROM_LOAD( "es-b.l2", 0x2000, 0x2000, CRC(8b3db794) SHA1(dbfed2357c7631bfca6bbd63a23617bc3abf6ca3) ) |
| 1019 | ROM_LOAD( "es-c.m2", 0x4000, 0x2000, CRC(7bed2f81) SHA1(cbbb0480519cc04a99e8983228b18c9e49a9985d) ) |
| 1020 | |
| 1021 | /* the national flags are wrong. This happens on the real board */ |
| 1022 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars |
| 1023 | ROM_LOAD( "4_a5.bin", 0x0000, 0x2000, CRC(c342229b) SHA1(a989d6c12521c77882a7e17d4d80afe7eae05906) ) /* planes 0,1 */ |
| 1024 | ROM_LOAD( "6_c5.bin", 0x2000, 0x2000, CRC(eda40e32) SHA1(6c08fd4f4fb35fd354d02e04548e960c545f6a88) ) /* plane 3 */ |
| 1025 | |
| 1026 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only sprites |
| 1027 | ROM_LOAD( "5_b5.bin", 0x0000, 0x2000, CRC(35f4f8c9) SHA1(cdf5bbfea9abdd338938e5f4499d2d71ce3c6237) ) /* planes 0,1 */ |
| 1028 | |
| 1029 | ROM_REGION( 0x02000, REGION_GFX3, ROMREGION_DISPOSE ) // 4bpp sprites |
| 1030 | ROM_LOAD( "2_k5.bin", 0x0000, 0x1000, CRC(7f9cace2) SHA1(bf05a31716f3ca1c2fd1034cd1f39e2d21cdaed3) ) |
| 1031 | ROM_LOAD( "3_l5.bin", 0x1000, 0x1000, CRC(db2d9e0d) SHA1(6ec09a47f7aea6bf31eb0ee78f44012f4d92de8a) ) |
| 1032 | |
| 1033 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1034 | ROM_LOAD( "prom1.e1", 0x0000, 0x0020, CRC(d9b10bf0) SHA1(bc1263331968f4bf37eb70ec4f56a8cb763c29d2) ) /* palette */ |
| 1035 | ROM_LOAD( "prom3.k5", 0x0020, 0x0100, CRC(b5db1c2c) SHA1(900aaaac6b674a9c5c7b7804a4b0c3d5cce761aa) ) /* lookup table */ |
| 1036 | ROM_LOAD( "prom2.8r", 0x0120, 0x0100, CRC(8a9c0edf) SHA1(8aad387e9409cff0eeb42eeb57e9ea88770a8c9a) ) /* lookup table */ |
| 1037 | ROM_END |
| 1038 | |
| 1039 | ROM_START( exctscc2 ) |
| 1040 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1041 | ROM_LOAD( "vr.3j", 0x0000, 0x2000, CRC(c6115362) SHA1(6a258631abd72ef6b8d7968bb4b2bc88e89e597d) ) |
| 1042 | ROM_LOAD( "vr.3k", 0x2000, 0x2000, CRC(de36ba00) SHA1(0a0d92e710b8c749f145571bc8a204609456d19d) ) |
| 1043 | ROM_LOAD( "vr.3l", 0x4000, 0x2000, CRC(1ddfdf65) SHA1(313d0a7f13fc2de15aa32492c38a59fbafad9f01) ) |
| 1044 | |
| 1045 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 1046 | ROM_LOAD( "vr.7d", 0x0000, 0x2000, CRC(2c675a43) SHA1(aa0a8dbcae955e3da92c435202f2a1ed238c377e) ) |
| 1047 | ROM_LOAD( "vr.7e", 0x2000, 0x2000, CRC(e571873d) SHA1(2dfff24f5dac86e92612f40cf3642005c7f36ad3) ) |
| 1048 | ROM_LOAD( "8_d6.bin", 0x4000, 0x2000, CRC(88651ee1) SHA1(2052e1b3f9784439369f464e31f4a2b0d1bb0565) ) /* vr.7f */ |
| 1049 | ROM_LOAD( "7_c6.bin", 0x6000, 0x2000, CRC(6d51521e) SHA1(2809bd2e61f40dcd31d43c62520982bdcfb0a865) ) /* vr.7h */ |
| 1050 | ROM_LOAD( "1_a6.bin", 0x8000, 0x1000, CRC(20f2207e) SHA1(b1ed2237d0bd50ddbe593fd2fbff9f1d67c1eb11) ) /* vr.7k */ |
| 1051 | |
| 1052 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only chars |
| 1053 | ROM_LOAD( "vr.5a", 0x0000, 0x2000, CRC(4ff1783d) SHA1(c45074864c3a4bcbf3a87d164027ae16dca53d9c) ) /* planes 0,1 */ |
| 1054 | ROM_LOAD( "vr.5c", 0x2000, 0x2000, CRC(1fb84ee6) SHA1(56ceb86c509be783f806403ac21e7c9684760d5f) ) /* plane 3 */ |
| 1055 | |
| 1056 | ROM_REGION( 0x04000, REGION_GFX2, ROMREGION_DISPOSE ) // 3bpp chars + sprites: rearranged by DRIVER_INIT to leave only sprites |
| 1057 | ROM_LOAD( "vr.5b", 0x0000, 0x2000, CRC(5605b60b) SHA1(19d5909896ae4a3d7552225c369d30475c56793b) ) /* planes 0,1 */ |
| 1058 | |
| 1059 | ROM_REGION( 0x02000, REGION_GFX3, ROMREGION_DISPOSE ) // 4bpp sprites |
| 1060 | ROM_LOAD( "vr.5k", 0x0000, 0x1000, CRC(1d37edfa) SHA1(184fa6dd7b1b3fff4c5fc19b42301ccb7979ac84) ) |
| 1061 | ROM_LOAD( "vr.5l", 0x1000, 0x1000, CRC(b97f396c) SHA1(4ffe512acf047230bd593911a615fc0ef66b481d) ) |
| 1062 | |
| 1063 | ROM_REGION( 0x0220, REGION_PROMS, 0 ) |
| 1064 | ROM_LOAD( "prom1.e1", 0x0000, 0x0020, CRC(d9b10bf0) SHA1(bc1263331968f4bf37eb70ec4f56a8cb763c29d2) ) /* palette */ |
| 1065 | ROM_LOAD( "prom3.k5", 0x0020, 0x0100, CRC(b5db1c2c) SHA1(900aaaac6b674a9c5c7b7804a4b0c3d5cce761aa) ) /* lookup table */ |
| 1066 | ROM_LOAD( "prom2.8r", 0x0120, 0x0100, CRC(8a9c0edf) SHA1(8aad387e9409cff0eeb42eeb57e9ea88770a8c9a) ) /* lookup table */ |
| 1067 | ROM_END |
| 1068 | |
| 1069 | |
| 1070 | |
| 629 | 1071 | static DRIVER_INIT(champbas) |
| 630 | 1072 | { |
| 631 | 1073 | // chars and sprites are mixed in the same ROMs, so rearrange them for easier decoding |
| r2956 | r2957 | |
| 643 | 1085 | } |
| 644 | 1086 | |
| 645 | 1087 | |
| 1088 | static DRIVER_INIT( exctsccr ) |
| 1089 | { |
| 1090 | // chars and sprites are mixed in the same ROMs, so rearrange them for easier decoding |
| 1091 | UINT8 *rom1 = memory_region(machine, REGION_GFX1); |
| 1092 | UINT8 *rom2 = memory_region(machine, REGION_GFX2); |
| 1093 | int i; |
| 646 | 1094 | |
| 1095 | // planes 0,1 |
| 1096 | for (i = 0; i < 0x1000; ++i) |
| 1097 | { |
| 1098 | UINT8 t = rom1[i + 0x1000]; |
| 1099 | rom1[i + 0x1000] = rom2[i]; |
| 1100 | rom2[i] = t; |
| 1101 | } |
| 1102 | |
| 1103 | // plane 3 |
| 1104 | for (i = 0; i < 0x1000; ++i) |
| 1105 | { |
| 1106 | rom2[i + 0x3000] = rom1[i + 0x3000] >> 4; |
| 1107 | rom2[i + 0x2000] = rom1[i + 0x3000] & 0x0f; |
| 1108 | } |
| 1109 | for (i = 0; i < 0x1000; ++i) |
| 1110 | { |
| 1111 | rom1[i + 0x3000] = rom1[i + 0x2000] >> 4; |
| 1112 | rom1[i + 0x2000] &= 0x0f; |
| 1113 | } |
| 1114 | } |
| 1115 | |
| 1116 | |
| 1117 | |
| 647 | 1118 | GAME( 1982, talbot, 0, talbot, talbot, 0, ROT270, "Alpha Denshi Co. (Volt Electronics license)", "Talbot", 0 ) |
| 648 | 1119 | |
| 649 | 1120 | GAME( 1983, champbas, 0, champbas, champbas, champbas, ROT0, "[Alpha Denshi Co.] (Sega license)", "Champion Base Ball", 0 ) |
| r2956 | r2957 | |
| 651 | 1122 | GAME( 1983, champbja, champbas, champbas, champbas, champbas, ROT0, "Alpha Denshi Co.", "Champion Base Ball (Japan set 2)", 0 ) |
| 652 | 1123 | GAME( 1983, champbb2, 0, champmcu, champbas, champbas, ROT0, "[Alpha Denshi Co.] (Sega license)", "Champion Base Ball Part-2: Pair Play (set 1)", 0 ) |
| 653 | 1124 | GAME( 1983, champb2a, champbb2, champmcu, champbas, champbas, ROT0, "Alpha Denshi Co.", "Champion Baseball II (set 2)", GAME_NOT_WORKING) // no dump |
| 1125 | |
| 1126 | GAME( 1983, exctsccr, 0, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer", 0 ) |
| 1127 | GAME( 1983, exctscca, exctsccr, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer (alternate music)", 0 ) |
| 1128 | GAME( 1983, exctsccb, exctsccr, exctsccb, exctsccr, exctsccr, ROT270, "bootleg", "Exciting Soccer (bootleg)", 0 ) |
| 1129 | GAME( 1984, exctscc2, 0, exctsccr, exctsccr, exctsccr, ROT270, "Alpha Denshi Co.", "Exciting Soccer II", GAME_IMPERFECT_GRAPHICS ) |
src/emu/cpu/sh2/sh2drc.c
| r0 | r2957 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | sh2drc.c |
| 4 | Universal machine language-based SH-2 emulator. |
| 5 | By R. Belmont |
| 6 | |
| 7 | Released for general non-commercial use under the MAME license |
| 8 | Visit http://mamedev.org for licensing and usage restrictions. |
| 9 | |
| 10 | ST-V status: |
| 11 | colmns97 & stress crash due to SCSP stream->machine getting corrupted. |
| 12 | |
| 13 | cottonbm w/US bios: run to 60323B4 on master, then MOV insn @ 602f5aa crashes? |
| 14 | actually crash on slave @ 6032b38 after above. reading wrong addr for jump vector. |
| 15 | |
| 16 | ***************************************************************************/ |
| 17 | |
| 18 | #include "debugger.h" |
| 19 | #include "deprecat.h" |
| 20 | #include "sh2.h" |
| 21 | #include "sh2comn.h" |
| 22 | |
| 23 | #ifdef USE_SH2DRC |
| 24 | |
| 25 | /*************************************************************************** |
| 26 | DEBUGGING |
| 27 | ***************************************************************************/ |
| 28 | |
| 29 | #define FORCE_C_BACKEND (0) // use the C backend even when a native one is available |
| 30 | #define LOG_UML (1) // log UML assembly |
| 31 | #define LOG_NATIVE (0) // log native assembly |
| 32 | |
| 33 | #define SET_EA (0) // makes slower but "shows work" in the EA fake register like the interpreter |
| 34 | |
| 35 | #define DISABLE_FAST_REGISTERS (0) // set to 1 to turn off usage of register caching |
| 36 | #define SINGLE_INSTRUCTION_MODE (0) |
| 37 | |
| 38 | #define VERBOSE 0 |
| 39 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 40 | |
| 41 | #if SET_EA |
| 42 | #define SETEA(x) UML_MOV(block, MEM(&sh2->ea), IREG(x)) |
| 43 | #else |
| 44 | #define SETEA(x) |
| 45 | #endif |
| 46 | |
| 47 | /*************************************************************************** |
| 48 | CONSTANTS |
| 49 | ***************************************************************************/ |
| 50 | |
| 51 | /* map variables */ |
| 52 | #define MAPVAR_PC MVAR(0) |
| 53 | #define MAPVAR_CYCLES MVAR(1) |
| 54 | |
| 55 | /* size of the execution code cache */ |
| 56 | #define CACHE_SIZE (32 * 1024 * 1024) |
| 57 | |
| 58 | /* compilation boundaries -- how far back/forward does the analysis extend? */ |
| 59 | #define COMPILE_BACKWARDS_BYTES 64 |
| 60 | #define COMPILE_FORWARDS_BYTES 256 |
| 61 | #define COMPILE_MAX_INSTRUCTIONS ((COMPILE_BACKWARDS_BYTES/2) + (COMPILE_FORWARDS_BYTES/2)) |
| 62 | #define COMPILE_MAX_SEQUENCE 64 |
| 63 | |
| 64 | /* exit codes */ |
| 65 | #define EXECUTE_OUT_OF_CYCLES 0 |
| 66 | #define EXECUTE_MISSING_CODE 1 |
| 67 | #define EXECUTE_UNMAPPED_CODE 2 |
| 68 | #define EXECUTE_RESET_CACHE 3 |
| 69 | |
| 70 | #define PROBE_ADDRESS ~0 |
| 71 | |
| 72 | extern int sh2_describe(void *param, opcode_desc *desc, const opcode_desc *prev); |
| 73 | |
| 74 | /*************************************************************************** |
| 75 | MACROS |
| 76 | ***************************************************************************/ |
| 77 | |
| 78 | #define R32(reg) sh2->regmap[reg].type, sh2->regmap[reg].value |
| 79 | |
| 80 | /*************************************************************************** |
| 81 | STRUCTURES & TYPEDEFS |
| 82 | ***************************************************************************/ |
| 83 | |
| 84 | /* internal compiler state */ |
| 85 | typedef struct _compiler_state compiler_state; |
| 86 | struct _compiler_state |
| 87 | { |
| 88 | UINT32 cycles; /* accumulated cycles */ |
| 89 | UINT8 checkints; /* need to check interrupts before next instruction */ |
| 90 | drcuml_codelabel labelnum; /* index for local labels */ |
| 91 | }; |
| 92 | |
| 93 | /*************************************************************************** |
| 94 | FUNCTION PROTOTYPES |
| 95 | ***************************************************************************/ |
| 96 | |
| 97 | static void static_generate_entry_point(drcuml_state *drcuml); |
| 98 | static void static_generate_nocode_handler(drcuml_state *drcuml); |
| 99 | static void static_generate_out_of_cycles(drcuml_state *drcuml); |
| 100 | static void static_generate_memory_accessor(drcuml_state *drcuml, int size, int iswrite, const char *name, drcuml_codehandle **handleptr); |
| 101 | |
| 102 | static void generate_update_cycles(drcuml_block *block, compiler_state *compiler, drcuml_ptype ptype, UINT64 pvalue, int allow_exception); |
| 103 | static void generate_checksum_block(drcuml_block *block, compiler_state *compiler, const opcode_desc *seqhead, const opcode_desc *seqlast); |
| 104 | static void generate_sequence_instruction(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc); |
| 105 | static void generate_delay_slot(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc); |
| 106 | |
| 107 | static int generate_opcode(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc); |
| 108 | static int generate_group_0(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot); |
| 109 | static int generate_group_2(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot); |
| 110 | static int generate_group_3(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode); |
| 111 | static int generate_group_4(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot); |
| 112 | static int generate_group_6(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot); |
| 113 | static int generate_group_8(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot); |
| 114 | static int generate_group_12(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot); |
| 115 | |
| 116 | static void code_compile_block(drcuml_state *drcuml, UINT8 mode, offs_t pc); |
| 117 | |
| 118 | static void log_opcode_desc(drcuml_state *drcuml, const opcode_desc *desclist, int indent); |
| 119 | static void log_register_list(drcuml_state *drcuml, const char *string, const UINT32 *reglist, const UINT32 *regnostarlist); |
| 120 | static void log_add_disasm_comment(drcuml_block *block, UINT32 pc, UINT32 op); |
| 121 | static const char *log_desc_flags_to_string(UINT32 flags); |
| 122 | |
| 123 | static void cfunc_printf_probe(void *param); |
| 124 | static void cfunc_unimplemented(void *param); |
| 125 | static void cfunc_checkirqs(void *param); |
| 126 | static void cfunc_MAC_W(void *param); |
| 127 | static void cfunc_MAC_L(void *param); |
| 128 | static void cfunc_DIV1(void *param); |
| 129 | |
| 130 | /*************************************************************************** |
| 131 | PRIVATE GLOBAL VARIABLES |
| 132 | ***************************************************************************/ |
| 133 | |
| 134 | SH2 *sh2; |
| 135 | |
| 136 | /*************************************************************************** |
| 137 | INLINE FUNCTIONS |
| 138 | ***************************************************************************/ |
| 139 | |
| 140 | /*------------------------------------------------- |
| 141 | epc - compute the exception PC from a |
| 142 | descriptor |
| 143 | -------------------------------------------------*/ |
| 144 | |
| 145 | INLINE UINT32 epc(const opcode_desc *desc) |
| 146 | { |
| 147 | return (desc->flags & OPFLAG_IN_DELAY_SLOT) ? (desc->pc - 1) : desc->pc; |
| 148 | } |
| 149 | |
| 150 | /*------------------------------------------------- |
| 151 | alloc_handle - allocate a handle if not |
| 152 | already allocated |
| 153 | -------------------------------------------------*/ |
| 154 | |
| 155 | INLINE void alloc_handle(drcuml_state *drcuml, drcuml_codehandle **handleptr, const char *name) |
| 156 | { |
| 157 | if (*handleptr == NULL) |
| 158 | *handleptr = drcuml_handle_alloc(drcuml, name); |
| 159 | } |
| 160 | |
| 161 | /*------------------------------------------------- |
| 162 | load_fast_iregs - load any fast integer |
| 163 | registers |
| 164 | -------------------------------------------------*/ |
| 165 | |
| 166 | INLINE void load_fast_iregs(drcuml_block *block) |
| 167 | { |
| 168 | int regnum; |
| 169 | |
| 170 | for (regnum = 0; regnum < ARRAY_LENGTH(sh2->regmap); regnum++) |
| 171 | { |
| 172 | if (sh2->regmap[regnum].type == DRCUML_PTYPE_INT_REGISTER) |
| 173 | { |
| 174 | UML_MOV(block, IREG(sh2->regmap[regnum].value - DRCUML_REG_I0), MEM(&sh2->r[regnum])); |
| 175 | } |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | |
| 180 | /*------------------------------------------------- |
| 181 | save_fast_iregs - save any fast integer |
| 182 | registers |
| 183 | -------------------------------------------------*/ |
| 184 | |
| 185 | INLINE void save_fast_iregs(drcuml_block *block) |
| 186 | { |
| 187 | int regnum; |
| 188 | |
| 189 | for (regnum = 0; regnum < ARRAY_LENGTH(sh2->regmap); regnum++) |
| 190 | { |
| 191 | if (sh2->regmap[regnum].type == DRCUML_PTYPE_INT_REGISTER) |
| 192 | { |
| 193 | UML_MOV(block, MEM(&sh2->r[regnum]), IREG(sh2->regmap[regnum].value - DRCUML_REG_I0)); |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | /*------------------------------------------------- |
| 199 | cfunc_printf_probe - print the current CPU |
| 200 | state and return |
| 201 | -------------------------------------------------*/ |
| 202 | |
| 203 | static void cfunc_printf_probe(void *param) |
| 204 | { |
| 205 | UINT32 pc = (UINT32)(FPTR)param; |
| 206 | |
| 207 | printf(" PC=%08X r0=%08X r1=%08X r2=%08X\n", |
| 208 | pc, |
| 209 | (UINT32)sh2->r[0], |
| 210 | (UINT32)sh2->r[1], |
| 211 | (UINT32)sh2->r[2]); |
| 212 | printf(" r3=%08X r4=%08X r5=%08X r6=%08X\n", |
| 213 | (UINT32)sh2->r[3], |
| 214 | (UINT32)sh2->r[4], |
| 215 | (UINT32)sh2->r[5], |
| 216 | (UINT32)sh2->r[6]); |
| 217 | printf(" r7=%08X r8=%08X r9=%08X r10=%08X\n", |
| 218 | (UINT32)sh2->r[7], |
| 219 | (UINT32)sh2->r[8], |
| 220 | (UINT32)sh2->r[9], |
| 221 | (UINT32)sh2->r[10]); |
| 222 | printf(" r11=%08X r12=%08X r13=%08X r14=%08X\n", |
| 223 | (UINT32)sh2->r[11], |
| 224 | (UINT32)sh2->r[12], |
| 225 | (UINT32)sh2->r[13], |
| 226 | (UINT32)sh2->r[14]); |
| 227 | printf(" r15=%08X macl=%08X mach=%08X gbr=%08X\n", |
| 228 | (UINT32)sh2->r[15], |
| 229 | (UINT32)sh2->macl, |
| 230 | (UINT32)sh2->mach, |
| 231 | (UINT32)sh2->gbr); |
| 232 | printf(" evec %x irqsr %x pc=%08x\n", |
| 233 | (UINT32)sh2->evec, |
| 234 | (UINT32)sh2->irqsr, (UINT32)sh2->pc); |
| 235 | } |
| 236 | |
| 237 | /*------------------------------------------------- |
| 238 | cfunc_unimplemented - handler for |
| 239 | unimplemented opcdes |
| 240 | -------------------------------------------------*/ |
| 241 | |
| 242 | static void cfunc_unimplemented(void *param) |
| 243 | { |
| 244 | UINT16 opcode = (FPTR)param; |
| 245 | fatalerror("PC=%08X: Unimplemented op %04X", sh2->pc, opcode); |
| 246 | } |
| 247 | |
| 248 | /*------------------------------------------------- |
| 249 | cfunc_checkirqs - checks for pending IRQs |
| 250 | -------------------------------------------------*/ |
| 251 | static void cfunc_checkirqs(void *param) |
| 252 | { |
| 253 | // if NMI is pending, evec etc are already set up |
| 254 | if (sh2->pending_nmi) |
| 255 | { |
| 256 | sh2->pending_nmi = 0; |
| 257 | } |
| 258 | else |
| 259 | { |
| 260 | sh2->evec = 0xffffffff; |
| 261 | CHECK_PENDING_IRQ("cfunc_checkirqs"); |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | INLINE UINT16 RW(offs_t A) |
| 266 | { |
| 267 | if (A >= 0xe0000000) |
| 268 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, 0xffff << (((~A) & 2)*8)) >> (((~A) & 2)*8); |
| 269 | |
| 270 | if (A >= 0xc0000000) |
| 271 | return program_read_word_32be(A); |
| 272 | |
| 273 | return program_read_word_32be(A & AM); |
| 274 | } |
| 275 | |
| 276 | /*------------------------------------------------- |
| 277 | cfunc_MAC_W - implementation of MAC_W Rm,Rn |
| 278 | -------------------------------------------------*/ |
| 279 | static void cfunc_MAC_W(void *param) |
| 280 | { |
| 281 | INT32 tempm, tempn, dest, src, ans; |
| 282 | UINT32 templ; |
| 283 | UINT16 *opptr, opcode; |
| 284 | int n, m; |
| 285 | |
| 286 | // recover the opcode |
| 287 | opptr = (UINT16 *)param; |
| 288 | opcode = *opptr; |
| 289 | |
| 290 | // extract the operands |
| 291 | n = Rn; |
| 292 | m = Rm; |
| 293 | |
| 294 | tempn = (INT32) RW( sh2->r[n] ); |
| 295 | sh2->r[n] += 2; |
| 296 | tempm = (INT32) RW( sh2->r[m] ); |
| 297 | sh2->r[m] += 2; |
| 298 | templ = sh2->macl; |
| 299 | tempm = ((INT32) (short) tempn * (INT32) (short) tempm); |
| 300 | if ((INT32) sh2->macl >= 0) |
| 301 | dest = 0; |
| 302 | else |
| 303 | dest = 1; |
| 304 | if ((INT32) tempm >= 0) |
| 305 | { |
| 306 | src = 0; |
| 307 | tempn = 0; |
| 308 | } |
| 309 | else |
| 310 | { |
| 311 | src = 1; |
| 312 | tempn = 0xffffffff; |
| 313 | } |
| 314 | src += dest; |
| 315 | sh2->macl += tempm; |
| 316 | if ((INT32) sh2->macl >= 0) |
| 317 | ans = 0; |
| 318 | else |
| 319 | ans = 1; |
| 320 | ans += dest; |
| 321 | if (sh2->sr & S) |
| 322 | { |
| 323 | if (ans == 1) |
| 324 | { |
| 325 | if (src == 0) |
| 326 | sh2->macl = 0x7fffffff; |
| 327 | if (src == 2) |
| 328 | sh2->macl = 0x80000000; |
| 329 | } |
| 330 | } |
| 331 | else |
| 332 | { |
| 333 | sh2->mach += tempn; |
| 334 | if (templ > sh2->macl) |
| 335 | sh2->mach += 1; |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | INLINE UINT32 RL(offs_t A) |
| 340 | { |
| 341 | if (A >= 0xe0000000) |
| 342 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, 0xffffffff); |
| 343 | |
| 344 | if (A >= 0xc0000000) |
| 345 | return program_read_dword_32be(A); |
| 346 | |
| 347 | return program_read_dword_32be(A & AM); |
| 348 | } |
| 349 | |
| 350 | /*------------------------------------------------- |
| 351 | cfunc_MAC_L - implementation of MAC_L Rm,Rn |
| 352 | -------------------------------------------------*/ |
| 353 | static void cfunc_MAC_L(void *param) |
| 354 | { |
| 355 | UINT32 RnL, RnH, RmL, RmH, Res0, Res1, Res2; |
| 356 | UINT32 temp0, temp1, temp2, temp3; |
| 357 | INT32 tempm, tempn, fnLmL; |
| 358 | UINT16 *opptr, opcode; |
| 359 | int n, m; |
| 360 | |
| 361 | // recover the opcode |
| 362 | opptr = (UINT16 *)param; |
| 363 | opcode = *opptr; |
| 364 | |
| 365 | // extract the operands |
| 366 | n = Rn; |
| 367 | m = Rm; |
| 368 | |
| 369 | tempn = (INT32) RL( sh2->r[n] ); |
| 370 | sh2->r[n] += 4; |
| 371 | tempm = (INT32) RL( sh2->r[m] ); |
| 372 | sh2->r[m] += 4; |
| 373 | if ((INT32) (tempn ^ tempm) < 0) |
| 374 | fnLmL = -1; |
| 375 | else |
| 376 | fnLmL = 0; |
| 377 | if (tempn < 0) |
| 378 | tempn = 0 - tempn; |
| 379 | if (tempm < 0) |
| 380 | tempm = 0 - tempm; |
| 381 | temp1 = (UINT32) tempn; |
| 382 | temp2 = (UINT32) tempm; |
| 383 | RnL = temp1 & 0x0000ffff; |
| 384 | RnH = (temp1 >> 16) & 0x0000ffff; |
| 385 | RmL = temp2 & 0x0000ffff; |
| 386 | RmH = (temp2 >> 16) & 0x0000ffff; |
| 387 | temp0 = RmL * RnL; |
| 388 | temp1 = RmH * RnL; |
| 389 | temp2 = RmL * RnH; |
| 390 | temp3 = RmH * RnH; |
| 391 | Res2 = 0; |
| 392 | Res1 = temp1 + temp2; |
| 393 | if (Res1 < temp1) |
| 394 | Res2 += 0x00010000; |
| 395 | temp1 = (Res1 << 16) & 0xffff0000; |
| 396 | Res0 = temp0 + temp1; |
| 397 | if (Res0 < temp0) |
| 398 | Res2++; |
| 399 | Res2 = Res2 + ((Res1 >> 16) & 0x0000ffff) + temp3; |
| 400 | if (fnLmL < 0) |
| 401 | { |
| 402 | Res2 = ~Res2; |
| 403 | if (Res0 == 0) |
| 404 | Res2++; |
| 405 | else |
| 406 | Res0 = (~Res0) + 1; |
| 407 | } |
| 408 | if (sh2->sr & S) |
| 409 | { |
| 410 | Res0 = sh2->macl + Res0; |
| 411 | if (sh2->macl > Res0) |
| 412 | Res2++; |
| 413 | Res2 += (sh2->mach & 0x0000ffff); |
| 414 | if (((INT32) Res2 < 0) && (Res2 < 0xffff8000)) |
| 415 | { |
| 416 | Res2 = 0x00008000; |
| 417 | Res0 = 0x00000000; |
| 418 | } |
| 419 | else if (((INT32) Res2 > 0) && (Res2 > 0x00007fff)) |
| 420 | { |
| 421 | Res2 = 0x00007fff; |
| 422 | Res0 = 0xffffffff; |
| 423 | } |
| 424 | sh2->mach = Res2; |
| 425 | sh2->macl = Res0; |
| 426 | } |
| 427 | else |
| 428 | { |
| 429 | Res0 = sh2->macl + Res0; |
| 430 | if (sh2->macl > Res0) |
| 431 | Res2++; |
| 432 | Res2 += sh2->mach; |
| 433 | sh2->mach = Res2; |
| 434 | sh2->macl = Res0; |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | /*------------------------------------------------- |
| 439 | cfunc_DIV1 - implementation of DIV1 Rm,Rn |
| 440 | -------------------------------------------------*/ |
| 441 | static void cfunc_DIV1(void *param) |
| 442 | { |
| 443 | UINT32 tmp0; |
| 444 | UINT32 old_q; |
| 445 | UINT16 *opptr, opcode; |
| 446 | int n, m; |
| 447 | |
| 448 | // recover the opcode |
| 449 | opptr = (UINT16 *)param; |
| 450 | opcode = *opptr; |
| 451 | |
| 452 | // extract the operands |
| 453 | n = Rn; |
| 454 | m = Rm; |
| 455 | |
| 456 | old_q = sh2->sr & Q; |
| 457 | if (0x80000000 & sh2->r[n]) |
| 458 | sh2->sr |= Q; |
| 459 | else |
| 460 | sh2->sr &= ~Q; |
| 461 | |
| 462 | sh2->r[n] = (sh2->r[n] << 1) | (sh2->sr & T); |
| 463 | |
| 464 | if (!old_q) |
| 465 | { |
| 466 | if (!(sh2->sr & M)) |
| 467 | { |
| 468 | tmp0 = sh2->r[n]; |
| 469 | sh2->r[n] -= sh2->r[m]; |
| 470 | if(!(sh2->sr & Q)) |
| 471 | if(sh2->r[n] > tmp0) |
| 472 | sh2->sr |= Q; |
| 473 | else |
| 474 | sh2->sr &= ~Q; |
| 475 | else |
| 476 | if(sh2->r[n] > tmp0) |
| 477 | sh2->sr &= ~Q; |
| 478 | else |
| 479 | sh2->sr |= Q; |
| 480 | } |
| 481 | else |
| 482 | { |
| 483 | tmp0 = sh2->r[n]; |
| 484 | sh2->r[n] += sh2->r[m]; |
| 485 | if(!(sh2->sr & Q)) |
| 486 | { |
| 487 | if(sh2->r[n] < tmp0) |
| 488 | sh2->sr &= ~Q; |
| 489 | else |
| 490 | sh2->sr |= Q; |
| 491 | } |
| 492 | else |
| 493 | { |
| 494 | if(sh2->r[n] < tmp0) |
| 495 | sh2->sr |= Q; |
| 496 | else |
| 497 | sh2->sr &= ~Q; |
| 498 | } |
| 499 | } |
| 500 | } |
| 501 | else |
| 502 | { |
| 503 | if (!(sh2->sr & M)) |
| 504 | { |
| 505 | tmp0 = sh2->r[n]; |
| 506 | sh2->r[n] += sh2->r[m]; |
| 507 | if(!(sh2->sr & Q)) |
| 508 | if(sh2->r[n] < tmp0) |
| 509 | sh2->sr |= Q; |
| 510 | else |
| 511 | sh2->sr &= ~Q; |
| 512 | else |
| 513 | if(sh2->r[n] < tmp0) |
| 514 | sh2->sr &= ~Q; |
| 515 | else |
| 516 | sh2->sr |= Q; |
| 517 | } |
| 518 | else |
| 519 | { |
| 520 | tmp0 = sh2->r[n]; |
| 521 | sh2->r[n] -= sh2->r[m]; |
| 522 | if(!(sh2->sr & Q)) |
| 523 | if(sh2->r[n] > tmp0) |
| 524 | sh2->sr &= ~Q; |
| 525 | else |
| 526 | sh2->sr |= Q; |
| 527 | else |
| 528 | if(sh2->r[n] > tmp0) |
| 529 | sh2->sr |= Q; |
| 530 | else |
| 531 | sh2->sr &= ~Q; |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | tmp0 = (sh2->sr & (Q | M)); |
| 536 | if((!tmp0) || (tmp0 == 0x300)) /* if Q == M set T else clear T */ |
| 537 | sh2->sr |= T; |
| 538 | else |
| 539 | sh2->sr &= ~T; |
| 540 | } |
| 541 | |
| 542 | /*------------------------------------------------- |
| 543 | sh2_init - initialize the processor |
| 544 | -------------------------------------------------*/ |
| 545 | |
| 546 | static void sh2_init(int index, int clock, const void *config, int (*irqcallback)(int)) |
| 547 | { |
| 548 | drcfe_config feconfig = |
| 549 | { |
| 550 | COMPILE_BACKWARDS_BYTES, /* code window start offset = startpc - window_start */ |
| 551 | COMPILE_FORWARDS_BYTES, /* code window end offset = startpc + window_end */ |
| 552 | COMPILE_MAX_SEQUENCE, /* maximum instructions to include in a sequence */ |
| 553 | sh2_describe /* callback to describe a single instruction */ |
| 554 | }; |
| 555 | drccache *cache; |
| 556 | drcbe_info beinfo; |
| 557 | UINT32 flags = 0; |
| 558 | int regnum; |
| 559 | |
| 560 | /* allocate enough space for the cache and the core */ |
| 561 | cache = drccache_alloc(CACHE_SIZE + sizeof(SH2)); |
| 562 | if (cache == NULL) |
| 563 | fatalerror("Unable to allocate cache of size %d", (UINT32)(CACHE_SIZE + sizeof(SH2))); |
| 564 | |
| 565 | /* allocate the core memory */ |
| 566 | sh2 = drccache_memory_alloc_near(cache, sizeof(SH2)); |
| 567 | memset(sh2, 0, sizeof(SH2)); |
| 568 | |
| 569 | /* initialize the common core parts */ |
| 570 | sh2_common_init(0, index, clock, config, irqcallback); |
| 571 | |
| 572 | /* allocate the implementation-specific state from the full cache */ |
| 573 | sh2->cache = cache; |
| 574 | |
| 575 | /* reset per-driver pcflushes */ |
| 576 | sh2->pcfsel = sh2->maxpcfsel = -1; |
| 577 | |
| 578 | /* initialize the UML generator */ |
| 579 | if (FORCE_C_BACKEND) |
| 580 | flags |= DRCUML_OPTION_USE_C; |
| 581 | if (LOG_UML) |
| 582 | flags |= DRCUML_OPTION_LOG_UML; |
| 583 | if (LOG_NATIVE) |
| 584 | flags |= DRCUML_OPTION_LOG_NATIVE; |
| 585 | sh2->drcuml = drcuml_alloc(cache, flags, 1, 32, 1); |
| 586 | if (sh2->drcuml == NULL) |
| 587 | fatalerror("Error initializing the UML"); |
| 588 | |
| 589 | /* add symbols for our stuff */ |
| 590 | drcuml_symbol_add(sh2->drcuml, &sh2->pc, sizeof(sh2->pc), "pc"); |
| 591 | drcuml_symbol_add(sh2->drcuml, &sh2->icount, sizeof(sh2->icount), "icount"); |
| 592 | for (regnum = 0; regnum < 16; regnum++) |
| 593 | { |
| 594 | char buf[10]; |
| 595 | sprintf(buf, "r%d", regnum); |
| 596 | drcuml_symbol_add(sh2->drcuml, &sh2->r[regnum], sizeof(sh2->r[regnum]), buf); |
| 597 | } |
| 598 | drcuml_symbol_add(sh2->drcuml, &sh2->pr, sizeof(sh2->pr), "pr"); |
| 599 | drcuml_symbol_add(sh2->drcuml, &sh2->sr, sizeof(sh2->sr), "sr"); |
| 600 | drcuml_symbol_add(sh2->drcuml, &sh2->gbr, sizeof(sh2->gbr), "gbr"); |
| 601 | drcuml_symbol_add(sh2->drcuml, &sh2->vbr, sizeof(sh2->vbr), "vbr"); |
| 602 | drcuml_symbol_add(sh2->drcuml, &sh2->macl, sizeof(sh2->macl), "macl"); |
| 603 | drcuml_symbol_add(sh2->drcuml, &sh2->mach, sizeof(sh2->macl), "mach"); |
| 604 | |
| 605 | /* initialize the front-end helper */ |
| 606 | if (SINGLE_INSTRUCTION_MODE) |
| 607 | feconfig.max_sequence = 1; |
| 608 | sh2->drcfe = drcfe_init(&feconfig, sh2); |
| 609 | |
| 610 | /* compute the register parameters */ |
| 611 | for (regnum = 0; regnum < 16; regnum++) |
| 612 | { |
| 613 | sh2->regmap[regnum].type = DRCUML_PTYPE_MEMORY; |
| 614 | sh2->regmap[regnum].value = (FPTR)&sh2->r[regnum]; |
| 615 | } |
| 616 | |
| 617 | /* if we have registers to spare, assign r0, r1, r2 to leftovers */ |
| 618 | /* WARNING: do not use synthetic registers that are mapped here! */ |
| 619 | if (!DISABLE_FAST_REGISTERS) |
| 620 | { |
| 621 | drcuml_get_backend_info(sh2->drcuml, &beinfo); |
| 622 | if (beinfo.direct_iregs > 4) |
| 623 | { |
| 624 | sh2->regmap[0].type = DRCUML_PTYPE_INT_REGISTER; |
| 625 | sh2->regmap[0].value = DRCUML_REG_I4; |
| 626 | } |
| 627 | if (beinfo.direct_iregs > 5) |
| 628 | { |
| 629 | sh2->regmap[1].type = DRCUML_PTYPE_INT_REGISTER; |
| 630 | sh2->regmap[1].value = DRCUML_REG_I5; |
| 631 | } |
| 632 | if (beinfo.direct_iregs > 6) |
| 633 | { |
| 634 | sh2->regmap[2].type = DRCUML_PTYPE_INT_REGISTER; |
| 635 | sh2->regmap[2].value = DRCUML_REG_I6; |
| 636 | } |
| 637 | } |
| 638 | |
| 639 | /* mark the cache dirty so it is updated on next execute */ |
| 640 | sh2->cache_dirty = TRUE; |
| 641 | } |
| 642 | |
| 643 | /*------------------------------------------------- |
| 644 | sh2_exit - cleanup from execution |
| 645 | -------------------------------------------------*/ |
| 646 | |
| 647 | static void sh2_exit(void) |
| 648 | { |
| 649 | /* clean up the DRC */ |
| 650 | drcfe_exit(sh2->drcfe); |
| 651 | drcuml_free(sh2->drcuml); |
| 652 | drccache_free(sh2->cache); |
| 653 | } |
| 654 | |
| 655 | |
| 656 | /*------------------------------------------------- |
| 657 | sh2_reset - reset the processor |
| 658 | -------------------------------------------------*/ |
| 659 | |
| 660 | static void sh2_reset(void) |
| 661 | { |
| 662 | void *tsave, *tsaved0, *tsaved1; |
| 663 | UINT32 *m; |
| 664 | int cpunum; |
| 665 | |
| 666 | void (*f)(UINT32 data); |
| 667 | int (*save_irqcallback)(int); |
| 668 | |
| 669 | cpunum = sh2->cpu_number; |
| 670 | m = sh2->m; |
| 671 | tsave = sh2->timer; |
| 672 | tsaved0 = sh2->dma_timer[0]; |
| 673 | tsaved1 = sh2->dma_timer[1]; |
| 674 | |
| 675 | f = sh2->ftcsr_read_callback; |
| 676 | save_irqcallback = sh2->irq_callback; |
| 677 | |
| 678 | sh2->ppc = sh2->pc = sh2->pr = sh2->sr = sh2->gbr = sh2->vbr = sh2->mach = sh2->macl = 0; |
| 679 | sh2->evec = sh2->irqsr = 0; |
| 680 | memset(&sh2->r[0], 0, sizeof(sh2->r[0])*16); |
| 681 | sh2->ea = sh2->delay = sh2->cpu_off = sh2->dvsr = sh2->dvdnth = sh2->dvdntl = sh2->dvcr = 0; |
| 682 | sh2->pending_irq = sh2->test_irq = 0; |
| 683 | memset(&sh2->irq_queue[0], 0, sizeof(sh2->irq_queue[0])*16); |
| 684 | memset(&sh2->irq_line_state[0], 0, sizeof(sh2->irq_line_state[0])*17); |
| 685 | sh2->frc = sh2->ocra = sh2->ocrb = sh2->icr = 0; |
| 686 | sh2->frc_base = 0; |
| 687 | sh2->frt_input = sh2->internal_irq_level = sh2->internal_irq_vector = 0; |
| 688 | sh2->dma_timer_active[0] = sh2->dma_timer_active[1] = 0; |
| 689 | |
| 690 | sh2->ftcsr_read_callback = f; |
| 691 | sh2->irq_callback = save_irqcallback; |
| 692 | |
| 693 | sh2->timer = tsave; |
| 694 | sh2->dma_timer[0] = tsaved0; |
| 695 | sh2->dma_timer[1] = tsaved1; |
| 696 | sh2->cpu_number = cpunum; |
| 697 | sh2->m = m; |
| 698 | memset(sh2->m, 0, 0x200); |
| 699 | |
| 700 | sh2->pc = program_read_dword_32be(0); |
| 701 | sh2->r[15] = program_read_dword_32be(4); |
| 702 | sh2->sr = I; |
| 703 | change_pc(sh2->pc & AM); |
| 704 | |
| 705 | sh2->internal_irq_level = -1; |
| 706 | |
| 707 | sh2->cache_dirty = TRUE; |
| 708 | } |
| 709 | |
| 710 | /*------------------------------------------------- |
| 711 | code_flush_cache - flush the cache and |
| 712 | regenerate static code |
| 713 | -------------------------------------------------*/ |
| 714 | |
| 715 | static void code_flush_cache(drcuml_state *drcuml) |
| 716 | { |
| 717 | /* empty the transient cache contents */ |
| 718 | drcuml_reset(drcuml); |
| 719 | |
| 720 | /* generate the entry point and out-of-cycles handlers */ |
| 721 | static_generate_nocode_handler(drcuml); |
| 722 | static_generate_out_of_cycles(drcuml); |
| 723 | static_generate_entry_point(drcuml); |
| 724 | |
| 725 | /* add subroutines for memory accesses */ |
| 726 | static_generate_memory_accessor(drcuml, 1, FALSE, "read8", &sh2->read8); |
| 727 | static_generate_memory_accessor(drcuml, 1, TRUE, "write8", &sh2->write8); |
| 728 | static_generate_memory_accessor(drcuml, 2, FALSE, "read16", &sh2->read16); |
| 729 | static_generate_memory_accessor(drcuml, 2, TRUE, "write16", &sh2->write16); |
| 730 | static_generate_memory_accessor(drcuml, 4, FALSE, "read32", &sh2->read32); |
| 731 | static_generate_memory_accessor(drcuml, 4, TRUE, "write32", &sh2->write32); |
| 732 | |
| 733 | sh2->cache_dirty = FALSE; |
| 734 | } |
| 735 | |
| 736 | /* Execute cycles - returns number of cycles actually run */ |
| 737 | static int sh2_execute(int cycles) |
| 738 | { |
| 739 | drcuml_state *drcuml = sh2->drcuml; |
| 740 | int execute_result; |
| 741 | |
| 742 | /* reset the cache if dirty */ |
| 743 | if (sh2->cache_dirty) |
| 744 | code_flush_cache(drcuml); |
| 745 | |
| 746 | /* execute */ |
| 747 | sh2->icount = cycles; |
| 748 | do |
| 749 | { |
| 750 | /* run as much as we can */ |
| 751 | execute_result = drcuml_execute(drcuml, sh2->entry); |
| 752 | |
| 753 | /* if we need to recompile, do it */ |
| 754 | if (execute_result == EXECUTE_MISSING_CODE) |
| 755 | { |
| 756 | code_compile_block(drcuml, 0, sh2->pc); |
| 757 | } |
| 758 | else if (execute_result == EXECUTE_UNMAPPED_CODE) |
| 759 | { |
| 760 | fatalerror("Attempted to execute unmapped code at PC=%08X\n", sh2->pc); |
| 761 | } |
| 762 | else if (execute_result == EXECUTE_RESET_CACHE) |
| 763 | { |
| 764 | code_flush_cache(drcuml); |
| 765 | } |
| 766 | } while (execute_result != EXECUTE_OUT_OF_CYCLES); |
| 767 | |
| 768 | /* return the number of cycles executed */ |
| 769 | return cycles - sh2->icount; |
| 770 | } |
| 771 | |
| 772 | /*------------------------------------------------- |
| 773 | code_compile_block - compile a block of the |
| 774 | given mode at the specified pc |
| 775 | -------------------------------------------------*/ |
| 776 | |
| 777 | static void code_compile_block(drcuml_state *drcuml, UINT8 mode, offs_t pc) |
| 778 | { |
| 779 | compiler_state compiler = { 0 }; |
| 780 | const opcode_desc *seqhead, *seqlast; |
| 781 | const opcode_desc *desclist; |
| 782 | int override = FALSE; |
| 783 | drcuml_block *block; |
| 784 | jmp_buf errorbuf; |
| 785 | |
| 786 | /* get a description of this sequence */ |
| 787 | desclist = drcfe_describe_code(sh2->drcfe, pc); |
| 788 | if (LOG_UML || LOG_NATIVE) |
| 789 | log_opcode_desc(drcuml, desclist, 0); |
| 790 | |
| 791 | /* if we get an error back, flush the cache and try again */ |
| 792 | if (setjmp(errorbuf) != 0) |
| 793 | code_flush_cache(drcuml); |
| 794 | |
| 795 | /* start the block */ |
| 796 | block = drcuml_block_begin(drcuml, 4096, &errorbuf); |
| 797 | |
| 798 | /* loop until we get through all instruction sequences */ |
| 799 | for (seqhead = desclist; seqhead != NULL; seqhead = seqlast->next) |
| 800 | { |
| 801 | const opcode_desc *curdesc; |
| 802 | UINT32 nextpc; |
| 803 | |
| 804 | /* add a code log entry */ |
| 805 | if (LOG_UML) |
| 806 | UML_COMMENT(block, "-------------------------"); // comment |
| 807 | |
| 808 | /* determine the last instruction in this sequence */ |
| 809 | for (seqlast = seqhead; seqlast != NULL; seqlast = seqlast->next) |
| 810 | if (seqlast->flags & OPFLAG_END_SEQUENCE) |
| 811 | break; |
| 812 | assert(seqlast != NULL); |
| 813 | |
| 814 | /* if we don't have a hash for this mode/pc, or if we are overriding all, add one */ |
| 815 | if (override || !drcuml_hash_exists(drcuml, mode, seqhead->pc)) |
| 816 | UML_HASH(block, mode, seqhead->pc); // hash mode,pc |
| 817 | |
| 818 | /* if we already have a hash, and this is the first sequence, assume that we */ |
| 819 | /* are recompiling due to being out of sync and allow future overrides */ |
| 820 | else if (seqhead == desclist) |
| 821 | { |
| 822 | override = TRUE; |
| 823 | UML_HASH(block, mode, seqhead->pc); // hash mode,pc |
| 824 | } |
| 825 | |
| 826 | /* otherwise, redispatch to that fixed PC and skip the rest of the processing */ |
| 827 | else |
| 828 | { |
| 829 | UML_LABEL(block, seqhead->pc | 0x80000000); // label seqhead->pc | 0x80000000 |
| 830 | UML_HASHJMP(block, IMM(0), IMM(seqhead->pc), sh2->nocode); |
| 831 | // hashjmp <mode>,seqhead->pc,nocode |
| 832 | continue; |
| 833 | } |
| 834 | |
| 835 | /* validate this code block if we're not pointing into ROM */ |
| 836 | if (memory_get_write_ptr(cpu_getactivecpu(), ADDRESS_SPACE_PROGRAM, seqhead->physpc) != NULL) |
| 837 | generate_checksum_block(block, &compiler, seqhead, seqlast); |
| 838 | |
| 839 | /* label this instruction, if it may be jumped to locally */ |
| 840 | if (seqhead->flags & OPFLAG_IS_BRANCH_TARGET) |
| 841 | { |
| 842 | UML_LABEL(block, seqhead->pc | 0x80000000); // label seqhead->pc | 0x80000000 |
| 843 | } |
| 844 | |
| 845 | /* iterate over instructions in the sequence and compile them */ |
| 846 | for (curdesc = seqhead; curdesc != seqlast->next; curdesc = curdesc->next) |
| 847 | { |
| 848 | generate_sequence_instruction(block, &compiler, curdesc); |
| 849 | } |
| 850 | |
| 851 | /* if we need to return to the start, do it */ |
| 852 | if (seqlast->flags & OPFLAG_RETURN_TO_START) |
| 853 | { |
| 854 | nextpc = pc; |
| 855 | } |
| 856 | /* otherwise we just go to the next instruction */ |
| 857 | else |
| 858 | { |
| 859 | nextpc = seqlast->pc + (seqlast->skipslots + 1) * 2; |
| 860 | } |
| 861 | |
| 862 | /* count off cycles and go there */ |
| 863 | generate_update_cycles(block, &compiler, IMM(nextpc), TRUE); // <subtract cycles> |
| 864 | |
| 865 | /* SH2 has no modes */ |
| 866 | if (seqlast->next == NULL || seqlast->next->pc != nextpc) |
| 867 | { |
| 868 | UML_HASHJMP(block, IMM(0), IMM(nextpc), sh2->nocode); |
| 869 | } |
| 870 | // hashjmp <mode>,nextpc,nocode |
| 871 | } |
| 872 | |
| 873 | /* end the sequence */ |
| 874 | drcuml_block_end(block); |
| 875 | } |
| 876 | |
| 877 | /*------------------------------------------------- |
| 878 | static_generate_entry_point - generate a |
| 879 | static entry point |
| 880 | -------------------------------------------------*/ |
| 881 | |
| 882 | static void static_generate_entry_point(drcuml_state *drcuml) |
| 883 | { |
| 884 | drcuml_codelabel skip = 1; |
| 885 | drcuml_block *block; |
| 886 | jmp_buf errorbuf; |
| 887 | |
| 888 | /* if we get an error back, we're screwed */ |
| 889 | if (setjmp(errorbuf) != 0) |
| 890 | fatalerror("Unrecoverable error in static_generate_entry_point"); |
| 891 | |
| 892 | /* begin generating */ |
| 893 | block = drcuml_block_begin(drcuml, 200, &errorbuf); |
| 894 | |
| 895 | /* forward references */ |
| 896 | alloc_handle(drcuml, &sh2->nocode, "nocode"); |
| 897 | alloc_handle(drcuml, &sh2->write32, "write32"); // necessary? |
| 898 | alloc_handle(drcuml, &sh2->entry, "entry"); |
| 899 | UML_HANDLE(block, sh2->entry); // handle entry |
| 900 | |
| 901 | /* load fast integer registers */ |
| 902 | load_fast_iregs(block); |
| 903 | |
| 904 | /* check for interrupts */ |
| 905 | UML_CALLC(block, cfunc_checkirqs, NULL); |
| 906 | |
| 907 | UML_CMP(block, MEM(&sh2->evec), IMM(0xffffffff)); // cmp evec, 0xffffffff |
| 908 | UML_JMPc(block, IF_Z, skip); // jz skip |
| 909 | |
| 910 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 911 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 912 | UML_MOV(block, IREG(1), MEM(&sh2->irqsr)); // mov r1, irqsr |
| 913 | UML_CALLH(block, sh2->write32); // call write32 |
| 914 | |
| 915 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 916 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 917 | UML_MOV(block, IREG(1), MEM(&sh2->pc)); // mov r1, pc |
| 918 | UML_CALLH(block, sh2->write32); // call write32 |
| 919 | |
| 920 | UML_MOV(block, MEM(&sh2->pc), MEM(&sh2->evec)); // mov pc, evec |
| 921 | |
| 922 | UML_LABEL(block, skip); // skip: |
| 923 | |
| 924 | /* generate a hash jump via the current mode and PC */ |
| 925 | UML_HASHJMP(block, IMM(0), MEM(&sh2->pc), sh2->nocode); // hashjmp <mode>,<pc>,nocode |
| 926 | |
| 927 | drcuml_block_end(block); |
| 928 | } |
| 929 | |
| 930 | /*------------------------------------------------- |
| 931 | static_generate_nocode_handler - generate an |
| 932 | exception handler for "out of code" |
| 933 | -------------------------------------------------*/ |
| 934 | |
| 935 | static void static_generate_nocode_handler(drcuml_state *drcuml) |
| 936 | { |
| 937 | drcuml_block *block; |
| 938 | jmp_buf errorbuf; |
| 939 | |
| 940 | /* if we get an error back, we're screwed */ |
| 941 | if (setjmp(errorbuf) != 0) |
| 942 | fatalerror("Unrecoverable error in static_generate_nocode_handler"); |
| 943 | |
| 944 | /* begin generating */ |
| 945 | block = drcuml_block_begin(drcuml, 10, &errorbuf); |
| 946 | |
| 947 | /* generate a hash jump via the current mode and PC */ |
| 948 | alloc_handle(drcuml, &sh2->nocode, "nocode"); |
| 949 | UML_HANDLE(block, sh2->nocode); // handle nocode |
| 950 | UML_GETEXP(block, IREG(0)); // getexp i0 |
| 951 | UML_MOV(block, MEM(&sh2->pc), IREG(0)); // mov [pc],i0 |
| 952 | save_fast_iregs(block); |
| 953 | UML_EXIT(block, IMM(EXECUTE_MISSING_CODE)); // exit EXECUTE_MISSING_CODE |
| 954 | |
| 955 | drcuml_block_end(block); |
| 956 | } |
| 957 | |
| 958 | |
| 959 | /*------------------------------------------------- |
| 960 | static_generate_out_of_cycles - generate an |
| 961 | out of cycles exception handler |
| 962 | -------------------------------------------------*/ |
| 963 | |
| 964 | static void static_generate_out_of_cycles(drcuml_state *drcuml) |
| 965 | { |
| 966 | drcuml_block *block; |
| 967 | jmp_buf errorbuf; |
| 968 | |
| 969 | /* if we get an error back, we're screwed */ |
| 970 | if (setjmp(errorbuf) != 0) |
| 971 | fatalerror("Unrecoverable error in static_generate_out_of_cycles"); |
| 972 | |
| 973 | /* begin generating */ |
| 974 | block = drcuml_block_begin(drcuml, 10, &errorbuf); |
| 975 | |
| 976 | /* generate a hash jump via the current mode and PC */ |
| 977 | alloc_handle(drcuml, &sh2->out_of_cycles, "out_of_cycles"); |
| 978 | UML_HANDLE(block, sh2->out_of_cycles); // handle out_of_cycles |
| 979 | UML_GETEXP(block, IREG(0)); // getexp i0 |
| 980 | UML_MOV(block, MEM(&sh2->pc), IREG(0)); // mov <pc>,i0 |
| 981 | save_fast_iregs(block); |
| 982 | UML_EXIT(block, IMM(EXECUTE_OUT_OF_CYCLES)); // exit EXECUTE_OUT_OF_CYCLES |
| 983 | |
| 984 | drcuml_block_end(block); |
| 985 | } |
| 986 | |
| 987 | /*------------------------------------------------------------------ |
| 988 | static_generate_memory_accessor |
| 989 | ------------------------------------------------------------------*/ |
| 990 | |
| 991 | static void static_generate_memory_accessor(drcuml_state *drcuml, int size, int iswrite, const char *name, drcuml_codehandle **handleptr) |
| 992 | { |
| 993 | /* on entry, address is in I0; data for writes is in I1 */ |
| 994 | /* on exit, read result is in I0 */ |
| 995 | /* routine trashes I0 */ |
| 996 | drcuml_block *block; |
| 997 | jmp_buf errorbuf; |
| 998 | int label = 1; |
| 999 | |
| 1000 | /* if we get an error back, we're screwed */ |
| 1001 | if (setjmp(errorbuf) != 0) |
| 1002 | fatalerror("Unrecoverable error in static_generate_memory_accessor"); |
| 1003 | |
| 1004 | /* begin generating */ |
| 1005 | block = drcuml_block_begin(drcuml, 1024, &errorbuf); |
| 1006 | |
| 1007 | /* add a global entry for this */ |
| 1008 | alloc_handle(drcuml, handleptr, name); |
| 1009 | UML_HANDLE(block, *handleptr); // handle *handleptr |
| 1010 | |
| 1011 | // with internal handlers this becomes easier. |
| 1012 | // if addr < 0x40000000 AND it with AM and do the read/write, else just do the read/write |
| 1013 | UML_TEST(block, IREG(0), IMM(0x80000000)); // test r0, #0x80000000 |
| 1014 | UML_JMPc(block, IF_NZ, label); // if high bit is set, don't mask |
| 1015 | |
| 1016 | UML_CMP(block, IREG(0), IMM(0x40000000)); // cmp #0x40000000, r0 |
| 1017 | UML_JMPc(block, IF_AE, label); // bae label |
| 1018 | |
| 1019 | UML_AND(block, IREG(0), IREG(0), IMM(AM)); // and r0, r0, #AM (0xc7ffffff) |
| 1020 | |
| 1021 | UML_LABEL(block, label++); // label: |
| 1022 | |
| 1023 | if (iswrite) |
| 1024 | { |
| 1025 | switch (size) |
| 1026 | { |
| 1027 | case 1: |
| 1028 | UML_WRITE(block, IREG(0), IREG(1), PROGRAM_BYTE); // write r0, r1, program_byte |
| 1029 | break; |
| 1030 | |
| 1031 | case 2: |
| 1032 | UML_WRITE(block, IREG(0), IREG(1), PROGRAM_WORD); // write r0, r1, program_word |
| 1033 | break; |
| 1034 | |
| 1035 | case 4: |
| 1036 | UML_WRITE(block, IREG(0), IREG(1), PROGRAM_DWORD); // write r0, r1, program_dword |
| 1037 | break; |
| 1038 | } |
| 1039 | } |
| 1040 | else |
| 1041 | { |
| 1042 | switch (size) |
| 1043 | { |
| 1044 | case 1: |
| 1045 | UML_READ(block, IREG(0), IREG(0), PROGRAM_BYTE); // read r0, program_byte |
| 1046 | break; |
| 1047 | |
| 1048 | case 2: |
| 1049 | UML_READ(block, IREG(0), IREG(0), PROGRAM_WORD); // read r0, program_word |
| 1050 | break; |
| 1051 | |
| 1052 | case 4: |
| 1053 | UML_READ(block, IREG(0), IREG(0), PROGRAM_DWORD); // read r0, program_dword |
| 1054 | break; |
| 1055 | } |
| 1056 | } |
| 1057 | |
| 1058 | UML_RET(block); // ret |
| 1059 | |
| 1060 | drcuml_block_end(block); |
| 1061 | } |
| 1062 | |
| 1063 | /*------------------------------------------------- |
| 1064 | log_desc_flags_to_string - generate a string |
| 1065 | representing the instruction description |
| 1066 | flags |
| 1067 | -------------------------------------------------*/ |
| 1068 | |
| 1069 | static const char *log_desc_flags_to_string(UINT32 flags) |
| 1070 | { |
| 1071 | static char tempbuf[30]; |
| 1072 | char *dest = tempbuf; |
| 1073 | |
| 1074 | /* branches */ |
| 1075 | if (flags & OPFLAG_IS_UNCONDITIONAL_BRANCH) |
| 1076 | *dest++ = 'U'; |
| 1077 | else if (flags & OPFLAG_IS_CONDITIONAL_BRANCH) |
| 1078 | *dest++ = 'C'; |
| 1079 | else |
| 1080 | *dest++ = '.'; |
| 1081 | |
| 1082 | /* intrablock branches */ |
| 1083 | *dest++ = (flags & OPFLAG_INTRABLOCK_BRANCH) ? 'i' : '.'; |
| 1084 | |
| 1085 | /* branch targets */ |
| 1086 | *dest++ = (flags & OPFLAG_IS_BRANCH_TARGET) ? 'B' : '.'; |
| 1087 | |
| 1088 | /* delay slots */ |
| 1089 | *dest++ = (flags & OPFLAG_IN_DELAY_SLOT) ? 'D' : '.'; |
| 1090 | |
| 1091 | /* exceptions */ |
| 1092 | if (flags & OPFLAG_WILL_CAUSE_EXCEPTION) |
| 1093 | *dest++ = 'E'; |
| 1094 | else if (flags & OPFLAG_CAN_CAUSE_EXCEPTION) |
| 1095 | *dest++ = 'e'; |
| 1096 | else |
| 1097 | *dest++ = '.'; |
| 1098 | |
| 1099 | /* read/write */ |
| 1100 | if (flags & OPFLAG_READS_MEMORY) |
| 1101 | *dest++ = 'R'; |
| 1102 | else if (flags & OPFLAG_WRITES_MEMORY) |
| 1103 | *dest++ = 'W'; |
| 1104 | else |
| 1105 | *dest++ = '.'; |
| 1106 | |
| 1107 | /* TLB validation */ |
| 1108 | *dest++ = (flags & OPFLAG_VALIDATE_TLB) ? 'V' : '.'; |
| 1109 | |
| 1110 | /* TLB modification */ |
| 1111 | *dest++ = (flags & OPFLAG_MODIFIES_TRANSLATION) ? 'T' : '.'; |
| 1112 | |
| 1113 | /* redispatch */ |
| 1114 | *dest++ = (flags & OPFLAG_REDISPATCH) ? 'R' : '.'; |
| 1115 | return tempbuf; |
| 1116 | } |
| 1117 | |
| 1118 | |
| 1119 | /*------------------------------------------------- |
| 1120 | log_register_list - log a list of GPR registers |
| 1121 | -------------------------------------------------*/ |
| 1122 | |
| 1123 | static void log_register_list(drcuml_state *drcuml, const char *string, const UINT32 *reglist, const UINT32 *regnostarlist) |
| 1124 | { |
| 1125 | int count = 0; |
| 1126 | int regnum; |
| 1127 | |
| 1128 | /* skip if nothing */ |
| 1129 | if (reglist[0] == 0 && reglist[1] == 0 && reglist[2] == 0) |
| 1130 | return; |
| 1131 | |
| 1132 | drcuml_log_printf(drcuml, "[%s:", string); |
| 1133 | |
| 1134 | for (regnum = 0; regnum < 16; regnum++) |
| 1135 | { |
| 1136 | if (reglist[0] & REGFLAG_R(regnum)) |
| 1137 | { |
| 1138 | drcuml_log_printf(drcuml, "%sr%d", (count++ == 0) ? "" : ",", regnum); |
| 1139 | if (regnostarlist != NULL && !(regnostarlist[0] & REGFLAG_R(regnum))) |
| 1140 | drcuml_log_printf(drcuml, "*"); |
| 1141 | } |
| 1142 | } |
| 1143 | |
| 1144 | if (reglist[1] & REGFLAG_PR) |
| 1145 | { |
| 1146 | drcuml_log_printf(drcuml, "%spr", (count++ == 0) ? "" : ","); |
| 1147 | if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_PR)) |
| 1148 | drcuml_log_printf(drcuml, "*"); |
| 1149 | } |
| 1150 | |
| 1151 | if (reglist[1] & REGFLAG_SR) |
| 1152 | { |
| 1153 | drcuml_log_printf(drcuml, "%ssr", (count++ == 0) ? "" : ","); |
| 1154 | if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_SR)) |
| 1155 | drcuml_log_printf(drcuml, "*"); |
| 1156 | } |
| 1157 | |
| 1158 | if (reglist[1] & REGFLAG_MACL) |
| 1159 | { |
| 1160 | drcuml_log_printf(drcuml, "%smacl", (count++ == 0) ? "" : ","); |
| 1161 | if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_MACL)) |
| 1162 | drcuml_log_printf(drcuml, "*"); |
| 1163 | } |
| 1164 | |
| 1165 | if (reglist[1] & REGFLAG_MACH) |
| 1166 | { |
| 1167 | drcuml_log_printf(drcuml, "%smach", (count++ == 0) ? "" : ","); |
| 1168 | if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_MACH)) |
| 1169 | drcuml_log_printf(drcuml, "*"); |
| 1170 | } |
| 1171 | |
| 1172 | if (reglist[1] & REGFLAG_GBR) |
| 1173 | { |
| 1174 | drcuml_log_printf(drcuml, "%sgbr", (count++ == 0) ? "" : ","); |
| 1175 | if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_GBR)) |
| 1176 | drcuml_log_printf(drcuml, "*"); |
| 1177 | } |
| 1178 | |
| 1179 | if (reglist[1] & REGFLAG_VBR) |
| 1180 | { |
| 1181 | drcuml_log_printf(drcuml, "%svbr", (count++ == 0) ? "" : ","); |
| 1182 | if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_VBR)) |
| 1183 | drcuml_log_printf(drcuml, "*"); |
| 1184 | } |
| 1185 | |
| 1186 | drcuml_log_printf(drcuml, "] "); |
| 1187 | } |
| 1188 | |
| 1189 | /*------------------------------------------------- |
| 1190 | log_opcode_desc - log a list of descriptions |
| 1191 | -------------------------------------------------*/ |
| 1192 | |
| 1193 | static void log_opcode_desc(drcuml_state *drcuml, const opcode_desc *desclist, int indent) |
| 1194 | { |
| 1195 | /* open the file, creating it if necessary */ |
| 1196 | if (indent == 0) |
| 1197 | drcuml_log_printf(drcuml, "\nDescriptor list @ %08X\n", desclist->pc); |
| 1198 | |
| 1199 | /* output each descriptor */ |
| 1200 | for ( ; desclist != NULL; desclist = desclist->next) |
| 1201 | { |
| 1202 | char buffer[100]; |
| 1203 | |
| 1204 | /* disassemle the current instruction and output it to the log */ |
| 1205 | #if (LOG_UML || LOG_NATIVE) |
| 1206 | if (desclist->flags & OPFLAG_VIRTUAL_NOOP) |
| 1207 | strcpy(buffer, "<virtual nop>"); |
| 1208 | else |
| 1209 | DasmSH2(buffer, desclist->pc, *desclist->opptr.w); |
| 1210 | #else |
| 1211 | strcpy(buffer, "???"); |
| 1212 | #endif |
| 1213 | drcuml_log_printf(drcuml, "%08X [%08X] t:%08X f:%s: %-30s", desclist->pc, desclist->physpc, desclist->targetpc, log_desc_flags_to_string(desclist->flags), buffer); |
| 1214 | |
| 1215 | /* output register states */ |
| 1216 | log_register_list(drcuml, "use", desclist->regin, NULL); |
| 1217 | log_register_list(drcuml, "mod", desclist->regout, desclist->regreq); |
| 1218 | drcuml_log_printf(drcuml, "\n"); |
| 1219 | |
| 1220 | /* if we have a delay slot, output it recursively */ |
| 1221 | if (desclist->delay != NULL) |
| 1222 | log_opcode_desc(drcuml, desclist->delay, indent + 1); |
| 1223 | |
| 1224 | /* at the end of a sequence add a dividing line */ |
| 1225 | if (desclist->flags & OPFLAG_END_SEQUENCE) |
| 1226 | drcuml_log_printf(drcuml, "-----\n"); |
| 1227 | } |
| 1228 | } |
| 1229 | |
| 1230 | /*------------------------------------------------- |
| 1231 | log_add_disasm_comment - add a comment |
| 1232 | including disassembly of a MIPS instruction |
| 1233 | -------------------------------------------------*/ |
| 1234 | |
| 1235 | static void log_add_disasm_comment(drcuml_block *block, UINT32 pc, UINT32 op) |
| 1236 | { |
| 1237 | #if (LOG_UML) |
| 1238 | char buffer[100]; |
| 1239 | DasmSH2(buffer, pc, op); |
| 1240 | UML_COMMENT(block, "%08X: %s", pc, buffer); // comment |
| 1241 | #endif |
| 1242 | } |
| 1243 | |
| 1244 | /*------------------------------------------------- |
| 1245 | generate_update_cycles - generate code to |
| 1246 | subtract cycles from the icount and generate |
| 1247 | an exception if out |
| 1248 | -------------------------------------------------*/ |
| 1249 | static void generate_update_cycles(drcuml_block *block, compiler_state *compiler, drcuml_ptype ptype, UINT64 pvalue, int allow_exception) |
| 1250 | { |
| 1251 | /* check full interrupts if pending */ |
| 1252 | if (compiler->checkints) |
| 1253 | { |
| 1254 | drcuml_codelabel skip = compiler->labelnum++; |
| 1255 | |
| 1256 | compiler->checkints = FALSE; |
| 1257 | |
| 1258 | /* check for interrupts */ |
| 1259 | UML_CALLC(block, cfunc_checkirqs, NULL); |
| 1260 | |
| 1261 | UML_CMP(block, MEM(&sh2->evec), IMM(0xffffffff)); // cmp evec, 0xffffffff |
| 1262 | UML_JMPc(block, IF_Z, skip); // jz skip |
| 1263 | |
| 1264 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 1265 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 1266 | UML_MOV(block, IREG(1), MEM(&sh2->irqsr)); // mov r1, irqsr |
| 1267 | UML_CALLH(block, sh2->write32); // call write32 |
| 1268 | |
| 1269 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 1270 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 1271 | UML_MOV(block, IREG(1), PARAM(ptype, pvalue)); // mov r1, nextpc |
| 1272 | UML_CALLH(block, sh2->write32); // call write32 |
| 1273 | |
| 1274 | UML_HASHJMP(block, IMM(0), MEM(&sh2->evec), sh2->nocode); // hashjmp sh2->evec |
| 1275 | |
| 1276 | UML_LABEL(block, skip); // skip: |
| 1277 | } |
| 1278 | |
| 1279 | /* account for cycles */ |
| 1280 | if (compiler->cycles > 0) |
| 1281 | { |
| 1282 | UML_SUB(block, MEM(&sh2->icount), MEM(&sh2->icount), MAPVAR_CYCLES); // sub icount,icount,cycles |
| 1283 | UML_MAPVAR(block, MAPVAR_CYCLES, 0); // mapvar cycles,0 |
| 1284 | if (allow_exception) |
| 1285 | UML_EXHc(block, IF_S, sh2->out_of_cycles, PARAM(ptype, pvalue)); |
| 1286 | // exh out_of_cycles,nextpc |
| 1287 | } |
| 1288 | compiler->cycles = 0; |
| 1289 | } |
| 1290 | |
| 1291 | /*------------------------------------------------- |
| 1292 | generate_checksum_block - generate code to |
| 1293 | validate a sequence of opcodes |
| 1294 | -------------------------------------------------*/ |
| 1295 | |
| 1296 | static void generate_checksum_block(drcuml_block *block, compiler_state *compiler, const opcode_desc *seqhead, const opcode_desc *seqlast) |
| 1297 | { |
| 1298 | const opcode_desc *curdesc; |
| 1299 | if (LOG_UML) |
| 1300 | UML_COMMENT(block, "[Validation for %08X]", seqhead->pc); // comment |
| 1301 | |
| 1302 | /* loose verify or single instruction: just compare and fail */ |
| 1303 | if (!(sh2->drcoptions & SH2DRC_STRICT_VERIFY) || seqhead->next == NULL) |
| 1304 | { |
| 1305 | if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP)) |
| 1306 | { |
| 1307 | UML_LOAD(block, IREG(0), seqhead->opptr.l, IMM(0), DWORD); // load i0,*opptr,0,dword |
| 1308 | UML_CMP(block, IREG(0), IMM(*seqhead->opptr.l)); // cmp i0,*opptr |
| 1309 | UML_EXHc(block, IF_NE, sh2->nocode, IMM(epc(seqhead))); // exne nocode,seqhead->pc |
| 1310 | } |
| 1311 | } |
| 1312 | |
| 1313 | /* full verification; sum up everything */ |
| 1314 | else |
| 1315 | { |
| 1316 | #if 0 |
| 1317 | for (curdesc = seqhead->next; curdesc != seqlast->next; curdesc = curdesc->next) |
| 1318 | if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP)) |
| 1319 | { |
| 1320 | UML_LOAD(block, IREG(0), curdesc->opptr.w, IMM(0), WORD); // load i0,*opptr,0,word |
| 1321 | UML_CMP(block, IREG(0), IMM(*curdesc->opptr.w)); // cmp i0,*opptr |
| 1322 | UML_EXHc(block, IF_NE, sh2->nocode, IMM(epc(seqhead))); // exne nocode,seqhead->pc |
| 1323 | } |
| 1324 | #else |
| 1325 | UINT32 sum = 0; |
| 1326 | UML_LOAD(block, IREG(0), seqhead->opptr.l, IMM(0), DWORD); // load i0,*opptr,0,dword |
| 1327 | sum += *seqhead->opptr.l; |
| 1328 | for (curdesc = seqhead->next; curdesc != seqlast->next; curdesc = curdesc->next) |
| 1329 | if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP)) |
| 1330 | { |
| 1331 | UML_LOAD(block, IREG(1), curdesc->opptr.l, IMM(0), DWORD); // load i1,*opptr,dword |
| 1332 | UML_ADD(block, IREG(0), IREG(0), IREG(1)); // add i0,i0,i1 |
| 1333 | sum += *curdesc->opptr.l; |
| 1334 | } |
| 1335 | UML_CMP(block, IREG(0), IMM(sum)); // cmp i0,sum |
| 1336 | UML_EXHc(block, IF_NE, sh2->nocode, IMM(epc(seqhead))); // exne nocode,seqhead->pc |
| 1337 | #endif |
| 1338 | } |
| 1339 | } |
| 1340 | |
| 1341 | |
| 1342 | /*------------------------------------------------- |
| 1343 | generate_sequence_instruction - generate code |
| 1344 | for a single instruction in a sequence |
| 1345 | -------------------------------------------------*/ |
| 1346 | |
| 1347 | static void generate_sequence_instruction(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) |
| 1348 | { |
| 1349 | offs_t expc; |
| 1350 | |
| 1351 | /* add an entry for the log */ |
| 1352 | if (LOG_UML && !(desc->flags & OPFLAG_VIRTUAL_NOOP)) |
| 1353 | log_add_disasm_comment(block, desc->pc, *desc->opptr.l); |
| 1354 | |
| 1355 | /* set the PC map variable */ |
| 1356 | expc = (desc->flags & OPFLAG_IN_DELAY_SLOT) ? desc->pc - 1 : desc->pc; |
| 1357 | UML_MAPVAR(block, MAPVAR_PC, expc); // mapvar PC,expc |
| 1358 | |
| 1359 | /* accumulate total cycles */ |
| 1360 | compiler->cycles += desc->cycles; |
| 1361 | |
| 1362 | /* update the icount map variable */ |
| 1363 | UML_MAPVAR(block, MAPVAR_CYCLES, compiler->cycles); // mapvar CYCLES,compiler->cycles |
| 1364 | |
| 1365 | /* if we want a probe, add it here */ |
| 1366 | if (desc->pc == PROBE_ADDRESS) |
| 1367 | UML_CALLC(block, cfunc_printf_probe, desc->pc); // callc cfunc_printf_probe,desc->pc |
| 1368 | |
| 1369 | /* if we are debugging, call the debugger */ |
| 1370 | if ((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0) |
| 1371 | { |
| 1372 | UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov [pc],desc->pc |
| 1373 | save_fast_iregs(block); |
| 1374 | UML_DEBUG(block, IMM(desc->pc)); // debug desc->pc |
| 1375 | } |
| 1376 | else // not debug, see what other reasons there are for flushing the PC |
| 1377 | { |
| 1378 | if (sh2->drcoptions & SH2DRC_FLUSH_PC) // always flush? |
| 1379 | { |
| 1380 | UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov sh2->pc, desc->pc |
| 1381 | } |
| 1382 | else // check for driver-selected flushes |
| 1383 | { |
| 1384 | if (sh2->maxpcfsel != -1) |
| 1385 | { |
| 1386 | int pcflush; |
| 1387 | |
| 1388 | for (pcflush = 0; pcflush <= sh2->maxpcfsel; pcflush++) |
| 1389 | { |
| 1390 | if (desc->pc == sh2->pcflushes[pcflush]) |
| 1391 | { |
| 1392 | UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov sh2->pc, desc->pc |
| 1393 | } |
| 1394 | } |
| 1395 | } |
| 1396 | } |
| 1397 | } |
| 1398 | |
| 1399 | |
| 1400 | /* if we hit an unmapped address, fatal error */ |
| 1401 | if (desc->flags & OPFLAG_COMPILER_UNMAPPED) |
| 1402 | { |
| 1403 | UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov [pc],desc->pc |
| 1404 | save_fast_iregs(block); |
| 1405 | UML_EXIT(block, IMM(EXECUTE_UNMAPPED_CODE)); // exit EXECUTE_UNMAPPED_CODE |
| 1406 | } |
| 1407 | |
| 1408 | /* if this is an invalid opcode, die */ |
| 1409 | if (desc->flags & OPFLAG_INVALID_OPCODE) |
| 1410 | { |
| 1411 | fatalerror("SH2DRC: invalid opcode!\n"); |
| 1412 | } |
| 1413 | |
| 1414 | /* otherwise, unless this is a virtual no-op, it's a regular instruction */ |
| 1415 | else if (!(desc->flags & OPFLAG_VIRTUAL_NOOP)) |
| 1416 | { |
| 1417 | /* compile the instruction */ |
| 1418 | if (!generate_opcode(block, compiler, desc)) |
| 1419 | { |
| 1420 | UML_MOV(block, MEM(&sh2->pc), IMM(desc->pc)); // mov [pc],desc->pc |
| 1421 | UML_CALLC(block, cfunc_unimplemented, (void *)(FPTR)*desc->opptr.w); // callc cfunc_unimplemented |
| 1422 | } |
| 1423 | } |
| 1424 | } |
| 1425 | |
| 1426 | /*------------------------------------------------------------------ |
| 1427 | generate_delay_slot |
| 1428 | ------------------------------------------------------------------*/ |
| 1429 | |
| 1430 | static void generate_delay_slot(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) |
| 1431 | { |
| 1432 | compiler_state compiler_temp = *compiler; |
| 1433 | |
| 1434 | /* compile the delay slot using temporary compiler state */ |
| 1435 | assert(desc->delay != NULL); |
| 1436 | generate_sequence_instruction(block, &compiler_temp, desc->delay); // <next instruction> |
| 1437 | |
| 1438 | /* update the label */ |
| 1439 | compiler->labelnum = compiler_temp.labelnum; |
| 1440 | } |
| 1441 | |
| 1442 | /*------------------------------------------------- |
| 1443 | generate_opcode - generate code for a specific |
| 1444 | opcode |
| 1445 | -------------------------------------------------*/ |
| 1446 | |
| 1447 | static int generate_opcode(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) |
| 1448 | { |
| 1449 | UINT32 scratch, scratch2; |
| 1450 | INT32 disp; |
| 1451 | UINT16 opcode = *desc->opptr.w; |
| 1452 | UINT8 opswitch = opcode >> 12; |
| 1453 | int in_delay_slot = ((desc->flags & OPFLAG_IN_DELAY_SLOT) != 0); |
| 1454 | |
| 1455 | switch (opswitch) |
| 1456 | { |
| 1457 | case 0: |
| 1458 | return generate_group_0(block, compiler, desc, opcode, in_delay_slot); |
| 1459 | break; |
| 1460 | |
| 1461 | case 1: // MOVLS4 |
| 1462 | scratch = (opcode & 0x0f) * 4; |
| 1463 | UML_ADD(block, IREG(0), R32(Rn), IMM(scratch)); // add r0, Rn, scratch |
| 1464 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1465 | SETEA(0); // set ea for debug |
| 1466 | UML_CALLH(block, sh2->write32); |
| 1467 | |
| 1468 | if (!in_delay_slot) |
| 1469 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1470 | return TRUE; |
| 1471 | break; |
| 1472 | |
| 1473 | case 2: |
| 1474 | return generate_group_2(block, compiler, desc, opcode, in_delay_slot); |
| 1475 | break; |
| 1476 | case 3: |
| 1477 | return generate_group_3(block, compiler, desc, opcode); |
| 1478 | break; |
| 1479 | case 4: |
| 1480 | return generate_group_4(block, compiler, desc, opcode, in_delay_slot); |
| 1481 | break; |
| 1482 | |
| 1483 | case 5: // MOVLL4 |
| 1484 | scratch = (opcode & 0x0f) * 4; |
| 1485 | UML_ADD(block, IREG(0), R32(Rm), IMM(scratch)); // add r0, Rm, scratch |
| 1486 | SETEA(0); // set ea for debug |
| 1487 | UML_CALLH(block, sh2->read32); // call read32 |
| 1488 | UML_MOV(block, R32(Rn), IREG(0)); // mov Rn, r0 |
| 1489 | |
| 1490 | if (!in_delay_slot) |
| 1491 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1492 | return TRUE; |
| 1493 | break; |
| 1494 | |
| 1495 | case 6: |
| 1496 | return generate_group_6(block, compiler, desc, opcode, in_delay_slot); |
| 1497 | break; |
| 1498 | |
| 1499 | case 7: // ADDI |
| 1500 | scratch = opcode & 0xff; |
| 1501 | scratch2 = (UINT32)(INT32)(INT16)(INT8)scratch; |
| 1502 | UML_ADD(block, R32(Rn), R32(Rn), IMM(scratch2)); // add Rn, Rn, scratch2 |
| 1503 | return TRUE; |
| 1504 | break; |
| 1505 | |
| 1506 | case 8: |
| 1507 | return generate_group_8(block, compiler, desc, opcode, in_delay_slot); |
| 1508 | break; |
| 1509 | |
| 1510 | case 9: // MOVWI |
| 1511 | scratch = (desc->pc + 2) + ((opcode & 0xff) * 2) + 2; |
| 1512 | UML_MOV(block, IREG(0), IMM(scratch)); // mov r0, scratch |
| 1513 | SETEA(0); // set ea for debug |
| 1514 | UML_CALLH(block, sh2->read16); // read16(r0, r1) |
| 1515 | UML_SEXT(block, R32(Rn), IREG(0), WORD); // sext Rn, r0, WORD |
| 1516 | |
| 1517 | if (!in_delay_slot) |
| 1518 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1519 | return TRUE; |
| 1520 | break; |
| 1521 | |
| 1522 | case 10: // BRA |
| 1523 | generate_delay_slot(block, compiler, desc); |
| 1524 | |
| 1525 | disp = ((INT32)opcode << 20) >> 20; |
| 1526 | |
| 1527 | sh2->ea = (desc->pc + 2) + disp * 2 + 2; // sh2->ea = pc+4 + disp*2 + 2 |
| 1528 | |
| 1529 | generate_update_cycles(block, compiler, IMM(sh2->ea), TRUE); // <subtract cycles> |
| 1530 | UML_HASHJMP(block, IMM(0), IMM(sh2->ea), sh2->nocode); // hashjmp sh2->ea |
| 1531 | return TRUE; |
| 1532 | break; |
| 1533 | |
| 1534 | case 11: // BSR |
| 1535 | generate_delay_slot(block, compiler, desc); |
| 1536 | |
| 1537 | disp = ((INT32)opcode << 20) >> 20; |
| 1538 | |
| 1539 | UML_ADD(block, MEM(&sh2->pr), IMM(desc->pc), IMM(4)); // add sh2->pr, desc->pc, #4 (skip the current insn & delay slot) |
| 1540 | |
| 1541 | sh2->ea = (desc->pc + 2) + disp * 2 + 2; // sh2->ea = pc+4 + disp*2 + 2 |
| 1542 | generate_update_cycles(block, compiler, IMM(sh2->ea), TRUE); // <subtract cycles> |
| 1543 | UML_HASHJMP(block, IMM(0), IMM(sh2->ea), sh2->nocode); // hashjmp sh2->ea |
| 1544 | return TRUE; |
| 1545 | break; |
| 1546 | |
| 1547 | case 12: |
| 1548 | return generate_group_12(block, compiler, desc, opcode, in_delay_slot); |
| 1549 | break; |
| 1550 | |
| 1551 | case 13: // MOVLI |
| 1552 | scratch = ((desc->pc + 4) & ~3) + ((opcode & 0xff) * 4); |
| 1553 | UML_MOV(block, IREG(0), IMM(scratch)); // mov r0, scratch |
| 1554 | UML_CALLH(block, sh2->read32); // read32(r0, r1) |
| 1555 | UML_MOV(block, R32(Rn), IREG(0)); // mov Rn, r0 |
| 1556 | |
| 1557 | if (!in_delay_slot) |
| 1558 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1559 | return TRUE; |
| 1560 | break; |
| 1561 | |
| 1562 | case 14: // MOVI |
| 1563 | scratch = opcode & 0xff; |
| 1564 | scratch2 = (UINT32)(INT32)(INT16)(INT8)scratch; |
| 1565 | UML_MOV(block, R32(Rn), IMM(scratch2)); |
| 1566 | return TRUE; |
| 1567 | break; |
| 1568 | |
| 1569 | case 15: // NOP |
| 1570 | return TRUE; |
| 1571 | break; |
| 1572 | } |
| 1573 | |
| 1574 | return FALSE; |
| 1575 | } |
| 1576 | |
| 1577 | static int generate_group_0(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot) |
| 1578 | { |
| 1579 | switch (opcode & 0x3F) |
| 1580 | { |
| 1581 | case 0x00: // NOP(); |
| 1582 | case 0x01: // NOP(); |
| 1583 | case 0x09: // NOP(); |
| 1584 | case 0x10: // NOP(); |
| 1585 | case 0x11: // NOP(); |
| 1586 | case 0x13: // NOP(); |
| 1587 | case 0x20: // NOP(); |
| 1588 | case 0x21: // NOP(); |
| 1589 | case 0x30: // NOP(); |
| 1590 | case 0x31: // NOP(); |
| 1591 | case 0x32: // NOP(); |
| 1592 | case 0x33: // NOP(); |
| 1593 | case 0x38: // NOP(); |
| 1594 | case 0x39: // NOP(); |
| 1595 | case 0x3a: // NOP(); |
| 1596 | case 0x3b: // NOP(); |
| 1597 | return TRUE; |
| 1598 | break; |
| 1599 | |
| 1600 | case 0x02: // STCSR(Rn); |
| 1601 | UML_MOV(block, R32(Rn), MEM(&sh2->sr)); |
| 1602 | return TRUE; |
| 1603 | break; |
| 1604 | |
| 1605 | case 0x03: // BSRF(Rn); |
| 1606 | UML_ADD(block, MEM(&sh2->target), R32(Rn), IMM(4)); // add target, Rm, #4 |
| 1607 | UML_ADD(block, MEM(&sh2->target), MEM(&sh2->target), IMM(desc->pc)); // add target, target, pc |
| 1608 | |
| 1609 | generate_delay_slot(block, compiler, desc); |
| 1610 | |
| 1611 | UML_ADD(block, MEM(&sh2->pr), IMM(desc->pc), IMM(4)); // add sh2->pr, desc->pc, #4 (skip the current insn & delay slot) |
| 1612 | |
| 1613 | generate_update_cycles(block, compiler, MEM(&sh2->target), TRUE); // <subtract cycles> |
| 1614 | UML_HASHJMP(block, IMM(0), MEM(&sh2->target), sh2->nocode); // jmp target |
| 1615 | return TRUE; |
| 1616 | break; |
| 1617 | |
| 1618 | case 0x04: // MOVBS0(Rm, Rn); |
| 1619 | case 0x14: // MOVBS0(Rm, Rn); |
| 1620 | case 0x24: // MOVBS0(Rm, Rn); |
| 1621 | case 0x34: // MOVBS0(Rm, Rn); |
| 1622 | UML_ADD(block, IREG(0), R32(0), R32(Rn)); // add r0, R0, Rn |
| 1623 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1624 | UML_AND(block, IREG(1), IREG(1), IMM(0x000000ff)); // and r1, r1, 0xff |
| 1625 | UML_CALLH(block, sh2->write8); // call write8 |
| 1626 | |
| 1627 | if (!in_delay_slot) |
| 1628 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1629 | return TRUE; |
| 1630 | break; |
| 1631 | |
| 1632 | case 0x05: // MOVWS0(Rm, Rn); |
| 1633 | case 0x15: // MOVWS0(Rm, Rn); |
| 1634 | case 0x25: // MOVWS0(Rm, Rn); |
| 1635 | case 0x35: // MOVWS0(Rm, Rn); |
| 1636 | UML_ADD(block, IREG(0), R32(0), R32(Rn)); // add r0, R0, Rn |
| 1637 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1638 | UML_AND(block, IREG(1), IREG(1), IMM(0x0000ffff)); // and r1, r1, 0xffff |
| 1639 | UML_CALLH(block, sh2->write16); // call write16 |
| 1640 | |
| 1641 | if (!in_delay_slot) |
| 1642 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1643 | return TRUE; |
| 1644 | break; |
| 1645 | |
| 1646 | case 0x06: // MOVLS0(Rm, Rn); |
| 1647 | case 0x16: // MOVLS0(Rm, Rn); |
| 1648 | case 0x26: // MOVLS0(Rm, Rn); |
| 1649 | case 0x36: // MOVLS0(Rm, Rn); |
| 1650 | UML_ADD(block, IREG(0), R32(0), R32(Rn)); // add r0, R0, Rn |
| 1651 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1652 | UML_CALLH(block, sh2->write32); // call write32 |
| 1653 | |
| 1654 | if (!in_delay_slot) |
| 1655 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1656 | return TRUE; |
| 1657 | break; |
| 1658 | |
| 1659 | case 0x07: // MULL(Rm, Rn); |
| 1660 | case 0x17: // MULL(Rm, Rn); |
| 1661 | case 0x27: // MULL(Rm, Rn); |
| 1662 | case 0x37: // MULL(Rm, Rn); |
| 1663 | UML_MULU(block, MEM(&sh2->macl), MEM(&sh2->ea), R32(Rn), R32(Rm)); // mulu macl, ea, Rn, Rm |
| 1664 | return TRUE; |
| 1665 | break; |
| 1666 | |
| 1667 | case 0x08: // CLRT(); |
| 1668 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 1669 | return TRUE; |
| 1670 | break; |
| 1671 | |
| 1672 | case 0x0a: // STSMACH(Rn); |
| 1673 | UML_MOV(block, R32(Rn), MEM(&sh2->mach)); // mov Rn, mach |
| 1674 | return TRUE; |
| 1675 | break; |
| 1676 | |
| 1677 | case 0x0b: // RTS(); |
| 1678 | UML_MOV(block, MEM(&sh2->target), MEM(&sh2->pr)); // mov target, pr (in case of d-slot shenanigans) |
| 1679 | |
| 1680 | generate_delay_slot(block, compiler, desc); |
| 1681 | |
| 1682 | generate_update_cycles(block, compiler, MEM(&sh2->target), TRUE); // <subtract cycles> |
| 1683 | UML_HASHJMP(block, IMM(0), MEM(&sh2->target), sh2->nocode); |
| 1684 | return TRUE; |
| 1685 | break; |
| 1686 | |
| 1687 | case 0x0c: // MOVBL0(Rm, Rn); |
| 1688 | case 0x1c: // MOVBL0(Rm, Rn); |
| 1689 | case 0x2c: // MOVBL0(Rm, Rn); |
| 1690 | case 0x3c: // MOVBL0(Rm, Rn); |
| 1691 | UML_ADD(block, IREG(0), R32(0), R32(Rm)); // add r0, R0, Rm |
| 1692 | UML_CALLH(block, sh2->read8); // call read8 |
| 1693 | UML_SEXT(block, R32(Rn), IREG(0), BYTE); // sext Rn, r0, BYTE |
| 1694 | |
| 1695 | if (!in_delay_slot) |
| 1696 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1697 | return TRUE; |
| 1698 | break; |
| 1699 | |
| 1700 | case 0x0d: // MOVWL0(Rm, Rn); |
| 1701 | case 0x1d: // MOVWL0(Rm, Rn); |
| 1702 | case 0x2d: // MOVWL0(Rm, Rn); |
| 1703 | case 0x3d: // MOVWL0(Rm, Rn); |
| 1704 | UML_ADD(block, IREG(0), R32(0), R32(Rm)); // add r0, R0, Rm |
| 1705 | UML_CALLH(block, sh2->read16); // call read16 |
| 1706 | UML_SEXT(block, R32(Rn), IREG(0), WORD); // sext Rn, r0, WORD |
| 1707 | |
| 1708 | if (!in_delay_slot) |
| 1709 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1710 | return TRUE; |
| 1711 | break; |
| 1712 | |
| 1713 | case 0x0e: // MOVLL0(Rm, Rn); |
| 1714 | case 0x1e: // MOVLL0(Rm, Rn); |
| 1715 | case 0x2e: // MOVLL0(Rm, Rn); |
| 1716 | case 0x3e: // MOVLL0(Rm, Rn); |
| 1717 | UML_ADD(block, IREG(0), R32(0), R32(Rm)); // add r0, R0, Rm |
| 1718 | UML_CALLH(block, sh2->read32); // call read32 |
| 1719 | UML_MOV(block, R32(Rn), IREG(0)); // mov Rn, r0 |
| 1720 | |
| 1721 | if (!in_delay_slot) |
| 1722 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1723 | return TRUE; |
| 1724 | break; |
| 1725 | |
| 1726 | case 0x0f: // MAC_L(Rm, Rn); |
| 1727 | case 0x1f: // MAC_L(Rm, Rn); |
| 1728 | case 0x2f: // MAC_L(Rm, Rn); |
| 1729 | case 0x3f: // MAC_L(Rm, Rn); |
| 1730 | save_fast_iregs(block); |
| 1731 | UML_CALLC(block, cfunc_MAC_L, desc->opptr.w); |
| 1732 | load_fast_iregs(block); |
| 1733 | return TRUE; |
| 1734 | break; |
| 1735 | |
| 1736 | case 0x12: // STCGBR(Rn); |
| 1737 | UML_MOV(block, R32(Rn), MEM(&sh2->gbr)); // mov Rn, gbr |
| 1738 | return TRUE; |
| 1739 | break; |
| 1740 | |
| 1741 | case 0x18: // SETT(); |
| 1742 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 1743 | return TRUE; |
| 1744 | break; |
| 1745 | |
| 1746 | case 0x19: // DIV0U(); |
| 1747 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~(M|Q|T))); // and sr, sr, ~(M|Q|T) |
| 1748 | return TRUE; |
| 1749 | break; |
| 1750 | |
| 1751 | case 0x1a: // STSMACL(Rn); |
| 1752 | UML_MOV(block, R32(Rn), MEM(&sh2->macl)); // mov Rn, macl |
| 1753 | return TRUE; |
| 1754 | break; |
| 1755 | |
| 1756 | case 0x1b: // SLEEP(); |
| 1757 | // inlined special version of generate_update_cycles here |
| 1758 | // if an interrupt is taken, the return address is set to the next instruction |
| 1759 | UML_CALLC(block, cfunc_checkirqs, NULL); |
| 1760 | |
| 1761 | UML_MOV(block, IREG(0), MEM(&sh2->evec)); // mov r0, evec |
| 1762 | UML_CMP(block, IREG(0), IMM(0xffffffff)); // cmp r0, 0xffffffff |
| 1763 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz skip |
| 1764 | |
| 1765 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 1766 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 1767 | UML_MOV(block, IREG(1), MEM(&sh2->irqsr)); // mov r1, irqsr |
| 1768 | UML_CALLH(block, sh2->write32); // call write32 |
| 1769 | |
| 1770 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 1771 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 1772 | UML_MOV(block, IREG(1), IMM(desc->pc+2)); // mov r1, nextpc |
| 1773 | UML_CALLH(block, sh2->write32); // call write32 |
| 1774 | |
| 1775 | UML_HASHJMP(block, IMM(0), MEM(&sh2->evec), sh2->nocode); // hashjmp sh2->evec |
| 1776 | |
| 1777 | UML_LABEL(block, compiler->labelnum++); // skip: |
| 1778 | |
| 1779 | // now go "out of cycles" |
| 1780 | if (compiler->cycles > 0) |
| 1781 | { |
| 1782 | UML_MOV(block, MEM(&sh2->icount), IMM(0)); // mov icount, #0 |
| 1783 | UML_MAPVAR(block, MAPVAR_CYCLES, 0); // mapvar cycles,0 |
| 1784 | UML_EXH(block, sh2->out_of_cycles, IMM(desc->pc)); // go out of cycles |
| 1785 | } |
| 1786 | else |
| 1787 | { |
| 1788 | UML_HASHJMP(block, IMM(0), IMM(desc->pc), sh2->nocode); |
| 1789 | } |
| 1790 | |
| 1791 | return TRUE; |
| 1792 | break; |
| 1793 | |
| 1794 | case 0x22: // STCVBR(Rn); |
| 1795 | UML_MOV(block, R32(Rn), MEM(&sh2->vbr)); // mov Rn, vbr |
| 1796 | return TRUE; |
| 1797 | break; |
| 1798 | |
| 1799 | case 0x23: // BRAF(Rn); 0x40 + 9054 = 9098 |
| 1800 | UML_ADD(block, MEM(&sh2->target), R32(Rn), IMM(desc->pc+4)); // add target, Rn, pc+4 |
| 1801 | |
| 1802 | generate_delay_slot(block, compiler, desc); |
| 1803 | |
| 1804 | generate_update_cycles(block, compiler, MEM(&sh2->target), TRUE); // <subtract cycles> |
| 1805 | UML_HASHJMP(block, IMM(0), MEM(&sh2->target), sh2->nocode); // jmp target |
| 1806 | break; |
| 1807 | |
| 1808 | case 0x28: // CLRMAC(); |
| 1809 | UML_MOV(block, MEM(&sh2->macl), IMM(0)); // mov macl, #0 |
| 1810 | UML_MOV(block, MEM(&sh2->mach), IMM(0)); // mov mach, #0 |
| 1811 | return TRUE; |
| 1812 | break; |
| 1813 | |
| 1814 | case 0x29: // MOVT(Rn); |
| 1815 | UML_AND(block, R32(Rn), MEM(&sh2->sr), IMM(T)); // and Rn, sr, T |
| 1816 | return TRUE; |
| 1817 | break; |
| 1818 | |
| 1819 | case 0x2a: // STSPR(Rn); |
| 1820 | UML_MOV(block, R32(Rn), MEM(&sh2->pr)); // mov Rn, pr |
| 1821 | return TRUE; |
| 1822 | break; |
| 1823 | |
| 1824 | case 0x2b: // RTE(); |
| 1825 | generate_delay_slot(block, compiler, desc); |
| 1826 | |
| 1827 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 1828 | UML_CALLH(block, sh2->read32); // call read32 |
| 1829 | UML_MOV(block, MEM(&sh2->pc), IREG(0)); // mov pc, r0 |
| 1830 | UML_ADD(block, R32(15), R32(15), IMM(4)); // add R15, R15, #4 |
| 1831 | |
| 1832 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 1833 | UML_CALLH(block, sh2->read32); // call read32 |
| 1834 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sr, r0 |
| 1835 | UML_ADD(block, R32(15), R32(15), IMM(4)); // add R15, R15, #4 |
| 1836 | |
| 1837 | compiler->checkints = TRUE; |
| 1838 | UML_MOV(block, MEM(&sh2->ea), MEM(&sh2->pc)); // mov ea, pc |
| 1839 | generate_update_cycles(block, compiler, MEM(&sh2->ea), TRUE); // <subtract cycles> |
| 1840 | UML_HASHJMP(block, IMM(0), MEM(&sh2->pc), sh2->nocode); // and jump to the "resume PC" |
| 1841 | |
| 1842 | return TRUE; |
| 1843 | break; |
| 1844 | } |
| 1845 | |
| 1846 | return FALSE; |
| 1847 | } |
| 1848 | |
| 1849 | static int generate_group_2(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot) |
| 1850 | { |
| 1851 | switch (opcode & 15) |
| 1852 | { |
| 1853 | case 0: // MOVBS(Rm, Rn); |
| 1854 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 1855 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1856 | UML_AND(block, IREG(1), IREG(1), IMM(0xff)); // and r1, r1, 0xff |
| 1857 | UML_CALLH(block, sh2->write8); |
| 1858 | |
| 1859 | if (!in_delay_slot) |
| 1860 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1861 | return TRUE; |
| 1862 | break; |
| 1863 | |
| 1864 | case 1: // MOVWS(Rm, Rn); |
| 1865 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 1866 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1867 | UML_AND(block, IREG(1), IREG(1), IMM(0xffff)); // and r1, r1, 0xffff |
| 1868 | UML_CALLH(block, sh2->write16); |
| 1869 | |
| 1870 | if (!in_delay_slot) |
| 1871 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1872 | return TRUE; |
| 1873 | break; |
| 1874 | |
| 1875 | case 2: // MOVLS(Rm, Rn); |
| 1876 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 1877 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1878 | UML_CALLH(block, sh2->write32); |
| 1879 | |
| 1880 | if (!in_delay_slot) |
| 1881 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1882 | return TRUE; |
| 1883 | break; |
| 1884 | |
| 1885 | case 3: // NOP(); |
| 1886 | return TRUE; |
| 1887 | break; |
| 1888 | |
| 1889 | case 4: // MOVBM(Rm, Rn); |
| 1890 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1891 | UML_SUB(block, R32(Rn), R32(Rn), IMM(1)); // sub Rn, Rn, 1 |
| 1892 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 1893 | UML_CALLH(block, sh2->write8); // call write8 |
| 1894 | |
| 1895 | if (!in_delay_slot) |
| 1896 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1897 | return TRUE; |
| 1898 | break; |
| 1899 | |
| 1900 | case 5: // MOVWM(Rm, Rn); |
| 1901 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1902 | UML_SUB(block, R32(Rn), R32(Rn), IMM(2)); // sub Rn, Rn, 2 |
| 1903 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 1904 | UML_CALLH(block, sh2->write16); // call write16 |
| 1905 | |
| 1906 | if (!in_delay_slot) |
| 1907 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1908 | return TRUE; |
| 1909 | break; |
| 1910 | |
| 1911 | case 6: // MOVLM(Rm, Rn); |
| 1912 | UML_MOV(block, IREG(1), R32(Rm)); // mov r1, Rm |
| 1913 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, 4 |
| 1914 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 1915 | UML_CALLH(block, sh2->write32); // call write32 |
| 1916 | |
| 1917 | if (!in_delay_slot) |
| 1918 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 1919 | return TRUE; |
| 1920 | break; |
| 1921 | |
| 1922 | case 13: // XTRCT(Rm, Rn); |
| 1923 | UML_SHL(block, IREG(0), R32(Rm), IMM(16)); // shl r0, Rm, #16 |
| 1924 | UML_AND(block, IREG(0), IREG(0), IMM(0xffff0000)); // and r0, r0, #0xffff0000 |
| 1925 | |
| 1926 | UML_SHR(block, IREG(1), R32(Rn), IMM(16)); // shr, r1, Rn, #16 |
| 1927 | UML_AND(block, IREG(1), IREG(1), IMM(0xffff)); // and r1, r1, #0x0000ffff |
| 1928 | |
| 1929 | UML_OR(block, R32(Rn), IREG(0), IREG(1)); // or Rn, r0, r1 |
| 1930 | return TRUE; |
| 1931 | break; |
| 1932 | |
| 1933 | case 7: // DIV0S(Rm, Rn); |
| 1934 | UML_MOV(block, IREG(0), MEM(&sh2->sr)); // move r0, sr |
| 1935 | UML_AND(block, IREG(0), IREG(0), IMM(~(Q|M|T))); // and r0, r0, ~(Q|M|T) (clear the Q,M, and T bits) |
| 1936 | |
| 1937 | UML_TEST(block, R32(Rn), IMM(0x80000000)); // test Rn, #0x80000000 |
| 1938 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz labelnum |
| 1939 | |
| 1940 | UML_OR(block, IREG(0), IREG(0), IMM(Q)); // or r0, r0, Q |
| 1941 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 1942 | |
| 1943 | UML_TEST(block, R32(Rm), IMM(0x80000000)); // test Rm, #0x80000000 |
| 1944 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz labelnum |
| 1945 | |
| 1946 | UML_OR(block, IREG(0), IREG(0), IMM(M)); // or r0, r0, M |
| 1947 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 1948 | |
| 1949 | UML_XOR(block, IREG(1), R32(Rn), R32(Rm)); // xor r1, Rn, Rm |
| 1950 | UML_TEST(block, IREG(1), IMM(0x80000000)); // test r1, #0x80000000 |
| 1951 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz labelnum |
| 1952 | |
| 1953 | UML_OR(block, IREG(0), IREG(0), IMM(T)); // or r0, r0, T |
| 1954 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 1955 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sr, r0 |
| 1956 | return TRUE; |
| 1957 | break; |
| 1958 | |
| 1959 | case 8: // TST(Rm, Rn); |
| 1960 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 1961 | UML_TEST(block, R32(Rm), R32(Rn)); // test Rm, Rn |
| 1962 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jnz compiler->labelnum |
| 1963 | |
| 1964 | UML_OR(block, IREG(0), IREG(0), IMM(T)); // or r0, r0, T |
| 1965 | UML_LABEL(block, compiler->labelnum++); // desc->pc: |
| 1966 | |
| 1967 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sh2->sr, r0 |
| 1968 | return TRUE; |
| 1969 | break; |
| 1970 | |
| 1971 | case 12: // CMPSTR(Rm, Rn); |
| 1972 | UML_XOR(block, IREG(0), R32(Rn), R32(Rm)); // xor r0, Rn, Rm (temp) |
| 1973 | |
| 1974 | UML_SHR(block, IREG(1), IREG(0), IMM(24)); // shr r1, r0, #24 (HH) |
| 1975 | UML_AND(block, IREG(1), IREG(1), IMM(0xff)); // and r1, r1, #0xff |
| 1976 | |
| 1977 | UML_SHR(block, IREG(2), IREG(0), IMM(16)); // shr r2, r0, #16 (HL) |
| 1978 | UML_AND(block, IREG(2), IREG(2), IMM(0xff)); // and r2, r2, #0xff |
| 1979 | |
| 1980 | UML_SHR(block, IREG(3), IREG(0), IMM(8)); // shr r3, r0, #8 (LH) |
| 1981 | UML_AND(block, IREG(3), IREG(3), IMM(0xff)); // and r3, r3, #0xff |
| 1982 | |
| 1983 | UML_AND(block, IREG(7), IREG(0), IMM(0xff)); // and r7, r0, #0xff (LL) |
| 1984 | |
| 1985 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 1986 | |
| 1987 | UML_CMP(block, IREG(1), IMM(0)); // cmp r1, #0 |
| 1988 | UML_JMPc(block, IF_Z, compiler->labelnum); // jnz labelnum |
| 1989 | UML_CMP(block, IREG(2), IMM(0)); // cmp r2, #0 |
| 1990 | UML_JMPc(block, IF_Z, compiler->labelnum); // jnz labelnum |
| 1991 | UML_CMP(block, IREG(3), IMM(0)); // cmp r3, #0 |
| 1992 | UML_JMPc(block, IF_Z, compiler->labelnum); // jnz labelnum |
| 1993 | UML_CMP(block, IREG(7), IMM(0)); // cmp r7, #0 |
| 1994 | UML_JMPc(block, IF_NZ, compiler->labelnum+1); // jnz labelnum |
| 1995 | |
| 1996 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 1997 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 1998 | |
| 1999 | UML_LABEL(block, compiler->labelnum++); // labelnum+1: |
| 2000 | return TRUE; |
| 2001 | break; |
| 2002 | |
| 2003 | case 9: // AND(Rm, Rn); |
| 2004 | UML_AND(block, R32(Rn), R32(Rn), R32(Rm)); // and Rn, Rn, Rm |
| 2005 | return TRUE; |
| 2006 | break; |
| 2007 | |
| 2008 | case 10: // XOR(Rm, Rn); |
| 2009 | UML_XOR(block, R32(Rn), R32(Rn), R32(Rm)); // xor Rn, Rn, Rm |
| 2010 | return TRUE; |
| 2011 | break; |
| 2012 | |
| 2013 | case 11: // OR(Rm, Rn); |
| 2014 | UML_OR(block, R32(Rn), R32(Rn), R32(Rm)); // or Rn, Rn, Rm |
| 2015 | return TRUE; |
| 2016 | break; |
| 2017 | |
| 2018 | case 14: // MULU(Rm, Rn); |
| 2019 | UML_AND(block, IREG(0), R32(Rm), IMM(0xffff)); // and r0, Rm, 0xffff |
| 2020 | UML_AND(block, IREG(1), R32(Rn), IMM(0xffff)); // and r1, Rn, 0xffff |
| 2021 | UML_MULU(block, MEM(&sh2->macl), MEM(&sh2->ea), IREG(0), IREG(1)); // mulu macl, ea, r0, r1 |
| 2022 | return TRUE; |
| 2023 | break; |
| 2024 | |
| 2025 | case 15: // MULS(Rm, Rn); |
| 2026 | UML_SEXT(block, IREG(0), R32(Rm), WORD); // sext r0, Rm |
| 2027 | UML_SEXT(block, IREG(1), R32(Rn), WORD); // sext r1, Rn |
| 2028 | UML_MULS(block, MEM(&sh2->macl), MEM(&sh2->ea), IREG(0), IREG(1)); // muls macl, ea, r0, r1 |
| 2029 | return TRUE; |
| 2030 | break; |
| 2031 | } |
| 2032 | |
| 2033 | return FALSE; |
| 2034 | } |
| 2035 | |
| 2036 | static int generate_group_3(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode) |
| 2037 | { |
| 2038 | switch (opcode & 15) |
| 2039 | { |
| 2040 | case 0: // CMPEQ(Rm, Rn); (equality) |
| 2041 | UML_CMP(block, R32(Rn), R32(Rm)); // cmp Rn, Rm |
| 2042 | UML_SETc(block, IF_E, IREG(0)); // set E, r0 |
| 2043 | UML_ROLINS(block, MEM(&sh2->sr), IREG(0), IMM(0), IMM(1)); // rolins sr, r0, 0, 1 |
| 2044 | return TRUE; |
| 2045 | break; |
| 2046 | |
| 2047 | case 2: // CMPHS(Rm, Rn); (unsigned greater than or equal) |
| 2048 | UML_CMP(block, R32(Rn), R32(Rm)); // cmp Rn, Rm |
| 2049 | UML_SETc(block, IF_AE, IREG(0)); // set AE, r0 |
| 2050 | UML_ROLINS(block, MEM(&sh2->sr), IREG(0), IMM(0), IMM(1)); // rolins sr, r0, 0, 1 |
| 2051 | return TRUE; |
| 2052 | break; |
| 2053 | |
| 2054 | case 3: // CMPGE(Rm, Rn); (signed greater than or equal) |
| 2055 | UML_CMP(block, R32(Rn), R32(Rm)); // cmp Rn, Rm |
| 2056 | UML_SETc(block, IF_GE, IREG(0)); // set GE, r0 |
| 2057 | UML_ROLINS(block, MEM(&sh2->sr), IREG(0), IMM(0), IMM(1)); // rolins sr, r0, 0, 1 |
| 2058 | return TRUE; |
| 2059 | break; |
| 2060 | |
| 2061 | case 6: // CMPHI(Rm, Rn); (unsigned greater than) |
| 2062 | UML_CMP(block, R32(Rn), R32(Rm)); // cmp Rn, Rm |
| 2063 | UML_SETc(block, IF_A, IREG(0)); // set A, r0 |
| 2064 | UML_ROLINS(block, MEM(&sh2->sr), IREG(0), IMM(0), IMM(1)); // rolins sr, r0, 0, 1 |
| 2065 | return TRUE; |
| 2066 | break; |
| 2067 | |
| 2068 | case 7: // CMPGT(Rm, Rn); (signed greater than) |
| 2069 | UML_CMP(block, R32(Rn), R32(Rm)); // cmp Rn, Rm |
| 2070 | UML_SETc(block, IF_G, IREG(0)); // set G, r0 |
| 2071 | UML_ROLINS(block, MEM(&sh2->sr), IREG(0), IMM(0), IMM(1)); // rolins sr, r0, 0, 1 |
| 2072 | return TRUE; |
| 2073 | break; |
| 2074 | |
| 2075 | case 1: // NOP(); |
| 2076 | case 9: // NOP(); |
| 2077 | return TRUE; |
| 2078 | break; |
| 2079 | |
| 2080 | case 4: // DIV1(Rm, Rn); |
| 2081 | save_fast_iregs(block); |
| 2082 | UML_CALLC(block, cfunc_DIV1, desc->opptr.w); |
| 2083 | load_fast_iregs(block); |
| 2084 | return TRUE; |
| 2085 | break; |
| 2086 | |
| 2087 | case 5: // DMULU(Rm, Rn); |
| 2088 | UML_MULU(block, MEM(&sh2->macl), MEM(&sh2->mach), R32(Rn), R32(Rm)); |
| 2089 | return TRUE; |
| 2090 | break; |
| 2091 | |
| 2092 | case 13: // DMULS(Rm, Rn); |
| 2093 | UML_MULS(block, MEM(&sh2->macl), MEM(&sh2->mach), R32(Rn), R32(Rm)); |
| 2094 | return TRUE; |
| 2095 | break; |
| 2096 | |
| 2097 | case 8: // SUB(Rm, Rn); |
| 2098 | UML_SUB(block, R32(Rn), R32(Rn), R32(Rm)); // sub Rn, Rn, Rm |
| 2099 | return TRUE; |
| 2100 | break; |
| 2101 | |
| 2102 | case 12: // ADD(Rm, Rn); |
| 2103 | UML_ADD(block, R32(Rn), R32(Rn), R32(Rm)); // add Rn, Rn, Rm |
| 2104 | return TRUE; |
| 2105 | break; |
| 2106 | |
| 2107 | case 10: // SUBC(Rm, Rn); |
| 2108 | |
| 2109 | UML_MOV(block, IREG(0), MEM(&sh2->sr)); // mov r0, sr (save SR) |
| 2110 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2111 | UML_CARRY(block, IREG(0), IMM(0)); // carry = T (T is bit 0 of SR) |
| 2112 | UML_SUBB(block, R32(Rn), R32(Rn), R32(Rm)); // subb Rn, Rn, Rm |
| 2113 | |
| 2114 | UML_JMPc(block, IF_NC, compiler->labelnum); // jnc labelnum |
| 2115 | |
| 2116 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2117 | |
| 2118 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2119 | |
| 2120 | return TRUE; |
| 2121 | break; |
| 2122 | |
| 2123 | case 11: // SUBV(Rm, Rn); |
| 2124 | break; |
| 2125 | |
| 2126 | case 14: // ADDC(Rm, Rn); |
| 2127 | UML_MOV(block, IREG(0), MEM(&sh2->sr)); // mov r0, sr (save SR) |
| 2128 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2129 | UML_CARRY(block, IREG(0), IMM(0)); // carry = T (T is bit 0 of SR) |
| 2130 | UML_ADDC(block, R32(Rn), R32(Rn), R32(Rm)); // addc Rn, Rn, Rm |
| 2131 | UML_JMPc(block, IF_NC, compiler->labelnum); // jnc labelnum |
| 2132 | |
| 2133 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2134 | |
| 2135 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2136 | return TRUE; |
| 2137 | break; |
| 2138 | |
| 2139 | case 15: // ADDV(Rm, Rn); |
| 2140 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2141 | UML_ADD(block, R32(Rn), R32(Rn), R32(Rm)); // add Rn, Rn, Rm |
| 2142 | UML_JMPc(block, IF_NV, compiler->labelnum); // jnc labelnum |
| 2143 | |
| 2144 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2145 | |
| 2146 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2147 | return TRUE; |
| 2148 | break; |
| 2149 | } |
| 2150 | return FALSE; |
| 2151 | } |
| 2152 | |
| 2153 | static int generate_group_4(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot) |
| 2154 | { |
| 2155 | switch (opcode & 0x3F) |
| 2156 | { |
| 2157 | case 0x00: // SHLL(Rn); |
| 2158 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 2159 | UML_SHR(block, IREG(1), R32(Rn), IMM(31)); // shr r1, Rn, 31 |
| 2160 | UML_AND(block, IREG(1), IREG(1), IMM(T)); // and r1, r1, T |
| 2161 | UML_OR(block, MEM(&sh2->sr), IREG(1), IREG(0)); // or sr, r1, r0 |
| 2162 | UML_SHL(block, R32(Rn), R32(Rn), IMM(1)); // shl Rn, Rn, 1 |
| 2163 | return TRUE; |
| 2164 | break; |
| 2165 | |
| 2166 | case 0x01: // SHLR(Rn); |
| 2167 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 2168 | UML_AND(block, IREG(1), R32(Rn), IMM(T)); // and r1, Rn, T |
| 2169 | UML_OR(block, MEM(&sh2->sr), IREG(0), IREG(1)); // or sr, r0, r1 |
| 2170 | UML_SHR(block, R32(Rn), R32(Rn), IMM(1)); // shr Rn, Rn, 1 |
| 2171 | return TRUE; |
| 2172 | break; |
| 2173 | |
| 2174 | case 0x04: // ROTL(Rn); |
| 2175 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2176 | UML_CARRY(block, R32(Rn), IMM(31)); // carry = high bit of source |
| 2177 | UML_ROLC(block, R32(Rn), R32(Rn), IMM(1)); // rolc Rn, Rn, #1 |
| 2178 | |
| 2179 | UML_JMPc(block, IF_NC, compiler->labelnum); // jnc labelnum |
| 2180 | |
| 2181 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2182 | |
| 2183 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2184 | |
| 2185 | return TRUE; |
| 2186 | break; |
| 2187 | |
| 2188 | case 0x05: // ROTR(Rn); |
| 2189 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2190 | UML_CARRY(block, R32(Rn), IMM(0)); // carry = low bit of source |
| 2191 | UML_RORC(block, R32(Rn), R32(Rn), IMM(1)); // rorc Rn, Rn, #1 |
| 2192 | |
| 2193 | UML_JMPc(block, IF_NC, compiler->labelnum); // jnc labelnum |
| 2194 | |
| 2195 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2196 | |
| 2197 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2198 | |
| 2199 | return TRUE; |
| 2200 | break; |
| 2201 | |
| 2202 | case 0x02: // STSMMACH(Rn); |
| 2203 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, #4 |
| 2204 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2205 | UML_MOV(block, IREG(1), MEM(&sh2->mach)); // mov r1, mach |
| 2206 | SETEA(0); // set ea for debug |
| 2207 | UML_CALLH(block, sh2->write32); // call write32 |
| 2208 | |
| 2209 | if (!in_delay_slot) |
| 2210 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2211 | return TRUE; |
| 2212 | break; |
| 2213 | |
| 2214 | case 0x03: // STCMSR(Rn); |
| 2215 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, #4 |
| 2216 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2217 | UML_MOV(block, IREG(1), MEM(&sh2->sr)); // mov r1, sr |
| 2218 | SETEA(0); // set ea for debug |
| 2219 | UML_CALLH(block, sh2->write32); // call write32 |
| 2220 | |
| 2221 | if (!in_delay_slot) |
| 2222 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2223 | return TRUE; |
| 2224 | break; |
| 2225 | |
| 2226 | case 0x06: // LDSMMACH(Rn); |
| 2227 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2228 | SETEA(0); |
| 2229 | UML_CALLH(block, sh2->read32); // call read32 |
| 2230 | UML_ADD(block, R32(Rn), R32(Rn), IMM(4)); // add Rn, #4 |
| 2231 | UML_MOV(block, MEM(&sh2->mach), IREG(0)); // mov mach, r0 |
| 2232 | |
| 2233 | if (!in_delay_slot) |
| 2234 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2235 | return TRUE; |
| 2236 | break; |
| 2237 | |
| 2238 | case 0x07: // LDCMSR(Rn); |
| 2239 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2240 | SETEA(0); |
| 2241 | UML_CALLH(block, sh2->read32); // call read32 |
| 2242 | UML_ADD(block, R32(Rn), R32(Rn), IMM(4)); // add Rn, #4 |
| 2243 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sr, r0 |
| 2244 | |
| 2245 | compiler->checkints = TRUE; |
| 2246 | if (!in_delay_slot) |
| 2247 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2248 | return TRUE; |
| 2249 | break; |
| 2250 | |
| 2251 | case 0x08: // SHLL2(Rn); |
| 2252 | UML_SHL(block, R32(Rn), R32(Rn), IMM(2)); |
| 2253 | return TRUE; |
| 2254 | break; |
| 2255 | |
| 2256 | case 0x09: // SHLR2(Rn); |
| 2257 | UML_SHR(block, R32(Rn), R32(Rn), IMM(2)); |
| 2258 | return TRUE; |
| 2259 | break; |
| 2260 | |
| 2261 | case 0x18: // SHLL8(Rn); |
| 2262 | UML_SHL(block, R32(Rn), R32(Rn), IMM(8)); |
| 2263 | return TRUE; |
| 2264 | break; |
| 2265 | |
| 2266 | case 0x19: // SHLR8(Rn); |
| 2267 | UML_SHR(block, R32(Rn), R32(Rn), IMM(8)); |
| 2268 | return TRUE; |
| 2269 | break; |
| 2270 | |
| 2271 | case 0x28: // SHLL16(Rn); |
| 2272 | UML_SHL(block, R32(Rn), R32(Rn), IMM(16)); |
| 2273 | return TRUE; |
| 2274 | break; |
| 2275 | |
| 2276 | case 0x29: // SHLR16(Rn); |
| 2277 | UML_SHR(block, R32(Rn), R32(Rn), IMM(16)); |
| 2278 | return TRUE; |
| 2279 | break; |
| 2280 | |
| 2281 | case 0x0a: // LDSMACH(Rn); |
| 2282 | UML_MOV(block, MEM(&sh2->mach), R32(Rn)); // mov mach, Rn |
| 2283 | return TRUE; |
| 2284 | break; |
| 2285 | |
| 2286 | case 0x0b: // JSR(Rn); |
| 2287 | UML_MOV(block, MEM(&sh2->target), R32(Rn)); // mov target, Rn |
| 2288 | |
| 2289 | generate_delay_slot(block, compiler, desc); |
| 2290 | |
| 2291 | UML_ADD(block, MEM(&sh2->pr), IMM(desc->pc), IMM(4)); // add sh2->pr, desc->pc, #4 (skip the current insn & delay slot) |
| 2292 | |
| 2293 | generate_update_cycles(block, compiler, MEM(&sh2->target), TRUE); // <subtract cycles> |
| 2294 | UML_HASHJMP(block, IMM(0), MEM(&sh2->target), sh2->nocode); // and do the jump |
| 2295 | return TRUE; |
| 2296 | break; |
| 2297 | |
| 2298 | case 0x0e: // LDCSR(Rn); |
| 2299 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2300 | UML_AND(block, IREG(0), IREG(0), IMM(FLAGS)); // and r0, r0, FLAGS |
| 2301 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); |
| 2302 | |
| 2303 | compiler->checkints = TRUE; |
| 2304 | return TRUE; |
| 2305 | break; |
| 2306 | |
| 2307 | case 0x0f: // MAC_W(Rm, Rn); |
| 2308 | case 0x1f: // MAC_W(Rm, Rn); |
| 2309 | case 0x2f: // MAC_W(Rm, Rn); |
| 2310 | case 0x3f: // MAC_W(Rm, Rn); |
| 2311 | save_fast_iregs(block); |
| 2312 | UML_CALLC(block, cfunc_MAC_W, desc->opptr.w); |
| 2313 | load_fast_iregs(block); |
| 2314 | return TRUE; |
| 2315 | break; |
| 2316 | |
| 2317 | case 0x10: // DT(Rn); |
| 2318 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 2319 | UML_SUB(block, R32(Rn), R32(Rn), IMM(1)); // sub Rn, Rn, 1 |
| 2320 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jz compiler->labelnum |
| 2321 | |
| 2322 | UML_OR(block, IREG(0), IREG(0), IMM(T)); // or r0, r0, T |
| 2323 | UML_LABEL(block, compiler->labelnum++); // desc->pc: |
| 2324 | |
| 2325 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sh2->sr, r0 |
| 2326 | return TRUE; |
| 2327 | break; |
| 2328 | |
| 2329 | case 0x11: // CMPPZ(Rn); |
| 2330 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 2331 | |
| 2332 | UML_CMP(block, R32(Rn), IMM(0)); // cmp Rn, 0 |
| 2333 | UML_JMPc(block, IF_S, compiler->labelnum); // js compiler->labelnum (if negative) |
| 2334 | |
| 2335 | UML_OR(block, IREG(0), IREG(0), IMM(T)); // or r0, r0, T |
| 2336 | UML_LABEL(block, compiler->labelnum++); // desc->pc: |
| 2337 | |
| 2338 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sh2->sr, r0 |
| 2339 | return TRUE; |
| 2340 | break; |
| 2341 | |
| 2342 | case 0x15: // CMPPL(Rn); |
| 2343 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 2344 | |
| 2345 | UML_CMP(block, R32(Rn), IMM(0)); // cmp Rn, 0 |
| 2346 | |
| 2347 | UML_JMPc(block, IF_S, compiler->labelnum); // js compiler->labelnum (if negative) |
| 2348 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz compiler->labelnum (if zero) |
| 2349 | |
| 2350 | UML_OR(block, IREG(0), IREG(0), IMM(T)); // or r0, r0, T |
| 2351 | |
| 2352 | UML_LABEL(block, compiler->labelnum++); // desc->pc: |
| 2353 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sh2->sr, r0 |
| 2354 | return TRUE; |
| 2355 | break; |
| 2356 | |
| 2357 | case 0x12: // STSMMACL(Rn); |
| 2358 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, #4 |
| 2359 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2360 | UML_MOV(block, IREG(1), MEM(&sh2->macl)); // mov r1, macl |
| 2361 | SETEA(0); // set ea for debug |
| 2362 | UML_CALLH(block, sh2->write32); // call write32 |
| 2363 | |
| 2364 | if (!in_delay_slot) |
| 2365 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2366 | return TRUE; |
| 2367 | break; |
| 2368 | |
| 2369 | case 0x13: // STCMGBR(Rn); |
| 2370 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, #4 |
| 2371 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2372 | UML_MOV(block, IREG(1), MEM(&sh2->gbr)); // mov r1, gbr |
| 2373 | SETEA(0); // set ea for debug |
| 2374 | UML_CALLH(block, sh2->write32); // call write32 |
| 2375 | |
| 2376 | if (!in_delay_slot) |
| 2377 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2378 | return TRUE; |
| 2379 | break; |
| 2380 | |
| 2381 | case 0x16: // LDSMMACL(Rn); |
| 2382 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2383 | SETEA(0); |
| 2384 | UML_CALLH(block, sh2->read32); // call read32 |
| 2385 | UML_ADD(block, R32(Rn), R32(Rn), IMM(4)); // add Rn, #4 |
| 2386 | UML_MOV(block, MEM(&sh2->macl), IREG(0)); // mov macl, r0 |
| 2387 | |
| 2388 | if (!in_delay_slot) |
| 2389 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2390 | return TRUE; |
| 2391 | break; |
| 2392 | |
| 2393 | case 0x17: // LDCMGBR(Rn); |
| 2394 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2395 | SETEA(0); |
| 2396 | UML_CALLH(block, sh2->read32); // call read32 |
| 2397 | UML_ADD(block, R32(Rn), R32(Rn), IMM(4)); // add Rn, #4 |
| 2398 | UML_MOV(block, MEM(&sh2->gbr), IREG(0)); // mov gbr, r0 |
| 2399 | |
| 2400 | if (!in_delay_slot) |
| 2401 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2402 | return TRUE; |
| 2403 | break; |
| 2404 | |
| 2405 | case 0x1a: // LDSMACL(Rn); |
| 2406 | UML_MOV(block, MEM(&sh2->macl), R32(Rn)); // mov macl, Rn |
| 2407 | return TRUE; |
| 2408 | break; |
| 2409 | |
| 2410 | case 0x1b: // TAS(Rn); |
| 2411 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2412 | SETEA(0); |
| 2413 | UML_CALLH(block, sh2->read8); // call read8 |
| 2414 | |
| 2415 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T |
| 2416 | |
| 2417 | UML_CMP(block, IREG(0), IMM(0)); // cmp r0, #0 |
| 2418 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jnz labelnum |
| 2419 | |
| 2420 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2421 | |
| 2422 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2423 | |
| 2424 | UML_OR(block, IREG(1), IREG(0), IMM(0x80)); // or r1, r0, #0x80 |
| 2425 | |
| 2426 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2427 | UML_CALLH(block, sh2->write8); // write the value back |
| 2428 | |
| 2429 | if (!in_delay_slot) |
| 2430 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2431 | return TRUE; |
| 2432 | break; |
| 2433 | |
| 2434 | case 0x1e: // LDCGBR(Rn); |
| 2435 | UML_MOV(block, MEM(&sh2->gbr), R32(Rn)); // mov gbr, Rn |
| 2436 | return TRUE; |
| 2437 | break; |
| 2438 | |
| 2439 | case 0x20: // SHAL(Rn); |
| 2440 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T |
| 2441 | UML_SHR(block, IREG(0), R32(Rn), IMM(31)); // shr r0, Rn, 31 |
| 2442 | UML_AND(block, IREG(0), IREG(0), IMM(T)); // and r0, r0, T |
| 2443 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IREG(0)); // or sr, sr, r0 |
| 2444 | UML_SHL(block, R32(Rn), R32(Rn), IMM(1)); // shl Rn, Rn, 1 |
| 2445 | return TRUE; |
| 2446 | break; |
| 2447 | |
| 2448 | case 0x21: // SHAR(Rn); |
| 2449 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T |
| 2450 | UML_AND(block, IREG(0), R32(Rn), IMM(T)); // and r0, Rn, T |
| 2451 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IREG(0)); // or sr, sr, r0 |
| 2452 | UML_SAR(block, R32(Rn), R32(Rn), IMM(1)); // sar Rn, Rn, 1 |
| 2453 | return TRUE; |
| 2454 | break; |
| 2455 | |
| 2456 | case 0x22: // STSMPR(Rn); |
| 2457 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, 4 |
| 2458 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2459 | SETEA(0); |
| 2460 | UML_MOV(block, IREG(1), MEM(&sh2->pr)); // mov r1, pr |
| 2461 | UML_CALLH(block, sh2->write32); // call write32 |
| 2462 | |
| 2463 | if (!in_delay_slot) |
| 2464 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2465 | return TRUE; |
| 2466 | break; |
| 2467 | |
| 2468 | case 0x23: // STCMVBR(Rn); |
| 2469 | UML_SUB(block, R32(Rn), R32(Rn), IMM(4)); // sub Rn, Rn, 4 |
| 2470 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2471 | SETEA(0); |
| 2472 | UML_MOV(block, IREG(1), MEM(&sh2->vbr)); // mov r1, vbr |
| 2473 | UML_CALLH(block, sh2->write32); // call write32 |
| 2474 | |
| 2475 | if (!in_delay_slot) |
| 2476 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2477 | return TRUE; |
| 2478 | break; |
| 2479 | |
| 2480 | case 0x24: // ROTCL(Rn); |
| 2481 | UML_SHR(block, IREG(0), R32(Rn), IMM(31)); // shr r0, Rn, 31 |
| 2482 | UML_AND(block, IREG(0), IREG(0), IMM(T)); // and r0, r0, T |
| 2483 | |
| 2484 | UML_AND(block, IREG(1), MEM(&sh2->sr), IMM(T)); // and r1, sr, T |
| 2485 | |
| 2486 | UML_SHL(block, R32(Rn), R32(Rn), IMM(1)); // shl Rn, Rn, 1 |
| 2487 | UML_OR(block, R32(Rn), R32(Rn), IREG(1)); // or Rn, Rn, r1 |
| 2488 | |
| 2489 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T |
| 2490 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IREG(0)); // or sr, sr, r0 |
| 2491 | return TRUE; |
| 2492 | break; |
| 2493 | |
| 2494 | case 0x25: // ROTCR(Rn); |
| 2495 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(T)); // and r0, sr, T |
| 2496 | UML_SHL(block, IREG(0), IREG(0), IMM(31)); // shl r0, r0, #31 (r0 = temp) |
| 2497 | |
| 2498 | UML_AND(block, IREG(1), R32(Rn), IMM(T)); // and r1, Rn, T (r1 = Rn & T) |
| 2499 | |
| 2500 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T |
| 2501 | |
| 2502 | UML_CMP(block, IREG(1), IMM(0)); // cmp r1, #0 |
| 2503 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz labelnum |
| 2504 | |
| 2505 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2506 | |
| 2507 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2508 | |
| 2509 | UML_SHR(block, R32(Rn), R32(Rn), IMM(1)); // shr Rn, Rn, #1 |
| 2510 | UML_OR(block, R32(Rn), R32(Rn), IREG(0)); // or Rn, Rn, r0 |
| 2511 | return TRUE; |
| 2512 | break; |
| 2513 | |
| 2514 | case 0x26: // LDSMPR(Rn); |
| 2515 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2516 | SETEA(0); |
| 2517 | UML_CALLH(block, sh2->read32); // call read32 |
| 2518 | UML_MOV(block, MEM(&sh2->pr), IREG(0)); // mov sh2->pr, r0 |
| 2519 | UML_ADD(block, R32(Rn), R32(Rn), IMM(4)); // add Rn, Rn, #4 |
| 2520 | |
| 2521 | if (!in_delay_slot) |
| 2522 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2523 | return TRUE; |
| 2524 | break; |
| 2525 | |
| 2526 | case 0x27: // LDCMVBR(Rn); |
| 2527 | UML_MOV(block, IREG(0), R32(Rn)); // mov r0, Rn |
| 2528 | SETEA(0); |
| 2529 | UML_CALLH(block, sh2->read32); // call read32 |
| 2530 | UML_MOV(block, MEM(&sh2->vbr), IREG(0)); // mov sh2->vbr, r0 |
| 2531 | UML_ADD(block, R32(Rn), R32(Rn), IMM(4)); // add Rn, Rn, #4 |
| 2532 | |
| 2533 | if (!in_delay_slot) |
| 2534 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2535 | return TRUE; |
| 2536 | break; |
| 2537 | |
| 2538 | case 0x2a: // LDSPR(Rn); |
| 2539 | UML_MOV(block, MEM(&sh2->pr), R32(Rn)); // mov sh2->pr, Rn |
| 2540 | return TRUE; |
| 2541 | break; |
| 2542 | |
| 2543 | case 0x2b: // JMP(Rn); |
| 2544 | UML_MOV(block, MEM(&sh2->target), R32(Rn)); // mov target, Rn |
| 2545 | |
| 2546 | generate_delay_slot(block, compiler, desc); |
| 2547 | |
| 2548 | generate_update_cycles(block, compiler, MEM(&sh2->target), TRUE); // <subtract cycles> |
| 2549 | UML_HASHJMP(block, IMM(0), MEM(&sh2->target), sh2->nocode); // jmp (target) |
| 2550 | return TRUE; |
| 2551 | break; |
| 2552 | |
| 2553 | case 0x2e: // LDCVBR(Rn); |
| 2554 | UML_MOV(block, MEM(&sh2->vbr), R32(Rn)); // mov vbr, Rn |
| 2555 | return TRUE; |
| 2556 | break; |
| 2557 | |
| 2558 | case 0x0c: // NOP(); |
| 2559 | case 0x0d: // NOP(); |
| 2560 | case 0x14: // NOP(); |
| 2561 | case 0x1c: // NOP(); |
| 2562 | case 0x1d: // NOP(); |
| 2563 | case 0x2c: // NOP(); |
| 2564 | case 0x2d: // NOP(); |
| 2565 | case 0x30: // NOP(); |
| 2566 | case 0x31: // NOP(); |
| 2567 | case 0x32: // NOP(); |
| 2568 | case 0x33: // NOP(); |
| 2569 | case 0x34: // NOP(); |
| 2570 | case 0x35: // NOP(); |
| 2571 | case 0x36: // NOP(); |
| 2572 | case 0x37: // NOP(); |
| 2573 | case 0x38: // NOP(); |
| 2574 | case 0x39: // NOP(); |
| 2575 | case 0x3a: // NOP(); |
| 2576 | case 0x3b: // NOP(); |
| 2577 | case 0x3c: // NOP(); |
| 2578 | case 0x3d: // NOP(); |
| 2579 | case 0x3e: // NOP(); |
| 2580 | return TRUE; |
| 2581 | break; |
| 2582 | |
| 2583 | } |
| 2584 | |
| 2585 | return FALSE; |
| 2586 | } |
| 2587 | |
| 2588 | static int generate_group_6(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot) |
| 2589 | { |
| 2590 | switch (opcode & 15) |
| 2591 | { |
| 2592 | case 0: // MOVBL(Rm, Rn); |
| 2593 | UML_MOV(block, IREG(0), R32(Rm)); // mov r0, Rm |
| 2594 | SETEA(0); // debug: ea = r0 |
| 2595 | UML_CALLH(block, sh2->read8); // call read8 |
| 2596 | UML_SEXT(block, R32(Rn), IREG(0), BYTE); // sext Rn, r0, BYTE |
| 2597 | |
| 2598 | if (!in_delay_slot) |
| 2599 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2600 | return TRUE; |
| 2601 | break; |
| 2602 | |
| 2603 | case 1: // MOVWL(Rm, Rn); |
| 2604 | UML_MOV(block, IREG(0), R32(Rm)); // mov r0, Rm |
| 2605 | SETEA(0); // debug: ea = r0 |
| 2606 | UML_CALLH(block, sh2->read16); // call read16 |
| 2607 | UML_SEXT(block, R32(Rn), IREG(0), WORD); // sext Rn, r0, WORD |
| 2608 | |
| 2609 | if (!in_delay_slot) |
| 2610 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2611 | return TRUE; |
| 2612 | break; |
| 2613 | |
| 2614 | case 2: // MOVLL(Rm, Rn); |
| 2615 | UML_MOV(block, IREG(0), R32(Rm)); // mov r0, Rm |
| 2616 | SETEA(0); // debug: ea = r0 |
| 2617 | UML_CALLH(block, sh2->read32); // call read32 |
| 2618 | UML_MOV(block, R32(Rn), IREG(0)); // mov Rn, r0 |
| 2619 | |
| 2620 | if (!in_delay_slot) |
| 2621 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2622 | return TRUE; |
| 2623 | break; |
| 2624 | |
| 2625 | case 3: // MOV(Rm, Rn); |
| 2626 | UML_MOV(block, R32(Rn), R32(Rm)); // mov Rn, Rm |
| 2627 | return TRUE; |
| 2628 | break; |
| 2629 | |
| 2630 | case 7: // NOT(Rm, Rn); |
| 2631 | UML_XOR(block, R32(Rn), R32(Rm), IMM(0xffffffff)); // xor Rn, Rm, 0xffffffff |
| 2632 | return TRUE; |
| 2633 | break; |
| 2634 | |
| 2635 | case 9: // SWAPW(Rm, Rn); |
| 2636 | UML_ROL(block, R32(Rn), R32(Rm), IMM(16)); // rol Rn, Rm, 16 |
| 2637 | return TRUE; |
| 2638 | break; |
| 2639 | |
| 2640 | case 11: // NEG(Rm, Rn); |
| 2641 | UML_SUB(block, R32(Rn), IMM(0), R32(Rm)); // sub Rn, 0, Rm |
| 2642 | return TRUE; |
| 2643 | break; |
| 2644 | |
| 2645 | case 12: // EXTUB(Rm, Rn); |
| 2646 | UML_AND(block, R32(Rn), R32(Rm), IMM(0x000000ff)); // and Rn, Rm, 0xff |
| 2647 | return TRUE; |
| 2648 | break; |
| 2649 | |
| 2650 | case 13: // EXTUW(Rm, Rn); |
| 2651 | UML_AND(block, R32(Rn), R32(Rm), IMM(0x0000ffff)); // and Rn, Rm, 0xffff |
| 2652 | return TRUE; |
| 2653 | break; |
| 2654 | |
| 2655 | case 14: // EXTSB(Rm, Rn); |
| 2656 | UML_SEXT(block, R32(Rn), R32(Rm), BYTE); // sext Rn, Rm, BYTE |
| 2657 | return TRUE; |
| 2658 | break; |
| 2659 | |
| 2660 | case 15: // EXTSW(Rm, Rn); |
| 2661 | UML_SEXT(block, R32(Rn), R32(Rm), WORD); // sext Rn, Rm, WORD |
| 2662 | return TRUE; |
| 2663 | break; |
| 2664 | |
| 2665 | case 4: // MOVBP(Rm, Rn); |
| 2666 | UML_MOV(block, IREG(0), R32(Rm)); // mov r0, Rm |
| 2667 | UML_CALLH(block, sh2->read8); // call read8 |
| 2668 | UML_SEXT(block, R32(Rn), IREG(0), BYTE); // sext Rn, r0, BYTE |
| 2669 | |
| 2670 | UML_CMP(block, IMM(Rn), IMM(Rm)); // cmp N, M |
| 2671 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz compiler->labelnum |
| 2672 | |
| 2673 | UML_ADD(block, R32(Rm), R32(Rm), IMM(1)); // add Rm, Rm, #1 |
| 2674 | |
| 2675 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2676 | |
| 2677 | if (!in_delay_slot) |
| 2678 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2679 | return TRUE; |
| 2680 | break; |
| 2681 | |
| 2682 | case 5: // MOVWP(Rm, Rn); |
| 2683 | UML_MOV(block, IREG(0), R32(Rm)); // mov r0, Rm |
| 2684 | UML_CALLH(block, sh2->read16); // call read16 |
| 2685 | UML_SEXT(block, R32(Rn), IREG(0), WORD); // sext Rn, r0, WORD |
| 2686 | |
| 2687 | UML_CMP(block, IMM(Rn), IMM(Rm)); // cmp N, M |
| 2688 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz compiler->labelnum |
| 2689 | |
| 2690 | UML_ADD(block, R32(Rm), R32(Rm), IMM(2)); // add Rm, Rm, #2 |
| 2691 | |
| 2692 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2693 | |
| 2694 | if (!in_delay_slot) |
| 2695 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2696 | return TRUE; |
| 2697 | break; |
| 2698 | |
| 2699 | case 6: // MOVLP(Rm, Rn); |
| 2700 | UML_MOV(block, IREG(0), R32(Rm)); // mov r0, Rm |
| 2701 | UML_CALLH(block, sh2->read32); // call read32 |
| 2702 | UML_MOV(block, R32(Rn), IREG(0)); // mov Rn, r0 |
| 2703 | |
| 2704 | UML_CMP(block, IMM(Rn), IMM(Rm)); // cmp N, M |
| 2705 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz compiler->labelnum |
| 2706 | |
| 2707 | UML_ADD(block, R32(Rm), R32(Rm), IMM(4)); // add Rm, Rm, #4 |
| 2708 | |
| 2709 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2710 | |
| 2711 | if (!in_delay_slot) |
| 2712 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2713 | return TRUE; |
| 2714 | break; |
| 2715 | |
| 2716 | case 8: // SWAPB(Rm, Rn); |
| 2717 | UML_AND(block, IREG(0), R32(Rm), IMM(0xffff0000)); // and r0, Rm, #0xffff0000 |
| 2718 | UML_AND(block, IREG(1), R32(Rm), IMM(0x000000ff)); // and r0, Rm, #0x000000ff |
| 2719 | UML_AND(block, IREG(2), R32(Rm), IMM(0x0000ff00)); // and r0, Rm, #0x0000ff00 |
| 2720 | UML_SHL(block, IREG(1), IREG(1), IMM(8)); // shl r1, r1, #8 |
| 2721 | UML_SHR(block, IREG(2), IREG(2), IMM(8)); // shr r2, r2, #8 |
| 2722 | UML_OR(block, IREG(0), IREG(0), IREG(1)); // or r0, r0, r1 |
| 2723 | UML_OR(block, R32(Rn), IREG(0), IREG(2)); // or Rn, r0, r2 |
| 2724 | return TRUE; |
| 2725 | break; |
| 2726 | |
| 2727 | case 10: // NEGC(Rm, Rn); |
| 2728 | UML_MOV(block, IREG(0), MEM(&sh2->sr)); // mov r0, sr (save SR) |
| 2729 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2730 | UML_CARRY(block, IREG(0), IMM(0)); // carry = T (T is bit 0 of SR) |
| 2731 | UML_SUBB(block, R32(Rn), IMM(0), R32(Rm)); // subb Rn, #0, Rm |
| 2732 | |
| 2733 | UML_JMPc(block, IF_NC, compiler->labelnum); // jnc labelnum |
| 2734 | |
| 2735 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 2736 | |
| 2737 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2738 | |
| 2739 | return TRUE; |
| 2740 | break; |
| 2741 | } |
| 2742 | |
| 2743 | return FALSE; |
| 2744 | } |
| 2745 | |
| 2746 | static int generate_group_8(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot) |
| 2747 | { |
| 2748 | INT32 disp; |
| 2749 | UINT32 udisp; |
| 2750 | drcuml_codelabel templabel; |
| 2751 | |
| 2752 | switch ( opcode & (15<<8) ) |
| 2753 | { |
| 2754 | case 0 << 8: // MOVBS4(opcode & 0x0f, Rm); |
| 2755 | udisp = (opcode & 0x0f); |
| 2756 | UML_ADD(block, IREG(0), R32(Rm), IMM(udisp)); // add r0, Rm, udisp |
| 2757 | UML_MOV(block, IREG(1), R32(0)); // mov r1, R0 |
| 2758 | UML_CALLH(block, sh2->write8); // call write8 |
| 2759 | |
| 2760 | if (!in_delay_slot) |
| 2761 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2762 | return TRUE; |
| 2763 | break; |
| 2764 | |
| 2765 | case 1 << 8: // MOVWS4(opcode & 0x0f, Rm); |
| 2766 | udisp = (opcode & 0x0f) * 2; |
| 2767 | UML_ADD(block, IREG(0), R32(Rm), IMM(udisp)); // add r0, Rm, udisp |
| 2768 | UML_MOV(block, IREG(1), R32(0)); // mov r1, R0 |
| 2769 | UML_CALLH(block, sh2->write16); // call write16 |
| 2770 | |
| 2771 | if (!in_delay_slot) |
| 2772 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2773 | return TRUE; |
| 2774 | break; |
| 2775 | |
| 2776 | case 2<< 8: // NOP(); |
| 2777 | case 3<< 8: // NOP(); |
| 2778 | case 6<< 8: // NOP(); |
| 2779 | case 7<< 8: // NOP(); |
| 2780 | case 10<< 8: // NOP(); |
| 2781 | case 12<< 8: // NOP(); |
| 2782 | case 14<< 8: // NOP(); |
| 2783 | return TRUE; |
| 2784 | break; |
| 2785 | |
| 2786 | case 4<< 8: // MOVBL4(Rm, opcode & 0x0f); |
| 2787 | udisp = opcode & 0x0f; |
| 2788 | UML_ADD(block, IREG(0), R32(Rm), IMM(udisp)); // add r0, Rm, udisp |
| 2789 | SETEA(0); |
| 2790 | UML_CALLH(block, sh2->read8); // call read8 |
| 2791 | UML_SEXT(block, R32(0), IREG(0), BYTE); // sext R0, r0, BYTE |
| 2792 | |
| 2793 | if (!in_delay_slot) |
| 2794 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2795 | return TRUE; |
| 2796 | break; |
| 2797 | |
| 2798 | case 5<< 8: // MOVWL4(Rm, opcode & 0x0f); |
| 2799 | udisp = (opcode & 0x0f)*2; |
| 2800 | UML_ADD(block, IREG(0), R32(Rm), IMM(udisp)); // add r0, Rm, udisp |
| 2801 | SETEA(0); |
| 2802 | UML_CALLH(block, sh2->read16); // call read16 |
| 2803 | UML_SEXT(block, R32(0), IREG(0), WORD); // sext R0, r0, WORD |
| 2804 | |
| 2805 | if (!in_delay_slot) |
| 2806 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2807 | return TRUE; |
| 2808 | break; |
| 2809 | |
| 2810 | case 8<< 8: // CMPIM(opcode & 0xff); |
| 2811 | UML_AND(block, IREG(0), MEM(&sh2->sr), IMM(~T)); // and r0, sr, ~T (clear the T bit) |
| 2812 | |
| 2813 | UML_SEXT(block, IREG(1), IMM(opcode&0xff), BYTE); // sext r1, opcode&0xff, BYTE |
| 2814 | UML_CMP(block, IREG(1), R32(0)); // cmp r1, R0 |
| 2815 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jnz compiler->labelnum (if negative) |
| 2816 | |
| 2817 | UML_OR(block, IREG(0), IREG(0), IMM(T)); // or r0, r0, T |
| 2818 | |
| 2819 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2820 | UML_MOV(block, MEM(&sh2->sr), IREG(0)); // mov sh2->sr, r0 |
| 2821 | return TRUE; |
| 2822 | break; |
| 2823 | |
| 2824 | case 9<< 8: // BT(opcode & 0xff); |
| 2825 | UML_TEST(block, MEM(&sh2->sr), IMM(T)); // test sh2->sr, T |
| 2826 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz compiler->labelnum |
| 2827 | |
| 2828 | disp = ((INT32)opcode << 24) >> 24; |
| 2829 | sh2->ea = (desc->pc + 2) + disp * 2 + 2; // sh2->ea = destination |
| 2830 | |
| 2831 | generate_update_cycles(block, compiler, IMM(sh2->ea), TRUE); // <subtract cycles> |
| 2832 | UML_HASHJMP(block, IMM(0), IMM(sh2->ea), sh2->nocode); // jmp sh2->ea |
| 2833 | |
| 2834 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2835 | return TRUE; |
| 2836 | break; |
| 2837 | |
| 2838 | case 11<< 8: // BF(opcode & 0xff); |
| 2839 | UML_TEST(block, MEM(&sh2->sr), IMM(T)); // test sh2->sr, T |
| 2840 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jnz compiler->labelnum |
| 2841 | |
| 2842 | disp = ((INT32)opcode << 24) >> 24; |
| 2843 | sh2->ea = (desc->pc + 2) + disp * 2 + 2; // sh2->ea = destination |
| 2844 | |
| 2845 | generate_update_cycles(block, compiler, IMM(sh2->ea), TRUE); // <subtract cycles> |
| 2846 | UML_HASHJMP(block, IMM(0), IMM(sh2->ea), sh2->nocode); // jmp sh2->ea |
| 2847 | |
| 2848 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 2849 | return TRUE; |
| 2850 | break; |
| 2851 | |
| 2852 | case 13<< 8: // BTS(opcode & 0xff); |
| 2853 | UML_TEST(block, MEM(&sh2->sr), IMM(T)); // test sh2->sr, T |
| 2854 | UML_JMPc(block, IF_Z, compiler->labelnum); // jz compiler->labelnum |
| 2855 | |
| 2856 | templabel = compiler->labelnum; // save our label |
| 2857 | compiler->labelnum++; // make sure the delay slot doesn't use it |
| 2858 | generate_delay_slot(block, compiler, desc); |
| 2859 | |
| 2860 | disp = ((INT32)opcode << 24) >> 24; |
| 2861 | sh2->ea = (desc->pc + 2) + disp * 2 + 2; // sh2->ea = destination |
| 2862 | |
| 2863 | generate_update_cycles(block, compiler, IMM(sh2->ea), TRUE); // <subtract cycles> |
| 2864 | UML_HASHJMP(block, IMM(0), IMM(sh2->ea), sh2->nocode); // jmp sh2->ea |
| 2865 | |
| 2866 | UML_LABEL(block, templabel); // labelnum: |
| 2867 | return TRUE; |
| 2868 | break; |
| 2869 | |
| 2870 | case 15<< 8: // BFS(opcode & 0xff); |
| 2871 | UML_TEST(block, MEM(&sh2->sr), IMM(T)); // test sh2->sr, T |
| 2872 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jnz compiler->labelnum |
| 2873 | |
| 2874 | templabel = compiler->labelnum; // save our label |
| 2875 | compiler->labelnum++; // make sure the delay slot doesn't use it |
| 2876 | generate_delay_slot(block, compiler, desc); // delay slot only if the branch is taken |
| 2877 | |
| 2878 | disp = ((INT32)opcode << 24) >> 24; |
| 2879 | sh2->ea = (desc->pc + 2) + disp * 2 + 2; // sh2->ea = destination |
| 2880 | |
| 2881 | generate_update_cycles(block, compiler, IMM(sh2->ea), TRUE); // <subtract cycles> |
| 2882 | UML_HASHJMP(block, IMM(0), IMM(sh2->ea), sh2->nocode); // jmp sh2->ea |
| 2883 | |
| 2884 | UML_LABEL(block, templabel); // labelnum: |
| 2885 | return TRUE; |
| 2886 | break; |
| 2887 | } |
| 2888 | |
| 2889 | return FALSE; |
| 2890 | } |
| 2891 | |
| 2892 | static int generate_group_12(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, UINT16 opcode, int in_delay_slot) |
| 2893 | { |
| 2894 | UINT32 scratch; |
| 2895 | |
| 2896 | switch (opcode & (15<<8)) |
| 2897 | { |
| 2898 | case 0<<8: // MOVBSG(opcode & 0xff); |
| 2899 | scratch = (opcode & 0xff); |
| 2900 | UML_ADD(block, IREG(0), MEM(&sh2->gbr), IMM(scratch)); // add r0, gbr, scratch |
| 2901 | UML_AND(block, IREG(1), R32(0), IMM(0xff)); // and r1, R0, 0xff |
| 2902 | UML_CALLH(block, sh2->write8); // call write8 |
| 2903 | |
| 2904 | if (!in_delay_slot) |
| 2905 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2906 | return TRUE; |
| 2907 | break; |
| 2908 | |
| 2909 | case 1<<8: // MOVWSG(opcode & 0xff); |
| 2910 | scratch = (opcode & 0xff) * 2; |
| 2911 | UML_ADD(block, IREG(0), MEM(&sh2->gbr), IMM(scratch)); // add r0, gbr, scratch |
| 2912 | UML_AND(block, IREG(1), R32(0), IMM(0xffff)); // and r1, R0, 0xffff |
| 2913 | UML_CALLH(block, sh2->write16); // call write16 |
| 2914 | |
| 2915 | if (!in_delay_slot) |
| 2916 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2917 | return TRUE; |
| 2918 | break; |
| 2919 | |
| 2920 | case 2<<8: // MOVLSG(opcode & 0xff); |
| 2921 | scratch = (opcode & 0xff) * 4; |
| 2922 | UML_ADD(block, IREG(0), MEM(&sh2->gbr), IMM(scratch)); // add r0, gbr, scratch |
| 2923 | UML_MOV(block, IREG(1), R32(0)); // mov r1, R0 |
| 2924 | UML_CALLH(block, sh2->write32); // call write32 |
| 2925 | |
| 2926 | if (!in_delay_slot) |
| 2927 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2928 | return TRUE; |
| 2929 | break; |
| 2930 | |
| 2931 | case 3<<8: // TRAPA(opcode & 0xff); |
| 2932 | scratch = (opcode & 0xff) * 4; |
| 2933 | UML_ADD(block, MEM(&sh2->ea), MEM(&sh2->vbr), IMM(scratch)); // add ea, vbr, scratch |
| 2934 | |
| 2935 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 2936 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 2937 | UML_MOV(block, IREG(1), MEM(&sh2->sr)); // mov r1, sr |
| 2938 | UML_CALLH(block, sh2->write32); // write32 |
| 2939 | |
| 2940 | UML_SUB(block, R32(15), R32(15), IMM(4)); // sub R15, R15, #4 |
| 2941 | UML_MOV(block, IREG(0), R32(15)); // mov r0, R15 |
| 2942 | UML_MOV(block, IREG(1), IMM(desc->pc+2)); // mov r1, pc+2 |
| 2943 | UML_CALLH(block, sh2->write32); // write32 |
| 2944 | |
| 2945 | UML_MOV(block, IREG(0), MEM(&sh2->ea)); // mov r0, ea |
| 2946 | UML_CALLH(block, sh2->read32); // read32 |
| 2947 | UML_HASHJMP(block, IMM(0), IREG(0), sh2->nocode); // jmp (r0) |
| 2948 | |
| 2949 | return TRUE; |
| 2950 | break; |
| 2951 | |
| 2952 | case 4<<8: // MOVBLG(opcode & 0xff); |
| 2953 | scratch = (opcode & 0xff); |
| 2954 | UML_ADD(block, IREG(0), MEM(&sh2->gbr), IMM(scratch)); // add r0, gbr, scratch |
| 2955 | UML_CALLH(block, sh2->read8); // call read16 |
| 2956 | UML_SEXT(block, R32(0), IREG(0), BYTE); // sext R0, r0, BYTE |
| 2957 | |
| 2958 | if (!in_delay_slot) |
| 2959 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2960 | return TRUE; |
| 2961 | break; |
| 2962 | |
| 2963 | case 5<<8: // MOVWLG(opcode & 0xff); |
| 2964 | scratch = (opcode & 0xff) * 2; |
| 2965 | UML_ADD(block, IREG(0), MEM(&sh2->gbr), IMM(scratch)); // add r0, gbr, scratch |
| 2966 | UML_CALLH(block, sh2->read16); // call read16 |
| 2967 | UML_SEXT(block, R32(0), IREG(0), WORD); // sext R0, r0, WORD |
| 2968 | |
| 2969 | if (!in_delay_slot) |
| 2970 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2971 | return TRUE; |
| 2972 | break; |
| 2973 | |
| 2974 | case 6<<8: // MOVLLG(opcode & 0xff); |
| 2975 | scratch = (opcode & 0xff) * 4; |
| 2976 | UML_ADD(block, IREG(0), MEM(&sh2->gbr), IMM(scratch)); // add r0, gbr, scratch |
| 2977 | UML_CALLH(block, sh2->read32); // call read32 |
| 2978 | UML_MOV(block, R32(0), IREG(0)); // mov R0, r0 |
| 2979 | |
| 2980 | if (!in_delay_slot) |
| 2981 | generate_update_cycles(block, compiler, IMM(desc->pc + 2), TRUE); |
| 2982 | return TRUE; |
| 2983 | break; |
| 2984 | |
| 2985 | case 7<<8: // MOVA(opcode & 0xff); |
| 2986 | scratch = (opcode & 0xff) * 4; |
| 2987 | scratch += ((desc->pc + 4) & ~3); |
| 2988 | |
| 2989 | UML_MOV(block, R32(0), IMM(scratch)); // mov R0, scratch |
| 2990 | return TRUE; |
| 2991 | break; |
| 2992 | |
| 2993 | case 8<<8: // TSTI(opcode & 0xff); |
| 2994 | scratch = opcode & 0xff; |
| 2995 | |
| 2996 | UML_AND(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(~T)); // and sr, sr, ~T (clear the T bit) |
| 2997 | UML_AND(block, IREG(0), R32(0), IMM(scratch)); // and r0, R0, scratch |
| 2998 | UML_CMP(block, IREG(0), IMM(0)); // cmp r0, #0 |
| 2999 | UML_JMPc(block, IF_NZ, compiler->labelnum); // jnz labelnum |
| 3000 | |
| 3001 | UML_OR(block, MEM(&sh2->sr), MEM(&sh2->sr), IMM(T)); // or sr, sr, T |
| 3002 | |
| 3003 | UML_LABEL(block, compiler->labelnum++); // labelnum: |
| 3004 | return TRUE; |
| 3005 | break; |
| 3006 | |
| 3007 | case 9<<8: // ANDI(opcode & 0xff); |
| 3008 | UML_AND(block, R32(0), R32(0), IMM(opcode & 0xff)); // and r0, r0, opcode & 0xff |
| 3009 | return TRUE; |
| 3010 | break; |
| 3011 | |
| 3012 | case 10<<8: // XORI(opcode & 0xff); |
| 3013 | UML_XOR(block, R32(0), R32(0), IMM(opcode & 0xff)); // xor r0, r0, opcode & 0xff |
| 3014 | return TRUE; |
| 3015 | break; |
| 3016 | |
| 3017 | case 11<<8: // ORI(opcode & 0xff); |
| 3018 | UML_OR(block, R32(0), R32(0), IMM(opcode & 0xff)); // or r0, r0, opcode & 0xff |
| 3019 | return TRUE; |
| 3020 | break; |
| 3021 | |
| 3022 | case 12<<8: // TSTM(opcode & 0xff); |
| 3023 | case 13<<8: // ANDM(opcode & 0xff); |
| 3024 | case 14<<8: // XORM(opcode & 0xff); |
| 3025 | break; |
| 3026 | |
| 3027 | case 15<<8: // ORM(opcode & 0xff); |
| 3028 | UML_ADD(block, IREG(0), R32(0), MEM(&sh2->gbr)); // add r0, R0, gbr |
| 3029 | UML_CALLH(block, sh2->read8); // read8 |
| 3030 | |
| 3031 | UML_OR(block, IREG(1), IREG(0), IMM(opcode&0xff)); // or r1, r0, #opcode&0xff |
| 3032 | UML_ADD(block, IREG(0), R32(0), MEM(&sh2->gbr)); // add r0, R0, gbr |
| 3033 | SETEA(0); |
| 3034 | UML_CALLH(block, sh2->write8); // write8 |
| 3035 | return TRUE; |
| 3036 | break; |
| 3037 | } |
| 3038 | |
| 3039 | return FALSE; |
| 3040 | } |
| 3041 | |
| 3042 | /*************************************************************************** |
| 3043 | CORE CALLBACKS |
| 3044 | ***************************************************************************/ |
| 3045 | |
| 3046 | /*------------------------------------------------- |
| 3047 | sh2_get_context - return a copy of the |
| 3048 | current context |
| 3049 | -------------------------------------------------*/ |
| 3050 | |
| 3051 | static void sh2_get_context(void *dst) |
| 3052 | { |
| 3053 | if( dst ) |
| 3054 | *(SH2 **)dst = sh2; |
| 3055 | } |
| 3056 | |
| 3057 | /*------------------------------------------------- |
| 3058 | sh2_set_context - copy the current context |
| 3059 | into the global state |
| 3060 | -------------------------------------------------*/ |
| 3061 | |
| 3062 | static void sh2_set_context(void *src) |
| 3063 | { |
| 3064 | if( src ) |
| 3065 | sh2 = *(SH2 **)src; |
| 3066 | } |
| 3067 | |
| 3068 | /*------------------------------------------------- |
| 3069 | sh2_dasm - disassemble an instruction |
| 3070 | -------------------------------------------------*/ |
| 3071 | |
| 3072 | static offs_t sh2_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) |
| 3073 | { |
| 3074 | return DasmSH2( buffer, pc, (oprom[0] << 8) | oprom[1] ); |
| 3075 | } |
| 3076 | |
| 3077 | /*------------------------------------------------- |
| 3078 | sh2_internal_a5 - read handler for |
| 3079 | SH2 internal map |
| 3080 | -------------------------------------------------*/ |
| 3081 | |
| 3082 | static READ32_HANDLER(sh2_internal_a5) |
| 3083 | { |
| 3084 | return 0xa5a5a5a5; |
| 3085 | } |
| 3086 | |
| 3087 | |
| 3088 | /*------------------------------------------------- |
| 3089 | sh2_internal_map - maps SH2 built-ins |
| 3090 | -------------------------------------------------*/ |
| 3091 | |
| 3092 | static ADDRESS_MAP_START( sh2_internal_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 3093 | AM_RANGE(0x40000000, 0xbfffffff) AM_READ(sh2_internal_a5) |
| 3094 | AM_RANGE(0xe0000000, 0xffffffff) AM_READWRITE(sh2_internal_r, sh2_internal_w) |
| 3095 | ADDRESS_MAP_END |
| 3096 | |
| 3097 | /*------------------------------------------------- |
| 3098 | sh2_set_info - set information about a given |
| 3099 | CPU instance |
| 3100 | -------------------------------------------------*/ |
| 3101 | |
| 3102 | static void sh2_set_info(UINT32 state, cpuinfo *info) |
| 3103 | { |
| 3104 | switch (state) |
| 3105 | { |
| 3106 | /* --- the following bits of info are set as 64-bit signed integers --- */ |
| 3107 | case CPUINFO_INT_SH2_DRC_OPTIONS: sh2->drcoptions = info->i; break; |
| 3108 | |
| 3109 | case CPUINFO_INT_SH2_PCFLUSH_SELECT: sh2->pcfsel = info->i; if (sh2->pcfsel > sh2->maxpcfsel) sh2->maxpcfsel = sh2->pcfsel; break; |
| 3110 | case CPUINFO_INT_SH2_PCFLUSH_ADDR: sh2->pcflushes[sh2->pcfsel] = info->i; break; |
| 3111 | |
| 3112 | case CPUINFO_INT_INPUT_STATE + SH2_INT_VBLIN: sh2_set_irq_line(SH2_INT_VBLIN, info->i); break; |
| 3113 | case CPUINFO_INT_INPUT_STATE + SH2_INT_VBLOUT: sh2_set_irq_line(SH2_INT_VBLOUT, info->i); break; |
| 3114 | case CPUINFO_INT_INPUT_STATE + SH2_INT_HBLIN: sh2_set_irq_line(SH2_INT_HBLIN, info->i); break; |
| 3115 | case CPUINFO_INT_INPUT_STATE + SH2_INT_TIMER0: sh2_set_irq_line(SH2_INT_TIMER0, info->i); break; |
| 3116 | case CPUINFO_INT_INPUT_STATE + SH2_INT_TIMER1: sh2_set_irq_line(SH2_INT_TIMER1, info->i); break; |
| 3117 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DSP: sh2_set_irq_line(SH2_INT_DSP, info->i); break; |
| 3118 | case CPUINFO_INT_INPUT_STATE + SH2_INT_SOUND: sh2_set_irq_line(SH2_INT_SOUND, info->i); break; |
| 3119 | case CPUINFO_INT_INPUT_STATE + SH2_INT_SMPC: sh2_set_irq_line(SH2_INT_SMPC, info->i); break; |
| 3120 | case CPUINFO_INT_INPUT_STATE + SH2_INT_PAD: sh2_set_irq_line(SH2_INT_PAD, info->i); break; |
| 3121 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMA2: sh2_set_irq_line(SH2_INT_DMA2, info->i); break; |
| 3122 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMA1: sh2_set_irq_line(SH2_INT_DMA1, info->i); break; |
| 3123 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMA0: sh2_set_irq_line(SH2_INT_DMA0, info->i); break; |
| 3124 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMAILL: sh2_set_irq_line(SH2_INT_DMAILL, info->i); break; |
| 3125 | case CPUINFO_INT_INPUT_STATE + SH2_INT_SPRITE: sh2_set_irq_line(SH2_INT_SPRITE, info->i); break; |
| 3126 | case CPUINFO_INT_INPUT_STATE + SH2_INT_14: sh2_set_irq_line(SH2_INT_14, info->i); break; |
| 3127 | case CPUINFO_INT_INPUT_STATE + SH2_INT_15: sh2_set_irq_line(SH2_INT_15, info->i); break; |
| 3128 | case CPUINFO_INT_INPUT_STATE + SH2_INT_ABUS: sh2_set_irq_line(SH2_INT_ABUS, info->i); break; |
| 3129 | case CPUINFO_INT_INPUT_STATE + INPUT_LINE_NMI: sh2_set_irq_line(INPUT_LINE_NMI, info->i); break; |
| 3130 | |
| 3131 | case CPUINFO_INT_REGISTER + SH2_PC: |
| 3132 | case CPUINFO_INT_PC: sh2->pc = info->i; sh2->delay = 0; break; |
| 3133 | case CPUINFO_INT_SP: sh2->r[15] = info->i; break; |
| 3134 | case CPUINFO_INT_REGISTER + SH2_PR: sh2->pr = info->i; break; |
| 3135 | case CPUINFO_INT_REGISTER + SH2_SR: sh2->sr = info->i; break; |
| 3136 | case CPUINFO_INT_REGISTER + SH2_GBR: sh2->gbr = info->i; break; |
| 3137 | case CPUINFO_INT_REGISTER + SH2_VBR: sh2->vbr = info->i; break; |
| 3138 | case CPUINFO_INT_REGISTER + SH2_MACH: sh2->mach = info->i; break; |
| 3139 | case CPUINFO_INT_REGISTER + SH2_MACL: sh2->macl = info->i; break; |
| 3140 | case CPUINFO_INT_REGISTER + SH2_R0: sh2->r[ 0] = info->i; break; |
| 3141 | case CPUINFO_INT_REGISTER + SH2_R1: sh2->r[ 1] = info->i; break; |
| 3142 | case CPUINFO_INT_REGISTER + SH2_R2: sh2->r[ 2] = info->i; break; |
| 3143 | case CPUINFO_INT_REGISTER + SH2_R3: sh2->r[ 3] = info->i; break; |
| 3144 | case CPUINFO_INT_REGISTER + SH2_R4: sh2->r[ 4] = info->i; break; |
| 3145 | case CPUINFO_INT_REGISTER + SH2_R5: sh2->r[ 5] = info->i; break; |
| 3146 | case CPUINFO_INT_REGISTER + SH2_R6: sh2->r[ 6] = info->i; break; |
| 3147 | case CPUINFO_INT_REGISTER + SH2_R7: sh2->r[ 7] = info->i; break; |
| 3148 | case CPUINFO_INT_REGISTER + SH2_R8: sh2->r[ 8] = info->i; break; |
| 3149 | case CPUINFO_INT_REGISTER + SH2_R9: sh2->r[ 9] = info->i; break; |
| 3150 | case CPUINFO_INT_REGISTER + SH2_R10: sh2->r[10] = info->i; break; |
| 3151 | case CPUINFO_INT_REGISTER + SH2_R11: sh2->r[11] = info->i; break; |
| 3152 | case CPUINFO_INT_REGISTER + SH2_R12: sh2->r[12] = info->i; break; |
| 3153 | case CPUINFO_INT_REGISTER + SH2_R13: sh2->r[13] = info->i; break; |
| 3154 | case CPUINFO_INT_REGISTER + SH2_R14: sh2->r[14] = info->i; break; |
| 3155 | case CPUINFO_INT_REGISTER + SH2_R15: sh2->r[15] = info->i; break; |
| 3156 | case CPUINFO_INT_REGISTER + SH2_EA: sh2->ea = info->i; break; |
| 3157 | |
| 3158 | case CPUINFO_INT_SH2_FRT_INPUT: sh2_set_frt_input(cpu_getactivecpu(), info->i); break; |
| 3159 | |
| 3160 | /* --- the following bits of info are set as pointers to data or functions --- */ |
| 3161 | case CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK: sh2->ftcsr_read_callback = (void (*) (UINT32 ))info->f; break; |
| 3162 | } |
| 3163 | } |
| 3164 | |
| 3165 | /*------------------------------------------------- |
| 3166 | sh2_get_info - return information about a |
| 3167 | given CPU instance |
| 3168 | -------------------------------------------------*/ |
| 3169 | |
| 3170 | void sh2_get_info(UINT32 state, cpuinfo *info) |
| 3171 | { |
| 3172 | switch (state) |
| 3173 | { |
| 3174 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 3175 | case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(SH2); break; |
| 3176 | case CPUINFO_INT_INPUT_LINES: info->i = 16; break; |
| 3177 | case CPUINFO_INT_DEFAULT_IRQ_VECTOR: info->i = 0; break; |
| 3178 | case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break; |
| 3179 | case CPUINFO_INT_CLOCK_MULTIPLIER: info->i = 1; break; |
| 3180 | case CPUINFO_INT_CLOCK_DIVIDER: info->i = 1; break; |
| 3181 | case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; |
| 3182 | case CPUINFO_INT_MAX_INSTRUCTION_BYTES: info->i = 2; break; |
| 3183 | case CPUINFO_INT_MIN_CYCLES: info->i = 1; break; |
| 3184 | case CPUINFO_INT_MAX_CYCLES: info->i = 4; break; |
| 3185 | |
| 3186 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 32; break; |
| 3187 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 32; break; |
| 3188 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_PROGRAM: info->i = 0; break; |
| 3189 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; |
| 3190 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_DATA: info->i = 0; break; |
| 3191 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_DATA: info->i = 0; break; |
| 3192 | case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; |
| 3193 | case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_IO: info->i = 0; break; |
| 3194 | case CPUINFO_INT_ADDRBUS_SHIFT + ADDRESS_SPACE_IO: info->i = 0; break; |
| 3195 | |
| 3196 | // Internal maps |
| 3197 | case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map32 = address_map_sh2_internal_map; break; |
| 3198 | case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map32 = NULL; break; |
| 3199 | case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_IO: info->internal_map32 = NULL; break; |
| 3200 | |
| 3201 | case CPUINFO_INT_INPUT_STATE + SH2_INT_VBLIN: info->i = sh2->irq_line_state[SH2_INT_VBLIN]; break; |
| 3202 | case CPUINFO_INT_INPUT_STATE + SH2_INT_VBLOUT: info->i = sh2->irq_line_state[SH2_INT_VBLOUT]; break; |
| 3203 | case CPUINFO_INT_INPUT_STATE + SH2_INT_HBLIN: info->i = sh2->irq_line_state[SH2_INT_HBLIN]; break; |
| 3204 | case CPUINFO_INT_INPUT_STATE + SH2_INT_TIMER0: info->i = sh2->irq_line_state[SH2_INT_TIMER0]; break; |
| 3205 | case CPUINFO_INT_INPUT_STATE + SH2_INT_TIMER1: info->i = sh2->irq_line_state[SH2_INT_TIMER1]; break; |
| 3206 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DSP: info->i = sh2->irq_line_state[SH2_INT_DSP]; break; |
| 3207 | case CPUINFO_INT_INPUT_STATE + SH2_INT_SOUND: info->i = sh2->irq_line_state[SH2_INT_SOUND]; break; |
| 3208 | case CPUINFO_INT_INPUT_STATE + SH2_INT_SMPC: info->i = sh2->irq_line_state[SH2_INT_SMPC]; break; |
| 3209 | case CPUINFO_INT_INPUT_STATE + SH2_INT_PAD: info->i = sh2->irq_line_state[SH2_INT_PAD]; break; |
| 3210 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMA2: info->i = sh2->irq_line_state[SH2_INT_DMA2]; break; |
| 3211 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMA1: info->i = sh2->irq_line_state[SH2_INT_DMA1]; break; |
| 3212 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMA0: info->i = sh2->irq_line_state[SH2_INT_DMA0]; break; |
| 3213 | case CPUINFO_INT_INPUT_STATE + SH2_INT_DMAILL: info->i = sh2->irq_line_state[SH2_INT_DMAILL]; break; |
| 3214 | case CPUINFO_INT_INPUT_STATE + SH2_INT_SPRITE: info->i = sh2->irq_line_state[SH2_INT_SPRITE]; break; |
| 3215 | case CPUINFO_INT_INPUT_STATE + SH2_INT_14: info->i = sh2->irq_line_state[SH2_INT_14]; break; |
| 3216 | case CPUINFO_INT_INPUT_STATE + SH2_INT_15: info->i = sh2->irq_line_state[SH2_INT_15]; break; |
| 3217 | case CPUINFO_INT_INPUT_STATE + SH2_INT_ABUS: info->i = sh2->irq_line_state[SH2_INT_ABUS]; break; |
| 3218 | case CPUINFO_INT_INPUT_STATE + INPUT_LINE_NMI: info->i = sh2->nmi_line_state; break; |
| 3219 | |
| 3220 | case CPUINFO_INT_PREVIOUSPC: info->i = sh2->ppc; break; |
| 3221 | |
| 3222 | case CPUINFO_INT_PC: |
| 3223 | case CPUINFO_INT_REGISTER + SH2_PC: info->i = (sh2->delay) ? (sh2->delay & AM) : (sh2->pc & AM); break; |
| 3224 | case CPUINFO_INT_SP: info->i = sh2->r[15]; break; |
| 3225 | case CPUINFO_INT_REGISTER + SH2_PR: info->i = sh2->pr; break; |
| 3226 | case CPUINFO_INT_REGISTER + SH2_SR: info->i = sh2->sr; break; |
| 3227 | case CPUINFO_INT_REGISTER + SH2_GBR: info->i = sh2->gbr; break; |
| 3228 | case CPUINFO_INT_REGISTER + SH2_VBR: info->i = sh2->vbr; break; |
| 3229 | case CPUINFO_INT_REGISTER + SH2_MACH: info->i = sh2->mach; break; |
| 3230 | case CPUINFO_INT_REGISTER + SH2_MACL: info->i = sh2->macl; break; |
| 3231 | case CPUINFO_INT_REGISTER + SH2_R0: info->i = sh2->r[ 0]; break; |
| 3232 | case CPUINFO_INT_REGISTER + SH2_R1: info->i = sh2->r[ 1]; break; |
| 3233 | case CPUINFO_INT_REGISTER + SH2_R2: info->i = sh2->r[ 2]; break; |
| 3234 | case CPUINFO_INT_REGISTER + SH2_R3: info->i = sh2->r[ 3]; break; |
| 3235 | case CPUINFO_INT_REGISTER + SH2_R4: info->i = sh2->r[ 4]; break; |
| 3236 | case CPUINFO_INT_REGISTER + SH2_R5: info->i = sh2->r[ 5]; break; |
| 3237 | case CPUINFO_INT_REGISTER + SH2_R6: info->i = sh2->r[ 6]; break; |
| 3238 | case CPUINFO_INT_REGISTER + SH2_R7: info->i = sh2->r[ 7]; break; |
| 3239 | case CPUINFO_INT_REGISTER + SH2_R8: info->i = sh2->r[ 8]; break; |
| 3240 | case CPUINFO_INT_REGISTER + SH2_R9: info->i = sh2->r[ 9]; break; |
| 3241 | case CPUINFO_INT_REGISTER + SH2_R10: info->i = sh2->r[10]; break; |
| 3242 | case CPUINFO_INT_REGISTER + SH2_R11: info->i = sh2->r[11]; break; |
| 3243 | case CPUINFO_INT_REGISTER + SH2_R12: info->i = sh2->r[12]; break; |
| 3244 | case CPUINFO_INT_REGISTER + SH2_R13: info->i = sh2->r[13]; break; |
| 3245 | case CPUINFO_INT_REGISTER + SH2_R14: info->i = sh2->r[14]; break; |
| 3246 | case CPUINFO_INT_REGISTER + SH2_R15: info->i = sh2->r[15]; break; |
| 3247 | case CPUINFO_INT_REGISTER + SH2_EA: info->i = sh2->ea; break; |
| 3248 | |
| 3249 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 3250 | case CPUINFO_PTR_SET_INFO: info->setinfo = sh2_set_info; break; |
| 3251 | case CPUINFO_PTR_GET_CONTEXT: info->getcontext = sh2_get_context; break; |
| 3252 | case CPUINFO_PTR_SET_CONTEXT: info->setcontext = sh2_set_context; break; |
| 3253 | case CPUINFO_PTR_INIT: info->init = sh2_init; break; |
| 3254 | case CPUINFO_PTR_RESET: info->reset = sh2_reset; break; |
| 3255 | case CPUINFO_PTR_EXIT: info->exit = sh2_exit; break; |
| 3256 | case CPUINFO_PTR_EXECUTE: info->execute = sh2_execute; break; |
| 3257 | case CPUINFO_PTR_BURN: info->burn = NULL; break; |
| 3258 | case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sh2_dasm; break; |
| 3259 | case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sh2->icount; break; |
| 3260 | |
| 3261 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 3262 | case CPUINFO_STR_NAME: strcpy(info->s, "SH-2"); break; |
| 3263 | case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Hitachi SH7600"); break; |
| 3264 | case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "2.0"); break; |
| 3265 | case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; |
| 3266 | case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Nicola Salmoria and the MAME team, all rights reserved."); break; |
| 3267 | |
| 3268 | case CPUINFO_STR_FLAGS: |
| 3269 | sprintf(info->s, "%c%c%d%c%c", |
| 3270 | sh2->sr & M ? 'M':'.', |
| 3271 | sh2->sr & Q ? 'Q':'.', |
| 3272 | (sh2->sr & I) >> 4, |
| 3273 | sh2->sr & S ? 'S':'.', |
| 3274 | sh2->sr & T ? 'T':'.'); |
| 3275 | break; |
| 3276 | |
| 3277 | case CPUINFO_STR_REGISTER + SH2_PC: sprintf(info->s, "PC :%08X", sh2->pc); break; |
| 3278 | case CPUINFO_STR_REGISTER + SH2_SR: sprintf(info->s, "SR :%08X", sh2->sr); break; |
| 3279 | case CPUINFO_STR_REGISTER + SH2_PR: sprintf(info->s, "PR :%08X", sh2->pr); break; |
| 3280 | case CPUINFO_STR_REGISTER + SH2_GBR: sprintf(info->s, "GBR :%08X", sh2->gbr); break; |
| 3281 | case CPUINFO_STR_REGISTER + SH2_VBR: sprintf(info->s, "VBR :%08X", sh2->vbr); break; |
| 3282 | case CPUINFO_STR_REGISTER + SH2_MACH: sprintf(info->s, "MACH:%08X", sh2->mach); break; |
| 3283 | case CPUINFO_STR_REGISTER + SH2_MACL: sprintf(info->s, "MACL:%08X", sh2->macl); break; |
| 3284 | case CPUINFO_STR_REGISTER + SH2_R0: sprintf(info->s, "R0 :%08X", sh2->r[ 0]); break; |
| 3285 | case CPUINFO_STR_REGISTER + SH2_R1: sprintf(info->s, "R1 :%08X", sh2->r[ 1]); break; |
| 3286 | case CPUINFO_STR_REGISTER + SH2_R2: sprintf(info->s, "R2 :%08X", sh2->r[ 2]); break; |
| 3287 | case CPUINFO_STR_REGISTER + SH2_R3: sprintf(info->s, "R3 :%08X", sh2->r[ 3]); break; |
| 3288 | case CPUINFO_STR_REGISTER + SH2_R4: sprintf(info->s, "R4 :%08X", sh2->r[ 4]); break; |
| 3289 | case CPUINFO_STR_REGISTER + SH2_R5: sprintf(info->s, "R5 :%08X", sh2->r[ 5]); break; |
| 3290 | case CPUINFO_STR_REGISTER + SH2_R6: sprintf(info->s, "R6 :%08X", sh2->r[ 6]); break; |
| 3291 | case CPUINFO_STR_REGISTER + SH2_R7: sprintf(info->s, "R7 :%08X", sh2->r[ 7]); break; |
| 3292 | case CPUINFO_STR_REGISTER + SH2_R8: sprintf(info->s, "R8 :%08X", sh2->r[ 8]); break; |
| 3293 | case CPUINFO_STR_REGISTER + SH2_R9: sprintf(info->s, "R9 :%08X", sh2->r[ 9]); break; |
| 3294 | case CPUINFO_STR_REGISTER + SH2_R10: sprintf(info->s, "R10 :%08X", sh2->r[10]); break; |
| 3295 | case CPUINFO_STR_REGISTER + SH2_R11: sprintf(info->s, "R11 :%08X", sh2->r[11]); break; |
| 3296 | case CPUINFO_STR_REGISTER + SH2_R12: sprintf(info->s, "R12 :%08X", sh2->r[12]); break; |
| 3297 | case CPUINFO_STR_REGISTER + SH2_R13: sprintf(info->s, "R13 :%08X", sh2->r[13]); break; |
| 3298 | case CPUINFO_STR_REGISTER + SH2_R14: sprintf(info->s, "R14 :%08X", sh2->r[14]); break; |
| 3299 | case CPUINFO_STR_REGISTER + SH2_R15: sprintf(info->s, "R15 :%08X", sh2->r[15]); break; |
| 3300 | case CPUINFO_STR_REGISTER + SH2_EA: sprintf(info->s, "EA :%08X", sh2->ea); break; |
| 3301 | |
| 3302 | case CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK: info->f = (genf*)sh2->ftcsr_read_callback; break; |
| 3303 | |
| 3304 | } |
| 3305 | } |
| 3306 | |
| 3307 | #endif // USE_SH2DRC |
src/emu/uimenu.c
| r2956 | r2957 | |
| 12 | 12 | #include "ui.h" |
| 13 | 13 | #include "rendutil.h" |
| 14 | 14 | #include "cheat.h" |
| 15 | #include "uiinput.h" |
| 15 | 16 | #include "uimenu.h" |
| 16 | 17 | #include "audit.h" |
| 17 | 18 | #include "deprecat.h" |
| 19 | #include "eminline.h" |
| 18 | 20 | |
| 19 | 21 | #ifdef MESS |
| 20 | 22 | #include "uimess.h" |
| r2956 | r2957 | |
| 29 | 31 | CONSTANTS |
| 30 | 32 | ***************************************************************************/ |
| 31 | 33 | |
| 32 | | #define MENU_STACK_DEPTH 8 |
| 33 | | #define MENU_STRING_POOL_SIZE (64*1024) |
| 34 | #define UI_MENU_POOL_SIZE 65536 |
| 35 | #define UI_MENU_ALLOC_ITEMS 256 |
| 34 | 36 | |
| 35 | 37 | #define MENU_TEXTCOLOR ARGB_WHITE |
| 36 | 38 | #define MENU_SELECTCOLOR MAKE_ARGB(0xff,0xff,0xff,0x00) |
| r2956 | r2957 | |
| 56 | 58 | { |
| 57 | 59 | INPUT_TYPE_DIGITAL = 0, |
| 58 | 60 | INPUT_TYPE_ANALOG = 1, |
| 59 | | INPUT_TYPE_ANALOG_DEC = 2, |
| 60 | | INPUT_TYPE_ANALOG_INC = 3 |
| 61 | INPUT_TYPE_ANALOG_DEC = INPUT_TYPE_ANALOG + SEQ_TYPE_DECREMENT, |
| 62 | INPUT_TYPE_ANALOG_INC = INPUT_TYPE_ANALOG + SEQ_TYPE_INCREMENT, |
| 63 | INPUT_TYPE_TOTAL = INPUT_TYPE_ANALOG + SEQ_TYPE_TOTAL |
| 61 | 64 | }; |
| 62 | 65 | |
| 63 | 66 | enum |
| r2956 | r2957 | |
| 69 | 72 | ANALOG_ITEM_COUNT |
| 70 | 73 | }; |
| 71 | 74 | |
| 75 | enum |
| 76 | { |
| 77 | MEMCARD_ITEM_SELECT = 1, |
| 78 | MEMCARD_ITEM_LOAD, |
| 79 | MEMCARD_ITEM_EJECT, |
| 80 | MEMCARD_ITEM_CREATE |
| 81 | }; |
| 72 | 82 | |
| 83 | enum |
| 84 | { |
| 85 | VIDEO_ITEM_ROTATE = 0x80000000, |
| 86 | VIDEO_ITEM_VIEW |
| 87 | }; |
| 73 | 88 | |
| 89 | |
| 90 | |
| 74 | 91 | /*************************************************************************** |
| 75 | 92 | TYPE DEFINITIONS |
| 76 | 93 | ***************************************************************************/ |
| 77 | 94 | |
| 78 | | typedef struct _menu_state menu_state; |
| 79 | | struct _menu_state |
| 95 | typedef struct _ui_menu_pool ui_menu_pool; |
| 96 | struct _ui_menu_pool |
| 80 | 97 | { |
| 98 | ui_menu_pool * next; /* chain to next one */ |
| 99 | UINT8 * top; /* top of the pool */ |
| 100 | UINT8 * end; /* end of the pool */ |
| 101 | }; |
| 102 | |
| 103 | |
| 104 | typedef struct _ui_menu_item ui_menu_item; |
| 105 | struct _ui_menu_item |
| 106 | { |
| 107 | const char * text; |
| 108 | const char * subtext; |
| 109 | UINT32 flags; |
| 110 | void * ref; |
| 111 | }; |
| 112 | |
| 113 | |
| 114 | struct _ui_menu |
| 115 | { |
| 116 | running_machine * machine; /* machine we are attached to */ |
| 81 | 117 | ui_menu_handler_func handler; /* handler callback */ |
| 82 | | UINT32 state; /* state value */ |
| 118 | void * parameter; /* parameter */ |
| 119 | ui_menu_event event; /* the UI event that occurred */ |
| 120 | ui_menu * parent; /* pointer to parent menu */ |
| 121 | void * state; /* menu-specific state */ |
| 122 | int resetpos; /* reset position */ |
| 123 | void * resetref; /* reset reference */ |
| 124 | int selected; /* which item is selected */ |
| 125 | int hover; /* which item is being hovered over */ |
| 126 | int visitems; /* number of visible items */ |
| 127 | int numitems; /* number of items in the menu */ |
| 128 | int allocitems; /* allocated size of array */ |
| 129 | ui_menu_item * item; /* pointer to array of items */ |
| 130 | ui_menu_custom_func custom; /* callback for custom rendering */ |
| 131 | float customtop; /* amount of extra height to add at the top */ |
| 132 | float custombottom; /* amount of extra height to add at the bottom */ |
| 133 | ui_menu_pool * pool; /* list of memory pools */ |
| 83 | 134 | }; |
| 84 | 135 | |
| 85 | 136 | |
| 137 | /* internal input menu item data */ |
| 86 | 138 | typedef struct _input_item_data input_item_data; |
| 87 | 139 | struct _input_item_data |
| 88 | 140 | { |
| 89 | | const input_type_desc *typedesc; /* reference to type description for global inputs */ |
| 90 | | const input_field_config *field; /* reference to field for game inputs */ |
| 91 | | int seqtype; /* sequence type */ |
| 92 | | input_seq seq; /* copy of the live sequence */ |
| 93 | | const input_seq *defseq; /* pointer to the default sequence */ |
| 94 | | const char * name; |
| 95 | | const char * seqname; |
| 96 | | UINT16 sortorder; /* sorting information */ |
| 97 | | UINT8 type; /* type of port */ |
| 98 | | UINT8 invert; /* type of port */ |
| 141 | input_item_data * next; /* pointer to next item in the list */ |
| 142 | const void * ref; /* reference to type description for global inputs or field for game inputs */ |
| 143 | int seqtype; /* sequence type */ |
| 144 | input_seq seq; /* copy of the live sequence */ |
| 145 | const input_seq * defseq; /* pointer to the default sequence */ |
| 146 | const char * name; /* pointer to the base name of the item */ |
| 147 | UINT16 sortorder; /* sorting information */ |
| 148 | UINT8 type; /* type of port */ |
| 99 | 149 | }; |
| 100 | 150 | |
| 101 | 151 | |
| 152 | /* internal analog menu item data */ |
| 153 | typedef struct _analog_item_data analog_item_data; |
| 154 | struct _analog_item_data |
| 155 | { |
| 156 | const input_field_config *field; |
| 157 | int type; |
| 158 | int min, max; |
| 159 | int cur; |
| 160 | }; |
| 161 | |
| 162 | |
| 163 | /* DIP switch descriptor */ |
| 102 | 164 | typedef struct _dip_descriptor dip_descriptor; |
| 103 | 165 | struct _dip_descriptor |
| 104 | 166 | { |
| 105 | | const char * dip_name; |
| 106 | | UINT16 total_dip_mask; |
| 107 | | UINT16 total_dip_settings; |
| 108 | | UINT16 dip_invert_mask; |
| 109 | | UINT16 selected_dip_feature_mask; |
| 167 | dip_descriptor * next; |
| 168 | const char * name; |
| 169 | UINT32 mask; |
| 170 | UINT32 state; |
| 110 | 171 | }; |
| 111 | 172 | |
| 112 | 173 | |
| 174 | /* extended settings menu state */ |
| 175 | typedef struct _settings_menu_state settings_menu_state; |
| 176 | struct _settings_menu_state |
| 177 | { |
| 178 | dip_descriptor * diplist; |
| 179 | }; |
| 113 | 180 | |
| 181 | |
| 182 | /* extended input menu state */ |
| 183 | typedef struct _input_menu_state input_menu_state; |
| 184 | struct _input_menu_state |
| 185 | { |
| 186 | const void * lastref; |
| 187 | const void * pollingref; |
| 188 | input_item_data * pollingitem; |
| 189 | UINT8 record_next; |
| 190 | input_seq starting_seq; |
| 191 | }; |
| 192 | |
| 193 | |
| 194 | /* extended select game menu state */ |
| 195 | typedef struct _select_game_state select_game_state; |
| 196 | struct _select_game_state |
| 197 | { |
| 198 | UINT8 error; |
| 199 | UINT8 rerandomize; |
| 200 | char search[40]; |
| 201 | const game_driver * matchlist[VISIBLE_GAMES_IN_LIST]; |
| 202 | const game_driver * driverlist[1]; |
| 203 | }; |
| 204 | |
| 205 | |
| 206 | |
| 114 | 207 | /*************************************************************************** |
| 115 | 208 | GLOBAL VARIABLES |
| 116 | 209 | ***************************************************************************/ |
| 117 | 210 | |
| 118 | 211 | /* menu states */ |
| 119 | | static int menu_stack_index; |
| 120 | | static menu_state menu_stack[MENU_STACK_DEPTH]; |
| 212 | static ui_menu *menu_stack; |
| 213 | static ui_menu *menu_free; |
| 121 | 214 | |
| 122 | | static UINT32 menu_string_pool_offset; |
| 123 | | static char menu_string_pool[MENU_STRING_POOL_SIZE]; |
| 124 | | |
| 125 | | static input_seq starting_seq; |
| 126 | | |
| 127 | | static char select_game_buffer[40]; |
| 128 | | static const game_driver *select_game_list[VISIBLE_GAMES_IN_LIST]; |
| 129 | | static const game_driver **select_game_driver_list; |
| 130 | | |
| 131 | | static dip_descriptor dip_switch_model[MAX_PHYSICAL_DIPS + 1]; |
| 132 | | |
| 133 | 215 | static bitmap_t *hilight_bitmap; |
| 134 | 216 | static render_texture *hilight_texture; |
| 135 | 217 | |
| 136 | 218 | static render_texture *arrow_texture; |
| 137 | 219 | |
| 138 | | static const char *const input_format[] = |
| 139 | | { |
| 140 | | "%s", |
| 141 | | "%s Analog", |
| 142 | | "%s Dec", |
| 143 | | "%s Inc" |
| 144 | | }; |
| 220 | static const char *priortext = "Return to Prior Menu"; |
| 221 | static const char *backtext = "Return to " CAPSTARTGAMENOUN; |
| 222 | static const char *exittext = "Exit"; |
| 145 | 223 | |
| 146 | 224 | static const rgb_t text_fgcolor = MAKE_ARGB(0xff,0xff,0xff,0xff); |
| 147 | 225 | static const rgb_t text_bgcolor = MAKE_ARGB(0xe0,0x80,0x80,0x80); |
| 148 | 226 | static const rgb_t sel_fgcolor = MAKE_ARGB(0xff,0xff,0xff,0x00); |
| 149 | 227 | static const rgb_t sel_bgcolor = MAKE_ARGB(0xe0,0x80,0x80,0x00); |
| 228 | static const rgb_t mouseover_fgcolor = MAKE_ARGB(0xff,0xff,0xff,0x80); |
| 229 | static const rgb_t mouseover_bgcolor = MAKE_ARGB(0x70,0x40,0x40,0x00); |
| 230 | static const rgb_t mousedown_fgcolor = MAKE_ARGB(0xff,0xff,0xff,0x80); |
| 231 | static const rgb_t mousedown_bgcolor = MAKE_ARGB(0xB0,0x60,0x60,0x00); |
| 150 | 232 | |
| 151 | 233 | |
| 152 | 234 | |
| r2956 | r2957 | |
| 156 | 238 | |
| 157 | 239 | static void ui_menu_exit(running_machine *machine); |
| 158 | 240 | |
| 241 | /* internal menu processing */ |
| 242 | static void ui_menu_draw(ui_menu *menu); |
| 243 | static void ui_menu_draw_text_box(ui_menu *menu); |
| 244 | static void ui_menu_handle_events(ui_menu *menu); |
| 245 | static void ui_menu_handle_keys(ui_menu *menu, UINT32 flags); |
| 246 | static void ui_menu_validate_selection(ui_menu *menu, int scandir); |
| 247 | static void ui_menu_clear_free_list(running_machine *machine); |
| 248 | |
| 159 | 249 | /* menu handlers */ |
| 160 | | static UINT32 menu_main(running_machine *machine, UINT32 state); |
| 161 | | static UINT32 menu_input_groups(running_machine *machine, UINT32 state); |
| 162 | | static UINT32 menu_input(running_machine *machine, UINT32 state); |
| 163 | | static UINT32 menu_switches(running_machine *machine, UINT32 state); |
| 164 | | static UINT32 menu_analog(running_machine *machine, UINT32 state); |
| 250 | static void menu_main(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 251 | static void menu_main_populate(running_machine *machine, ui_menu *menu, void *state); |
| 252 | static void menu_input_groups(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 253 | static void menu_input_groups_populate(running_machine *machine, ui_menu *menu, void *state); |
| 254 | static void menu_input_general(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 255 | static void menu_input_general_populate(running_machine *machine, ui_menu *menu, input_menu_state *menustate, int group); |
| 256 | static void menu_input_specific(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 257 | static void menu_input_specific_populate(running_machine *machine, ui_menu *menu, input_menu_state *menustate); |
| 258 | static void menu_input_common(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 259 | static int CLIB_DECL menu_input_compare_items(const void *i1, const void *i2); |
| 260 | static void menu_input_populate_and_sort(ui_menu *menu, input_item_data *itemlist, input_menu_state *menustate); |
| 261 | static void menu_settings_dip_switches(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 262 | static void menu_settings_driver_config(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 263 | static void menu_settings_categories(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 264 | static void menu_settings_common(running_machine *machine, ui_menu *menu, void *state, UINT32 type); |
| 265 | static void menu_settings_populate(running_machine *machine, ui_menu *menu, settings_menu_state *menustate, UINT32 type); |
| 266 | static void menu_analog(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 267 | static void menu_analog_populate(running_machine *machine, ui_menu *menu); |
| 165 | 268 | #ifndef MESS |
| 166 | | static UINT32 menu_bookkeeping(running_machine *machine, UINT32 state); |
| 269 | static void menu_bookkeeping(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 270 | static void menu_bookkeeping_populate(running_machine *machine, ui_menu *menu, attotime *curtime); |
| 167 | 271 | #endif |
| 168 | | static UINT32 menu_game_info(running_machine *machine, UINT32 state); |
| 169 | | static UINT32 menu_cheat(running_machine *machine, UINT32 state); |
| 170 | | static UINT32 menu_memory_card(running_machine *machine, UINT32 state); |
| 171 | | static UINT32 menu_video(running_machine *machine, UINT32 state); |
| 172 | | static UINT32 menu_quit_game(running_machine *machine, UINT32 state); |
| 173 | | static UINT32 menu_select_game(running_machine *machine, UINT32 state); |
| 272 | static void menu_game_info(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 273 | static void menu_memory_card(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 274 | static void menu_memory_card_populate(running_machine *machine, ui_menu *menu, int cardnum); |
| 275 | static void menu_video_targets(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 276 | static void menu_video_targets_populate(running_machine *machine, ui_menu *menu); |
| 277 | static void menu_video_options(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 278 | static void menu_video_options_populate(running_machine *machine, ui_menu *menu, render_target *target); |
| 279 | static void menu_quit_game(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 280 | static void menu_select_game(running_machine *machine, ui_menu *menu, void *parameter, void *state); |
| 281 | static void menu_select_game_populate(running_machine *machine, ui_menu *menu, select_game_state *menustate); |
| 282 | static int CLIB_DECL menu_select_game_driver_compare(const void *elem1, const void *elem2); |
| 283 | static void menu_select_game_build_driver_list(ui_menu *menu, select_game_state *menustate); |
| 284 | static void menu_select_game_custom_render(running_machine *machine, ui_menu *menu, void *state, void *selectedref, float top, float bottom, float x, float y, float x2, float y2); |
| 174 | 285 | |
| 175 | 286 | /* menu helpers */ |
| 176 | 287 | static void menu_render_triangle(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param); |
| 288 | static void menu_settings_custom_render_one(float x1, float y1, float x2, float y2, const dip_descriptor *dip, UINT32 selectedmask); |
| 289 | static void menu_settings_custom_render(running_machine *machine, ui_menu *menu, void *state, void *selectedref, float top, float bottom, float x, float y, float x2, float y2); |
| 177 | 290 | |
| 178 | | static int input_menu_get_items(running_machine *machine, input_item_data *itemlist, int group); |
| 179 | | static int input_menu_get_game_items(running_machine *machine, input_item_data *itemlist); |
| 180 | | static void input_menu_toggle_none_default(input_seq *selected_seq, input_seq *original_seq, const input_seq *selected_defseq); |
| 181 | | static int input_menu_compare_items(const void *i1, const void *i2); |
| 182 | | static void switches_menu_add_item(ui_menu_item *item, const input_field_config *field); |
| 183 | | static void analog_menu_add_item(ui_menu_item *item, const input_field_config *field, const char *append_string, int which_item); |
| 184 | 291 | |
| 185 | | /* DIP switch helpers */ |
| 186 | | static void dip_switch_build_model(const input_field_config *field, int item_is_selected); |
| 187 | | static void dip_switch_draw_one(float dip_menu_x1, float dip_menu_y1, float dip_menu_x2, float dip_menu_y2, int model_index); |
| 188 | | static void dip_switch_render(const menu_extra *extra, float x1, float y1, float x2, float y2); |
| 189 | 292 | |
| 190 | | static int CLIB_DECL select_game_driver_compare(const void *elem1, const void *elem2); |
| 191 | | static void select_game_build_driver_list(void); |
| 192 | | static void select_game_render(const menu_extra *extra, float x1, float y1, float x2, float y2); |
| 193 | | static int select_game_handle_key(input_code keycode, char value); |
| 194 | | |
| 195 | | |
| 196 | 293 | /*************************************************************************** |
| 197 | 294 | INLINE FUNCTIONS |
| 198 | 295 | ***************************************************************************/ |
| 199 | 296 | |
| 200 | 297 | /*------------------------------------------------- |
| 201 | | menu_string_pool_add - add a formatted string |
| 202 | | to the string pool |
| 298 | get_field_default_seq - return a pointer |
| 299 | to the default sequence for the given field |
| 203 | 300 | -------------------------------------------------*/ |
| 204 | 301 | |
| 205 | | INLINE const char *CLIB_DECL ATTR_PRINTF(1,2) menu_string_pool_add(const char *format, ...) |
| 302 | INLINE const input_seq *get_field_default_seq(const input_field_config *field, int seqtype) |
| 206 | 303 | { |
| 207 | | char *result = &menu_string_pool[menu_string_pool_offset]; |
| 208 | | va_list arg; |
| 304 | if (input_seq_get_1(&field->seq[seqtype]) == SEQCODE_DEFAULT) |
| 305 | return input_type_seq(field->port->machine, field->type, field->player, seqtype); |
| 306 | else |
| 307 | return &field->seq[seqtype]; |
| 308 | } |
| 209 | 309 | |
| 210 | | /* print to the string pool */ |
| 211 | | va_start(arg, format); |
| 212 | | menu_string_pool_offset += vsprintf(result, format, arg) + 1; |
| 213 | | va_end(arg); |
| 214 | 310 | |
| 215 | | return result; |
| 311 | /*------------------------------------------------- |
| 312 | toggle_none_default - toggle between "NONE" |
| 313 | and the default item |
| 314 | -------------------------------------------------*/ |
| 315 | |
| 316 | INLINE void toggle_none_default(input_seq *selected_seq, input_seq *original_seq, const input_seq *selected_defseq) |
| 317 | { |
| 318 | /* if we used to be "none", toggle to the default value */ |
| 319 | if (input_seq_get_1(original_seq) == SEQCODE_END) |
| 320 | *selected_seq = *selected_defseq; |
| 321 | |
| 322 | /* otherwise, toggle to "none" */ |
| 323 | else |
| 324 | input_seq_set_1(selected_seq, SEQCODE_END); |
| 216 | 325 | } |
| 217 | 326 | |
| 218 | 327 | |
| 219 | 328 | /*------------------------------------------------- |
| 220 | | get_num_dips - return the number of physical |
| 221 | | DIP switches that are to be drawn |
| 329 | item_is_selectable - return TRUE if the given |
| 330 | item is selectable |
| 222 | 331 | -------------------------------------------------*/ |
| 223 | 332 | |
| 224 | | INLINE int get_num_dips(void) |
| 333 | INLINE int item_is_selectable(const ui_menu_item *item) |
| 225 | 334 | { |
| 226 | | int num; |
| 227 | | for (num = 0; num < MAX_PHYSICAL_DIPS; num++) |
| 228 | | if (dip_switch_model[num].dip_name == NULL) |
| 229 | | break; |
| 335 | return ((item->flags & MENU_FLAG_MULTILINE) == 0 && strcmp(item->text, MENU_SEPARATOR_ITEM) != 0); |
| 336 | } |
| 230 | 337 | |
| 231 | | return num; |
| 338 | |
| 339 | /*------------------------------------------------- |
| 340 | exclusive_input_pressed - return TRUE if the |
| 341 | given key is pressed and we haven't already |
| 342 | reported a key |
| 343 | -------------------------------------------------*/ |
| 344 | |
| 345 | INLINE int exclusive_input_pressed(ui_menu *menu, int key, int repeat) |
| 346 | { |
| 347 | if (menu->event.iptkey == IPT_INVALID && ui_input_pressed_repeat(menu->machine, key, repeat)) |
| 348 | { |
| 349 | menu->event.iptkey = key; |
| 350 | return TRUE; |
| 351 | } |
| 352 | return FALSE; |
| 232 | 353 | } |
| 233 | 354 | |
| 234 | 355 | |
| 235 | 356 | |
| 236 | 357 | /*************************************************************************** |
| 237 | | CORE IMPLEMENTATION |
| 358 | CORE SYSTEM MANAGEMENT |
| 238 | 359 | ***************************************************************************/ |
| 239 | 360 | |
| 240 | 361 | /*------------------------------------------------- |
| r2956 | r2957 | |
| 246 | 367 | int x; |
| 247 | 368 | |
| 248 | 369 | /* initialize the menu stack */ |
| 249 | | ui_menu_stack_reset(); |
| 250 | | select_game_buffer[0] = 0; |
| 370 | ui_menu_stack_reset(machine); |
| 251 | 371 | |
| 252 | 372 | /* create a texture for hilighting items */ |
| 253 | 373 | hilight_bitmap = bitmap_alloc(256, 1, BITMAP_FORMAT_ARGB32); |
| r2956 | r2957 | |
| 275 | 395 | |
| 276 | 396 | static void ui_menu_exit(running_machine *machine) |
| 277 | 397 | { |
| 398 | /* free menus */ |
| 399 | ui_menu_stack_reset(machine); |
| 400 | ui_menu_clear_free_list(machine); |
| 401 | |
| 278 | 402 | /* free textures */ |
| 279 | 403 | render_texture_free(hilight_texture); |
| 280 | 404 | bitmap_free(hilight_bitmap); |
| 281 | 405 | render_texture_free(arrow_texture); |
| 406 | } |
| 282 | 407 | |
| 283 | | /* free the driver list */ |
| 284 | | if (select_game_driver_list != NULL) |
| 285 | | free((void *)select_game_driver_list); |
| 286 | | select_game_driver_list = NULL; |
| 408 | |
| 409 | |
| 410 | /*************************************************************************** |
| 411 | CORE MENU MANAGEMENT |
| 412 | ***************************************************************************/ |
| 413 | |
| 414 | /*------------------------------------------------- |
| 415 | ui_menu_alloc - allocate a new menu |
| 416 | -------------------------------------------------*/ |
| 417 | |
| 418 | ui_menu *ui_menu_alloc(running_machine *machine, ui_menu_handler_func handler, void *parameter) |
| 419 | { |
| 420 | ui_menu *menu; |
| 421 | |
| 422 | /* allocate and clear memory for the menu and the state */ |
| 423 | menu = malloc_or_die(sizeof(*menu)); |
| 424 | memset(menu, 0, sizeof(*menu)); |
| 425 | |
| 426 | /* initialize the state */ |
| 427 | menu->machine = machine; |
| 428 | menu->handler = handler; |
| 429 | menu->parameter = parameter; |
| 430 | |
| 431 | /* reset the menu (adds a default entry) */ |
| 432 | ui_menu_reset(menu, UI_MENU_RESET_SELECT_FIRST); |
| 433 | return menu; |
| 287 | 434 | } |
| 288 | 435 | |
| 289 | 436 | |
| 290 | 437 | /*------------------------------------------------- |
| 438 | ui_menu_free - free a menu |
| 439 | -------------------------------------------------*/ |
| 440 | |
| 441 | void ui_menu_free(ui_menu *menu) |
| 442 | { |
| 443 | /* free the pools */ |
| 444 | while (menu->pool != NULL) |
| 445 | { |
| 446 | ui_menu_pool *pool = menu->pool; |
| 447 | menu->pool = pool->next; |
| 448 | free(pool); |
| 449 | } |
| 450 | |
| 451 | /* free the item array */ |
| 452 | if (menu->item != NULL) |
| 453 | free(menu->item); |
| 454 | |
| 455 | /* free the state */ |
| 456 | if (menu->state != NULL) |
| 457 | free(menu->state); |
| 458 | |
| 459 | /* free the menu */ |
| 460 | free(menu); |
| 461 | } |
| 462 | |
| 463 | |
| 464 | /*------------------------------------------------- |
| 465 | ui_menu_reset - free all items in the menu, |
| 466 | and all memory allocated from the memory pool |
| 467 | -------------------------------------------------*/ |
| 468 | |
| 469 | void ui_menu_reset(ui_menu *menu, ui_menu_reset_options options) |
| 470 | { |
| 471 | ui_menu_pool *pool; |
| 472 | |
| 473 | /* based on the reset option, set the reset info */ |
| 474 | menu->resetpos = 0; |
| 475 | menu->resetref = NULL; |
| 476 | if (options == UI_MENU_RESET_REMEMBER_POSITION) |
| 477 | menu->resetpos = menu->selected; |
| 478 | else if (options == UI_MENU_RESET_REMEMBER_REF) |
| 479 | menu->resetref = menu->item[menu->selected].ref; |
| 480 | |
| 481 | /* reset all the pools and the numitems back to 0 */ |
| 482 | for (pool = menu->pool; pool != NULL; pool = pool->next) |
| 483 | pool->top = (UINT8 *)(pool + 1); |
| 484 | menu->numitems = 0; |
| 485 | menu->visitems = 0; |
| 486 | menu->selected = 0; |
| 487 | |
| 488 | /* add an item to return */ |
| 489 | if (menu->parent == NULL) |
| 490 | ui_menu_item_append(menu, backtext, NULL, 0, NULL); |
| 491 | else if (menu->parent->handler == menu_quit_game) |
| 492 | ui_menu_item_append(menu, exittext, NULL, 0, NULL); |
| 493 | else |
| 494 | ui_menu_item_append(menu, priortext, NULL, 0, NULL); |
| 495 | } |
| 496 | |
| 497 | |
| 498 | /*------------------------------------------------- |
| 499 | ui_menu_populated - returns TRUE if the menu |
| 500 | has any non-default items in it |
| 501 | -------------------------------------------------*/ |
| 502 | |
| 503 | int ui_menu_populated(ui_menu *menu) |
| 504 | { |
| 505 | return (menu->numitems > 1); |
| 506 | } |
| 507 | |
| 508 | |
| 509 | /*------------------------------------------------- |
| 510 | ui_menu_item_append - append a new item to the |
| 511 | end of the menu |
| 512 | -------------------------------------------------*/ |
| 513 | |
| 514 | void ui_menu_item_append(ui_menu *menu, const char *text, const char *subtext, UINT32 flags, void *ref) |
| 515 | { |
| 516 | ui_menu_item *item; |
| 517 | int index; |
| 518 | |
| 519 | /* only allow multiline as the first item */ |
| 520 | if ((flags & MENU_FLAG_MULTILINE) != 0) |
| 521 | assert(menu->numitems == 1); |
| 522 | |
| 523 | /* only allow a single multi-line item */ |
| 524 | else if (menu->numitems >= 2) |
| 525 | assert((menu->item[0].flags & MENU_FLAG_MULTILINE) == 0); |
| 526 | |
| 527 | /* realloc the item array if necessary */ |
| 528 | if (menu->numitems >= menu->allocitems) |
| 529 | { |
| 530 | menu->allocitems += UI_MENU_ALLOC_ITEMS; |
| 531 | menu->item = realloc(menu->item, menu->allocitems * sizeof(*item)); |
| 532 | } |
| 533 | index = menu->numitems++; |
| 534 | |
| 535 | /* copy the previous last item to the next one */ |
| 536 | if (index != 0) |
| 537 | { |
| 538 | index--; |
| 539 | menu->item[index + 1] = menu->item[index]; |
| 540 | } |
| 541 | |
| 542 | /* allocate a new item and populte it */ |
| 543 | item = &menu->item[index]; |
| 544 | item->text = (text != NULL) ? ui_menu_pool_strdup(menu, text) : NULL; |
| 545 | item->subtext = (subtext != NULL) ? ui_menu_pool_strdup(menu, subtext) : NULL; |
| 546 | item->flags = flags; |
| 547 | item->ref = ref; |
| 548 | |
| 549 | /* update the selection if we need to */ |
| 550 | if (menu->resetpos == index || (menu->resetref != NULL && menu->resetref == ref)) |
| 551 | menu->selected = index; |
| 552 | } |
| 553 | |
| 554 | |
| 555 | /*------------------------------------------------- |
| 556 | ui_menu_process - process a menu, drawing it |
| 557 | and returning any interesting events |
| 558 | -------------------------------------------------*/ |
| 559 | |
| 560 | const ui_menu_event *ui_menu_process(ui_menu *menu, UINT32 flags) |
| 561 | { |
| 562 | /* reset the event */ |
| 563 | menu->event.iptkey = IPT_INVALID; |
| 564 | |
| 565 | /* first make sure our selection is valid */ |
| 566 | ui_menu_validate_selection(menu, 1); |
| 567 | |
| 568 | /* draw the menu */ |
| 569 | if (menu->numitems > 1 && (menu->item[0].flags & MENU_FLAG_MULTILINE) != 0) |
| 570 | ui_menu_draw_text_box(menu); |
| 571 | else |
| 572 | ui_menu_draw(menu); |
| 573 | |
| 574 | /* process input */ |
| 575 | if (!(flags & UI_MENU_PROCESS_NOKEYS)) |
| 576 | { |
| 577 | /* read events */ |
| 578 | ui_menu_handle_events(menu); |
| 579 | |
| 580 | /* handle the keys if we don't already have an event */ |
| 581 | if (menu->event.iptkey == IPT_INVALID) |
| 582 | ui_menu_handle_keys(menu, flags); |
| 583 | } |
| 584 | |
| 585 | /* update the selected item in the event */ |
| 586 | if (menu->event.iptkey != IPT_INVALID && menu->selected >= 0 && menu->selected < menu->numitems) |
| 587 | { |
| 588 | menu->event.itemref = menu->item[menu->selected].ref; |
| 589 | return &menu->event; |
| 590 | } |
| 591 | return NULL; |
| 592 | } |
| 593 | |
| 594 | |
| 595 | /*------------------------------------------------- |
| 596 | ui_menu_set_custom_render - configure the menu |
| 597 | for custom rendering |
| 598 | -------------------------------------------------*/ |
| 599 | |
| 600 | void ui_menu_set_custom_render(ui_menu *menu, ui_menu_custom_func custom, float top, float bottom) |
| 601 | { |
| 602 | menu->custom = custom; |
| 603 | menu->customtop = top; |
| 604 | menu->custombottom = bottom; |
| 605 | } |
| 606 | |
| 607 | |
| 608 | /*------------------------------------------------- |
| 609 | ui_menu_alloc_state - allocate permanent |
| 610 | memory to represent the menu's state |
| 611 | -------------------------------------------------*/ |
| 612 | |
| 613 | void *ui_menu_alloc_state(ui_menu *menu, size_t size) |
| 614 | { |
| 615 | if (menu->state != NULL) |
| 616 | free(menu->state); |
| 617 | menu->state = malloc_or_die(size); |
| 618 | memset(menu->state, 0, size); |
| 619 | |
| 620 | return menu->state; |
| 621 | } |
| 622 | |
| 623 | |
| 624 | /*------------------------------------------------- |
| 625 | ui_menu_pool_alloc - allocate temporary memory |
| 626 | from the menu's memory pool |
| 627 | -------------------------------------------------*/ |
| 628 | |
| 629 | void *ui_menu_pool_alloc(ui_menu *menu, size_t size) |
| 630 | { |
| 631 | ui_menu_pool *pool; |
| 632 | |
| 633 | assert(size < UI_MENU_POOL_SIZE); |
| 634 | |
| 635 | /* find a pool with enough room */ |
| 636 | for (pool = menu->pool; pool != NULL; pool = pool->next) |
| 637 | if (pool->end - pool->top >= size) |
| 638 | { |
| 639 | void *result = pool->top; |
| 640 | pool->top += size; |
| 641 | return result; |
| 642 | } |
| 643 | |
| 644 | /* allocate a new pool */ |
| 645 | pool = malloc_or_die(sizeof(*pool) + UI_MENU_POOL_SIZE); |
| 646 | memset(pool, 0, sizeof(*pool)); |
| 647 | |
| 648 | /* wire it up */ |
| 649 | pool->next = menu->pool; |
| 650 | menu->pool = pool; |
| 651 | pool->top = (UINT8 *)(pool + 1); |
| 652 | pool->end = pool->top + UI_MENU_POOL_SIZE; |
| 653 | return ui_menu_pool_alloc(menu, size); |
| 654 | } |
| 655 | |
| 656 | |
| 657 | /*------------------------------------------------- |
| 658 | ui_menu_pool_strdup - make a temporary string |
| 659 | copy in the menu's memory pool |
| 660 | -------------------------------------------------*/ |
| 661 | |
| 662 | const char *ui_menu_pool_strdup(ui_menu *menu, const char *string) |
| 663 | { |
| 664 | return strcpy(ui_menu_pool_alloc(menu, strlen(string) + 1), string); |
| 665 | } |
| 666 | |
| 667 | |
| 668 | /*------------------------------------------------- |
| 669 | ui_menu_get_selection - retrieves the index |
| 670 | of the currently selected menu item |
| 671 | -------------------------------------------------*/ |
| 672 | |
| 673 | void *ui_menu_get_selection(ui_menu *menu) |
| 674 | { |
| 675 | return (menu->selected >= 0 && menu->selected < menu->numitems) ? menu->item[menu->selected].ref : NULL; |
| 676 | } |
| 677 | |
| 678 | |
| 679 | /*------------------------------------------------- |
| 680 | ui_menu_set_selection - changes the index |
| 681 | of the currently selected menu item |
| 682 | -------------------------------------------------*/ |
| 683 | |
| 684 | void ui_menu_set_selection(ui_menu *menu, void *selected_itemref) |
| 685 | { |
| 686 | int itemnum; |
| 687 | |
| 688 | menu->selected = -1; |
| 689 | for (itemnum = 0; itemnum < menu->numitems; itemnum++) |
| 690 | if (menu->item[itemnum].ref == selected_itemref) |
| 691 | { |
| 692 | menu->selected = itemnum; |
| 693 | break; |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | |
| 698 | |
| 699 | /*************************************************************************** |
| 700 | INTERNAL MENU PROCESSING |
| 701 | ***************************************************************************/ |
| 702 | |
| 703 | /*------------------------------------------------- |
| 291 | 704 | ui_menu_draw - draw a menu |
| 292 | 705 | -------------------------------------------------*/ |
| 293 | 706 | |
| 294 | | int ui_menu_draw(const ui_menu_item *items, int numitems, int selected, const menu_extra *extra) |
| 707 | static void ui_menu_draw(ui_menu *menu) |
| 295 | 708 | { |
| 296 | 709 | float line_height = ui_get_line_height(); |
| 297 | 710 | float lr_arrow_width = 0.4f * line_height * render_get_ui_aspect(); |
| r2956 | r2957 | |
| 307 | 720 | int visible_lines; |
| 308 | 721 | int top_line; |
| 309 | 722 | int itemnum, linenum; |
| 723 | int mouse_hit; |
| 724 | render_target *mouse_target; |
| 725 | INT32 mouse_target_x, mouse_target_y; |
| 726 | float mouse_x = -1, mouse_y = -1; |
| 310 | 727 | |
| 311 | 728 | /* compute the width and height of the full menu */ |
| 312 | 729 | visible_width = 0; |
| 313 | 730 | visible_main_menu_height = 0; |
| 314 | | for (itemnum = 0; itemnum < numitems; itemnum++) |
| 731 | for (itemnum = 0; itemnum < menu->numitems; itemnum++) |
| 315 | 732 | { |
| 316 | | const ui_menu_item *item = &items[itemnum]; |
| 733 | const ui_menu_item *item = &menu->item[itemnum]; |
| 317 | 734 | float total_width; |
| 318 | 735 | |
| 319 | 736 | /* compute width of left hand side */ |
| r2956 | r2957 | |
| 331 | 748 | visible_main_menu_height += line_height; |
| 332 | 749 | } |
| 333 | 750 | |
| 334 | | /* if agumenting the menu, find out how much extra space is needed */ |
| 335 | | if (extra != NULL) |
| 336 | | visible_extra_menu_height = extra->top + extra->bottom; |
| 751 | /* account for extra space at the top and bottom */ |
| 752 | visible_extra_menu_height = menu->customtop + menu->custombottom; |
| 337 | 753 | |
| 338 | 754 | /* add a little bit of slop for rounding */ |
| 339 | 755 | visible_width += 0.01f; |
| r2956 | r2957 | |
| 355 | 771 | visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; |
| 356 | 772 | |
| 357 | 773 | /* if the menu is at the bottom of the extra, adjust */ |
| 358 | | if (extra != NULL) |
| 359 | | visible_top += extra->top; |
| 774 | visible_top += menu->customtop; |
| 360 | 775 | |
| 361 | 776 | /* first add us a box */ |
| 362 | 777 | x1 = visible_left - UI_BOX_LR_BORDER; |
| r2956 | r2957 | |
| 366 | 781 | ui_draw_outlined_box(x1, y1, x2, y2, UI_FILLCOLOR); |
| 367 | 782 | |
| 368 | 783 | /* determine the first visible line based on the current selection */ |
| 369 | | top_line = selected - visible_lines / 2; |
| 784 | top_line = menu->selected - visible_lines / 2; |
| 370 | 785 | if (top_line < 0) |
| 371 | 786 | top_line = 0; |
| 372 | | if (top_line + visible_lines >= numitems) |
| 373 | | top_line = numitems - visible_lines; |
| 787 | if (top_line + visible_lines >= menu->numitems) |
| 788 | top_line = menu->numitems - visible_lines; |
| 374 | 789 | |
| 375 | 790 | /* determine effective positions taking into account the hilighting arrows */ |
| 376 | 791 | effective_width = visible_width - 2.0f * gutter_width; |
| 377 | 792 | effective_left = visible_left + gutter_width; |
| 378 | 793 | |
| 794 | /* locate mouse */ |
| 795 | mouse_hit = FALSE; |
| 796 | mouse_target = ui_input_find_mouse(Machine, &mouse_target_x, &mouse_target_y); |
| 797 | if (mouse_target != NULL) |
| 798 | if (render_target_map_point_container(mouse_target, mouse_target_x, mouse_target_y, render_container_get_ui(), &mouse_x, &mouse_y)) |
| 799 | mouse_hit = TRUE; |
| 800 | |
| 379 | 801 | /* loop over visible lines */ |
| 802 | menu->hover = menu->numitems + 1; |
| 380 | 803 | for (linenum = 0; linenum < visible_lines; linenum++) |
| 381 | 804 | { |
| 382 | 805 | float line_y = visible_top + (float)linenum * line_height; |
| 383 | 806 | int itemnum = top_line + linenum; |
| 384 | | const ui_menu_item *item = &items[itemnum]; |
| 807 | const ui_menu_item *item = &menu->item[itemnum]; |
| 385 | 808 | const char *itemtext = item->text; |
| 386 | 809 | rgb_t fgcolor = text_fgcolor; |
| 387 | 810 | rgb_t bgcolor = text_bgcolor; |
| 811 | float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; |
| 812 | float line_y0 = line_y; |
| 813 | float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; |
| 814 | float line_y1 = line_y + line_height; |
| 388 | 815 | |
| 816 | /* set the hover if this is our item */ |
| 817 | if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && item_is_selectable(item)) |
| 818 | menu->hover = itemnum; |
| 819 | |
| 389 | 820 | /* if we're selected, draw with a different background */ |
| 390 | | if (itemnum == selected) |
| 821 | if (itemnum == menu->selected) |
| 391 | 822 | { |
| 392 | 823 | fgcolor = sel_fgcolor; |
| 393 | 824 | bgcolor = sel_bgcolor; |
| 394 | | render_ui_add_quad( x1 + 0.5f * UI_LINE_WIDTH, |
| 395 | | line_y, |
| 396 | | x2 - 0.5f * UI_LINE_WIDTH, |
| 397 | | line_y + line_height, |
| 398 | | bgcolor, |
| 399 | | hilight_texture, |
| 400 | | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); |
| 401 | 825 | } |
| 402 | 826 | |
| 827 | /* else if the mouse is over this item, draw with a different background */ |
| 828 | else if (menu->hover == itemnum) |
| 829 | { |
| 830 | fgcolor = mouseover_fgcolor; |
| 831 | bgcolor = mouseover_bgcolor; |
| 832 | } |
| 833 | |
| 834 | /* if we have some background hilighting to do, add a quad behind everything else */ |
| 835 | if (bgcolor != text_bgcolor) |
| 836 | render_ui_add_quad(line_x0, line_y0, line_x1, line_y1, bgcolor, hilight_texture, |
| 837 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); |
| 838 | |
| 403 | 839 | /* if we're on the top line, display the up arrow */ |
| 404 | 840 | if (linenum == 0 && top_line != 0) |
| 405 | 841 | { |
| r2956 | r2957 | |
| 410 | 846 | fgcolor, |
| 411 | 847 | arrow_texture, |
| 412 | 848 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT0)); |
| 849 | if (menu->hover == itemnum) |
| 850 | menu->hover = -2; |
| 413 | 851 | } |
| 414 | 852 | |
| 415 | 853 | /* if we're on the bottom line, display the down arrow */ |
| 416 | | else if (linenum == visible_lines - 1 && itemnum != numitems - 1) |
| 854 | else if (linenum == visible_lines - 1 && itemnum != menu->numitems - 1) |
| 417 | 855 | { |
| 418 | 856 | render_ui_add_quad( 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, |
| 419 | 857 | line_y + 0.25f * line_height, |
| r2956 | r2957 | |
| 422 | 860 | fgcolor, |
| 423 | 861 | arrow_texture, |
| 424 | 862 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT0 ^ ORIENTATION_FLIP_Y)); |
| 863 | if (menu->hover == itemnum) |
| 864 | menu->hover = -1; |
| 425 | 865 | } |
| 426 | 866 | |
| 427 | 867 | /* if we're just a divider, draw a line */ |
| r2956 | r2957 | |
| 451 | 891 | if (ui_get_string_width(subitem_text) > effective_width - item_width) |
| 452 | 892 | { |
| 453 | 893 | subitem_text = "..."; |
| 454 | | if (itemnum == selected) |
| 894 | if (itemnum == menu->selected) |
| 455 | 895 | selected_subitem_too_big = 1; |
| 456 | 896 | } |
| 457 | 897 | |
| r2956 | r2957 | |
| 460 | 900 | JUSTIFY_RIGHT, WRAP_TRUNCATE, subitem_invert ? DRAW_OPAQUE : DRAW_NORMAL, fgcolor, bgcolor, &subitem_width, NULL); |
| 461 | 901 | |
| 462 | 902 | /* apply arrows */ |
| 463 | | if (itemnum == selected && (item->flags & MENU_FLAG_LEFT_ARROW)) |
| 903 | if (itemnum == menu->selected && (item->flags & MENU_FLAG_LEFT_ARROW)) |
| 464 | 904 | { |
| 465 | 905 | render_ui_add_quad( effective_left + effective_width - subitem_width - gutter_width, |
| 466 | 906 | line_y + 0.1f * line_height, |
| r2956 | r2957 | |
| 470 | 910 | arrow_texture, |
| 471 | 911 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90 ^ ORIENTATION_FLIP_X)); |
| 472 | 912 | } |
| 473 | | if (itemnum == selected && (item->flags & MENU_FLAG_RIGHT_ARROW)) |
| 913 | if (itemnum == menu->selected && (item->flags & MENU_FLAG_RIGHT_ARROW)) |
| 474 | 914 | { |
| 475 | 915 | render_ui_add_quad( effective_left + effective_width + gutter_width - lr_arrow_width, |
| 476 | 916 | line_y + 0.1f * line_height, |
| r2956 | r2957 | |
| 486 | 926 | /* if the selected subitem is too big, display it in a separate offset box */ |
| 487 | 927 | if (selected_subitem_too_big) |
| 488 | 928 | { |
| 489 | | const ui_menu_item *item = &items[selected]; |
| 929 | const ui_menu_item *item = &menu->item[menu->selected]; |
| 490 | 930 | int subitem_invert = item->flags & MENU_FLAG_INVERT; |
| 491 | | int linenum = selected - top_line; |
| 931 | int linenum = menu->selected - top_line; |
| 492 | 932 | float line_y = visible_top + (float)linenum * line_height; |
| 493 | 933 | float target_width, target_height; |
| 494 | 934 | float target_x, target_y; |
| r2956 | r2957 | |
| 513 | 953 | } |
| 514 | 954 | |
| 515 | 955 | /* if there is somthing special to add, do it by calling the passed routine */ |
| 516 | | if (extra != NULL) |
| 517 | | (*extra->render)(extra, x1, y1, x2, y2); |
| 956 | if (menu->custom != NULL) |
| 957 | { |
| 958 | void *selectedref = (menu->selected >= 0 && menu->selected < menu->numitems) ? menu->item[menu->selected].ref : NULL; |
| 959 | (*menu->custom)(menu->machine, menu, menu->state, selectedref, menu->customtop, menu->custombottom, x1, y1, x2, y2); |
| 960 | } |
| 518 | 961 | |
| 519 | 962 | /* return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow */ |
| 520 | | return visible_lines - (top_line != 0) - (top_line + visible_lines != numitems); |
| 963 | menu->visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != menu->numitems); |
| 521 | 964 | } |
| 522 | 965 | |
| 523 | 966 | |
| r2956 | r2957 | |
| 527 | 970 | bottom |
| 528 | 971 | -------------------------------------------------*/ |
| 529 | 972 | |
| 530 | | static void ui_menu_draw_text_box(const char *text) |
| 973 | static void ui_menu_draw_text_box(ui_menu *menu) |
| 531 | 974 | { |
| 532 | | const char *priortext = "Return to Prior Menu"; |
| 975 | const char *text = menu->item[0].text; |
| 976 | const char *backtext = menu->item[1].text; |
| 533 | 977 | float line_height = ui_get_line_height(); |
| 534 | 978 | float lr_arrow_width = 0.4f * line_height * render_get_ui_aspect(); |
| 535 | 979 | float gutter_width = lr_arrow_width; |
| r2956 | r2957 | |
| 544 | 988 | target_height = floor((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; |
| 545 | 989 | |
| 546 | 990 | /* maximum against "return to prior menu" text */ |
| 547 | | prior_width = ui_get_string_width(priortext) + 2.0f * gutter_width; |
| 991 | prior_width = ui_get_string_width(backtext) + 2.0f * gutter_width; |
| 548 | 992 | target_width = MAX(target_width, prior_width); |
| 549 | 993 | |
| 550 | 994 | /* determine the target location */ |
| r2956 | r2957 | |
| 565 | 1009 | ui_draw_outlined_box(target_x - UI_BOX_LR_BORDER - gutter_width, |
| 566 | 1010 | target_y - UI_BOX_TB_BORDER, |
| 567 | 1011 | target_x + target_width + gutter_width + UI_BOX_LR_BORDER, |
| 568 | | target_y + target_height + UI_BOX_TB_BORDER, UI_FILLCOLOR); |
| 1012 | target_y + target_height + UI_BOX_TB_BORDER, (menu->item[0].flags & MENU_FLAG_REDTEXT) ? UI_REDCOLOR : UI_FILLCOLOR); |
| 569 | 1013 | ui_draw_text_full(text, target_x, target_y, target_width, |
| 570 | 1014 | JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, NULL, NULL); |
| 571 | 1015 | |
| r2956 | r2957 | |
| 577 | 1021 | sel_bgcolor, |
| 578 | 1022 | hilight_texture, |
| 579 | 1023 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); |
| 580 | | ui_draw_text_full(priortext, target_x, target_y + target_height - line_height, target_width, |
| 1024 | ui_draw_text_full(backtext, target_x, target_y + target_height - line_height, target_width, |
| 581 | 1025 | JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, sel_fgcolor, sel_bgcolor, NULL, NULL); |
| 1026 | |
| 1027 | /* artificially set the hover to the last item so a double-click exits */ |
| 1028 | menu->hover = menu->numitems - 1; |
| 582 | 1029 | } |
| 583 | 1030 | |
| 584 | 1031 | |
| 585 | 1032 | /*------------------------------------------------- |
| 586 | | ui_menu_generic_keys - generically handle |
| 1033 | ui_menu_handle_events - generically handle |
| 1034 | input events for a menu |
| 1035 | -------------------------------------------------*/ |
| 1036 | |
| 1037 | static void ui_menu_handle_events(ui_menu *menu) |
| 1038 | { |
| 1039 | int stop = FALSE; |
| 1040 | ui_event event; |
| 1041 | |
| 1042 | /* loop while we have interesting events */ |
| 1043 | while (ui_input_pop_event(menu->machine, &event) && !stop) |
| 1044 | { |
| 1045 | switch (event.event_type) |
| 1046 | { |
| 1047 | /* if we are hovering over a valid item, select it with a single click */ |
| 1048 | case UI_EVENT_MOUSE_CLICK: |
| 1049 | if (menu->hover >= 0 && menu->hover < menu->numitems) |
| 1050 | menu->selected = menu->hover; |
| 1051 | else if (menu->hover == -2) |
| 1052 | { |
| 1053 | menu->selected -= menu->visitems - 1; |
| 1054 | ui_menu_validate_selection(menu, 1); |
| 1055 | } |
| 1056 | else if (menu->hover == -1) |
| 1057 | { |
| 1058 | menu->selected += menu->visitems - 1; |
| 1059 | ui_menu_validate_selection(menu, 1); |
| 1060 | } |
| 1061 | break; |
| 1062 | |
| 1063 | /* if we are hovering over a valid item, fake a UI_SELECT with a double-click */ |
| 1064 | case UI_EVENT_MOUSE_DOUBLE_CLICK: |
| 1065 | if (menu->hover >= 0 && menu->hover < menu->numitems) |
| 1066 | { |
| 1067 | menu->selected = menu->hover; |
| 1068 | if (event.event_type == UI_EVENT_MOUSE_DOUBLE_CLICK) |
| 1069 | { |
| 1070 | menu->event.iptkey = IPT_UI_SELECT; |
| 1071 | if (menu->selected == menu->numitems - 1) |
| 1072 | { |
| 1073 | menu->event.iptkey = IPT_UI_CANCEL; |
| 1074 | ui_menu_stack_pop(menu->machine); |
| 1075 | } |
| 1076 | } |
| 1077 | stop = TRUE; |
| 1078 | } |
| 1079 | break; |
| 1080 | |
| 1081 | /* translate CHAR events into specials */ |
| 1082 | case UI_EVENT_CHAR: |
| 1083 | menu->event.iptkey = IPT_SPECIAL; |
| 1084 | menu->event.unichar = event.ch; |
| 1085 | stop = TRUE; |
| 1086 | break; |
| 1087 | |
| 1088 | /* ignore everything else */ |
| 1089 | default: |
| 1090 | break; |
| 1091 | } |
| 1092 | } |
| 1093 | } |
| 1094 | |
| 1095 | |
| 1096 | /*------------------------------------------------- |
| 1097 | ui_menu_handle_keys - generically handle |
| 587 | 1098 | keys for a menu |
| 588 | 1099 | -------------------------------------------------*/ |
| 589 | 1100 | |
| 590 | | int ui_menu_generic_keys(running_machine *machine, UINT32 *selected, int num_items, int visible_items) |
| 1101 | static void ui_menu_handle_keys(ui_menu *menu, UINT32 flags) |
| 591 | 1102 | { |
| 592 | | /* hitting cancel or selecting the last item returns to the previous menu */ |
| 593 | | if (input_ui_pressed(machine, IPT_UI_CANCEL) || (*selected == num_items - 1 && input_ui_pressed(machine, IPT_UI_SELECT))) |
| 1103 | int ignorepause = ui_menu_is_force_game_select(); |
| 1104 | int ignoreright = FALSE; |
| 1105 | int ignoreleft = FALSE; |
| 1106 | int code; |
| 1107 | |
| 1108 | /* bail if no items */ |
| 1109 | if (menu->numitems == 0) |
| 1110 | return; |
| 1111 | |
| 1112 | /* if we hit select, return TRUE or pop the stack, depending on the item */ |
| 1113 | if (exclusive_input_pressed(menu, IPT_UI_SELECT, 0)) |
| 594 | 1114 | { |
| 595 | | *selected = ui_menu_stack_pop(); |
| 596 | | return 1; |
| 1115 | if (menu->selected == menu->numitems - 1) |
| 1116 | { |
| 1117 | menu->event.iptkey = IPT_UI_CANCEL; |
| 1118 | ui_menu_stack_pop(menu->machine); |
| 1119 | } |
| 1120 | return; |
| 597 | 1121 | } |
| 598 | 1122 | |
| 1123 | /* hitting cancel also pops the stack */ |
| 1124 | if (exclusive_input_pressed(menu, IPT_UI_CANCEL, 0)) |
| 1125 | { |
| 1126 | ui_menu_stack_pop(menu->machine); |
| 1127 | return; |
| 1128 | } |
| 1129 | |
| 1130 | /* validate the current selection */ |
| 1131 | ui_menu_validate_selection(menu, 1); |
| 1132 | |
| 1133 | /* swallow left/right keys if they are not appropriate */ |
| 1134 | ignoreleft = ((menu->item[menu->selected].flags & MENU_FLAG_LEFT_ARROW) == 0); |
| 1135 | ignoreright = ((menu->item[menu->selected].flags & MENU_FLAG_RIGHT_ARROW) == 0); |
| 1136 | |
| 1137 | /* accept left/right keys as-is with repeat */ |
| 1138 | if (!ignoreleft && exclusive_input_pressed(menu, IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0)) |
| 1139 | return; |
| 1140 | if (!ignoreright && exclusive_input_pressed(menu, IPT_UI_RIGHT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0)) |
| 1141 | return; |
| 1142 | |
| 599 | 1143 | /* up backs up by one item */ |
| 600 | | if (input_ui_pressed_repeat(machine, IPT_UI_UP, 6)) |
| 601 | | *selected = (*selected + num_items - 1) % num_items; |
| 1144 | if (exclusive_input_pressed(menu, IPT_UI_UP, 6)) |
| 1145 | { |
| 1146 | menu->selected = (menu->selected + menu->numitems - 1) % menu->numitems; |
| 1147 | ui_menu_validate_selection(menu, -1); |
| 1148 | } |
| 602 | 1149 | |
| 603 | 1150 | /* down advances by one item */ |
| 604 | | if (input_ui_pressed_repeat(machine, IPT_UI_DOWN, 6)) |
| 605 | | *selected = (*selected + 1) % num_items; |
| 1151 | if (exclusive_input_pressed(menu, IPT_UI_DOWN, 6)) |
| 1152 | { |
| 1153 | menu->selected = (menu->selected + 1) % menu->numitems; |
| 1154 | ui_menu_validate_selection(menu, 1); |
| 1155 | } |
| 606 | 1156 | |
| 607 | | /* page up backs up by visible_items */ |
| 608 | | if (input_ui_pressed_repeat(machine, IPT_UI_PAGE_UP, 6)) |
| 1157 | /* page up backs up by visitems */ |
| 1158 | if (exclusive_input_pressed(menu, IPT_UI_PAGE_UP, 6)) |
| 609 | 1159 | { |
| 610 | | if (*selected >= visible_items - 1) |
| 611 | | *selected -= visible_items - 1; |
| 612 | | else |
| 613 | | *selected = 0; |
| 1160 | menu->selected -= menu->visitems - 1; |
| 1161 | ui_menu_validate_selection(menu, 1); |
| 614 | 1162 | } |
| 615 | 1163 | |
| 616 | | /* page down advances by visible_items */ |
| 617 | | if (input_ui_pressed_repeat(machine, IPT_UI_PAGE_DOWN, 6)) |
| 1164 | /* page down advances by visitems */ |
| 1165 | if (exclusive_input_pressed(menu, IPT_UI_PAGE_DOWN, 6)) |
| 618 | 1166 | { |
| 619 | | *selected += visible_items - 1; |
| 620 | | if (*selected >= num_items) |
| 621 | | *selected = num_items - 1; |
| 1167 | menu->selected += menu->visitems - 1; |
| 1168 | ui_menu_validate_selection(menu, -1); |
| 622 | 1169 | } |
| 623 | 1170 | |
| 624 | 1171 | /* home goes to the start */ |
| 625 | | if (input_ui_pressed(machine, IPT_UI_HOME)) |
| 626 | | *selected = 0; |
| 1172 | if (exclusive_input_pressed(menu, IPT_UI_HOME, 0)) |
| 1173 | { |
| 1174 | menu->selected = 0; |
| 1175 | ui_menu_validate_selection(menu, 1); |
| 1176 | } |
| 627 | 1177 | |
| 628 | 1178 | /* end goes to the last */ |
| 629 | | if (input_ui_pressed(machine, IPT_UI_END)) |
| 630 | | *selected = num_items - 1; |
| 1179 | if (exclusive_input_pressed(menu, IPT_UI_END, 0)) |
| 1180 | { |
| 1181 | menu->selected = menu->numitems - 1; |
| 1182 | ui_menu_validate_selection(menu, -1); |
| 1183 | } |
| 631 | 1184 | |
| 632 | 1185 | /* pause enables/disables pause */ |
| 633 | | if (input_ui_pressed(machine, IPT_UI_PAUSE)) |
| 634 | | mame_pause(Machine, !mame_is_paused(Machine)); |
| 1186 | if (!ignorepause && exclusive_input_pressed(menu, IPT_UI_PAUSE, 0)) |
| 1187 | mame_pause(menu->machine, !mame_is_paused(menu->machine)); |
| 635 | 1188 | |
| 636 | | return 0; |
| 1189 | /* see if any other UI keys are pressed */ |
| 1190 | if (menu->event.iptkey == IPT_INVALID) |
| 1191 | for (code = __ipt_ui_start; code <= __ipt_ui_end; code++) |
| 1192 | { |
| 1193 | if ((code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause)) |
| 1194 | continue; |
| 1195 | if (exclusive_input_pressed(menu, code, 0)) |
| 1196 | break; |
| 1197 | } |
| 637 | 1198 | } |
| 638 | 1199 | |
| 639 | 1200 | |
| 640 | 1201 | /*------------------------------------------------- |
| 1202 | ui_menu_validate_selection - validate the |
| 1203 | current selection and ensure it is on a |
| 1204 | correct item |
| 1205 | -------------------------------------------------*/ |
| 1206 | |
| 1207 | static void ui_menu_validate_selection(ui_menu *menu, int scandir) |
| 1208 | { |
| 1209 | /* clamp to be in range */ |
| 1210 | if (menu->selected < 0) |
| 1211 | menu->selected = 0; |
| 1212 | else if (menu->selected >= menu->numitems) |
| 1213 | menu->selected = menu->numitems - 1; |
| 1214 | |
| 1215 | /* skip past unselectable items */ |
| 1216 | while (!item_is_selectable(&menu->item[menu->selected])) |
| 1217 | menu->selected = (menu->selected + menu->numitems + scandir) % menu->numitems; |
| 1218 | } |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | /*------------------------------------------------- |
| 1223 | ui_menu_clear_free_list - clear out anything |
| 1224 | accumulated in the free list |
| 1225 | -------------------------------------------------*/ |
| 1226 | |
| 1227 | static void ui_menu_clear_free_list(running_machine *machine) |
| 1228 | { |
| 1229 | while (menu_free != NULL) |
| 1230 | { |
| 1231 | ui_menu *menu = menu_free; |
| 1232 | menu_free = menu->parent; |
| 1233 | ui_menu_free(menu); |
| 1234 | } |
| 1235 | } |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | /*************************************************************************** |
| 1240 | MENU STACK MANAGEMENT |
| 1241 | ***************************************************************************/ |
| 1242 | |
| 1243 | /*------------------------------------------------- |
| 641 | 1244 | ui_menu_stack_reset - reset the menu stack |
| 642 | 1245 | -------------------------------------------------*/ |
| 643 | 1246 | |
| 644 | | void ui_menu_stack_reset(void) |
| 1247 | void ui_menu_stack_reset(running_machine *machine) |
| 645 | 1248 | { |
| 646 | | menu_state *state = &menu_stack[menu_stack_index = 0]; |
| 647 | | state->handler = NULL; |
| 648 | | state->state = 0; |
| 1249 | while (menu_stack != NULL) |
| 1250 | ui_menu_stack_pop(machine); |
| 649 | 1251 | } |
| 650 | 1252 | |
| 651 | 1253 | |
| r2956 | r2957 | |
| 654 | 1256 | stack |
| 655 | 1257 | -------------------------------------------------*/ |
| 656 | 1258 | |
| 657 | | UINT32 ui_menu_stack_push(ui_menu_handler_func new_handler, UINT32 new_state) |
| 1259 | void ui_menu_stack_push(ui_menu *menu) |
| 658 | 1260 | { |
| 659 | | menu_state *state = &menu_stack[++menu_stack_index]; |
| 660 | | assert(menu_stack_index < MENU_STACK_DEPTH); |
| 661 | | state->handler = new_handler; |
| 662 | | state->state = new_state; |
| 663 | | return new_state; |
| 1261 | menu->parent = menu_stack; |
| 1262 | menu_stack = menu; |
| 1263 | ui_menu_reset(menu, UI_MENU_RESET_SELECT_FIRST); |
| 1264 | ui_input_reset(menu->machine); |
| 664 | 1265 | } |
| 665 | 1266 | |
| 666 | 1267 | |
| r2956 | r2957 | |
| 668 | 1269 | ui_menu_stack_pop - pop a menu from the stack |
| 669 | 1270 | -------------------------------------------------*/ |
| 670 | 1271 | |
| 671 | | UINT32 ui_menu_stack_pop(void) |
| 1272 | void ui_menu_stack_pop(running_machine *machine) |
| 672 | 1273 | { |
| 673 | | menu_state *state = &menu_stack[--menu_stack_index]; |
| 674 | | assert(menu_stack_index >= 0); |
| 675 | | return state->state; |
| 1274 | if (menu_stack != NULL) |
| 1275 | { |
| 1276 | ui_menu *menu = menu_stack; |
| 1277 | menu_stack = menu->parent; |
| 1278 | menu->parent = menu_free; |
| 1279 | menu_free = menu; |
| 1280 | ui_input_reset(machine); |
| 1281 | } |
| 676 | 1282 | } |
| 677 | 1283 | |
| 678 | 1284 | |
| 1285 | |
| 1286 | /*************************************************************************** |
| 1287 | UI SYSTEM INTERACTION |
| 1288 | ***************************************************************************/ |
| 1289 | |
| 679 | 1290 | /*------------------------------------------------- |
| 680 | 1291 | ui_menu_ui_handler - displays the current menu |
| 681 | 1292 | and calls the menu handler |
| r2956 | r2957 | |
| 683 | 1294 | |
| 684 | 1295 | UINT32 ui_menu_ui_handler(running_machine *machine, UINT32 state) |
| 685 | 1296 | { |
| 686 | | UINT32 newstate; |
| 687 | | |
| 688 | 1297 | /* if we have no menus stacked up, start with the main menu */ |
| 689 | | if (menu_stack[menu_stack_index].handler == NULL) |
| 690 | | ui_menu_stack_push(menu_main, 0); |
| 1298 | if (menu_stack == NULL) |
| 1299 | ui_menu_stack_push(ui_menu_alloc(machine, menu_main, NULL)); |
| 691 | 1300 | |
| 692 | 1301 | /* update the menu state */ |
| 693 | | newstate = (*menu_stack[menu_stack_index].handler)(machine, menu_stack[menu_stack_index].state); |
| 694 | | menu_stack[menu_stack_index].state = newstate; |
| 1302 | if (menu_stack != NULL) |
| 1303 | { |
| 1304 | ui_menu *menu = menu_stack; |
| 1305 | (*menu->handler)(machine, menu, menu->parameter, menu->state); |
| 1306 | } |
| 695 | 1307 | |
| 1308 | /* clear up anything pending to be released */ |
| 1309 | ui_menu_clear_free_list(machine); |
| 1310 | |
| 696 | 1311 | /* if the menus are to be hidden, return a cancel here */ |
| 697 | | if ((input_ui_pressed(machine, IPT_UI_CONFIGURE) && !ui_menu_is_force_game_select()) || menu_stack[menu_stack_index].handler == NULL) |
| 1312 | if ((ui_input_pressed(machine, IPT_UI_CONFIGURE) && !ui_menu_is_force_game_select()) || menu_stack == NULL) |
| 698 | 1313 | return UI_HANDLER_CANCEL; |
| 699 | 1314 | |
| 700 | 1315 | return 0; |
| r2956 | r2957 | |
| 708 | 1323 | |
| 709 | 1324 | void ui_menu_force_game_select(void) |
| 710 | 1325 | { |
| 1326 | char *gamename = (char *)options_get_string(mame_options(), OPTION_GAMENAME); |
| 1327 | |
| 711 | 1328 | /* reset the menu stack */ |
| 712 | | ui_menu_stack_reset(); |
| 1329 | ui_menu_stack_reset(Machine); |
| 713 | 1330 | |
| 714 | 1331 | /* add the quit entry followed by the game select entry */ |
| 715 | | ui_menu_stack_push(menu_quit_game, 0); |
| 716 | | ui_menu_stack_push(menu_select_game, 1 << 16); |
| 1332 | ui_menu_stack_push(ui_menu_alloc(Machine, menu_quit_game, NULL)); |
| 1333 | ui_menu_stack_push(ui_menu_alloc(Machine, menu_select_game, gamename)); |
| 717 | 1334 | |
| 718 | | /* initialize the game name buffer */ |
| 719 | | select_game_buffer[0] = 0; |
| 720 | | strcpy(select_game_buffer, options_get_string(mame_options(), OPTION_GAMENAME)); |
| 721 | | |
| 722 | 1335 | /* force the menus on */ |
| 723 | 1336 | ui_show_menu(); |
| 724 | 1337 | |
| r2956 | r2957 | |
| 735 | 1348 | |
| 736 | 1349 | int ui_menu_is_force_game_select(void) |
| 737 | 1350 | { |
| 738 | | return (menu_stack_index >= 2 && menu_stack[1].handler == menu_quit_game); |
| 1351 | ui_menu *menu; |
| 1352 | |
| 1353 | for (menu = menu_stack; menu != NULL; menu = menu->parent) |
| 1354 | if (menu->handler == menu_quit_game && menu->parent == NULL) |
| 1355 | return TRUE; |
| 1356 | |
| 1357 | return FALSE; |
| 739 | 1358 | } |
| 740 | 1359 | |
| 741 | 1360 | |
| r2956 | r2957 | |
| 745 | 1364 | ***************************************************************************/ |
| 746 | 1365 | |
| 747 | 1366 | /*------------------------------------------------- |
| 748 | | menu_main - main UI menu |
| 1367 | menu_main - handle the main menu |
| 749 | 1368 | -------------------------------------------------*/ |
| 750 | 1369 | |
| 751 | | static UINT32 menu_main(running_machine *machine, UINT32 state) |
| 1370 | static void menu_main(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 752 | 1371 | { |
| 753 | | #define ADD_MENU(name, _handler, _param) \ |
| 754 | | do { \ |
| 755 | | item_list[menu_items].text = name; \ |
| 756 | | handler_list[menu_items].handler = _handler; \ |
| 757 | | handler_list[menu_items].state = _param; \ |
| 758 | | menu_items++; \ |
| 759 | | } while (0) |
| 1372 | const ui_menu_event *event; |
| 760 | 1373 | |
| 1374 | /* if the menu isn't built, populate now */ |
| 1375 | if (!ui_menu_populated(menu)) |
| 1376 | menu_main_populate(machine, menu, state); |
| 1377 | |
| 1378 | /* process the menu */ |
| 1379 | event = ui_menu_process(menu, 0); |
| 1380 | if (event != NULL && event->iptkey == IPT_UI_SELECT) |
| 1381 | ui_menu_stack_push(ui_menu_alloc(machine, event->itemref, NULL)); |
| 1382 | } |
| 1383 | |
| 1384 | |
| 1385 | /*------------------------------------------------- |
| 1386 | menu_main_populate - populate the main menu |
| 1387 | -------------------------------------------------*/ |
| 1388 | |
| 1389 | static void menu_main_populate(running_machine *machine, ui_menu *menu, void *state) |
| 1390 | { |
| 1391 | const input_field_config *field; |
| 761 | 1392 | const input_port_config *port; |
| 762 | | const input_field_config *field; |
| 763 | | menu_state handler_list[20]; |
| 764 | | ui_menu_item item_list[20]; |
| 765 | 1393 | int has_categories = FALSE; |
| 766 | 1394 | int has_configs = FALSE; |
| 767 | 1395 | int has_analog = FALSE; |
| 768 | 1396 | int has_dips = FALSE; |
| 769 | | int menu_items = 0; |
| 770 | | int visible_items; |
| 771 | 1397 | |
| 772 | 1398 | /* scan the input port array to see what options we need to enable */ |
| 773 | 1399 | for (port = machine->portconfig; port != NULL; port = port->next) |
| r2956 | r2957 | |
| 783 | 1409 | has_analog = TRUE; |
| 784 | 1410 | } |
| 785 | 1411 | |
| 786 | | /* reset the menu */ |
| 787 | | memset(item_list, 0, sizeof(item_list)); |
| 788 | | |
| 789 | 1412 | /* add input menu items */ |
| 790 | | ADD_MENU("Input (general)", menu_input_groups, 0); |
| 791 | | ADD_MENU("Input (this " CAPSTARTGAMENOUN ")", menu_input, 1000 << 16); |
| 1413 | ui_menu_item_append(menu, "Input (general)", NULL, 0, menu_input_groups); |
| 1414 | ui_menu_item_append(menu, "Input (this " CAPSTARTGAMENOUN ")", NULL, 0, menu_input_specific); |
| 792 | 1415 | |
| 793 | 1416 | /* add optional input-related menus */ |
| 794 | 1417 | if (has_dips) |
| 795 | | ADD_MENU("Dip Switches", menu_switches, IPT_DIPSWITCH << 16); |
| 1418 | ui_menu_item_append(menu, "Dip Switches", NULL, 0, menu_settings_dip_switches); |
| 796 | 1419 | if (has_configs) |
| 797 | | ADD_MENU("Driver Configuration", menu_switches, IPT_CONFIG << 16); |
| 798 | | #ifdef MESS |
| 1420 | ui_menu_item_append(menu, "Driver Configuration", NULL, 0, menu_settings_driver_config); |
| 799 | 1421 | if (has_categories) |
| 800 | | ADD_MENU("Categories", menu_switches, IPT_CATEGORY << 16); |
| 801 | | #endif |
| 1422 | ui_menu_item_append(menu, "Categories", NULL, 0, menu_settings_categories); |
| 802 | 1423 | if (has_analog) |
| 803 | | ADD_MENU("Analog Controls", menu_analog, 0); |
| 1424 | ui_menu_item_append(menu, "Analog Controls", NULL, 0, menu_analog); |
| 804 | 1425 | |
| 805 | 1426 | #ifndef MESS |
| 806 | 1427 | /* add bookkeeping menu */ |
| 807 | | ADD_MENU("Bookkeeping Info", menu_bookkeeping, 0); |
| 1428 | ui_menu_item_append(menu, "Bookkeeping Info", NULL, 0, menu_bookkeeping); |
| 808 | 1429 | #endif |
| 809 | 1430 | |
| 810 | 1431 | /* add game info menu */ |
| 811 | | ADD_MENU(CAPSTARTGAMENOUN " Information", menu_game_info, 0); |
| 1432 | ui_menu_item_append(menu, CAPSTARTGAMENOUN " Information", NULL, 0, menu_game_info); |
| 812 | 1433 | |
| 813 | 1434 | #ifdef MESS |
| 814 | 1435 | /* add image info menu */ |
| 815 | | ADD_MENU("Image Information", ui_menu_image_info, 0); |
| 1436 | ui_menu_item_append(menu, "Image Information", NULL, 0, ui_menu_image_info); |
| 816 | 1437 | |
| 817 | 1438 | /* add image info menu */ |
| 818 | | ADD_MENU("File Manager", menu_file_manager, 1); |
| 1439 | ui_menu_item_append(menu, "File Manager", NULL, 0, menu_file_manager); |
| 819 | 1440 | |
| 820 | 1441 | #if HAS_WAVE |
| 821 | 1442 | /* add tape control menu */ |
| 822 | 1443 | if (device_find_from_machine(machine, IO_CASSETTE)) |
| 823 | | ADD_MENU("Tape Control", menu_tape_control, 1); |
| 1444 | ui_menu_item_append(menu, "Tape Control", NULL, 0, menu_tape_control); |
| 824 | 1445 | #endif /* HAS_WAVE */ |
| 825 | 1446 | #endif /* MESS */ |
| 826 | 1447 | |
| 827 | 1448 | /* add video options menu */ |
| 828 | | ADD_MENU("Video Options", menu_video, 1000 << 16); |
| 1449 | ui_menu_item_append(menu, "Video Options", NULL, 0, (render_target_get_indexed(1) != NULL) ? menu_video_targets : menu_video_options); |
| 829 | 1450 | |
| 830 | 1451 | /* add cheat menu */ |
| 831 | | if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 832 | | ADD_MENU("Cheat", menu_cheat, 1); |
| 1452 | // if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 1453 | // ui_menu_item_append(menu, "Cheat", NULL, 0, menu_cheat); |
| 833 | 1454 | |
| 834 | 1455 | /* add memory card menu */ |
| 835 | 1456 | if (machine->config->memcard_handler != NULL) |
| 836 | | ADD_MENU("Memory Card", menu_memory_card, 0); |
| 1457 | ui_menu_item_append(menu, "Memory Card", NULL, 0, menu_memory_card); |
| 837 | 1458 | |
| 838 | 1459 | /* add reset and exit menus */ |
| 839 | | ADD_MENU("Select New " CAPSTARTGAMENOUN, menu_select_game, 1 << 16); |
| 840 | | ADD_MENU("Return to " CAPSTARTGAMENOUN, NULL, 0); |
| 1460 | ui_menu_item_append(menu, "Select New " CAPSTARTGAMENOUN, NULL, 0, menu_select_game); |
| 1461 | } |
| 841 | 1462 | |
| 842 | | /* draw the menu */ |
| 843 | | visible_items = ui_menu_draw(item_list, menu_items, state, NULL); |
| 844 | 1463 | |
| 845 | | /* handle the keys */ |
| 846 | | if (ui_menu_generic_keys(machine, &state, menu_items, visible_items)) |
| 847 | | return state; |
| 848 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 849 | | return ui_menu_stack_push(handler_list[state].handler, handler_list[state].state); |
| 1464 | /*------------------------------------------------- |
| 1465 | menu_input_groups - handle the input groups |
| 1466 | menu |
| 1467 | -------------------------------------------------*/ |
| 850 | 1468 | |
| 851 | | return state; |
| 1469 | static void menu_input_groups(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1470 | { |
| 1471 | const ui_menu_event *event; |
| 852 | 1472 | |
| 853 | | #undef ADD_MENU |
| 1473 | /* if the menu isn't built, populate now */ |
| 1474 | if (!ui_menu_populated(menu)) |
| 1475 | menu_input_groups_populate(machine, menu, state); |
| 1476 | |
| 1477 | /* process the menu */ |
| 1478 | event = ui_menu_process(menu, 0); |
| 1479 | if (event != NULL && event->iptkey == IPT_UI_SELECT) |
| 1480 | ui_menu_stack_push(ui_menu_alloc(machine, menu_input_general, event->itemref)); |
| 854 | 1481 | } |
| 855 | 1482 | |
| 856 | 1483 | |
| 857 | 1484 | /*------------------------------------------------- |
| 858 | | menu_input_groups - menu displaying input |
| 859 | | groups |
| 1485 | menu_input_groups_populate - populate the |
| 1486 | input groups menu |
| 860 | 1487 | -------------------------------------------------*/ |
| 861 | 1488 | |
| 862 | | static UINT32 menu_input_groups(running_machine *machine, UINT32 state) |
| 1489 | static void menu_input_groups_populate(running_machine *machine, ui_menu *menu, void *state) |
| 863 | 1490 | { |
| 864 | | ui_menu_item item_list[IPG_TOTAL_GROUPS + 2]; |
| 865 | | int menu_items = 0; |
| 866 | | int visible_items; |
| 867 | 1491 | int player; |
| 868 | 1492 | |
| 869 | | /* reset the menu */ |
| 870 | | memset(item_list, 0, sizeof(item_list)); |
| 871 | | menu_string_pool_offset = 0; |
| 872 | | |
| 873 | 1493 | /* build up the menu */ |
| 874 | | item_list[menu_items++].text = "User Interface"; |
| 1494 | ui_menu_item_append(menu, "User Interface", NULL, 0, (void *)(IPG_UI + 1)); |
| 875 | 1495 | for (player = 0; player < MAX_PLAYERS; player++) |
| 876 | | item_list[menu_items++].text = menu_string_pool_add("Player %d Controls", player + 1); |
| 877 | | item_list[menu_items++].text = "Other Controls"; |
| 1496 | { |
| 1497 | char buffer[40]; |
| 1498 | sprintf(buffer, "Player %d Controls", player + 1); |
| 1499 | ui_menu_item_append(menu, buffer, NULL, 0, (void *)(FPTR)(IPG_PLAYER1 + player + 1)); |
| 1500 | } |
| 1501 | ui_menu_item_append(menu, "Other Controls", NULL, 0, (void *)(FPTR)(IPG_OTHER + 1)); |
| 1502 | } |
| 878 | 1503 | |
| 879 | | /* add an item for the return */ |
| 880 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 881 | 1504 | |
| 882 | | /* draw the menu */ |
| 883 | | visible_items = ui_menu_draw(item_list, menu_items, state, NULL); |
| 884 | 1505 | |
| 885 | | /* handle the keys */ |
| 886 | | if (ui_menu_generic_keys(machine, &state, menu_items, visible_items)) |
| 887 | | return state; |
| 888 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 889 | | return ui_menu_stack_push(menu_input, state << 16); |
| 1506 | /*------------------------------------------------- |
| 1507 | menu_input_general - handle the general |
| 1508 | input menu |
| 1509 | -------------------------------------------------*/ |
| 890 | 1510 | |
| 891 | | return state; |
| 1511 | static void menu_input_general(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1512 | { |
| 1513 | menu_input_common(machine, menu, parameter, state); |
| 892 | 1514 | } |
| 893 | 1515 | |
| 894 | 1516 | |
| 895 | 1517 | /*------------------------------------------------- |
| 896 | | menu_input - display a menu for inputs |
| 1518 | menu_input_general_populate - populate the |
| 1519 | general input menu |
| 897 | 1520 | -------------------------------------------------*/ |
| 898 | 1521 | |
| 899 | | static UINT32 menu_input(running_machine *machine, UINT32 state) |
| 1522 | static void menu_input_general_populate(running_machine *machine, ui_menu *menu, input_menu_state *menustate, int group) |
| 900 | 1523 | { |
| 901 | | ui_menu_item item_list[MAX_INPUT_PORTS * MAX_BITS_PER_PORT / 2]; |
| 902 | | input_item_data item_data[MAX_INPUT_PORTS * MAX_BITS_PER_PORT / 2]; |
| 903 | | input_item_data *selected_item_data; |
| 904 | | UINT32 selected = state & 0x3fff; |
| 905 | | int record_next = (state >> 14) & 1; |
| 906 | | int polling = (state >> 15) & 1; |
| 907 | | int group = state >> 16; |
| 908 | | int changed = FALSE; |
| 909 | | int visible_items; |
| 910 | | int menu_items; |
| 911 | | int item; |
| 1524 | astring *tempstring = astring_alloc(); |
| 1525 | input_item_data *itemlist = NULL; |
| 1526 | const input_type_desc *typedesc; |
| 1527 | int suborder[SEQ_TYPE_TOTAL]; |
| 1528 | int sortorder = 1; |
| 912 | 1529 | |
| 913 | | /* get the list of items */ |
| 914 | | menu_string_pool_offset = 0; |
| 1530 | /* create a mini lookup table for sort order based on sequence type */ |
| 1531 | suborder[SEQ_TYPE_STANDARD] = 0; |
| 1532 | suborder[SEQ_TYPE_DECREMENT] = 1; |
| 1533 | suborder[SEQ_TYPE_INCREMENT] = 2; |
| 915 | 1534 | |
| 916 | | /* an out of range group is special; it just means the game-specific inputs */ |
| 917 | | if (group > IPG_TOTAL_GROUPS) |
| 918 | | menu_items = input_menu_get_game_items(machine, item_data); |
| 919 | | else |
| 920 | | menu_items = input_menu_get_items(machine, item_data, group); |
| 1535 | /* iterate over the input ports and add menu items */ |
| 1536 | for (typedesc = input_type_list(machine); typedesc != NULL; typedesc = typedesc->next) |
| 921 | 1537 | |
| 922 | | /* build the menu */ |
| 923 | | memset(item_list, 0, sizeof(item_list)); |
| 924 | | for (item = 0; item < menu_items; item++) |
| 925 | | { |
| 926 | | input_item_data *id = &item_data[item]; |
| 1538 | /* add if we match the group and we have a valid name */ |
| 1539 | if (typedesc->group == group && typedesc->name != NULL && typedesc->name[0] != 0) |
| 1540 | { |
| 1541 | input_seq_type seqtype; |
| 927 | 1542 | |
| 928 | | /* set the item text from the precomputed data */ |
| 929 | | item_list[item].text = id->name; |
| 930 | | item_list[item].subtext = id->seqname; |
| 931 | | if (id->invert) |
| 932 | | item_list[item].flags |= MENU_FLAG_INVERT; |
| 1543 | /* loop over all sequence types */ |
| 1544 | sortorder++; |
| 1545 | for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) |
| 1546 | { |
| 1547 | /* build an entry for the standard sequence */ |
| 1548 | input_item_data *item = ui_menu_pool_alloc(menu, sizeof(*item)); |
| 1549 | memset(item, 0, sizeof(*item)); |
| 1550 | item->ref = typedesc; |
| 1551 | item->seqtype = seqtype; |
| 1552 | item->seq = *input_type_seq(machine, typedesc->type, typedesc->player, seqtype); |
| 1553 | item->defseq = &typedesc->seq[seqtype]; |
| 1554 | item->sortorder = sortorder * 4 + suborder[seqtype]; |
| 1555 | item->type = input_type_is_analog(typedesc->type) ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL; |
| 1556 | item->name = typedesc->name; |
| 1557 | item->next = itemlist; |
| 1558 | itemlist = item; |
| 933 | 1559 | |
| 934 | | /* keep the sequence pointer as a ref */ |
| 935 | | item_list[item].ref = id; |
| 936 | | } |
| 1560 | /* stop after one, unless we're analog */ |
| 1561 | if (item->type == INPUT_TYPE_DIGITAL) |
| 1562 | break; |
| 1563 | } |
| 1564 | } |
| 937 | 1565 | |
| 938 | | /* sort the list canonically */ |
| 939 | | qsort(item_list, menu_items, sizeof(item_list[0]), input_menu_compare_items); |
| 1566 | /* sort and populate the menu in a standard fashion */ |
| 1567 | menu_input_populate_and_sort(menu, itemlist, menustate); |
| 1568 | astring_free(tempstring); |
| 1569 | } |
| 940 | 1570 | |
| 941 | | /* add an item to return */ |
| 942 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 943 | 1571 | |
| 944 | | /* if we're polling, just put an empty entry and arrows for the subitem */ |
| 945 | | if (polling) |
| 1572 | /*------------------------------------------------- |
| 1573 | menu_input_specific - handle the game-specific |
| 1574 | input menu |
| 1575 | -------------------------------------------------*/ |
| 1576 | |
| 1577 | static void menu_input_specific(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1578 | { |
| 1579 | menu_input_common(machine, menu, NULL, state); |
| 1580 | } |
| 1581 | |
| 1582 | |
| 1583 | /*------------------------------------------------- |
| 1584 | menu_input_specific_populate - populate |
| 1585 | the input menu with game-specific items |
| 1586 | -------------------------------------------------*/ |
| 1587 | |
| 1588 | static void menu_input_specific_populate(running_machine *machine, ui_menu *menu, input_menu_state *menustate) |
| 1589 | { |
| 1590 | astring *tempstring = astring_alloc(); |
| 1591 | input_item_data *itemlist = NULL; |
| 1592 | const input_field_config *field; |
| 1593 | const input_port_config *port; |
| 1594 | int suborder[SEQ_TYPE_TOTAL]; |
| 1595 | |
| 1596 | /* create a mini lookup table for sort order based on sequence type */ |
| 1597 | suborder[SEQ_TYPE_STANDARD] = 0; |
| 1598 | suborder[SEQ_TYPE_DECREMENT] = 1; |
| 1599 | suborder[SEQ_TYPE_INCREMENT] = 2; |
| 1600 | |
| 1601 | /* iterate over the input ports and add menu items */ |
| 1602 | for (port = machine->portconfig; port != NULL; port = port->next) |
| 1603 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 1604 | { |
| 1605 | const char *name = input_field_name(field); |
| 1606 | |
| 1607 | /* add if we match the group and we have a valid name */ |
| 1608 | if (name != NULL && input_condition_true(machine, &field->condition) && |
| 1609 | #ifdef MESS |
| 1610 | (field->category == 0 || input_category_active(machine, field->category)) && |
| 1611 | #endif /* MESS */ |
| 1612 | ((field->type == IPT_OTHER && field->name != NULL) || input_type_group(machine, field->type, field->player) != IPG_INVALID)) |
| 1613 | { |
| 1614 | input_seq_type seqtype; |
| 1615 | UINT16 sortorder; |
| 1616 | |
| 1617 | /* determine the sorting order */ |
| 1618 | if (field->type >= IPT_START1 && field->type <= __ipt_analog_end) |
| 1619 | sortorder = (field->type << 2) | (field->player << 12); |
| 1620 | else |
| 1621 | sortorder = field->type | 0xf000; |
| 1622 | |
| 1623 | /* loop over all sequence types */ |
| 1624 | for (seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) |
| 1625 | { |
| 1626 | /* build an entry for the standard sequence */ |
| 1627 | input_item_data *item = ui_menu_pool_alloc(menu, sizeof(*item)); |
| 1628 | memset(item, 0, sizeof(*item)); |
| 1629 | item->ref = field; |
| 1630 | item->seqtype = seqtype; |
| 1631 | item->seq = *input_field_seq(field, seqtype); |
| 1632 | item->defseq = get_field_default_seq(field, seqtype); |
| 1633 | item->sortorder = sortorder + suborder[seqtype]; |
| 1634 | item->type = input_type_is_analog(field->type) ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL; |
| 1635 | item->name = name; |
| 1636 | item->next = itemlist; |
| 1637 | itemlist = item; |
| 1638 | |
| 1639 | /* stop after one, unless we're analog */ |
| 1640 | if (item->type == INPUT_TYPE_DIGITAL) |
| 1641 | break; |
| 1642 | } |
| 1643 | } |
| 1644 | } |
| 1645 | |
| 1646 | /* sort and populate the menu in a standard fashion */ |
| 1647 | menu_input_populate_and_sort(menu, itemlist, menustate); |
| 1648 | astring_free(tempstring); |
| 1649 | } |
| 1650 | |
| 1651 | |
| 1652 | /*------------------------------------------------- |
| 1653 | menu_input - display a menu for inputs |
| 1654 | -------------------------------------------------*/ |
| 1655 | |
| 1656 | static void menu_input_common(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1657 | { |
| 1658 | input_item_data *seqchangeditem = NULL; |
| 1659 | input_menu_state *menustate; |
| 1660 | const ui_menu_event *event; |
| 1661 | int invalidate = FALSE; |
| 1662 | |
| 1663 | /* if no state, allocate now */ |
| 1664 | if (state == NULL) |
| 1665 | state = ui_menu_alloc_state(menu, sizeof(*menustate)); |
| 1666 | menustate = state; |
| 1667 | |
| 1668 | /* if the menu isn't built, populate now */ |
| 1669 | if (!ui_menu_populated(menu)) |
| 946 | 1670 | { |
| 947 | | item_list[selected].subtext = " "; |
| 948 | | item_list[selected].flags = MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; |
| 1671 | if (parameter != NULL) |
| 1672 | menu_input_general_populate(machine, menu, menustate, (FPTR)parameter - 1); |
| 1673 | else |
| 1674 | menu_input_specific_populate(machine, menu, menustate); |
| 949 | 1675 | } |
| 950 | 1676 | |
| 951 | | /* draw the menu */ |
| 952 | | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| 1677 | /* process the menu */ |
| 1678 | event = ui_menu_process(menu, (menustate->pollingitem != NULL) ? UI_MENU_PROCESS_NOKEYS : 0); |
| 953 | 1679 | |
| 954 | | /* if we're polling, read the sequence */ |
| 955 | | selected_item_data = item_list[selected].ref; |
| 956 | | if (polling) |
| 1680 | /* if we are polling, handle as a special case */ |
| 1681 | if (menustate->pollingitem != NULL) |
| 957 | 1682 | { |
| 1683 | input_item_data *item = menustate->pollingitem; |
| 958 | 1684 | input_seq newseq; |
| 959 | 1685 | |
| 960 | 1686 | /* if UI_CANCEL is pressed, abort */ |
| 961 | | if (input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1687 | if (ui_input_pressed(machine, IPT_UI_CANCEL)) |
| 962 | 1688 | { |
| 963 | | record_next = polling = FALSE; |
| 964 | | input_menu_toggle_none_default(&selected_item_data->seq, &starting_seq, selected_item_data->defseq); |
| 965 | | changed = TRUE; |
| 1689 | menustate->pollingitem = NULL; |
| 1690 | menustate->record_next = FALSE; |
| 1691 | toggle_none_default(&item->seq, &menustate->starting_seq, item->defseq); |
| 1692 | seqchangeditem = item; |
| 966 | 1693 | } |
| 967 | 1694 | |
| 968 | 1695 | /* poll again; if finished, update the sequence */ |
| 969 | 1696 | if (input_seq_poll(&newseq)) |
| 970 | 1697 | { |
| 971 | | record_next = TRUE; |
| 972 | | polling = FALSE; |
| 973 | | selected_item_data->seq = newseq; |
| 974 | | changed = TRUE; |
| 1698 | menustate->pollingitem = NULL; |
| 1699 | menustate->record_next = TRUE; |
| 1700 | item->seq = newseq; |
| 1701 | seqchangeditem = item; |
| 975 | 1702 | } |
| 976 | 1703 | } |
| 977 | 1704 | |
| 978 | | /* otherwise, handle the keys */ |
| 979 | | else |
| 1705 | /* otherwise, handle the events */ |
| 1706 | else if (event != NULL && event->itemref != NULL) |
| 980 | 1707 | { |
| 981 | | int prevsel = selected; |
| 982 | | |
| 983 | | /* handle generic menu keys */ |
| 984 | | if (ui_menu_generic_keys(machine, &selected, menu_items, visible_items)) |
| 985 | | return selected; |
| 986 | | |
| 987 | | /* if an item was selected, start polling on it */ |
| 988 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 1708 | input_item_data *item = event->itemref; |
| 1709 | switch (event->iptkey) |
| 989 | 1710 | { |
| 990 | | input_seq_poll_start((selected_item_data->type == INPUT_TYPE_ANALOG) ? ITEM_CLASS_ABSOLUTE : ITEM_CLASS_SWITCH, record_next ? &selected_item_data->seq : NULL); |
| 991 | | starting_seq = selected_item_data->seq; |
| 992 | | polling = TRUE; |
| 993 | | } |
| 1711 | /* an item was selected: begin polling */ |
| 1712 | case IPT_UI_SELECT: |
| 1713 | menustate->pollingitem = item; |
| 1714 | menustate->lastref = item->ref; |
| 1715 | menustate->starting_seq = item->seq; |
| 1716 | input_seq_poll_start((item->type == INPUT_TYPE_ANALOG) ? ITEM_CLASS_ABSOLUTE : ITEM_CLASS_SWITCH, menustate->record_next ? &item->seq : NULL); |
| 1717 | invalidate = TRUE; |
| 1718 | break; |
| 994 | 1719 | |
| 995 | | /* if the clear key was pressed, reset the selected item */ |
| 996 | | if (input_ui_pressed(machine, IPT_UI_CLEAR)) |
| 997 | | { |
| 998 | | input_menu_toggle_none_default(&selected_item_data->seq, &selected_item_data->seq, selected_item_data->defseq); |
| 999 | | record_next = FALSE; |
| 1000 | | changed = TRUE; |
| 1720 | /* if the clear key was pressed, reset the selected item */ |
| 1721 | case IPT_UI_CLEAR: |
| 1722 | toggle_none_default(&item->seq, &item->seq, item->defseq); |
| 1723 | menustate->record_next = FALSE; |
| 1724 | seqchangeditem = item; |
| 1725 | break; |
| 1001 | 1726 | } |
| 1002 | 1727 | |
| 1003 | | /* if the selection changed, update and reset the "record first" flag */ |
| 1004 | | if (selected != prevsel) |
| 1005 | | record_next = FALSE; |
| 1728 | /* if the selection changed, reset the "record next" flag */ |
| 1729 | if (item->ref != menustate->lastref) |
| 1730 | menustate->record_next = FALSE; |
| 1731 | menustate->lastref = item->ref; |
| 1006 | 1732 | } |
| 1007 | 1733 | |
| 1008 | 1734 | /* if the sequence changed, update it */ |
| 1009 | | if (changed) |
| 1735 | if (seqchangeditem != NULL) |
| 1010 | 1736 | { |
| 1011 | | if (group > IPG_TOTAL_GROUPS) |
| 1737 | /* update a general input */ |
| 1738 | if (parameter != NULL) |
| 1012 | 1739 | { |
| 1013 | | input_field_user_settings settings; |
| 1740 | const input_type_desc *typedesc = seqchangeditem->ref; |
| 1741 | input_type_set_seq(machine, typedesc->type, typedesc->player, seqchangeditem->seqtype, &seqchangeditem->seq); |
| 1742 | } |
| 1014 | 1743 | |
| 1015 | | input_field_get_user_settings(selected_item_data->field, &settings); |
| 1016 | | settings.seq[selected_item_data->seqtype] = selected_item_data->seq; |
| 1017 | | input_field_set_user_settings(selected_item_data->field, &settings); |
| 1018 | | } |
| 1744 | /* update a game-specific input */ |
| 1019 | 1745 | else |
| 1020 | 1746 | { |
| 1021 | | const input_type_desc *typedesc = selected_item_data->typedesc; |
| 1022 | | input_type_set_seq(machine, typedesc->type, typedesc->player, selected_item_data->seqtype, &selected_item_data->seq); |
| 1747 | input_field_user_settings settings; |
| 1748 | |
| 1749 | input_field_get_user_settings(seqchangeditem->ref, &settings); |
| 1750 | settings.seq[seqchangeditem->seqtype] = seqchangeditem->seq; |
| 1751 | input_field_set_user_settings(seqchangeditem->ref, &settings); |
| 1023 | 1752 | } |
| 1753 | |
| 1754 | /* invalidate the menu to force an update */ |
| 1755 | invalidate = TRUE; |
| 1024 | 1756 | } |
| 1025 | 1757 | |
| 1026 | | return selected | (record_next << 14) | (polling << 15) | (group << 16); |
| 1758 | /* if the menu is invalidated, clear it now */ |
| 1759 | if (invalidate) |
| 1760 | { |
| 1761 | menustate->pollingref = NULL; |
| 1762 | if (menustate->pollingitem != NULL) |
| 1763 | menustate->pollingref = menustate->pollingitem->ref; |
| 1764 | ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_POSITION); |
| 1765 | } |
| 1027 | 1766 | } |
| 1028 | 1767 | |
| 1029 | 1768 | |
| 1030 | 1769 | /*------------------------------------------------- |
| 1031 | | menu_switches - display a menu for DIP |
| 1032 | | switches |
| 1770 | menu_input_compare_items - compare two |
| 1771 | items for quicksort |
| 1033 | 1772 | -------------------------------------------------*/ |
| 1034 | 1773 | |
| 1035 | | static UINT32 menu_switches(running_machine *machine, UINT32 state) |
| 1774 | static int menu_input_compare_items(const void *i1, const void *i2) |
| 1036 | 1775 | { |
| 1037 | | ui_menu_item item_list[MAX_INPUT_PORTS * MAX_BITS_PER_PORT / 2]; |
| 1038 | | int switch_name = (state >> 16) & 0xff; |
| 1039 | | UINT32 selected = state & 0xffff; |
| 1040 | | const input_port_config *port; |
| 1041 | | const input_field_config *field; |
| 1042 | | const input_field_config *selected_field = NULL; |
| 1043 | | int menu_items = 0; |
| 1044 | | int changed = FALSE; |
| 1045 | | int visible_items; |
| 1046 | | menu_extra extra; |
| 1776 | const input_item_data * const *data1 = i1; |
| 1777 | const input_item_data * const *data2 = i2; |
| 1778 | if ((*data1)->sortorder < (*data2)->sortorder) |
| 1779 | return -1; |
| 1780 | if ((*data1)->sortorder > (*data2)->sortorder) |
| 1781 | return 1; |
| 1782 | return 0; |
| 1783 | } |
| 1047 | 1784 | |
| 1048 | | /* reset the menu */ |
| 1049 | | memset(item_list, 0, sizeof(item_list)); |
| 1050 | | /* reset the dip switch model */ |
| 1051 | | memset(dip_switch_model, 0, sizeof(dip_switch_model)); |
| 1052 | 1785 | |
| 1053 | | /* loop over input ports and set up the current values */ |
| 1054 | | for (port = machine->portconfig; port != NULL; port = port->next) |
| 1055 | | for (field = port->fieldlist; field != NULL; field = field->next) |
| 1056 | | if (field->type == switch_name && input_condition_true(machine, &field->condition)) |
| 1057 | | { |
| 1058 | | switches_menu_add_item(&item_list[menu_items], field); |
| 1059 | | if (field->type == IPT_DIPSWITCH) |
| 1060 | | dip_switch_build_model(field, menu_items == selected); |
| 1061 | | menu_items++; |
| 1062 | | } |
| 1786 | /*------------------------------------------------- |
| 1787 | menu_input_populate_and_sort - take a list |
| 1788 | of input_item_data objects and build up the |
| 1789 | menu from them |
| 1790 | -------------------------------------------------*/ |
| 1063 | 1791 | |
| 1064 | | /* sort the list */ |
| 1065 | | selected_field = item_list[selected].ref; |
| 1792 | static void menu_input_populate_and_sort(ui_menu *menu, input_item_data *itemlist, input_menu_state *menustate) |
| 1793 | { |
| 1794 | const char *nameformat[INPUT_TYPE_TOTAL] = { 0 }; |
| 1795 | input_item_data **itemarray, *item; |
| 1796 | astring *subtext = astring_alloc(); |
| 1797 | astring *text = astring_alloc(); |
| 1798 | int numitems = 0, curitem; |
| 1066 | 1799 | |
| 1067 | | /* add an item to return */ |
| 1068 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 1800 | /* create a mini lookup table for name format based on type */ |
| 1801 | nameformat[INPUT_TYPE_DIGITAL] = "%s"; |
| 1802 | nameformat[INPUT_TYPE_ANALOG] = "%s Analog"; |
| 1803 | nameformat[INPUT_TYPE_ANALOG_INC] = "%s Analog Inc"; |
| 1804 | nameformat[INPUT_TYPE_ANALOG_DEC] = "%s Analog Dec"; |
| 1069 | 1805 | |
| 1070 | | /* configure the extra menu */ |
| 1071 | | extra.top = 0; |
| 1072 | | extra.bottom = get_num_dips() * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING; |
| 1073 | | extra.render = dip_switch_render; |
| 1806 | /* first count the number of items */ |
| 1807 | for (item = itemlist; item != NULL; item = item->next) |
| 1808 | numitems++; |
| 1074 | 1809 | |
| 1075 | | /* go through the port map and create masks that are easy to use when drawing DIP graphics. */ |
| 1076 | | /* draw the menu, augment the regular menue drawing with an additional box for DIPs */ |
| 1077 | | visible_items = ui_menu_draw(item_list, menu_items, selected, (dip_switch_model[0].dip_name) ? &extra : NULL); |
| 1810 | /* now allocate an array of items and fill it up */ |
| 1811 | itemarray = ui_menu_pool_alloc(menu, sizeof(*itemarray) * numitems); |
| 1812 | for (item = itemlist, curitem = 0; item != NULL; item = item->next) |
| 1813 | itemarray[curitem++] = item; |
| 1078 | 1814 | |
| 1079 | | /* handle generic menu keys */ |
| 1080 | | if (ui_menu_generic_keys(machine, &selected, menu_items, visible_items)) |
| 1081 | | return selected; |
| 1815 | /* sort it */ |
| 1816 | qsort(itemarray, numitems, sizeof(*itemarray), menu_input_compare_items); |
| 1082 | 1817 | |
| 1083 | | /* handle left/right arrows */ |
| 1084 | | if (input_ui_pressed(machine, IPT_UI_LEFT) && (item_list[selected].flags & MENU_FLAG_LEFT_ARROW)) |
| 1818 | /* build the menu */ |
| 1819 | for (curitem = 0; curitem < numitems; curitem++) |
| 1085 | 1820 | { |
| 1086 | | input_field_select_previous_setting(selected_field); |
| 1087 | | changed = TRUE; |
| 1088 | | } |
| 1089 | | if (input_ui_pressed(machine, IPT_UI_RIGHT) && (item_list[selected].flags & MENU_FLAG_RIGHT_ARROW)) |
| 1090 | | { |
| 1091 | | input_field_select_next_setting(selected_field); |
| 1092 | | changed = TRUE; |
| 1093 | | } |
| 1821 | UINT32 flags = 0; |
| 1094 | 1822 | |
| 1095 | | /* select resets to the default value */ |
| 1096 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 1097 | | { |
| 1098 | | input_field_user_settings settings; |
| 1099 | | input_field_get_user_settings(selected_field, &settings); |
| 1100 | | settings.value = selected_field->defvalue; |
| 1101 | | input_field_set_user_settings(selected_field, &settings); |
| 1102 | | } |
| 1823 | /* generate the name of the item itself, based off the base name and the type */ |
| 1824 | item = itemarray[curitem]; |
| 1825 | assert(nameformat[item->type] != NULL); |
| 1826 | astring_printf(text, nameformat[item->type], item->name); |
| 1103 | 1827 | |
| 1104 | | /* update the selection to match the existing entry in case things got shuffled */ |
| 1105 | | /* due to conditional DIPs changing things */ |
| 1106 | | if (changed) |
| 1107 | | { |
| 1108 | | int newselected = 0; |
| 1109 | | for (port = machine->portconfig; port != NULL; port = port->next) |
| 1110 | | for (field = port->fieldlist; field != NULL; field = field->next) |
| 1111 | | if (field->type == switch_name && input_condition_true(machine, &field->condition)) |
| 1112 | | { |
| 1113 | | if (field == selected_field) |
| 1114 | | { |
| 1115 | | selected = newselected; |
| 1116 | | break; |
| 1117 | | } |
| 1118 | | newselected++; |
| 1119 | | } |
| 1828 | /* if we're polling this item, use some spaces with left/right arrows */ |
| 1829 | if (menustate->pollingref == item->ref) |
| 1830 | { |
| 1831 | astring_cpyc(subtext, " "); |
| 1832 | flags |= MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; |
| 1833 | } |
| 1834 | |
| 1835 | /* otherwise, generate the sequence name and invert it if different from the default */ |
| 1836 | else |
| 1837 | { |
| 1838 | input_seq_name(subtext, &item->seq); |
| 1839 | flags |= input_seq_cmp(&item->seq, item->defseq) ? MENU_FLAG_INVERT : 0; |
| 1840 | } |
| 1841 | |
| 1842 | /* add the item */ |
| 1843 | ui_menu_item_append(menu, astring_c(text), astring_c(subtext), flags, item); |
| 1120 | 1844 | } |
| 1121 | 1845 | |
| 1122 | | return selected | (switch_name << 16); |
| 1846 | /* free our temporary strings */ |
| 1847 | astring_free(subtext); |
| 1848 | astring_free(text); |
| 1123 | 1849 | } |
| 1124 | 1850 | |
| 1125 | 1851 | |
| 1126 | 1852 | /*------------------------------------------------- |
| 1127 | | menu_analog - display a menu for analog |
| 1128 | | control settings |
| 1853 | menu_settings_dip_switches - handle the DIP |
| 1854 | switches menu |
| 1129 | 1855 | -------------------------------------------------*/ |
| 1130 | 1856 | |
| 1131 | | static UINT32 menu_analog(running_machine *machine, UINT32 state) |
| 1857 | static void menu_settings_dip_switches(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1132 | 1858 | { |
| 1133 | | ui_menu_item item_list[MAX_INPUT_PORTS * 4 * ANALOG_ITEM_COUNT]; |
| 1134 | | const input_port_config *port; |
| 1135 | | const input_field_config *field; |
| 1136 | | const input_field_config *selected_field = NULL; |
| 1137 | | int menu_items = 0; |
| 1138 | | int selected_item = 0; |
| 1139 | | int visible_items; |
| 1140 | | int delta = 0; |
| 1141 | | int use_autocenter; |
| 1859 | menu_settings_common(machine, menu, state, IPT_DIPSWITCH); |
| 1860 | } |
| 1142 | 1861 | |
| 1143 | | /* reset the menu and string pool */ |
| 1144 | | memset(item_list, 0, sizeof(item_list)); |
| 1145 | | menu_string_pool_offset = 0; |
| 1146 | 1862 | |
| 1147 | | /* loop over input ports and add the items */ |
| 1148 | | for (port = Machine->portconfig; port != NULL; port = port->next) |
| 1149 | | for (field = port->fieldlist; field != NULL; field = field->next) |
| 1150 | | if (input_type_is_analog(field->type)) |
| 1151 | | { |
| 1152 | | use_autocenter = FALSE; |
| 1153 | | switch (field->type) |
| 1154 | | { |
| 1155 | | /* Autocenter Speed is only used for these devices */ |
| 1156 | | case IPT_POSITIONAL: |
| 1157 | | case IPT_POSITIONAL_V: |
| 1158 | | if (field->flags & ANALOG_FLAG_WRAPS) |
| 1159 | | break; |
| 1863 | /*------------------------------------------------- |
| 1864 | menu_settings_driver_config - handle the |
| 1865 | driver config menu |
| 1866 | -------------------------------------------------*/ |
| 1160 | 1867 | |
| 1161 | | case IPT_PEDAL: |
| 1162 | | case IPT_PEDAL2: |
| 1163 | | case IPT_PEDAL3: |
| 1164 | | case IPT_PADDLE: |
| 1165 | | case IPT_PADDLE_V: |
| 1166 | | case IPT_AD_STICK_X: |
| 1167 | | case IPT_AD_STICK_Y: |
| 1168 | | case IPT_AD_STICK_Z: |
| 1169 | | use_autocenter = TRUE; |
| 1170 | | break; |
| 1171 | | } |
| 1868 | static void menu_settings_driver_config(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1869 | { |
| 1870 | menu_settings_common(machine, menu, state, IPT_CONFIG); |
| 1871 | } |
| 1172 | 1872 | |
| 1173 | | /* track the selected item */ |
| 1174 | | if (state >= menu_items && state < menu_items + 3 + use_autocenter) |
| 1175 | | { |
| 1176 | | selected_field = field; |
| 1177 | | selected_item = state - menu_items; |
| 1178 | | // shift menu for missing Autocenter |
| 1179 | | if (selected_item && !use_autocenter) |
| 1180 | | selected_item++; |
| 1181 | | } |
| 1182 | 1873 | |
| 1183 | | /* add the needed items for each analog input */ |
| 1184 | | analog_menu_add_item(&item_list[menu_items++], field, "Digital Speed", ANALOG_ITEM_KEYSPEED); |
| 1185 | | if (use_autocenter) |
| 1186 | | analog_menu_add_item(&item_list[menu_items++], field, "Autocenter Speed", ANALOG_ITEM_CENTERSPEED); |
| 1187 | | analog_menu_add_item(&item_list[menu_items++], field, "Reverse", ANALOG_ITEM_REVERSE); |
| 1188 | | analog_menu_add_item(&item_list[menu_items++], field, "Sensitivity", ANALOG_ITEM_SENSITIVITY); |
| 1189 | | } |
| 1874 | /*------------------------------------------------- |
| 1875 | menu_settings_categories - handle the |
| 1876 | categories menu |
| 1877 | -------------------------------------------------*/ |
| 1190 | 1878 | |
| 1191 | | /* add an item to return */ |
| 1192 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 1879 | static void menu_settings_categories(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1880 | { |
| 1881 | menu_settings_common(machine, menu, state, IPT_CATEGORY); |
| 1882 | } |
| 1193 | 1883 | |
| 1194 | | /* draw the menu */ |
| 1195 | | visible_items = ui_menu_draw(item_list, menu_items, state, NULL); |
| 1196 | 1884 | |
| 1197 | | /* handle generic menu keys */ |
| 1198 | | if (ui_menu_generic_keys(machine, &state, menu_items, visible_items)) |
| 1199 | | return state; |
| 1885 | /*------------------------------------------------- |
| 1886 | menu_settings_common - handle one of the |
| 1887 | switches menus |
| 1888 | -------------------------------------------------*/ |
| 1200 | 1889 | |
| 1201 | | /* handle left/right arrows */ |
| 1202 | | if (input_ui_pressed_repeat(machine, IPT_UI_LEFT,6) && (item_list[state].flags & MENU_FLAG_LEFT_ARROW)) |
| 1203 | | delta = -1; |
| 1204 | | if (input_ui_pressed_repeat(machine, IPT_UI_RIGHT,6) && (item_list[state].flags & MENU_FLAG_RIGHT_ARROW)) |
| 1205 | | delta = 1; |
| 1206 | | if (input_code_pressed(KEYCODE_LSHIFT)) |
| 1207 | | delta *= 10; |
| 1890 | static void menu_settings_common(running_machine *machine, ui_menu *menu, void *state, UINT32 type) |
| 1891 | { |
| 1892 | settings_menu_state *menustate; |
| 1893 | const ui_menu_event *event; |
| 1208 | 1894 | |
| 1209 | | /* adjust the appropriate value */ |
| 1210 | | if (delta != 0 && selected_field != NULL) |
| 1895 | /* if no state, allocate now */ |
| 1896 | if (state == NULL) |
| 1897 | state = ui_menu_alloc_state(menu, sizeof(*menustate)); |
| 1898 | menustate = state; |
| 1899 | |
| 1900 | /* if the menu isn't built, populate now */ |
| 1901 | if (!ui_menu_populated(menu)) |
| 1902 | menu_settings_populate(machine, menu, menustate, type); |
| 1903 | |
| 1904 | /* process the menu */ |
| 1905 | event = ui_menu_process(menu, 0); |
| 1906 | |
| 1907 | /* handle events */ |
| 1908 | if (event != NULL && event->itemref != NULL) |
| 1211 | 1909 | { |
| 1910 | const input_field_config *field = event->itemref; |
| 1212 | 1911 | input_field_user_settings settings; |
| 1912 | int changed = FALSE; |
| 1213 | 1913 | |
| 1214 | | input_field_get_user_settings(selected_field, &settings); |
| 1215 | | switch (selected_item) |
| 1914 | switch (event->iptkey) |
| 1216 | 1915 | { |
| 1217 | | case ANALOG_ITEM_KEYSPEED: settings.delta += delta; break; |
| 1218 | | case ANALOG_ITEM_CENTERSPEED: settings.centerdelta += delta; break; |
| 1219 | | case ANALOG_ITEM_REVERSE: settings.reverse += delta; break; |
| 1220 | | case ANALOG_ITEM_SENSITIVITY: settings.sensitivity += delta; break; |
| 1916 | /* if selected, reset to default value */ |
| 1917 | case IPT_UI_SELECT: |
| 1918 | input_field_get_user_settings(field, &settings); |
| 1919 | settings.value = field->defvalue; |
| 1920 | input_field_set_user_settings(field, &settings); |
| 1921 | changed = TRUE; |
| 1922 | break; |
| 1923 | |
| 1924 | /* left goes to previous setting */ |
| 1925 | case IPT_UI_LEFT: |
| 1926 | input_field_select_previous_setting(field); |
| 1927 | changed = TRUE; |
| 1928 | break; |
| 1929 | |
| 1930 | /* right goes to next setting */ |
| 1931 | case IPT_UI_RIGHT: |
| 1932 | input_field_select_next_setting(field); |
| 1933 | changed = TRUE; |
| 1934 | break; |
| 1221 | 1935 | } |
| 1222 | | input_field_set_user_settings(selected_field, &settings); |
| 1936 | |
| 1937 | /* if anything changed, rebuild the menu, trying to stay on the same field */ |
| 1938 | if (changed) |
| 1939 | ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_REF); |
| 1223 | 1940 | } |
| 1224 | | |
| 1225 | | return state; |
| 1226 | 1941 | } |
| 1227 | 1942 | |
| 1228 | 1943 | |
| 1229 | 1944 | /*------------------------------------------------- |
| 1230 | | menu_bookkeeping - display a "menu" for |
| 1231 | | bookkeeping information |
| 1945 | menu_settings_populate - populate one of the |
| 1946 | switches menus |
| 1232 | 1947 | -------------------------------------------------*/ |
| 1233 | 1948 | |
| 1234 | | #ifndef MESS |
| 1235 | | static UINT32 menu_bookkeeping(running_machine *machine, UINT32 state) |
| 1949 | static void menu_settings_populate(running_machine *machine, ui_menu *menu, settings_menu_state *menustate, UINT32 type) |
| 1236 | 1950 | { |
| 1237 | | char buf[2048]; |
| 1238 | | char *bufptr = buf; |
| 1239 | | UINT32 selected = 0; |
| 1240 | | int ctrnum; |
| 1241 | | attotime total_time; |
| 1951 | const input_field_config *field; |
| 1952 | const input_port_config *port; |
| 1953 | dip_descriptor **diplist_tailptr; |
| 1954 | int dipcount = 0; |
| 1242 | 1955 | |
| 1243 | | /* show total time first */ |
| 1244 | | total_time = timer_get_time(); |
| 1245 | | if (total_time.seconds >= 60 * 60) |
| 1246 | | bufptr += sprintf(bufptr, "Uptime: %d:%02d:%02d\n\n", total_time.seconds / (60*60), (total_time.seconds / 60) % 60, total_time.seconds % 60); |
| 1247 | | else |
| 1248 | | bufptr += sprintf(bufptr, "Uptime: %d:%02d\n\n", (total_time.seconds / 60) % 60, total_time.seconds % 60); |
| 1956 | /* reset the dip switch tracking */ |
| 1957 | menustate->diplist = NULL; |
| 1958 | diplist_tailptr = &menustate->diplist; |
| 1249 | 1959 | |
| 1250 | | /* show tickets at the top */ |
| 1251 | | if (dispensed_tickets) |
| 1252 | | bufptr += sprintf(bufptr, "Tickets dispensed: %d\n\n", dispensed_tickets); |
| 1960 | /* loop over input ports and set up the current values */ |
| 1961 | for (port = machine->portconfig; port != NULL; port = port->next) |
| 1962 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 1963 | if (field->type == type && input_condition_true(machine, &field->condition)) |
| 1964 | { |
| 1965 | UINT32 flags = 0; |
| 1253 | 1966 | |
| 1254 | | /* loop over coin counters */ |
| 1255 | | for (ctrnum = 0; ctrnum < COIN_COUNTERS; ctrnum++) |
| 1256 | | { |
| 1257 | | /* display the coin counter number */ |
| 1258 | | bufptr += sprintf(bufptr, "Coin %c: ", ctrnum + 'A'); |
| 1967 | /* set the left/right flags appropriately */ |
| 1968 | if (input_field_has_previous_setting(field)) |
| 1969 | flags |= MENU_FLAG_LEFT_ARROW; |
| 1970 | if (input_field_has_next_setting(field)) |
| 1971 | flags |= MENU_FLAG_RIGHT_ARROW; |
| 1259 | 1972 | |
| 1260 | | /* display how many coins */ |
| 1261 | | if (!coin_count[ctrnum]) |
| 1262 | | bufptr += sprintf(bufptr, "NA"); |
| 1263 | | else |
| 1264 | | bufptr += sprintf(bufptr, "%d", coin_count[ctrnum]); |
| 1973 | /* add the menu item */ |
| 1974 | ui_menu_item_append(menu, input_field_name(field), input_field_setting_name(field), flags, (void *)field); |
| 1265 | 1975 | |
| 1266 | | /* display whether or not we are locked out */ |
| 1267 | | if (coinlockedout[ctrnum]) |
| 1268 | | bufptr += sprintf(bufptr, " (locked)"); |
| 1269 | | *bufptr++ = '\n'; |
| 1270 | | } |
| 1271 | | *bufptr = 0; |
| 1976 | /* for DIP switches, build up the model */ |
| 1977 | if (type == IPT_DIPSWITCH && field->diploclist != NULL) |
| 1978 | { |
| 1979 | const input_field_diplocation *diploc; |
| 1980 | input_field_user_settings settings; |
| 1981 | UINT32 accummask = field->mask; |
| 1272 | 1982 | |
| 1273 | | /* draw the text */ |
| 1274 | | ui_menu_draw_text_box(buf); |
| 1983 | /* get current settings */ |
| 1984 | input_field_get_user_settings(field, &settings); |
| 1275 | 1985 | |
| 1276 | | /* handle the keys */ |
| 1277 | | ui_menu_generic_keys(machine, &selected, 1, 0); |
| 1278 | | return selected; |
| 1986 | /* iterate over each bit in the field */ |
| 1987 | for (diploc = field->diploclist; diploc != NULL; diploc = diploc->next) |
| 1988 | { |
| 1989 | UINT32 mask = accummask & ~(accummask - 1); |
| 1990 | dip_descriptor *dip; |
| 1991 | |
| 1992 | /* find the matching switch name */ |
| 1993 | for (dip = menustate->diplist; dip != NULL; dip = dip->next) |
| 1994 | if (strcmp(dip->name, diploc->swname) == 0) |
| 1995 | break; |
| 1996 | |
| 1997 | /* allocate new if none */ |
| 1998 | if (dip == NULL) |
| 1999 | { |
| 2000 | dip = ui_menu_pool_alloc(menu, sizeof(*dip)); |
| 2001 | dip->next = NULL; |
| 2002 | dip->name = diploc->swname; |
| 2003 | dip->mask = dip->state = 0; |
| 2004 | *diplist_tailptr = dip; |
| 2005 | diplist_tailptr = &dip->next; |
| 2006 | dipcount++; |
| 2007 | } |
| 2008 | |
| 2009 | /* apply the bits */ |
| 2010 | dip->mask |= 1 << (diploc->swnum - 1); |
| 2011 | if (((settings.value & mask) != 0 && !diploc->invert) || ((settings.value & mask) == 0 && diploc->invert)) |
| 2012 | dip->state |= 1 << (diploc->swnum - 1); |
| 2013 | |
| 2014 | /* clear the relevant bit in the accumulated mask */ |
| 2015 | accummask &= ~mask; |
| 2016 | } |
| 2017 | } |
| 2018 | } |
| 2019 | |
| 2020 | /* configure the extra menu */ |
| 2021 | if (type == IPT_DIPSWITCH && menustate->diplist != NULL) |
| 2022 | ui_menu_set_custom_render(menu, menu_settings_custom_render, 0.0f, dipcount * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING); |
| 1279 | 2023 | } |
| 1280 | | #endif |
| 1281 | 2024 | |
| 1282 | 2025 | |
| 1283 | 2026 | /*------------------------------------------------- |
| 1284 | | menu_game_info - display a "menu" for |
| 1285 | | game information |
| 2027 | menu_settings_custom_render - perform our special |
| 2028 | rendering |
| 1286 | 2029 | -------------------------------------------------*/ |
| 1287 | 2030 | |
| 1288 | | static UINT32 menu_game_info(running_machine *machine, UINT32 state) |
| 2031 | static void menu_settings_custom_render(running_machine *machine, ui_menu *menu, void *state, void *selectedref, float top, float bottom, float x1, float y1, float x2, float y2) |
| 1289 | 2032 | { |
| 1290 | | char buf[2048]; |
| 1291 | | char *bufptr = buf; |
| 1292 | | UINT32 selected = 0; |
| 2033 | const input_field_config *field = selectedref; |
| 2034 | settings_menu_state *menustate = state; |
| 2035 | dip_descriptor *dip; |
| 1293 | 2036 | |
| 1294 | | /* add the game info */ |
| 1295 | | bufptr += sprintf_game_info(machine, bufptr); |
| 2037 | /* add borders */ |
| 2038 | y1 = y2 + UI_BOX_TB_BORDER; |
| 2039 | y2 = y1 + bottom; |
| 1296 | 2040 | |
| 1297 | | /* draw the text */ |
| 1298 | | ui_menu_draw_text_box(buf); |
| 2041 | /* draw extra menu area */ |
| 2042 | ui_draw_outlined_box(x1, y1, x2, y2, UI_FILLCOLOR); |
| 2043 | y1 += (float)DIP_SWITCH_SPACING; |
| 1299 | 2044 | |
| 1300 | | /* handle the keys */ |
| 1301 | | ui_menu_generic_keys(machine, &selected, 1, 0); |
| 1302 | | return selected; |
| 1303 | | } |
| 2045 | /* iterate over DIP switches */ |
| 2046 | for (dip = menustate->diplist; dip != NULL; dip = dip->next) |
| 2047 | { |
| 2048 | const input_field_diplocation *diploc; |
| 2049 | UINT32 selectedmask = 0; |
| 1304 | 2050 | |
| 2051 | /* determine the mask of selected bits */ |
| 2052 | if (field != NULL) |
| 2053 | for (diploc = field->diploclist; diploc != NULL; diploc = diploc->next) |
| 2054 | if (strcmp(dip->name, diploc->swname) == 0) |
| 2055 | selectedmask |= 1 << (diploc->swnum - 1); |
| 1305 | 2056 | |
| 1306 | | /*------------------------------------------------- |
| 1307 | | menu_cheat - display a menu for cheat options |
| 1308 | | -------------------------------------------------*/ |
| 1309 | | |
| 1310 | | static UINT32 menu_cheat(running_machine *machine, UINT32 state) |
| 1311 | | { |
| 1312 | | int result = cheat_menu(machine, state); |
| 1313 | | if (result == 0) |
| 1314 | | return ui_menu_stack_pop(); |
| 1315 | | return result; |
| 2057 | /* draw one switch */ |
| 2058 | menu_settings_custom_render_one(x1, y1, x2, y1 + DIP_SWITCH_HEIGHT, dip, selectedmask); |
| 2059 | y1 += (float)(DIP_SWITCH_SPACING + DIP_SWITCH_HEIGHT); |
| 2060 | } |
| 1316 | 2061 | } |
| 1317 | 2062 | |
| 1318 | 2063 | |
| 1319 | 2064 | /*------------------------------------------------- |
| 1320 | | menu_memory_card - display a menu for memory |
| 1321 | | card options |
| 2065 | menu_settings_custom_render_one - draw a single |
| 2066 | DIP switch |
| 1322 | 2067 | -------------------------------------------------*/ |
| 1323 | 2068 | |
| 1324 | | static UINT32 menu_memory_card(running_machine *machine, UINT32 state) |
| 2069 | static void menu_settings_custom_render_one(float x1, float y1, float x2, float y2, const dip_descriptor *dip, UINT32 selectedmask) |
| 1325 | 2070 | { |
| 1326 | | ui_menu_item item_list[5]; |
| 1327 | | int menu_items = 0; |
| 1328 | | int cardnum = state >> 16; |
| 1329 | | UINT32 selected = state & 0xffff; |
| 1330 | | int insertindex = -1, ejectindex = -1, createindex = -1; |
| 1331 | | int visible_items; |
| 2071 | int numtoggles, toggle; |
| 2072 | float switch_toggle_gap; |
| 2073 | float y1_off, y1_on; |
| 1332 | 2074 | |
| 1333 | | /* reset the menu and string pool */ |
| 1334 | | memset(item_list, 0, sizeof(item_list)); |
| 1335 | | menu_string_pool_offset = 0; |
| 2075 | /* determine the number of toggles in the DIP */ |
| 2076 | numtoggles = 32 - count_leading_zeros(dip->mask); |
| 1336 | 2077 | |
| 1337 | | /* add the card select menu */ |
| 1338 | | item_list[menu_items].text = "Card Number:"; |
| 1339 | | item_list[menu_items].subtext = menu_string_pool_add("%d", cardnum); |
| 1340 | | if (cardnum > 0) |
| 1341 | | item_list[menu_items].flags |= MENU_FLAG_LEFT_ARROW; |
| 1342 | | if (cardnum < 1000) |
| 1343 | | item_list[menu_items].flags |= MENU_FLAG_RIGHT_ARROW; |
| 1344 | | menu_items++; |
| 2078 | /* center based on the number of switches */ |
| 2079 | x1 += (x2 - x1 - numtoggles * SINGLE_TOGGLE_SWITCH_FIELD_WIDTH) / 2; |
| 1345 | 2080 | |
| 1346 | | /* add the remaining items */ |
| 1347 | | item_list[insertindex = menu_items++].text = "Load Selected Card"; |
| 1348 | | if (memcard_present() != -1) |
| 1349 | | item_list[ejectindex = menu_items++].text = "Eject Current Card"; |
| 1350 | | item_list[createindex = menu_items++].text = "Create New Card"; |
| 2081 | /* draw the dip switch name */ |
| 2082 | ui_draw_text_full( dip->name, |
| 2083 | 0, |
| 2084 | y1 + (DIP_SWITCH_HEIGHT - UI_TARGET_FONT_HEIGHT) / 2, |
| 2085 | x1 - ui_get_string_width(" "), |
| 2086 | JUSTIFY_RIGHT, |
| 2087 | WRAP_NEVER, |
| 2088 | DRAW_NORMAL, |
| 2089 | ARGB_WHITE, |
| 2090 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA), |
| 2091 | NULL , |
| 2092 | NULL); |
| 1351 | 2093 | |
| 1352 | | /* add an item for the return */ |
| 1353 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 2094 | /* compute top and bottom for on and off positions */ |
| 2095 | switch_toggle_gap = ((DIP_SWITCH_HEIGHT/2) - SINGLE_TOGGLE_SWITCH_HEIGHT)/2; |
| 2096 | y1_off = y1 + UI_LINE_WIDTH + switch_toggle_gap; |
| 2097 | y1_on = y1 + DIP_SWITCH_HEIGHT/2 + switch_toggle_gap; |
| 1354 | 2098 | |
| 1355 | | /* draw the menu */ |
| 1356 | | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| 2099 | /* iterate over toggles */ |
| 2100 | for (toggle = 0; toggle < numtoggles; toggle++) |
| 2101 | { |
| 2102 | float innerx1; |
| 1357 | 2103 | |
| 1358 | | /* handle the keys */ |
| 1359 | | if (ui_menu_generic_keys(machine, &selected, menu_items, visible_items)) |
| 1360 | | return selected; |
| 1361 | | if (selected == 0 && input_ui_pressed(machine, IPT_UI_LEFT) && cardnum > 0) |
| 1362 | | cardnum--; |
| 1363 | | if (selected == 0 && input_ui_pressed(machine, IPT_UI_RIGHT) && cardnum < 1000) |
| 1364 | | cardnum++; |
| 2104 | /* first outline the switch */ |
| 2105 | ui_draw_outlined_box(x1, y1, x1 + SINGLE_TOGGLE_SWITCH_FIELD_WIDTH, y2, UI_FILLCOLOR); |
| 1365 | 2106 | |
| 1366 | | /* handle actions */ |
| 1367 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 1368 | | { |
| 1369 | | /* handle load */ |
| 1370 | | if (selected == insertindex) |
| 2107 | /* compute x1/x2 for the inner filled in switch */ |
| 2108 | innerx1 = x1 + (SINGLE_TOGGLE_SWITCH_FIELD_WIDTH - SINGLE_TOGGLE_SWITCH_WIDTH) / 2; |
| 2109 | |
| 2110 | /* see if the switch is actually used */ |
| 2111 | if (dip->mask & (1 << toggle)) |
| 1371 | 2112 | { |
| 1372 | | if (memcard_insert(machine, cardnum) == 0) |
| 1373 | | { |
| 1374 | | popmessage("Memory card loaded"); |
| 1375 | | ui_menu_stack_reset(); |
| 1376 | | return 0; |
| 1377 | | } |
| 1378 | | else |
| 1379 | | popmessage("Error loading memory card"); |
| 2113 | float innery1 = (dip->state & (1 << toggle)) ? y1_on : y1_off; |
| 2114 | render_ui_add_rect(innerx1, innery1, innerx1 + SINGLE_TOGGLE_SWITCH_WIDTH, innery1 + SINGLE_TOGGLE_SWITCH_HEIGHT, |
| 2115 | (selectedmask & (1 << toggle)) ? MENU_SELECTCOLOR : ARGB_WHITE, |
| 2116 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); |
| 1380 | 2117 | } |
| 1381 | | |
| 1382 | | /* handle eject */ |
| 1383 | | else if (selected == ejectindex) |
| 2118 | else |
| 1384 | 2119 | { |
| 1385 | | memcard_eject(machine); |
| 1386 | | popmessage("Memory card ejected"); |
| 2120 | render_ui_add_rect(innerx1, y1_off, innerx1 + SINGLE_TOGGLE_SWITCH_WIDTH, y1_on + SINGLE_TOGGLE_SWITCH_HEIGHT, |
| 2121 | MENU_UNAVAILABLECOLOR, |
| 2122 | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); |
| 1387 | 2123 | } |
| 1388 | 2124 | |
| 1389 | | /* handle create */ |
| 1390 | | else if (selected == createindex) |
| 1391 | | { |
| 1392 | | if (memcard_create(machine, cardnum, FALSE) == 0) |
| 1393 | | popmessage("Memory card created"); |
| 1394 | | else |
| 1395 | | popmessage("Error creating memory card\n(Card may already exist)"); |
| 1396 | | } |
| 2125 | /* advance to the next switch */ |
| 2126 | x1 += SINGLE_TOGGLE_SWITCH_FIELD_WIDTH; |
| 1397 | 2127 | } |
| 1398 | | |
| 1399 | | return selected | (cardnum << 16); |
| 1400 | 2128 | } |
| 1401 | 2129 | |
| 1402 | 2130 | |
| 1403 | 2131 | /*------------------------------------------------- |
| 1404 | | menu_video - display a menu for video options |
| 2132 | menu_analog - handle the analog settings menu |
| 1405 | 2133 | -------------------------------------------------*/ |
| 1406 | 2134 | |
| 1407 | | static UINT32 menu_video(running_machine *machine, UINT32 state) |
| 2135 | static void menu_analog(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1408 | 2136 | { |
| 1409 | | ui_menu_item item_list[100]; |
| 1410 | | render_target *targetlist[16]; |
| 1411 | | int curtarget = state >> 16; |
| 1412 | | UINT32 selected = state & 0xffff; |
| 1413 | | int menu_items = 0; |
| 1414 | | int visible_items; |
| 1415 | | int targets; |
| 2137 | const ui_menu_event *event; |
| 1416 | 2138 | |
| 1417 | | /* reset the menu and string pool */ |
| 1418 | | memset(item_list, 0, sizeof(item_list)); |
| 1419 | | menu_string_pool_offset = 0; |
| 2139 | /* if the menu isn't built, populate now */ |
| 2140 | if (!ui_menu_populated(menu)) |
| 2141 | menu_analog_populate(machine, menu); |
| 1420 | 2142 | |
| 1421 | | /* find the targets */ |
| 1422 | | for (targets = 0; targets < ARRAY_LENGTH(targetlist); targets++) |
| 1423 | | { |
| 1424 | | targetlist[targets] = render_target_get_indexed(targets); |
| 1425 | | if (targetlist[targets] == NULL) |
| 1426 | | break; |
| 1427 | | } |
| 2143 | /* process the menu */ |
| 2144 | event = ui_menu_process(menu, UI_MENU_PROCESS_LR_REPEAT); |
| 1428 | 2145 | |
| 1429 | | /* if we have a current target of 1000, we may need to select from multiple targets */ |
| 1430 | | if (curtarget == 1000) |
| 2146 | /* handle events */ |
| 2147 | if (event != NULL && event->itemref != NULL) |
| 1431 | 2148 | { |
| 1432 | | /* count up the targets, creating menu items for them */ |
| 1433 | | for (; menu_items < targets; menu_items++) |
| 1434 | | item_list[menu_items].text = menu_string_pool_add("Screen #%d", menu_items); |
| 2149 | analog_item_data *data = event->itemref; |
| 2150 | int newval = data->cur; |
| 1435 | 2151 | |
| 1436 | | /* if we only ended up with one, auto-select it */ |
| 1437 | | if (menu_items == 1) |
| 1438 | | return menu_video(machine, 0 << 16 | render_target_get_view(render_target_get_indexed(0))); |
| 1439 | | |
| 1440 | | /* add an item for moving the UI */ |
| 1441 | | item_list[menu_items++].text = "Move User Interface"; |
| 1442 | | |
| 1443 | | /* add an item to return */ |
| 1444 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 1445 | | |
| 1446 | | /* draw the menu */ |
| 1447 | | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| 1448 | | |
| 1449 | | /* handle the keys */ |
| 1450 | | if (ui_menu_generic_keys(machine, &selected, menu_items, visible_items)) |
| 1451 | | return selected; |
| 1452 | | |
| 1453 | | /* handle actions */ |
| 1454 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 2152 | switch (event->iptkey) |
| 1455 | 2153 | { |
| 1456 | | if (selected == menu_items - 2) |
| 1457 | | { |
| 1458 | | render_target *uitarget = render_get_ui_target(); |
| 1459 | | int targnum; |
| 2154 | /* if selected, reset to default value */ |
| 2155 | case IPT_UI_SELECT: |
| 2156 | newval = data->field->defvalue; |
| 2157 | break; |
| 1460 | 2158 | |
| 1461 | | for (targnum = 0; targnum < targets; targnum++) |
| 1462 | | if (targetlist[targnum] == uitarget) |
| 1463 | | break; |
| 1464 | | targnum = (targnum + 1) % targets; |
| 1465 | | render_set_ui_target(targetlist[targnum]); |
| 1466 | | } |
| 1467 | | else |
| 1468 | | return ui_menu_stack_push(menu_video, (selected << 16) | render_target_get_view(render_target_get_indexed(selected))); |
| 1469 | | } |
| 1470 | | } |
| 2159 | /* left decrements */ |
| 2160 | case IPT_UI_LEFT: |
| 2161 | newval -= input_code_pressed(KEYCODE_LSHIFT) ? 10 : 1; |
| 2162 | break; |
| 1471 | 2163 | |
| 1472 | | /* otherwise, draw the list of layouts */ |
| 1473 | | else |
| 1474 | | { |
| 1475 | | render_target *target = targetlist[curtarget]; |
| 1476 | | int layermask; |
| 1477 | | assert(target != NULL); |
| 1478 | | |
| 1479 | | /* add all the views */ |
| 1480 | | for ( ; menu_items < ARRAY_LENGTH(item_list); menu_items++) |
| 1481 | | { |
| 1482 | | const char *name = render_target_get_view_name(target, menu_items); |
| 1483 | | if (name == NULL) |
| 2164 | /* right increments */ |
| 2165 | case IPT_UI_RIGHT: |
| 2166 | newval += input_code_pressed(KEYCODE_LSHIFT) ? 10 : 1; |
| 1484 | 2167 | break; |
| 1485 | | |
| 1486 | | /* create a string for the item */ |
| 1487 | | item_list[menu_items].text = name; |
| 1488 | 2168 | } |
| 1489 | 2169 | |
| 1490 | | /* add an item to rotate */ |
| 1491 | | item_list[menu_items++].text = "Rotate View"; |
| 2170 | /* clamp to range */ |
| 2171 | if (newval < data->min) |
| 2172 | newval = data->min; |
| 2173 | if (newval > data->max) |
| 2174 | newval = data->max; |
| 1492 | 2175 | |
| 1493 | | /* add an item to enable/disable backdrops */ |
| 1494 | | layermask = render_target_get_layer_config(target); |
| 1495 | | if (layermask & LAYER_CONFIG_ENABLE_BACKDROP) |
| 1496 | | item_list[menu_items++].text = "Hide Backdrops"; |
| 1497 | | else |
| 1498 | | item_list[menu_items++].text = "Show Backdrops"; |
| 1499 | | |
| 1500 | | /* add an item to enable/disable overlays */ |
| 1501 | | if (layermask & LAYER_CONFIG_ENABLE_OVERLAY) |
| 1502 | | item_list[menu_items++].text = "Hide Overlays"; |
| 1503 | | else |
| 1504 | | item_list[menu_items++].text = "Show Overlays"; |
| 1505 | | |
| 1506 | | /* add an item to enable/disable bezels */ |
| 1507 | | if (layermask & LAYER_CONFIG_ENABLE_BEZEL) |
| 1508 | | item_list[menu_items++].text = "Hide Bezels"; |
| 1509 | | else |
| 1510 | | item_list[menu_items++].text = "Show Bezels"; |
| 1511 | | |
| 1512 | | /* add an item to enable/disable cropping */ |
| 1513 | | if (layermask & LAYER_CONFIG_ZOOM_TO_SCREEN) |
| 1514 | | item_list[menu_items++].text = "Show Full Artwork"; |
| 1515 | | else |
| 1516 | | item_list[menu_items++].text = "Crop to Screen"; |
| 1517 | | |
| 1518 | | /* add an item to return */ |
| 1519 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 1520 | | |
| 1521 | | /* draw the menu */ |
| 1522 | | visible_items = ui_menu_draw(item_list, menu_items, selected, NULL); |
| 1523 | | |
| 1524 | | /* handle the keys */ |
| 1525 | | if (ui_menu_generic_keys(machine, &selected, menu_items, visible_items)) |
| 1526 | | return selected; |
| 1527 | | |
| 1528 | | /* handle actions */ |
| 1529 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 2176 | /* if things changed, update */ |
| 2177 | if (newval != data->cur) |
| 1530 | 2178 | { |
| 1531 | | /* rotate */ |
| 1532 | | if (selected == menu_items - 6) |
| 1533 | | { |
| 1534 | | render_target_set_orientation(target, orientation_add(ROT90, render_target_get_orientation(target))); |
| 1535 | | if (target == render_get_ui_target()) |
| 1536 | | render_container_set_orientation(render_container_get_ui(), orientation_add(ROT270, render_container_get_orientation(render_container_get_ui()))); |
| 1537 | | } |
| 2179 | input_field_user_settings settings; |
| 1538 | 2180 | |
| 1539 | | /* show/hide backdrops */ |
| 1540 | | else if (selected == menu_items - 5) |
| 2181 | /* get the settings and set the new value */ |
| 2182 | input_field_get_user_settings(data->field, &settings); |
| 2183 | switch (data->type) |
| 1541 | 2184 | { |
| 1542 | | layermask ^= LAYER_CONFIG_ENABLE_BACKDROP; |
| 1543 | | render_target_set_layer_config(target, layermask); |
| 2185 | case ANALOG_ITEM_KEYSPEED: settings.delta = newval; break; |
| 2186 | case ANALOG_ITEM_CENTERSPEED: settings.centerdelta = newval; break; |
| 2187 | case ANALOG_ITEM_REVERSE: settings.reverse = newval; break; |
| 2188 | case ANALOG_ITEM_SENSITIVITY: settings.sensitivity = newval; break; |
| 1544 | 2189 | } |
| 2190 | input_field_set_user_settings(data->field, &settings); |
| 1545 | 2191 | |
| 1546 | | /* show/hide overlays */ |
| 1547 | | else if (selected == menu_items - 4) |
| 1548 | | { |
| 1549 | | layermask ^= LAYER_CONFIG_ENABLE_OVERLAY; |
| 1550 | | render_target_set_layer_config(target, layermask); |
| 1551 | | } |
| 1552 | | |
| 1553 | | /* show/hide bezels */ |
| 1554 | | else if (selected == menu_items - 3) |
| 1555 | | { |
| 1556 | | layermask ^= LAYER_CONFIG_ENABLE_BEZEL; |
| 1557 | | render_target_set_layer_config(target, layermask); |
| 1558 | | } |
| 1559 | | |
| 1560 | | /* crop/uncrop artwork */ |
| 1561 | | else if (selected == menu_items - 2) |
| 1562 | | { |
| 1563 | | layermask ^= LAYER_CONFIG_ZOOM_TO_SCREEN; |
| 1564 | | render_target_set_layer_config(target, layermask); |
| 1565 | | } |
| 1566 | | |
| 1567 | | /* else just set the selected view */ |
| 1568 | | else |
| 1569 | | render_target_set_view(target, selected); |
| 2192 | /* rebuild the menu */ |
| 2193 | ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_POSITION); |
| 1570 | 2194 | } |
| 1571 | 2195 | } |
| 1572 | | |
| 1573 | | return selected | (curtarget << 16); |
| 1574 | 2196 | } |
| 1575 | 2197 | |
| 1576 | 2198 | |
| 1577 | 2199 | /*------------------------------------------------- |
| 1578 | | menu_quit_game - handle the "menu" for |
| 1579 | | quitting the game |
| 2200 | menu_analog_populate - populate the analog |
| 2201 | settings menu |
| 1580 | 2202 | -------------------------------------------------*/ |
| 1581 | 2203 | |
| 1582 | | static UINT32 menu_quit_game(running_machine *machine, UINT32 state) |
| 2204 | static void menu_analog_populate(running_machine *machine, ui_menu *menu) |
| 1583 | 2205 | { |
| 1584 | | /* request a reset */ |
| 1585 | | mame_schedule_exit(machine); |
| 2206 | astring *subtext = astring_alloc(); |
| 2207 | astring *text = astring_alloc(); |
| 2208 | const input_field_config *field; |
| 2209 | const input_port_config *port; |
| 1586 | 2210 | |
| 1587 | | /* reset the menu stack */ |
| 1588 | | ui_menu_stack_reset(); |
| 1589 | | return 0; |
| 1590 | | } |
| 2211 | /* loop over input ports and add the items */ |
| 2212 | for (port = machine->portconfig; port != NULL; port = port->next) |
| 2213 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 2214 | if (input_type_is_analog(field->type)) |
| 2215 | { |
| 2216 | input_field_user_settings settings; |
| 2217 | int use_autocenter = FALSE; |
| 2218 | int type; |
| 1591 | 2219 | |
| 2220 | /* based on the type, determine if we enable autocenter */ |
| 2221 | switch (field->type) |
| 2222 | { |
| 2223 | case IPT_POSITIONAL: |
| 2224 | case IPT_POSITIONAL_V: |
| 2225 | if (field->flags & ANALOG_FLAG_WRAPS) |
| 2226 | break; |
| 1592 | 2227 | |
| 1593 | | /*------------------------------------------------- |
| 1594 | | menu_select_game - handle the game select |
| 1595 | | menu |
| 1596 | | -------------------------------------------------*/ |
| 2228 | case IPT_PEDAL: |
| 2229 | case IPT_PEDAL2: |
| 2230 | case IPT_PEDAL3: |
| 2231 | case IPT_PADDLE: |
| 2232 | case IPT_PADDLE_V: |
| 2233 | case IPT_AD_STICK_X: |
| 2234 | case IPT_AD_STICK_Y: |
| 2235 | case IPT_AD_STICK_Z: |
| 2236 | use_autocenter = TRUE; |
| 2237 | break; |
| 2238 | } |
| 1597 | 2239 | |
| 1598 | | static UINT32 menu_select_game(running_machine *machine, UINT32 state) |
| 1599 | | { |
| 1600 | | ui_menu_item item_list[VISIBLE_GAMES_IN_LIST + 2]; |
| 1601 | | int error = (state >> 17) & 1; |
| 1602 | | int recompute = (state >> 16) & 1; |
| 1603 | | UINT32 selected = state & 0xffff; |
| 1604 | | int visible_items; |
| 1605 | | int menu_items = 0; |
| 1606 | | int curitem, curkey; |
| 1607 | | menu_extra extra; |
| 1608 | | int matchcount; |
| 2240 | /* get the user settings */ |
| 2241 | input_field_get_user_settings(field, &settings); |
| 1609 | 2242 | |
| 1610 | | /* update our driver list if necessary */ |
| 1611 | | if (select_game_driver_list == NULL) |
| 1612 | | select_game_build_driver_list(); |
| 1613 | | for (curitem = matchcount = 0; select_game_driver_list[curitem] != NULL && matchcount < VISIBLE_GAMES_IN_LIST; curitem++) |
| 1614 | | if (!(select_game_driver_list[curitem]->flags & GAME_NO_STANDALONE)) |
| 1615 | | matchcount++; |
| 2243 | /* iterate over types */ |
| 2244 | for (type = 0; type < ANALOG_ITEM_COUNT; type++) |
| 2245 | if (type != ANALOG_ITEM_CENTERSPEED || use_autocenter) |
| 2246 | { |
| 2247 | analog_item_data *data; |
| 2248 | UINT32 flags = 0; |
| 1616 | 2249 | |
| 1617 | | /* if nothing there, just display an error message and exit */ |
| 1618 | | if (matchcount == 0) |
| 1619 | | { |
| 1620 | | ui_draw_text_box("No games found. Please check the rompath specified in the mame.ini file.\n\n" |
| 1621 | | "If this is your first time using MAME, please see the config.txt file in " |
| 1622 | | "the docs directory for information on configuring MAME.\n\n" |
| 1623 | | "Press any key to exit", |
| 1624 | | JUSTIFY_CENTER, 0.5f, 0.5f, UI_REDCOLOR); |
| 1625 | | if (input_code_poll_switches(FALSE)) |
| 1626 | | return ui_menu_stack_pop(); |
| 1627 | | return 0; |
| 1628 | | } |
| 2250 | /* allocate a data item for tracking what this menu item refers to */ |
| 2251 | data = ui_menu_pool_alloc(menu, sizeof(*data)); |
| 2252 | data->field = field; |
| 2253 | data->type = type; |
| 1629 | 2254 | |
| 1630 | | /* reset the menu and string pool */ |
| 1631 | | memset(item_list, 0, sizeof(item_list)); |
| 1632 | | menu_string_pool_offset = 0; |
| 2255 | /* determine the properties of this item */ |
| 2256 | switch (type) |
| 2257 | { |
| 2258 | default: |
| 2259 | case ANALOG_ITEM_KEYSPEED: |
| 2260 | astring_printf(text, "%s Digital Speed", input_field_name(field)); |
| 2261 | astring_printf(subtext, "%d", settings.delta); |
| 2262 | data->min = 0; |
| 2263 | data->max = 255; |
| 2264 | data->cur = settings.delta; |
| 2265 | break; |
| 1633 | 2266 | |
| 1634 | | /* reset the text and recompute if necessary */ |
| 1635 | | if (recompute) |
| 1636 | | driver_list_get_approx_matches(select_game_driver_list, select_game_buffer, matchcount, select_game_list); |
| 1637 | | recompute = 0; |
| 2267 | case ANALOG_ITEM_CENTERSPEED: |
| 2268 | astring_printf(text, "%s Autocenter Speed", input_field_name(field)); |
| 2269 | astring_printf(subtext, "%d", settings.centerdelta); |
| 2270 | data->min = 0; |
| 2271 | data->max = 255; |
| 2272 | data->cur = settings.centerdelta; |
| 2273 | break; |
| 1638 | 2274 | |
| 1639 | | /* iterate over entries */ |
| 1640 | | for (curitem = 0; curitem < matchcount; curitem++) |
| 1641 | | { |
| 1642 | | const game_driver *driver = select_game_list[curitem]; |
| 1643 | | if (driver != NULL) |
| 1644 | | { |
| 1645 | | const game_driver *cloneof = driver_get_clone(driver); |
| 1646 | | item_list[menu_items].text = menu_string_pool_add("%s", driver->name); |
| 1647 | | item_list[menu_items].subtext = menu_string_pool_add("%s", driver->description); |
| 1648 | | item_list[menu_items++].flags = (cloneof == NULL || (cloneof->flags & GAME_IS_BIOS_ROOT)) ? 0 : MENU_FLAG_INVERT; |
| 1649 | | } |
| 1650 | | } |
| 2275 | case ANALOG_ITEM_REVERSE: |
| 2276 | astring_printf(text, "%s Reverse", input_field_name(field)); |
| 2277 | astring_cpyc(subtext, settings.reverse ? "On" : "Off"); |
| 2278 | data->min = 0; |
| 2279 | data->max = 1; |
| 2280 | data->cur = settings.reverse; |
| 2281 | break; |
| 1651 | 2282 | |
| 1652 | | /* add an item to return, but only if we're not going to pop to the quit handler */ |
| 1653 | | if (!ui_menu_is_force_game_select()) |
| 1654 | | item_list[menu_items++].text = "Return to Prior Menu"; |
| 2283 | case ANALOG_ITEM_SENSITIVITY: |
| 2284 | astring_printf(text, "%s Sensitivity", input_field_name(field)); |
| 2285 | astring_printf(subtext, "%d", settings.sensitivity); |
| 2286 | data->min = 1; |
| 2287 | data->max = 255; |
| 2288 | data->cur = settings.sensitivity; |
| 2289 | break; |
| 2290 | } |
| 1655 | 2291 | |
| 1656 | | /* otherwise, add a general input configuration and exit menus */ |
| 1657 | | else |
| 1658 | | { |
| 1659 | | item_list[menu_items++].text = "Configure General Inputs"; |
| 1660 | | item_list[menu_items++].text = "Exit"; |
| 1661 | | } |
| 2292 | /* put on arrows */ |
| 2293 | if (data->cur > data->min) |
| 2294 | flags |= MENU_FLAG_LEFT_ARROW; |
| 2295 | if (data->cur < data->max) |
| 2296 | flags |= MENU_FLAG_RIGHT_ARROW; |
| 1662 | 2297 | |
| 1663 | | /* configure the extra menu */ |
| 1664 | | extra.top = ui_get_line_height() + 3.0f * UI_BOX_TB_BORDER; |
| 1665 | | extra.bottom = 4.0f * ui_get_line_height() + 3.0f * UI_BOX_TB_BORDER; |
| 1666 | | extra.render = select_game_render; |
| 1667 | | extra.param = (selected < matchcount) ? (void *)select_game_list[selected] : NULL; |
| 1668 | | |
| 1669 | | /* draw the menu */ |
| 1670 | | visible_items = ui_menu_draw(item_list, menu_items, selected, &extra); |
| 1671 | | |
| 1672 | | /* if we have an error, overlay with the error message and look for a keypress */ |
| 1673 | | if (error) |
| 1674 | | { |
| 1675 | | ui_draw_text_box("The selected game is missing one or more required ROM or CHD images. " |
| 1676 | | "Please select a different game.\n\nPress any key to continue.", |
| 1677 | | JUSTIFY_CENTER, 0.5f, 0.5f, UI_REDCOLOR); |
| 1678 | | if (input_code_poll_switches(FALSE)) |
| 1679 | | error = FALSE; |
| 1680 | | } |
| 1681 | | |
| 1682 | | /* non-error case process normally */ |
| 1683 | | else |
| 1684 | | { |
| 1685 | | /* handle typeahead */ |
| 1686 | | recompute |= select_game_handle_key(KEYCODE_BACKSPACE, 8); |
| 1687 | | recompute |= select_game_handle_key(KEYCODE_SPACE, ' '); |
| 1688 | | for (curkey = KEYCODE_A; curkey <= KEYCODE_Z; curkey++) |
| 1689 | | recompute |= select_game_handle_key(curkey, curkey - KEYCODE_A + 'a'); |
| 1690 | | for (curkey = KEYCODE_0; curkey <= KEYCODE_9; curkey++) |
| 1691 | | recompute |= select_game_handle_key(curkey, curkey - KEYCODE_0 + '0'); |
| 1692 | | for (curkey = KEYCODE_0_PAD; curkey <= KEYCODE_9_PAD; curkey++) |
| 1693 | | recompute |= select_game_handle_key(curkey, curkey - KEYCODE_0_PAD + '0'); |
| 1694 | | |
| 1695 | | /* escape pressed with non-empty text clears the text */ |
| 1696 | | if (input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1697 | | { |
| 1698 | | if (select_game_buffer[0] == 0) |
| 1699 | | return ui_menu_stack_pop(); |
| 1700 | | else |
| 1701 | | { |
| 1702 | | select_game_buffer[0] = 0; |
| 1703 | | recompute = TRUE; |
| 2298 | /* append a menu item */ |
| 2299 | ui_menu_item_append(menu, astring_c(text), astring_c(subtext), flags, data); |
| 2300 | } |
| 1704 | 2301 | } |
| 1705 | | } |
| 1706 | 2302 | |
| 1707 | | /* if we're recomputing, reselect the first item */ |
| 1708 | | if (recompute) |
| 1709 | | selected = 0; |
| 2303 | /* release our temporary strings */ |
| 2304 | astring_free(subtext); |
| 2305 | astring_free(text); |
| 2306 | } |
| 1710 | 2307 | |
| 1711 | | /* ignore pause keys by swallowing them */ |
| 1712 | | input_ui_pressed(machine, IPT_UI_PAUSE); |
| 1713 | 2308 | |
| 1714 | | /* handle the generic keys */ |
| 1715 | | if (!recompute && ui_menu_generic_keys(machine, &selected, menu_items, visible_items)) |
| 1716 | | return selected; |
| 2309 | /*------------------------------------------------- |
| 2310 | menu_bookkeeping - handle the bookkeeping |
| 2311 | information menu |
| 2312 | -------------------------------------------------*/ |
| 1717 | 2313 | |
| 1718 | | /* handle actions */ |
| 1719 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 1720 | | { |
| 1721 | | /* control config */ |
| 1722 | | if (ui_menu_is_force_game_select() && selected == menu_items - 2) |
| 1723 | | return ui_menu_stack_push(menu_input_groups, 0); |
| 2314 | #ifndef MESS |
| 2315 | static void menu_bookkeeping(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 2316 | { |
| 2317 | attotime *prevtime; |
| 2318 | attotime curtime; |
| 1724 | 2319 | |
| 1725 | | /* valid selected game */ |
| 1726 | | if (selected < ARRAY_LENGTH(select_game_list) && select_game_list[selected] != NULL) |
| 1727 | | { |
| 1728 | | audit_record *audit; |
| 1729 | | int audit_records; |
| 1730 | | int audit_result; |
| 2320 | /* if no state, allocate some */ |
| 2321 | if (state == NULL) |
| 2322 | state = ui_menu_alloc_state(menu, sizeof(*prevtime)); |
| 2323 | prevtime = state; |
| 1731 | 2324 | |
| 1732 | | /* audit the game first to see if we're going to work */ |
| 1733 | | audit_records = audit_images(mame_options(), select_game_list[selected], AUDIT_VALIDATE_FAST, &audit); |
| 1734 | | audit_result = audit_summary(select_game_list[selected], audit_records, audit, FALSE); |
| 1735 | | if (audit_records > 0) |
| 1736 | | free(audit); |
| 1737 | | |
| 1738 | | /* if everything looks good, schedule the new driver */ |
| 1739 | | if (audit_result == CORRECT || audit_result == BEST_AVAILABLE) |
| 1740 | | { |
| 1741 | | mame_schedule_new_driver(machine, select_game_list[selected]); |
| 1742 | | ui_menu_stack_reset(); |
| 1743 | | return 0; |
| 1744 | | } |
| 1745 | | |
| 1746 | | /* otherwise, display an error */ |
| 1747 | | else |
| 1748 | | { |
| 1749 | | error = TRUE; |
| 1750 | | input_code_poll_switches(TRUE); |
| 1751 | | } |
| 1752 | | } |
| 1753 | | } |
| 2325 | /* if the time has rolled over another second, regenerate */ |
| 2326 | curtime = timer_get_time(); |
| 2327 | if (prevtime->seconds != curtime.seconds) |
| 2328 | { |
| 2329 | ui_menu_reset(menu, UI_MENU_RESET_SELECT_FIRST); |
| 2330 | *prevtime = curtime; |
| 2331 | menu_bookkeeping_populate(machine, menu, prevtime); |
| 1754 | 2332 | } |
| 1755 | 2333 | |
| 1756 | | return selected | (recompute << 16) | (error << 17); |
| 2334 | /* process the menu */ |
| 2335 | ui_menu_process(menu, 0); |
| 1757 | 2336 | } |
| 2337 | #endif |
| 1758 | 2338 | |
| 1759 | 2339 | |
| 1760 | | |
| 1761 | | /*************************************************************************** |
| 1762 | | MENU HELPERS |
| 1763 | | ***************************************************************************/ |
| 1764 | | |
| 1765 | 2340 | /*------------------------------------------------- |
| 1766 | | menu_render_triangle - render a triangle that |
| 1767 | | is used for up/down arrows and left/right |
| 1768 | | indicators |
| 2341 | menu_bookkeeping - handle the bookkeeping |
| 2342 | information menu |
| 1769 | 2343 | -------------------------------------------------*/ |
| 1770 | 2344 | |
| 1771 | | static void menu_render_triangle(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param) |
| 2345 | #ifndef MESS |
| 2346 | static void menu_bookkeeping_populate(running_machine *machine, ui_menu *menu, attotime *curtime) |
| 1772 | 2347 | { |
| 1773 | | int halfwidth = dest->width / 2; |
| 1774 | | int height = dest->height; |
| 1775 | | int x, y; |
| 2348 | astring *tempstring = astring_alloc(); |
| 2349 | int ctrnum; |
| 1776 | 2350 | |
| 1777 | | /* start with all-transparent */ |
| 1778 | | bitmap_fill(dest, NULL, MAKE_ARGB(0x00,0x00,0x00,0x00)); |
| 2351 | /* show total time first */ |
| 2352 | if (curtime->seconds >= 60 * 60) |
| 2353 | astring_catprintf(tempstring, "Uptime: %d:%02d:%02d\n\n", curtime->seconds / (60*60), (curtime->seconds / 60) % 60, curtime->seconds % 60); |
| 2354 | else |
| 2355 | astring_catprintf(tempstring, "Uptime: %d:%02d\n\n", (curtime->seconds / 60) % 60, curtime->seconds % 60); |
| 1779 | 2356 | |
| 1780 | | /* render from the tip to the bottom */ |
| 1781 | | for (y = 0; y < height; y++) |
| 2357 | /* show tickets at the top */ |
| 2358 | if (dispensed_tickets > 0) |
| 2359 | astring_catprintf(tempstring, "Tickets dispensed: %d\n\n", dispensed_tickets); |
| 2360 | |
| 2361 | /* loop over coin counters */ |
| 2362 | for (ctrnum = 0; ctrnum < COIN_COUNTERS; ctrnum++) |
| 1782 | 2363 | { |
| 1783 | | int linewidth = (y * (halfwidth - 1) + (height / 2)) * 255 * 2 / height; |
| 1784 | | UINT32 *target = BITMAP_ADDR32(dest, y, halfwidth); |
| 2364 | /* display the coin counter number */ |
| 2365 | astring_catprintf(tempstring, "Coin %c: ", ctrnum + 'A'); |
| 1785 | 2366 | |
| 1786 | | /* don't antialias if height < 12 */ |
| 1787 | | if (dest->height < 12) |
| 1788 | | { |
| 1789 | | int pixels = (linewidth + 254) / 255; |
| 1790 | | if (pixels % 2 == 0) pixels++; |
| 1791 | | linewidth = pixels * 255; |
| 1792 | | } |
| 2367 | /* display how many coins */ |
| 2368 | if (coin_count[ctrnum] == 0) |
| 2369 | astring_catc(tempstring, "NA"); |
| 2370 | else |
| 2371 | astring_catprintf(tempstring, "%d", coin_count[ctrnum]); |
| 1793 | 2372 | |
| 1794 | | /* loop while we still have data to generate */ |
| 1795 | | for (x = 0; linewidth > 0; x++) |
| 1796 | | { |
| 1797 | | int dalpha; |
| 2373 | /* display whether or not we are locked out */ |
| 2374 | if (coinlockedout[ctrnum]) |
| 2375 | astring_catc(tempstring, " (locked)"); |
| 2376 | astring_catc(tempstring, "\n"); |
| 2377 | } |
| 1798 | 2378 | |
| 1799 | | /* first colum we only consume one pixel */ |
| 1800 | | if (x == 0) |
| 1801 | | { |
| 1802 | | dalpha = MIN(0xff, linewidth); |
| 1803 | | target[x] = MAKE_ARGB(dalpha,0xff,0xff,0xff); |
| 1804 | | } |
| 1805 | | |
| 1806 | | /* remaining columns consume two pixels, one on each side */ |
| 1807 | | else |
| 1808 | | { |
| 1809 | | dalpha = MIN(0x1fe, linewidth); |
| 1810 | | target[x] = target[-x] = MAKE_ARGB(dalpha/2,0xff,0xff,0xff); |
| 1811 | | } |
| 1812 | | |
| 1813 | | /* account for the weight we consumed */ |
| 1814 | | linewidth -= dalpha; |
| 1815 | | } |
| 1816 | | } |
| 2379 | /* append the single item */ |
| 2380 | ui_menu_item_append(menu, astring_c(tempstring), NULL, MENU_FLAG_MULTILINE, NULL); |
| 2381 | astring_free(tempstring); |
| 1817 | 2382 | } |
| 2383 | #endif |
| 1818 | 2384 | |
| 1819 | 2385 | |
| 1820 | 2386 | /*------------------------------------------------- |
| 1821 | | input_menu_get_items - build a list of items |
| 1822 | | for a given group of inputs |
| 2387 | menu_game_info - handle the game information |
| 2388 | menu |
| 1823 | 2389 | -------------------------------------------------*/ |
| 1824 | 2390 | |
| 1825 | | static int input_menu_get_items(running_machine *machine, input_item_data *itemlist, int group) |
| 2391 | static void menu_game_info(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1826 | 2392 | { |
| 1827 | | input_item_data *item = itemlist; |
| 1828 | | const input_type_desc *typedesc; |
| 1829 | | astring *seqstring; |
| 2393 | /* if the menu isn't built, populate now */ |
| 2394 | if (!ui_menu_populated(menu)) |
| 2395 | { |
| 2396 | astring *tempstring = game_info_astring(machine, astring_alloc()); |
| 2397 | ui_menu_item_append(menu, astring_c(tempstring), NULL, MENU_FLAG_MULTILINE, NULL); |
| 2398 | astring_free(tempstring); |
| 2399 | } |
| 1830 | 2400 | |
| 1831 | | /* iterate over the input ports and add menu items */ |
| 1832 | | seqstring = astring_alloc(); |
| 1833 | | for (typedesc = input_type_list(machine); typedesc != NULL; typedesc = typedesc->next) |
| 1834 | | |
| 1835 | | /* add if we match the group and we have a valid name */ |
| 1836 | | if (typedesc->group == group && typedesc->name != NULL && typedesc->name[0] != 0) |
| 1837 | | { |
| 1838 | | /* build an entry for the standard sequence */ |
| 1839 | | item->typedesc = typedesc; |
| 1840 | | item->seqtype = SEQ_TYPE_STANDARD; |
| 1841 | | item->seq = *input_type_seq(machine, typedesc->type, typedesc->player, item->seqtype); |
| 1842 | | item->defseq = &typedesc->seq[item->seqtype]; |
| 1843 | | item->sortorder = item - itemlist; |
| 1844 | | item->type = input_type_is_analog(typedesc->type) ? INPUT_TYPE_ANALOG : INPUT_TYPE_DIGITAL; |
| 1845 | | item->name = menu_string_pool_add(input_format[item->type], typedesc->name); |
| 1846 | | item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, &item->seq))); |
| 1847 | | item->invert = input_seq_cmp(&item->seq, item->defseq); |
| 1848 | | item++; |
| 1849 | | |
| 1850 | | /* if we're analog, add more entries */ |
| 1851 | | if (item[-1].type == INPUT_TYPE_ANALOG) |
| 1852 | | { |
| 1853 | | /* build an entry for the decrement sequence */ |
| 1854 | | item->typedesc = typedesc; |
| 1855 | | item->seqtype = SEQ_TYPE_DECREMENT; |
| 1856 | | item->seq = *input_type_seq(machine, typedesc->type, typedesc->player, item->seqtype); |
| 1857 | | item->defseq = &typedesc->seq[item->seqtype]; |
| 1858 | | item->sortorder = item - itemlist; |
| 1859 | | item->type = INPUT_TYPE_ANALOG_DEC; |
| 1860 | | item->name = menu_string_pool_add(input_format[item->type], typedesc->name); |
| 1861 | | item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, &item->seq))); |
| 1862 | | item->invert = input_seq_cmp(&item->seq, item->defseq); |
| 1863 | | item++; |
| 1864 | | |
| 1865 | | /* build an entry for the increment sequence */ |
| 1866 | | item->typedesc = typedesc; |
| 1867 | | item->seqtype = SEQ_TYPE_INCREMENT; |
| 1868 | | item->seq = *input_type_seq(machine, typedesc->type, typedesc->player, item->seqtype); |
| 1869 | | item->defseq = &typedesc->seq[item->seqtype]; |
| 1870 | | item->sortorder = item - itemlist; |
| 1871 | | item->type = INPUT_TYPE_ANALOG_INC; |
| 1872 | | item->name = menu_string_pool_add(input_format[item->type], typedesc->name); |
| 1873 | | item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, &item->seq))); |
| 1874 | | item->invert = input_seq_cmp(&item->seq, item->defseq); |
| 1875 | | item++; |
| 1876 | | } |
| 1877 | | } |
| 1878 | | |
| 1879 | | /* return the number of items */ |
| 1880 | | astring_free(seqstring); |
| 1881 | | return item - itemlist; |
| 2401 | /* process the menu */ |
| 2402 | ui_menu_process(menu, 0); |
| 1882 | 2403 | } |
| 1883 | 2404 | |
| 1884 | 2405 | |
| 1885 | 2406 | /*------------------------------------------------- |
| 1886 | | get_field_default_seq - return a pointer |
| 1887 | | to the default sequence for the given field |
| 2407 | menu_memory_card - handle the memory card |
| 2408 | menu |
| 1888 | 2409 | -------------------------------------------------*/ |
| 1889 | 2410 | |
| 1890 | | static const input_seq *get_field_default_seq(const input_field_config *field, int seqtype) |
| 2411 | static void menu_memory_card(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 1891 | 2412 | { |
| 1892 | | if (input_seq_get_1(&field->seq[seqtype]) == SEQCODE_DEFAULT) |
| 1893 | | return input_type_seq(field->port->machine, field->type, field->player, seqtype); |
| 1894 | | else |
| 1895 | | return &field->seq[seqtype]; |
| 1896 | | } |
| 2413 | const ui_menu_event *event; |
| 2414 | int *cardnum; |
| 1897 | 2415 | |
| 2416 | /* if no state, allocate some */ |
| 2417 | if (state == NULL) |
| 2418 | state = ui_menu_alloc_state(menu, sizeof(*cardnum)); |
| 2419 | cardnum = state; |
| 1898 | 2420 | |
| 1899 | | /*------------------------------------------------- |
| 1900 | | input_menu_get_game_items - build a list of |
| 1901 | | items for the game-specific inputs |
| 1902 | | -------------------------------------------------*/ |
| 2421 | /* if the menu isn't built, populate now */ |
| 2422 | if (!ui_menu_populated(menu)) |
| 2423 | menu_memory_card_populate(machine, menu, *cardnum); |
| 1903 | 2424 | |
| 1904 | | static int input_menu_get_game_items(running_machine *machine, input_item_data *itemlist) |
| 1905 | | { |
| 1906 | | astring *seqstring = astring_alloc(); |
| 1907 | | input_item_data *item = itemlist; |
| 1908 | | const input_port_config *port; |
| 1909 | | const input_field_config *field; |
| 2425 | /* process the menu */ |
| 2426 | event = ui_menu_process(menu, UI_MENU_PROCESS_LR_REPEAT); |
| 1910 | 2427 | |
| 1911 | | /* iterate over the input ports and add menu items */ |
| 1912 | | for (port = machine->portconfig; port != NULL; port = port->next) |
| 1913 | | for (field = port->fieldlist; field != NULL; field = field->next) |
| 2428 | /* if something was selected, act on it */ |
| 2429 | if (event != NULL && event->itemref != NULL) |
| 2430 | { |
| 2431 | FPTR item = (FPTR)event->itemref; |
| 2432 | |
| 2433 | /* select executes actions on some of the items */ |
| 2434 | if (event->iptkey == IPT_UI_SELECT) |
| 1914 | 2435 | { |
| 1915 | | const char *name = input_field_name(field); |
| 1916 | | |
| 1917 | | /* add if we match the group and we have a valid name */ |
| 1918 | | if (name != NULL && input_condition_true(machine, &field->condition) && |
| 1919 | | #ifdef MESS |
| 1920 | | (field->category == 0 || input_category_active(machine, field->category)) && |
| 1921 | | #endif /* MESS */ |
| 1922 | | ((field->type == IPT_OTHER && field->name != NULL) || input_type_group(machine, field->type, field->player) != IPG_INVALID)) |
| 2436 | switch (item) |
| 1923 | 2437 | { |
| 1924 | | UINT16 sortorder; |
| 2438 | /* handle card loading; if we succeed, clear the menus */ |
| 2439 | case MEMCARD_ITEM_LOAD: |
| 2440 | if (memcard_insert(menu->machine, *cardnum) == 0) |
| 2441 | { |
| 2442 | popmessage("Memory card loaded"); |
| 2443 | ui_menu_stack_reset(menu->machine); |
| 2444 | } |
| 2445 | else |
| 2446 | popmessage("Error loading memory card"); |
| 2447 | break; |
| 1925 | 2448 | |
| 1926 | | /* determine the sorting order */ |
| 1927 | | if (field->type >= IPT_START1 && field->type <= __ipt_analog_end) |
| 1928 | | sortorder = (field->type << 2) | (field->player << 12); |
| 1929 | | else |
| 1930 | | sortorder = field->type | 0xf000; |
| 2449 | /* handle card ejecting */ |
| 2450 | case MEMCARD_ITEM_EJECT: |
| 2451 | memcard_eject(menu->machine); |
| 2452 | popmessage("Memory card ejected"); |
| 2453 | break; |
| 1931 | 2454 | |
| 1932 | | /* build an entry for the standard sequence */ |
| 1933 | | item->field = field; |
| 1934 | | item->seqtype = SEQ_TYPE_STANDARD; |
| 1935 | | item->seq = *input_field_seq(field, item->seqtype); |
| 1936 | | item->defseq = get_field_default_seq(field, item->seqtype); |
| 1937 | | item->sortorder = sortorder; |
| 1938 | | item->type = input_type_is_analog(field->type) ? INPUT_TYPE_ANALOG : INPUT_TYPE_DIGITAL; |
| 1939 | | item->name = menu_string_pool_add(input_format[item->type], name); |
| 1940 | | item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, &item->seq))); |
| 1941 | | item->invert = input_seq_cmp(&item->seq, item->defseq); |
| 1942 | | item++; |
| 2455 | /* handle card creating */ |
| 2456 | case MEMCARD_ITEM_CREATE: |
| 2457 | if (memcard_create(menu->machine, *cardnum, FALSE) == 0) |
| 2458 | popmessage("Memory card created"); |
| 2459 | else |
| 2460 | popmessage("Error creating memory card\n(Card may already exist)"); |
| 2461 | break; |
| 2462 | } |
| 2463 | } |
| 1943 | 2464 | |
| 1944 | | /* if we're analog, add more entries */ |
| 1945 | | if (item[-1].type == INPUT_TYPE_ANALOG) |
| 1946 | | { |
| 1947 | | /* build an entry for the decrement sequence */ |
| 1948 | | item->field = field; |
| 1949 | | item->seqtype = SEQ_TYPE_DECREMENT; |
| 1950 | | item->seq = *input_field_seq(field, item->seqtype); |
| 1951 | | item->defseq = get_field_default_seq(field, item->seqtype); |
| 1952 | | item->sortorder = sortorder; |
| 1953 | | item->type = INPUT_TYPE_ANALOG_DEC; |
| 1954 | | item->name = menu_string_pool_add(input_format[item->type], name); |
| 1955 | | item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, &item->seq))); |
| 1956 | | item->invert = input_seq_cmp(&item->seq, item->defseq); |
| 1957 | | item++; |
| 2465 | /* the select item has extra keys */ |
| 2466 | else if (item == MEMCARD_ITEM_SELECT) |
| 2467 | { |
| 2468 | switch (event->iptkey) |
| 2469 | { |
| 2470 | /* left decrements the card number */ |
| 2471 | case IPT_UI_LEFT: |
| 2472 | *cardnum -= 1; |
| 2473 | break; |
| 1958 | 2474 | |
| 1959 | | /* build an entry for the increment sequence */ |
| 1960 | | item->field = field; |
| 1961 | | item->seqtype = SEQ_TYPE_INCREMENT; |
| 1962 | | item->seq = *input_field_seq(field, item->seqtype); |
| 1963 | | item->defseq = get_field_default_seq(field, item->seqtype); |
| 1964 | | item->sortorder = sortorder; |
| 1965 | | item->type = INPUT_TYPE_ANALOG_INC; |
| 1966 | | item->name = menu_string_pool_add(input_format[item->type], name); |
| 1967 | | item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, &item->seq))); |
| 1968 | | item->invert = input_seq_cmp(&item->seq, item->defseq); |
| 1969 | | item++; |
| 1970 | | } |
| 2475 | /* right decrements the card number */ |
| 2476 | case IPT_UI_RIGHT: |
| 2477 | *cardnum += 1; |
| 2478 | break; |
| 1971 | 2479 | } |
| 1972 | 2480 | } |
| 1973 | | |
| 1974 | | /* return the number of items */ |
| 1975 | | astring_free(seqstring); |
| 1976 | | return item - itemlist; |
| 2481 | } |
| 1977 | 2482 | } |
| 1978 | 2483 | |
| 1979 | 2484 | |
| 1980 | 2485 | /*------------------------------------------------- |
| 1981 | | input_menu_toggle_none_default - toggle |
| 1982 | | between "NONE" and the default item |
| 2486 | menu_memory_card_populate - populate the |
| 2487 | memory card menu |
| 1983 | 2488 | -------------------------------------------------*/ |
| 1984 | 2489 | |
| 1985 | | static void input_menu_toggle_none_default(input_seq *selected_seq, input_seq *original_seq, const input_seq *selected_defseq) |
| 2490 | static void menu_memory_card_populate(running_machine *machine, ui_menu *menu, int cardnum) |
| 1986 | 2491 | { |
| 1987 | | /* if we used to be "none", toggle to the default value */ |
| 1988 | | if (input_seq_get_1(original_seq) == SEQCODE_END) |
| 1989 | | *selected_seq = *selected_defseq; |
| 2492 | char tempstring[20]; |
| 2493 | UINT32 flags = 0; |
| 1990 | 2494 | |
| 1991 | | /* otherwise, toggle to "none" */ |
| 1992 | | else |
| 1993 | | input_seq_set_1(selected_seq, SEQCODE_END); |
| 2495 | /* add the card select menu */ |
| 2496 | sprintf(tempstring, "%d", cardnum); |
| 2497 | if (cardnum > 0) |
| 2498 | flags |= MENU_FLAG_LEFT_ARROW; |
| 2499 | if (cardnum < 1000) |
| 2500 | flags |= MENU_FLAG_RIGHT_ARROW; |
| 2501 | ui_menu_item_append(menu, "Card Number:", tempstring, flags, (void *)MEMCARD_ITEM_SELECT); |
| 2502 | |
| 2503 | /* add the remaining items */ |
| 2504 | ui_menu_item_append(menu, "Load Selected Card", NULL, 0, (void *)MEMCARD_ITEM_LOAD); |
| 2505 | if (memcard_present() != -1) |
| 2506 | ui_menu_item_append(menu, "Eject Current Card", NULL, 0, (void *)MEMCARD_ITEM_EJECT); |
| 2507 | ui_menu_item_append(menu, "Create New Card", NULL, 0, (void *)MEMCARD_ITEM_CREATE); |
| 1994 | 2508 | } |
| 1995 | 2509 | |
| 1996 | 2510 | |
| 1997 | 2511 | /*------------------------------------------------- |
| 1998 | | input_menu_compare_items - compare two |
| 1999 | | items for quicksort |
| 2512 | menu_video_targets - handle the video targets |
| 2513 | menu |
| 2000 | 2514 | -------------------------------------------------*/ |
| 2001 | 2515 | |
| 2002 | | static int input_menu_compare_items(const void *i1, const void *i2) |
| 2516 | static void menu_video_targets(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 2003 | 2517 | { |
| 2004 | | const ui_menu_item *item1 = i1; |
| 2005 | | const ui_menu_item *item2 = i2; |
| 2006 | | const input_item_data *data1 = item1->ref; |
| 2007 | | const input_item_data *data2 = item2->ref; |
| 2008 | | if (data1->sortorder < data2->sortorder) |
| 2009 | | return -1; |
| 2010 | | if (data1->sortorder > data2->sortorder) |
| 2011 | | return 1; |
| 2012 | | if (data1->type < data2->type) |
| 2013 | | return -1; |
| 2014 | | if (data1->type > data2->type) |
| 2015 | | return 1; |
| 2016 | | return 0; |
| 2518 | const ui_menu_event *event; |
| 2519 | |
| 2520 | /* if the menu isn't built, populate now */ |
| 2521 | if (!ui_menu_populated(menu)) |
| 2522 | menu_video_targets_populate(machine, menu); |
| 2523 | |
| 2524 | /* process the menu */ |
| 2525 | event = ui_menu_process(menu, 0); |
| 2526 | if (event != NULL && event->iptkey == IPT_UI_SELECT) |
| 2527 | ui_menu_stack_push(ui_menu_alloc(machine, menu_video_options, event->itemref)); |
| 2017 | 2528 | } |
| 2018 | 2529 | |
| 2019 | 2530 | |
| 2020 | 2531 | /*------------------------------------------------- |
| 2021 | | switches_menu_add_item - add an item to the |
| 2022 | | switches menu list |
| 2532 | menu_video_targets_populate - populate the |
| 2533 | video targets menu |
| 2023 | 2534 | -------------------------------------------------*/ |
| 2024 | 2535 | |
| 2025 | | static void switches_menu_add_item(ui_menu_item *item, const input_field_config *field) |
| 2536 | static void menu_video_targets_populate(running_machine *machine, ui_menu *menu) |
| 2026 | 2537 | { |
| 2027 | | const input_setting_config *setting; |
| 2028 | | input_field_user_settings settings; |
| 2538 | int targetnum; |
| 2029 | 2539 | |
| 2030 | | /* set the text to the name and the subitem text to invalid */ |
| 2031 | | input_field_get_user_settings(field, &settings); |
| 2032 | | item->text = input_field_name(field); |
| 2033 | | item->subtext = NULL; |
| 2540 | /* find the targets */ |
| 2541 | for (targetnum = 0; ; targetnum++) |
| 2542 | { |
| 2543 | render_target *target = render_target_get_indexed(targetnum); |
| 2544 | char buffer[40]; |
| 2034 | 2545 | |
| 2035 | | /* scan for the current selection in the list */ |
| 2036 | | for (setting = field->settinglist; setting != NULL; setting = setting->next) |
| 2037 | | if (input_condition_true(field->port->machine, &setting->condition)) |
| 2038 | | { |
| 2039 | | /* if this is a match, set the subtext */ |
| 2040 | | if (setting->value == settings.value) |
| 2041 | | item->subtext = setting->name; |
| 2546 | /* stop when we run out */ |
| 2547 | if (target == NULL) |
| 2548 | break; |
| 2042 | 2549 | |
| 2043 | | /* else if we haven't seen a match yet, show a left arrow */ |
| 2044 | | else if (item->subtext == NULL) |
| 2045 | | item->flags |= MENU_FLAG_LEFT_ARROW; |
| 2046 | | |
| 2047 | | /* else if we have seen a match, show a right arrow */ |
| 2048 | | else |
| 2049 | | item->flags |= MENU_FLAG_RIGHT_ARROW; |
| 2050 | | } |
| 2051 | | |
| 2052 | | /* if no matches, we're invalid */ |
| 2053 | | if (item->subtext == NULL) |
| 2054 | | item->subtext = "INVALID"; |
| 2055 | | |
| 2056 | | /* stash our reference */ |
| 2057 | | item->ref = (void *)field; |
| 2550 | /* add a menu item */ |
| 2551 | sprintf(buffer, "Screen #%d", targetnum); |
| 2552 | ui_menu_item_append(menu, buffer, NULL, 0, target); |
| 2553 | } |
| 2058 | 2554 | } |
| 2059 | 2555 | |
| 2060 | 2556 | |
| 2061 | 2557 | /*------------------------------------------------- |
| 2062 | | analog_menu_add_item - add an item to the |
| 2063 | | analog controls menu |
| 2558 | menu_video_options - handle the video options |
| 2559 | menu |
| 2064 | 2560 | -------------------------------------------------*/ |
| 2065 | 2561 | |
| 2066 | | static void analog_menu_add_item(ui_menu_item *item, const input_field_config *field, const char *append_string, int which_item) |
| 2562 | static void menu_video_options(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 2067 | 2563 | { |
| 2068 | | input_field_user_settings settings; |
| 2069 | | int value, minval, maxval; |
| 2564 | render_target *target = (parameter != NULL) ? parameter : render_target_get_indexed(0); |
| 2565 | const ui_menu_event *event; |
| 2566 | int changed = FALSE; |
| 2070 | 2567 | |
| 2071 | | input_field_get_user_settings(field, &settings); |
| 2568 | /* if the menu isn't built, populate now */ |
| 2569 | if (!ui_menu_populated(menu)) |
| 2570 | menu_video_options_populate(machine, menu, target); |
| 2072 | 2571 | |
| 2073 | | /* set the item text using the formatting string provided */ |
| 2074 | | item->text = menu_string_pool_add("%s %s", input_field_name(field), append_string); |
| 2075 | | |
| 2076 | | /* set the subitem text */ |
| 2077 | | switch (which_item) |
| 2572 | /* process the menu */ |
| 2573 | event = ui_menu_process(menu, 0); |
| 2574 | if (event != NULL && event->itemref != NULL) |
| 2078 | 2575 | { |
| 2079 | | default: |
| 2080 | | case ANALOG_ITEM_KEYSPEED: |
| 2081 | | value = settings.delta; |
| 2082 | | minval = 0; |
| 2083 | | maxval = 255; |
| 2084 | | item->subtext = menu_string_pool_add("%d", value); |
| 2085 | | break; |
| 2576 | switch ((FPTR)event->itemref) |
| 2577 | { |
| 2578 | /* rotate adds rotation depending on the direction */ |
| 2579 | case VIDEO_ITEM_ROTATE: |
| 2580 | if (event->iptkey == IPT_UI_LEFT || event->iptkey == IPT_UI_RIGHT) |
| 2581 | { |
| 2582 | int delta = (event->iptkey == IPT_UI_LEFT) ? ROT270 : ROT90; |
| 2583 | render_target_set_orientation(target, orientation_add(delta, render_target_get_orientation(target))); |
| 2584 | if (target == render_get_ui_target()) |
| 2585 | { |
| 2586 | render_container_user_settings settings; |
| 2587 | render_container_get_user_settings(render_container_get_ui(), &settings); |
| 2588 | settings.orientation = orientation_add(delta ^ ROT180, settings.orientation); |
| 2589 | render_container_set_user_settings(render_container_get_ui(), &settings); |
| 2590 | } |
| 2591 | changed = TRUE; |
| 2592 | } |
| 2593 | break; |
| 2086 | 2594 | |
| 2087 | | case ANALOG_ITEM_CENTERSPEED: |
| 2088 | | value = settings.centerdelta; |
| 2089 | | minval = 0; |
| 2090 | | maxval = 255; |
| 2091 | | item->subtext = menu_string_pool_add("%d", value); |
| 2092 | | break; |
| 2595 | /* layer config bitmasks handle left/right keys the same (toggle) */ |
| 2596 | case LAYER_CONFIG_ENABLE_BACKDROP: |
| 2597 | case LAYER_CONFIG_ENABLE_OVERLAY: |
| 2598 | case LAYER_CONFIG_ENABLE_BEZEL: |
| 2599 | case LAYER_CONFIG_ZOOM_TO_SCREEN: |
| 2600 | if (event->iptkey == IPT_UI_LEFT || event->iptkey == IPT_UI_RIGHT) |
| 2601 | { |
| 2602 | render_target_set_layer_config(target, render_target_get_layer_config(target) ^ (FPTR)event->itemref); |
| 2603 | changed = TRUE; |
| 2604 | } |
| 2605 | break; |
| 2093 | 2606 | |
| 2094 | | case ANALOG_ITEM_REVERSE: |
| 2095 | | value = settings.reverse; |
| 2096 | | minval = 0; |
| 2097 | | maxval = 1; |
| 2098 | | item->subtext = value ? "On" : "Off"; |
| 2099 | | break; |
| 2100 | | |
| 2101 | | case ANALOG_ITEM_SENSITIVITY: |
| 2102 | | value = settings.sensitivity; |
| 2103 | | minval = 1; |
| 2104 | | maxval = 255; |
| 2105 | | item->subtext = menu_string_pool_add("%d%%", value); |
| 2106 | | break; |
| 2607 | /* anything else is a view item */ |
| 2608 | default: |
| 2609 | if (event->iptkey == IPT_UI_SELECT && (int)(FPTR)event->itemref >= VIDEO_ITEM_VIEW) |
| 2610 | { |
| 2611 | render_target_set_view(target, (FPTR)event->itemref - VIDEO_ITEM_VIEW); |
| 2612 | changed = TRUE; |
| 2613 | } |
| 2614 | break; |
| 2615 | } |
| 2107 | 2616 | } |
| 2108 | 2617 | |
| 2109 | | /* put on arrows */ |
| 2110 | | if (value > minval) |
| 2111 | | item->flags |= MENU_FLAG_LEFT_ARROW; |
| 2112 | | if (value < maxval) |
| 2113 | | item->flags |= MENU_FLAG_RIGHT_ARROW; |
| 2618 | /* if something changed, rebuild the menu */ |
| 2619 | if (changed) |
| 2620 | ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_REF); |
| 2114 | 2621 | } |
| 2115 | 2622 | |
| 2116 | 2623 | |
| 2117 | 2624 | /*------------------------------------------------- |
| 2118 | | dip_switch_build_model - build up the model |
| 2119 | | for DIP switches |
| 2625 | menu_video_options_populate - populate the |
| 2626 | video options menu |
| 2120 | 2627 | -------------------------------------------------*/ |
| 2121 | 2628 | |
| 2122 | | static void dip_switch_build_model(const input_field_config *field, int item_is_selected) |
| 2629 | static void menu_video_options_populate(running_machine *machine, ui_menu *menu, render_target *target) |
| 2123 | 2630 | { |
| 2124 | | input_port_value value_mask_temp = field->mask; |
| 2125 | | const input_field_diplocation *diploc; |
| 2126 | | input_port_value toggle_switch_mask; |
| 2127 | | input_field_user_settings settings; |
| 2128 | | int value_mask_bit = 0; |
| 2129 | | int model_index; |
| 2130 | | int toggle_num; |
| 2631 | int layermask = render_target_get_layer_config(target); |
| 2632 | astring *tempstring = astring_alloc(); |
| 2633 | const char *subtext = ""; |
| 2634 | int viewnum; |
| 2635 | int enabled; |
| 2131 | 2636 | |
| 2132 | | diploc = field->diploclist; |
| 2133 | | if (diploc == NULL || diploc->swname == NULL) |
| 2134 | | return; |
| 2135 | | |
| 2136 | | input_field_get_user_settings(field, &settings); |
| 2137 | | |
| 2138 | | /* get the entry in the model to work with */ |
| 2139 | | for (model_index = 0; model_index < MAX_PHYSICAL_DIPS; model_index++) |
| 2637 | /* add items for each view */ |
| 2638 | for (viewnum = 0; ; viewnum++) |
| 2140 | 2639 | { |
| 2141 | | /* use this entry if it's not used */ |
| 2142 | | if (dip_switch_model[model_index].dip_name == NULL) |
| 2143 | | { |
| 2144 | | dip_switch_model[model_index].dip_name = diploc->swname; |
| 2640 | const char *name = render_target_get_view_name(target, viewnum); |
| 2641 | if (name == NULL) |
| 2145 | 2642 | break; |
| 2146 | | } |
| 2147 | 2643 | |
| 2148 | | /* reuse this entry if the switch name matches */ |
| 2149 | | if (!strcmp(diploc->swname, dip_switch_model[model_index].dip_name)) |
| 2150 | | break; |
| 2151 | | |
| 2152 | | // todo: add a check here to see if we go over the max dips and throw an error. |
| 2644 | /* create a string for the item, replacing underscores with spaces */ |
| 2645 | astring_replacec(astring_cpyc(tempstring, name), 0, "_", " "); |
| 2646 | ui_menu_item_append(menu, astring_c(tempstring), NULL, 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum)); |
| 2153 | 2647 | } |
| 2154 | 2648 | |
| 2155 | | /* Create a mask depicting the number of toggles on the physical switch */ |
| 2156 | | for ( ; diploc != NULL; diploc = diploc->next) |
| 2649 | /* add a separator */ |
| 2650 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); |
| 2651 | |
| 2652 | /* add a rotate item */ |
| 2653 | switch (render_target_get_orientation(target)) |
| 2157 | 2654 | { |
| 2158 | | /* get the Nth DIP toggle number */ |
| 2159 | | toggle_num = diploc->swnum; |
| 2655 | case ROT0: subtext = "None"; break; |
| 2656 | case ROT90: subtext = "CW 90" UTF8_DEGREES; break; |
| 2657 | case ROT180: subtext = "180" UTF8_DEGREES; break; |
| 2658 | case ROT270: subtext = "CCW 90" UTF8_DEGREES; break; |
| 2659 | } |
| 2660 | ui_menu_item_append(menu, "Rotate", subtext, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)VIDEO_ITEM_ROTATE); |
| 2160 | 2661 | |
| 2161 | | /* get the Nth mask bit - |
| 2162 | | * should probably put a check here to avoid bad driver definitions |
| 2163 | | * which could put us into an infinite loop. */ |
| 2164 | | while (!(value_mask_temp & 1)) |
| 2165 | | { |
| 2166 | | value_mask_temp >>= 1; |
| 2167 | | ++value_mask_bit; |
| 2168 | | } |
| 2169 | | /* clear out the lsb to keep it moving next iteration. */ |
| 2170 | | value_mask_temp &= ~1; |
| 2662 | /* backdrop item */ |
| 2663 | enabled = layermask & LAYER_CONFIG_ENABLE_BACKDROP; |
| 2664 | ui_menu_item_append(menu, "Backdrops", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)LAYER_CONFIG_ENABLE_BACKDROP); |
| 2171 | 2665 | |
| 2172 | | toggle_switch_mask = 1 << (toggle_num - 1); |
| 2666 | /* overlay item */ |
| 2667 | enabled = layermask & LAYER_CONFIG_ENABLE_OVERLAY; |
| 2668 | ui_menu_item_append(menu, "Overlays", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)LAYER_CONFIG_ENABLE_OVERLAY); |
| 2173 | 2669 | |
| 2174 | | /* indicate the toggle exists in the switch */ |
| 2175 | | dip_switch_model[model_index].total_dip_mask |= toggle_switch_mask; |
| 2670 | /* bezel item */ |
| 2671 | enabled = layermask & LAYER_CONFIG_ENABLE_BEZEL; |
| 2672 | ui_menu_item_append(menu, "Bezels", enabled ? "Enabled" : "Disabled", enabled ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, (void *)LAYER_CONFIG_ENABLE_BEZEL); |
| 2176 | 2673 | |
| 2177 | | /* if it's inverted, mark it as such */ |
| 2178 | | if (diploc->invert) |
| 2179 | | dip_switch_model[model_index].dip_invert_mask |= toggle_switch_mask; |
| 2674 | /* cropping */ |
| 2675 | enabled = layermask & LAYER_CONFIG_ZOOM_TO_SCREEN; |
| 2676 | ui_menu_item_append(menu, "View", enabled ? "Cropped" : "Full", enabled ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)LAYER_CONFIG_ZOOM_TO_SCREEN); |
| 2180 | 2677 | |
| 2181 | | /* if isolated bit is on, set the toggle on */ |
| 2182 | | if ((1 << value_mask_bit) & settings.value) |
| 2183 | | dip_switch_model[model_index].total_dip_settings |= toggle_switch_mask; |
| 2184 | | |
| 2185 | | /* indicate if the toggle is selected */ |
| 2186 | | if (item_is_selected) |
| 2187 | | dip_switch_model[model_index].selected_dip_feature_mask |= toggle_switch_mask; |
| 2188 | | } |
| 2678 | astring_free(tempstring); |
| 2189 | 2679 | } |
| 2190 | 2680 | |
| 2191 | 2681 | |
| 2192 | 2682 | /*------------------------------------------------- |
| 2193 | | dip_switch_draw_one - draw a single DIP |
| 2194 | | switch |
| 2683 | menu_quit_game - handle the "menu" for |
| 2684 | quitting the game |
| 2195 | 2685 | -------------------------------------------------*/ |
| 2196 | 2686 | |
| 2197 | | static void dip_switch_draw_one(float dip_menu_x1, float dip_menu_y1, float dip_menu_x2, float dip_menu_y2, int model_index) |
| 2687 | static void menu_quit_game(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 2198 | 2688 | { |
| 2199 | | int toggle_index; |
| 2200 | | int num_toggles = 0; |
| 2201 | | float segment_start_x; |
| 2202 | | float dip_field_y; |
| 2203 | | float y1_on, y2_on, y1_off, y2_off; |
| 2204 | | float switch_toggle_gap; |
| 2205 | | float name_width; |
| 2689 | /* request a reset */ |
| 2690 | mame_schedule_exit(machine); |
| 2206 | 2691 | |
| 2207 | | /* determine the number of toggles in the DIP */ |
| 2208 | | for (toggle_index = 0; toggle_index < 16; toggle_index++) |
| 2209 | | if (dip_switch_model[model_index].total_dip_mask & (1 << toggle_index)) |
| 2210 | | num_toggles = toggle_index + 1; |
| 2692 | /* reset the menu stack */ |
| 2693 | ui_menu_stack_reset(machine); |
| 2694 | } |
| 2211 | 2695 | |
| 2212 | | /* calculate the starting x coordinate so that the entire switch is centered */ |
| 2213 | | dip_field_y = dip_menu_y1 + DIP_SWITCH_SPACING + (model_index * (DIP_SWITCH_SPACING + DIP_SWITCH_HEIGHT)); |
| 2214 | 2696 | |
| 2215 | | switch_toggle_gap = ((DIP_SWITCH_HEIGHT/2) - SINGLE_TOGGLE_SWITCH_HEIGHT)/2; |
| 2697 | /*------------------------------------------------- |
| 2698 | menu_select_game - handle the game select |
| 2699 | menu |
| 2700 | -------------------------------------------------*/ |
| 2216 | 2701 | |
| 2217 | | segment_start_x = dip_menu_x1 + (dip_menu_x2 - dip_menu_x1 - num_toggles * SINGLE_TOGGLE_SWITCH_FIELD_WIDTH) / 2; |
| 2702 | static void menu_select_game(running_machine *machine, ui_menu *menu, void *parameter, void *state) |
| 2703 | { |
| 2704 | select_game_state *menustate; |
| 2705 | const ui_menu_event *event; |
| 2706 | int changed = FALSE; |
| 2218 | 2707 | |
| 2219 | | y1_off = dip_field_y + UI_LINE_WIDTH + switch_toggle_gap; |
| 2220 | | y2_off = y1_off + SINGLE_TOGGLE_SWITCH_HEIGHT; |
| 2708 | /* if no state, allocate some */ |
| 2709 | if (state == NULL) |
| 2710 | { |
| 2711 | state = ui_menu_alloc_state(menu, sizeof(*menustate) + sizeof(menustate->driverlist) * driver_list_get_count(drivers)); |
| 2712 | if (parameter != NULL) |
| 2713 | strcpy(((select_game_state *)state)->search, parameter); |
| 2714 | } |
| 2715 | menustate = state; |
| 2221 | 2716 | |
| 2222 | | y1_on = dip_field_y + DIP_SWITCH_HEIGHT/2 + switch_toggle_gap; |
| 2223 | | y2_on = y1_on + SINGLE_TOGGLE_SWITCH_HEIGHT; |
| 2717 | /* if the menu isn't built, populate now */ |
| 2718 | if (!ui_menu_populated(menu)) |
| 2719 | menu_select_game_populate(machine, menu, menustate); |
| 2224 | 2720 | |
| 2225 | | for (toggle_index = 0; toggle_index < num_toggles; toggle_index++) |
| 2721 | /* ignore pause keys by swallowing them before we process the menu */ |
| 2722 | ui_input_pressed(machine, IPT_UI_PAUSE); |
| 2723 | |
| 2724 | /* process the menu */ |
| 2725 | event = ui_menu_process(menu, 0); |
| 2726 | if (event != NULL && event->itemref != NULL) |
| 2226 | 2727 | { |
| 2227 | | int bit_mask, dip_on; |
| 2228 | | float dip_field_x1, x1, x2; |
| 2728 | /* reset the error on any future event */ |
| 2729 | if (menustate->error) |
| 2730 | menustate->error = FALSE; |
| 2229 | 2731 | |
| 2230 | | bit_mask = 1 << toggle_index; |
| 2732 | /* handle selections */ |
| 2733 | else if (event->iptkey == IPT_UI_SELECT) |
| 2734 | { |
| 2735 | const game_driver *driver = (const game_driver *)event->itemref; |
| 2231 | 2736 | |
| 2232 | | /* draw the field for a single toggle on a DIP switch */ |
| 2233 | | dip_field_x1 = segment_start_x + (SINGLE_TOGGLE_SWITCH_FIELD_WIDTH * toggle_index); |
| 2737 | /* special case for configure inputs */ |
| 2738 | if ((FPTR)driver == 1) |
| 2739 | ui_menu_stack_push(ui_menu_alloc(menu->machine, menu_input_groups, NULL)); |
| 2234 | 2740 | |
| 2235 | | ui_draw_outlined_box(dip_field_x1, |
| 2236 | | dip_field_y, |
| 2237 | | dip_field_x1 + SINGLE_TOGGLE_SWITCH_FIELD_WIDTH, |
| 2238 | | dip_field_y + DIP_SWITCH_HEIGHT, |
| 2239 | | UI_FILLCOLOR); |
| 2741 | /* anything else is a driver */ |
| 2742 | else |
| 2743 | { |
| 2744 | audit_record *audit; |
| 2745 | int audit_records; |
| 2746 | int audit_result; |
| 2240 | 2747 | |
| 2241 | | x1 = dip_field_x1 + (SINGLE_TOGGLE_SWITCH_FIELD_WIDTH - SINGLE_TOGGLE_SWITCH_WIDTH) / 2; |
| 2242 | | x2 = x1 + SINGLE_TOGGLE_SWITCH_WIDTH; |
| 2748 | /* audit the game first to see if we're going to work */ |
| 2749 | audit_records = audit_images(mame_options(), driver, AUDIT_VALIDATE_FAST, &audit); |
| 2750 | audit_result = audit_summary(driver, audit_records, audit, FALSE); |
| 2751 | if (audit_records > 0) |
| 2752 | free(audit); |
| 2243 | 2753 | |
| 2244 | | /* see if the switch is actually used */ |
| 2245 | | if (dip_switch_model[model_index].total_dip_mask & bit_mask) |
| 2246 | | { |
| 2247 | | /* yes, draw the switch position for a single toggle switch in a switch field */ |
| 2248 | | int feature_field_selected = ((bit_mask & dip_switch_model[model_index].selected_dip_feature_mask) != 0); |
| 2249 | | dip_on = ((bit_mask & (dip_switch_model[model_index].total_dip_settings ^ dip_switch_model[model_index].dip_invert_mask)) != 0); |
| 2754 | /* if everything looks good, schedule the new driver */ |
| 2755 | if (audit_result == CORRECT || audit_result == BEST_AVAILABLE) |
| 2756 | { |
| 2757 | mame_schedule_new_driver(machine, driver); |
| 2758 | ui_menu_stack_reset(machine); |
| 2759 | } |
| 2250 | 2760 | |
| 2251 | | render_ui_add_rect(x1, dip_on ? y1_on : y1_off, |
| 2252 | | x2, dip_on ? y2_on : y2_off, |
| 2253 | | feature_field_selected ? MENU_SELECTCOLOR : ARGB_WHITE, |
| 2254 | | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); |
| 2761 | /* otherwise, display an error */ |
| 2762 | else |
| 2763 | { |
| 2764 | changed = TRUE; |
| 2765 | menustate->error = TRUE; |
| 2766 | } |
| 2767 | } |
| 2255 | 2768 | } |
| 2256 | | else |
| 2769 | |
| 2770 | /* escape pressed with non-empty text clears the text */ |
| 2771 | else if (event->iptkey == IPT_UI_CANCEL && menustate->search[0] != 0) |
| 2257 | 2772 | { |
| 2258 | | /* no, draw it grayed out */ |
| 2259 | | render_ui_add_rect(x1, y1_off, |
| 2260 | | x2, y2_on, |
| 2261 | | MENU_UNAVAILABLECOLOR, |
| 2262 | | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); |
| 2773 | /* since we have already been popped, we must recreate ourself from scratch */ |
| 2774 | ui_menu_stack_push(ui_menu_alloc(menu->machine, menu_select_game, NULL)); |
| 2263 | 2775 | } |
| 2776 | |
| 2777 | /* typed characters append to the buffer */ |
| 2778 | else if (event->iptkey == IPT_SPECIAL) |
| 2779 | { |
| 2780 | int buflen = strlen(menustate->search); |
| 2781 | |
| 2782 | /* if it's a backspace and we can handle it, do so */ |
| 2783 | if (event->unichar == 8 && buflen > 0) |
| 2784 | { |
| 2785 | *(char *)utf8_previous_char(&menustate->search[buflen]) = 0; |
| 2786 | menustate->rerandomize = TRUE; |
| 2787 | changed = TRUE; |
| 2788 | } |
| 2789 | |
| 2790 | /* if it's any other key and we're not maxed out, update */ |
| 2791 | else if (event->unichar >= ' ') |
| 2792 | { |
| 2793 | buflen += utf8_from_uchar(&menustate->search[buflen], ARRAY_LENGTH(menustate->search) - buflen, event->unichar); |
| 2794 | menustate->search[buflen] = 0; |
| 2795 | changed = TRUE; |
| 2796 | } |
| 2797 | } |
| 2264 | 2798 | } |
| 2265 | 2799 | |
| 2266 | | /* add the dip switch name */ |
| 2267 | | name_width = ui_get_string_width(dip_switch_model[model_index].dip_name) + ui_get_string_width(" ") / 2; |
| 2800 | /* if we're in an error state, overlay an error message */ |
| 2801 | if (menustate->error) |
| 2802 | ui_draw_text_box("The selected game is missing one or more required ROM or CHD images. " |
| 2803 | "Please select a different game.\n\nPress any key to continue.", |
| 2804 | JUSTIFY_CENTER, 0.5f, 0.5f, UI_REDCOLOR); |
| 2268 | 2805 | |
| 2269 | | ui_draw_text_full( dip_switch_model[model_index].dip_name, |
| 2270 | | segment_start_x - name_width, |
| 2271 | | dip_field_y + (DIP_SWITCH_HEIGHT - UI_TARGET_FONT_HEIGHT)/2, |
| 2272 | | name_width, |
| 2273 | | JUSTIFY_LEFT, |
| 2274 | | WRAP_NEVER, |
| 2275 | | DRAW_NORMAL, |
| 2276 | | ARGB_WHITE, |
| 2277 | | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA), |
| 2278 | | NULL , |
| 2279 | | NULL); |
| 2806 | /* if we changed, force a redraw on the next go */ |
| 2807 | if (changed) |
| 2808 | ui_menu_reset(menu, UI_MENU_RESET_REMEMBER_REF); |
| 2280 | 2809 | } |
| 2281 | 2810 | |
| 2282 | 2811 | |
| 2283 | 2812 | /*------------------------------------------------- |
| 2284 | | dip_switch_render - perform our special |
| 2285 | | rendering |
| 2813 | menu_select_game_populate - populate the game |
| 2814 | select menu |
| 2286 | 2815 | -------------------------------------------------*/ |
| 2287 | 2816 | |
| 2288 | | static void dip_switch_render(const menu_extra *extra, float x1, float y1, float x2, float y2) |
| 2817 | static void menu_select_game_populate(running_machine *machine, ui_menu *menu, select_game_state *menustate) |
| 2289 | 2818 | { |
| 2290 | | int num_dips; |
| 2291 | | int dip_model_index; |
| 2292 | | float dip_menu_y1, dip_menu_y2; |
| 2819 | int matchcount; |
| 2820 | int curitem; |
| 2293 | 2821 | |
| 2294 | | /* how many dips does this game have? */ |
| 2295 | | num_dips = get_num_dips(); |
| 2822 | /* update our driver list if necessary */ |
| 2823 | if (menustate->driverlist[0] == NULL) |
| 2824 | menu_select_game_build_driver_list(menu, menustate); |
| 2825 | for (curitem = matchcount = 0; menustate->driverlist[curitem] != NULL && matchcount < VISIBLE_GAMES_IN_LIST; curitem++) |
| 2826 | if (!(menustate->driverlist[curitem]->flags & GAME_NO_STANDALONE)) |
| 2827 | matchcount++; |
| 2296 | 2828 | |
| 2297 | | dip_menu_y1 = y2 + UI_BOX_TB_BORDER; |
| 2298 | | dip_menu_y2 = dip_menu_y1 + extra->bottom; |
| 2829 | /* if nothing there, add a single multiline item and return */ |
| 2830 | if (matchcount == 0) |
| 2831 | { |
| 2832 | ui_menu_item_append(menu, "No games found. Please check the rompath specified in the mame.ini file.\n\n" |
| 2833 | "If this is your first time using MAME, please see the config.txt file in " |
| 2834 | "the docs directory for information on configuring MAME.", NULL, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, NULL); |
| 2835 | return; |
| 2836 | } |
| 2299 | 2837 | |
| 2300 | | /* draw extra menu area */ |
| 2301 | | ui_draw_outlined_box(x1, dip_menu_y1, x2, dip_menu_y2, UI_FILLCOLOR); |
| 2838 | /* otherwise, rebuild the match list */ |
| 2839 | if (menustate->search[0] != 0 || menustate->matchlist[0] == NULL || menustate->rerandomize) |
| 2840 | driver_list_get_approx_matches(menustate->driverlist, menustate->search, matchcount, menustate->matchlist); |
| 2841 | menustate->rerandomize = FALSE; |
| 2302 | 2842 | |
| 2303 | | /* draw all the dip switches */ |
| 2304 | | for (dip_model_index = 0; dip_model_index < num_dips; dip_model_index++) |
| 2305 | | dip_switch_draw_one(x1, dip_menu_y1, x2, dip_menu_y2, dip_model_index); |
| 2843 | /* iterate over entries */ |
| 2844 | for (curitem = 0; curitem < matchcount; curitem++) |
| 2845 | { |
| 2846 | const game_driver *driver = menustate->matchlist[curitem]; |
| 2847 | if (driver != NULL) |
| 2848 | { |
| 2849 | const game_driver *cloneof = driver_get_clone(driver); |
| 2850 | ui_menu_item_append(menu, driver->name, driver->description, (cloneof == NULL || (cloneof->flags & GAME_IS_BIOS_ROOT)) ? 0 : MENU_FLAG_INVERT, (void *)driver); |
| 2851 | } |
| 2852 | } |
| 2853 | |
| 2854 | /* if we're forced into this, allow general input configuration as well */ |
| 2855 | if (ui_menu_is_force_game_select()) |
| 2856 | { |
| 2857 | ui_menu_item_append(menu, MENU_SEPARATOR_ITEM, NULL, 0, NULL); |
| 2858 | ui_menu_item_append(menu, "Configure General Inputs", NULL, 0, (void *)1); |
| 2859 | } |
| 2860 | |
| 2861 | /* configure the custom rendering */ |
| 2862 | ui_menu_set_custom_render(menu, menu_select_game_custom_render, ui_get_line_height() + 3.0f * UI_BOX_TB_BORDER, 4.0f * ui_get_line_height() + 3.0f * UI_BOX_TB_BORDER); |
| 2306 | 2863 | } |
| 2307 | 2864 | |
| 2308 | 2865 | |
| 2309 | 2866 | /*------------------------------------------------- |
| 2310 | | select_game_driver_compare - compare the |
| 2867 | menu_select_game_driver_compare - compare the |
| 2311 | 2868 | names of two drivers |
| 2312 | 2869 | -------------------------------------------------*/ |
| 2313 | 2870 | |
| 2314 | | static int CLIB_DECL select_game_driver_compare(const void *elem1, const void *elem2) |
| 2871 | static int CLIB_DECL menu_select_game_driver_compare(const void *elem1, const void *elem2) |
| 2315 | 2872 | { |
| 2316 | 2873 | const game_driver **driver1_ptr = (const game_driver **)elem1; |
| 2317 | 2874 | const game_driver **driver2_ptr = (const game_driver **)elem2; |
| r2956 | r2957 | |
| 2325 | 2882 | |
| 2326 | 2883 | |
| 2327 | 2884 | /*------------------------------------------------- |
| 2328 | | select_game_build_driver_list - build a list |
| 2329 | | of available drivers |
| 2885 | menu_select_game_build_driver_list - build a |
| 2886 | list of available drivers |
| 2330 | 2887 | -------------------------------------------------*/ |
| 2331 | 2888 | |
| 2332 | | static void select_game_build_driver_list(void) |
| 2889 | static void menu_select_game_build_driver_list(ui_menu *menu, select_game_state *menustate) |
| 2333 | 2890 | { |
| 2334 | 2891 | int driver_count = driver_list_get_count(drivers); |
| 2335 | 2892 | int drivnum, listnum; |
| 2336 | 2893 | mame_path *path; |
| 2337 | 2894 | UINT8 *found; |
| 2338 | 2895 | |
| 2339 | | /* first allocate a copy of the full driver list */ |
| 2340 | | if (select_game_driver_list == NULL) |
| 2341 | | select_game_driver_list = malloc_or_die(driver_count * sizeof(*select_game_driver_list)); |
| 2342 | | memcpy((void *)select_game_driver_list, drivers, driver_count * sizeof(*select_game_driver_list)); |
| 2896 | /* create a sorted copy of the main driver list */ |
| 2897 | memcpy((void *)menustate->driverlist, drivers, driver_count * sizeof(menustate->driverlist[0])); |
| 2898 | qsort((void *)menustate->driverlist, driver_count, sizeof(menustate->driverlist[0]), menu_select_game_driver_compare); |
| 2343 | 2899 | |
| 2344 | | /* sort it */ |
| 2345 | | qsort((void *)select_game_driver_list, driver_count, sizeof(*select_game_driver_list), select_game_driver_compare); |
| 2346 | | |
| 2347 | 2900 | /* allocate a temporary array to track which ones we found */ |
| 2348 | | found = malloc_or_die((driver_count + 1) * sizeof(*found)); |
| 2349 | | memset(found, 0, (driver_count + 1) * sizeof(*found)); |
| 2901 | found = ui_menu_pool_alloc(menu, (driver_count + 7) / 8); |
| 2902 | memset(found, 0, (driver_count + 7) / 8); |
| 2350 | 2903 | |
| 2351 | 2904 | /* open a path to the ROMs and find them in the array */ |
| 2352 | 2905 | path = mame_openpath(mame_options(), OPTION_ROMPATH); |
| r2956 | r2957 | |
| 2372 | 2925 | /* find it in the array */ |
| 2373 | 2926 | tempdriver.name = drivername; |
| 2374 | 2927 | tempdriver_ptr = &tempdriver; |
| 2375 | | found_driver = bsearch(&tempdriver_ptr, select_game_driver_list, driver_count, sizeof(*select_game_driver_list), select_game_driver_compare); |
| 2928 | found_driver = bsearch(&tempdriver_ptr, menustate->driverlist, driver_count, sizeof(*menustate->driverlist), menu_select_game_driver_compare); |
| 2376 | 2929 | |
| 2377 | 2930 | /* if found, mark the corresponding entry in the array */ |
| 2378 | 2931 | if (found_driver != NULL) |
| 2379 | | found[found_driver - select_game_driver_list] = TRUE; |
| 2932 | { |
| 2933 | int index = found_driver - menustate->driverlist; |
| 2934 | found[index / 8] |= 1 << (index % 8); |
| 2935 | } |
| 2380 | 2936 | } |
| 2381 | 2937 | mame_closepath(path); |
| 2382 | 2938 | } |
| 2383 | 2939 | |
| 2384 | 2940 | /* now build the final list */ |
| 2385 | 2941 | for (drivnum = listnum = 0; drivnum < driver_count; drivnum++) |
| 2386 | | if (found[drivnum]) |
| 2387 | | select_game_driver_list[listnum++] = select_game_driver_list[drivnum]; |
| 2942 | if (found[drivnum / 8] & (1 << (drivnum % 8))) |
| 2943 | menustate->driverlist[listnum++] = menustate->driverlist[drivnum]; |
| 2388 | 2944 | |
| 2389 | 2945 | /* NULL-terminate */ |
| 2390 | | select_game_driver_list[listnum] = NULL; |
| 2391 | | free(found); |
| 2946 | menustate->driverlist[listnum] = NULL; |
| 2392 | 2947 | } |
| 2393 | 2948 | |
| 2394 | 2949 | |
| 2395 | 2950 | /*------------------------------------------------- |
| 2396 | | select_game_render - perform our special |
| 2397 | | rendering |
| 2951 | menu_select_game_custom_render - perform our |
| 2952 | special rendering |
| 2398 | 2953 | -------------------------------------------------*/ |
| 2399 | 2954 | |
| 2400 | | static void select_game_render(const menu_extra *extra, float origx1, float origy1, float origx2, float origy2) |
| 2955 | static void menu_select_game_custom_render(running_machine *machine, ui_menu *menu, void *state, void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) |
| 2401 | 2956 | { |
| 2957 | select_game_state *menustate = state; |
| 2402 | 2958 | const game_driver *driver; |
| 2403 | 2959 | float width, maxwidth; |
| 2404 | 2960 | float x1, y1, x2, y2; |
| r2956 | r2957 | |
| 2407 | 2963 | int line; |
| 2408 | 2964 | |
| 2409 | 2965 | /* display the current typeahead */ |
| 2410 | | if (select_game_buffer[0] != 0) |
| 2411 | | sprintf(&tempbuf[0][0], "Type name or select: %s_", select_game_buffer); |
| 2966 | if (menustate->search[0] != 0) |
| 2967 | sprintf(&tempbuf[0][0], "Type name or select: %s_", menustate->search); |
| 2412 | 2968 | else |
| 2413 | 2969 | sprintf(&tempbuf[0][0], "Type name or select: (random)"); |
| 2414 | 2970 | |
| r2956 | r2957 | |
| 2421 | 2977 | /* compute our bounds */ |
| 2422 | 2978 | x1 = 0.5f - 0.5f * maxwidth; |
| 2423 | 2979 | x2 = x1 + maxwidth; |
| 2424 | | y1 = origy1 - extra->top; |
| 2980 | y1 = origy1 - top; |
| 2425 | 2981 | y2 = origy1 - UI_BOX_TB_BORDER; |
| 2426 | 2982 | |
| 2427 | 2983 | /* draw a box */ |
| r2956 | r2957 | |
| 2438 | 2994 | DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, NULL, NULL); |
| 2439 | 2995 | |
| 2440 | 2996 | /* determine the text to render below */ |
| 2441 | | driver = extra->param; |
| 2442 | | if (driver != NULL) |
| 2997 | driver = ((FPTR)selectedref > 1) ? selectedref : NULL; |
| 2998 | if ((FPTR)driver > 1) |
| 2443 | 2999 | { |
| 2444 | 3000 | const char *gfxstat, *soundstat; |
| 2445 | 3001 | |
| r2956 | r2957 | |
| 2474 | 3030 | } |
| 2475 | 3031 | else |
| 2476 | 3032 | { |
| 3033 | const char *s = COPYRIGHT; |
| 2477 | 3034 | int line = 0; |
| 2478 | 3035 | int col = 0; |
| 2479 | | const char *s = COPYRIGHT; |
| 2480 | 3036 | |
| 2481 | 3037 | /* first line is version string */ |
| 2482 | 3038 | sprintf(&tempbuf[line++][0], "%s %s", APPLONGNAME, build_version); |
| 2483 | 3039 | |
| 2484 | 3040 | /* output message */ |
| 2485 | | while(line < ARRAY_LENGTH(tempbuf)) |
| 3041 | while (line < ARRAY_LENGTH(tempbuf)) |
| 2486 | 3042 | { |
| 2487 | | if ((*s == '\0') || (*s == '\n')) |
| 3043 | if (*s == 0 || *s == '\n') |
| 2488 | 3044 | { |
| 2489 | | tempbuf[line++][col] = '\0'; |
| 3045 | tempbuf[line++][col] = 0; |
| 2490 | 3046 | col = 0; |
| 2491 | 3047 | } |
| 2492 | 3048 | else |
| 2493 | | { |
| 2494 | 3049 | tempbuf[line][col++] = *s; |
| 2495 | | } |
| 2496 | 3050 | |
| 2497 | | if (*s != '\0') |
| 3051 | if (*s != 0) |
| 2498 | 3052 | s++; |
| 2499 | 3053 | } |
| 2500 | 3054 | } |
| r2956 | r2957 | |
| 2513 | 3067 | x1 = 0.5f - 0.5f * maxwidth; |
| 2514 | 3068 | x2 = x1 + maxwidth; |
| 2515 | 3069 | y1 = origy2 + UI_BOX_TB_BORDER; |
| 2516 | | y2 = origy2 + extra->bottom; |
| 3070 | y2 = origy2 + bottom; |
| 2517 | 3071 | |
| 2518 | 3072 | /* draw a box */ |
| 2519 | 3073 | color = UI_FILLCOLOR; |
| r2956 | r2957 | |
| 2537 | 3091 | } |
| 2538 | 3092 | |
| 2539 | 3093 | |
| 3094 | |
| 3095 | /*************************************************************************** |
| 3096 | MENU HELPERS |
| 3097 | ***************************************************************************/ |
| 3098 | |
| 2540 | 3099 | /*------------------------------------------------- |
| 2541 | | select_game_handle_key - handle a keypress |
| 3100 | menu_render_triangle - render a triangle that |
| 3101 | is used for up/down arrows and left/right |
| 3102 | indicators |
| 2542 | 3103 | -------------------------------------------------*/ |
| 2543 | 3104 | |
| 2544 | | static int select_game_handle_key(input_code keycode, char value) |
| 3105 | static void menu_render_triangle(bitmap_t *dest, const bitmap_t *source, const rectangle *sbounds, void *param) |
| 2545 | 3106 | { |
| 2546 | | /* is this key pressed? */ |
| 2547 | | if (input_code_pressed_once(keycode)) |
| 3107 | int halfwidth = dest->width / 2; |
| 3108 | int height = dest->height; |
| 3109 | int x, y; |
| 3110 | |
| 3111 | /* start with all-transparent */ |
| 3112 | bitmap_fill(dest, NULL, MAKE_ARGB(0x00,0x00,0x00,0x00)); |
| 3113 | |
| 3114 | /* render from the tip to the bottom */ |
| 3115 | for (y = 0; y < height; y++) |
| 2548 | 3116 | { |
| 2549 | | int buflen = strlen(select_game_buffer); |
| 3117 | int linewidth = (y * (halfwidth - 1) + (height / 2)) * 255 * 2 / height; |
| 3118 | UINT32 *target = BITMAP_ADDR32(dest, y, halfwidth); |
| 2550 | 3119 | |
| 2551 | | /* if it's a backspace and we can handle it, do so */ |
| 2552 | | if (value == 8) |
| 3120 | /* don't antialias if height < 12 */ |
| 3121 | if (dest->height < 12) |
| 2553 | 3122 | { |
| 2554 | | if (buflen > 0) |
| 3123 | int pixels = (linewidth + 254) / 255; |
| 3124 | if (pixels % 2 == 0) pixels++; |
| 3125 | linewidth = pixels * 255; |
| 3126 | } |
| 3127 | |
| 3128 | /* loop while we still have data to generate */ |
| 3129 | for (x = 0; linewidth > 0; x++) |
| 3130 | { |
| 3131 | int dalpha; |
| 3132 | |
| 3133 | /* first colum we only consume one pixel */ |
| 3134 | if (x == 0) |
| 2555 | 3135 | { |
| 2556 | | select_game_buffer[buflen - 1] = 0; |
| 2557 | | return TRUE; |
| 3136 | dalpha = MIN(0xff, linewidth); |
| 3137 | target[x] = MAKE_ARGB(dalpha,0xff,0xff,0xff); |
| 2558 | 3138 | } |
| 2559 | | } |
| 2560 | 3139 | |
| 2561 | | /* if it's any other key and we're not maxed out, update */ |
| 2562 | | else if (buflen < ARRAY_LENGTH(select_game_buffer) - 1) |
| 2563 | | { |
| 2564 | | select_game_buffer[buflen] = value; |
| 2565 | | select_game_buffer[buflen + 1] = 0; |
| 2566 | | return TRUE; |
| 3140 | /* remaining columns consume two pixels, one on each side */ |
| 3141 | else |
| 3142 | { |
| 3143 | dalpha = MIN(0x1fe, linewidth); |
| 3144 | target[x] = target[-x] = MAKE_ARGB(dalpha/2,0xff,0xff,0xff); |
| 3145 | } |
| 3146 | |
| 3147 | /* account for the weight we consumed */ |
| 3148 | linewidth -= dalpha; |
| 2567 | 3149 | } |
| 2568 | 3150 | } |
| 2569 | | return FALSE; |
| 2570 | 3151 | } |
| 3152 | |
| 3153 | |
| 3154 | |
| 3155 | /*************************************************************************** |
| 3156 | ACCESSORS |
| 3157 | ***************************************************************************/ |
| 3158 | |
src/emu/ui.c
| r2956 | r2957 | |
| 17 | 17 | #include "render.h" |
| 18 | 18 | #include "rendfont.h" |
| 19 | 19 | #include "ui.h" |
| 20 | #include "uiinput.h" |
| 20 | 21 | #include "uimenu.h" |
| 21 | 22 | #include "uigfx.h" |
| 22 | 23 | |
| r2956 | r2957 | |
| 103 | 104 | static osd_ticks_t popup_text_end; |
| 104 | 105 | |
| 105 | 106 | /* messagebox buffer */ |
| 106 | | static char messagebox_text[4096]; |
| 107 | static astring *messagebox_text; |
| 107 | 108 | static rgb_t messagebox_backcolor; |
| 108 | 109 | |
| 109 | 110 | /* slider info */ |
| r2956 | r2957 | |
| 124 | 125 | static int rescale_notifier(running_machine *machine, int width, int height); |
| 125 | 126 | |
| 126 | 127 | /* text generators */ |
| 127 | | static int sprintf_disclaimer(running_machine *machine, char *buffer); |
| 128 | | static int sprintf_warnings(running_machine *machine, char *buffer); |
| 128 | static astring *disclaimer_string(running_machine *machine, astring *buffer); |
| 129 | static astring *warnings_string(running_machine *machine, astring *buffer); |
| 129 | 130 | |
| 130 | 131 | /* UI handlers */ |
| 131 | 132 | static UINT32 handler_messagebox(running_machine *machine, UINT32 state); |
| r2956 | r2957 | |
| 247 | 248 | /* make sure we clean up after ourselves */ |
| 248 | 249 | add_exit_callback(machine, ui_exit); |
| 249 | 250 | |
| 250 | | /* allocate the font */ |
| 251 | /* allocate the font and messagebox string */ |
| 251 | 252 | ui_font = render_font_alloc("ui.bdf"); |
| 253 | messagebox_text = astring_alloc(); |
| 252 | 254 | |
| 253 | 255 | /* initialize the other UI bits */ |
| 254 | 256 | ui_menu_init(machine); |
| r2956 | r2957 | |
| 276 | 278 | if (ui_font != NULL) |
| 277 | 279 | render_font_free(ui_font); |
| 278 | 280 | ui_font = NULL; |
| 281 | |
| 282 | /* free the messagebox string */ |
| 283 | if (messagebox_text != NULL) |
| 284 | astring_free(messagebox_text); |
| 285 | messagebox_text = NULL; |
| 279 | 286 | } |
| 280 | 287 | |
| 281 | 288 | |
| r2956 | r2957 | |
| 341 | 348 | switch (state) |
| 342 | 349 | { |
| 343 | 350 | case 0: |
| 344 | | if (show_disclaimer && sprintf_disclaimer(machine, messagebox_text)) |
| 351 | if (show_disclaimer && astring_len(disclaimer_string(machine, messagebox_text)) > 0) |
| 345 | 352 | ui_set_handler(handler_messagebox_ok, 0); |
| 346 | 353 | break; |
| 347 | 354 | |
| 348 | 355 | case 1: |
| 349 | | if (show_warnings && sprintf_warnings(machine, messagebox_text)) |
| 356 | if (show_warnings && astring_len(warnings_string(machine, messagebox_text)) > 0) |
| 350 | 357 | { |
| 351 | 358 | ui_set_handler(handler_messagebox_ok, 0); |
| 352 | 359 | if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)) |
| r2956 | r2957 | |
| 355 | 362 | break; |
| 356 | 363 | |
| 357 | 364 | case 2: |
| 358 | | if (show_gameinfo && sprintf_game_info(machine, messagebox_text)) |
| 365 | if (show_gameinfo && astring_len(game_info_astring(machine, messagebox_text)) > 0) |
| 359 | 366 | ui_set_handler(handler_messagebox_anykey, 0); |
| 360 | 367 | break; |
| 361 | 368 | #ifdef MESS |
| r2956 | r2957 | |
| 396 | 403 | osd_ticks_t curtime = osd_ticks(); |
| 397 | 404 | |
| 398 | 405 | /* copy in the new text */ |
| 399 | | strncpy(messagebox_text, text, sizeof(messagebox_text)); |
| 406 | astring_cpyc(messagebox_text, text); |
| 400 | 407 | messagebox_backcolor = UI_FILLCOLOR; |
| 401 | 408 | |
| 402 | 409 | /* don't update more than 4 times/second */ |
| r2956 | r2957 | |
| 571 | 578 | and full size computation |
| 572 | 579 | -------------------------------------------------*/ |
| 573 | 580 | |
| 574 | | void ui_draw_text_full(const char *origs, float x, float y, float wrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth, float *totalheight) |
| 581 | void ui_draw_text_full(const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth, float *totalheight) |
| 575 | 582 | { |
| 576 | 583 | float lineheight = ui_get_line_height(); |
| 577 | 584 | const char *ends = origs + strlen(origs); |
| 585 | float wrapwidth = origwrapwidth; |
| 578 | 586 | const char *s = origs; |
| 579 | 587 | const char *linestart; |
| 580 | 588 | float cury = y; |
| r2956 | r2957 | |
| 697 | 705 | |
| 698 | 706 | /* align according to the justfication */ |
| 699 | 707 | if (line_justify == JUSTIFY_CENTER) |
| 700 | | curx += (wrapwidth - curwidth) * 0.5f; |
| 708 | curx += (origwrapwidth - curwidth) * 0.5f; |
| 701 | 709 | else if (line_justify == JUSTIFY_RIGHT) |
| 702 | | curx += wrapwidth - curwidth; |
| 710 | curx += origwrapwidth - curwidth; |
| 703 | 711 | |
| 704 | 712 | /* track the maximum width of any given line */ |
| 705 | 713 | if (curwidth > maxwidth) |
| r2956 | r2957 | |
| 820 | 828 | |
| 821 | 829 | /* extract the text */ |
| 822 | 830 | va_start(arg,text); |
| 823 | | vsprintf(messagebox_text, text, arg); |
| 831 | astring_vprintf(messagebox_text, text, arg); |
| 824 | 832 | messagebox_backcolor = UI_FILLCOLOR; |
| 825 | 833 | va_end(arg); |
| 826 | 834 | |
| r2956 | r2957 | |
| 935 | 943 | ***************************************************************************/ |
| 936 | 944 | |
| 937 | 945 | /*------------------------------------------------- |
| 938 | | sprintf_disclaimer - print the disclaimer |
| 946 | disclaimer_string - print the disclaimer |
| 939 | 947 | text to the given buffer |
| 940 | 948 | -------------------------------------------------*/ |
| 941 | 949 | |
| 942 | | static int sprintf_disclaimer(running_machine *machine, char *buffer) |
| 950 | static astring *disclaimer_string(running_machine *machine, astring *string) |
| 943 | 951 | { |
| 944 | | char *bufptr = buffer; |
| 945 | | bufptr += sprintf(bufptr, "Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); |
| 946 | | bufptr += sprintf(bufptr, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine->gamedrv->description); |
| 947 | | bufptr += sprintf(bufptr, "Otherwise, type OK or move the joystick left then right to continue"); |
| 948 | | return bufptr - buffer; |
| 952 | astring_cpyc(string, "Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); |
| 953 | astring_catprintf(string, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine->gamedrv->description); |
| 954 | astring_catc(string, "Otherwise, type OK or move the joystick left then right to continue"); |
| 955 | return string; |
| 949 | 956 | } |
| 950 | 957 | |
| 951 | 958 | |
| 952 | 959 | /*------------------------------------------------- |
| 953 | | sprintf_warnings - print the warning flags |
| 960 | warnings_string - print the warning flags |
| 954 | 961 | text to the given buffer |
| 955 | 962 | -------------------------------------------------*/ |
| 956 | 963 | |
| 957 | | static int sprintf_warnings(running_machine *machine, char *buffer) |
| 964 | static astring *warnings_string(running_machine *machine, astring *string) |
| 958 | 965 | { |
| 959 | 966 | #define WARNING_FLAGS ( GAME_NOT_WORKING | \ |
| 960 | 967 | GAME_UNEMULATED_PROTECTION | \ |
| r2956 | r2957 | |
| 964 | 971 | GAME_IMPERFECT_SOUND | \ |
| 965 | 972 | GAME_IMPERFECT_GRAPHICS | \ |
| 966 | 973 | GAME_NO_COCKTAIL) |
| 967 | | char *bufptr = buffer; |
| 968 | 974 | int i; |
| 969 | 975 | |
| 976 | astring_reset(string); |
| 977 | |
| 970 | 978 | /* if no warnings, nothing to return */ |
| 971 | 979 | if (rom_load_warnings() == 0 && !(machine->gamedrv->flags & WARNING_FLAGS)) |
| 972 | | return 0; |
| 980 | return string; |
| 973 | 981 | |
| 974 | 982 | /* add a warning if any ROMs were loaded with warnings */ |
| 975 | 983 | if (rom_load_warnings() > 0) |
| 976 | 984 | { |
| 977 | | bufptr += sprintf(bufptr, "One or more ROMs/CHDs for this game are incorrect. The " GAMENOUN " may not run correctly.\n"); |
| 985 | astring_catc(string, "One or more ROMs/CHDs for this game are incorrect. The " GAMENOUN " may not run correctly.\n"); |
| 978 | 986 | if (machine->gamedrv->flags & WARNING_FLAGS) |
| 979 | | *bufptr++ = '\n'; |
| 987 | astring_catc(string, "\n"); |
| 980 | 988 | } |
| 981 | 989 | |
| 982 | 990 | /* if we have at least one warning flag, print the general header */ |
| 983 | 991 | if (machine->gamedrv->flags & WARNING_FLAGS) |
| 984 | 992 | { |
| 985 | | bufptr += sprintf(bufptr, "There are known problems with this " GAMENOUN "\n\n"); |
| 993 | astring_catc(string, "There are known problems with this " GAMENOUN "\n\n"); |
| 986 | 994 | |
| 987 | 995 | /* add one line per warning flag */ |
| 988 | 996 | #ifdef MESS |
| 989 | 997 | if (machine->gamedrv->flags & GAME_COMPUTER) |
| 990 | | bufptr += sprintf(bufptr, "%s\n\n%s\n", "The emulated system is a computer: ", "The keyboard emulation may not be 100% accurate."); |
| 998 | astring_catc(string, "The emulated system is a computer:\n\nThe keyboard emulation may not be 100% accurate.\n"); |
| 991 | 999 | #endif |
| 992 | 1000 | if (machine->gamedrv->flags & GAME_IMPERFECT_COLORS) |
| 993 | | bufptr += sprintf(bufptr, "The colors aren't 100%% accurate.\n"); |
| 1001 | astring_catc(string, "The colors aren't 100% accurate.\n"); |
| 994 | 1002 | if (machine->gamedrv->flags & GAME_WRONG_COLORS) |
| 995 | | bufptr += sprintf(bufptr, "The colors are completely wrong.\n"); |
| 1003 | astring_catc(string, "The colors are completely wrong.\n"); |
| 996 | 1004 | if (machine->gamedrv->flags & GAME_IMPERFECT_GRAPHICS) |
| 997 | | bufptr += sprintf(bufptr, "The video emulation isn't 100%% accurate.\n"); |
| 1005 | astring_catc(string, "The video emulation isn't 100% accurate.\n"); |
| 998 | 1006 | if (machine->gamedrv->flags & GAME_IMPERFECT_SOUND) |
| 999 | | bufptr += sprintf(bufptr, "The sound emulation isn't 100%% accurate.\n"); |
| 1007 | astring_catc(string, "The sound emulation isn't 100% accurate.\n"); |
| 1000 | 1008 | if (machine->gamedrv->flags & GAME_NO_SOUND) |
| 1001 | | bufptr += sprintf(bufptr, "The game lacks sound.\n"); |
| 1009 | astring_catc(string, "The game lacks sound.\n"); |
| 1002 | 1010 | if (machine->gamedrv->flags & GAME_NO_COCKTAIL) |
| 1003 | | bufptr += sprintf(bufptr, "Screen flipping in cocktail mode is not supported.\n"); |
| 1011 | astring_catc(string, "Screen flipping in cocktail mode is not supported.\n"); |
| 1004 | 1012 | |
| 1005 | 1013 | /* if there's a NOT WORKING or UNEMULATED PROTECTION warning, make it stronger */ |
| 1006 | 1014 | if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)) |
| r2956 | r2957 | |
| 1011 | 1019 | |
| 1012 | 1020 | /* add the strings for these warnings */ |
| 1013 | 1021 | if (machine->gamedrv->flags & GAME_NOT_WORKING) |
| 1014 | | bufptr += sprintf(bufptr, "THIS " CAPGAMENOUN " DOESN'T WORK. You won't be able to make it work correctly. Don't bother.\n"); |
| 1022 | astring_catc(string, "THIS " CAPGAMENOUN " DOESN'T WORK. You won't be able to make it work correctly. Don't bother.\n"); |
| 1015 | 1023 | if (machine->gamedrv->flags & GAME_UNEMULATED_PROTECTION) |
| 1016 | | bufptr += sprintf(bufptr, "The game has protection which isn't fully emulated.\n"); |
| 1024 | astring_catc(string, "The game has protection which isn't fully emulated.\n"); |
| 1017 | 1025 | |
| 1018 | 1026 | /* find the parent of this driver */ |
| 1019 | 1027 | clone_of = driver_get_clone(machine->gamedrv); |
| r2956 | r2957 | |
| 1030 | 1038 | { |
| 1031 | 1039 | /* this one works, add a header and display the name of the clone */ |
| 1032 | 1040 | if (foundworking == 0) |
| 1033 | | bufptr += sprintf(bufptr, "\n\nThere are working clones of this game. They are:\n\n"); |
| 1034 | | bufptr += sprintf(bufptr, "%s\n", drivers[i]->name); |
| 1041 | astring_catc(string, "\n\nThere are working clones of this game. They are:\n\n"); |
| 1042 | astring_catc(string, drivers[i]->name); |
| 1043 | astring_catc(string, "\n"); |
| 1035 | 1044 | foundworking = 1; |
| 1036 | 1045 | } |
| 1037 | 1046 | } |
| 1038 | 1047 | } |
| 1039 | 1048 | |
| 1040 | 1049 | /* add the 'press OK' string */ |
| 1041 | | bufptr += sprintf(bufptr, "\n\nType OK or move the joystick left then right to continue"); |
| 1042 | | return bufptr - buffer; |
| 1050 | astring_catc(string, "\n\nType OK or move the joystick left then right to continue"); |
| 1051 | return string; |
| 1043 | 1052 | } |
| 1044 | 1053 | |
| 1045 | 1054 | |
| 1046 | 1055 | /*------------------------------------------------- |
| 1047 | | sprintf_game_info - print the game info text |
| 1048 | | to the given buffer |
| 1056 | game_info_astring - populate an allocated |
| 1057 | string with the game info text |
| 1049 | 1058 | -------------------------------------------------*/ |
| 1050 | 1059 | |
| 1051 | | int sprintf_game_info(running_machine *machine, char *buffer) |
| 1060 | astring *game_info_astring(running_machine *machine, astring *string) |
| 1052 | 1061 | { |
| 1053 | 1062 | int scrcount = video_screen_count(machine->config); |
| 1054 | | char *bufptr = buffer; |
| 1055 | 1063 | int cpunum, sndnum; |
| 1056 | 1064 | int count; |
| 1057 | 1065 | |
| 1058 | 1066 | /* print description, manufacturer, and CPU: */ |
| 1059 | | bufptr += sprintf(bufptr, "%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer); |
| 1067 | astring_printf(string, "%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer); |
| 1060 | 1068 | |
| 1061 | 1069 | /* loop over all CPUs */ |
| 1062 | 1070 | for (cpunum = 0; cpunum < MAX_CPU && machine->config->cpu[cpunum].type != CPU_DUMMY; cpunum += count) |
| r2956 | r2957 | |
| 1072 | 1080 | |
| 1073 | 1081 | /* if more than one, prepend a #x in front of the CPU name */ |
| 1074 | 1082 | if (count > 1) |
| 1075 | | bufptr += sprintf(bufptr, "%d" UTF8_MULTIPLY, count); |
| 1076 | | bufptr += sprintf(bufptr, "%s", cputype_name(type)); |
| 1083 | astring_catprintf(string, "%d" UTF8_MULTIPLY, count); |
| 1084 | astring_catc(string, cputype_name(type)); |
| 1077 | 1085 | |
| 1078 | 1086 | /* display clock in kHz or MHz */ |
| 1079 | 1087 | if (clock >= 1000000) |
| 1080 | | bufptr += sprintf(bufptr, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); |
| 1088 | astring_catprintf(string, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); |
| 1081 | 1089 | else |
| 1082 | | bufptr += sprintf(bufptr, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); |
| 1090 | astring_catprintf(string, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); |
| 1083 | 1091 | } |
| 1084 | 1092 | |
| 1085 | 1093 | /* loop over all sound chips */ |
| r2956 | r2957 | |
| 1090 | 1098 | |
| 1091 | 1099 | /* append the Sound: string */ |
| 1092 | 1100 | if (sndnum == 0) |
| 1093 | | bufptr += sprintf(bufptr, "\nSound:\n"); |
| 1101 | astring_catc(string, "\nSound:\n"); |
| 1094 | 1102 | |
| 1095 | 1103 | /* count how many identical sound chips we have */ |
| 1096 | 1104 | for (count = 1; sndnum + count < MAX_SOUND; count++) |
| r2956 | r2957 | |
| 1100 | 1108 | |
| 1101 | 1109 | /* if more than one, prepend a #x in front of the CPU name */ |
| 1102 | 1110 | if (count > 1) |
| 1103 | | bufptr += sprintf(bufptr, "%d" UTF8_MULTIPLY, count); |
| 1104 | | bufptr += sprintf(bufptr, "%s", sndnum_name(sndnum)); |
| 1111 | astring_catprintf(string, "%d" UTF8_MULTIPLY, count); |
| 1112 | astring_catc(string, sndnum_name(sndnum)); |
| 1105 | 1113 | |
| 1106 | 1114 | /* display clock in kHz or MHz */ |
| 1107 | 1115 | if (clock >= 1000000) |
| 1108 | | bufptr += sprintf(bufptr, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); |
| 1116 | astring_catprintf(string, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); |
| 1109 | 1117 | else if (clock != 0) |
| 1110 | | bufptr += sprintf(bufptr, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); |
| 1118 | astring_catprintf(string, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); |
| 1111 | 1119 | else |
| 1112 | | *bufptr++ = '\n'; |
| 1120 | astring_catc(string, "\n"); |
| 1113 | 1121 | } |
| 1114 | 1122 | |
| 1115 | 1123 | /* display screen information */ |
| 1116 | | bufptr += sprintf(bufptr, "\nVideo:\n"); |
| 1124 | astring_catc(string, "\nVideo:\n"); |
| 1117 | 1125 | if (scrcount == 0) |
| 1118 | | buffer += sprintf(bufptr, "None\n"); |
| 1126 | astring_catc(string, "None\n"); |
| 1119 | 1127 | else |
| 1120 | 1128 | { |
| 1121 | 1129 | const device_config *screen; |
| r2956 | r2957 | |
| 1125 | 1133 | const screen_config *scrconfig = screen->inline_config; |
| 1126 | 1134 | |
| 1127 | 1135 | if (scrcount > 1) |
| 1128 | | bufptr += sprintf(bufptr, "%s: ", slider_get_screen_desc(screen)); |
| 1136 | astring_catc(string, slider_get_screen_desc(screen)); |
| 1129 | 1137 | |
| 1130 | 1138 | if (scrconfig->type == SCREEN_TYPE_VECTOR) |
| 1131 | | bufptr += sprintf(bufptr, "Vector\n"); |
| 1139 | astring_catc(string, "Vector\n"); |
| 1132 | 1140 | else |
| 1133 | 1141 | { |
| 1134 | 1142 | const rectangle *visarea = video_screen_get_visible_area(screen); |
| 1135 | 1143 | |
| 1136 | | bufptr += sprintf(bufptr, "%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", |
| 1144 | astring_catprintf(string, "%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", |
| 1137 | 1145 | visarea->max_x - visarea->min_x + 1, |
| 1138 | 1146 | visarea->max_y - visarea->min_y + 1, |
| 1139 | 1147 | (machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H", |
| r2956 | r2957 | |
| 1142 | 1150 | } |
| 1143 | 1151 | } |
| 1144 | 1152 | |
| 1145 | | return bufptr - buffer; |
| 1153 | return string; |
| 1146 | 1154 | } |
| 1147 | 1155 | |
| 1148 | 1156 | |
| r2956 | r2957 | |
| 1158 | 1166 | |
| 1159 | 1167 | static UINT32 handler_messagebox(running_machine *machine, UINT32 state) |
| 1160 | 1168 | { |
| 1161 | | ui_draw_text_box(messagebox_text, JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); |
| 1169 | ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); |
| 1162 | 1170 | return 0; |
| 1163 | 1171 | } |
| 1164 | 1172 | |
| r2956 | r2957 | |
| 1171 | 1179 | static UINT32 handler_messagebox_ok(running_machine *machine, UINT32 state) |
| 1172 | 1180 | { |
| 1173 | 1181 | /* draw a standard message window */ |
| 1174 | | ui_draw_text_box(messagebox_text, JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); |
| 1182 | ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); |
| 1175 | 1183 | |
| 1176 | 1184 | /* an 'O' or left joystick kicks us to the next state */ |
| 1177 | | if (state == 0 && (input_code_pressed_once(KEYCODE_O) || input_ui_pressed(machine, IPT_UI_LEFT))) |
| 1185 | if (state == 0 && (input_code_pressed_once(KEYCODE_O) || ui_input_pressed(machine, IPT_UI_LEFT))) |
| 1178 | 1186 | state++; |
| 1179 | 1187 | |
| 1180 | 1188 | /* a 'K' or right joystick exits the state */ |
| 1181 | | else if (state == 1 && (input_code_pressed_once(KEYCODE_K) || input_ui_pressed(machine, IPT_UI_RIGHT))) |
| 1189 | else if (state == 1 && (input_code_pressed_once(KEYCODE_K) || ui_input_pressed(machine, IPT_UI_RIGHT))) |
| 1182 | 1190 | state = UI_HANDLER_CANCEL; |
| 1183 | 1191 | |
| 1184 | 1192 | /* if the user cancels, exit out completely */ |
| 1185 | | else if (input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1193 | else if (ui_input_pressed(machine, IPT_UI_CANCEL)) |
| 1186 | 1194 | { |
| 1187 | 1195 | mame_schedule_exit(machine); |
| 1188 | 1196 | state = UI_HANDLER_CANCEL; |
| r2956 | r2957 | |
| 1201 | 1209 | static UINT32 handler_messagebox_anykey(running_machine *machine, UINT32 state) |
| 1202 | 1210 | { |
| 1203 | 1211 | /* draw a standard message window */ |
| 1204 | | ui_draw_text_box(messagebox_text, JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); |
| 1212 | ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor); |
| 1205 | 1213 | |
| 1206 | 1214 | /* if the user cancels, exit out completely */ |
| 1207 | | if (input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1215 | if (ui_input_pressed(machine, IPT_UI_CANCEL)) |
| 1208 | 1216 | { |
| 1209 | 1217 | mame_schedule_exit(machine); |
| 1210 | 1218 | state = UI_HANDLER_CANCEL; |
| r2956 | r2957 | |
| 1241 | 1249 | ui_draw_text_full(profiler_get_text(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL); |
| 1242 | 1250 | |
| 1243 | 1251 | /* let the cheat engine display its stuff */ |
| 1244 | | if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 1245 | | cheat_display_watches(machine); |
| 1252 | // if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 1253 | // cheat_display_watches(machine); |
| 1246 | 1254 | |
| 1247 | 1255 | /* display any popup messages */ |
| 1248 | 1256 | if (osd_ticks() < popup_text_end) |
| 1249 | | ui_draw_text_box(messagebox_text, JUSTIFY_CENTER, 0.5f, 0.9f, messagebox_backcolor); |
| 1257 | ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_CENTER, 0.5f, 0.9f, messagebox_backcolor); |
| 1250 | 1258 | else |
| 1251 | 1259 | popup_text_end = 0; |
| 1252 | 1260 | |
| r2956 | r2957 | |
| 1263 | 1271 | #endif /* MESS */ |
| 1264 | 1272 | |
| 1265 | 1273 | /* if the user pressed ESC, stop the emulation */ |
| 1266 | | if (input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1274 | if (ui_input_pressed(machine, IPT_UI_CANCEL)) |
| 1267 | 1275 | mame_schedule_exit(machine); |
| 1268 | 1276 | |
| 1269 | 1277 | /* turn on menus if requested */ |
| 1270 | | if (input_ui_pressed(machine, IPT_UI_CONFIGURE)) |
| 1278 | if (ui_input_pressed(machine, IPT_UI_CONFIGURE)) |
| 1271 | 1279 | return ui_set_handler(ui_menu_ui_handler, 0); |
| 1272 | 1280 | |
| 1273 | 1281 | /* if the on-screen display isn't up and the user has toggled it, turn it on */ |
| 1274 | | if ((machine->debug_flags & DEBUG_FLAG_ENABLED) == 0 && input_ui_pressed(machine, IPT_UI_ON_SCREEN_DISPLAY)) |
| 1282 | if ((machine->debug_flags & DEBUG_FLAG_ENABLED) == 0 && ui_input_pressed(machine, IPT_UI_ON_SCREEN_DISPLAY)) |
| 1275 | 1283 | return ui_set_handler(handler_slider, 0); |
| 1276 | 1284 | |
| 1277 | 1285 | /* handle a reset request */ |
| 1278 | | if (input_ui_pressed(machine, IPT_UI_RESET_MACHINE)) |
| 1286 | if (ui_input_pressed(machine, IPT_UI_RESET_MACHINE)) |
| 1279 | 1287 | mame_schedule_hard_reset(machine); |
| 1280 | | if (input_ui_pressed(machine, IPT_UI_SOFT_RESET)) |
| 1288 | if (ui_input_pressed(machine, IPT_UI_SOFT_RESET)) |
| 1281 | 1289 | mame_schedule_soft_reset(machine); |
| 1282 | 1290 | |
| 1283 | 1291 | /* handle a request to display graphics/palette */ |
| 1284 | | if (input_ui_pressed(machine, IPT_UI_SHOW_GFX)) |
| 1292 | if (ui_input_pressed(machine, IPT_UI_SHOW_GFX)) |
| 1285 | 1293 | { |
| 1286 | 1294 | if (!is_paused) |
| 1287 | 1295 | mame_pause(machine, TRUE); |
| r2956 | r2957 | |
| 1289 | 1297 | } |
| 1290 | 1298 | |
| 1291 | 1299 | /* handle a save state request */ |
| 1292 | | if (input_ui_pressed(machine, IPT_UI_SAVE_STATE)) |
| 1300 | if (ui_input_pressed(machine, IPT_UI_SAVE_STATE)) |
| 1293 | 1301 | { |
| 1294 | 1302 | mame_pause(machine, TRUE); |
| 1295 | 1303 | return ui_set_handler(handler_load_save, LOADSAVE_SAVE); |
| 1296 | 1304 | } |
| 1297 | 1305 | |
| 1298 | 1306 | /* handle a load state request */ |
| 1299 | | if (input_ui_pressed(machine, IPT_UI_LOAD_STATE)) |
| 1307 | if (ui_input_pressed(machine, IPT_UI_LOAD_STATE)) |
| 1300 | 1308 | { |
| 1301 | 1309 | mame_pause(machine, TRUE); |
| 1302 | 1310 | return ui_set_handler(handler_load_save, LOADSAVE_LOAD); |
| 1303 | 1311 | } |
| 1304 | 1312 | |
| 1305 | 1313 | /* handle a save snapshot request */ |
| 1306 | | if (input_ui_pressed(machine, IPT_UI_SNAPSHOT)) |
| 1314 | if (ui_input_pressed(machine, IPT_UI_SNAPSHOT)) |
| 1307 | 1315 | video_save_active_screen_snapshots(machine); |
| 1308 | 1316 | |
| 1309 | 1317 | /* toggle pause */ |
| 1310 | | if (input_ui_pressed(machine, IPT_UI_PAUSE)) |
| 1318 | if (ui_input_pressed(machine, IPT_UI_PAUSE)) |
| 1311 | 1319 | { |
| 1312 | 1320 | /* with a shift key, it is single step */ |
| 1313 | 1321 | if (is_paused && (input_code_pressed(KEYCODE_LSHIFT) || input_code_pressed(KEYCODE_RSHIFT))) |
| r2956 | r2957 | |
| 1320 | 1328 | } |
| 1321 | 1329 | |
| 1322 | 1330 | /* toggle movie recording */ |
| 1323 | | if (input_ui_pressed(machine, IPT_UI_RECORD_MOVIE)) |
| 1331 | if (ui_input_pressed(machine, IPT_UI_RECORD_MOVIE)) |
| 1324 | 1332 | { |
| 1325 | 1333 | if (!video_mng_is_movie_active(machine)) |
| 1326 | 1334 | { |
| r2956 | r2957 | |
| 1335 | 1343 | } |
| 1336 | 1344 | |
| 1337 | 1345 | /* toggle profiler display */ |
| 1338 | | if (input_ui_pressed(machine, IPT_UI_SHOW_PROFILER)) |
| 1346 | if (ui_input_pressed(machine, IPT_UI_SHOW_PROFILER)) |
| 1339 | 1347 | ui_set_show_profiler(!ui_get_show_profiler()); |
| 1340 | 1348 | |
| 1341 | 1349 | /* toggle FPS display */ |
| 1342 | | if (input_ui_pressed(machine, IPT_UI_SHOW_FPS)) |
| 1350 | if (ui_input_pressed(machine, IPT_UI_SHOW_FPS)) |
| 1343 | 1351 | ui_set_show_fps(!ui_get_show_fps()); |
| 1344 | 1352 | |
| 1345 | 1353 | /* toggle crosshair display */ |
| 1346 | | if (input_ui_pressed(machine, IPT_UI_TOGGLE_CROSSHAIR)) |
| 1354 | if (ui_input_pressed(machine, IPT_UI_TOGGLE_CROSSHAIR)) |
| 1347 | 1355 | crosshair_toggle(machine); |
| 1348 | 1356 | |
| 1349 | 1357 | /* increment frameskip? */ |
| 1350 | | if (input_ui_pressed(machine, IPT_UI_FRAMESKIP_INC)) |
| 1358 | if (ui_input_pressed(machine, IPT_UI_FRAMESKIP_INC)) |
| 1351 | 1359 | { |
| 1352 | 1360 | /* get the current value and increment it */ |
| 1353 | 1361 | int newframeskip = video_get_frameskip() + 1; |
| r2956 | r2957 | |
| 1360 | 1368 | } |
| 1361 | 1369 | |
| 1362 | 1370 | /* decrement frameskip? */ |
| 1363 | | if (input_ui_pressed(machine, IPT_UI_FRAMESKIP_DEC)) |
| 1371 | if (ui_input_pressed(machine, IPT_UI_FRAMESKIP_DEC)) |
| 1364 | 1372 | { |
| 1365 | 1373 | /* get the current value and decrement it */ |
| 1366 | 1374 | int newframeskip = video_get_frameskip() - 1; |
| r2956 | r2957 | |
| 1373 | 1381 | } |
| 1374 | 1382 | |
| 1375 | 1383 | /* toggle throttle? */ |
| 1376 | | if (input_ui_pressed(machine, IPT_UI_THROTTLE)) |
| 1384 | if (ui_input_pressed(machine, IPT_UI_THROTTLE)) |
| 1377 | 1385 | video_set_throttle(!video_get_throttle()); |
| 1378 | 1386 | |
| 1379 | 1387 | /* check for fast forward */ |
| r2956 | r2957 | |
| 1387 | 1395 | |
| 1388 | 1396 | #ifdef MESS |
| 1389 | 1397 | /* paste? */ |
| 1390 | | if (input_ui_pressed(machine, IPT_UI_PASTE)) |
| 1398 | if (ui_input_pressed(machine, IPT_UI_PASTE)) |
| 1391 | 1399 | ui_paste(machine); |
| 1392 | 1400 | #endif /* MESS */ |
| 1393 | 1401 | |
| r2956 | r2957 | |
| 1407 | 1415 | char textbuf[256]; |
| 1408 | 1416 | |
| 1409 | 1417 | /* left/right control the increment */ |
| 1410 | | if (input_ui_pressed_repeat(machine, IPT_UI_LEFT,6)) |
| 1418 | if (ui_input_pressed_repeat(machine, IPT_UI_LEFT,6)) |
| 1411 | 1419 | increment = -cur->incval; |
| 1412 | | if (input_ui_pressed_repeat(machine, IPT_UI_RIGHT,6)) |
| 1420 | if (ui_input_pressed_repeat(machine, IPT_UI_RIGHT,6)) |
| 1413 | 1421 | increment = cur->incval; |
| 1414 | 1422 | |
| 1415 | 1423 | /* alt goes to 1, shift goes 10x smaller, control goes 10x larger */ |
| r2956 | r2957 | |
| 1427 | 1435 | newval = (*cur->update)(machine, 0, NULL, cur->arg) + increment; |
| 1428 | 1436 | |
| 1429 | 1437 | /* select resets to the default value */ |
| 1430 | | if (input_ui_pressed(machine, IPT_UI_SELECT)) |
| 1438 | if (ui_input_pressed(machine, IPT_UI_SELECT)) |
| 1431 | 1439 | newval = cur->defval; |
| 1432 | 1440 | |
| 1433 | 1441 | /* clamp within bounds */ |
| r2956 | r2957 | |
| 1443 | 1451 | slider_display(textbuf, cur->minval, cur->maxval, cur->defval, newval); |
| 1444 | 1452 | |
| 1445 | 1453 | /* up/down select which slider to control */ |
| 1446 | | if (input_ui_pressed_repeat(machine, IPT_UI_DOWN,6)) |
| 1454 | if (ui_input_pressed_repeat(machine, IPT_UI_DOWN,6)) |
| 1447 | 1455 | slider_current = (slider_current + 1) % slider_count; |
| 1448 | | if (input_ui_pressed_repeat(machine, IPT_UI_UP,6)) |
| 1456 | if (ui_input_pressed_repeat(machine, IPT_UI_UP,6)) |
| 1449 | 1457 | slider_current = (slider_current + slider_count - 1) % slider_count; |
| 1450 | 1458 | |
| 1451 | 1459 | /* the slider toggle or ESC will cancel out of our display */ |
| 1452 | | if (input_ui_pressed(machine, IPT_UI_ON_SCREEN_DISPLAY) || input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1460 | if (ui_input_pressed(machine, IPT_UI_ON_SCREEN_DISPLAY) || ui_input_pressed(machine, IPT_UI_CANCEL)) |
| 1453 | 1461 | return UI_HANDLER_CANCEL; |
| 1454 | 1462 | |
| 1455 | 1463 | /* the menu key will take us directly to the menu */ |
| 1456 | | if (input_ui_pressed(machine, IPT_UI_CONFIGURE)) |
| 1464 | if (ui_input_pressed(machine, IPT_UI_CONFIGURE)) |
| 1457 | 1465 | return ui_set_handler(ui_menu_ui_handler, 0); |
| 1458 | 1466 | |
| 1459 | 1467 | return 0; |
| r2956 | r2957 | |
| 1482 | 1490 | ui_draw_message_window("Select position to load from"); |
| 1483 | 1491 | |
| 1484 | 1492 | /* check for cancel key */ |
| 1485 | | if (input_ui_pressed(machine, IPT_UI_CANCEL)) |
| 1493 | if (ui_input_pressed(machine, IPT_UI_CANCEL)) |
| 1486 | 1494 | { |
| 1487 | 1495 | /* display a popup indicating things were cancelled */ |
| 1488 | 1496 | if (state == LOADSAVE_SAVE) |
| r2956 | r2957 | |
| 1804 | 1812 | { |
| 1805 | 1813 | const device_config *screen = arg; |
| 1806 | 1814 | render_container *container = render_container_get_screen(screen); |
| 1815 | render_container_user_settings settings; |
| 1816 | |
| 1817 | render_container_get_user_settings(container, &settings); |
| 1807 | 1818 | if (buffer != NULL) |
| 1808 | 1819 | { |
| 1809 | | render_container_set_brightness(container, (float)newval * 0.001f); |
| 1810 | | sprintf(buffer, "%s Brightness %.3f", slider_get_screen_desc(screen), render_container_get_brightness(container)); |
| 1820 | settings.brightness = (float)newval * 0.001f; |
| 1821 | render_container_set_user_settings(container, &settings); |
| 1822 | sprintf(buffer, "%s Brightness %.3f", slider_get_screen_desc(screen), settings.brightness); |
| 1811 | 1823 | } |
| 1812 | | return floor(render_container_get_brightness(container) * 1000.0f + 0.5f); |
| 1824 | return floor(settings.brightness * 1000.0f + 0.5f); |
| 1813 | 1825 | } |
| 1814 | 1826 | |
| 1815 | 1827 | |
| r2956 | r2957 | |
| 1822 | 1834 | { |
| 1823 | 1835 | const device_config *screen = arg; |
| 1824 | 1836 | render_container *container = render_container_get_screen(screen); |
| 1837 | render_container_user_settings settings; |
| 1838 | |
| 1839 | render_container_get_user_settings(container, &settings); |
| 1825 | 1840 | if (buffer != NULL) |
| 1826 | 1841 | { |
| 1827 | | render_container_set_contrast(container, (float)newval * 0.001f); |
| 1828 | | sprintf(buffer, "%s Contrast %.3f", slider_get_screen_desc(screen), render_container_get_contrast(container)); |
| 1842 | settings.contrast = (float)newval * 0.001f; |
| 1843 | render_container_set_user_settings(container, &settings); |
| 1844 | sprintf(buffer, "%s Contrast %.3f", slider_get_screen_desc(screen), settings.contrast); |
| 1829 | 1845 | } |
| 1830 | | return floor(render_container_get_contrast(container) * 1000.0f + 0.5f); |
| 1846 | return floor(settings.contrast * 1000.0f + 0.5f); |
| 1831 | 1847 | } |
| 1832 | 1848 | |
| 1833 | 1849 | |
| r2956 | r2957 | |
| 1839 | 1855 | { |
| 1840 | 1856 | const device_config *screen = arg; |
| 1841 | 1857 | render_container *container = render_container_get_screen(screen); |
| 1858 | render_container_user_settings settings; |
| 1859 | |
| 1860 | render_container_get_user_settings(container, &settings); |
| 1842 | 1861 | if (buffer != NULL) |
| 1843 | 1862 | { |
| 1844 | | render_container_set_gamma(container, (float)newval * 0.001f); |
| 1845 | | sprintf(buffer, "%s Gamma %.3f", slider_get_screen_desc(screen), render_container_get_gamma(container)); |
| 1863 | settings.gamma = (float)newval * 0.001f; |
| 1864 | render_container_set_user_settings(container, &settings); |
| 1865 | sprintf(buffer, "%s Gamma %.3f", slider_get_screen_desc(screen), settings.gamma); |
| 1846 | 1866 | } |
| 1847 | | return floor(render_container_get_gamma(container) * 1000.0f + 0.5f); |
| 1867 | return floor(settings.gamma * 1000.0f + 0.5f); |
| 1848 | 1868 | } |
| 1849 | 1869 | |
| 1850 | 1870 | |
| r2956 | r2957 | |
| 1857 | 1877 | { |
| 1858 | 1878 | const device_config *screen = arg; |
| 1859 | 1879 | render_container *container = render_container_get_screen(screen); |
| 1880 | render_container_user_settings settings; |
| 1881 | |
| 1882 | render_container_get_user_settings(container, &settings); |
| 1860 | 1883 | if (buffer != NULL) |
| 1861 | 1884 | { |
| 1862 | | render_container_set_xscale(container, (float)newval * 0.001f); |
| 1863 | | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Horiz Stretch", render_container_get_xscale(container)); |
| 1885 | settings.xscale = (float)newval * 0.001f; |
| 1886 | render_container_set_user_settings(container, &settings); |
| 1887 | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Horiz Stretch", settings.xscale); |
| 1864 | 1888 | } |
| 1865 | | return floor(render_container_get_xscale(container) * 1000.0f + 0.5f); |
| 1889 | return floor(settings.xscale * 1000.0f + 0.5f); |
| 1866 | 1890 | } |
| 1867 | 1891 | |
| 1868 | 1892 | |
| r2956 | r2957 | |
| 1875 | 1899 | { |
| 1876 | 1900 | const device_config *screen = arg; |
| 1877 | 1901 | render_container *container = render_container_get_screen(screen); |
| 1902 | render_container_user_settings settings; |
| 1903 | |
| 1904 | render_container_get_user_settings(container, &settings); |
| 1878 | 1905 | if (buffer != NULL) |
| 1879 | 1906 | { |
| 1880 | | render_container_set_yscale(container, (float)newval * 0.001f); |
| 1881 | | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Vert Stretch", render_container_get_yscale(container)); |
| 1907 | settings.yscale = (float)newval * 0.001f; |
| 1908 | render_container_set_user_settings(container, &settings); |
| 1909 | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Vert Stretch", settings.yscale); |
| 1882 | 1910 | } |
| 1883 | | return floor(render_container_get_yscale(container) * 1000.0f + 0.5f); |
| 1911 | return floor(settings.yscale * 1000.0f + 0.5f); |
| 1884 | 1912 | } |
| 1885 | 1913 | |
| 1886 | 1914 | |
| r2956 | r2957 | |
| 1893 | 1921 | { |
| 1894 | 1922 | const device_config *screen = arg; |
| 1895 | 1923 | render_container *container = render_container_get_screen(screen); |
| 1924 | render_container_user_settings settings; |
| 1925 | |
| 1926 | render_container_get_user_settings(container, &settings); |
| 1896 | 1927 | if (buffer != NULL) |
| 1897 | 1928 | { |
| 1898 | | render_container_set_xoffset(container, (float)newval * 0.001f); |
| 1899 | | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Horiz Position", render_container_get_xoffset(container)); |
| 1929 | settings.xoffset = (float)newval * 0.001f; |
| 1930 | render_container_set_user_settings(container, &settings); |
| 1931 | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Horiz Position", settings.xoffset); |
| 1900 | 1932 | } |
| 1901 | | return floor(render_container_get_xoffset(container) * 1000.0f + 0.5f); |
| 1933 | return floor(settings.xoffset * 1000.0f + 0.5f); |
| 1902 | 1934 | } |
| 1903 | 1935 | |
| 1904 | 1936 | |
| r2956 | r2957 | |
| 1911 | 1943 | { |
| 1912 | 1944 | const device_config *screen = arg; |
| 1913 | 1945 | render_container *container = render_container_get_screen(screen); |
| 1946 | render_container_user_settings settings; |
| 1947 | |
| 1948 | render_container_get_user_settings(container, &settings); |
| 1914 | 1949 | if (buffer != NULL) |
| 1915 | 1950 | { |
| 1916 | | render_container_set_yoffset(container, (float)newval * 0.001f); |
| 1917 | | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Vert Position", render_container_get_yoffset(container)); |
| 1951 | settings.yoffset = (float)newval * 0.001f; |
| 1952 | render_container_set_user_settings(container, &settings); |
| 1953 | sprintf(buffer, "%s %s %.3f", slider_get_screen_desc(screen), "Vert Position", settings.yoffset); |
| 1918 | 1954 | } |
| 1919 | | return floor(render_container_get_yoffset(container) * 1000.0f + 0.5f); |
| 1955 | return floor(settings.yoffset * 1000.0f + 0.5f); |
| 1920 | 1956 | } |
| 1921 | 1957 | |
| 1922 | 1958 | |