~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/drivers/cchance.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
        UINT8 m_hop_io;
48
48
        UINT8 m_bell_io;
 
49
        DECLARE_WRITE8_MEMBER(output_0_w);
 
50
        DECLARE_READ8_MEMBER(input_1_r);
 
51
        DECLARE_WRITE8_MEMBER(output_1_w);
49
52
};
50
53
 
51
54
 
52
 
static WRITE8_HANDLER( output_0_w )
 
55
WRITE8_MEMBER(cchance_state::output_0_w)
53
56
{
54
57
 
55
58
        //---- --x- divider?
56
 
        coin_lockout_w(space->machine(), 0, ~data & 1);
57
 
 
58
 
//  coin_counter_w(space->machine(), 0, ~data & 1);
59
 
}
60
 
 
61
 
 
62
 
static READ8_HANDLER( input_1_r )
63
 
{
64
 
        cchance_state *state = space->machine().driver_data<cchance_state>();
65
 
        return (state->m_hop_io) | (state->m_bell_io) | (input_port_read(space->machine(), "SP") & 0xff);
66
 
}
67
 
 
68
 
static WRITE8_HANDLER( output_1_w )
69
 
{
70
 
        cchance_state *state = space->machine().driver_data<cchance_state>();
71
 
 
72
 
        state->m_hop_io = (data & 0x40)>>4;
73
 
        state->m_bell_io = (data & 0x80)>>4;
74
 
}
75
 
 
76
 
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
 
59
        coin_lockout_w(machine(), 0, ~data & 1);
 
60
 
 
61
//  coin_counter_w(machine(), 0, ~data & 1);
 
62
}
 
63
 
 
64
 
 
65
READ8_MEMBER(cchance_state::input_1_r)
 
66
{
 
67
 
 
68
        return (m_hop_io) | (m_bell_io) | (ioport("SP")->read() & 0xff);
 
69
}
 
70
 
 
71
WRITE8_MEMBER(cchance_state::output_1_w)
 
72
{
 
73
 
 
74
 
 
75
        m_hop_io = (data & 0x40)>>4;
 
76
        m_bell_io = (data & 0x80)>>4;
 
77
}
 
78
 
 
79
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, cchance_state )
77
80
        AM_RANGE(0x0000, 0x7fff) AM_ROM
78
81
 
79
 
        AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodelow_r8, spritecodelow_w8)
80
 
        AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", spritecodehigh_r8, spritecodehigh_w8)
 
82
        AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodelow_r8, spritecodelow_w8)
 
83
        AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritecodehigh_r8, spritecodehigh_w8)
81
84
 
82
85
        AM_RANGE(0xc000, 0xdfff) AM_RAM
83
86
 
84
 
        AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", spriteylow_r8, spriteylow_w8)
85
 
        AM_RANGE(0xe300, 0xe303) AM_RAM AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", spritectrl_w8)  /* control registers (0x80 mirror used by Arkanoid 2) */
86
 
        AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", spritebgflag_w8)      /* enable / disable background transparency */
 
87
        AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r8, spriteylow_w8)
 
88
        AM_RANGE(0xe300, 0xe303) AM_RAM AM_MIRROR(0xfc) AM_DEVWRITE_LEGACY("spritegen", spritectrl_w8)  /* control registers (0x80 mirror used by Arkanoid 2) */
 
89
        AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("spritegen", spritebgflag_w8)       /* enable / disable background transparency */
87
90
 
88
91
        AM_RANGE(0xf000, 0xf000) AM_READNOP AM_WRITENOP //???
89
92
        AM_RANGE(0xf001, 0xf001) AM_READ(input_1_r) AM_WRITE(output_0_w)
90
93
        AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN0") AM_WRITE(output_1_w)
91
 
        AM_RANGE(0xf800, 0xf801) AM_DEVWRITE("aysnd", ay8910_address_data_w)
92
 
        AM_RANGE(0xf801, 0xf801) AM_DEVREAD("aysnd", ay8910_r)
 
94
        AM_RANGE(0xf800, 0xf801) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w)
 
95
        AM_RANGE(0xf801, 0xf801) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
93
96
ADDRESS_MAP_END
94
97
 
95
98