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

« back to all changes in this revision

Viewing changes to src/mame/drivers/cchasm.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:
31
31
 *
32
32
 *************************************/
33
33
 
34
 
static ADDRESS_MAP_START( memmap, AS_PROGRAM, 16 )
 
34
static ADDRESS_MAP_START( memmap, AS_PROGRAM, 16, cchasm_state )
35
35
        AM_RANGE(0x000000, 0x00ffff) AM_ROM
36
 
        AM_RANGE(0x040000, 0x04000f) AM_DEVREADWRITE8_MODERN("6840ptm", ptm6840_device, read, write, 0xff)
 
36
        AM_RANGE(0x040000, 0x04000f) AM_DEVREADWRITE8("6840ptm", ptm6840_device, read, write, 0xff)
37
37
        AM_RANGE(0x050000, 0x050001) AM_WRITE(cchasm_refresh_control_w)
38
38
        AM_RANGE(0x060000, 0x060001) AM_READ_PORT("DSW") AM_WRITE(cchasm_led_w)
39
39
        AM_RANGE(0x070000, 0x070001) AM_WRITE(watchdog_reset16_w)
40
40
        AM_RANGE(0xf80000, 0xf800ff) AM_READWRITE(cchasm_io_r,cchasm_io_w)
41
 
        AM_RANGE(0xffb000, 0xffffff) AM_RAM AM_BASE_MEMBER(cchasm_state, m_ram)
 
41
        AM_RANGE(0xffb000, 0xffffff) AM_RAM AM_SHARE("ram")
42
42
ADDRESS_MAP_END
43
43
 
44
44
/*************************************
47
47
 *
48
48
 *************************************/
49
49
 
50
 
static ADDRESS_MAP_START( sound_memmap, AS_PROGRAM, 8 )
 
50
static ADDRESS_MAP_START( sound_memmap, AS_PROGRAM, 8, cchasm_state )
51
51
        AM_RANGE(0x0000, 0x0fff) AM_ROM
52
52
        AM_RANGE(0x4000, 0x43ff) AM_RAM
53
53
        AM_RANGE(0x5000, 0x53ff) AM_RAM
54
 
        AM_RANGE(0x6000, 0x6001) AM_MIRROR(0xf9e) AM_DEVWRITE("ay1", ay8910_address_data_w)
 
54
        AM_RANGE(0x6000, 0x6001) AM_MIRROR(0xf9e) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w)
55
55
        AM_RANGE(0x6000, 0x6000) AM_MIRROR(0xf9e) AM_READ(cchasm_coin_sound_r)
56
 
        AM_RANGE(0x6001, 0x6001) AM_MIRROR(0xf9e) AM_DEVREAD("ay1", ay8910_r)
57
 
        AM_RANGE(0x6020, 0x6021) AM_MIRROR(0xf9e) AM_DEVWRITE("ay2", ay8910_address_data_w)
58
 
        AM_RANGE(0x6021, 0x6021) AM_MIRROR(0xf9e) AM_DEVREAD("ay2", ay8910_r)
59
 
        AM_RANGE(0x6040, 0x6040) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch_r, soundlatch3_w)
 
56
        AM_RANGE(0x6001, 0x6001) AM_MIRROR(0xf9e) AM_DEVREAD_LEGACY("ay1", ay8910_r)
 
57
        AM_RANGE(0x6020, 0x6021) AM_MIRROR(0xf9e) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w)
 
58
        AM_RANGE(0x6021, 0x6021) AM_MIRROR(0xf9e) AM_DEVREAD_LEGACY("ay2", ay8910_r)
 
59
        AM_RANGE(0x6040, 0x6040) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch_byte_r, soundlatch3_byte_w)
60
60
        AM_RANGE(0x6041, 0x6041) AM_MIRROR(0xf9e) AM_READWRITE(cchasm_soundlatch2_r, cchasm_soundlatch4_w)
61
61
        AM_RANGE(0x6061, 0x6061) AM_MIRROR(0xf9e) AM_WRITE(cchasm_reset_coin_flag_w)
62
62
        AM_RANGE(0x7041, 0x7041) AM_NOP // TODO
63
63
ADDRESS_MAP_END
64
64
 
65
 
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8 )
 
65
static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, cchasm_state )
66
66
        ADDRESS_MAP_GLOBAL_MASK(0xff)
67
 
        AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ctc", z80ctc_r, z80ctc_w)
 
67
        AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w)
68
68
ADDRESS_MAP_END
69
69
 
70
70
static WRITE_LINE_DEVICE_HANDLER( cchasm_6840_irq )
124
124
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
125
125
 
126
126
        PORT_START("IN3")
127
 
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED(cchasm_set_coin_flag, 0)
128
 
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED(cchasm_set_coin_flag, 0)
129
 
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CHANGED(cchasm_set_coin_flag, 0)
 
127
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, cchasm_set_coin_flag, 0)
 
128
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, cchasm_set_coin_flag, 0)
 
129
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, cchasm_state, cchasm_set_coin_flag, 0)
130
130
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Test 1") PORT_CODE(KEYCODE_F1)
131
131
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) /* Test 2, not used in cchasm */
132
132
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* Test 3, not used in cchasm */