From 94dda95b385ccf898f19a1820a6237030689313f Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Fri, 20 Apr 2018 17:51:55 +0200 Subject: [PATCH] maps: Finish devices/sound (nw) --- src/devices/sound/cdp1869.cpp | 22 ++++++++++++---------- src/devices/sound/dave.cpp | 10 ++++++---- src/devices/sound/es1373.cpp | 7 ++++--- src/devices/sound/mos6560.cpp | 14 ++++++++------ src/devices/sound/mos7360.cpp | 7 ++++--- src/devices/sound/pci-ac97.cpp | 20 ++++++++++++-------- src/devices/sound/sb0400.cpp | 5 +++-- src/devices/sound/upd7752.cpp | 7 ++++--- 8 files changed, 53 insertions(+), 39 deletions(-) diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp index e94e69f9202..a6603ebb988 100644 --- a/src/devices/sound/cdp1869.cpp +++ b/src/devices/sound/cdp1869.cpp @@ -64,13 +64,14 @@ constexpr XTAL cdp1869_device::CPU_CLK_PAL; DEFINE_DEVICE_TYPE(CDP1869, cdp1869_device, "cdp1869", "RCA CDP1869 VIS") // I/O map -ADDRESS_MAP_START(cdp1869_device::io_map) - AM_RANGE(0x03, 0x03) AM_WRITE(out3_w) - AM_RANGE(0x04, 0x04) AM_WRITE(out4_w) - AM_RANGE(0x05, 0x05) AM_WRITE(out5_w) - AM_RANGE(0x06, 0x06) AM_WRITE(out6_w) - AM_RANGE(0x07, 0x07) AM_WRITE(out7_w) -ADDRESS_MAP_END +void cdp1869_device::io_map(address_map &map) +{ + map(0x03, 0x03).w(this, FUNC(cdp1869_device::out3_w)); + map(0x04, 0x04).w(this, FUNC(cdp1869_device::out4_w)); + map(0x05, 0x05).w(this, FUNC(cdp1869_device::out5_w)); + map(0x06, 0x06).w(this, FUNC(cdp1869_device::out6_w)); + map(0x07, 0x07).w(this, FUNC(cdp1869_device::out7_w)); +} // character RAM map void cdp1869_device::char_map(address_map &map) @@ -85,9 +86,10 @@ void cdp1869_device::page_map(address_map &map) } // default address map -ADDRESS_MAP_START(cdp1869_device::cdp1869) - AM_RANGE(0x000, 0x7ff) AM_RAM -ADDRESS_MAP_END +void cdp1869_device::cdp1869(address_map &map) +{ + map(0x000, 0x7ff).ram(); +} diff --git a/src/devices/sound/dave.cpp b/src/devices/sound/dave.cpp index 16ee02f5b60..4922417ead2 100644 --- a/src/devices/sound/dave.cpp +++ b/src/devices/sound/dave.cpp @@ -39,11 +39,13 @@ void dave_device::z80_io_map(address_map &map) } -ADDRESS_MAP_START(dave_device::program_map) -ADDRESS_MAP_END +void dave_device::program_map(address_map &map) +{ +} -ADDRESS_MAP_START(dave_device::io_map) -ADDRESS_MAP_END +void dave_device::io_map(address_map &map) +{ +} diff --git a/src/devices/sound/es1373.cpp b/src/devices/sound/es1373.cpp index 5f2cad5a841..fe9a59ccf1a 100644 --- a/src/devices/sound/es1373.cpp +++ b/src/devices/sound/es1373.cpp @@ -77,9 +77,10 @@ MACHINE_CONFIG_END DEFINE_DEVICE_TYPE(ES1373, es1373_device, "es1373", "Creative Labs Ensoniq AudioPCI97 ES1373") -ADDRESS_MAP_START(es1373_device::map) - AM_RANGE(0x00, 0x3f) AM_READWRITE (reg_r, reg_w) -ADDRESS_MAP_END +void es1373_device::map(address_map &map) +{ + map(0x00, 0x3f).rw(this, FUNC(es1373_device::reg_r), FUNC(es1373_device::reg_w)); +} es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, ES1373, tag, owner, clock), diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp index d8e40421ded..45b944c5179 100644 --- a/src/devices/sound/mos6560.cpp +++ b/src/devices/sound/mos6560.cpp @@ -680,13 +680,15 @@ DEFINE_DEVICE_TYPE(MOS6561, mos6561_device, "mos6561", DEFINE_DEVICE_TYPE(MOS656X_ATTACK_UFO, mos656x_attack_ufo_device, "mos656x_attack_ufo", "MOS 656X VIC (Attack UFO)") // default address maps -ADDRESS_MAP_START(mos6560_device::mos6560_videoram_map) - AM_RANGE(0x0000, 0x3fff) AM_RAM -ADDRESS_MAP_END +void mos6560_device::mos6560_videoram_map(address_map &map) +{ + map(0x0000, 0x3fff).ram(); +} -ADDRESS_MAP_START(mos6560_device::mos6560_colorram_map) - AM_RANGE(0x000, 0x3ff) AM_RAM -ADDRESS_MAP_END +void mos6560_device::mos6560_colorram_map(address_map &map) +{ + map(0x000, 0x3ff).ram(); +} mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp index 6b21cc4e493..db59db39d03 100644 --- a/src/devices/sound/mos7360.cpp +++ b/src/devices/sound/mos7360.cpp @@ -170,9 +170,10 @@ DEFINE_DEVICE_TYPE(MOS7360, mos7360_device, "mos7360", "MOS 7360 TED") // default address maps -ADDRESS_MAP_START(mos7360_device::mos7360_videoram_map) - AM_RANGE(0x0000, 0xffff) AM_RAM -ADDRESS_MAP_END +void mos7360_device::mos7360_videoram_map(address_map &map) +{ + map(0x0000, 0xffff).ram(); +} //------------------------------------------------- diff --git a/src/devices/sound/pci-ac97.cpp b/src/devices/sound/pci-ac97.cpp index b9804448611..939ef832ab7 100644 --- a/src/devices/sound/pci-ac97.cpp +++ b/src/devices/sound/pci-ac97.cpp @@ -5,17 +5,21 @@ DEFINE_DEVICE_TYPE(AC97, ac97_device, "ac97", "AC'97 Audio") -ADDRESS_MAP_START(ac97_device::native_audio_mixer_map) -ADDRESS_MAP_END +void ac97_device::native_audio_mixer_map(address_map &map) +{ +} -ADDRESS_MAP_START(ac97_device::native_audio_bus_mastering_map) -ADDRESS_MAP_END +void ac97_device::native_audio_bus_mastering_map(address_map &map) +{ +} -ADDRESS_MAP_START(ac97_device::mixer_map) -ADDRESS_MAP_END +void ac97_device::mixer_map(address_map &map) +{ +} -ADDRESS_MAP_START(ac97_device::bus_mastering_map) -ADDRESS_MAP_END +void ac97_device::bus_mastering_map(address_map &map) +{ +} ac97_device::ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, AC97, tag, owner, clock) diff --git a/src/devices/sound/sb0400.cpp b/src/devices/sound/sb0400.cpp index 3497419210f..b124a99b8f9 100644 --- a/src/devices/sound/sb0400.cpp +++ b/src/devices/sound/sb0400.cpp @@ -5,8 +5,9 @@ DEFINE_DEVICE_TYPE(SB0400, sb0400_device, "sb0400", "Creative Labs SB0400 Audigy2 Value") -ADDRESS_MAP_START(sb0400_device::map) -ADDRESS_MAP_END +void sb0400_device::map(address_map &map) +{ +} sb0400_device::sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pci_device(mconfig, SB0400, tag, owner, clock) diff --git a/src/devices/sound/upd7752.cpp b/src/devices/sound/upd7752.cpp index d34554ceb19..f49171588e7 100644 --- a/src/devices/sound/upd7752.cpp +++ b/src/devices/sound/upd7752.cpp @@ -29,10 +29,11 @@ DEFINE_DEVICE_TYPE(UPD7752, upd7752_device, "upd7752", "NEC uPD7752") /* TODO: unknown exact size */ -ADDRESS_MAP_START(upd7752_device::upd7752_ram) +void upd7752_device::upd7752_ram(address_map &map) +{ // AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x0000, 0xffff) AM_RAM -ADDRESS_MAP_END + map(0x0000, 0xffff).ram(); +} //************************************************************************** // LIVE DEVICE