summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/cchance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cchance.cpp')
-rw-r--r--src/mame/drivers/cchance.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/mame/drivers/cchance.cpp b/src/mame/drivers/cchance.cpp
index 35bcb452c7b..103c038a425 100644
--- a/src/mame/drivers/cchance.cpp
+++ b/src/mame/drivers/cchance.cpp
@@ -82,24 +82,25 @@ WRITE8_MEMBER(cchance_state::output_1_w)
m_bell_io = (data & 0x80)>>4;
}
-ADDRESS_MAP_START(cchance_state::main_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
+void cchance_state::main_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
- AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
- AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
+ map(0xa000, 0xafff).ram().rw(m_seta001, FUNC(seta001_device::spritecodelow_r8), FUNC(seta001_device::spritecodelow_w8));
+ map(0xb000, 0xbfff).ram().rw(m_seta001, FUNC(seta001_device::spritecodehigh_r8), FUNC(seta001_device::spritecodehigh_w8));
- AM_RANGE(0xc000, 0xdfff) AM_RAM
+ map(0xc000, 0xdfff).ram();
- AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
- AM_RANGE(0xe300, 0xe303) AM_RAM AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
- AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8) /* enable / disable background transparency */
+ map(0xe000, 0xe2ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r8), FUNC(seta001_device::spriteylow_w8));
+ map(0xe300, 0xe303).ram().mirror(0xfc).w(m_seta001, FUNC(seta001_device::spritectrl_w8)); /* control registers (0x80 mirror used by Arkanoid 2) */
+ map(0xe800, 0xe800).w(m_seta001, FUNC(seta001_device::spritebgflag_w8)); /* enable / disable background transparency */
- AM_RANGE(0xf000, 0xf000) AM_READNOP AM_WRITENOP //???
- AM_RANGE(0xf001, 0xf001) AM_READ(input_1_r) AM_WRITE(output_0_w)
- AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN0") AM_WRITE(output_1_w)
- AM_RANGE(0xf800, 0xf801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w)
- AM_RANGE(0xf801, 0xf801) AM_DEVREAD("aysnd", ay8910_device, data_r)
-ADDRESS_MAP_END
+ map(0xf000, 0xf000).nopr().nopw(); //???
+ map(0xf001, 0xf001).r(this, FUNC(cchance_state::input_1_r)).w(this, FUNC(cchance_state::output_0_w));
+ map(0xf002, 0xf002).portr("IN0").w(this, FUNC(cchance_state::output_1_w));
+ map(0xf800, 0xf801).w("aysnd", FUNC(ay8910_device::address_data_w));
+ map(0xf801, 0xf801).r("aysnd", FUNC(ay8910_device::data_r));
+}
static INPUT_PORTS_START( cchance )