From 97b67170277437131adf6ed4d60139c172529e4f Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 26 Mar 2019 11:13:37 +1100 Subject: (nw) Clean up the mess on master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release. --- src/devices/bus/a7800/cpuwiz.cpp | 8 +++--- src/devices/bus/a7800/cpuwiz.h | 4 +-- src/devices/bus/a7800/rom.cpp | 59 ++++++++++++++++++++-------------------- src/devices/bus/a7800/rom.h | 16 +++++------ src/devices/bus/a7800/xboard.cpp | 12 ++++---- 5 files changed, 49 insertions(+), 50 deletions(-) (limited to 'src/devices/bus/a7800') diff --git a/src/devices/bus/a7800/cpuwiz.cpp b/src/devices/bus/a7800/cpuwiz.cpp index 8c39f5bf001..0b76f7b2233 100644 --- a/src/devices/bus/a7800/cpuwiz.cpp +++ b/src/devices/bus/a7800/cpuwiz.cpp @@ -120,9 +120,9 @@ WRITE8_MEMBER(a78_megacart_device::write_40xx) // VersaBoard + POKEY @ 0x0450 -MACHINE_CONFIG_START(a78_rom_p450_vb_device::device_add_mconfig) +void a78_rom_p450_vb_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "addon").front_center(); - MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00); +} diff --git a/src/devices/bus/a7800/cpuwiz.h b/src/devices/bus/a7800/cpuwiz.h index 1d9b33693d9..e9f52a24d4f 100644 --- a/src/devices/bus/a7800/cpuwiz.h +++ b/src/devices/bus/a7800/cpuwiz.h @@ -56,8 +56,8 @@ public: a78_rom_p450_vb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; } - virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); } + virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); } protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/a7800/rom.cpp b/src/devices/bus/a7800/rom.cpp index b40eea850c4..362902dbe51 100644 --- a/src/devices/bus/a7800/rom.cpp +++ b/src/devices/bus/a7800/rom.cpp @@ -229,7 +229,7 @@ READ8_MEMBER(a78_rom_device::read_40xx) READ8_MEMBER(a78_rom_pokey_device::read_40xx) { if (offset < 0x4000) - return m_pokey->read(space, offset & 0x0f); + return m_pokey->read(offset & 0x0f); if (offset + 0x4000 < m_base_rom) return 0xff; @@ -240,16 +240,16 @@ READ8_MEMBER(a78_rom_pokey_device::read_40xx) WRITE8_MEMBER(a78_rom_pokey_device::write_40xx) { if (offset < 0x4000) - m_pokey->write(space, offset & 0x0f, data); + m_pokey->write(offset & 0x0f, data); } // TO DO: do we need a PAL variant?!? -MACHINE_CONFIG_START(a78_rom_pokey_device::device_add_mconfig) +void a78_rom_pokey_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "addon").front_center(); - MCFG_DEVICE_ADD("pokey", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00); +} /*------------------------------------------------- @@ -327,7 +327,7 @@ WRITE8_MEMBER(a78_rom_sg_device::write_40xx) READ8_MEMBER(a78_rom_sg_pokey_device::read_40xx) { if (offset < 0x4000) - return m_pokey->read(space, offset & 0x0f); + return m_pokey->read(offset & 0x0f); else if (offset < 0x8000) return m_rom[(offset & 0x3fff) + (m_bank * 0x4000)]; else @@ -337,17 +337,17 @@ READ8_MEMBER(a78_rom_sg_pokey_device::read_40xx) WRITE8_MEMBER(a78_rom_sg_pokey_device::write_40xx) { if (offset < 0x4000) - m_pokey->write(space, offset & 0x0f, data); + m_pokey->write(offset & 0x0f, data); else if (offset < 0x8000) m_bank = data & m_bank_mask; } -MACHINE_CONFIG_START(a78_rom_sg_pokey_device::device_add_mconfig) +void a78_rom_sg_pokey_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "addon").front_center(); - MCFG_DEVICE_ADD("pokey", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00); +} /*------------------------------------------------- @@ -497,34 +497,33 @@ WRITE8_MEMBER(a78_rom_act_device::write_40xx) // Machine configs for PCB variants with a POKEY at $0450 -MACHINE_CONFIG_START(a78_rom_p450_device::device_add_mconfig) +void a78_rom_p450_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "pokey_450").front_center(); - MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "pokey_450", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "pokey_450", 1.00); +} -MACHINE_CONFIG_START(a78_rom_p450_pokey_device::device_add_mconfig) +void a78_rom_p450_pokey_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "addon").front_center(); - MCFG_DEVICE_ADD("pokey", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00) + POKEY(config, m_pokey, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00); - MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "addon", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "addon", 1.00); +} -MACHINE_CONFIG_START(a78_rom_p450_sg_ram_device::device_add_mconfig) +void a78_rom_p450_sg_ram_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "pokey_450").front_center(); - MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "pokey_450", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "pokey_450", 1.00); +} -MACHINE_CONFIG_START(a78_rom_p450_sg9_device::device_add_mconfig) +void a78_rom_p450_sg9_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "pokey_450").front_center(); - MCFG_DEVICE_ADD("pokey450", POKEY, XTAL(14'318'181)/8) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "pokey_450", 1.00) -MACHINE_CONFIG_END + POKEY(config, m_pokey450, XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "pokey_450", 1.00); +} diff --git a/src/devices/bus/a7800/rom.h b/src/devices/bus/a7800/rom.h index 406746c4e93..1ad27663b6f 100644 --- a/src/devices/bus/a7800/rom.h +++ b/src/devices/bus/a7800/rom.h @@ -197,8 +197,8 @@ public: a78_rom_p450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; } - virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); } + virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); } protected: virtual void device_add_mconfig(machine_config &config) override; @@ -216,8 +216,8 @@ public: a78_rom_p450_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; } - virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); } + virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); } protected: virtual void device_add_mconfig(machine_config &config) override; @@ -235,8 +235,8 @@ public: a78_rom_p450_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; } - virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); } + virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); } protected: virtual void device_add_mconfig(machine_config &config) override; @@ -254,8 +254,8 @@ public: a78_rom_p450_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(space, offset & 0x0f); else return 0xff; } - virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(space, offset & 0x0f, data); } + virtual DECLARE_READ8_MEMBER(read_04xx) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_04xx) override { if (offset >= 0x50 && offset < 0x60) m_pokey450->write(offset & 0x0f, data); } protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/a7800/xboard.cpp b/src/devices/bus/a7800/xboard.cpp index d2e610f666e..0005e595a88 100644 --- a/src/devices/bus/a7800/xboard.cpp +++ b/src/devices/bus/a7800/xboard.cpp @@ -158,7 +158,7 @@ WRITE8_MEMBER(a78_xboard_device::write_40xx) READ8_MEMBER(a78_xboard_device::read_04xx) { if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60) - return m_pokey->read(space, offset & 0x0f); + return m_pokey->read(offset & 0x0f); else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70) return m_xbslot->read_04xx(space, offset - 0x10); // access second POKEY else @@ -168,7 +168,7 @@ READ8_MEMBER(a78_xboard_device::read_04xx) WRITE8_MEMBER(a78_xboard_device::write_04xx) { if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60) - m_pokey->write(space, offset & 0x0f, data); + m_pokey->write(offset & 0x0f, data); else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70) m_xbslot->write_04xx(space, offset - 0x10, data); // access second POKEY else if (offset >= 0x70 && offset < 0x80) @@ -203,9 +203,9 @@ READ8_MEMBER(a78_xm_device::read_30xx) READ8_MEMBER(a78_xm_device::read_04xx) { if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60) - return m_pokey->read(space, offset & 0x0f); + return m_pokey->read(offset & 0x0f); else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61) - return m_ym->read(space, offset & 1); + return m_ym->read(offset & 1); else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70) return m_xbslot->read_04xx(space, offset - 0x10); // access second POKEY else @@ -215,9 +215,9 @@ READ8_MEMBER(a78_xm_device::read_04xx) WRITE8_MEMBER(a78_xm_device::write_04xx) { if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60) - m_pokey->write(space, offset & 0x0f, data); + m_pokey->write(offset & 0x0f, data); else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61) - m_ym->write(space, offset & 1, data); + m_ym->write(offset & 1, data); else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70) m_xbslot->write_04xx(space, offset - 0x10, data); // access second POKEY else if (offset >= 0x70 && offset < 0x80) -- cgit v1.2.3-70-g09d2