trunk/src/mame/drivers/goldstar.c
| r244898 | r244899 | |
| 358 | 358 | AM_RANGE(0x25, 0x25) AM_READ_PORT("DSW2") |
| 359 | 359 | AM_RANGE(0x26, 0x26) AM_READ_PORT("DSW3") |
| 360 | 360 | |
| 361 | | AM_RANGE(0xe0, 0xe0) AM_WRITENOP // writting 0's and 1's constantly. seems watchdog feeder. |
| 361 | AM_RANGE(0xf0, 0xf0) AM_WRITENOP // Writing 0's and 1's constantly. Watchdog feeder? |
| 362 | 362 | AM_RANGE(0xe1, 0xe1) AM_WRITE(enable_w) // enable/disable reels register. |
| 363 | 363 | |
| 364 | 364 | ADDRESS_MAP_END |
| r244898 | r244899 | |
| 681 | 681 | |
| 682 | 682 | |
| 683 | 683 | |
| 684 | | static ADDRESS_MAP_START( cm_portmap, AS_IO, 8, cmaster_state ) |
| 685 | | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 686 | | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) |
| 687 | | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) |
| 688 | | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Inputs */ |
| 689 | | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 690 | | AM_RANGE(0x10, 0x10) AM_WRITE(outport0_w) /* output port */ |
| 691 | | AM_RANGE(0x11, 0x11) AM_WRITENOP |
| 692 | | AM_RANGE(0x12, 0x12) AM_WRITE(goldstar_lamps_w) /* output port */ |
| 693 | | AM_RANGE(0x13, 0x13) AM_WRITE(background_col_w) |
| 694 | | AM_RANGE(0x14, 0x14) AM_WRITE(girl_scroll_w) |
| 695 | | ADDRESS_MAP_END |
| 696 | | |
| 697 | | |
| 698 | | WRITE8_MEMBER(goldstar_state::pkrmast_coincount_w) |
| 684 | WRITE8_MEMBER(goldstar_state::cm_coincount_w) |
| 699 | 685 | { |
| 700 | 686 | /* bits |
| 701 | 687 | 7654 3210 |
| r244898 | r244899 | |
| 704 | 690 | ---x ---- Coin C counter |
| 705 | 691 | --x- ---- Key In counter |
| 706 | 692 | -x-- ---- Coin A counter |
| 707 | | x--- -xx- Unused in Crazy Bonus |
| 693 | x--- -xx- unknown |
| 694 | |
| 695 | interestingly there is no counter for coin B in the cm/cmaster games |
| 708 | 696 | */ |
| 709 | 697 | |
| 710 | 698 | coin_counter_w(machine(), 0, data & 0x40); /* Counter 1 Coin A */ |
| r244898 | r244899 | |
| 717 | 705 | popmessage("counters: %02X", data); |
| 718 | 706 | } |
| 719 | 707 | |
| 708 | static ADDRESS_MAP_START( cm_portmap, AS_IO, 8, cmaster_state ) |
| 709 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 710 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) |
| 711 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) |
| 712 | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Inputs */ |
| 713 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 714 | AM_RANGE(0x10, 0x10) AM_WRITE(outport0_w) |
| 715 | AM_RANGE(0x11, 0x11) AM_WRITE(cm_coincount_w) |
| 716 | AM_RANGE(0x12, 0x12) AM_WRITE(goldstar_lamps_w) |
| 717 | AM_RANGE(0x13, 0x13) AM_WRITE(background_col_w) |
| 718 | AM_RANGE(0x14, 0x14) AM_WRITE(girl_scroll_w) |
| 719 | ADDRESS_MAP_END |
| 720 | |
| 721 | |
| 720 | 722 | static ADDRESS_MAP_START( pkrmast_portmap, AS_IO, 8, goldstar_state ) |
| 721 | 723 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 722 | 724 | |
| r244898 | r244899 | |
| 732 | 734 | AM_RANGE(0x21, 0x21) AM_READ_PORT("DSW3-1") |
| 733 | 735 | AM_RANGE(0x22, 0x22) AM_WRITE(goldstar_lamps_w) |
| 734 | 736 | |
| 735 | | AM_RANGE(0x24, 0x24) AM_WRITE(pkrmast_coincount_w) |
| 737 | AM_RANGE(0x24, 0x24) AM_WRITE(cm_coincount_w) |
| 736 | 738 | AM_RANGE(0x25, 0x25) AM_READ_PORT("DSW1") |
| 737 | 739 | AM_RANGE(0x26, 0x26) AM_READ_PORT("DSW2") |
| 740 | |
| 741 | AM_RANGE(0xf0, 0xf0) AM_WRITENOP /* Writing 0's and 1's constantly. Watchdog feeder? */ |
| 738 | 742 | ADDRESS_MAP_END |
| 739 | 743 | |
| 740 | 744 | |
| r244898 | r244899 | |
| 753 | 757 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) |
| 754 | 758 | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 755 | 759 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 756 | | AM_RANGE(0x10, 0x10) AM_WRITE(outport0_w) /* output port */ |
| 757 | | AM_RANGE(0x11, 0x11) AM_WRITENOP |
| 758 | | AM_RANGE(0x12, 0x12) AM_WRITE(goldstar_lamps_w) /* output port */ |
| 760 | AM_RANGE(0x10, 0x10) AM_WRITE(outport0_w) |
| 761 | AM_RANGE(0x11, 0x11) AM_WRITE(cm_coincount_w) |
| 762 | AM_RANGE(0x12, 0x12) AM_WRITE(goldstar_lamps_w) |
| 759 | 763 | AM_RANGE(0x13, 0x13) AM_WRITE(background_col_w) |
| 760 | 764 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 761 | 765 | ADDRESS_MAP_END |
| r244898 | r244899 | |
| 766 | 770 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) |
| 767 | 771 | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 768 | 772 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 769 | | AM_RANGE(0x10, 0x10) AM_WRITE(outport0_w) /* output port */ |
| 770 | | AM_RANGE(0x11, 0x11) AM_WRITENOP |
| 771 | | AM_RANGE(0x12, 0x12) AM_WRITE(goldstar_lamps_w) /* output port */ |
| 773 | AM_RANGE(0x10, 0x10) AM_WRITE(outport0_w) |
| 774 | AM_RANGE(0x11, 0x11) AM_WRITE(cm_coincount_w) |
| 775 | AM_RANGE(0x12, 0x12) AM_WRITE(goldstar_lamps_w) |
| 772 | 776 | AM_RANGE(0x13, 0x13) AM_WRITE(background_col_w) |
| 773 | 777 | ADDRESS_MAP_END |
| 774 | 778 | |