Previous 199869 Revisions Next

r36387 Thursday 12th March, 2015 at 10:27:16 UTC by Vasantha Crabb
Hook up more coin counters
[src/mame/drivers]goldstar.c
[src/mame/includes]goldstar.h

trunk/src/mame/drivers/goldstar.c
r244898r244899
358358   AM_RANGE(0x25, 0x25) AM_READ_PORT("DSW2")
359359   AM_RANGE(0x26, 0x26) AM_READ_PORT("DSW3")
360360
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?
362362   AM_RANGE(0xe1, 0xe1) AM_WRITE(enable_w)         // enable/disable reels register.
363363
364364ADDRESS_MAP_END
r244898r244899
681681
682682
683683
684static 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)
695ADDRESS_MAP_END
696
697
698WRITE8_MEMBER(goldstar_state::pkrmast_coincount_w)
684WRITE8_MEMBER(goldstar_state::cm_coincount_w)
699685{
700686/*  bits
701687  7654 3210
r244898r244899
704690  ---x ----  Coin C counter
705691  --x- ----  Key In counter
706692  -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
708696*/
709697
710698   coin_counter_w(machine(), 0, data & 0x40);  /* Counter 1 Coin A */
r244898r244899
717705      popmessage("counters: %02X", data);
718706}
719707
708static 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)
719ADDRESS_MAP_END
720
721
720722static ADDRESS_MAP_START( pkrmast_portmap, AS_IO, 8, goldstar_state )
721723   ADDRESS_MAP_GLOBAL_MASK(0xff)
722724
r244898r244899
732734   AM_RANGE(0x21, 0x21) AM_READ_PORT("DSW3-1")
733735   AM_RANGE(0x22, 0x22) AM_WRITE(goldstar_lamps_w)
734736
735   AM_RANGE(0x24, 0x24) AM_WRITE(pkrmast_coincount_w)
737   AM_RANGE(0x24, 0x24) AM_WRITE(cm_coincount_w)
736738   AM_RANGE(0x25, 0x25) AM_READ_PORT("DSW1")
737739   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? */
738742ADDRESS_MAP_END
739743
740744
r244898r244899
753757   AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
754758   AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)    /* Input Ports */
755759   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)
759763   AM_RANGE(0x13, 0x13) AM_WRITE(background_col_w)
760764   AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("oki", okim6295_device, read, write)
761765ADDRESS_MAP_END
r244898r244899
766770   AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
767771   AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)    /* Input Ports */
768772   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)
772776   AM_RANGE(0x13, 0x13) AM_WRITE(background_col_w)
773777ADDRESS_MAP_END
774778
trunk/src/mame/includes/goldstar.h
r244898r244899
2525   DECLARE_WRITE8_MEMBER(ncb3_port81_w);
2626   DECLARE_WRITE8_MEMBER(goldstar_lamps_w);
2727   DECLARE_WRITE8_MEMBER(cb3_lamps_w);
28   DECLARE_WRITE8_MEMBER(pkrmast_coincount_w);
28   DECLARE_WRITE8_MEMBER(cm_coincount_w);
2929   DECLARE_WRITE8_MEMBER(ladylinr_outport_w);
3030   DECLARE_WRITE8_MEMBER(goldstar_fg_vidram_w);
3131   DECLARE_WRITE8_MEMBER(goldstar_fg_atrram_w);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team