diff options
Diffstat (limited to 'src/devices/bus')
201 files changed, 910 insertions, 940 deletions
diff --git a/src/devices/bus/a1bus/a1cassette.cpp b/src/devices/bus/a1bus/a1cassette.cpp index 13140382f48..fc470ef7f94 100644 --- a/src/devices/bus/a1bus/a1cassette.cpp +++ b/src/devices/bus/a1bus/a1cassette.cpp @@ -72,7 +72,7 @@ a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, devi void a1bus_cassette_device::device_start() { - install_device(0xc000, 0xc0ff, read8_delegate(FUNC(a1bus_cassette_device::cassette_r), this), write8_delegate(FUNC(a1bus_cassette_device::cassette_w), this)); + install_device(0xc000, 0xc0ff, read8_delegate(*this, FUNC(a1bus_cassette_device::cassette_r)), write8_delegate(*this, FUNC(a1bus_cassette_device::cassette_w))); install_bank(0xc100, 0xc1ff, "bank_a1cas", &m_rom[0]); save_item(NAME(m_cassette_output_flipflop)); diff --git a/src/devices/bus/a1bus/a1cffa.cpp b/src/devices/bus/a1bus/a1cffa.cpp index 105abba1eff..8c68e818531 100644 --- a/src/devices/bus/a1bus/a1cffa.cpp +++ b/src/devices/bus/a1bus/a1cffa.cpp @@ -68,7 +68,7 @@ a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, device_type void a1bus_cffa_device::device_start() { - install_device(0xafe0, 0xafff, read8_delegate(FUNC(a1bus_cffa_device::cffa_r), this), write8_delegate(FUNC(a1bus_cffa_device::cffa_w), this)); + install_device(0xafe0, 0xafff, read8_delegate(*this, FUNC(a1bus_cffa_device::cffa_r)), write8_delegate(*this, FUNC(a1bus_cffa_device::cffa_w))); install_bank(0x9000, 0xafdf, "bank_cffa1", &m_rom[0]); save_item(NAME(m_lastdata)); diff --git a/src/devices/bus/a2bus/a2ultraterm.cpp b/src/devices/bus/a2bus/a2ultraterm.cpp index fd8fb2a895a..7b6caa40624 100644 --- a/src/devices/bus/a2bus/a2ultraterm.cpp +++ b/src/devices/bus/a2bus/a2ultraterm.cpp @@ -114,7 +114,7 @@ void a2bus_videx160_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(ULTRATERM_SCREEN_NAME); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(a2bus_videx160_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(a2bus_videx160_device::crtc_update_row)); m_crtc->out_vsync_callback().set(FUNC(a2bus_videx160_device::vsync_changed)); } diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp index 64d614bc60c..b0fda659783 100644 --- a/src/devices/bus/a2bus/a2videoterm.cpp +++ b/src/devices/bus/a2bus/a2videoterm.cpp @@ -120,7 +120,7 @@ void a2bus_videx80_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(VIDEOTERM_SCREEN_NAME); m_crtc->set_show_border_area(false); m_crtc->set_char_width(9); - m_crtc->set_update_row_callback(FUNC(a2bus_videx80_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(a2bus_videx80_device::crtc_update_row)); } void a2bus_ap16_device::device_add_mconfig(machine_config &config) diff --git a/src/devices/bus/acorn/atom/discpack.cpp b/src/devices/bus/acorn/atom/discpack.cpp index fd33ec293a6..dd8d3021301 100644 --- a/src/devices/bus/acorn/atom/discpack.cpp +++ b/src/devices/bus/acorn/atom/discpack.cpp @@ -84,7 +84,7 @@ void atom_discpack_device::device_start() address_space &space = m_bus->memspace(); space.install_device(0x0a00, 0x0a03, *m_fdc, &i8271_device::map); - space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8smo_delegate(FUNC(i8271_device::data_r), m_fdc.target()), write8smo_delegate(FUNC(i8271_device::data_w), m_fdc.target())); + space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8smo_delegate(*m_fdc, FUNC(i8271_device::data_r)), write8smo_delegate(*m_fdc, FUNC(i8271_device::data_w))); space.install_ram(0x2000, 0x23ff); space.install_ram(0x2400, 0x27ff); space.install_ram(0x3c00, 0x3fff); diff --git a/src/devices/bus/acorn/atom/econet.cpp b/src/devices/bus/acorn/atom/econet.cpp index 5051fd0e8e7..f615313bdad 100644 --- a/src/devices/bus/acorn/atom/econet.cpp +++ b/src/devices/bus/acorn/atom/econet.cpp @@ -63,8 +63,8 @@ void atom_econet_device::device_start() { address_space &space = m_bus->memspace(); - space.install_readwrite_handler(0xb400, 0xb403, read8sm_delegate(FUNC(mc6854_device::read), m_adlc.target()), write8sm_delegate(FUNC(mc6854_device::write), m_adlc.target())); - space.install_read_handler(0xb404, 0xb404, read8_delegate(FUNC(atom_econet_device::statid_r), this)); + space.install_readwrite_handler(0xb400, 0xb403, read8sm_delegate(*m_adlc, FUNC(mc6854_device::read)), write8sm_delegate(*m_adlc, FUNC(mc6854_device::write))); + space.install_read_handler(0xb404, 0xb404, read8_delegate(*this, FUNC(atom_econet_device::statid_r))); } //************************************************************************** diff --git a/src/devices/bus/acorn/atom/sid.cpp b/src/devices/bus/acorn/atom/sid.cpp index 8b5cd738cfe..4b0e1f7ff4d 100644 --- a/src/devices/bus/acorn/atom/sid.cpp +++ b/src/devices/bus/acorn/atom/sid.cpp @@ -55,5 +55,5 @@ void atom_sid_device::device_start() { address_space &space = m_bus->memspace(); - space.install_readwrite_handler(0xbdc0, 0xbddf, read8sm_delegate(FUNC(mos6581_device::read), m_sid.target()), write8sm_delegate(FUNC(mos6581_device::write), m_sid.target())); + space.install_readwrite_handler(0xbdc0, 0xbddf, read8sm_delegate(*m_sid, FUNC(mos6581_device::read)), write8sm_delegate(*m_sid, FUNC(mos6581_device::write))); } diff --git a/src/devices/bus/acorn/cms/4080term.cpp b/src/devices/bus/acorn/cms/4080term.cpp index 629b4915fdd..f5ae26633e5 100644 --- a/src/devices/bus/acorn/cms/4080term.cpp +++ b/src/devices/bus/acorn/cms/4080term.cpp @@ -147,9 +147,9 @@ void cms_4080term_device::device_start() { address_space &space = m_bus->memspace(); - space.install_readwrite_handler(0xfd20, 0xfd2f, read8sm_delegate(FUNC(ef9345_device::data_r), m_ef9345.target()), write8sm_delegate(FUNC(ef9345_device::data_w), m_ef9345.target())); + space.install_readwrite_handler(0xfd20, 0xfd2f, read8sm_delegate(*m_ef9345, FUNC(ef9345_device::data_r)), write8sm_delegate(*m_ef9345, FUNC(ef9345_device::data_w))); space.install_device(0xfd30, 0xfd3f, *m_via, &via6522_device::map); - space.install_readwrite_handler(0xfd40, 0xfd4f, read8sm_delegate(FUNC(mos6551_device::read), m_acia.target()), write8sm_delegate(FUNC(mos6551_device::write), m_acia.target())); + space.install_readwrite_handler(0xfd40, 0xfd4f, read8sm_delegate(*m_acia, FUNC(mos6551_device::read)), write8sm_delegate(*m_acia, FUNC(mos6551_device::write))); uint8_t *FNT = memregion("ef9345")->base(); uint16_t dest = 0x2000; diff --git a/src/devices/bus/acorn/cms/fdc.cpp b/src/devices/bus/acorn/cms/fdc.cpp index 833fa2b09a4..1d2c81dabf5 100644 --- a/src/devices/bus/acorn/cms/fdc.cpp +++ b/src/devices/bus/acorn/cms/fdc.cpp @@ -75,8 +75,8 @@ void cms_fdc_device::device_start() { address_space &space = m_bus->memspace(); - space.install_readwrite_handler(0xfc50, 0xfc5f, read8_delegate(FUNC(cms_fdc_device::wd1770_state_r), this), write8_delegate(FUNC(cms_fdc_device::wd1770_control_w), this)); - space.install_readwrite_handler(0xfc40, 0xfc4f, read8sm_delegate(FUNC(wd1770_device::read), m_fdc.target()), write8sm_delegate(FUNC(wd1770_device::write), m_fdc.target())); + space.install_readwrite_handler(0xfc50, 0xfc5f, read8_delegate(*this, FUNC(cms_fdc_device::wd1770_state_r)), write8_delegate(*this, FUNC(cms_fdc_device::wd1770_control_w))); + space.install_readwrite_handler(0xfc40, 0xfc4f, read8sm_delegate(*m_fdc, FUNC(wd1770_device::read)), write8sm_delegate(*m_fdc, FUNC(wd1770_device::write))); } diff --git a/src/devices/bus/acorn/cms/hires.cpp b/src/devices/bus/acorn/cms/hires.cpp index 9e6e169737b..f0c23ef39b8 100644 --- a/src/devices/bus/acorn/cms/hires.cpp +++ b/src/devices/bus/acorn/cms/hires.cpp @@ -71,8 +71,8 @@ void cms_hires_device::device_start() { address_space &space = m_bus->memspace(); - space.install_readwrite_handler(0xfc10, 0xfc1f, read8sm_delegate(FUNC(ef9365_device::data_r), m_gdp.target()), write8sm_delegate(FUNC(ef9365_device::data_w), m_gdp.target())); - space.install_write_handler(0xfc20, 0xfc2f, write8_delegate(FUNC(cms_hires_device::colour_reg_w), this)); + space.install_readwrite_handler(0xfc10, 0xfc1f, read8sm_delegate(*m_gdp, FUNC(ef9365_device::data_r)), write8sm_delegate(*m_gdp, FUNC(ef9365_device::data_w))); + space.install_write_handler(0xfc20, 0xfc2f, write8_delegate(*this, FUNC(cms_hires_device::colour_reg_w))); save_item(NAME(m_flash_state)); } diff --git a/src/devices/bus/acorn/system/8k.cpp b/src/devices/bus/acorn/system/8k.cpp index b8635920aab..97939b7362f 100644 --- a/src/devices/bus/acorn/system/8k.cpp +++ b/src/devices/bus/acorn/system/8k.cpp @@ -70,8 +70,8 @@ ioport_constructor acorn_8k_device::device_input_ports() const void acorn_8k_device::device_add_mconfig(machine_config &config) { /* rom sockets */ - GENERIC_SOCKET(config, "rom0", generic_plain_slot, "acrnsys_rom", "bin,rom").set_device_load(FUNC(acorn_8k_device::rom0_load), this); // IC17 - GENERIC_SOCKET(config, "rom1", generic_plain_slot, "acrnsys_rom", "bin,rom").set_device_load(FUNC(acorn_8k_device::rom1_load), this); // IC18 + GENERIC_SOCKET(config, "rom0", generic_plain_slot, "acrnsys_rom", "bin,rom").set_device_load(FUNC(acorn_8k_device::rom0_load)); // IC17 + GENERIC_SOCKET(config, "rom1", generic_plain_slot, "acrnsys_rom", "bin,rom").set_device_load(FUNC(acorn_8k_device::rom1_load)); // IC18 } diff --git a/src/devices/bus/acorn/system/econet.cpp b/src/devices/bus/acorn/system/econet.cpp index 261fb4261a1..f617d0266ae 100644 --- a/src/devices/bus/acorn/system/econet.cpp +++ b/src/devices/bus/acorn/system/econet.cpp @@ -70,8 +70,8 @@ void acorn_econet_device::device_reset() { address_space &space = m_bus->memspace(); - space.install_readwrite_handler(0x1940, 0x1943, read8sm_delegate(FUNC(mc6854_device::read), m_adlc.target()), write8sm_delegate(FUNC(mc6854_device::write), m_adlc.target())); - space.install_read_handler(0x1944, 0x1944, read8_delegate(FUNC(acorn_econet_device::statid_r), this)); + space.install_readwrite_handler(0x1940, 0x1943, read8sm_delegate(*m_adlc, FUNC(mc6854_device::read)), write8sm_delegate(*m_adlc, FUNC(mc6854_device::write))); + space.install_read_handler(0x1944, 0x1944, read8_delegate(*this, FUNC(acorn_econet_device::statid_r))); } //************************************************************************** diff --git a/src/devices/bus/acorn/system/fdc.cpp b/src/devices/bus/acorn/system/fdc.cpp index 179b914d3cf..185a10da7d7 100644 --- a/src/devices/bus/acorn/system/fdc.cpp +++ b/src/devices/bus/acorn/system/fdc.cpp @@ -85,7 +85,7 @@ void acorn_fdc_device::device_reset() address_space &space = m_bus->memspace(); space.install_device(0x0a00, 0x0a03, *m_fdc, &i8271_device::map); - space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8smo_delegate(FUNC(i8271_device::data_r), m_fdc.target()), write8smo_delegate(FUNC(i8271_device::data_w), m_fdc.target())); + space.install_readwrite_handler(0x0a04, 0x0a04, 0, 0x1f8, 0, read8smo_delegate(*m_fdc, FUNC(i8271_device::data_r)), write8smo_delegate(*m_fdc, FUNC(i8271_device::data_w))); } diff --git a/src/devices/bus/acorn/system/vdu40.cpp b/src/devices/bus/acorn/system/vdu40.cpp index 916d7309dc3..dcee8cd9b53 100644 --- a/src/devices/bus/acorn/system/vdu40.cpp +++ b/src/devices/bus/acorn/system/vdu40.cpp @@ -38,7 +38,7 @@ void acorn_vdu40_device::device_add_mconfig(machine_config &config) m_crtc->set_show_border_area(false); m_crtc->set_char_width(12); m_crtc->out_vsync_callback().set(FUNC(acorn_vdu40_device::vsync_changed)); - m_crtc->set_update_row_callback(FUNC(acorn_vdu40_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(acorn_vdu40_device::crtc_update_row)); SAA5050(config, m_trom, 12_MHz_XTAL / 2); m_trom->set_screen_size(40, 25, 40); @@ -82,8 +82,8 @@ void acorn_vdu40_device::device_reset() address_space &space = m_bus->memspace(); space.install_ram(0x0400, 0x07ff, m_videoram.get()); - space.install_readwrite_handler(0x0800, 0x0800, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target())); - space.install_readwrite_handler(0x0801, 0x0801, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target())); + space.install_readwrite_handler(0x0800, 0x0800, read8smo_delegate(*m_crtc, FUNC(mc6845_device::status_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::address_w))); + space.install_readwrite_handler(0x0801, 0x0801, read8smo_delegate(*m_crtc, FUNC(mc6845_device::register_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::register_w))); } diff --git a/src/devices/bus/acorn/system/vdu80.cpp b/src/devices/bus/acorn/system/vdu80.cpp index 702041c3cf1..5cf995d8d3c 100644 --- a/src/devices/bus/acorn/system/vdu80.cpp +++ b/src/devices/bus/acorn/system/vdu80.cpp @@ -101,7 +101,7 @@ void acorn_vdu80_device::device_add_mconfig(machine_config &config) m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(6); - m_crtc->set_update_row_callback(FUNC(acorn_vdu80_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(acorn_vdu80_device::crtc_update_row)); } @@ -152,15 +152,15 @@ void acorn_vdu80_device::device_reset() { space.install_ram(0xf000, 0x0f7ff, m_videoram.get()); - space.install_readwrite_handler(0xe840, 0xe840, 0, 0x3f, 0, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target())); - space.install_readwrite_handler(0xe841, 0xe841, 0, 0x3e, 0, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target())); + space.install_readwrite_handler(0xe840, 0xe840, 0, 0x3f, 0, read8smo_delegate(*m_crtc, FUNC(mc6845_device::status_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::address_w))); + space.install_readwrite_handler(0xe841, 0xe841, 0, 0x3e, 0, read8smo_delegate(*m_crtc, FUNC(mc6845_device::register_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::register_w))); } else { space.install_ram(0x1000, 0x017ff, m_videoram.get()); - space.install_readwrite_handler(0x1840, 0x1840, 0, 0x3f, 0, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target())); - space.install_readwrite_handler(0x1841, 0x1841, 0, 0x3e, 0, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target())); + space.install_readwrite_handler(0x1840, 0x1840, 0, 0x3f, 0, read8smo_delegate(*m_crtc, FUNC(mc6845_device::status_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::address_w))); + space.install_readwrite_handler(0x1841, 0x1841, 0, 0x3e, 0, read8smo_delegate(*m_crtc, FUNC(mc6845_device::register_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::register_w))); } } diff --git a/src/devices/bus/acorn/system/vib.cpp b/src/devices/bus/acorn/system/vib.cpp index a204cbb038c..e4ca10e6146 100644 --- a/src/devices/bus/acorn/system/vib.cpp +++ b/src/devices/bus/acorn/system/vib.cpp @@ -113,8 +113,8 @@ void acorn_vib_device::device_reset() space.install_device(0x0c00, 0x0c0f, *m_via6522, &via6522_device::map); space.install_device(0x0c10, 0x0c1f, *m_via6522, &via6522_device::map); - space.install_readwrite_handler(0x0c20, 0x0c21, 0, 0x1e, 0, read8sm_delegate(FUNC(acia6850_device::read), m_acia.target()), write8sm_delegate(FUNC(acia6850_device::write), m_acia.target())); - space.install_readwrite_handler(0x0c40, 0x0c43, 0, 0x1c, 0, read8sm_delegate(FUNC(i8255_device::read), m_ppi8255.target()), write8sm_delegate(FUNC(i8255_device::write), m_ppi8255.target())); + space.install_readwrite_handler(0x0c20, 0x0c21, 0, 0x1e, 0, read8sm_delegate(*m_acia, FUNC(acia6850_device::read)), write8sm_delegate(*m_acia, FUNC(acia6850_device::write))); + space.install_readwrite_handler(0x0c40, 0x0c43, 0, 0x1c, 0, read8sm_delegate(*m_ppi8255, FUNC(i8255_device::read)), write8sm_delegate(*m_ppi8255, FUNC(i8255_device::write))); m_mc14411->timer_disable_all(); m_mc14411->timer_enable(mc14411_device::timer_id(m_txc->read()), true); diff --git a/src/devices/bus/amiga/zorro/a2052.cpp b/src/devices/bus/amiga/zorro/a2052.cpp index 515c568c019..4aa54e52bbc 100644 --- a/src/devices/bus/amiga/zorro/a2052.cpp +++ b/src/devices/bus/amiga/zorro/a2052.cpp @@ -129,7 +129,7 @@ WRITE_LINE_MEMBER( a2052_device::cfgin_w ) // install autoconfig handler m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); } } diff --git a/src/devices/bus/amiga/zorro/a2058.cpp b/src/devices/bus/amiga/zorro/a2058.cpp index e8d6e8c28fb..d0ecee24526 100644 --- a/src/devices/bus/amiga/zorro/a2058.cpp +++ b/src/devices/bus/amiga/zorro/a2058.cpp @@ -141,7 +141,7 @@ WRITE_LINE_MEMBER( a2058_device::cfgin_w ) // install autoconfig handler m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); } } diff --git a/src/devices/bus/amiga/zorro/a2065.cpp b/src/devices/bus/amiga/zorro/a2065.cpp index b1b747594cc..392601e1421 100644 --- a/src/devices/bus/amiga/zorro/a2065.cpp +++ b/src/devices/bus/amiga/zorro/a2065.cpp @@ -85,18 +85,18 @@ void a2065_device::autoconfig_base_address(offs_t address) // install autoconfig handler to new location m_slot->space().install_readwrite_handler(address, address + 0x7f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); // install access to lance registers m_slot->space().install_readwrite_handler(address + 0x4000, address + 0x4003, - read16_delegate(FUNC(am7990_device::regs_r), &(*m_lance)), - write16_delegate(FUNC(am7990_device::regs_w), &(*m_lance)), 0xffff); + read16_delegate(*m_lance, FUNC(am7990_device::regs_r)), + write16_delegate(*m_lance, FUNC(am7990_device::regs_w)), 0xffff); // install access to onboard ram (32k) m_slot->space().install_readwrite_handler(address + 0x8000, address + 0x8000 + 0x7fff, - read16_delegate(FUNC(a2065_device::host_ram_r), this), - write16_delegate(FUNC(a2065_device::host_ram_w), this), 0xffff); + read16_delegate(*this, FUNC(a2065_device::host_ram_r)), + write16_delegate(*this, FUNC(a2065_device::host_ram_w)), 0xffff); // we're done m_slot->cfgout_w(0); @@ -124,8 +124,8 @@ WRITE_LINE_MEMBER( a2065_device::cfgin_w ) // install autoconfig handler m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); } } diff --git a/src/devices/bus/amiga/zorro/a2232.cpp b/src/devices/bus/amiga/zorro/a2232.cpp index 24020d7a25d..8afa7e245f3 100644 --- a/src/devices/bus/amiga/zorro/a2232.cpp +++ b/src/devices/bus/amiga/zorro/a2232.cpp @@ -191,24 +191,24 @@ void a2232_device::autoconfig_base_address(offs_t address) m_slot->space().unmap_readwrite(0xe80000, 0xe8007f); m_slot->space().install_readwrite_handler(address, address + 0x3fff, - read16_delegate(FUNC(a2232_device::shared_ram_r), this), - write16_delegate(FUNC(a2232_device::shared_ram_w), this), 0xffff); + read16_delegate(*this, FUNC(a2232_device::shared_ram_r)), + write16_delegate(*this, FUNC(a2232_device::shared_ram_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0x4000, address + 0x4001, - read16_delegate(FUNC(a2232_device::irq_ack_r), this), - write16_delegate(FUNC(a2232_device::irq_ack_w), this), 0xffff); + read16_delegate(*this, FUNC(a2232_device::irq_ack_r)), + write16_delegate(*this, FUNC(a2232_device::irq_ack_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0x8000, address + 0x8001, - read16_delegate(FUNC(a2232_device::reset_low_r), this), - write16_delegate(FUNC(a2232_device::reset_low_w), this), 0xffff); + read16_delegate(*this, FUNC(a2232_device::reset_low_r)), + write16_delegate(*this, FUNC(a2232_device::reset_low_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0xa000, address + 0xa001, - read16_delegate(FUNC(a2232_device::irq_r), this), - write16_delegate(FUNC(a2232_device::irq_w), this), 0xffff); + read16_delegate(*this, FUNC(a2232_device::irq_r)), + write16_delegate(*this, FUNC(a2232_device::irq_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0xc000, address + 0xc001, - read16_delegate(FUNC(a2232_device::reset_high_r), this), - write16_delegate(FUNC(a2232_device::reset_high_w), this), 0xffff); + read16_delegate(*this, FUNC(a2232_device::reset_high_r)), + write16_delegate(*this, FUNC(a2232_device::reset_high_w)), 0xffff); // we're done m_slot->cfgout_w(0); @@ -237,8 +237,8 @@ WRITE_LINE_MEMBER( a2232_device::cfgin_w ) // install autoconfig handler m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); } } diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp index 376e2824660..ddb3ba3344c 100644 --- a/src/devices/bus/amiga/zorro/buddha.cpp +++ b/src/devices/bus/amiga/zorro/buddha.cpp @@ -150,8 +150,8 @@ void buddha_device::autoconfig_base_address(offs_t address) // install autoconfig handler to new location m_slot->space().install_readwrite_handler(address, address + 0x7f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); // install access to the rom space m_slot->space().install_rom(address + 0x1000, address + 0xffff, memregion("bootrom")->base() + 0x1000); @@ -182,8 +182,8 @@ WRITE_LINE_MEMBER( buddha_device::cfgin_w ) // install autoconfig handler m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f, - read16_delegate(FUNC(amiga_autoconfig::autoconfig_read), static_cast<amiga_autoconfig *>(this)), - write16_delegate(FUNC(amiga_autoconfig::autoconfig_write), static_cast<amiga_autoconfig *>(this)), 0xffff); + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffff); } } diff --git a/src/devices/bus/bbc/exp/mertec.cpp b/src/devices/bus/bbc/exp/mertec.cpp index ab9dc3c2f6e..11b3c9dccb9 100644 --- a/src/devices/bus/bbc/exp/mertec.cpp +++ b/src/devices/bus/bbc/exp/mertec.cpp @@ -53,8 +53,8 @@ void bbc_mertec_device::device_add_mconfig(machine_config &config) /* adc */ UPD7002(config, m_upd7002, DERIVED_CLOCK(1, 8)); - m_upd7002->set_get_analogue_callback(FUNC(bbc_mertec_device::get_analogue_input), this); - m_upd7002->set_eoc_callback(FUNC(bbc_mertec_device::upd7002_eoc), this); + m_upd7002->set_get_analogue_callback(FUNC(bbc_mertec_device::get_analogue_input)); + m_upd7002->set_eoc_callback(FUNC(bbc_mertec_device::upd7002_eoc)); /* analogue port */ BBC_ANALOGUE_SLOT(config, m_analog, bbc_analogue_devices, nullptr); diff --git a/src/devices/bus/bbc/tube/tube_80286.cpp b/src/devices/bus/bbc/tube/tube_80286.cpp index e8ff167d0fb..de26a61ab48 100644 --- a/src/devices/bus/bbc/tube/tube_80286.cpp +++ b/src/devices/bus/bbc/tube/tube_80286.cpp @@ -62,7 +62,7 @@ void bbc_tube_80286_device::device_add_mconfig(machine_config &config) I80286(config, m_i80286, 12_MHz_XTAL / 2); m_i80286->set_addrmap(AS_PROGRAM, &bbc_tube_80286_device::tube_80286_mem); m_i80286->set_addrmap(AS_IO, &bbc_tube_80286_device::tube_80286_io); - m_i80286->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(bbc_tube_80286_device::irq_callback), this)); + m_i80286->set_irq_acknowledge_callback(FUNC(bbc_tube_80286_device::irq_callback)); TUBE(config, m_ula); m_ula->pnmi_handler().set_inputline(m_i80286, INPUT_LINE_NMI); diff --git a/src/devices/bus/bbc/tube/tube_z80.cpp b/src/devices/bus/bbc/tube/tube_z80.cpp index 06e6931c7a3..8704a1ee771 100644 --- a/src/devices/bus/bbc/tube/tube_z80.cpp +++ b/src/devices/bus/bbc/tube/tube_z80.cpp @@ -67,7 +67,7 @@ void bbc_tube_z80_device::device_add_mconfig(machine_config &config) m_z80->set_addrmap(AS_PROGRAM, &bbc_tube_z80_device::tube_z80_mem); m_z80->set_addrmap(AS_OPCODES, &bbc_tube_z80_device::tube_z80_fetch); m_z80->set_addrmap(AS_IO, &bbc_tube_z80_device::tube_z80_io); - m_z80->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(bbc_tube_z80_device::irq_callback), this)); + m_z80->set_irq_acknowledge_callback(FUNC(bbc_tube_z80_device::irq_callback)); TUBE(config, m_ula); m_ula->hirq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_tube_slot_device::irq_w)); diff --git a/src/devices/bus/bml3/bml3kanji.cpp b/src/devices/bus/bml3/bml3kanji.cpp index 375dcd7becf..ff1b3a9fae7 100644 --- a/src/devices/bus/bml3/bml3kanji.cpp +++ b/src/devices/bus/bml3/bml3kanji.cpp @@ -79,7 +79,7 @@ void bml3bus_kanji_device::device_start() // install into memory address_space &space_prg = m_bml3bus->space(); - space_prg.install_readwrite_handler(0xff75, 0xff76, read8_delegate( FUNC(bml3bus_kanji_device::bml3_kanji_r), this), write8_delegate(FUNC(bml3bus_kanji_device::bml3_kanji_w), this) ); + space_prg.install_readwrite_handler(0xff75, 0xff76, read8_delegate(*this, FUNC(bml3bus_kanji_device::bml3_kanji_r)), write8_delegate(*this, FUNC(bml3bus_kanji_device::bml3_kanji_w))); } void bml3bus_kanji_device::device_reset() diff --git a/src/devices/bus/bml3/bml3mp1802.cpp b/src/devices/bus/bml3/bml3mp1802.cpp index 18fd6702871..76c96a43040 100644 --- a/src/devices/bus/bml3/bml3mp1802.cpp +++ b/src/devices/bus/bml3/bml3mp1802.cpp @@ -132,8 +132,8 @@ void bml3bus_mp1802_device::device_start() // install into memory address_space &space_prg = m_bml3bus->space(); - space_prg.install_readwrite_handler(0xff00, 0xff03, read8sm_delegate(FUNC(mb8866_device::read), m_fdc.target()), write8sm_delegate(FUNC(mb8866_device::write), m_fdc.target())); - space_prg.install_readwrite_handler(0xff04, 0xff04, read8_delegate(FUNC(bml3bus_mp1802_device::bml3_mp1802_r), this), write8_delegate(FUNC(bml3bus_mp1802_device::bml3_mp1802_w), this)); + space_prg.install_readwrite_handler(0xff00, 0xff03, read8sm_delegate(*m_fdc, FUNC(mb8866_device::read)), write8sm_delegate(*m_fdc, FUNC(mb8866_device::write))); + space_prg.install_readwrite_handler(0xff04, 0xff04, read8_delegate(*this, FUNC(bml3bus_mp1802_device::bml3_mp1802_r)), write8_delegate(*this, FUNC(bml3bus_mp1802_device::bml3_mp1802_w))); // overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work... uint8_t *mainrom = device().machine().root_device().memregion("maincpu")->base(); memcpy(mainrom + 0xf800, m_rom + 0xf800, 0x800); diff --git a/src/devices/bus/bml3/bml3mp1805.cpp b/src/devices/bus/bml3/bml3mp1805.cpp index 4ac4dc66df6..1b3bfb1d6b1 100644 --- a/src/devices/bus/bml3/bml3mp1805.cpp +++ b/src/devices/bus/bml3/bml3mp1805.cpp @@ -156,8 +156,8 @@ void bml3bus_mp1805_device::device_start() // install into memory address_space &space_prg = m_bml3bus->space(); - space_prg.install_readwrite_handler(0xff18, 0xff1f, read8_delegate( FUNC(mc6843_device::read), (mc6843_device*)m_mc6843), write8_delegate(FUNC(mc6843_device::write), (mc6843_device*)m_mc6843) ); - space_prg.install_readwrite_handler(0xff20, 0xff20, read8_delegate( FUNC(bml3bus_mp1805_device::bml3_mp1805_r), this), write8_delegate(FUNC(bml3bus_mp1805_device::bml3_mp1805_w), this) ); + space_prg.install_readwrite_handler(0xff18, 0xff1f, read8_delegate(*m_mc6843, FUNC(mc6843_device::read)), write8_delegate(*m_mc6843, FUNC(mc6843_device::write))); + space_prg.install_readwrite_handler(0xff20, 0xff20, read8_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_r)), write8_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_w))); // overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work... uint8_t *mainrom = device().machine().root_device().memregion("maincpu")->base(); memcpy(mainrom + 0xf800, m_rom + 0xf800, 0x800); diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp index 19a2f768a2c..8f0f35b523f 100644 --- a/src/devices/bus/c64/xl80.cpp +++ b/src/devices/bus/c64/xl80.cpp @@ -138,7 +138,7 @@ void c64_xl80_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(MC6845_SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(c64_xl80_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(c64_xl80_device::crtc_update_row)); } diff --git a/src/devices/bus/cbus/pc9801_118.cpp b/src/devices/bus/cbus/pc9801_118.cpp index a9271ecb0bf..2a2ec411a18 100644 --- a/src/devices/bus/cbus/pc9801_118.cpp +++ b/src/devices/bus/cbus/pc9801_118.cpp @@ -114,7 +114,7 @@ void pc9801_118_device::device_validity_check(validity_checker &valid) const void pc9801_118_device::device_start() { - m_bus->install_io(0xa460, 0xa463, read8_delegate(FUNC(pc9801_118_device::id_r), this), write8_delegate(FUNC(pc9801_118_device::ext_w), this) ); + m_bus->install_io(0xa460, 0xa463, read8_delegate(*this, FUNC(pc9801_118_device::id_r)), write8_delegate(*this, FUNC(pc9801_118_device::ext_w))); save_item(NAME(m_ext_reg)); } @@ -128,7 +128,7 @@ void pc9801_118_device::device_reset() { uint16_t port_base = (ioport("OPN3_DSW")->read() & 1) << 8; m_bus->io_space().unmap_readwrite(0x0088, 0x008b, 0x100); - m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8_delegate(FUNC(pc9801_118_device::opn3_r), this), write8_delegate(FUNC(pc9801_118_device::opn3_w), this) ); + m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8_delegate(*this, FUNC(pc9801_118_device::opn3_r)), write8_delegate(*this, FUNC(pc9801_118_device::opn3_w))); m_ext_reg = 1; // TODO: enabled or disabled? } diff --git a/src/devices/bus/cbus/pc9801_26.cpp b/src/devices/bus/cbus/pc9801_26.cpp index 603ea4a80b3..3d70d603665 100644 --- a/src/devices/bus/cbus/pc9801_26.cpp +++ b/src/devices/bus/cbus/pc9801_26.cpp @@ -133,7 +133,7 @@ void pc9801_26_device::device_reset() uint16_t port_base = (ioport("OPN_DSW")->read() & 1) << 8; m_bus->io_space().unmap_readwrite(0x0088, 0x008b, 0x100); - m_bus->install_io(port_base + 0x0088, port_base + 0x008b, read8_delegate(FUNC(pc9801_26_device::opn_r), this), write8_delegate(FUNC(pc9801_26_device::opn_w), this) ); + m_bus->install_io(port_base + 0x0088, port_base + 0x008b, read8_delegate(*this, FUNC(pc9801_26_device::opn_r)), write8_delegate(*this, FUNC(pc9801_26_device::opn_w))); } @@ -150,7 +150,7 @@ READ8_MEMBER(pc9801_26_device::opn_r) } else // odd { - printf("Read to undefined port [%02x]\n",offset+0x188); + logerror("Read to undefined port [%02x]\n", offset+0x188); return 0xff; } } @@ -161,5 +161,5 @@ WRITE8_MEMBER(pc9801_26_device::opn_w) if((offset & 5) == 0) m_opn->write(offset >> 1, data); else // odd - printf("PC9801-26: Write to undefined port [%02x] %02x\n",offset+0x188,data); + logerror("PC9801-26: Write to undefined port [%02x] %02x\n", offset+0x188, data); } diff --git a/src/devices/bus/cbus/pc9801_86.cpp b/src/devices/bus/cbus/pc9801_86.cpp index d9d6150a9fa..73f95aafc24 100644 --- a/src/devices/bus/cbus/pc9801_86.cpp +++ b/src/devices/bus/cbus/pc9801_86.cpp @@ -160,10 +160,10 @@ void pc9801_86_device::device_validity_check(validity_checker &valid) const void pc9801_86_device::device_start() { m_bus->program_space().install_rom(0xcc000,0xcffff,memregion(this->subtag("sound_bios").c_str())->base()); - m_bus->install_io(0xa460, 0xa463, read8_delegate(FUNC(pc9801_86_device::id_r), this), write8_delegate(FUNC(pc9801_86_device::mask_w), this)); - m_bus->install_io(0xa464, 0xa46f, read8_delegate(FUNC(pc9801_86_device::pcm_r), this), write8_delegate(FUNC(pc9801_86_device::pcm_w), this)); - m_bus->install_io(0xa66c, 0xa66f, read8_delegate([this](address_space &s, offs_t o, u8 mm){ return o == 2 ? m_pcm_mute : 0xff; }, "pc9801_86_mute_r"), - write8_delegate([this](address_space &s, offs_t o, u8 d, u8 mm){ if(o == 2) m_pcm_mute = d; }, "pc9801_86_mute_w")); + m_bus->install_io(0xa460, 0xa463, read8_delegate(*this, FUNC(pc9801_86_device::id_r)), write8_delegate(*this, FUNC(pc9801_86_device::mask_w))); + m_bus->install_io(0xa464, 0xa46f, read8_delegate(*this, FUNC(pc9801_86_device::pcm_r)), write8_delegate(*this, FUNC(pc9801_86_device::pcm_w))); + m_bus->install_io(0xa66c, 0xa66f, read8_delegate(*this, [this](address_space &s, offs_t o, u8 mm){ return o == 2 ? m_pcm_mute : 0xff; }, "pc9801_86_mute_r"), + write8_delegate(*this, [this](address_space &s, offs_t o, u8 d, u8 mm){ if(o == 2) m_pcm_mute = d; }, "pc9801_86_mute_w")); m_dac_timer = timer_alloc(); save_item(NAME(m_count)); @@ -180,7 +180,7 @@ void pc9801_86_device::device_reset() { uint16_t port_base = (ioport("OPNA_DSW")->read() & 1) << 8; m_bus->io_space().unmap_readwrite(0x0088, 0x008f, 0x100); - m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8_delegate(FUNC(pc9801_86_device::opna_r), this), write8_delegate(FUNC(pc9801_86_device::opna_w), this) ); + m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8_delegate(*this, FUNC(pc9801_86_device::opna_r)), write8_delegate(*this, FUNC(pc9801_86_device::opna_w))); m_mask = 0; m_head = m_tail = m_count = 0; @@ -412,7 +412,7 @@ void pc9801_speakboard_device::device_start() { pc9801_86_device::device_start(); - m_bus->install_io(0x0588, 0x058f, read8_delegate(FUNC(pc9801_speakboard_device::opna_slave_r), this), write8_delegate(FUNC(pc9801_speakboard_device::opna_slave_w), this) ); + m_bus->install_io(0x0588, 0x058f, read8_delegate(*this, FUNC(pc9801_speakboard_device::opna_slave_r)), write8_delegate(*this, FUNC(pc9801_speakboard_device::opna_slave_w))); } void pc9801_speakboard_device::device_reset() diff --git a/src/devices/bus/cbus/pc9801_amd98.cpp b/src/devices/bus/cbus/pc9801_amd98.cpp index ca7b32e7b4e..684dc8978df 100644 --- a/src/devices/bus/cbus/pc9801_amd98.cpp +++ b/src/devices/bus/cbus/pc9801_amd98.cpp @@ -134,9 +134,9 @@ void pc9801_amd98_device::device_start() void pc9801_amd98_device::device_reset() { - m_bus->install_io(0x00d8, 0x00df, read8_delegate(FUNC(pc9801_amd98_device::read), this), write8_delegate(FUNC(pc9801_amd98_device::write), this) ); + m_bus->install_io(0x00d8, 0x00df, read8_delegate(*this, FUNC(pc9801_amd98_device::read)), write8_delegate(*this, FUNC(pc9801_amd98_device::write))); // Thexder access with following - m_bus->install_io(0x38d8, 0x38df, read8_delegate(FUNC(pc9801_amd98_device::read), this), write8_delegate(FUNC(pc9801_amd98_device::write), this) ); + m_bus->install_io(0x38d8, 0x38df, read8_delegate(*this, FUNC(pc9801_amd98_device::read)), write8_delegate(*this, FUNC(pc9801_amd98_device::write))); } @@ -154,7 +154,7 @@ READ8_MEMBER(pc9801_amd98_device::read) return m_ay2->data_r(); } - printf("%02x\n",offset); + logerror("%02x\n",offset); return 0xff; } @@ -176,7 +176,7 @@ WRITE8_MEMBER(pc9801_amd98_device::write) m_ay2->data_w(data); break; default: - printf("%02x %02x\n",offset,data); + logerror("%02x %02x\n",offset,data); } } @@ -191,11 +191,11 @@ WRITE8_MEMBER(pc9801_amd98_device::ay3_data_latch_w) switch(data) { case 0x47: - //printf("%02x addr\n",m_ay3_latch); + //logerror("%02x addr\n",m_ay3_latch); m_ay3->address_w(m_ay3_latch); break; case 0x43: - //printf("%02x data\n",m_ay3_latch); + //logerror("%02x data\n",m_ay3_latch); m_ay3->data_w(m_ay3_latch); break; } diff --git a/src/devices/bus/cgenie/expansion/floppy.cpp b/src/devices/bus/cgenie/expansion/floppy.cpp index a25e49c7019..6238aaa936f 100644 --- a/src/devices/bus/cgenie/expansion/floppy.cpp +++ b/src/devices/bus/cgenie/expansion/floppy.cpp @@ -97,7 +97,7 @@ void cgenie_fdc_device::device_add_mconfig(machine_config &config) // SOFTWARE_LIST(config, "floppy_list").set_original("cgenie_flop"); - GENERIC_SOCKET(config, "socket", generic_plain_slot, "cgenie_flop_rom", "bin,rom").set_device_load(FUNC(cgenie_fdc_device::socket_load), this); + GENERIC_SOCKET(config, "socket", generic_plain_slot, "cgenie_flop_rom", "bin,rom").set_device_load(FUNC(cgenie_fdc_device::socket_load)); SOFTWARE_LIST(config, "rom_list").set_original("cgenie_flop_rom"); } @@ -147,9 +147,7 @@ void cgenie_fdc_device::device_reset() // map extra socket if (m_socket->exists()) - { - m_slot->m_program->install_read_handler(0xe000, 0xefff, read8sm_delegate(FUNC(generic_slot_device::read_rom), (generic_slot_device *) m_socket)); - } + m_slot->m_program->install_read_handler(0xe000, 0xefff, read8sm_delegate(*m_socket, FUNC(generic_slot_device::read_rom))); } diff --git a/src/devices/bus/coco/coco_dcmodem.cpp b/src/devices/bus/coco/coco_dcmodem.cpp index ab6ba20a622..4344314604b 100644 --- a/src/devices/bus/coco/coco_dcmodem.cpp +++ b/src/devices/bus/coco/coco_dcmodem.cpp @@ -59,8 +59,8 @@ namespace virtual void device_start() override { install_readwrite_handler(0xFF6C, 0xFF6F, - read8sm_delegate(FUNC(mos6551_device::read), (mos6551_device *)m_uart), - write8sm_delegate(FUNC(mos6551_device::write), (mos6551_device *)m_uart)); + read8sm_delegate(*m_uart, FUNC(mos6551_device::read)), + write8sm_delegate(*m_uart, FUNC(mos6551_device::write))); } virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/coco/coco_multi.cpp b/src/devices/bus/coco/coco_multi.cpp index d6c5627ca11..a6705a7b751 100644 --- a/src/devices/bus/coco/coco_multi.cpp +++ b/src/devices/bus/coco/coco_multi.cpp @@ -252,7 +252,7 @@ coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const void coco_multipak_device::device_start() { // install $FF7F handler - install_readwrite_handler(0xFF7F, 0xFF7F, read8_delegate(FUNC(coco_multipak_device::ff7f_read), this),write8_delegate(FUNC(coco_multipak_device::ff7f_write), this)); + install_readwrite_handler(0xFF7F, 0xFF7F, read8_delegate(*this, FUNC(coco_multipak_device::ff7f_read)), write8_delegate(*this, FUNC(coco_multipak_device::ff7f_write))); // initial state m_select = 0xFF; diff --git a/src/devices/bus/coco/coco_orch90.cpp b/src/devices/bus/coco/coco_orch90.cpp index e7506be7c2b..384dd2b76d9 100644 --- a/src/devices/bus/coco/coco_orch90.cpp +++ b/src/devices/bus/coco/coco_orch90.cpp @@ -75,8 +75,8 @@ namespace virtual void device_start() override { // install handlers - install_write_handler(0xFF7A, 0xFF7A, write8_delegate(FUNC(coco_orch90_device::write_left), this)); - install_write_handler(0xFF7B, 0xFF7B, write8_delegate(FUNC(coco_orch90_device::write_right), this)); + install_write_handler(0xFF7A, 0xFF7A, write8_delegate(*this, FUNC(coco_orch90_device::write_left))); + install_write_handler(0xFF7B, 0xFF7B, write8_delegate(*this, FUNC(coco_orch90_device::write_right))); // Orch-90 ties CART to Q set_line_value(line::CART, line_value::Q); diff --git a/src/devices/bus/coco/coco_rs232.cpp b/src/devices/bus/coco/coco_rs232.cpp index 5668034b80d..31da94f3e4f 100644 --- a/src/devices/bus/coco/coco_rs232.cpp +++ b/src/devices/bus/coco/coco_rs232.cpp @@ -57,8 +57,8 @@ namespace virtual void device_start() override { install_readwrite_handler(0xFF68, 0xFF6B, - read8sm_delegate(FUNC(mos6551_device::read), (mos6551_device *)m_uart), - write8sm_delegate(FUNC(mos6551_device::write), (mos6551_device *)m_uart)); + read8sm_delegate(*m_uart, FUNC(mos6551_device::read)), + write8sm_delegate(*m_uart, FUNC(mos6551_device::write))); } virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/coco/coco_ssc.cpp b/src/devices/bus/coco/coco_ssc.cpp index 6dcd34a8f03..cc50f7cf6ad 100644 --- a/src/devices/bus/coco/coco_ssc.cpp +++ b/src/devices/bus/coco/coco_ssc.cpp @@ -211,9 +211,9 @@ coco_ssc_device::coco_ssc_device(const machine_config &mconfig, const char *tag, void coco_ssc_device::device_start() { // install $FF7D-E handler - write8_delegate wh = write8_delegate(FUNC(coco_ssc_device::ff7d_write), this); - read8_delegate rh = read8_delegate(FUNC(coco_ssc_device::ff7d_read), this); - install_readwrite_handler(0xFF7D, 0xFF7E, rh, wh); + install_readwrite_handler(0xFF7D, 0xFF7E, + read8_delegate(*this, FUNC(coco_ssc_device::ff7d_read)), + write8_delegate(*this, FUNC(coco_ssc_device::ff7d_write))); save_item(NAME(m_reset_line)); save_item(NAME(m_tms7000_busy)); diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp index 745606875f0..ebf7e1f271e 100644 --- a/src/devices/bus/comx35/clm.cpp +++ b/src/devices/bus/comx35/clm.cpp @@ -153,7 +153,7 @@ void comx_clm_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(MC6845_SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(comx_clm_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(comx_clm_device::crtc_update_row)); } diff --git a/src/devices/bus/cpc/amdrum.cpp b/src/devices/bus/cpc/amdrum.cpp index 587577edf52..a9c612b4870 100644 --- a/src/devices/bus/cpc/amdrum.cpp +++ b/src/devices/bus/cpc/amdrum.cpp @@ -51,7 +51,7 @@ void cpc_amdrum_device::device_start() { m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_write_handler(0xff00,0xffff,write8_delegate(FUNC(cpc_amdrum_device::dac_w),this)); + space.install_write_handler(0xff00,0xffff, write8_delegate(*this, FUNC(cpc_amdrum_device::dac_w))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/brunword4.cpp b/src/devices/bus/cpc/brunword4.cpp index db5e8e1b57d..914ada94f15 100644 --- a/src/devices/bus/cpc/brunword4.cpp +++ b/src/devices/bus/cpc/brunword4.cpp @@ -74,7 +74,7 @@ void cpc_brunword4_device::device_start() { m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_write_handler(0xdf00,0xdfff,write8_delegate(FUNC(cpc_brunword4_device::rombank_w),this)); + space.install_write_handler(0xdf00,0xdfff, write8_delegate(*this, FUNC(cpc_brunword4_device::rombank_w))); } void cpc_brunword4_device::device_reset() diff --git a/src/devices/bus/cpc/cpc_pds.cpp b/src/devices/bus/cpc/cpc_pds.cpp index 0509ab866dc..43f1fc2cd05 100644 --- a/src/devices/bus/cpc/cpc_pds.cpp +++ b/src/devices/bus/cpc/cpc_pds.cpp @@ -33,7 +33,7 @@ cpc_pds_device::cpc_pds_device(const machine_config &mconfig, const char *tag, d device_t(mconfig, CPC_PDS, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), - m_pio(*this,"pio") + m_pio(*this, "pio") { } @@ -46,7 +46,7 @@ void cpc_pds_device::device_start() m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_readwrite_handler(0xfbec,0xfbef,read8_delegate(FUNC(cpc_pds_device::pio_r),this),write8_delegate(FUNC(cpc_pds_device::pio_w),this)); + space.install_readwrite_handler(0xfbec,0xfbef, read8_delegate(*this, FUNC(cpc_pds_device::pio_r)), write8_delegate(*this, FUNC(cpc_pds_device::pio_w))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/cpc_rs232.cpp b/src/devices/bus/cpc/cpc_rs232.cpp index 40fc0853539..d360175cba4 100644 --- a/src/devices/bus/cpc/cpc_rs232.cpp +++ b/src/devices/bus/cpc/cpc_rs232.cpp @@ -106,8 +106,8 @@ void cpc_rs232_device::device_start() m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_readwrite_handler(0xfadc,0xfadf,read8_delegate(FUNC(cpc_rs232_device::dart_r),this),write8_delegate(FUNC(cpc_rs232_device::dart_w),this)); - space.install_readwrite_handler(0xfbdc,0xfbdf,read8_delegate(FUNC(cpc_rs232_device::pit_r),this),write8_delegate(FUNC(cpc_rs232_device::pit_w),this)); + space.install_readwrite_handler(0xfadc,0xfadf, read8_delegate(*this, FUNC(cpc_rs232_device::dart_r)), write8_delegate(*this, FUNC(cpc_rs232_device::dart_w))); + space.install_readwrite_handler(0xfbdc,0xfbdf, read8_delegate(*this, FUNC(cpc_rs232_device::pit_r)), write8_delegate(*this, FUNC(cpc_rs232_device::pit_w))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/cpc_ssa1.cpp b/src/devices/bus/cpc/cpc_ssa1.cpp index bdfedce16ed..c009cc5a4e6 100644 --- a/src/devices/bus/cpc/cpc_ssa1.cpp +++ b/src/devices/bus/cpc/cpc_ssa1.cpp @@ -177,8 +177,8 @@ void cpc_ssa1_device::device_start() m_rom = memregion("sp0256")->base(); - space.install_readwrite_handler(0xfaee,0xfaee,read8_delegate(FUNC(cpc_ssa1_device::ssa1_r),this),write8_delegate(FUNC(cpc_ssa1_device::ssa1_w),this)); - space.install_readwrite_handler(0xfbee,0xfbee,read8_delegate(FUNC(cpc_ssa1_device::ssa1_r),this),write8_delegate(FUNC(cpc_ssa1_device::ssa1_w),this)); + space.install_readwrite_handler(0xfaee,0xfaee, read8_delegate(*this, FUNC(cpc_ssa1_device::ssa1_r)), write8_delegate(*this, FUNC(cpc_ssa1_device::ssa1_w))); + space.install_readwrite_handler(0xfbee,0xfbee, read8_delegate(*this, FUNC(cpc_ssa1_device::ssa1_r)), write8_delegate(*this, FUNC(cpc_ssa1_device::ssa1_w))); } void cpc_dkspeech_device::device_start() @@ -188,7 +188,7 @@ void cpc_dkspeech_device::device_start() m_rom = memregion("sp0256")->base(); - space.install_readwrite_handler(0xfbfe,0xfbfe,read8_delegate(FUNC(cpc_dkspeech_device::dkspeech_r),this),write8_delegate(FUNC(cpc_dkspeech_device::dkspeech_w),this)); + space.install_readwrite_handler(0xfbfe,0xfbfe, read8_delegate(*this, FUNC(cpc_dkspeech_device::dkspeech_r)), write8_delegate(*this, FUNC(cpc_dkspeech_device::dkspeech_w))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/ddi1.cpp b/src/devices/bus/cpc/ddi1.cpp index 76e09d36f34..c835a8e547f 100644 --- a/src/devices/bus/cpc/ddi1.cpp +++ b/src/devices/bus/cpc/ddi1.cpp @@ -75,9 +75,9 @@ void cpc_ddi1_device::device_start() m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_write_handler(0xfa7e,0xfa7f,write8_delegate(FUNC(cpc_ddi1_device::motor_w),this)); - space.install_readwrite_handler(0xfb7e,0xfb7f,read8_delegate(FUNC(cpc_ddi1_device::fdc_r),this),write8_delegate(FUNC(cpc_ddi1_device::fdc_w),this)); - space.install_write_handler(0xdf00,0xdfff,write8_delegate(FUNC(cpc_ddi1_device::rombank_w),this)); + space.install_write_handler(0xfa7e,0xfa7f, write8_delegate(*this, FUNC(cpc_ddi1_device::motor_w))); + space.install_readwrite_handler(0xfb7e,0xfb7f, read8_delegate(*this, FUNC(cpc_ddi1_device::fdc_r)), write8_delegate(*this, FUNC(cpc_ddi1_device::fdc_w))); + space.install_write_handler(0xdf00,0xdfff, write8_delegate(*this, FUNC(cpc_ddi1_device::rombank_w))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/doubler.cpp b/src/devices/bus/cpc/doubler.cpp index e9ed2e5b5f4..ff2d9988f31 100644 --- a/src/devices/bus/cpc/doubler.cpp +++ b/src/devices/bus/cpc/doubler.cpp @@ -46,7 +46,7 @@ void cpc_doubler_device::device_start() { m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_read_handler(0xf0e0,0xf0e0,read8_delegate(FUNC(cpc_doubler_device::ext_tape_r),this)); + space.install_read_handler(0xf0e0,0xf0e0, read8_delegate(*this, FUNC(cpc_doubler_device::ext_tape_r))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/hd20.cpp b/src/devices/bus/cpc/hd20.cpp index c13ffca6b4b..582a61df262 100644 --- a/src/devices/bus/cpc/hd20.cpp +++ b/src/devices/bus/cpc/hd20.cpp @@ -46,7 +46,7 @@ const tiny_rom_entry *cpc_hd20_device::device_rom_region() const cpc_hd20_device::cpc_hd20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, CPC_HD20, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), - m_hdc(*this,"hdc") + m_hdc(*this, "hdc") { } @@ -58,8 +58,8 @@ void cpc_hd20_device::device_start() { m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_write_handler(0xfbe0,0xfbe4,write8_delegate(FUNC(cpc_hd20_device::hdc_w),this)); - space.install_read_handler(0xfbe0,0xfbe4,read8_delegate(FUNC(cpc_hd20_device::hdc_r),this)); + space.install_write_handler(0xfbe0,0xfbe4, write8_delegate(*this, FUNC(cpc_hd20_device::hdc_w))); + space.install_read_handler(0xfbe0,0xfbe4, read8_delegate(*this, FUNC(cpc_hd20_device::hdc_r))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp index 1a85915dca1..a9c06b3f123 100644 --- a/src/devices/bus/cpc/magicsound.cpp +++ b/src/devices/bus/cpc/magicsound.cpp @@ -89,10 +89,10 @@ void al_magicsound_device::device_start() { m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_readwrite_handler(0xf8d0,0xf8df,read8_delegate(FUNC(al_magicsound_device::dmac_r),this),write8_delegate(FUNC(al_magicsound_device::dmac_w),this)); - space.install_write_handler(0xf9d0,0xf9df,write8_delegate(FUNC(al_magicsound_device::timer_w),this)); - space.install_write_handler(0xfad0,0xfadf,write8_delegate(FUNC(al_magicsound_device::volume_w),this)); - space.install_write_handler(0xfbd0,0xfbdf,write8_delegate(FUNC(al_magicsound_device::mapper_w),this)); + space.install_readwrite_handler(0xf8d0,0xf8df, read8_delegate(*this, FUNC(al_magicsound_device::dmac_r)), write8_delegate(*this, FUNC(al_magicsound_device::dmac_w))); + space.install_write_handler(0xf9d0,0xf9df, write8_delegate(*this, FUNC(al_magicsound_device::timer_w))); + space.install_write_handler(0xfad0,0xfadf, write8_delegate(*this, FUNC(al_magicsound_device::volume_w))); + space.install_write_handler(0xfbd0,0xfbdf, write8_delegate(*this, FUNC(al_magicsound_device::mapper_w))); m_ramptr = machine().device<ram_device>(":" RAM_TAG); diff --git a/src/devices/bus/cpc/musicmachine.cpp b/src/devices/bus/cpc/musicmachine.cpp index 4d43f20c1fe..90361578851 100644 --- a/src/devices/bus/cpc/musicmachine.cpp +++ b/src/devices/bus/cpc/musicmachine.cpp @@ -61,9 +61,9 @@ void cpc_musicmachine_device::device_start() m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_write_handler(0xf8e8,0xf8e8,write8_delegate(FUNC(cpc_musicmachine_device::irqsel_w),this)); - space.install_readwrite_handler(0xf8ec,0xf8ef,read8_delegate(FUNC(cpc_musicmachine_device::acia_r), this),write8_delegate(FUNC(cpc_musicmachine_device::acia_w),this)); - space.install_write_handler(0xf8f0,0xf8f0,write8_delegate(FUNC(cpc_musicmachine_device::dac_w),this)); + space.install_write_handler(0xf8e8,0xf8e8, write8_delegate(*this, FUNC(cpc_musicmachine_device::irqsel_w))); + space.install_readwrite_handler(0xf8ec,0xf8ef, read8_delegate(*this, FUNC(cpc_musicmachine_device::acia_r)), write8_delegate(*this, FUNC(cpc_musicmachine_device::acia_w))); + space.install_write_handler(0xf8f0,0xf8f0, write8_delegate(*this, FUNC(cpc_musicmachine_device::dac_w))); // 0xf8f4 - ADC read8_delegate // 0xf8f8 - ADC start } diff --git a/src/devices/bus/cpc/playcity.cpp b/src/devices/bus/cpc/playcity.cpp index 7d444abb03b..4a11189aacb 100644 --- a/src/devices/bus/cpc/playcity.cpp +++ b/src/devices/bus/cpc/playcity.cpp @@ -69,11 +69,11 @@ void cpc_playcity_device::device_start() m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_readwrite_handler(0xf880,0xf883,read8_delegate(FUNC(cpc_playcity_device::ctc_r),this),write8_delegate(FUNC(cpc_playcity_device::ctc_w),this)); - space.install_readwrite_handler(0xf884,0xf884,read8_delegate(FUNC(cpc_playcity_device::ymz1_data_r),this),write8_delegate(FUNC(cpc_playcity_device::ymz1_data_w),this)); - space.install_readwrite_handler(0xf888,0xf888,read8_delegate(FUNC(cpc_playcity_device::ymz2_data_r),this),write8_delegate(FUNC(cpc_playcity_device::ymz2_data_w),this)); - space.install_write_handler(0xf984,0xf984,write8_delegate(FUNC(cpc_playcity_device::ymz1_address_w),this)); - space.install_write_handler(0xf988,0xf988,write8_delegate(FUNC(cpc_playcity_device::ymz2_address_w),this)); + space.install_readwrite_handler(0xf880,0xf883, read8_delegate(*this, FUNC(cpc_playcity_device::ctc_r)), write8_delegate(*this, FUNC(cpc_playcity_device::ctc_w))); + space.install_readwrite_handler(0xf884,0xf884, read8_delegate(*this, FUNC(cpc_playcity_device::ymz1_data_r)), write8_delegate(*this, FUNC(cpc_playcity_device::ymz1_data_w))); + space.install_readwrite_handler(0xf888,0xf888, read8_delegate(*this, FUNC(cpc_playcity_device::ymz2_data_r)), write8_delegate(*this, FUNC(cpc_playcity_device::ymz2_data_w))); + space.install_write_handler(0xf984,0xf984, write8_delegate(*this, FUNC(cpc_playcity_device::ymz1_address_w))); + space.install_write_handler(0xf988,0xf988, write8_delegate(*this, FUNC(cpc_playcity_device::ymz2_address_w))); } //------------------------------------------------- diff --git a/src/devices/bus/cpc/smartwatch.cpp b/src/devices/bus/cpc/smartwatch.cpp index 272b7ca953e..5b4e63df728 100644 --- a/src/devices/bus/cpc/smartwatch.cpp +++ b/src/devices/bus/cpc/smartwatch.cpp @@ -63,8 +63,8 @@ void cpc_smartwatch_device::device_start() void cpc_smartwatch_device::device_reset() { address_space &space = m_slot->cpu().space(AS_PROGRAM); - space.install_read_handler(0xc000,0xc001,read8_delegate(FUNC(cpc_smartwatch_device::rtc_w),this)); - space.install_read_handler(0xc004,0xc004,read8_delegate(FUNC(cpc_smartwatch_device::rtc_r),this)); + space.install_read_handler(0xc000,0xc001, read8_delegate(*this, FUNC(cpc_smartwatch_device::rtc_w))); + space.install_read_handler(0xc004,0xc004, read8_delegate(*this, FUNC(cpc_smartwatch_device::rtc_r))); m_bank = membank(":bank7"); } diff --git a/src/devices/bus/cpc/symbfac2.cpp b/src/devices/bus/cpc/symbfac2.cpp index a59a73bf72e..8710717de6c 100644 --- a/src/devices/bus/cpc/symbfac2.cpp +++ b/src/devices/bus/cpc/symbfac2.cpp @@ -90,11 +90,11 @@ void cpc_symbiface2_device::device_start() { m_slot = dynamic_cast<cpc_expansion_slot_device *>(owner()); address_space &space = m_slot->cpu().space(AS_IO); - space.install_readwrite_handler(0xfd00,0xfd07,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs1_w),this)); - space.install_readwrite_handler(0xfd08,0xfd0f,read8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_r),this),write8_delegate(FUNC(cpc_symbiface2_device::ide_cs0_w),this)); - space.install_read_handler(0xfd10,0xfd10,read8_delegate(FUNC(cpc_symbiface2_device::mouse_r),this)); - space.install_readwrite_handler(0xfd14,0xfd15,read8_delegate(FUNC(cpc_symbiface2_device::rtc_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rtc_w),this)); - space.install_readwrite_handler(0xfd17,0xfd17,read8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_r),this),write8_delegate(FUNC(cpc_symbiface2_device::rom_rewrite_w),this)); + space.install_readwrite_handler(0xfd00,0xfd07, read8_delegate(*this, FUNC(cpc_symbiface2_device::ide_cs1_r)), write8_delegate(*this, FUNC(cpc_symbiface2_device::ide_cs1_w))); + space.install_readwrite_handler(0xfd08,0xfd0f, read8_delegate(*this, FUNC(cpc_symbiface2_device::ide_cs0_r)), write8_delegate(*this, FUNC(cpc_symbiface2_device::ide_cs0_w))); + space.install_read_handler(0xfd10,0xfd10, read8_delegate(*this, FUNC(cpc_symbiface2_device::mouse_r))); + space.install_readwrite_handler(0xfd14,0xfd15, read8_delegate(*this, FUNC(cpc_symbiface2_device::rtc_r)), write8_delegate(*this, FUNC(cpc_symbiface2_device::rtc_w))); + space.install_readwrite_handler(0xfd17,0xfd17, read8_delegate(*this, FUNC(cpc_symbiface2_device::rom_rewrite_r)), write8_delegate(*this, FUNC(cpc_symbiface2_device::rom_rewrite_w))); // set up ROM space (these can be writable, when mapped to &4000, or completely disabled, allowing the built-in ROMs to be visible) // 32 banks of 16kB (512kB) diff --git a/src/devices/bus/cpc/transtape.cpp b/src/devices/bus/cpc/transtape.cpp index 78ec1f15c72..3b3d29e53c0 100644 --- a/src/devices/bus/cpc/transtape.cpp +++ b/src/devices/bus/cpc/transtape.cpp @@ -63,8 +63,8 @@ void cpc_transtape_device::device_start() m_ram = make_unique_clear<uint8_t[]>(0x2000); - m_space->install_write_handler(0xfbf0,0xfbf0,write8_delegate(FUNC(cpc_transtape_device::output_w),this)); - m_space->install_read_handler(0xfbff,0xfbff,read8_delegate(FUNC(cpc_transtape_device::input_r),this)); + m_space->install_write_handler(0xfbf0,0xfbf0, write8_delegate(*this, FUNC(cpc_transtape_device::output_w))); + m_space->install_read_handler(0xfbff,0xfbff, read8_delegate(*this, FUNC(cpc_transtape_device::input_r))); } //------------------------------------------------- diff --git a/src/devices/bus/dmv/k220.cpp b/src/devices/bus/dmv/k220.cpp index 4ba32c77950..9251d453e57 100644 --- a/src/devices/bus/dmv/k220.cpp +++ b/src/devices/bus/dmv/k220.cpp @@ -140,8 +140,8 @@ dmv_k220_device::dmv_k220_device(const machine_config &mconfig, const char *tag, void dmv_k220_device::device_start() { address_space &space = *m_bus->m_iospace; - space.install_readwrite_handler(0x08, 0x0b, read8sm_delegate(FUNC(pit8253_device::read), &(*m_pit)), write8sm_delegate(FUNC(pit8253_device::write), &(*m_pit)), 0); - space.install_readwrite_handler(0x0c, 0x0f, read8sm_delegate(FUNC(i8255_device::read), &(*m_ppi)), write8sm_delegate(FUNC(i8255_device::write), &(*m_ppi)), 0); + space.install_readwrite_handler(0x08, 0x0b, read8sm_delegate(*m_pit, FUNC(pit8253_device::read)), write8sm_delegate(*m_pit, FUNC(pit8253_device::write)), 0); + space.install_readwrite_handler(0x0c, 0x0f, read8sm_delegate(*m_ppi, FUNC(i8255_device::read)), write8sm_delegate(*m_ppi, FUNC(i8255_device::write)), 0); m_digits.resolve(); diff --git a/src/devices/bus/dmv/k230.cpp b/src/devices/bus/dmv/k230.cpp index a58ced0492a..8c1d6e43ac3 100644 --- a/src/devices/bus/dmv/k230.cpp +++ b/src/devices/bus/dmv/k230.cpp @@ -148,7 +148,7 @@ void dmv_k230_device::device_start() void dmv_k234_device::device_start() { dmv_k230_device::device_start(); - m_bus->m_iospace->install_readwrite_handler(0xd8, 0xdf, read8_delegate(FUNC(dmv_k234_device::snr_r), this), write8_delegate(FUNC(dmv_k234_device::snr_w), this), 0); + m_bus->m_iospace->install_readwrite_handler(0xd8, 0xdf, read8_delegate(*this, FUNC(dmv_k234_device::snr_r)), write8_delegate(*this, FUNC(dmv_k234_device::snr_w)), 0); // register for state saving save_item(NAME(m_snr)); diff --git a/src/devices/bus/dmv/k806.cpp b/src/devices/bus/dmv/k806.cpp index 7daa744b3ff..87a0002c091 100644 --- a/src/devices/bus/dmv/k806.cpp +++ b/src/devices/bus/dmv/k806.cpp @@ -119,7 +119,7 @@ void dmv_k806_device::device_add_mconfig(machine_config &config) m_mcu->p2_out_cb().set(FUNC(dmv_k806_device::port2_w)); m_mcu->t1_in_cb().set(FUNC(dmv_k806_device::portt1_r)); - TIMER(config, "mouse_timer", 0).configure_periodic(timer_device::expired_delegate(FUNC(dmv_k806_device::mouse_timer), this), attotime::from_hz(1000)); + TIMER(config, "mouse_timer", 0).configure_periodic(FUNC(dmv_k806_device::mouse_timer), attotime::from_hz(1000)); } //------------------------------------------------- diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp index f7abc75aac5..1fcedf58ccc 100644 --- a/src/devices/bus/ecbbus/grip.cpp +++ b/src/devices/bus/ecbbus/grip.cpp @@ -435,7 +435,7 @@ void ecb_grip21_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(ecb_grip21_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(ecb_grip21_device::crtc_update_row)); m_crtc->out_de_callback().set(m_sti, FUNC(z80sti_device::i1_w)); m_crtc->out_cur_callback().set(m_sti, FUNC(z80sti_device::i1_w)); diff --git a/src/devices/bus/einstein/pipe/silicon_disc.cpp b/src/devices/bus/einstein/pipe/silicon_disc.cpp index b9017cd6e56..ff4ac92a910 100644 --- a/src/devices/bus/einstein/pipe/silicon_disc.cpp +++ b/src/devices/bus/einstein/pipe/silicon_disc.cpp @@ -87,8 +87,8 @@ void einstein_silicon_disc_device::device_reset() // install i/o ports io_space().install_device(0xf0, 0xff, *this, &einstein_silicon_disc_device::map); io_space().install_readwrite_handler(0xfa, 0xfa, 0, 0, 0xff00, - read8_delegate(FUNC(einstein_silicon_disc_device::ram_r), this), - write8_delegate(FUNC(einstein_silicon_disc_device::ram_w), this)); + read8_delegate(*this, FUNC(einstein_silicon_disc_device::ram_r)), + write8_delegate(*this, FUNC(einstein_silicon_disc_device::ram_w))); } diff --git a/src/devices/bus/einstein/pipe/speculator.cpp b/src/devices/bus/einstein/pipe/speculator.cpp index ed35973ab12..c4afaa4ac2d 100644 --- a/src/devices/bus/einstein/pipe/speculator.cpp +++ b/src/devices/bus/einstein/pipe/speculator.cpp @@ -97,18 +97,18 @@ void einstein_speculator_device::device_reset() { // ram: range 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0xbf, 0xdf, 0xff io_space().install_readwrite_handler(0x1f, 0x1f, 0, 0, 0xffe0, - read8_delegate(FUNC(einstein_speculator_device::ram_r), this), - write8_delegate(FUNC(einstein_speculator_device::ram_w), this)); + read8_delegate(*this, FUNC(einstein_speculator_device::ram_r)), + write8_delegate(*this, FUNC(einstein_speculator_device::ram_w))); // ram: range 0x60 - 0xff io_space().install_readwrite_handler(0x60, 0x60, 0, 0, 0xff9f, - read8_delegate(FUNC(einstein_speculator_device::ram_r), this), - write8_delegate(FUNC(einstein_speculator_device::ram_w), this)); + read8_delegate(*this, FUNC(einstein_speculator_device::ram_r)), + write8_delegate(*this, FUNC(einstein_speculator_device::ram_w))); // tape read/nmi write register: range 0xff io_space().install_readwrite_handler(0xff, 0xff, 0, 0, 0xff00, - read8_delegate(FUNC(einstein_speculator_device::tape_r), this), - write8_delegate(FUNC(einstein_speculator_device::nmi_w), this)); + read8_delegate(*this, FUNC(einstein_speculator_device::tape_r)), + write8_delegate(*this, FUNC(einstein_speculator_device::nmi_w))); } diff --git a/src/devices/bus/einstein/pipe/tk02.cpp b/src/devices/bus/einstein/pipe/tk02.cpp index 0564a5eaaad..5f0a38ed27b 100644 --- a/src/devices/bus/einstein/pipe/tk02.cpp +++ b/src/devices/bus/einstein/pipe/tk02.cpp @@ -111,7 +111,7 @@ void tk02_device::device_add_mconfig(machine_config &config) m_crtc->set_screen("mono"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(tk02_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(tk02_device::crtc_update_row)); m_crtc->out_de_callback().set(FUNC(tk02_device::de_w)); TATUNG_PIPE(config, m_pipe, DERIVED_CLOCK(1, 1), tatung_pipe_cards, nullptr); @@ -160,7 +160,7 @@ void tk02_device::device_start() void tk02_device::device_reset() { io_space().install_device(0x40, 0x4f, *this, &tk02_device::map); - io_space().install_readwrite_handler(0x40, 0x47, 0, 0, 0xff00, read8_delegate(FUNC(tk02_device::ram_r), this), write8_delegate(FUNC(tk02_device::ram_w), this)); + io_space().install_readwrite_handler(0x40, 0x47, 0, 0, 0xff00, read8_delegate(*this, FUNC(tk02_device::ram_r)), write8_delegate(*this, FUNC(tk02_device::ram_w))); } diff --git a/src/devices/bus/electron/cart/ap5.cpp b/src/devices/bus/electron/cart/ap5.cpp index e72e9ac4e25..2929374cd48 100644 --- a/src/devices/bus/electron/cart/ap5.cpp +++ b/src/devices/bus/electron/cart/ap5.cpp @@ -26,9 +26,9 @@ void electron_ap5_device::device_add_mconfig(machine_config &config) { /* rom sockets */ GENERIC_SOCKET(config, m_romslot[0], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 14 - m_romslot[0]->set_device_load(FUNC(electron_ap5_device::rom1_load), this); + m_romslot[0]->set_device_load(FUNC(electron_ap5_device::rom1_load)); GENERIC_SOCKET(config, m_romslot[1], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 15 - m_romslot[1]->set_device_load(FUNC(electron_ap5_device::rom2_load), this); + m_romslot[1]->set_device_load(FUNC(electron_ap5_device::rom2_load)); /* via */ VIA6522(config, m_via, DERIVED_CLOCK(1, 16)); diff --git a/src/devices/bus/electron/cart/romp144.cpp b/src/devices/bus/electron/cart/romp144.cpp index 14853d86949..de947454fd8 100644 --- a/src/devices/bus/electron/cart/romp144.cpp +++ b/src/devices/bus/electron/cart/romp144.cpp @@ -26,19 +26,19 @@ void electron_romp144_device::device_add_mconfig(machine_config &config) { /* rom sockets */ GENERIC_SOCKET(config, m_romslot[0], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[0]->set_device_load(FUNC(electron_romp144_device::rom0), this); + m_romslot[0]->set_device_load(FUNC(electron_romp144_device::rom0)); GENERIC_SOCKET(config, m_romslot[1], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[1]->set_device_load(FUNC(electron_romp144_device::rom1), this); + m_romslot[1]->set_device_load(FUNC(electron_romp144_device::rom1)); GENERIC_SOCKET(config, m_romslot[2], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[2]->set_device_load(FUNC(electron_romp144_device::rom2), this); + m_romslot[2]->set_device_load(FUNC(electron_romp144_device::rom2)); GENERIC_SOCKET(config, m_romslot[3], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[3]->set_device_load(FUNC(electron_romp144_device::rom3), this); + m_romslot[3]->set_device_load(FUNC(electron_romp144_device::rom3)); GENERIC_SOCKET(config, m_romslot[4], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[4]->set_device_load(FUNC(electron_romp144_device::rom4), this); + m_romslot[4]->set_device_load(FUNC(electron_romp144_device::rom4)); GENERIC_SOCKET(config, m_romslot[5], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[5]->set_device_load(FUNC(electron_romp144_device::rom5), this); + m_romslot[5]->set_device_load(FUNC(electron_romp144_device::rom5)); GENERIC_SOCKET(config, m_romslot[6], generic_plain_slot, "electron_rom", "bin,rom"); - m_romslot[6]->set_device_load(FUNC(electron_romp144_device::rom6), this); + m_romslot[6]->set_device_load(FUNC(electron_romp144_device::rom6)); } //************************************************************************** diff --git a/src/devices/bus/electron/plus2.cpp b/src/devices/bus/electron/plus2.cpp index dd8be6e09eb..bb7d1342ebc 100644 --- a/src/devices/bus/electron/plus2.cpp +++ b/src/devices/bus/electron/plus2.cpp @@ -33,11 +33,11 @@ void electron_plus2_device::device_add_mconfig(machine_config &config) { /* rom sockets */ GENERIC_SOCKET(config, m_rom[0], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 13 - m_rom[0]->set_device_load(FUNC(electron_plus2_device::rom1_load), this); + m_rom[0]->set_device_load(FUNC(electron_plus2_device::rom1_load)); GENERIC_SOCKET(config, m_rom[1], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 14 - m_rom[1]->set_device_load(FUNC(electron_plus2_device::rom2_load), this); + m_rom[1]->set_device_load(FUNC(electron_plus2_device::rom2_load)); GENERIC_SOCKET(config, m_rom[2], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 15 - m_rom[2]->set_device_load(FUNC(electron_plus2_device::rom3_load), this); + m_rom[2]->set_device_load(FUNC(electron_plus2_device::rom3_load)); /* cartridges */ ELECTRON_CARTSLOT(config, m_cart[0], DERIVED_CLOCK(1, 1), electron_cart, nullptr); diff --git a/src/devices/bus/electron/rombox.cpp b/src/devices/bus/electron/rombox.cpp index 05d0a7c9092..920419c2d66 100644 --- a/src/devices/bus/electron/rombox.cpp +++ b/src/devices/bus/electron/rombox.cpp @@ -55,21 +55,21 @@ void electron_rombox_device::device_add_mconfig(machine_config &config) { /* rom sockets */ GENERIC_SOCKET(config, m_rom[0], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[0]->set_device_load(FUNC(electron_rombox_device::rom1_load), this); + m_rom[0]->set_device_load(FUNC(electron_rombox_device::rom1_load)); GENERIC_SOCKET(config, m_rom[1], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[1]->set_device_load(FUNC(electron_rombox_device::rom2_load), this); + m_rom[1]->set_device_load(FUNC(electron_rombox_device::rom2_load)); GENERIC_SOCKET(config, m_rom[2], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[2]->set_device_load(FUNC(electron_rombox_device::rom3_load), this); + m_rom[2]->set_device_load(FUNC(electron_rombox_device::rom3_load)); GENERIC_SOCKET(config, m_rom[3], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[3]->set_device_load(FUNC(electron_rombox_device::rom4_load), this); + m_rom[3]->set_device_load(FUNC(electron_rombox_device::rom4_load)); GENERIC_SOCKET(config, m_rom[4], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[4]->set_device_load(FUNC(electron_rombox_device::rom5_load), this); + m_rom[4]->set_device_load(FUNC(electron_rombox_device::rom5_load)); GENERIC_SOCKET(config, m_rom[5], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[5]->set_device_load(FUNC(electron_rombox_device::rom6_load), this); + m_rom[5]->set_device_load(FUNC(electron_rombox_device::rom6_load)); GENERIC_SOCKET(config, m_rom[6], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[6]->set_device_load(FUNC(electron_rombox_device::rom7_load), this); + m_rom[6]->set_device_load(FUNC(electron_rombox_device::rom7_load)); GENERIC_SOCKET(config, m_rom[7], generic_plain_slot, "electron_rom", "bin,rom"); - m_rom[7]->set_device_load(FUNC(electron_rombox_device::rom8_load), this); + m_rom[7]->set_device_load(FUNC(electron_rombox_device::rom8_load)); /* pass-through */ ELECTRON_EXPANSION_SLOT(config, m_exp, DERIVED_CLOCK(1, 1), electron_expansion_devices, nullptr); diff --git a/src/devices/bus/electron/romboxp.cpp b/src/devices/bus/electron/romboxp.cpp index 7581cf5b2e1..cb8fb77e81d 100644 --- a/src/devices/bus/electron/romboxp.cpp +++ b/src/devices/bus/electron/romboxp.cpp @@ -94,13 +94,13 @@ void electron_romboxp_device::device_add_mconfig(machine_config &config) /* rom sockets */ GENERIC_SOCKET(config, m_rom[0], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 4/12 - m_rom[0]->set_device_load(FUNC(electron_romboxp_device::rom1_load), this); + m_rom[0]->set_device_load(FUNC(electron_romboxp_device::rom1_load)); GENERIC_SOCKET(config, m_rom[1], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 5/13 - m_rom[1]->set_device_load(FUNC(electron_romboxp_device::rom2_load), this); + m_rom[1]->set_device_load(FUNC(electron_romboxp_device::rom2_load)); GENERIC_SOCKET(config, m_rom[2], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 6/14 also ROM/RAM - m_rom[2]->set_device_load(FUNC(electron_romboxp_device::rom3_load), this); + m_rom[2]->set_device_load(FUNC(electron_romboxp_device::rom3_load)); GENERIC_SOCKET(config, m_rom[3], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 7/15 - m_rom[3]->set_device_load(FUNC(electron_romboxp_device::rom4_load), this); + m_rom[3]->set_device_load(FUNC(electron_romboxp_device::rom4_load)); /* cartridges */ ELECTRON_CARTSLOT(config, m_cart[0], DERIVED_CLOCK(1, 1), electron_cart, nullptr); // ROM SLOT 0/1 diff --git a/src/devices/bus/ep64/exdos.cpp b/src/devices/bus/ep64/exdos.cpp index a4487db6ba4..f443bb60693 100644 --- a/src/devices/bus/ep64/exdos.cpp +++ b/src/devices/bus/ep64/exdos.cpp @@ -144,8 +144,8 @@ void ep64_exdos_device::device_start() { m_slot->program().install_rom(0x080000, 0x087fff, m_rom->base()); - m_slot->io().install_readwrite_handler(0x10, 0x13, 0, 0x04, 0, read8sm_delegate(FUNC(wd_fdc_device_base::read), m_fdc.target()), write8sm_delegate(FUNC(wd_fdc_device_base::write), m_fdc.target())); - m_slot->io().install_readwrite_handler(0x18, 0x18, 0, 0x04, 0, READ8_DELEGATE(ep64_exdos_device, read), WRITE8_DELEGATE(ep64_exdos_device, write)); + m_slot->io().install_readwrite_handler(0x10, 0x13, 0, 0x04, 0, read8sm_delegate(*m_fdc, FUNC(wd_fdc_device_base::read)), write8sm_delegate(*m_fdc, FUNC(wd_fdc_device_base::write))); + m_slot->io().install_readwrite_handler(0x18, 0x18, 0, 0x04, 0, read8_delegate(*this, FUNC(ep64_exdos_device::read)), write8_delegate(*this, FUNC(ep64_exdos_device::write))); } diff --git a/src/devices/bus/generic/slot.cpp b/src/devices/bus/generic/slot.cpp index 557e1d8dcef..9d2f6294ab2 100644 --- a/src/devices/bus/generic/slot.cpp +++ b/src/devices/bus/generic/slot.cpp @@ -36,11 +36,11 @@ DEFINE_DEVICE_TYPE(GENERIC_CARTSLOT, generic_cartslot_device, "generic_cartslot" // device_generic_cart_interface - constructor //------------------------------------------------- -device_generic_cart_interface::device_generic_cart_interface(const machine_config &mconfig, device_t &device) - : device_slot_card_interface(mconfig, device), - m_rom(nullptr), - m_rom_size(0), - m_region(*this, DEVICE_SELF) +device_generic_cart_interface::device_generic_cart_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device), + m_rom(nullptr), + m_rom_size(0), + m_region(*this, DEVICE_SELF) { } @@ -95,17 +95,19 @@ generic_slot_device::generic_slot_device(const machine_config &mconfig, device_t m_must_be_loaded(false), m_width(GENERIC_ROM8_WIDTH), m_endianness(ENDIANNESS_LITTLE), - m_cart(nullptr) + m_cart(nullptr), + m_device_image_load(*this), + m_device_image_unload(*this) { } -generic_socket_device::generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : generic_slot_device(mconfig, GENERIC_SOCKET, tag, owner, clock) +generic_socket_device::generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + generic_slot_device(mconfig, GENERIC_SOCKET, tag, owner, clock) { } -generic_cartslot_device::generic_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : generic_slot_device(mconfig, GENERIC_CARTSLOT, tag, owner, clock) +generic_cartslot_device::generic_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + generic_slot_device(mconfig, GENERIC_CARTSLOT, tag, owner, clock) { } @@ -124,6 +126,8 @@ generic_slot_device::~generic_slot_device() void generic_slot_device::device_start() { m_cart = dynamic_cast<device_generic_cart_interface *>(get_card_device()); + m_device_image_load.resolve(); + m_device_image_unload.resolve(); } diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h index a67fd25b9e5..9df3bf44a76 100644 --- a/src/devices/bus/generic/slot.h +++ b/src/devices/bus/generic/slot.h @@ -78,8 +78,8 @@ public: generic_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual ~generic_slot_device(); - template <typename... T> void set_device_load(T &&... args) { m_device_image_load = load_delegate(std::forward<T>(args)...); } - template <typename... T> void set_device_unload(T &&... args) { m_device_image_unload = unload_delegate(std::forward<T>(args)...); } + template <typename... T> void set_device_load(T &&... args) { m_device_image_load.set(std::forward<T>(args)...); } + template <typename... T> void set_device_unload(T &&... args) { m_device_image_unload.set(std::forward<T>(args)...); } void set_interface(const char * interface) { m_interface = interface; } void set_default_card(const char * def) { m_default_card = def; } diff --git a/src/devices/bus/gio64/gio64.cpp b/src/devices/bus/gio64/gio64.cpp index 20caf53124b..ba35bb38c9d 100644 --- a/src/devices/bus/gio64/gio64.cpp +++ b/src/devices/bus/gio64/gio64.cpp @@ -93,9 +93,9 @@ void gio64_device::device_start() std::fill(std::begin(m_device_list), std::end(m_device_list), nullptr); m_space = &space(0); - m_space->install_readwrite_handler(0x00000000, 0x003fffff, read64_delegate(FUNC(gio64_device::no_gfx_r), this), write64_delegate(FUNC(gio64_device::no_gfx_w), this)); - m_space->install_readwrite_handler(0x00400000, 0x005fffff, read64_delegate(FUNC(gio64_device::no_exp0_r), this), write64_delegate(FUNC(gio64_device::no_exp0_w), this)); - m_space->install_readwrite_handler(0x00600000, 0x009fffff, read64_delegate(FUNC(gio64_device::no_exp1_r), this), write64_delegate(FUNC(gio64_device::no_exp1_w), this)); + m_space->install_readwrite_handler(0x00000000, 0x003fffff, read64_delegate(*this, FUNC(gio64_device::no_gfx_r)), write64_delegate(*this, FUNC(gio64_device::no_gfx_w))); + m_space->install_readwrite_handler(0x00400000, 0x005fffff, read64_delegate(*this, FUNC(gio64_device::no_exp0_r)), write64_delegate(*this, FUNC(gio64_device::no_exp0_w))); + m_space->install_readwrite_handler(0x00600000, 0x009fffff, read64_delegate(*this, FUNC(gio64_device::no_exp1_r)), write64_delegate(*this, FUNC(gio64_device::no_exp1_w))); } READ64_MEMBER(gio64_device::no_gfx_r) { return ~0ULL; } diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp index 171d4a62204..c150b6d36fa 100644 --- a/src/devices/bus/hp80_io/82937.cpp +++ b/src/devices/bus/hp80_io/82937.cpp @@ -70,7 +70,7 @@ hp82937_io_card_device::~hp82937_io_card_device() void hp82937_io_card_device::install_read_write_handlers(address_space& space , uint16_t base_addr) { - space.install_readwrite_handler(base_addr , base_addr + 1 , READ8_DEVICE_DELEGATE(m_translator , hp_1mb5_device , cpu_r) , WRITE8_DEVICE_DELEGATE(m_translator , hp_1mb5_device , cpu_w)); + space.install_readwrite_handler(base_addr, base_addr + 1, read8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_r)), write8_delegate(*m_translator, FUNC(hp_1mb5_device::cpu_w))); } void hp82937_io_card_device::inten() diff --git a/src/devices/bus/hp9845_io/hp9845_io.cpp b/src/devices/bus/hp9845_io/hp9845_io.cpp index 663c8fd9977..a8e1d43c8bc 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.cpp +++ b/src/devices/bus/hp9845_io/hp9845_io.cpp @@ -101,9 +101,9 @@ int hp9845_io_slot_device::get_rw_handlers(read16_delegate& rhandler , write16_d { hp9845_io_card_device *card = dynamic_cast<hp9845_io_card_device*>(get_card_device()); - if (card != nullptr) { - rhandler = read16_delegate(FUNC(hp9845_io_card_device::reg_r) , card); - whandler = write16_delegate(FUNC(hp9845_io_card_device::reg_w) , card); + if (card) { + rhandler = read16_delegate(*card, FUNC(hp9845_io_card_device::reg_r)); + whandler = write16_delegate(*card, FUNC(hp9845_io_card_device::reg_w)); return card->get_sc(); } else { return -1; @@ -114,7 +114,7 @@ bool hp9845_io_slot_device::has_dual_sc() const { hp9845_io_card_device *card = dynamic_cast<hp9845_io_card_device*>(get_card_device()); - if (card != nullptr) { + if (card) { return card->has_dual_sc(); } else { return false; @@ -129,7 +129,7 @@ void hp9845_io_card_device::set_slot_device(hp9845_io_slot_device* dev) m_slot_dev = dev; } -uint8_t hp9845_io_card_device::get_sc(void) +uint8_t hp9845_io_card_device::get_sc() { return m_select_code_port->read() + HP9845_IO_FIRST_SC; } diff --git a/src/devices/bus/hp9845_io/hp9845_io.h b/src/devices/bus/hp9845_io/hp9845_io.h index c62c8625563..b3018f7edf8 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.h +++ b/src/devices/bus/hp9845_io/hp9845_io.h @@ -86,7 +86,7 @@ public: virtual DECLARE_WRITE16_MEMBER(reg_w) = 0; // SC getter - uint8_t get_sc(void); + uint8_t get_sc(); virtual bool has_dual_sc() const; diff --git a/src/devices/bus/hp_dio/hp98265a.cpp b/src/devices/bus/hp_dio/hp98265a.cpp index 623f2d00be1..436fbc1c910 100644 --- a/src/devices/bus/hp_dio/hp98265a.cpp +++ b/src/devices/bus/hp_dio/hp98265a.cpp @@ -164,8 +164,8 @@ void dio16_98265a_device::device_reset() program_space().install_readwrite_handler( 0x600000 + (code * 0x10000), 0x6007ff + (code * 0x10000), - read16_delegate(FUNC(dio16_98265a_device::io_r), this), - write16_delegate(FUNC(dio16_98265a_device::io_w), this)); + read16_delegate(*this, FUNC(dio16_98265a_device::io_r)), + write16_delegate(*this, FUNC(dio16_98265a_device::io_w))); program_space().install_device(0x6e0020, 0x6e003f, *m_spc, &mb87030_device::map, 0x00ff00ff); m_installed_io = true; } diff --git a/src/devices/bus/hp_dio/hp98543.cpp b/src/devices/bus/hp_dio/hp98543.cpp index 31251039ea6..280597f3a22 100644 --- a/src/devices/bus/hp_dio/hp98543.cpp +++ b/src/devices/bus/hp_dio/hp98543.cpp @@ -102,21 +102,21 @@ void dio16_98543_device::device_start() dio().install_memory( 0x200000, 0x27ffff, - read16_delegate(FUNC(dio16_98543_device::vram_r), this), - write16_delegate(FUNC(dio16_98543_device::vram_w), this)); + read16_delegate(*this, FUNC(dio16_98543_device::vram_r)), + write16_delegate(*this, FUNC(dio16_98543_device::vram_w))); dio().install_memory( 0x560000, 0x563fff, - read16_delegate(FUNC(dio16_98543_device::rom_r), this), - write16_delegate(FUNC(dio16_98543_device::rom_w), this)); + read16_delegate(*this, FUNC(dio16_98543_device::rom_r)), + write16_delegate(*this, FUNC(dio16_98543_device::rom_w))); dio().install_memory( 0x564000, 0x565fff, - read16_delegate(FUNC(dio16_98543_device::ctrl_r), this), - write16_delegate(FUNC(dio16_98543_device::ctrl_w), this)); + read16_delegate(*this, FUNC(dio16_98543_device::ctrl_r)), + write16_delegate(*this, FUNC(dio16_98543_device::ctrl_w))); dio().install_memory( 0x566000, 0x567fff, - read16_delegate(FUNC(nereid_device::ctrl_r), static_cast<nereid_device*>(m_nereid)), - write16_delegate(FUNC(nereid_device::ctrl_w), static_cast<nereid_device*>(m_nereid))); + read16_delegate(*m_nereid, FUNC(nereid_device::ctrl_r)), + write16_delegate(*m_nereid, FUNC(nereid_device::ctrl_w))); } void dio16_98543_device::device_reset() diff --git a/src/devices/bus/hp_dio/hp98544.cpp b/src/devices/bus/hp_dio/hp98544.cpp index 9565d4632d2..83cd9f25fe7 100644 --- a/src/devices/bus/hp_dio/hp98544.cpp +++ b/src/devices/bus/hp_dio/hp98544.cpp @@ -101,16 +101,16 @@ void dio16_98544_device::device_start() save_item(NAME(m_intreg)); dio().install_memory( 0x200000, 0x2fffff, - read16_delegate(FUNC(topcat_device::vram_r), static_cast<topcat_device*>(m_topcat)), - write16_delegate(FUNC(topcat_device::vram_w), static_cast<topcat_device*>(m_topcat))); + read16_delegate(*m_topcat, FUNC(topcat_device::vram_r)), + write16_delegate(*m_topcat, FUNC(topcat_device::vram_w))); dio().install_memory( 0x560000, 0x563fff, - read16_delegate(FUNC(dio16_98544_device::rom_r), this), - write16_delegate(FUNC(dio16_98544_device::rom_w), this)); + read16_delegate(*this, FUNC(dio16_98544_device::rom_r)), + write16_delegate(*this, FUNC(dio16_98544_device::rom_w))); dio().install_memory( 0x564000, 0x567fff, - read16_delegate(FUNC(topcat_device::ctrl_r), static_cast<topcat_device*>(m_topcat)), - write16_delegate(FUNC(topcat_device::ctrl_w), static_cast<topcat_device*>(m_topcat))); + read16_delegate(*m_topcat, FUNC(topcat_device::ctrl_r)), + write16_delegate(*m_topcat, FUNC(topcat_device::ctrl_w))); } //------------------------------------------------- diff --git a/src/devices/bus/hp_dio/hp98550.cpp b/src/devices/bus/hp_dio/hp98550.cpp index 28d87d5a52f..ed91b99ca3f 100644 --- a/src/devices/bus/hp_dio/hp98550.cpp +++ b/src/devices/bus/hp_dio/hp98550.cpp @@ -87,23 +87,23 @@ void dio32_98550_device::device_start() dio().install_memory( 0x200000, 0x3fffff, - read16_delegate(FUNC(dio32_98550_device::vram_r), this), - write16_delegate(FUNC(dio32_98550_device::vram_w), this)); + read16_delegate(*this, FUNC(dio32_98550_device::vram_r)), + write16_delegate(*this, FUNC(dio32_98550_device::vram_w))); dio().install_memory( 0x560000, 0x56ffff, - read16_delegate(FUNC(dio32_98550_device::rom_r), this), - write16_delegate(FUNC(dio32_98550_device::rom_w), this)); + read16_delegate(*this, FUNC(dio32_98550_device::rom_r)), + write16_delegate(*this, FUNC(dio32_98550_device::rom_w))); dio().install_memory( 0x564000, 0x5648ff, - read16_delegate(FUNC(dio32_98550_device::catseye_r), this), - write16_delegate(FUNC(dio32_98550_device::catseye_w), this)); + read16_delegate(*this, FUNC(dio32_98550_device::catseye_r)), + write16_delegate(*this, FUNC(dio32_98550_device::catseye_w))); dio().install_memory( 0x566000, 0x5660ff, - read16_delegate(FUNC(nereid_device::ctrl_r), &(*m_nereid)), - write16_delegate(FUNC(nereid_device::ctrl_w), &(*m_nereid))); + read16_delegate(*m_nereid, FUNC(nereid_device::ctrl_r)), + write16_delegate(*m_nereid, FUNC(nereid_device::ctrl_w))); } void dio32_98550_device::device_reset() diff --git a/src/devices/bus/hp_dio/hp98603a.cpp b/src/devices/bus/hp_dio/hp98603a.cpp index ac04f7479bd..9295fc1606d 100644 --- a/src/devices/bus/hp_dio/hp98603a.cpp +++ b/src/devices/bus/hp_dio/hp98603a.cpp @@ -67,8 +67,8 @@ void dio16_98603a_device::device_reset() { m_rom = device().machine().root_device().memregion(this->subtag(HP98603A_ROM_REGION).c_str())->base(); dio().install_memory(0x80000, 0xfffff, - read16_delegate(FUNC(dio16_98603a_device::rom_r), this), - write16_delegate(FUNC(dio16_98603a_device::rom_w), this)); + read16_delegate(*this, FUNC(dio16_98603a_device::rom_r)), + write16_delegate(*this, FUNC(dio16_98603a_device::rom_w))); } READ16_MEMBER(dio16_98603a_device::rom_r) diff --git a/src/devices/bus/hp_dio/hp98603b.cpp b/src/devices/bus/hp_dio/hp98603b.cpp index 6c8cff6b95a..638f5fba6e7 100644 --- a/src/devices/bus/hp_dio/hp98603b.cpp +++ b/src/devices/bus/hp_dio/hp98603b.cpp @@ -61,8 +61,9 @@ void dio16_98603b_device::device_start() void dio16_98603b_device::device_reset() { m_rom = device().machine().root_device().memregion(this->subtag(HP98603B_ROM_REGION).c_str())->base(); - dio().install_memory(0x100000, 0x1fffff, read16_delegate(FUNC(dio16_98603b_device::rom_r), this), - write16_delegate(FUNC(dio16_98603b_device::rom_w), this)); + dio().install_memory(0x100000, 0x1fffff, + read16_delegate(*this, FUNC(dio16_98603b_device::rom_r)), + write16_delegate(*this, FUNC(dio16_98603b_device::rom_w))); } READ16_MEMBER(dio16_98603b_device::rom_r) diff --git a/src/devices/bus/hp_dio/hp98620.cpp b/src/devices/bus/hp_dio/hp98620.cpp index fcd0e9d95aa..8988ef56266 100644 --- a/src/devices/bus/hp_dio/hp98620.cpp +++ b/src/devices/bus/hp_dio/hp98620.cpp @@ -75,8 +75,8 @@ void dio16_98620_device::device_reset() if (!m_installed_io) { program_space().install_readwrite_handler(0x500000, 0x50020f, - read16_delegate(FUNC(dio16_98620_device::dma_r), this), - write16_delegate(FUNC(dio16_98620_device::dma_w), this)); + read16_delegate(*this, FUNC(dio16_98620_device::dma_r)), + write16_delegate(*this, FUNC(dio16_98620_device::dma_w))); m_installed_io = true; } m_control = 0; diff --git a/src/devices/bus/hp_dio/hp98643.cpp b/src/devices/bus/hp_dio/hp98643.cpp index 57bc4d1a283..ae468d3d490 100644 --- a/src/devices/bus/hp_dio/hp98643.cpp +++ b/src/devices/bus/hp_dio/hp98643.cpp @@ -194,19 +194,19 @@ void dio16_98643_device::addrmap(address_map &map) { map(0x0000, 0x0001).rw(FUNC(dio16_98643_device::id_r), FUNC(dio16_98643_device::id_w)); map(0x0002, 0x0003).rw(FUNC(dio16_98643_device::sc_r), FUNC(dio16_98643_device::sc_w)); - map(0x4000, 0x4003).lrw16("lance", - [this](address_space &space, offs_t offset, u16 mem_mask) -> u16 { - m_sc |= REG_STATUS_ACK; - return m_lance->regs_r(space, offset, mem_mask); - }, - [this](address_space &space, offs_t offset, u16 data, u16 mem_mask) { - m_sc |= REG_STATUS_ACK; - return m_lance->regs_w(space, offset, data, mem_mask); - }); - - map(0x8000, 0xbfff).lrw16("lanceram", - [this](offs_t offset) -> u16 { return m_ram[offset]; }, - [this](offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_ram[offset]); }); + map(0x4000, 0x4003).lrw16( + [this] (address_space &space, offs_t offset, u16 mem_mask) -> u16 { + m_sc |= REG_STATUS_ACK; + return m_lance->regs_r(space, offset, mem_mask); + }, "lance_r", + [this] (address_space &space, offs_t offset, u16 data, u16 mem_mask) { + m_sc |= REG_STATUS_ACK; + return m_lance->regs_w(space, offset, data, mem_mask); + }, "lance_w"); + + map(0x8000, 0xbfff).lrw16( + NAME([this] (offs_t offset) -> u16 { return m_ram[offset]; }), + NAME([this] (offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_ram[offset]); })); map(0xc000, 0xffff).rw(FUNC(dio16_98643_device::novram_r), FUNC(dio16_98643_device::novram_w)); } diff --git a/src/devices/bus/hp_dio/hp98644.cpp b/src/devices/bus/hp_dio/hp98644.cpp index d3c347b6d31..8545220b074 100644 --- a/src/devices/bus/hp_dio/hp98644.cpp +++ b/src/devices/bus/hp_dio/hp98644.cpp @@ -161,8 +161,8 @@ void dio16_98644_device::device_reset() dio().install_memory( 0x600000 + (code * 0x10000), 0x6007ff + (code * 0x10000), - read16_delegate(FUNC(dio16_98644_device::io_r), this), - write16_delegate(FUNC(dio16_98644_device::io_w), this)); + read16_delegate(*this, FUNC(dio16_98644_device::io_r)), + write16_delegate(*this, FUNC(dio16_98644_device::io_w))); m_installed_io = true; } } diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp index 509a2151a3b..3bf1823ffae 100644 --- a/src/devices/bus/hp_dio/human_interface.cpp +++ b/src/devices/bus/hp_dio/human_interface.cpp @@ -115,12 +115,12 @@ human_interface_device::human_interface_device(const machine_config &mconfig, de void human_interface_device::device_start() { program_space().install_readwrite_handler(0x420000, 0x420003, 0x0003, 0xfffc, 0, - read8_delegate(FUNC(upi41_cpu_device::upi41_master_r), &(*m_iocpu)), - write8_delegate(FUNC(upi41_cpu_device::upi41_master_w), &(*m_iocpu)), 0x00ff00ff); + read8_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_r)), + write8_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_w)), 0x00ff00ff); program_space().install_readwrite_handler(0x470000, 0x47001f, 0x1f, 0xffe0, 0, - read8_delegate(FUNC(human_interface_device::gpib_r), this), - write8_delegate(FUNC(human_interface_device::gpib_w), this), 0x00ff00ff); + read8_delegate(*this, FUNC(human_interface_device::gpib_r)), + write8_delegate(*this, FUNC(human_interface_device::gpib_w)), 0x00ff00ff); save_item(NAME(m_hil_read)); save_item(NAME(m_kbd_nmi)); diff --git a/src/devices/bus/intellec4/insdatastor.cpp b/src/devices/bus/intellec4/insdatastor.cpp index f271ef4b91f..9f4e3c53072 100644 --- a/src/devices/bus/intellec4/insdatastor.cpp +++ b/src/devices/bus/intellec4/insdatastor.cpp @@ -155,7 +155,7 @@ void imm4_22_device::map_ram_io() { memory_space().install_ram(start << 8, (start << 8) | 0x00ffU, m_memory); status_space().install_ram(start << 6, (start << 6) | 0x003fU, m_status); - ram_ports_space().install_write_handler(start << 2, (start << 2) | 0x03U, write8_delegate(FUNC(imm4_22_device::ram_out), this)); + ram_ports_space().install_write_handler(start << 2, (start << 2) | 0x03U, write8_delegate(*this, FUNC(imm4_22_device::ram_out))); } offs_t const rom_ports_start(offs_t(m_rom_page) << 6); @@ -163,7 +163,7 @@ void imm4_22_device::map_ram_io() offs_t const rom_ports_mirror(m_rom_mirror ? 0x1f00U : 0x0700U); rom_ports_space().install_readwrite_handler( rom_ports_start, rom_ports_end, 0U, rom_ports_mirror, 0U, - read8_delegate(FUNC(imm4_22_device::rom_in), this), write8_delegate(FUNC(imm4_22_device::rom_out), this)); + read8_delegate(*this, FUNC(imm4_22_device::rom_in)), write8_delegate(*this, FUNC(imm4_22_device::rom_out))); if (is_loaded()) map_prom(); diff --git a/src/devices/bus/intellec4/tapereader.cpp b/src/devices/bus/intellec4/tapereader.cpp index dad9c62f494..581735b39f0 100644 --- a/src/devices/bus/intellec4/tapereader.cpp +++ b/src/devices/bus/intellec4/tapereader.cpp @@ -50,10 +50,10 @@ void imm4_90_device::device_start() save_item(NAME(m_advance)); save_item(NAME(m_stepping)); - rom_ports_space().install_read_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(FUNC(imm4_90_device::rom4_in), this)); - rom_ports_space().install_read_handler(0x0060U, 0x006fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(FUNC(imm4_90_device::rom6_in), this)); - rom_ports_space().install_read_handler(0x0070U, 0x007fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(FUNC(imm4_90_device::rom7_in), this)); - rom_ports_space().install_write_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, write8_delegate(FUNC(imm4_90_device::rom4_out), this)); + rom_ports_space().install_read_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(*this, FUNC(imm4_90_device::rom4_in))); + rom_ports_space().install_read_handler(0x0060U, 0x006fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(*this, FUNC(imm4_90_device::rom6_in))); + rom_ports_space().install_read_handler(0x0070U, 0x007fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(*this, FUNC(imm4_90_device::rom7_in))); + rom_ports_space().install_write_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, write8_delegate(*this, FUNC(imm4_90_device::rom4_out))); } diff --git a/src/devices/bus/interpro/keyboard/lle.cpp b/src/devices/bus/interpro/keyboard/lle.cpp index 595130b4c74..8edfb8c1ab6 100644 --- a/src/devices/bus/interpro/keyboard/lle.cpp +++ b/src/devices/bus/interpro/keyboard/lle.cpp @@ -480,11 +480,11 @@ void lle_device_base::ext_map(address_map &map) // not clear what these addresses correspond to, possibly // used in manufacturer testing? if (VERBOSE & LOG_GENERAL) - map(0x7fe, 0x7ff).lw8("write", - [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) - { - LOG("write offset 0x%03f data 0x%02x (%s)\n", offset, data, machine().describe_context()); - }); + map(0x7fe, 0x7ff).lw8( + [this] (offs_t offset, u8 data, u8 mem_mask) + { + LOG("write offset 0x%03f data 0x%02x (%s)\n", offset, data, machine().describe_context()); + }, "write"); } READ_LINE_MEMBER(lle_device_base::t0_r) diff --git a/src/devices/bus/interpro/sr/edge.cpp b/src/devices/bus/interpro/sr/edge.cpp index 4c6453a5341..b8927438efc 100644 --- a/src/devices/bus/interpro/sr/edge.cpp +++ b/src/devices/bus/interpro/sr/edge.cpp @@ -301,14 +301,14 @@ void edge1_device_base::map(address_map &map) void edge1_device_base::map_dynamic(address_map &map) { // TODO: map using lambdas until mixed-size submaps work - map(0x00000000, 0x0001ffff).lrw8("sram", - [this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }, - [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); }); + map(0x00000000, 0x0001ffff).lrw8( + NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }), + NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); })); - map(0x01000000, 0x013fffff).lrw8("vram", - [this](address_space &space, offs_t offset, u8 mem_mask) { return m_vram->read((offset >> 2) | (offset & 0x3)); }, - [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_vram->write((offset >> 2) | (offset & 0x3), data); }); + map(0x01000000, 0x013fffff).lrw8( + NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_vram->read((offset >> 2) | (offset & 0x3)); }), + NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_vram->write((offset >> 2) | (offset & 0x3), data); })); //map(0x02028200, 0x0202827f).lr32("idprom", // [this](address_space &space, offs_t offset, u8 mem_mask) { return memregion("idprom")->as_u32(offset); }); @@ -350,8 +350,8 @@ void edge2plus_processor_device_base::map(address_map &map) { map(0x000, 0x003).rw(FUNC(edge2plus_processor_device_base::reg0_r), FUNC(edge2plus_processor_device_base::reg0_w)); - map(0x008, 0x008).lr8("mouse_x", []() { return 0; }); - map(0x00c, 0x00c).lr8("mouse_y", []() { return 0; }); + map(0x008, 0x008).lr8([]() { return 0; }, "mouse_x"); + map(0x00c, 0x00c).lr8([]() { return 0; }, "mouse_y"); map(0x010, 0x01f).rw("scc", FUNC(z80scc_device::dc_ab_r), FUNC(z80scc_device::dc_ab_w)).umask32(0x000000ff); @@ -377,18 +377,18 @@ void edge2plus_framebuffer_device_base::map_dynamic(address_map &map) { // TODO: map using lambdas until mixed-size submaps work - map(0x00000000, 0x0003ffff).lrw8("sram", - [this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }, - [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); }); + map(0x00000000, 0x0003ffff).lrw8( + NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }), + NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); })); - map(0x01000000, 0x01ffffff).lrw8("vram", - [this](address_space &space, offs_t offset, u8 mem_mask) { return m_vram->read(offset); }, - [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_vram->write(offset, data); }); + map(0x01000000, 0x01ffffff).lrw8( + NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_vram->read(offset); }), + NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_vram->write(offset, data); })); map(0x02028088, 0x0202808b).w(FUNC(edge2plus_framebuffer_device_base::select_w)); - map(0x02028200, 0x0202827f).lr32("idprom", - [this](address_space &space, offs_t offset, u8 mem_mask) { return m_select == 0 ? memregion("idprom")->as_u32(offset) : space.unmap(); }); + map(0x02028200, 0x0202827f).lr32( + NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_select == 0 ? memregion("idprom")->as_u32(offset) : space.unmap(); })); map(0x02028290, 0x02028293).w(FUNC(edge2plus_framebuffer_device_base::lut_select_w)); map(0x02028300, 0x02028303).w(FUNC(edge2plus_framebuffer_device_base::unk_300_w)); @@ -832,12 +832,12 @@ WRITE_LINE_MEMBER(edge2plus_processor_device_base::holda) void edge2plus_processor_device_base::dsp1_map(address_map &map) { - map(0x00000, 0x3ffff).lrw8("sram", - [this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }, - [this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); }); + map(0x00000, 0x3ffff).lrw8( + NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }), + NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); })); - map(0x40000, 0x7ffff).lr32("prg1", - [this](address_space &space, offs_t offset, u32 mem_mask) { return memregion("prg1")->as_u32(offset); }); + map(0x40000, 0x7ffff).lr32( + NAME([this](address_space &space, offs_t offset, u32 mem_mask) { return memregion("prg1")->as_u32(offset); })); } diff --git a/src/devices/bus/interpro/sr/sr.h b/src/devices/bus/interpro/sr/sr.h index 858590f5075..feb8724547e 100644 --- a/src/devices/bus/interpro/sr/sr.h +++ b/src/devices/bus/interpro/sr/sr.h @@ -75,7 +75,7 @@ public: offs_t end = start + (CBUS_SIZE - 1); // install the idprom region - read32_delegate idprom_r([idprom](address_space &space, offs_t offset, u32 mem_mask) { return idprom->as_u32(offset); }, idprom->name()); + read32_delegate idprom_r(*this, [idprom] (address_space &space, offs_t offset, u32 mem_mask) { return idprom->as_u32(offset); }, idprom->name()); m_main_space->install_read_handler(start, start | 0x7f, idprom_r); m_io_space->install_read_handler(start, start | 0x7f, idprom_r); @@ -171,7 +171,7 @@ public: offs_t end = start + (SRX_SIZE - 1); // install the idprom region - read32_delegate idprom_r([idprom](address_space &space, offs_t offset, u32 mem_mask) { return idprom->as_u32(offset); }, idprom->name()); + read32_delegate idprom_r(*this, [idprom] (address_space &space, offs_t offset, u32 mem_mask) { return idprom->as_u32(offset); }, idprom->name()); m_main_space->install_read_handler(start | 0x7f80, start | 0x7fff, idprom_r); m_io_space->install_read_handler(start | 0x7f80, start | 0x7fff, idprom_r); diff --git a/src/devices/bus/isa/3c503.cpp b/src/devices/bus/isa/3c503.cpp index 34202e2246d..44955657475 100644 --- a/src/devices/bus/isa/3c503.cpp +++ b/src/devices/bus/isa/3c503.cpp @@ -32,8 +32,8 @@ void el2_3c503_device::device_start() { memset(m_rom, 0, 8*1024); // empty m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install_device(0x0300, 0x030f, read8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_loport_w), this)); - m_isa->install_device(0x0700, 0x070f, read8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_r), this), write8_delegate(FUNC(el2_3c503_device::el2_3c503_hiport_w), this)); + m_isa->install_device(0x0300, 0x030f, read8_delegate(*this, FUNC(el2_3c503_device::el2_3c503_loport_r)), write8_delegate(*this, FUNC(el2_3c503_device::el2_3c503_loport_w))); + m_isa->install_device(0x0700, 0x070f, read8_delegate(*this, FUNC(el2_3c503_device::el2_3c503_hiport_r)), write8_delegate(*this, FUNC(el2_3c503_device::el2_3c503_hiport_w))); // TODO: This is wrong, fix if anything actually uses it // DMA can change in runtime diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp index 6dd695165c2..8efc0471ff4 100644 --- a/src/devices/bus/isa/3c505.cpp +++ b/src/devices/bus/isa/3c505.cpp @@ -327,19 +327,19 @@ void isa16_3c505_device::map_io(address_map &map) * A read or write to I/O location 00H will cause an active transition on * the CA input. */ - map(0x0000, 0x0000).lrw8("ca", - [this]() - { - m_net->ca(1); - m_net->ca(0); - - return 0; - }, - [this](u8 data) - { - m_net->ca(1); - m_net->ca(0); - }); + map(0x0000, 0x0000).lrw8( + NAME([this]() + { + m_net->ca(1); + m_net->ca(0); + + return 0; + }), + NAME([this](u8 data) + { + m_net->ca(1); + m_net->ca(0); + })); /* * A read or write to I/O location 80H will produce a CAS before RAS cycle diff --git a/src/devices/bus/isa/adlib.cpp b/src/devices/bus/isa/adlib.cpp index 6a900b0e09d..192f6091ad5 100644 --- a/src/devices/bus/isa/adlib.cpp +++ b/src/devices/bus/isa/adlib.cpp @@ -72,7 +72,7 @@ isa8_adlib_device::isa8_adlib_device(const machine_config &mconfig, const char * void isa8_adlib_device::device_start() { set_isa_device(); - m_isa->install_device(0x0388, 0x0389, read8_delegate( FUNC(isa8_adlib_device::ym3812_16_r), this ), write8_delegate( FUNC(isa8_adlib_device::ym3812_16_w), this ) ); + m_isa->install_device(0x0388, 0x0389, read8_delegate(*this, FUNC(isa8_adlib_device::ym3812_16_r)), write8_delegate(*this, FUNC(isa8_adlib_device::ym3812_16_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp index 0e974bf5f41..78e87d54213 100644 --- a/src/devices/bus/isa/aga.cpp +++ b/src/devices/bus/isa/aga.cpp @@ -103,9 +103,9 @@ void isa8_aga_device::device_start() m_videoram = std::make_unique<uint8_t[]>(0x10000); set_isa_device(); - m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_r),this), write8_delegate(FUNC(isa8_aga_device::pc_aga_videoram_w),this)); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_aga_device::pc_aga_mda_r), this), write8_delegate(FUNC(isa8_aga_device::pc_aga_mda_w), this)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_aga_device::pc_aga_cga_r), this), write8_delegate(FUNC(isa8_aga_device::pc_aga_cga_w), this)); + m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(*this, FUNC(isa8_aga_device::pc_aga_videoram_r)), write8_delegate(*this, FUNC(isa8_aga_device::pc_aga_videoram_w))); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_aga_device::pc_aga_mda_r)), write8_delegate(*this, FUNC(isa8_aga_device::pc_aga_mda_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_aga_device::pc_aga_cga_r)), write8_delegate(*this, FUNC(isa8_aga_device::pc_aga_cga_w))); /* Initialise the cga palette */ @@ -181,9 +181,9 @@ void isa8_aga_pc200_device::device_start() m_videoram = std::make_unique<uint8_t[]>(0x10000); set_isa_device(); - m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_r),this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_videoram_w),this)); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_aga_pc200_device::pc_aga_mda_r), this), write8_delegate(FUNC(isa8_aga_pc200_device::pc_aga_mda_w), this)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_aga_pc200_device::pc200_cga_r), this), write8_delegate(FUNC(isa8_aga_pc200_device::pc200_cga_w), this)); + m_isa->install_memory(0xb0000, 0xbffff, read8_delegate(*this, FUNC(isa8_aga_pc200_device::pc200_videoram_r)), write8_delegate(*this, FUNC(isa8_aga_pc200_device::pc200_videoram_w))); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_aga_pc200_device::pc_aga_mda_r)), write8_delegate(*this, FUNC(isa8_aga_pc200_device::pc_aga_mda_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_aga_pc200_device::pc200_cga_r)), write8_delegate(*this, FUNC(isa8_aga_pc200_device::pc200_cga_w))); /* Initialise the cga palette */ @@ -271,7 +271,7 @@ void isa8_aga_device::device_add_mconfig(machine_config &config) m_mc6845->set_screen(AGA_SCREEN_NAME); m_mc6845->set_show_border_area(false); m_mc6845->set_char_width(8); - m_mc6845->set_update_row_callback(FUNC(isa8_aga_device::aga_update_row), this); + m_mc6845->set_update_row_callback(FUNC(isa8_aga_device::aga_update_row)); m_mc6845->out_hsync_callback().set(FUNC(isa8_aga_device::hsync_changed)); m_mc6845->out_vsync_callback().set(FUNC(isa8_aga_device::vsync_changed)); } diff --git a/src/devices/bus/isa/aha1542c.cpp b/src/devices/bus/isa/aha1542c.cpp index d5c35166b1f..d0bb112728c 100644 --- a/src/devices/bus/isa/aha1542c.cpp +++ b/src/devices/bus/isa/aha1542c.cpp @@ -228,7 +228,7 @@ void aha1542c_device::z84c0010_mem(address_map &map) map(0xa000, 0xa000).portr("SWITCHES"); map(0xb000, 0xb000).w(FUNC(aha1542c_device::local_latch_w)); map(0xe000, 0xe0ff).ram(); // probably PC<->Z80 communication area - map(0xe003, 0xe003).lr8("e003_r", []() { return 0x20; }); + map(0xe003, 0xe003).lr8(NAME([] () { return 0x20; })); } u8 aha1542cp_device::eeprom_r() @@ -377,8 +377,9 @@ void aha1542c_device::device_start() { set_isa_device(); m_isa->install_rom(this, 0xdc000, 0xdffff, "aha1542", "aha1542"); - m_isa->install_device(0x330, 0x333, read8_delegate(FUNC( aha1542cf_device::aha1542_r ), this), - write8_delegate(FUNC( aha1542cf_device::aha1542_w ), this) ); + m_isa->install_device(0x330, 0x333, + read8_delegate(*this, FUNC(aha1542cf_device::aha1542_r)), + write8_delegate(*this, FUNC(aha1542cf_device::aha1542_w))); } diff --git a/src/devices/bus/isa/asc88.cpp b/src/devices/bus/isa/asc88.cpp index c04570725f8..8843aad29a1 100644 --- a/src/devices/bus/isa/asc88.cpp +++ b/src/devices/bus/isa/asc88.cpp @@ -53,11 +53,11 @@ void asc88_device::device_reset() m_isa->install_rom(this, baseaddr, baseaddr | 0x37ff, "asc88", "bios"); m_isa->install_bank(baseaddr | 0x3800, baseaddr | 0x3fef, "ascram", m_ram.get()); m_isa->install_memory(baseaddr | 0x3ff0, baseaddr | 0x3ff7, - read8sm_delegate(FUNC(ncr5380n_device::read), &*m_scsic), - write8sm_delegate(FUNC(ncr5380n_device::write), &*m_scsic)); + read8sm_delegate(*m_scsic, FUNC(ncr5380n_device::read)), + write8sm_delegate(*m_scsic, FUNC(ncr5380n_device::write))); m_isa->install_memory(baseaddr | 0x3ff8, baseaddr | 0x3ff8, - read8smo_delegate(FUNC(asc88_device::eeprom_r), this), - write8smo_delegate(FUNC(asc88_device::control_w), this)); + read8smo_delegate(*this, FUNC(asc88_device::eeprom_r)), + write8smo_delegate(*this, FUNC(asc88_device::control_w))); control_w(0); } diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp index 78c35957884..5b825bac73f 100644 --- a/src/devices/bus/isa/cga.cpp +++ b/src/devices/bus/isa/cga.cpp @@ -273,10 +273,10 @@ void isa8_cga_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(nullptr); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(isa8_cga_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(isa8_cga_device::crtc_update_row)); m_crtc->out_hsync_callback().set(FUNC(isa8_cga_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_cga_device::vsync_changed)); - m_crtc->set_reconfigure_callback(FUNC(isa8_cga_device::reconfigure), this); + m_crtc->set_reconfigure_callback(FUNC(isa8_cga_device::reconfigure)); } ioport_constructor isa8_cga_device::device_input_ports() const @@ -331,7 +331,7 @@ void isa8_cga_device::device_start() set_isa_device(); m_vram.resize(m_vram_size); - m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_cga_device::io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_cga_device::io_read)), write8_delegate(*this, FUNC(isa8_cga_device::io_write))); m_isa->install_bank(0xb8000, 0xb8000 + (std::min<size_t>)(0x8000, m_vram_size) - 1, "bank_cga", &m_vram[0]); if(m_vram_size == 0x4000) m_isa->install_bank(0xbc000, 0xbffff, "bank_cga", &m_vram[0]); @@ -1346,13 +1346,13 @@ void isa8_cga_pc1512_device::device_start() { isa8_cga_device::device_start(); - m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_cga_pc1512_device::io_read), this ), write8_delegate( FUNC(isa8_cga_pc1512_device::io_write), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_cga_pc1512_device::io_read)), write8_delegate(*this, FUNC(isa8_cga_pc1512_device::io_write))); m_isa->install_bank(0xb8000, 0xbbfff, "bank1", &m_vram[0]); address_space &space = m_isa->memspace(); - space.install_write_handler( 0xb8000, 0xbbfff, write8_delegate( FUNC(isa8_cga_pc1512_device::vram_w), this ) ); - space.install_write_handler( 0xbc000, 0xbffff, write8_delegate( FUNC(isa8_cga_pc1512_device::vram_w), this ) ); + space.install_write_handler(0xb8000, 0xbbfff, write8_delegate(*this, FUNC(isa8_cga_pc1512_device::vram_w))); + space.install_write_handler(0xbc000, 0xbffff, write8_delegate(*this, FUNC(isa8_cga_pc1512_device::vram_w))); } void isa8_cga_pc1512_device::device_reset() @@ -1485,7 +1485,7 @@ void isa8_wyse700_device::device_start() { isa8_cga_device::device_start(); - m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_wyse700_device::io_read), this ), write8_delegate( FUNC(isa8_wyse700_device::io_write), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_wyse700_device::io_read)), write8_delegate(*this, FUNC(isa8_wyse700_device::io_write))); m_isa->install_bank(0xa0000, 0xaffff, "bank_wy1", &m_vram[0x00000]); m_isa->install_bank(0xb0000, 0xbffff, "bank_cga", &m_vram[0x10000]); } @@ -1547,7 +1547,7 @@ void isa8_ec1841_0002_device::device_start() { isa8_cga_device::device_start(); - m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_ec1841_0002_device::io_read), this ), write8_delegate( FUNC(isa8_ec1841_0002_device::io_write), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_ec1841_0002_device::io_read)), write8_delegate(*this, FUNC(isa8_ec1841_0002_device::io_write))); } void isa8_ec1841_0002_device::device_reset() @@ -1580,12 +1580,12 @@ WRITE8_MEMBER( isa8_ec1841_0002_device::io_write ) m_p3df = data; if (data & 1) { m_isa->install_memory(0xb8000, 0xb9fff, - read8_delegate( FUNC(isa8_ec1841_0002_device::char_ram_read), this), - write8_delegate(FUNC(isa8_ec1841_0002_device::char_ram_write), this) ); + read8_delegate( *this, FUNC(isa8_ec1841_0002_device::char_ram_read)), + write8_delegate(*this, FUNC(isa8_ec1841_0002_device::char_ram_write))); if(m_vram_size == 0x4000) m_isa->install_memory(0xbc000, 0xbdfff, - read8_delegate( FUNC(isa8_ec1841_0002_device::char_ram_read), this), - write8_delegate(FUNC(isa8_ec1841_0002_device::char_ram_write), this) ); + read8_delegate( *this, FUNC(isa8_ec1841_0002_device::char_ram_read)), + write8_delegate(*this, FUNC(isa8_ec1841_0002_device::char_ram_write))); } else { m_isa->install_bank(0xb8000, 0xb8000 + (std::min<size_t>)(0x8000, m_vram_size) - 1, "bank_cga", &m_vram[0]); if(m_vram_size == 0x4000) @@ -1699,7 +1699,7 @@ void isa8_cga_m24_device::device_add_mconfig(machine_config &config) isa8_cga_device::device_add_mconfig(config); subdevice<screen_device>(CGA_SCREEN_NAME)->set_raw(XTAL(14'318'181), 912, 0, 640, 462, 0, 400); - m_crtc->set_reconfigure_callback(FUNC(isa8_cga_m24_device::reconfigure), this); + m_crtc->set_reconfigure_callback(FUNC(isa8_cga_m24_device::reconfigure)); } isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : @@ -1912,8 +1912,8 @@ const tiny_rom_entry *isa8_cga_cportiii_device::device_rom_region() const void isa8_cga_cportiii_device::device_reset() { isa8_cga_m24_device::device_reset(); - m_isa->install_device(0x13c6, 0x13c7, read8_delegate(FUNC(isa8_cga_cportiii_device::port_13c6_r), this), write8_delegate(FUNC(isa8_cga_cportiii_device::port_13c6_w), this)); - m_isa->install_device(0x23c6, 0x23c7, read8_delegate(FUNC(isa8_cga_cportiii_device::port_23c6_r), this), write8_delegate(FUNC(isa8_cga_cportiii_device::port_23c6_w), this)); + m_isa->install_device(0x13c6, 0x13c7, read8_delegate(*this, FUNC(isa8_cga_cportiii_device::port_13c6_r)), write8_delegate(*this, FUNC(isa8_cga_cportiii_device::port_13c6_w))); + m_isa->install_device(0x23c6, 0x23c7, read8_delegate(*this, FUNC(isa8_cga_cportiii_device::port_23c6_r)), write8_delegate(*this, FUNC(isa8_cga_cportiii_device::port_23c6_w))); m_palette->set_pen_color(0, 100, 25, 0); m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x0000; m_chr_gen_offset[1] = m_chr_gen_offset[3] = 0x1000; @@ -1947,7 +1947,7 @@ WRITE8_MEMBER(isa8_cga_cportiii_device::port_23c6_w) { m_mode2 = data & 1; if(BIT(data, 3)) - m_isa->install_memory(0xb8000, 0xb9fff, read8_delegate(FUNC(isa8_cga_cportiii_device::char_ram_read), this), write8_delegate(FUNC(isa8_cga_cportiii_device::char_ram_write), this)); + m_isa->install_memory(0xb8000, 0xb9fff, read8_delegate(*this, FUNC(isa8_cga_cportiii_device::char_ram_read)), write8_delegate(*this, FUNC(isa8_cga_cportiii_device::char_ram_write))); else m_isa->install_bank(0xb8000, 0xb8000 + 0x8000 - 1, "bank_cga", &m_vram[0]); } diff --git a/src/devices/bus/isa/chessmdr.cpp b/src/devices/bus/isa/chessmdr.cpp index 00182d9e5ff..8af46575421 100644 --- a/src/devices/bus/isa/chessmdr.cpp +++ b/src/devices/bus/isa/chessmdr.cpp @@ -49,7 +49,7 @@ void isa8_chessmdr_device::device_reset() { // MAME doesn't allow reading ioport at device_start u16 port = ioport("DSW")->read() * 0x40 + 0x10; - m_isa->install_device(port, port+1, read8_delegate(FUNC(isa8_chessmdr_device::chessmdr_r), this), write8_delegate(FUNC(isa8_chessmdr_device::chessmdr_w), this)); + m_isa->install_device(port, port+1, read8_delegate(*this, FUNC(isa8_chessmdr_device::chessmdr_r)), write8_delegate(*this, FUNC(isa8_chessmdr_device::chessmdr_w))); m_installed = true; } diff --git a/src/devices/bus/isa/chessmsr.cpp b/src/devices/bus/isa/chessmsr.cpp index bd878b18a67..fb1485045dc 100644 --- a/src/devices/bus/isa/chessmsr.cpp +++ b/src/devices/bus/isa/chessmsr.cpp @@ -60,7 +60,7 @@ void isa8_chessmsr_device::device_reset() { // MAME doesn't allow reading ioport at device_start u16 port = ioport("DSW")->read() * 0x40 + 0x10; - m_isa->install_device(port, port+1, read8_delegate(FUNC(isa8_chessmsr_device::chessmsr_r), this), write8_delegate(FUNC(isa8_chessmsr_device::chessmsr_w), this)); + m_isa->install_device(port, port+1, read8_delegate(*this, FUNC(isa8_chessmsr_device::chessmsr_r)), write8_delegate(*this, FUNC(isa8_chessmsr_device::chessmsr_w))); m_maincpu->set_unscaled_clock(ioport("CPU")->read() ? (32_MHz_XTAL) : (30_MHz_XTAL/2)); diff --git a/src/devices/bus/isa/com.cpp b/src/devices/bus/isa/com.cpp index 6ab3c393ccd..4a1cc1ebd00 100644 --- a/src/devices/bus/isa/com.cpp +++ b/src/devices/bus/isa/com.cpp @@ -118,10 +118,10 @@ isa8_com_device::isa8_com_device(const machine_config &mconfig, device_type type void isa8_com_device::device_start() { set_isa_device(); - m_isa->install_device(0x03f8, 0x03ff, read8sm_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_0")), write8sm_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_0")) ); - m_isa->install_device(0x02f8, 0x02ff, read8sm_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_1")), write8sm_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_1")) ); -// m_isa->install_device(0x03e8, 0x03ef, read8sm_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_2")), write8sm_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_2")) ); -// m_isa->install_device(0x02e8, 0x02ef, read8sm_delegate(FUNC(ins8250_device::ins8250_r), subdevice<ins8250_uart_device>("uart_3")), write8sm_delegate(FUNC(ins8250_device::ins8250_w), subdevice<ins8250_uart_device>("uart_3")) ); + m_isa->install_device(0x03f8, 0x03ff, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_0"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_0"), FUNC(ins8250_device::ins8250_w))); + m_isa->install_device(0x02f8, 0x02ff, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_1"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_1"), FUNC(ins8250_device::ins8250_w))); +// m_isa->install_device(0x03e8, 0x03ef, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_2"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_2"), FUNC(ins8250_device::ins8250_w))); +// m_isa->install_device(0x02e8, 0x02ef, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_3"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_3"), FUNC(ins8250_device::ins8250_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp index da45a2ec18b..07aa5181a9d 100644 --- a/src/devices/bus/isa/dectalk.cpp +++ b/src/devices/bus/isa/dectalk.cpp @@ -224,7 +224,7 @@ READ8_MEMBER(dectalk_isa_device::read) void dectalk_isa_device::device_start() { set_isa_device(); - m_isa->install_device(0x0250, 0x0257, read8_delegate(FUNC(dectalk_isa_device::read), this), write8_delegate(FUNC(dectalk_isa_device::write), this)); + m_isa->install_device(0x0250, 0x0257, read8_delegate(*this, FUNC(dectalk_isa_device::read)), write8_delegate(*this, FUNC(dectalk_isa_device::write))); } void dectalk_isa_device::device_reset() diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp index 32175304f20..abca884e810 100644 --- a/src/devices/bus/isa/ega.cpp +++ b/src/devices/bus/isa/ega.cpp @@ -549,7 +549,7 @@ void isa8_ega_device::device_add_mconfig(machine_config &config) CRTC_EGA(config, m_crtc_ega, 16.257_MHz_XTAL/8); m_crtc_ega->set_screen(EGA_SCREEN_NAME); m_crtc_ega->config_set_hpixels_per_column(8); - m_crtc_ega->set_row_update_callback(FUNC(isa8_ega_device::ega_update_row), this); + m_crtc_ega->set_row_update_callback(FUNC(isa8_ega_device::ega_update_row)); m_crtc_ega->res_out_de_callback().set(FUNC(isa8_ega_device::de_changed)); m_crtc_ega->res_out_hsync_callback().set(FUNC(isa8_ega_device::hsync_changed)); m_crtc_ega->res_out_vsync_callback().set(FUNC(isa8_ega_device::vsync_changed)); @@ -637,9 +637,9 @@ void isa8_ega_device::device_start() m_plane[3] = m_videoram + 0x30000; m_isa->install_rom(this, 0xc0000, 0xc3fff, "ega", "user2"); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3b0_r)), write8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3c0_r)), write8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3d0_r)), write8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3d0_w))); } //------------------------------------------------- @@ -693,7 +693,7 @@ void isa8_ega_device::install_banks() case 0x00: /* 0xA0000, 128KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*this, FUNC(isa8_ega_device::read)), write8_delegate(*this, FUNC(isa8_ega_device::write))); } else { @@ -705,7 +705,7 @@ void isa8_ega_device::install_banks() case 0x04: /* 0xA0000, 64KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xa0000, 0xaffff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xa0000, 0xaffff, read8_delegate(*this, FUNC(isa8_ega_device::read)), write8_delegate(*this, FUNC(isa8_ega_device::write))); } else { @@ -718,7 +718,7 @@ void isa8_ega_device::install_banks() case 0x08: /* 0xB0000, 32KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xb0000, 0xb7fff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xb0000, 0xb7fff, read8_delegate(*this, FUNC(isa8_ega_device::read)), write8_delegate(*this, FUNC(isa8_ega_device::write))); } else { @@ -731,7 +731,7 @@ void isa8_ega_device::install_banks() case 0x0c: /* 0xB8000, 32KB */ if ( m_misc_output & 0x02 ) { - m_isa->install_memory(0xb8000, 0xbffff, read8_delegate(FUNC(isa8_ega_device::read), this), write8_delegate(FUNC(isa8_ega_device::write), this)); + m_isa->install_memory(0xb8000, 0xbffff, read8_delegate(*this, FUNC(isa8_ega_device::read)), write8_delegate(*this, FUNC(isa8_ega_device::write))); } else { diff --git a/src/devices/bus/isa/eis_sad8852.cpp b/src/devices/bus/isa/eis_sad8852.cpp index f4d634d1033..6e22a5f6d76 100644 --- a/src/devices/bus/isa/eis_sad8852.cpp +++ b/src/devices/bus/isa/eis_sad8852.cpp @@ -236,8 +236,8 @@ void isa16_sad8852_device::device_reset() { m_isa->install_device( 0x378, 0x378, // Wrong, need to find real i/o addresses - read8_delegate(FUNC( isa16_sad8852_device::sad8852_r ), this), - write8_delegate(FUNC( isa16_sad8852_device::sad8852_w ), this)); + read8_delegate(*this, FUNC(isa16_sad8852_device::sad8852_r)), + write8_delegate(*this, FUNC(isa16_sad8852_device::sad8852_w))); m_irq = m_isairq->read(); m_installed = true; } diff --git a/src/devices/bus/isa/finalchs.cpp b/src/devices/bus/isa/finalchs.cpp index 84b81220c42..da3cd23ec1b 100644 --- a/src/devices/bus/isa/finalchs.cpp +++ b/src/devices/bus/isa/finalchs.cpp @@ -58,7 +58,7 @@ void isa8_finalchs_device::device_reset() { // MAME doesn't allow reading ioport at device_start u16 port = ioport("DSW")->read() * 0x10 + 0x100; - m_isa->install_device(port, port+1, read8_delegate(FUNC(isa8_finalchs_device::finalchs_r), this), write8_delegate(FUNC(isa8_finalchs_device::finalchs_w), this)); + m_isa->install_device(port, port+1, read8_delegate(*this, FUNC(isa8_finalchs_device::finalchs_r)), write8_delegate(*this, FUNC(isa8_finalchs_device::finalchs_w))); m_installed = true; } diff --git a/src/devices/bus/isa/gblaster.cpp b/src/devices/bus/isa/gblaster.cpp index e579070fbf6..d3035091580 100644 --- a/src/devices/bus/isa/gblaster.cpp +++ b/src/devices/bus/isa/gblaster.cpp @@ -104,9 +104,9 @@ isa8_gblaster_device::isa8_gblaster_device(const machine_config &mconfig, const void isa8_gblaster_device::device_start() { set_isa_device(); - m_isa->install_device(0x0220, 0x0221, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_1_16_w), this ) ); - m_isa->install_device(0x0222, 0x0223, read8_delegate( FUNC(isa8_gblaster_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_gblaster_device::saa1099_2_16_w), this ) ); - m_isa->install_device(0x0224, 0x022F, read8_delegate( FUNC(isa8_gblaster_device::detect_r), this ), write8_delegate( FUNC(isa8_gblaster_device::detect_w), this ) ); + m_isa->install_device(0x0220, 0x0221, read8_delegate(*this, FUNC(isa8_gblaster_device::saa1099_16_r)), write8_delegate(*this, FUNC(isa8_gblaster_device::saa1099_1_16_w))); + m_isa->install_device(0x0222, 0x0223, read8_delegate(*this, FUNC(isa8_gblaster_device::saa1099_16_r)), write8_delegate(*this, FUNC(isa8_gblaster_device::saa1099_2_16_w))); + m_isa->install_device(0x0224, 0x022F, read8_delegate(*this, FUNC(isa8_gblaster_device::detect_r)), write8_delegate(*this, FUNC(isa8_gblaster_device::detect_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/gus.cpp b/src/devices/bus/isa/gus.cpp index 423c1e3629f..bb0d6e30b26 100644 --- a/src/devices/bus/isa/gus.cpp +++ b/src/devices/bus/isa/gus.cpp @@ -1296,10 +1296,10 @@ isa16_gus_device::isa16_gus_device(const machine_config &mconfig, const char *ta void isa16_gus_device::device_start() { set_isa_device(); - m_isa->install_device(0x0200, 0x0201, read8_delegate(FUNC(isa16_gus_device::joy_r),this), write8_delegate(FUNC(isa16_gus_device::joy_w),this) ); - m_isa->install_device(0x0220, 0x022f, read8_delegate(FUNC(isa16_gus_device::board_r),this), write8_delegate(FUNC(isa16_gus_device::board_w),this) ); - m_isa->install_device(0x0320, 0x0327, read8_delegate(FUNC(isa16_gus_device::synth_r),this), write8_delegate(FUNC(isa16_gus_device::synth_w),this) ); - m_isa->install_device(0x0388, 0x0389, read8_delegate(FUNC(isa16_gus_device::adlib_r),this), write8_delegate(FUNC(isa16_gus_device::adlib_w),this) ); + m_isa->install_device(0x0200, 0x0201, read8_delegate(*this, FUNC(isa16_gus_device::joy_r)), write8_delegate(*this, FUNC(isa16_gus_device::joy_w))); + m_isa->install_device(0x0220, 0x022f, read8_delegate(*this, FUNC(isa16_gus_device::board_r)), write8_delegate(*this, FUNC(isa16_gus_device::board_w))); + m_isa->install_device(0x0320, 0x0327, read8_delegate(*this, FUNC(isa16_gus_device::synth_r)), write8_delegate(*this, FUNC(isa16_gus_device::synth_w))); + m_isa->install_device(0x0388, 0x0389, read8_delegate(*this, FUNC(isa16_gus_device::adlib_r)), write8_delegate(*this, FUNC(isa16_gus_device::adlib_w))); } void isa16_gus_device::device_reset() diff --git a/src/devices/bus/isa/hdc.cpp b/src/devices/bus/isa/hdc.cpp index 2492d0eaa89..8d5d84bfe1e 100644 --- a/src/devices/bus/isa/hdc.cpp +++ b/src/devices/bus/isa/hdc.cpp @@ -987,7 +987,7 @@ isa8_hdc_ec1841_device::isa8_hdc_ec1841_device(const machine_config &mconfig, co void isa8_hdc_device::device_start() { set_isa_device(); - m_isa->install_device(0x0320, 0x0323, read8_delegate( FUNC(isa8_hdc_device::pc_hdc_r), this ), write8_delegate( FUNC(isa8_hdc_device::pc_hdc_w), this ) ); + m_isa->install_device(0x0320, 0x0323, read8_delegate(*this, FUNC(isa8_hdc_device::pc_hdc_r)), write8_delegate(*this, FUNC(isa8_hdc_device::pc_hdc_w))); m_isa->set_dma_channel(3, this, false); } diff --git a/src/devices/bus/isa/ibm_mfc.cpp b/src/devices/bus/isa/ibm_mfc.cpp index 40ce54ff6fc..b7f5d8e70b5 100644 --- a/src/devices/bus/isa/ibm_mfc.cpp +++ b/src/devices/bus/isa/ibm_mfc.cpp @@ -463,7 +463,7 @@ isa8_ibm_mfc_device::isa8_ibm_mfc_device(const machine_config &mconfig, const ch void isa8_ibm_mfc_device::device_start() { set_isa_device(); - m_isa->install_device(0x2a20, 0x2a20 + 15, read8_delegate(FUNC(isa8_ibm_mfc_device::ibm_mfc_r), this), write8_delegate(FUNC(isa8_ibm_mfc_device::ibm_mfc_w), this)); + m_isa->install_device(0x2a20, 0x2a20 + 15, read8_delegate(*this, FUNC(isa8_ibm_mfc_device::ibm_mfc_r)), write8_delegate(*this, FUNC(isa8_ibm_mfc_device::ibm_mfc_w))); } diff --git a/src/devices/bus/isa/lpt.cpp b/src/devices/bus/isa/lpt.cpp index e47404a498d..5c4baf5aaeb 100644 --- a/src/devices/bus/isa/lpt.cpp +++ b/src/devices/bus/isa/lpt.cpp @@ -45,14 +45,11 @@ void isa8_lpt_device::device_start() void isa8_lpt_device::device_reset() { m_is_primary = (ioport("DSW")->read() & 1) ? false : true; + pc_lpt_device &lpt(*subdevice<pc_lpt_device>("lpt")); if (m_is_primary) - { - m_isa->install_device(0x0378, 0x037b, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt"))); - } + m_isa->install_device(0x0378, 0x037b, read8_delegate(lpt, FUNC(pc_lpt_device::read)), write8_delegate(lpt, FUNC(pc_lpt_device::write))); else - { - m_isa->install_device(0x0278, 0x027b, read8_delegate(FUNC(pc_lpt_device::read), subdevice<pc_lpt_device>("lpt")), write8_delegate(FUNC(pc_lpt_device::write), subdevice<pc_lpt_device>("lpt"))); - } + m_isa->install_device(0x0278, 0x027b, read8_delegate(lpt, FUNC(pc_lpt_device::read)), write8_delegate(lpt, FUNC(pc_lpt_device::write))); } WRITE_LINE_MEMBER(isa8_lpt_device::pc_cpu_line) diff --git a/src/devices/bus/isa/mc1502_fdc.cpp b/src/devices/bus/isa/mc1502_fdc.cpp index 3f85534a72b..1760f602115 100644 --- a/src/devices/bus/isa/mc1502_fdc.cpp +++ b/src/devices/bus/isa/mc1502_fdc.cpp @@ -205,16 +205,12 @@ void mc1502_fdc_device::device_start() set_isa_device(); // BIOS 5.0-5.2x - m_isa->install_device(0x010c, 0x010f, - read8sm_delegate(FUNC(fd1793_device::read), m_fdc.target()), - write8sm_delegate(FUNC(fd1793_device::write), m_fdc.target())); - m_isa->install_device(0x0100, 0x010b, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) ); + m_isa->install_device(0x010c, 0x010f, read8sm_delegate(*m_fdc, FUNC(fd1793_device::read)), write8sm_delegate(*m_fdc, FUNC(fd1793_device::write))); + m_isa->install_device(0x0100, 0x010b, read8_delegate(*this, FUNC(mc1502_fdc_device::mc1502_fdc_r)), write8_delegate(*this, FUNC(mc1502_fdc_device::mc1502_fdc_w))); // BIOS 5.3x - m_isa->install_device(0x0048, 0x004b, - read8sm_delegate(FUNC(fd1793_device::read), m_fdc.target()), - write8sm_delegate(FUNC(fd1793_device::write), m_fdc.target())); - m_isa->install_device(0x004c, 0x004f, read8_delegate( FUNC(mc1502_fdc_device::mc1502_fdcv2_r), this ), write8_delegate( FUNC(mc1502_fdc_device::mc1502_fdc_w), this ) ); + m_isa->install_device(0x0048, 0x004b, read8sm_delegate(*m_fdc, FUNC(fd1793_device::read)), write8sm_delegate(*m_fdc, FUNC(fd1793_device::write))); + m_isa->install_device(0x004c, 0x004f, read8_delegate(*this, FUNC(mc1502_fdc_device::mc1502_fdcv2_r)), write8_delegate(*this, FUNC(mc1502_fdc_device::mc1502_fdc_w))); motor_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc1502_fdc_device::motor_callback),this)); motor_on = 0; diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp index eca9cbaa5a6..a620c891580 100644 --- a/src/devices/bus/isa/mda.cpp +++ b/src/devices/bus/isa/mda.cpp @@ -131,7 +131,7 @@ void isa8_mda_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(MDA_SCREEN_NAME); m_crtc->set_show_border_area(false); m_crtc->set_char_width(9); - m_crtc->set_update_row_callback(FUNC(isa8_mda_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(isa8_mda_device::crtc_update_row)); m_crtc->out_hsync_callback().set(FUNC(isa8_mda_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_mda_device::vsync_changed)); @@ -182,7 +182,7 @@ void isa8_mda_device::device_start() set_isa_device(); m_videoram.resize(0x1000); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_mda_device::io_read), this ), write8_delegate( FUNC(isa8_mda_device::io_write), this ) ); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_mda_device::io_read)), write8_delegate(*this, FUNC(isa8_mda_device::io_write))); m_isa->install_bank(0xb0000, 0xb0fff, "bank_mda", &m_videoram[0]); m_isa->install_bank(0xb1000, 0xb1fff, "bank_mda", &m_videoram[0]); m_isa->install_bank(0xb2000, 0xb2fff, "bank_mda", &m_videoram[0]); @@ -558,7 +558,7 @@ void isa8_hercules_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(HERCULES_SCREEN_NAME); m_crtc->set_show_border_area(false); m_crtc->set_char_width(9); - m_crtc->set_update_row_callback(FUNC(isa8_hercules_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(isa8_hercules_device::crtc_update_row)); m_crtc->out_hsync_callback().set(FUNC(isa8_mda_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_mda_device::vsync_changed)); @@ -601,7 +601,7 @@ void isa8_hercules_device::device_start() m_videoram.resize(0x10000); set_isa_device(); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_hercules_device::io_read), this ), write8_delegate( FUNC(isa8_hercules_device::io_write), this ) ); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_hercules_device::io_read)), write8_delegate(*this, FUNC(isa8_hercules_device::io_write))); m_isa->install_bank(0xb0000, 0xbffff, "bank_hercules", &m_videoram[0]); /* Initialise the mda palette */ @@ -772,7 +772,7 @@ void isa8_ec1840_0002_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(MDA_SCREEN_NAME); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(isa8_mda_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(isa8_mda_device::crtc_update_row)); m_crtc->out_hsync_callback().set(FUNC(isa8_mda_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_mda_device::vsync_changed)); } @@ -1094,7 +1094,7 @@ void isa8_epc_mda_device::device_add_mconfig(machine_config &config) m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(isa8_epc_mda_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(isa8_epc_mda_device::crtc_update_row)); m_crtc->out_hsync_callback().set(FUNC(isa8_epc_mda_device::hsync_changed)); m_crtc->out_vsync_callback().set(FUNC(isa8_epc_mda_device::vsync_changed)); @@ -1175,13 +1175,13 @@ void isa8_epc_mda_device::device_reset() if (m_installed == false) { - m_isa->install_device(0x3b0, 0x3bf, read8_delegate( FUNC(isa8_epc_mda_device::io_read), this ), write8_delegate( FUNC(isa8_epc_mda_device::io_write), this ) ); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_epc_mda_device::io_read)), write8_delegate(*this, FUNC(isa8_epc_mda_device::io_write))); m_isa->install_bank(0xb0000, 0xb7fff, "bank_epc", &m_videoram[0]); // Monochrome emulation mode VRAM address // This check allows a color monitor adapter to be installed at this address range if color emulation is disabled if (m_color_mode & 1) { - m_isa->install_device(0x3d0, 0x3df, read8_delegate( FUNC(isa8_epc_mda_device::io_read), this ), write8_delegate( FUNC(isa8_epc_mda_device::io_write), this ) ); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_epc_mda_device::io_read)), write8_delegate(*this, FUNC(isa8_epc_mda_device::io_write))); m_isa->install_bank(0xb8000, 0xbffff, "bank_epc", &m_videoram[0]); // Color emulation mode VRAM address, but same 32KB areas as there are only this amount on the board } m_installed = true; diff --git a/src/devices/bus/isa/mpu401.cpp b/src/devices/bus/isa/mpu401.cpp index 2ce9e1feae2..b7a49506094 100644 --- a/src/devices/bus/isa/mpu401.cpp +++ b/src/devices/bus/isa/mpu401.cpp @@ -77,7 +77,7 @@ void isa8_mpu401_device::device_start() { set_isa_device(); - m_isa->install_device(0x330, 0x0331, READ8_DEVICE_DELEGATE(m_mpu401, mpu401_device, mpu_r), WRITE8_DEVICE_DELEGATE(m_mpu401, mpu401_device, mpu_w)); + m_isa->install_device(0x330, 0x0331, read8_delegate(*m_mpu401, FUNC(mpu401_device::mpu_r)), write8_delegate(*m_mpu401, FUNC(mpu401_device::mpu_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/myb3k_com.cpp b/src/devices/bus/isa/myb3k_com.cpp index 88987e87e41..e2d6facff40 100644 --- a/src/devices/bus/isa/myb3k_com.cpp +++ b/src/devices/bus/isa/myb3k_com.cpp @@ -103,16 +103,16 @@ void isa8_myb3k_com_device::device_reset() // IO base factory setting is 0x540 uint32_t base = m_iobase->read(); m_isa->install_device(base, base + 1, - read8sm_delegate(FUNC(i8251_device::read), m_usart.target()), - write8sm_delegate(FUNC(i8251_device::write), m_usart.target()) ); + read8sm_delegate(*m_usart, FUNC(i8251_device::read)), + write8sm_delegate(*m_usart, FUNC(i8251_device::write))); m_isa->install_device(base + 2, base + 2, - read8_delegate(FUNC(isa8_myb3k_com_device::dce_status), this), - write8_delegate(FUNC(isa8_myb3k_com_device::dce_control), this) ); + read8_delegate(*this, FUNC(isa8_myb3k_com_device::dce_status)), + write8_delegate(*this, FUNC(isa8_myb3k_com_device::dce_control))); m_isa->install_device(base + 4, base + 7, - read8sm_delegate(FUNC(pit8253_device::read), subdevice<pit8253_device>("pit")), - write8sm_delegate(FUNC(pit8253_device::write), subdevice<pit8253_device>("pit")) ); + read8sm_delegate(*subdevice<pit8253_device>("pit"), FUNC(pit8253_device::read)), + write8sm_delegate(*subdevice<pit8253_device>("pit"), FUNC(pit8253_device::write))); m_irq = m_isairq->read(); m_installed = true; diff --git a/src/devices/bus/isa/ne1000.cpp b/src/devices/bus/isa/ne1000.cpp index 1eaef942105..0be12869dca 100644 --- a/src/devices/bus/isa/ne1000.cpp +++ b/src/devices/bus/isa/ne1000.cpp @@ -31,7 +31,7 @@ void ne1000_device::device_start() { memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install_device(0x0300, 0x031f, read8_delegate(FUNC(ne1000_device::ne1000_port_r), this), write8_delegate(FUNC(ne1000_device::ne1000_port_w), this)); + m_isa->install_device(0x0300, 0x031f, read8_delegate(*this, FUNC(ne1000_device::ne1000_port_r)), write8_delegate(*this, FUNC(ne1000_device::ne1000_port_w))); } void ne1000_device::device_reset() { diff --git a/src/devices/bus/isa/ne2000.cpp b/src/devices/bus/isa/ne2000.cpp index 3ad2cc592ef..246447836ba 100644 --- a/src/devices/bus/isa/ne2000.cpp +++ b/src/devices/bus/isa/ne2000.cpp @@ -31,7 +31,7 @@ void ne2000_device::device_start() { memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install16_device(0x0300, 0x031f, read16_delegate(FUNC(ne2000_device::ne2000_port_r), this), write16_delegate(FUNC(ne2000_device::ne2000_port_w), this)); + m_isa->install16_device(0x0300, 0x031f, read16_delegate(*this, FUNC(ne2000_device::ne2000_port_r)), write16_delegate(*this, FUNC(ne2000_device::ne2000_port_w))); } void ne2000_device::device_reset() { diff --git a/src/devices/bus/isa/num9rev.cpp b/src/devices/bus/isa/num9rev.cpp index ebe44a379f4..00e22a31101 100644 --- a/src/devices/bus/isa/num9rev.cpp +++ b/src/devices/bus/isa/num9rev.cpp @@ -94,13 +94,13 @@ void isa8_number_9_rev_device::device_start() { set_isa_device(); - m_isa->install_memory(0xc0000, 0xc0001, read8sm_delegate(FUNC(upd7220_device::read), (upd7220_device *)m_upd7220), write8sm_delegate(FUNC(upd7220_device::write), (upd7220_device *)m_upd7220)); - m_isa->install_memory(0xc0100, 0xc03ff, read8_delegate(FUNC(isa8_number_9_rev_device::pal8_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal8_w), this)); - m_isa->install_memory(0xc0400, 0xc0401, read8_delegate(FUNC(isa8_number_9_rev_device::bank_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::bank_w), this)); - m_isa->install_memory(0xc0500, 0xc06ff, read8_delegate(FUNC(isa8_number_9_rev_device::overlay_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::overlay_w), this)); - m_isa->install_memory(0xc0700, 0xc070f, read8_delegate(FUNC(isa8_number_9_rev_device::ctrl_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::ctrl_w), this)); - m_isa->install_memory(0xc1000, 0xc3fff, read8_delegate(FUNC(isa8_number_9_rev_device::pal12_r), this), write8_delegate(FUNC(isa8_number_9_rev_device::pal12_w), this)); - m_isa->install_memory(0xa0000, 0xaffff, read8_delegate(FUNC(isa8_number_9_rev_device::read8), this), write8_delegate(FUNC(isa8_number_9_rev_device::write8), this)); + m_isa->install_memory(0xc0000, 0xc0001, read8sm_delegate(*m_upd7220, FUNC(upd7220_device::read)), write8sm_delegate(*m_upd7220, FUNC(upd7220_device::write))); + m_isa->install_memory(0xc0100, 0xc03ff, read8_delegate(*this, FUNC(isa8_number_9_rev_device::pal8_r)), write8_delegate(*this, FUNC(isa8_number_9_rev_device::pal8_w))); + m_isa->install_memory(0xc0400, 0xc0401, read8_delegate(*this, FUNC(isa8_number_9_rev_device::bank_r)), write8_delegate(*this, FUNC(isa8_number_9_rev_device::bank_w))); + m_isa->install_memory(0xc0500, 0xc06ff, read8_delegate(*this, FUNC(isa8_number_9_rev_device::overlay_r)), write8_delegate(*this, FUNC(isa8_number_9_rev_device::overlay_w))); + m_isa->install_memory(0xc0700, 0xc070f, read8_delegate(*this, FUNC(isa8_number_9_rev_device::ctrl_r)), write8_delegate(*this, FUNC(isa8_number_9_rev_device::ctrl_w))); + m_isa->install_memory(0xc1000, 0xc3fff, read8_delegate(*this, FUNC(isa8_number_9_rev_device::pal12_r)), write8_delegate(*this, FUNC(isa8_number_9_rev_device::pal12_w))); + m_isa->install_memory(0xa0000, 0xaffff, read8_delegate(*this, FUNC(isa8_number_9_rev_device::read8)), write8_delegate(*this, FUNC(isa8_number_9_rev_device::write8))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index bea87f420ee..38560f26df6 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -309,7 +309,7 @@ void omti8621_device::device_reset() int esdi_base = io_bases[m_iobase->read() & 7]; // install the ESDI ports - m_isa->install16_device(esdi_base, esdi_base + 7, read16_delegate(FUNC(omti8621_device::read), this), write16_delegate(FUNC(omti8621_device::write), this)); + m_isa->install16_device(esdi_base, esdi_base + 7, read16_delegate(*this, FUNC(omti8621_device::read)), write16_delegate(*this, FUNC(omti8621_device::write))); // and the onboard AT FDC ports if (m_iobase->read() & 8) diff --git a/src/devices/bus/isa/p1_fdc.cpp b/src/devices/bus/isa/p1_fdc.cpp index 9b62451e65a..5d3b25b3d5a 100644 --- a/src/devices/bus/isa/p1_fdc.cpp +++ b/src/devices/bus/isa/p1_fdc.cpp @@ -174,10 +174,8 @@ void p1_fdc_device::device_start() { set_isa_device(); m_isa->install_rom(this, 0xe0000, 0xe07ff, "XXX", "p1_fdc"); - m_isa->install_device(0x00c0, 0x00c3, - read8sm_delegate(FUNC(fd1793_device::read), m_fdc.target()), - write8sm_delegate(FUNC(fd1793_device::write), m_fdc.target())); - m_isa->install_device(0x00c4, 0x00c7, read8_delegate( FUNC(p1_fdc_device::p1_fdc_r), this ), write8_delegate( FUNC(p1_fdc_device::p1_fdc_w), this ) ); + m_isa->install_device(0x00c0, 0x00c3, read8sm_delegate(*m_fdc, FUNC(fd1793_device::read)), write8sm_delegate(*m_fdc, FUNC(fd1793_device::write))); + m_isa->install_device(0x00c4, 0x00c7, read8_delegate(*this, FUNC(p1_fdc_device::p1_fdc_r)), write8_delegate(*this, FUNC(p1_fdc_device::p1_fdc_w))); } diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp index 129c7a6ce37..36f93811694 100644 --- a/src/devices/bus/isa/p1_hdc.cpp +++ b/src/devices/bus/isa/p1_hdc.cpp @@ -127,9 +127,7 @@ void p1_hdc_device::device_start() { set_isa_device(); m_isa->install_rom(this, 0xe2000, 0xe27ff, "XXX", "p1_hdc"); - m_isa->install_memory(0xd0000, 0xd0fff, - READ8_DELEGATE(p1_hdc_device, p1_HDC_r), - WRITE8_DELEGATE(p1_hdc_device, p1_HDC_w) ); + m_isa->install_memory(0xd0000, 0xd0fff, read8_delegate(*this, FUNC(p1_hdc_device::p1_HDC_r)), write8_delegate(*this, FUNC(p1_hdc_device::p1_HDC_w))); } diff --git a/src/devices/bus/isa/p1_sound.cpp b/src/devices/bus/isa/p1_sound.cpp index b8e37a57368..0311264fb44 100644 --- a/src/devices/bus/isa/p1_sound.cpp +++ b/src/devices/bus/isa/p1_sound.cpp @@ -161,28 +161,28 @@ void p1_sound_device::device_start() // EFC00 -- ADC output m_isa->install_memory(0xea000, 0xea01f, - read8_delegate(FUNC(p1_sound_device::adc_r), this), // XXX not really - write8_delegate(FUNC(p1_sound_device::dac_w), this)); + read8_delegate(*this, FUNC(p1_sound_device::adc_r)), // XXX not really + write8_delegate(*this, FUNC(p1_sound_device::dac_w))); m_isa->install_memory(0xee000, 0xee000, - read8smo_delegate(FUNC(i8251_device::data_r), m_midi.target()), - write8smo_delegate(FUNC(i8251_device::data_w), m_midi.target())); + read8smo_delegate(*m_midi, FUNC(i8251_device::data_r)), + write8smo_delegate(*m_midi, FUNC(i8251_device::data_w))); m_isa->install_memory(0xee002, 0xee002, - read8smo_delegate(FUNC(i8251_device::status_r), m_midi.target()), - write8smo_delegate(FUNC(i8251_device::control_w), m_midi.target())); + read8smo_delegate(*m_midi, FUNC(i8251_device::status_r)), + write8smo_delegate(*m_midi, FUNC(i8251_device::control_w))); // sync generator m_isa->install_memory(0xef000, 0xef007, - read8_delegate(FUNC(p1_sound_device::d14_r), this), - write8_delegate(FUNC(p1_sound_device::d14_w), this)); + read8_delegate(*this, FUNC(p1_sound_device::d14_r)), + write8_delegate(*this, FUNC(p1_sound_device::d14_w))); // 6 music channels m_isa->install_memory(0xef400, 0xef407, - read8_delegate(FUNC(p1_sound_device::d16_r), this), - write8_delegate(FUNC(p1_sound_device::d16_w), this)); + read8_delegate(*this, FUNC(p1_sound_device::d16_r)), + write8_delegate(*this, FUNC(p1_sound_device::d16_w))); m_isa->install_memory(0xef800, 0xef807, - read8_delegate(FUNC(p1_sound_device::d17_r), this), - write8_delegate(FUNC(p1_sound_device::d17_w), this)); + read8_delegate(*this, FUNC(p1_sound_device::d17_r)), + write8_delegate(*this, FUNC(p1_sound_device::d17_w))); } diff --git a/src/devices/bus/isa/pc1640_iga.cpp b/src/devices/bus/isa/pc1640_iga.cpp index dfab59f2e76..7b7b5a89354 100644 --- a/src/devices/bus/isa/pc1640_iga.cpp +++ b/src/devices/bus/isa/pc1640_iga.cpp @@ -102,7 +102,7 @@ void isa8_pc1640_iga_device::device_start() m_plane[3] = m_videoram + 0x30000; m_isa->install_rom(this, 0xc0000, 0xc7fff, "ega", "iga"); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3b0_r)), write8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3c0_r)), write8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3d0_r)), write8_delegate(*this, FUNC(isa8_ega_device::pc_ega8_3d0_w))); } diff --git a/src/devices/bus/isa/pcmidi.cpp b/src/devices/bus/isa/pcmidi.cpp index 94e52ae8f51..45cc41ff4f4 100644 --- a/src/devices/bus/isa/pcmidi.cpp +++ b/src/devices/bus/isa/pcmidi.cpp @@ -100,8 +100,8 @@ void isa8_pcmidi_device::device_reset() { offs_t ioaddr = BIT(m_config->read(), 0) ? 0x300 : 0x330; m_isa->install_device(ioaddr, ioaddr + 1, - read8sm_delegate(FUNC(isa8_pcmidi_device::host_r), this), - write8sm_delegate(FUNC(isa8_pcmidi_device::host_w), this)); + read8sm_delegate(*this, FUNC(isa8_pcmidi_device::host_r)), + write8sm_delegate(*this, FUNC(isa8_pcmidi_device::host_w))); set_host_irq(false); } diff --git a/src/devices/bus/isa/pds.cpp b/src/devices/bus/isa/pds.cpp index 65a35db2b14..dab0f498b63 100644 --- a/src/devices/bus/isa/pds.cpp +++ b/src/devices/bus/isa/pds.cpp @@ -6,7 +6,7 @@ * Used to connect up to two 8-bit systems to the PC, allowing the download of assembled code directly to the * target 8-bit system (Spectrum, CPC, MSX, C64 and maybe the BBC?) * - * The editor software require the ISA card to be present. + * The editor software requires the ISA card to be present. * * The PC end hardware consists of an 8-bit ISA card containing an 8255 PPI hooked up to the two connectors on the * back of the card. @@ -45,7 +45,7 @@ WRITE8_MEMBER(isa8_pds_device::ppi_w) void isa8_pds_device::device_start() { set_isa_device(); - m_isa->install_device(0x0300, 0x0307, read8_delegate(FUNC(isa8_pds_device::ppi_r),this), write8_delegate(FUNC(isa8_pds_device::ppi_w),this) ); + m_isa->install_device(0x0300, 0x0307, read8_delegate(*this, FUNC(isa8_pds_device::ppi_r)), write8_delegate(*this, FUNC(isa8_pds_device::ppi_w))); } void isa8_pds_device::device_reset() diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index 9e65cd819d0..4d7de335616 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -389,8 +389,7 @@ READ8_MEMBER(isa8_pgc_device::init_r) membank("eram")->set_base(m_eram.get()); LOG("INIT: mapping LUT\n"); - space.install_write_handler(0xf8400, 0xf85ff, - write8_delegate(FUNC(isa8_pgc_device::lut_w), this)); + space.install_write_handler(0xf8400, 0xf85ff, write8_delegate(*this, FUNC(isa8_pgc_device::lut_w))); return 0; // XXX ignored } diff --git a/src/devices/bus/isa/s3virge.cpp b/src/devices/bus/isa/s3virge.cpp index 5dae6c8afa2..959e9a2e79f 100644 --- a/src/devices/bus/isa/s3virge.cpp +++ b/src/devices/bus/isa/s3virge.cpp @@ -73,7 +73,7 @@ void s3virge_vga_device::device_start() vga.crtc.maximum_scan_line = 1; // copy over interfaces - vga.read_dipswitch = read8_delegate(); //read_dipswitch; + vga.read_dipswitch.set(nullptr); //read_dipswitch; vga.svga_intf.seq_regcount = 0x1c; vga.svga_intf.crtc_regcount = 0x19; vga.svga_intf.vram_size = 0x400000; diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp index f48cda320da..0f2123409f9 100644 --- a/src/devices/bus/isa/sb16.cpp +++ b/src/devices/bus/isa/sb16.cpp @@ -702,18 +702,18 @@ void sb16_lle_device::device_start() rom[i] = rom[i] ^ xor_table[i & 0x3f]; - ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); + ymf262_device &ymf262 = *subdevice<ymf262_device>("ymf262"); set_isa_device(); - m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb16_lle_device::invalid_r), this), write8_delegate(FUNC(sb16_lle_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb16_lle_device::host_data_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) ); - m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb16_lle_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::host_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb16_lle_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) ); - m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_lle_device::mpu401_r), this), write8_delegate(FUNC(sb16_lle_device::mpu401_w), this)); - m_isa->install_device(0x0388, 0x0389, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0220, 0x0223, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(*this, FUNC(sb16_lle_device::invalid_r)), write8_delegate(*this, FUNC(sb16_lle_device::dsp_reset_w))); + m_isa->install_device(0x022a, 0x022b, read8_delegate(*this, FUNC(sb16_lle_device::host_data_r)), write8_delegate(*this, FUNC(sb16_lle_device::invalid_w)) ); + m_isa->install_device(0x022c, 0x022d, read8_delegate(*this, FUNC(sb16_lle_device::dsp_wbuf_status_r)), write8_delegate(*this, FUNC(sb16_lle_device::host_cmd_w)) ); + m_isa->install_device(0x022e, 0x022f, read8_delegate(*this, FUNC(sb16_lle_device::dsp_rbuf_status_r)), write8_delegate(*this, FUNC(sb16_lle_device::invalid_w)) ); + m_isa->install_device(0x0330, 0x0331, read8_delegate(*this, FUNC(sb16_lle_device::mpu401_r)), write8_delegate(*this, FUNC(sb16_lle_device::mpu401_w))); + m_isa->install_device(0x0388, 0x0389, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0220, 0x0223, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0228, 0x0229, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); m_isa->set_dma_channel(1, this, false); m_isa->set_dma_channel(5, this, false); m_timer = timer_alloc(); diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 73e98a297f8..3e4ba9beca1 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -1251,23 +1251,23 @@ isa16_sblaster16_device::isa16_sblaster16_device(const machine_config &mconfig, void sb8_device::device_start() { - m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); - m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); + m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(*this, FUNC(sb_device::dsp_reset_r)), write8_delegate(*this, FUNC(sb_device::dsp_reset_w))); + m_isa->install_device(0x022a, 0x022b, read8_delegate(*this, FUNC(sb_device::dsp_data_r)), write8_delegate(*this, FUNC(sb_device::dsp_data_w))); + m_isa->install_device(0x022c, 0x022d, read8_delegate(*this, FUNC(sb_device::dsp_wbuf_status_r)), write8_delegate(*this, FUNC(sb_device::dsp_cmd_w))); + m_isa->install_device(0x022e, 0x022f, read8_delegate(*this, FUNC(sb_device::dsp_rbuf_status_r)), write8_delegate(*this, FUNC(sb_device::dsp_rbuf_status_w))); if(m_dsp.version >= 0x0301) { - ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); + ymf262_device &ymf262 = *subdevice<ymf262_device>("ymf262"); - m_isa->install_device(0x0388, 0x038b, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0220, 0x0223, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); + m_isa->install_device(0x0388, 0x038b, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0220, 0x0223, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0228, 0x0229, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); } else { - m_isa->install_device(0x0388, 0x0389, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) ); - m_isa->install_device(0x0228, 0x0229, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) ); + m_isa->install_device(0x0388, 0x0389, read8_delegate(*this, FUNC(sb8_device::ym3812_16_r)), write8_delegate(*this, FUNC(sb8_device::ym3812_16_w))); + m_isa->install_device(0x0228, 0x0229, read8_delegate(*this, FUNC(sb8_device::ym3812_16_r)), write8_delegate(*this, FUNC(sb8_device::ym3812_16_w))); } sb_device::device_start(); @@ -1277,8 +1277,8 @@ void isa8_sblaster1_0_device::device_start() { set_isa_device(); // 1.0 always has the SAA1099s for CMS back-compatibility - m_isa->install_device(0x0220, 0x0221, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_1_16_w), this ) ); - m_isa->install_device(0x0222, 0x0223, read8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_16_r), this ), write8_delegate( FUNC(isa8_sblaster1_0_device::saa1099_2_16_w), this ) ); + m_isa->install_device(0x0220, 0x0221, read8_delegate(*this, FUNC(isa8_sblaster1_0_device::saa1099_16_r)), write8_delegate(*this, FUNC(isa8_sblaster1_0_device::saa1099_1_16_w))); + m_isa->install_device(0x0222, 0x0223, read8_delegate(*this, FUNC(isa8_sblaster1_0_device::saa1099_16_r)), write8_delegate(*this, FUNC(isa8_sblaster1_0_device::saa1099_2_16_w))); m_isa->set_dma_channel(1, this, false); m_dsp.version = 0x0105; sb8_device::device_start(); @@ -1295,17 +1295,17 @@ void isa8_sblaster1_5_device::device_start() void sb16_device::device_start() { - ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262"); - m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) ); - m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) ); - m_isa->install_device(0x0224, 0x0225, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this)); - m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_device::mpu401_r), this), write8_delegate(FUNC(sb16_device::mpu401_w), this)); - m_isa->install_device(0x0388, 0x038b, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0220, 0x0223, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); - m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262)); + ymf262_device &ymf262 = *subdevice<ymf262_device>("ymf262"); + m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(*this, FUNC(sb_device::dsp_reset_r)), write8_delegate(*this, FUNC(sb_device::dsp_reset_w))); + m_isa->install_device(0x022a, 0x022b, read8_delegate(*this, FUNC(sb_device::dsp_data_r)), write8_delegate(*this, FUNC(sb_device::dsp_data_w))); + m_isa->install_device(0x022c, 0x022d, read8_delegate(*this, FUNC(sb_device::dsp_wbuf_status_r)), write8_delegate(*this, FUNC(sb_device::dsp_cmd_w))); + m_isa->install_device(0x022e, 0x022f, read8_delegate(*this, FUNC(sb_device::dsp_rbuf_status_r)), write8_delegate(*this, FUNC(sb_device::dsp_rbuf_status_w))); + m_isa->install_device(0x0224, 0x0225, read8_delegate(*this, FUNC(sb16_device::mixer_r)), write8_delegate(*this, FUNC(sb16_device::mixer_w))); + m_isa->install_device(0x0330, 0x0331, read8_delegate(*this, FUNC(sb16_device::mpu401_r)), write8_delegate(*this, FUNC(sb16_device::mpu401_w))); + m_isa->install_device(0x0388, 0x038b, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0220, 0x0223, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); + m_isa->install_device(0x0228, 0x0229, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); save_item(NAME(m_mixer.data)); save_item(NAME(m_mixer.status)); diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp index 92f049f0402..eaa3d7ba2c4 100644 --- a/src/devices/bus/isa/sc499.cpp +++ b/src/devices/bus/isa/sc499.cpp @@ -389,7 +389,7 @@ void sc499_device::device_reset() m_irq = m_irqdrq->read() & 7; m_drq = m_irqdrq->read()>>4; - m_isa->install_device(base, base+7, read8_delegate(FUNC(sc499_device::read), this), write8_delegate(FUNC(sc499_device::write), this)); + m_isa->install_device(base, base+7, read8_delegate(*this, FUNC(sc499_device::read)), write8_delegate(*this, FUNC(sc499_device::write))); m_isa->set_dma_channel(m_drq, this, true); m_installed = true; diff --git a/src/devices/bus/isa/side116.cpp b/src/devices/bus/isa/side116.cpp index 19c806ec8be..e11b8588d60 100644 --- a/src/devices/bus/isa/side116.cpp +++ b/src/devices/bus/isa/side116.cpp @@ -121,7 +121,7 @@ void side116_device::device_reset() // install io access if ((m_config->read() & 0x20) == 0x20) - m_isa->install_device(0x360, 0x36f, read8_delegate(FUNC(side116_device::read), this), write8_delegate(FUNC(side116_device::write), this)); + m_isa->install_device(0x360, 0x36f, read8_delegate(*this, FUNC(side116_device::read)), write8_delegate(*this, FUNC(side116_device::write))); } diff --git a/src/devices/bus/isa/ssi2001.cpp b/src/devices/bus/isa/ssi2001.cpp index 2c433321847..bff7a4c7d92 100644 --- a/src/devices/bus/isa/ssi2001.cpp +++ b/src/devices/bus/isa/ssi2001.cpp @@ -29,11 +29,10 @@ ssi2001_device::ssi2001_device(const machine_config &mconfig, const char *tag, d void ssi2001_device::device_start() { set_isa_device(); - m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0280, 0x029F, read8sm_delegate(FUNC(mos6581_device::read), subdevice<mos6581_device>("sid6581")), write8sm_delegate(FUNC(mos6581_device::write), subdevice<mos6581_device>("sid6581"))); + m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0280, 0x029F, read8sm_delegate(*subdevice<mos6581_device>("sid6581"), FUNC(mos6581_device::read)), write8sm_delegate(*subdevice<mos6581_device>("sid6581"), FUNC(mos6581_device::write))); } - void ssi2001_device::device_reset() { } diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp index 71ea8dfbe25..9a12302d7c0 100644 --- a/src/devices/bus/isa/stereo_fx.cpp +++ b/src/devices/bus/isa/stereo_fx.cpp @@ -207,16 +207,16 @@ stereo_fx_device::stereo_fx_device(const machine_config &mconfig, const char *ta void stereo_fx_device::device_start() { - ym3812_device *ym3812 = subdevice<ym3812_device>("ym3812"); + ym3812_device &ym3812 = *subdevice<ym3812_device>("ym3812"); set_isa_device(); - m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy"))); - m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(stereo_fx_device::invalid_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_reset_w), this)); - m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(stereo_fx_device::dsp_data_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) ); - m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(stereo_fx_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_cmd_w), this) ); - m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(stereo_fx_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) ); - m_isa->install_device(0x0388, 0x0389, read8sm_delegate(FUNC(ym3812_device::read), ym3812), write8sm_delegate(FUNC(ym3812_device::write), ym3812)); - m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ym3812_device::read), ym3812), write8sm_delegate(FUNC(ym3812_device::write), ym3812)); + m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice<pc_joy_device>("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0226, 0x0227, read8_delegate(*this, FUNC(stereo_fx_device::invalid_r)), write8_delegate(*this, FUNC(stereo_fx_device::dsp_reset_w))); + m_isa->install_device(0x022a, 0x022b, read8_delegate(*this, FUNC(stereo_fx_device::dsp_data_r)), write8_delegate(*this, FUNC(stereo_fx_device::invalid_w))); + m_isa->install_device(0x022c, 0x022d, read8_delegate(*this, FUNC(stereo_fx_device::dsp_wbuf_status_r)), write8_delegate(*this, FUNC(stereo_fx_device::dsp_cmd_w))); + m_isa->install_device(0x022e, 0x022f, read8_delegate(*this, FUNC(stereo_fx_device::dsp_rbuf_status_r)), write8_delegate(*this, FUNC(stereo_fx_device::invalid_w))); + m_isa->install_device(0x0388, 0x0389, read8sm_delegate(ym3812, FUNC(ym3812_device::read)), write8sm_delegate(ym3812, FUNC(ym3812_device::write))); + m_isa->install_device(0x0228, 0x0229, read8sm_delegate(ym3812, FUNC(ym3812_device::read)), write8sm_delegate(ym3812, FUNC(ym3812_device::write))); m_timer = timer_alloc(); m_timer->adjust(attotime::from_hz(2000000), 0, attotime::from_hz(2000000)); m_isa->set_dma_channel(1, this, false); diff --git a/src/devices/bus/isa/svga_cirrus.cpp b/src/devices/bus/isa/svga_cirrus.cpp index 7ee541184d2..74b3c581a39 100644 --- a/src/devices/bus/isa/svga_cirrus.cpp +++ b/src/devices/bus/isa/svga_cirrus.cpp @@ -36,7 +36,7 @@ void isa16_svga_cirrus_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5430_device::screen_update)); - CIRRUS_GD5430(config, "vga", 0).set_screen("screen"); + CIRRUS_GD5430(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -59,7 +59,7 @@ const tiny_rom_entry *isa16_svga_cirrus_device::device_rom_region() const isa16_svga_cirrus_device::isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_SVGA_CIRRUS, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -72,15 +72,13 @@ void isa16_svga_cirrus_device::device_start() { set_isa_device(); - m_vga = subdevice<cirrus_gd5430_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "dm_clgd5430"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(cirrus_gd5430_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(cirrus_gd5430_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(cirrus_gd5430_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(cirrus_gd5430_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::mem_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::mem_w))); } //------------------------------------------------- @@ -116,7 +114,7 @@ void isa16_svga_cirrus_gd542x_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5428_device::screen_update)); - CIRRUS_GD5428(config, "vga", 0).set_screen("screen"); + CIRRUS_GD5428(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -139,7 +137,7 @@ const tiny_rom_entry *isa16_svga_cirrus_gd542x_device::device_rom_region() const isa16_svga_cirrus_gd542x_device::isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_SVGA_CIRRUS_GD542X, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -152,15 +150,13 @@ void isa16_svga_cirrus_gd542x_device::device_start() { set_isa_device(); - m_vga = subdevice<cirrus_gd5428_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "clgd542x"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(cirrus_gd5428_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(cirrus_gd5428_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(cirrus_gd5428_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(cirrus_gd5428_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::mem_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_cirrus.h b/src/devices/bus/isa/svga_cirrus.h index 46b0cfcfc04..c1a97a5730b 100644 --- a/src/devices/bus/isa/svga_cirrus.h +++ b/src/devices/bus/isa/svga_cirrus.h @@ -32,7 +32,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - cirrus_gd5430_device *m_vga; + required_device<cirrus_gd5430_device> m_vga; }; class isa16_svga_cirrus_gd542x_device : @@ -55,7 +55,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - cirrus_gd5428_device *m_vga; + required_device<cirrus_gd5428_device> m_vga; }; diff --git a/src/devices/bus/isa/svga_s3.cpp b/src/devices/bus/isa/svga_s3.cpp index 0734a286998..ddac8fc77c1 100644 --- a/src/devices/bus/isa/svga_s3.cpp +++ b/src/devices/bus/isa/svga_s3.cpp @@ -44,9 +44,9 @@ void isa16_svga_s3_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(s3_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(s3_vga_device::screen_update)); - S3_VGA(config, "vga", 0).set_screen("screen"); + S3_VGA(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -69,7 +69,7 @@ const tiny_rom_entry *isa16_svga_s3_device::device_rom_region() const isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_SVGA_S3, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr), m_8514(nullptr) + m_vga(*this, "vga"), m_8514(*this, "vga:8514a") { } @@ -82,32 +82,29 @@ void isa16_svga_s3_device::device_start() { set_isa_device(); - m_vga = subdevice<s3_vga_device>("vga"); - m_8514 = subdevice<ibm8514a_device>("vga:8514a"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3_764"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3_vga_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_currenty_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_currenty_w),m_8514)); - m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_currentx_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_currentx_w),m_8514)); - m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_desty_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_desty_w),m_8514)); - m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_destx_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_destx_w),m_8514)); - m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_line_error_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_line_error_w),m_8514)); - m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_width_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_width_w),m_8514)); - m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_gpstatus_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_cmd_w),m_8514)); - m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_ssv_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_ssv_w),m_8514)); - m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_bgcolour_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_bgcolour_w),m_8514)); - m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_fgcolour_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_fgcolour_w),m_8514)); - m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_w),m_8514)); - m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_w),m_8514)); - m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_backmix_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_backmix_w),m_8514)); - m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_foremix_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_foremix_w),m_8514)); - m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_multifunc_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_multifunc_w),m_8514)); - m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(ibm8514a_device::ibm8514_pixel_xfer_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_pixel_xfer_w),m_8514)); - - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3_vga_device::mem_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::port_03d0_w))); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currenty_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currenty_w))); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currentx_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currentx_w))); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_desty_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_desty_w))); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_destx_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_destx_w))); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_line_error_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_line_error_w))); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_width_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_width_w))); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_gpstatus_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_cmd_w))); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_ssv_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_ssv_w))); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_bgcolour_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_bgcolour_w))); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_fgcolour_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_fgcolour_w))); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_write_mask_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_write_mask_w))); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_read_mask_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_read_mask_w))); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_backmix_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_backmix_w))); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_foremix_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_foremix_w))); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_multifunc_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_multifunc_w))); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_pixel_xfer_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_pixel_xfer_w))); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::mem_w))); } //------------------------------------------------- @@ -150,9 +147,9 @@ void isa16_s3virge_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(s3virge_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(s3virge_vga_device::screen_update)); - S3VIRGE(config, "vga", 0).set_screen("screen"); + S3VIRGE(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -175,7 +172,7 @@ const tiny_rom_entry *isa16_s3virge_device::device_rom_region() const isa16_s3virge_device::isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_S3VIRGE, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -188,15 +185,13 @@ void isa16_s3virge_device::device_start() { set_isa_device(); - m_vga = subdevice<s3virge_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virge"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); } //------------------------------------------------- @@ -231,9 +226,9 @@ void isa16_s3virgedx_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(s3virgedx_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(s3virgedx_vga_device::screen_update)); - S3VIRGEDX(config, "vga", 0).set_screen("screen"); + S3VIRGEDX(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -256,7 +251,7 @@ const tiny_rom_entry *isa16_s3virgedx_device::device_rom_region() const isa16_s3virgedx_device::isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_S3VIRGEDX, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -269,15 +264,13 @@ void isa16_s3virgedx_device::device_start() { set_isa_device(); - m_vga = subdevice<s3virgedx_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virgedx"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); } //------------------------------------------------- @@ -313,9 +306,9 @@ void isa16_stealth3d2kpro_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(s3virgedx_rev1_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(s3virgedx_rev1_vga_device::screen_update)); - S3VIRGEDX1(config, "vga", 0).set_screen("screen"); + S3VIRGEDX1(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -338,7 +331,7 @@ const tiny_rom_entry *isa16_stealth3d2kpro_device::device_rom_region() const isa16_stealth3d2kpro_device::isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_DMS3D2KPRO, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -351,15 +344,13 @@ void isa16_stealth3d2kpro_device::device_start() { set_isa_device(); - m_vga = subdevice<s3virgedx_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "stealth3d"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(FUNC(s3virge_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(FUNC(s3virge_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(FUNC(s3virge_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(s3virge_vga_device::mem_r),m_vga), write8_delegate(FUNC(s3virge_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_s3.h b/src/devices/bus/isa/svga_s3.h index f60141518de..3889a2ed8e8 100644 --- a/src/devices/bus/isa/svga_s3.h +++ b/src/devices/bus/isa/svga_s3.h @@ -35,8 +35,8 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - s3_vga_device *m_vga; - ibm8514a_device *m_8514; + required_device<s3_vga_device> m_vga; + required_device<ibm8514a_device> m_8514; }; class isa16_s3virge_device : @@ -59,7 +59,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - s3virge_vga_device *m_vga; + required_device<s3virge_vga_device> m_vga; }; class isa16_s3virgedx_device : @@ -82,7 +82,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - s3virgedx_vga_device *m_vga; + required_device<s3virgedx_vga_device> m_vga; }; class isa16_stealth3d2kpro_device : @@ -105,7 +105,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - s3virgedx_vga_device *m_vga; + required_device<s3virgedx_vga_device> m_vga; }; diff --git a/src/devices/bus/isa/svga_trident.cpp b/src/devices/bus/isa/svga_trident.cpp index 31f2120f548..bc07c57a425 100644 --- a/src/devices/bus/isa/svga_trident.cpp +++ b/src/devices/bus/isa/svga_trident.cpp @@ -34,9 +34,9 @@ void isa16_svga_tgui9680_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(trident_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(trident_vga_device::screen_update)); - TRIDENT_VGA(config, "vga", 0).set_screen("screen"); + TRIDENT_VGA(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -59,7 +59,7 @@ const tiny_rom_entry *isa16_svga_tgui9680_device::device_rom_region() const isa16_svga_tgui9680_device::isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_SVGA_TGUI9680, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -72,26 +72,24 @@ void isa16_svga_tgui9680_device::device_start() { set_isa_device(); - m_vga = subdevice<trident_vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "tgui9680", "tgui9680"); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(trident_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(trident_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(trident_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_03d0_w),m_vga)); - m_isa->install_device(0x43c4, 0x43cb, read8_delegate(FUNC(trident_vga_device::port_43c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_43c6_w),m_vga)); - m_isa->install_device(0x83c4, 0x83cb, read8_delegate(FUNC(trident_vga_device::port_83c6_r),m_vga), write8_delegate(FUNC(trident_vga_device::port_83c6_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(trident_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(trident_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(trident_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_03d0_w))); + m_isa->install_device(0x43c4, 0x43cb, read8_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_w))); + m_isa->install_device(0x83c4, 0x83cb, read8_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(trident_vga_device::mem_r),m_vga), write8_delegate(FUNC(trident_vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(trident_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::mem_w))); // uncomment to test Windows 3.1 TGUI9440AGi driver -// m_isa->install_memory(0x4400000, 0x45fffff, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga)); +// m_isa->install_memory(0x4400000, 0x45fffff, read8_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::vram_w))); // win95 drivers -// m_isa->install_memory(0x4000000, 0x41fffff, read8_delegate(FUNC(trident_vga_device::vram_r),m_vga), write8_delegate(FUNC(trident_vga_device::vram_w),m_vga)); +// m_isa->install_memory(0x4000000, 0x41fffff, read8_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8_delegate(FUNC(*m_vga, trident_vga_device::vram_w))); // acceleration ports - m_isa->install_device(0x2120, 0x21ff, read8_delegate(FUNC(trident_vga_device::accel_r),m_vga), write8_delegate(FUNC(trident_vga_device::accel_w),m_vga)); + m_isa->install_device(0x2120, 0x21ff, read8_delegate(*m_vga, FUNC(trident_vga_device::accel_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::accel_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_trident.h b/src/devices/bus/isa/svga_trident.h index d8be1458591..47019e6b16e 100644 --- a/src/devices/bus/isa/svga_trident.h +++ b/src/devices/bus/isa/svga_trident.h @@ -39,7 +39,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - trident_vga_device *m_vga; + required_device<trident_vga_device> m_vga; }; diff --git a/src/devices/bus/isa/svga_tseng.cpp b/src/devices/bus/isa/svga_tseng.cpp index 354643fd96d..53dc3d72a5d 100644 --- a/src/devices/bus/isa/svga_tseng.cpp +++ b/src/devices/bus/isa/svga_tseng.cpp @@ -33,9 +33,9 @@ void isa8_svga_et4k_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(tseng_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(tseng_vga_device::screen_update)); - TSENG_VGA(config, "vga", 0).set_screen("screen"); + TSENG_VGA(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -58,7 +58,7 @@ const tiny_rom_entry *isa8_svga_et4k_device::device_rom_region() const isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA8_SVGA_ET4K, tag, owner, clock), device_isa8_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -71,8 +71,6 @@ void isa8_svga_et4k_device::device_start() { set_isa_device(); - m_vga = subdevice<tseng_vga_device>("vga"); - map_io(); map_ram(); map_rom(); @@ -104,14 +102,14 @@ void isa8_svga_et4k_device::remap(int space_id, offs_t start, offs_t end) void isa8_svga_et4k_device::map_io() { - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(tseng_vga_device::port_03b0_r), m_vga), write8_delegate(FUNC(tseng_vga_device::port_03b0_w), m_vga)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(tseng_vga_device::port_03c0_r), m_vga), write8_delegate(FUNC(tseng_vga_device::port_03c0_w), m_vga)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(tseng_vga_device::port_03d0_r), m_vga), write8_delegate(FUNC(tseng_vga_device::port_03d0_w), m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(tseng_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(tseng_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(tseng_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::port_03d0_w))); } void isa8_svga_et4k_device::map_ram() { - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(tseng_vga_device::mem_r), m_vga), write8_delegate(FUNC(tseng_vga_device::mem_w), m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(tseng_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::mem_w))); } void isa8_svga_et4k_device::map_rom() diff --git a/src/devices/bus/isa/svga_tseng.h b/src/devices/bus/isa/svga_tseng.h index f83460e86ff..f267aad2634 100644 --- a/src/devices/bus/isa/svga_tseng.h +++ b/src/devices/bus/isa/svga_tseng.h @@ -39,7 +39,7 @@ private: void map_io(); void map_ram(); void map_rom(); - tseng_vga_device *m_vga; + required_device<tseng_vga_device> m_vga; }; diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp index a3cd123305b..9110c2205ef 100644 --- a/src/devices/bus/isa/trident.cpp +++ b/src/devices/bus/isa/trident.cpp @@ -169,7 +169,7 @@ void trident_vga_device::device_start() // copy over interfaces - vga.read_dipswitch = read8_delegate(); //read_dipswitch; + vga.read_dipswitch.set(nullptr); //read_dipswitch; vga.svga_intf.vram_size = 0x200000; vga.memory.resize(vga.svga_intf.vram_size); diff --git a/src/devices/bus/isa/vga.cpp b/src/devices/bus/isa/vga.cpp index 121f689d711..3fafec340b0 100644 --- a/src/devices/bus/isa/vga.cpp +++ b/src/devices/bus/isa/vga.cpp @@ -31,9 +31,9 @@ void isa8_vga_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(vga_device::screen_update)); - VGA(config, "vga", 0).set_screen("screen"); + VGA(config, m_vga, 0).set_screen("screen"); } //------------------------------------------------- @@ -55,7 +55,8 @@ const tiny_rom_entry *isa8_vga_device::device_rom_region() const isa8_vga_device::isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA8_VGA, tag, owner, clock), - device_isa8_card_interface(mconfig, *this), m_vga(nullptr) + device_isa8_card_interface(mconfig, *this), + m_vga(*this, "vga") { } @@ -68,15 +69,13 @@ void isa8_vga_device::device_start() { set_isa_device(); - m_vga = subdevice<vga_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "ibm_vga", "ibm_vga"); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(vga_device::port_03d0_w),m_vga)); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(vga_device::mem_r),m_vga), write8_delegate(FUNC(vga_device::mem_w),m_vga)); + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(vga_device::mem_r)), write8_delegate(*m_vga, FUNC(vga_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/vga.h b/src/devices/bus/isa/vga.h index 856016ecc5a..4f18d8ff053 100644 --- a/src/devices/bus/isa/vga.h +++ b/src/devices/bus/isa/vga.h @@ -34,7 +34,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - vga_device *m_vga; + required_device<vga_device> m_vga; }; diff --git a/src/devices/bus/isa/vga_ati.cpp b/src/devices/bus/isa/vga_ati.cpp index 63f9a1ec987..37617ae62d4 100644 --- a/src/devices/bus/isa/vga_ati.cpp +++ b/src/devices/bus/isa/vga_ati.cpp @@ -80,27 +80,27 @@ void isa16_vga_gfxultra_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(ati_vga_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(ati_vga_device::screen_update)); - ATI_VGA(config, "vga", 0).set_screen("screen"); + ATI_VGA(config, m_vga, 0).set_screen("screen"); } void isa16_vga_gfxultrapro_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(mach32_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(mach32_device::screen_update)); - ATIMACH32(config, "vga", 0).set_screen("screen"); + ATIMACH32(config, m_vga, 0).set_screen("screen"); } void isa16_vga_mach64_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); - screen.set_screen_update("vga", FUNC(mach64_device::screen_update)); + screen.set_screen_update(m_vga, FUNC(mach64_device::screen_update)); - ATIMACH64(config, "vga", 0).set_screen("screen"); + ATIMACH64(config, m_vga, 0).set_screen("screen"); } @@ -134,21 +134,21 @@ const tiny_rom_entry *isa16_vga_mach64_device::device_rom_region() const isa16_vga_gfxultra_device::isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_VGA_GFXULTRA, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr), m_8514(nullptr) + m_vga(*this, "vga"), m_8514(*this, "vga:8514a") { } isa16_vga_gfxultrapro_device::isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_SVGA_GFXULTRAPRO, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } isa16_vga_mach64_device::isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ISA16_SVGA_MACH64, tag, owner, clock), device_isa16_card_interface(mconfig, *this), - m_vga(nullptr) + m_vga(*this, "vga") { } @@ -163,199 +163,192 @@ void isa16_vga_gfxultra_device::device_start() { set_isa_device(); - m_vga = subdevice<ati_vga_device>("vga"); - m_8514 = subdevice<mach8_device>("vga:8514a"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "gfxultra"); - m_isa->install_device(0x1ce, 0x1cf, read8_delegate(FUNC(ati_vga_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(ati_vga_device::ati_port_ext_w),m_vga)); - m_isa->install_device(0x2e8, 0x2ef, read8_delegate(FUNC(mach8_device::ibm8514_status_r),m_8514), write8_delegate(FUNC(mach8_device::ibm8514_htotal_w),m_8514)); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(ati_vga_device::port_03b0_r),m_vga), write8_delegate(FUNC(vga_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(ati_vga_device::port_03c0_r),m_vga), write8_delegate(FUNC(vga_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(ati_vga_device::port_03d0_r),m_vga), write8_delegate(FUNC(vga_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(FUNC(mach8_device::ibm8514_vtotal_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vtotal_w),m_8514)); - m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(FUNC(mach8_device::mach8_config1_r),m_8514), write16_delegate()); - m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(FUNC(mach8_device::ibm8514_vdisp_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vdisp_w),m_8514)); - m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(FUNC(mach8_device::mach8_config2_r),m_8514), write16_delegate()); - m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(FUNC(mach8_device::ibm8514_vsync_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_vsync_w),m_8514)); - m_isa->install16_device(0x22e8, 0x22eb, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514),write16_delegate(FUNC(mach8_device::ibm8514_display_ctrl_w),m_8514)); - m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(FUNC(mach8_device::ibm8514_htotal_r),m_8514),write16_delegate()); - m_isa->install16_device(0x26ec, 0x26ef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514),write16_delegate(FUNC(mach8_device::mach8_crt_pitch_w),m_8514)); - m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(FUNC(mach8_device::ibm8514_subcontrol_r),m_8514),write16_delegate()); - m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(FUNC(mach8_device::ibm8514_substatus_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_subcontrol_w),m_8514)); - m_isa->install16_device(0x4ae8, 0x4aeb, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_advfunc_w),m_8514)); - m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(FUNC(mach8_device::mach8_clksel_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_clksel_w),m_8514)); - m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(FUNC(mach8_device::mach8_ec0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec0_w),m_8514)); - m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(FUNC(mach8_device::mach8_scratch0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scratch0_w),m_8514)); - m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(FUNC(mach8_device::mach8_ec1_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec1_w),m_8514)); - m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(FUNC(mach8_device::mach8_scratch0_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scratch0_w),m_8514)); - m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(FUNC(mach8_device::mach8_ec2_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec2_w),m_8514)); - m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(FUNC(mach8_device::mach8_ec3_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ec3_w),m_8514)); - m_isa->install16_device(0x6eec, 0x6eef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ge_offset_l_w),m_8514)); - m_isa->install16_device(0x72ec, 0x72ef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ge_offset_h_w),m_8514)); - m_isa->install16_device(0x76ec, 0x76ef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ge_pitch_w),m_8514)); - m_isa->install16_device(0x7aec, 0x7aef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ge_ext_config_w),m_8514)); - m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(mach8_device::ibm8514_currenty_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_currenty_w),m_8514)); - m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(mach8_device::ibm8514_currentx_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_currentx_w),m_8514)); - m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(mach8_device::ibm8514_desty_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_desty_w),m_8514)); - m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(mach8_device::ibm8514_destx_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_destx_w),m_8514)); - m_isa->install16_device(0x8eec, 0x8eef, read16_delegate(FUNC(mach8_device::mach8_ge_ext_config_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_patt_data_w),m_8514)); - m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(mach8_device::ibm8514_line_error_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_line_error_w),m_8514)); - m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(mach8_device::ibm8514_width_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_width_w),m_8514)); - m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(FUNC(mach8_device::mach8_bresenham_count_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_bresenham_count_w),m_8514)); - m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(mach8_device::ibm8514_gpstatus_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_cmd_w),m_8514)); - m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(FUNC(mach8_device::mach8_ext_fifo_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_linedraw_index_w),m_8514)); - m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(mach8_device::ibm8514_ssv_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_ssv_w),m_8514)); - m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(mach8_device::ibm8514_bgcolour_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_bgcolour_w),m_8514)); - m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(mach8_device::ibm8514_fgcolour_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_fgcolour_w),m_8514)); - m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_write_mask_w),m_8514)); - m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_r),m_8514), write16_delegate(FUNC(ibm8514a_device::ibm8514_read_mask_w),m_8514)); - m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(mach8_device::ibm8514_backmix_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_backmix_w),m_8514)); - m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(mach8_device::ibm8514_foremix_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_foremix_w),m_8514)); - m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(mach8_device::ibm8514_multifunc_r),m_8514), write16_delegate(FUNC(mach8_device::ibm8514_multifunc_w),m_8514)); - m_isa->install16_device(0xcaec, 0xcaef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_scan_x_w),m_8514)); - m_isa->install16_device(0xceec, 0xceef, read16_delegate(FUNC(mach8_device::mach8_readonly_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_dp_config_w),m_8514)); - m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(mach8_device::ibm8514_pixel_xfer_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_pixel_xfer_w),m_8514)); - m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(FUNC(mach8_device::mach8_sourcex_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ext_leftscissor_w),m_8514)); - m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(FUNC(mach8_device::mach8_sourcey_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_ext_topscissor_w),m_8514)); - m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(FUNC(mach8_device::mach8_linedraw_r),m_8514), write16_delegate(FUNC(mach8_device::mach8_linedraw_w),m_8514)); - - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(ati_vga_device::mem_r),m_vga), write8_delegate(FUNC(ati_vga_device::mem_w),m_vga)); + m_isa->install_device(0x1ce, 0x1cf, read8_delegate(*m_vga, FUNC(ati_vga_device::ati_port_ext_r)), write8_delegate(*m_vga, FUNC(ati_vga_device::ati_port_ext_w))); + m_isa->install_device(0x2e8, 0x2ef, read8_delegate(*m_8514, FUNC(mach8_device::ibm8514_status_r)), write8_delegate(*m_8514, FUNC(mach8_device::ibm8514_htotal_w))); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(ati_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(ati_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(ati_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03d0_w))); + m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vtotal_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vtotal_w))); + m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_config1_r)), write16_delegate(*this)); + m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vdisp_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vdisp_w))); + m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_config2_r)), write16_delegate(*this)); + m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vsync_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vsync_w))); + m_isa->install16_device(0x22e8, 0x22eb, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_display_ctrl_w))); + m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_htotal_r)), write16_delegate(*this)); + m_isa->install16_device(0x26ec, 0x26ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_crt_pitch_w))); + m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_subcontrol_r)), write16_delegate(*this)); + m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_substatus_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_subcontrol_w))); + m_isa->install16_device(0x4ae8, 0x4aeb, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_advfunc_w))); + m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_clksel_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_clksel_w))); + m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(*m_8514, FUNC(mach8_device::mach8_ec0_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ec0_w))); + m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_scratch0_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_scratch0_w))); + m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(*m_8514, FUNC(mach8_device::mach8_ec1_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ec1_w))); + m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_scratch0_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_scratch0_w))); + m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(*m_8514, FUNC(mach8_device::mach8_ec2_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ec2_w))); + m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(*m_8514, FUNC(mach8_device::mach8_ec3_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ec3_w))); + m_isa->install16_device(0x6eec, 0x6eef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ge_offset_l_w))); + m_isa->install16_device(0x72ec, 0x72ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ge_offset_h_w))); + m_isa->install16_device(0x76ec, 0x76ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ge_pitch_w))); + m_isa->install16_device(0x7aec, 0x7aef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ge_ext_config_w))); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_currenty_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_currenty_w))); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_currentx_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_currentx_w))); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_desty_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_desty_w))); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_destx_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_destx_w))); + m_isa->install16_device(0x8eec, 0x8eef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_ge_ext_config_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_patt_data_w))); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_line_error_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_line_error_w))); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_width_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_width_w))); + m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_bresenham_count_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_bresenham_count_w))); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_gpstatus_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_cmd_w))); + m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_ext_fifo_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_linedraw_index_w))); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_ssv_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_ssv_w))); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_bgcolour_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_bgcolour_w))); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_fgcolour_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_fgcolour_w))); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_write_mask_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_write_mask_w))); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_read_mask_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_read_mask_w))); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_backmix_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_backmix_w))); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_foremix_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_foremix_w))); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_multifunc_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_multifunc_w))); + m_isa->install16_device(0xcaec, 0xcaef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_scan_x_w))); + m_isa->install16_device(0xceec, 0xceef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_readonly_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_dp_config_w))); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_pixel_xfer_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_pixel_xfer_w))); + m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_sourcex_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ext_leftscissor_w))); + m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_sourcey_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ext_topscissor_w))); + m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_linedraw_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_linedraw_w))); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(ati_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(ati_vga_device::mem_w))); } void isa16_vga_gfxultrapro_device::device_start() { set_isa_device(); - m_vga = subdevice<mach32_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "gfxultrapro"); - m_isa->install_device(0x1ce, 0x1cf, read8_delegate(FUNC(mach32_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach32_device::ati_port_ext_w),m_vga)); - m_isa->install_device(0x2e8, 0x2ef, read8_delegate(FUNC(mach32_device::mach32_status_r),m_vga), write8_delegate(FUNC(mach32_device::ibm8514_htotal_w),m_vga)); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(mach32_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(mach32_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(mach32_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach32_device::port_03d0_w),m_vga)); - m_isa->install16_device(0xaec, 0xaef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_l_w),m_vga)); - m_isa->install16_device(0xeec, 0xeef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_h_w),m_vga)); - m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(FUNC(mach32_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vtotal_w),m_vga)); - m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(FUNC(mach32_device::mach32_config1_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_pos_h),m_vga)); - m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(FUNC(mach32_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vdisp_w),m_vga)); - m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(FUNC(mach32_device::mach8_config2_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_pos_v),m_vga)); - m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(FUNC(mach32_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_vsync_w),m_vga)); - m_isa->install16_device(0x1aec, 0x1aef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_colour_b_w),m_vga)); - m_isa->install16_device(0x1eec, 0x1eef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_offset_w),m_vga)); - m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(FUNC(mach32_device::ibm8514_htotal_r),m_vga),write16_delegate()); - m_isa->install16_device(0x26ec, 0x26ef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga),write16_delegate(FUNC(mach32_device::mach8_crt_pitch_w),m_vga)); - m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(FUNC(mach32_device::ibm8514_subcontrol_r),m_vga),write16_delegate()); - m_isa->install16_device(0x3aec, 0x3aef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_colour_0_w),m_vga)); - m_isa->install16_device(0x3eec, 0x3eef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_cursor_colour_0_w),m_vga)); - m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(FUNC(mach32_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_subcontrol_w),m_vga)); - m_isa->install16_device(0x42ec, 0x42ef, read16_delegate(FUNC(mach32_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_mem_boundary_w),m_vga)); - m_isa->install16_device(0x4ae8, 0x4aeb, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_advfunc_w),m_vga)); - m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(FUNC(mach32_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_clksel_w),m_vga)); - m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(FUNC(mach32_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec0_w),m_vga)); - m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(FUNC(mach32_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(FUNC(mach32_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec1_w),m_vga)); - m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(FUNC(mach32_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(FUNC(mach32_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec2_w),m_vga)); - m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(FUNC(mach32_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ec3_w),m_vga)); - m_isa->install16_device(0x62ec, 0x62ef, read16_delegate(FUNC(mach32_device::mach32_ext_ge_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_horz_overscan_w),m_vga)); - m_isa->install16_device(0x6eec, 0x6eef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ge_offset_l_w),m_vga)); - m_isa->install16_device(0x72ec, 0x72ef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ge_offset_h_w),m_vga)); - m_isa->install16_device(0x76ec, 0x76ef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ge_pitch_w),m_vga)); - m_isa->install16_device(0x7aec, 0x7aef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach32_ge_ext_config_w),m_vga)); - m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(mach32_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_currenty_w),m_vga)); - m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(mach32_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_currentx_w),m_vga)); - m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(mach32_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_desty_w),m_vga)); - m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(mach32_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_destx_w),m_vga)); - m_isa->install16_device(0x8eec, 0x8eef, read16_delegate(FUNC(mach32_device::mach8_ge_ext_config_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_patt_data_w),m_vga)); - m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(mach32_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_line_error_w),m_vga)); - m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(mach32_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_width_w),m_vga)); - m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(FUNC(mach32_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_bresenham_count_w),m_vga)); - m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(mach32_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_cmd_w),m_vga)); - m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(FUNC(mach32_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_linedraw_index_w),m_vga)); - m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(mach32_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_ssv_w),m_vga)); - m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(mach32_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_bgcolour_w),m_vga)); - m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(mach32_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_fgcolour_w),m_vga)); - m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(mach32_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_write_mask_w),m_vga)); - m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(mach32_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_read_mask_w),m_vga)); - m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(mach32_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_backmix_w),m_vga)); - m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(mach32_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_foremix_w),m_vga)); - m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(mach32_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach32_device::ibm8514_multifunc_w),m_vga)); - m_isa->install16_device(0xcaec, 0xcaef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_scan_x_w),m_vga)); - m_isa->install16_device(0xceec, 0xceef, read16_delegate(FUNC(mach32_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_dp_config_w),m_vga)); - m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(mach32_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_pixel_xfer_w),m_vga)); - m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(FUNC(mach32_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ext_leftscissor_w),m_vga)); - m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(FUNC(mach32_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_ext_topscissor_w),m_vga)); - m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(FUNC(mach32_device::mach32_chipid_r),m_vga), write16_delegate()); - m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(FUNC(mach32_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach32_device::mach8_linedraw_w),m_vga)); - - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(mach32_device::mem_r),m_vga), write8_delegate(FUNC(mach32_device::mem_w),m_vga)); + m_isa->install_device(0x1ce, 0x1cf, read8_delegate(*m_vga, FUNC(mach32_device::ati_port_ext_r)), write8_delegate(*m_vga, FUNC(mach32_device::ati_port_ext_w))); + m_isa->install_device(0x2e8, 0x2ef, read8_delegate(*m_vga, FUNC(mach32_device::mach32_status_r)), write8_delegate(*m_vga, FUNC(mach32_device::ibm8514_htotal_w))); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(mach32_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(mach32_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(mach32_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(mach32_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(mach32_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(mach32_device::port_03d0_w))); + m_isa->install16_device(0xaec, 0xaef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_l_w))); + m_isa->install16_device(0xeec, 0xeef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_h_w))); + m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vtotal_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vtotal_w))); + m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_config1_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_pos_h))); + m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vdisp_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vdisp_w))); + m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_config2_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_pos_v))); + m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vsync_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vsync_w))); + m_isa->install16_device(0x1aec, 0x1aef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_colour_b_w))); + m_isa->install16_device(0x1eec, 0x1eef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_offset_w))); + m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_htotal_r)), write16_delegate(*this)); + m_isa->install16_device(0x26ec, 0x26ef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_crt_pitch_w))); + m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_subcontrol_r)), write16_delegate(*this)); + m_isa->install16_device(0x3aec, 0x3aef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_colour_0_w))); + m_isa->install16_device(0x3eec, 0x3eef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_colour_0_w))); + m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_substatus_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_subcontrol_w))); + m_isa->install16_device(0x42ec, 0x42ef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_mem_boundary_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_mem_boundary_w))); + m_isa->install16_device(0x4ae8, 0x4aeb, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_advfunc_w))); + m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_clksel_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_clksel_w))); + m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(*m_vga, FUNC(mach32_device::mach8_ec0_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ec0_w))); + m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_scratch0_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_scratch0_w))); + m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(*m_vga, FUNC(mach32_device::mach8_ec1_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ec1_w))); + m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_scratch0_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_scratch0_w))); + m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(*m_vga, FUNC(mach32_device::mach8_ec2_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ec2_w))); + m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(*m_vga, FUNC(mach32_device::mach8_ec3_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ec3_w))); + m_isa->install16_device(0x62ec, 0x62ef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_ext_ge_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_horz_overscan_w))); + m_isa->install16_device(0x6eec, 0x6eef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ge_offset_l_w))); + m_isa->install16_device(0x72ec, 0x72ef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ge_offset_h_w))); + m_isa->install16_device(0x76ec, 0x76ef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ge_pitch_w))); + m_isa->install16_device(0x7aec, 0x7aef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_ge_ext_config_w))); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_currenty_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_currenty_w))); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_currentx_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_currentx_w))); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_desty_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_desty_w))); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_destx_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_destx_w))); + m_isa->install16_device(0x8eec, 0x8eef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_ge_ext_config_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_patt_data_w))); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_line_error_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_line_error_w))); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_width_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_width_w))); + m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_bresenham_count_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_bresenham_count_w))); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_gpstatus_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_cmd_w))); + m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_ext_fifo_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_linedraw_index_w))); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_ssv_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_ssv_w))); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_bgcolour_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_bgcolour_w))); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_fgcolour_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_fgcolour_w))); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_write_mask_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_write_mask_w))); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_read_mask_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_read_mask_w))); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_backmix_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_backmix_w))); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_foremix_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_foremix_w))); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_multifunc_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_multifunc_w))); + m_isa->install16_device(0xcaec, 0xcaef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_scan_x_w))); + m_isa->install16_device(0xceec, 0xceef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_dp_config_w))); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_pixel_xfer_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_pixel_xfer_w))); + m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_sourcex_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ext_leftscissor_w))); + m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_sourcey_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_ext_topscissor_w))); + m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_chipid_r)), write16_delegate(*this)); + m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_linedraw_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_linedraw_w))); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(mach32_device::mem_r)), write8_delegate(*m_vga, FUNC(mach32_device::mem_w))); } void isa16_vga_mach64_device::device_start() { set_isa_device(); - m_vga = subdevice<mach64_device>("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "mach64"); - m_isa->install_device(0x1ce, 0x1cf, read8_delegate(FUNC(mach64_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach64_device::ati_port_ext_w),m_vga)); - m_isa->install_device(0x2e8, 0x2ef, read8_delegate(FUNC(mach64_device::mach32_status_r),m_vga), write8_delegate(FUNC(mach64_device::ibm8514_htotal_w),m_vga)); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(mach64_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03b0_w),m_vga)); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(mach64_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03c0_w),m_vga)); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(FUNC(mach64_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03d0_w),m_vga)); - m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(FUNC(mach64_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vtotal_w),m_vga)); - m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(FUNC(mach64_device::mach32_config1_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config1_w),m_vga)); - m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(FUNC(mach64_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vdisp_w),m_vga)); - m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(FUNC(mach64_device::mach8_config2_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config2_w),m_vga)); - m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(FUNC(mach64_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vsync_w),m_vga)); - m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(FUNC(mach64_device::ibm8514_htotal_r),m_vga),write16_delegate()); - m_isa->install16_device(0x26ec, 0x26ef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga),write16_delegate(FUNC(mach64_device::mach8_crt_pitch_w),m_vga)); - m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(FUNC(mach64_device::ibm8514_subcontrol_r),m_vga),write16_delegate()); - m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(FUNC(mach64_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_subcontrol_w),m_vga)); - m_isa->install16_device(0x42ec, 0x42ef, read16_delegate(FUNC(mach64_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_mem_boundary_w),m_vga)); - m_isa->install16_device(0x4ae8, 0x4aeb, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_advfunc_w),m_vga)); - m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(FUNC(mach64_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_clksel_w),m_vga)); - m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(FUNC(mach64_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec0_w),m_vga)); - m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(FUNC(mach64_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec1_w),m_vga)); - m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga)); - m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(FUNC(mach64_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec2_w),m_vga)); - m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(FUNC(mach64_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec3_w),m_vga)); - m_isa->install16_device(0x6eec, 0x6eef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ge_offset_l_w),m_vga)); - m_isa->install16_device(0x72ec, 0x72ef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ge_offset_h_w),m_vga)); - m_isa->install16_device(0x76ec, 0x76ef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ge_pitch_w),m_vga)); - m_isa->install16_device(0x7aec, 0x7aef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_ge_ext_config_w),m_vga)); - m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(FUNC(mach64_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currenty_w),m_vga)); - m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(FUNC(mach64_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currentx_w),m_vga)); - m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(FUNC(mach64_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_desty_w),m_vga)); - m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(FUNC(mach64_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_destx_w),m_vga)); - m_isa->install16_device(0x8eec, 0x8eef, read16_delegate(FUNC(mach64_device::mach8_ge_ext_config_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_patt_data_w),m_vga)); - m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(FUNC(mach64_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_line_error_w),m_vga)); - m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(FUNC(mach64_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_width_w),m_vga)); - m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(FUNC(mach64_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_bresenham_count_w),m_vga)); - m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(FUNC(mach64_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_cmd_w),m_vga)); - m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(FUNC(mach64_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_index_w),m_vga)); - m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(FUNC(mach64_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_ssv_w),m_vga)); - m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(FUNC(mach64_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_bgcolour_w),m_vga)); - m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(FUNC(mach64_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_fgcolour_w),m_vga)); - m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(FUNC(mach64_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_write_mask_w),m_vga)); - m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(FUNC(mach64_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_read_mask_w),m_vga)); - m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(FUNC(mach64_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_backmix_w),m_vga)); - m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(FUNC(mach64_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_foremix_w),m_vga)); - m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(FUNC(mach64_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_multifunc_w),m_vga)); - m_isa->install16_device(0xcaec, 0xcaef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scan_x_w),m_vga)); - m_isa->install16_device(0xceec, 0xceef, read16_delegate(FUNC(mach64_device::mach32_readonly_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_dp_config_w),m_vga)); - m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_pixel_xfer_w),m_vga)); - m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(FUNC(mach64_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_leftscissor_w),m_vga)); - m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(FUNC(mach64_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_topscissor_w),m_vga)); - m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(FUNC(mach64_device::mach32_chipid_r),m_vga), write16_delegate()); - m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(FUNC(mach64_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_w),m_vga)); - - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(mach64_device::mem_r),m_vga), write8_delegate(FUNC(mach64_device::mem_w),m_vga)); + m_isa->install_device(0x1ce, 0x1cf, read8_delegate(*m_vga, FUNC(mach64_device::ati_port_ext_r)), write8_delegate(*m_vga, FUNC(mach64_device::ati_port_ext_w))); + m_isa->install_device(0x2e8, 0x2ef, read8_delegate(*m_vga, FUNC(mach64_device::mach32_status_r)), write8_delegate(*m_vga, FUNC(mach64_device::ibm8514_htotal_w))); + m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(mach64_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(mach64_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(mach64_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(mach64_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(mach64_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(mach64_device::port_03d0_w))); + m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vtotal_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vtotal_w))); + m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_config1_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach64_config1_w))); + m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vdisp_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vdisp_w))); + m_isa->install16_device(0x16ec, 0x16ef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_config2_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach64_config2_w))); + m_isa->install16_device(0x1ae8, 0x1aeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vsync_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vsync_w))); + m_isa->install16_device(0x26e8, 0x26eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_htotal_r)), write16_delegate(*this)); + m_isa->install16_device(0x26ec, 0x26ef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_crt_pitch_w))); + m_isa->install16_device(0x2ee8, 0x2eeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_subcontrol_r)),write16_delegate(*this)); + m_isa->install16_device(0x42e8, 0x42eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_substatus_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_subcontrol_w))); + m_isa->install16_device(0x42ec, 0x42ef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_mem_boundary_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach32_mem_boundary_w))); + m_isa->install16_device(0x4ae8, 0x4aeb, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_advfunc_w))); + m_isa->install16_device(0x4aec, 0x4aef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_clksel_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_clksel_w))); + m_isa->install16_device(0x52e8, 0x52eb, read16_delegate(*m_vga, FUNC(mach64_device::mach8_ec0_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ec0_w))); + m_isa->install16_device(0x52ec, 0x52ef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_scratch0_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_scratch0_w))); + m_isa->install16_device(0x56e8, 0x56eb, read16_delegate(*m_vga, FUNC(mach64_device::mach8_ec1_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ec1_w))); + m_isa->install16_device(0x56ec, 0x56ef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_scratch0_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_scratch0_w))); + m_isa->install16_device(0x5ae8, 0x5aeb, read16_delegate(*m_vga, FUNC(mach64_device::mach8_ec2_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ec2_w))); + m_isa->install16_device(0x5ee8, 0x5eeb, read16_delegate(*m_vga, FUNC(mach64_device::mach8_ec3_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ec3_w))); + m_isa->install16_device(0x6eec, 0x6eef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ge_offset_l_w))); + m_isa->install16_device(0x72ec, 0x72ef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ge_offset_h_w))); + m_isa->install16_device(0x76ec, 0x76ef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ge_pitch_w))); + m_isa->install16_device(0x7aec, 0x7aef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach32_ge_ext_config_w))); + m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_currenty_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_currenty_w))); + m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_currentx_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_currentx_w))); + m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_desty_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_desty_w))); + m_isa->install16_device(0x8ee8, 0x8eeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_destx_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_destx_w))); + m_isa->install16_device(0x8eec, 0x8eef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_ge_ext_config_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_patt_data_w))); + m_isa->install16_device(0x92e8, 0x92eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_line_error_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_line_error_w))); + m_isa->install16_device(0x96e8, 0x96eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_width_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_width_w))); + m_isa->install16_device(0x96ec, 0x96ef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_bresenham_count_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_bresenham_count_w))); + m_isa->install16_device(0x9ae8, 0x9aeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_gpstatus_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_cmd_w))); + m_isa->install16_device(0x9aec, 0x9aef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_ext_fifo_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_linedraw_index_w))); + m_isa->install16_device(0x9ee8, 0x9eeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_ssv_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_ssv_w))); + m_isa->install16_device(0xa2e8, 0xa2eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_bgcolour_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_bgcolour_w))); + m_isa->install16_device(0xa6e8, 0xa6eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_fgcolour_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_fgcolour_w))); + m_isa->install16_device(0xaae8, 0xaaeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_write_mask_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_write_mask_w))); + m_isa->install16_device(0xaee8, 0xaeeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_read_mask_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_read_mask_w))); + m_isa->install16_device(0xb6e8, 0xb6eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_backmix_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_backmix_w))); + m_isa->install16_device(0xbae8, 0xbaeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_foremix_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_foremix_w))); + m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_multifunc_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_multifunc_w))); + m_isa->install16_device(0xcaec, 0xcaef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_scan_x_w))); + m_isa->install16_device(0xceec, 0xceef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_dp_config_w))); + m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_pixel_xfer_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_pixel_xfer_w))); + m_isa->install16_device(0xdaec, 0xdaef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_sourcex_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ext_leftscissor_w))); + m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_sourcey_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_ext_topscissor_w))); + m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_chipid_r)), write16_delegate(*this)); + m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_linedraw_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_linedraw_w))); + + m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(mach64_device::mem_r)), write8_delegate(*m_vga, FUNC(mach64_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/vga_ati.h b/src/devices/bus/isa/vga_ati.h index e626f8a45ab..f05b2fdae2d 100644 --- a/src/devices/bus/isa/vga_ati.h +++ b/src/devices/bus/isa/vga_ati.h @@ -42,8 +42,8 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - ati_vga_device *m_vga; - mach8_device *m_8514; + required_device<ati_vga_device> m_vga; + required_device<mach8_device> m_8514; }; class isa16_vga_gfxultrapro_device : @@ -65,8 +65,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - private: - mach32_device *m_vga; +private: + required_device<mach32_device> m_vga; }; class isa16_vga_mach64_device : @@ -89,7 +89,7 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - mach64_device *m_vga; + required_device<mach64_device> m_vga; }; diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp index 57dec00af89..8670610ea40 100644 --- a/src/devices/bus/isa/wdxt_gen.cpp +++ b/src/devices/bus/isa/wdxt_gen.cpp @@ -200,7 +200,7 @@ void wdxt_gen_device::device_start() { set_isa_device(); m_isa->install_rom(this, 0xc8000, 0xc9fff, "hdc", "hdc"); - m_isa->install_device(0x0320, 0x0323, READ8_DEVICE_DELEGATE(m_host, wd11c00_17_device, io_r), WRITE8_DEVICE_DELEGATE(m_host, wd11c00_17_device, io_w)); + m_isa->install_device(0x0320, 0x0323, read8_delegate(*m_host, FUNC(wd11c00_17_device::io_r)), write8_delegate(*m_host, FUNC(wd11c00_17_device::io_w))); m_isa->set_dma_channel(3, this, false); } diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp index 1388a7d174b..2a7898fc903 100644 --- a/src/devices/bus/isa/xtide.cpp +++ b/src/devices/bus/isa/xtide.cpp @@ -323,8 +323,8 @@ void xtide_device::device_reset() int io_address = ((ioport("IO_ADDRESS")->read() & 0x0F) * 0x20) + 0x200; m_irq_number = (ioport("IRQ")->read() & 0x07); - m_isa->install_memory(base_address, base_address + 0x1fff, read8_delegate(FUNC(eeprom_parallel_28xx_device::read), &(*m_eeprom)), write8_delegate(FUNC(eeprom_parallel_28xx_device::write), &(*m_eeprom))); - m_isa->install_device(io_address, io_address + 0xf, read8_delegate(FUNC(xtide_device::read), this), write8_delegate(FUNC(xtide_device::write), this)); + m_isa->install_memory(base_address, base_address + 0x1fff, read8_delegate(*m_eeprom, FUNC(eeprom_parallel_28xx_device::read)), write8_delegate(*m_eeprom, FUNC(eeprom_parallel_28xx_device::write))); + m_isa->install_device(io_address, io_address + 0xf, read8_delegate(*this, FUNC(xtide_device::read)), write8_delegate(*this, FUNC(xtide_device::write))); //logerror("xtide_device::device_reset(), bios_base=0x%5X to 0x%5X, I/O=0x%3X, IRQ=%d\n",base_address,base_address + (16*1024) -1 ,io_address,irq); } diff --git a/src/devices/bus/lpci/i82371sb.cpp b/src/devices/bus/lpci/i82371sb.cpp index 738c725f530..5e2160088ff 100644 --- a/src/devices/bus/lpci/i82371sb.cpp +++ b/src/devices/bus/lpci/i82371sb.cpp @@ -163,8 +163,8 @@ void i82371sb_device::map_busmaster_dma() { if (m_base != 0) { - spaceio->install_readwrite_handler(m_base, m_base + 0x7, read32_delegate(FUNC(bus_master_ide_controller_device::bmdma_r), &(*m_ide)), write32_delegate(FUNC(bus_master_ide_controller_device::bmdma_w), &(*m_ide)), 0xffffffff); - spaceio->install_readwrite_handler(m_base + 0x8, m_base + 0xf, read32_delegate(FUNC(bus_master_ide_controller_device::bmdma_r), &(*m_ide2)), write32_delegate(FUNC(bus_master_ide_controller_device::bmdma_w), &(*m_ide2)), 0xffffffff); + spaceio->install_readwrite_handler(m_base, m_base + 0x7, read32_delegate(*m_ide, FUNC(bus_master_ide_controller_device::bmdma_r)), write32_delegate(*m_ide, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); + spaceio->install_readwrite_handler(m_base + 0x8, m_base + 0xf, read32_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_r)), write32_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); } } @@ -253,7 +253,7 @@ void i82371sb_device::device_start() southbridge_device::device_start(); m_ide_io_ports_enabled = false; - spaceio.install_readwrite_handler(0x00b0, 0x00b3, read8_delegate(FUNC(i82371sb_device::read_apmcapms), this), write8_delegate(FUNC(i82371sb_device::write_apmcapms), this), 0xffff0000); + spaceio.install_readwrite_handler(0x00b0, 0x00b3, read8_delegate(*this, FUNC(i82371sb_device::read_apmcapms)), write8_delegate(*this, FUNC(i82371sb_device::write_apmcapms)), 0xffff0000); m_smi_callback.resolve_safe(); m_boot_state_hook.resolve_safe(); // setup save states diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp index c4ce2257ed1..5813fed47b5 100644 --- a/src/devices/bus/lpci/southbridge.cpp +++ b/src/devices/bus/lpci/southbridge.cpp @@ -219,18 +219,18 @@ void southbridge_device::device_start() { spaceio = &m_maincpu->space(AS_IO); - spaceio->install_readwrite_handler(0x0000, 0x001f, read8sm_delegate(FUNC(am9517a_device::read), &(*m_dma8237_1)), write8sm_delegate(FUNC(am9517a_device::write), &(*m_dma8237_1)), 0xffffffff); - spaceio->install_readwrite_handler(0x0020, 0x003f, read8sm_delegate(FUNC(pic8259_device::read), &(*m_pic8259_master)), write8sm_delegate(FUNC(pic8259_device::write), &(*m_pic8259_master)), 0xffffffff); - spaceio->install_readwrite_handler(0x0040, 0x005f, read8sm_delegate(FUNC(pit8254_device::read), &(*m_pit8254)), write8sm_delegate(FUNC(pit8254_device::write), &(*m_pit8254)), 0xffffffff); - spaceio->install_readwrite_handler(0x0060, 0x0063, read8_delegate(FUNC(southbridge_device::at_portb_r), this), write8_delegate(FUNC(southbridge_device::at_portb_w), this), 0x0000ff00); - spaceio->install_readwrite_handler(0x0080, 0x009f, read8_delegate(FUNC(southbridge_device::at_page8_r), this), write8_delegate(FUNC(southbridge_device::at_page8_w), this), 0xffffffff); - spaceio->install_readwrite_handler(0x00a0, 0x00bf, read8sm_delegate(FUNC(pic8259_device::read), &(*m_pic8259_slave)), write8sm_delegate(FUNC(pic8259_device::write), &(*m_pic8259_slave)), 0xffffffff); - spaceio->install_readwrite_handler(0x00c0, 0x00df, read8_delegate(FUNC(southbridge_device::at_dma8237_2_r), this), write8_delegate(FUNC(southbridge_device::at_dma8237_2_w), this), 0xffffffff); - spaceio->install_readwrite_handler(0x0170, 0x0177, read32_delegate(FUNC(southbridge_device::ide2_read32_cs0_r), this), write32_delegate(FUNC(southbridge_device::ide2_write32_cs0_w), this), 0xffffffff); - spaceio->install_readwrite_handler(0x01f0, 0x01f7, read32_delegate(FUNC(southbridge_device::ide1_read32_cs0_r), this), write32_delegate(FUNC(southbridge_device::ide1_write32_cs0_w), this), 0xffffffff); - spaceio->install_readwrite_handler(0x0374, 0x0377, read8_delegate(FUNC(southbridge_device::ide2_read_cs1_r), this), write8_delegate(FUNC(southbridge_device::ide2_write_cs1_w), this), 0xff0000); - spaceio->install_readwrite_handler(0x03f4, 0x03f7, read8_delegate(FUNC(southbridge_device::ide1_read_cs1_r), this), write8_delegate(FUNC(southbridge_device::ide1_write_cs1_w), this), 0xff0000); - spaceio->install_readwrite_handler(0x04d0, 0x04d3, read8_delegate(FUNC(southbridge_device::eisa_irq_read), this), write8_delegate(FUNC(southbridge_device::eisa_irq_write), this), 0x0000ffff); + spaceio->install_readwrite_handler(0x0000, 0x001f, read8sm_delegate(*m_dma8237_1, FUNC(am9517a_device::read)), write8sm_delegate(*m_dma8237_1, FUNC(am9517a_device::write)), 0xffffffff); + spaceio->install_readwrite_handler(0x0020, 0x003f, read8sm_delegate(*m_pic8259_master, FUNC(pic8259_device::read)), write8sm_delegate(*m_pic8259_master, FUNC(pic8259_device::write)), 0xffffffff); + spaceio->install_readwrite_handler(0x0040, 0x005f, read8sm_delegate(*m_pit8254, FUNC(pit8254_device::read)), write8sm_delegate(*m_pit8254, FUNC(pit8254_device::write)), 0xffffffff); + spaceio->install_readwrite_handler(0x0060, 0x0063, read8_delegate(*this, FUNC(southbridge_device::at_portb_r)), write8_delegate(*this, FUNC(southbridge_device::at_portb_w)), 0x0000ff00); + spaceio->install_readwrite_handler(0x0080, 0x009f, read8_delegate(*this, FUNC(southbridge_device::at_page8_r)), write8_delegate(*this, FUNC(southbridge_device::at_page8_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x00a0, 0x00bf, read8sm_delegate(*m_pic8259_slave, FUNC(pic8259_device::read)), write8sm_delegate(*m_pic8259_slave, FUNC(pic8259_device::write)), 0xffffffff); + spaceio->install_readwrite_handler(0x00c0, 0x00df, read8_delegate(*this, FUNC(southbridge_device::at_dma8237_2_r)), write8_delegate(*this, FUNC(southbridge_device::at_dma8237_2_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x0170, 0x0177, read32_delegate(*this, FUNC(southbridge_device::ide2_read32_cs0_r)), write32_delegate(*this, FUNC(southbridge_device::ide2_write32_cs0_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x01f0, 0x01f7, read32_delegate(*this, FUNC(southbridge_device::ide1_read32_cs0_r)), write32_delegate(*this, FUNC(southbridge_device::ide1_write32_cs0_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x0374, 0x0377, read8_delegate(*this, FUNC(southbridge_device::ide2_read_cs1_r)), write8_delegate(*this, FUNC(southbridge_device::ide2_write_cs1_w)), 0xff0000); + spaceio->install_readwrite_handler(0x03f4, 0x03f7, read8_delegate(*this, FUNC(southbridge_device::ide1_read_cs1_r)), write8_delegate(*this, FUNC(southbridge_device::ide1_write_cs1_w)), 0xff0000); + spaceio->install_readwrite_handler(0x04d0, 0x04d3, read8_delegate(*this, FUNC(southbridge_device::eisa_irq_read)), write8_delegate(*this, FUNC(southbridge_device::eisa_irq_write)), 0x0000ffff); spaceio->nop_readwrite(0x00e0, 0x00ef); } @@ -560,9 +560,9 @@ void southbridge_extended_device::device_start() southbridge_device::device_start(); - spaceio.install_readwrite_handler(0x0060, 0x0063, read8smo_delegate(FUNC(at_keyboard_controller_device::data_r), &(*m_keybc)), write8smo_delegate(FUNC(at_keyboard_controller_device::data_w), &(*m_keybc)), 0x000000ff); - spaceio.install_readwrite_handler(0x0064, 0x0067, read8smo_delegate(FUNC(at_keyboard_controller_device::status_r), &(*m_keybc)), write8smo_delegate(FUNC(at_keyboard_controller_device::command_w), &(*m_keybc)), 0xffffffff); - spaceio.install_readwrite_handler(0x0070, 0x007f, read8sm_delegate(FUNC(ds12885_device::read), &(*m_ds12885)), write8sm_delegate(FUNC(ds12885_device::write), &(*m_ds12885)), 0xffffffff); + spaceio.install_readwrite_handler(0x0060, 0x0063, read8smo_delegate(*m_keybc, FUNC(at_keyboard_controller_device::data_r)), write8smo_delegate(*m_keybc, FUNC(at_keyboard_controller_device::data_w)), 0x000000ff); + spaceio.install_readwrite_handler(0x0064, 0x0067, read8smo_delegate(*m_keybc, FUNC(at_keyboard_controller_device::status_r)), write8smo_delegate(*m_keybc, FUNC(at_keyboard_controller_device::command_w)), 0xffffffff); + spaceio.install_readwrite_handler(0x0070, 0x007f, read8sm_delegate(*m_ds12885, FUNC(ds12885_device::read)), write8sm_delegate(*m_ds12885, FUNC(ds12885_device::write)), 0xffffffff); } //------------------------------------------------- diff --git a/src/devices/bus/macpds/hyperdrive.cpp b/src/devices/bus/macpds/hyperdrive.cpp index 0c64d077765..d880ed9ec17 100644 --- a/src/devices/bus/macpds/hyperdrive.cpp +++ b/src/devices/bus/macpds/hyperdrive.cpp @@ -159,7 +159,7 @@ void macpds_hyperdrive_device::device_start() install_rom(this, HYPERDRIVE_ROM_REGION, 0xf80000); // WD200x registers - m_macpds->install_device(0xfc0000, 0xfc000f, read16_delegate(FUNC(macpds_hyperdrive_device::hyperdrive_r), this), write16_delegate(FUNC(macpds_hyperdrive_device::hyperdrive_w), this)); + m_macpds->install_device(0xfc0000, 0xfc000f, read16_delegate(*this, FUNC(macpds_hyperdrive_device::hyperdrive_r)), write16_delegate(*this, FUNC(macpds_hyperdrive_device::hyperdrive_w))); } //------------------------------------------------- diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp index 1a3f2671e5c..a6d6a0216f0 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.cpp +++ b/src/devices/bus/macpds/pds_tpdfpd.cpp @@ -112,8 +112,8 @@ void macpds_sedisplay_device::device_start() static const char bankname[] = { "radpds_ram" }; m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, bankname, m_vram.get()); - m_macpds->install_device(0x770000, 0x77000f, read16_delegate(FUNC(macpds_sedisplay_device::ramdac_r), this), write16_delegate(FUNC(macpds_sedisplay_device::ramdac_w), this)); - m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this)); + m_macpds->install_device(0x770000, 0x77000f, read16_delegate(*this, FUNC(macpds_sedisplay_device::ramdac_r)), write16_delegate(*this, FUNC(macpds_sedisplay_device::ramdac_w))); + m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(*this, FUNC(macpds_sedisplay_device::sedisplay_r)), write16_delegate(*this, FUNC(macpds_sedisplay_device::sedisplay_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(879, 0), 0); diff --git a/src/devices/bus/msx_cart/arc.cpp b/src/devices/bus/msx_cart/arc.cpp index 406ec8f4de3..6f5af572bd1 100644 --- a/src/devices/bus/msx_cart/arc.cpp +++ b/src/devices/bus/msx_cart/arc.cpp @@ -18,8 +18,8 @@ msx_cart_arc_device::msx_cart_arc_device(const machine_config &mconfig, const ch void msx_cart_arc_device::device_start() { // Install IO read/write handlers - io_space().install_write_handler(0x7f, 0x7f, write8smo_delegate(FUNC(msx_cart_arc_device::io_7f_w), this)); - io_space().install_read_handler(0x7f, 0x7f, read8smo_delegate(FUNC(msx_cart_arc_device::io_7f_r), this)); + io_space().install_write_handler(0x7f, 0x7f, write8smo_delegate(*this, FUNC(msx_cart_arc_device::io_7f_w))); + io_space().install_read_handler(0x7f, 0x7f, read8smo_delegate(*this, FUNC(msx_cart_arc_device::io_7f_r))); } diff --git a/src/devices/bus/msx_cart/bm_012.cpp b/src/devices/bus/msx_cart/bm_012.cpp index 158de522e4d..020348dd843 100644 --- a/src/devices/bus/msx_cart/bm_012.cpp +++ b/src/devices/bus/msx_cart/bm_012.cpp @@ -94,8 +94,8 @@ const tiny_rom_entry *msx_cart_bm_012_device::device_rom_region() const void msx_cart_bm_012_device::device_start() { // Install IO read/write handlers - io_space().install_write_handler(0x70, 0x73, write8sm_delegate(FUNC(z80pio_device::write_alt), m_bm012_pio.target())); - io_space().install_read_handler(0x70, 0x73, read8sm_delegate(FUNC(z80pio_device::read_alt), m_bm012_pio.target())); + io_space().install_write_handler(0x70, 0x73, write8sm_delegate(*m_bm012_pio, FUNC(z80pio_device::write_alt))); + io_space().install_read_handler(0x70, 0x73, read8sm_delegate(*m_bm012_pio, FUNC(z80pio_device::read_alt))); } diff --git a/src/devices/bus/msx_cart/fmpac.cpp b/src/devices/bus/msx_cart/fmpac.cpp index a5229a6c61e..75af22353dc 100644 --- a/src/devices/bus/msx_cart/fmpac.cpp +++ b/src/devices/bus/msx_cart/fmpac.cpp @@ -47,7 +47,7 @@ void msx_cart_fmpac_device::device_start() save_item(NAME(m_7ff6)); // Install IO read/write handlers - io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(FUNC(msx_cart_fmpac_device::write_ym2413), this)); + io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(*this, FUNC(msx_cart_fmpac_device::write_ym2413))); } diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp index f5ac42be362..f2caa5f6940 100644 --- a/src/devices/bus/msx_cart/konami.cpp +++ b/src/devices/bus/msx_cart/konami.cpp @@ -903,9 +903,9 @@ void msx_cart_keyboard_master_device::device_add_mconfig(machine_config &config) void msx_cart_keyboard_master_device::device_start() { // Install IO read/write handlers - io_space().install_write_handler(0x00, 0x00, write8smo_delegate(FUNC(vlm5030_device::data_w), m_vlm5030.target())); - io_space().install_write_handler(0x20, 0x20, write8smo_delegate(FUNC(msx_cart_keyboard_master_device::io_20_w), this)); - io_space().install_read_handler(0x00, 0x00, read8smo_delegate(FUNC(msx_cart_keyboard_master_device::io_00_r), this)); + io_space().install_write_handler(0x00, 0x00, write8smo_delegate(*m_vlm5030, FUNC(vlm5030_device::data_w))); + io_space().install_write_handler(0x20, 0x20, write8smo_delegate(*this, FUNC(msx_cart_keyboard_master_device::io_20_w))); + io_space().install_read_handler(0x00, 0x00, read8smo_delegate(*this, FUNC(msx_cart_keyboard_master_device::io_00_r))); } diff --git a/src/devices/bus/msx_cart/korean.cpp b/src/devices/bus/msx_cart/korean.cpp index 1906a5eb51b..e12f15bd43d 100644 --- a/src/devices/bus/msx_cart/korean.cpp +++ b/src/devices/bus/msx_cart/korean.cpp @@ -117,7 +117,7 @@ void msx_cart_korean_90in1_device::device_start() save_item(NAME(m_selected_bank)); // Install IO read/write handlers - io_space().install_write_handler(0x77, 0x77, write8smo_delegate(FUNC(msx_cart_korean_90in1_device::banking), this)); + io_space().install_write_handler(0x77, 0x77, write8smo_delegate(*this, FUNC(msx_cart_korean_90in1_device::banking))); } diff --git a/src/devices/bus/msx_cart/moonsound.cpp b/src/devices/bus/msx_cart/moonsound.cpp index afdb3c039eb..74e13d4af90 100644 --- a/src/devices/bus/msx_cart/moonsound.cpp +++ b/src/devices/bus/msx_cart/moonsound.cpp @@ -71,9 +71,9 @@ const tiny_rom_entry *msx_cart_moonsound_device::device_rom_region() const void msx_cart_moonsound_device::device_start() { // Install IO read/write handlers - io_space().install_readwrite_handler(0x7e, 0x7f, read8sm_delegate(FUNC(msx_cart_moonsound_device::read_ymf278b_pcm), this), write8sm_delegate(FUNC(msx_cart_moonsound_device::write_ymf278b_pcm), this)); - io_space().install_readwrite_handler(0xc4, 0xc7, read8sm_delegate(FUNC(msx_cart_moonsound_device::read_ymf278b_fm), this), write8sm_delegate(FUNC(msx_cart_moonsound_device::write_ymf278b_fm), this)); - io_space().install_read_handler(0xc0, 0xc0, read8smo_delegate(FUNC(msx_cart_moonsound_device::read_c0), this)); + io_space().install_readwrite_handler(0x7e, 0x7f, read8sm_delegate(*this, FUNC(msx_cart_moonsound_device::read_ymf278b_pcm)), write8sm_delegate(*this, FUNC(msx_cart_moonsound_device::write_ymf278b_pcm))); + io_space().install_readwrite_handler(0xc4, 0xc7, read8sm_delegate(*this, FUNC(msx_cart_moonsound_device::read_ymf278b_fm)), write8sm_delegate(*this, FUNC(msx_cart_moonsound_device::write_ymf278b_fm))); + io_space().install_read_handler(0xc0, 0xc0, read8smo_delegate(*this, FUNC(msx_cart_moonsound_device::read_c0))); } diff --git a/src/devices/bus/msx_cart/msx_audio.cpp b/src/devices/bus/msx_cart/msx_audio.cpp index 679c035b014..924ae60e40a 100644 --- a/src/devices/bus/msx_cart/msx_audio.cpp +++ b/src/devices/bus/msx_cart/msx_audio.cpp @@ -96,8 +96,8 @@ void msx_cart_msx_audio_hxmu900_device::device_add_mconfig(machine_config &confi void msx_cart_msx_audio_hxmu900_device::device_start() { // Install IO read/write handlers - io_space().install_write_handler(0xc0, 0xc1, write8sm_delegate(FUNC(y8950_device::write), m_y8950.target())); - io_space().install_read_handler(0xc0, 0xc1, read8sm_delegate(FUNC(y8950_device::read), m_y8950.target())); + io_space().install_write_handler(0xc0, 0xc1, write8sm_delegate(*m_y8950, FUNC(y8950_device::write))); + io_space().install_read_handler(0xc0, 0xc1, read8sm_delegate(*m_y8950, FUNC(y8950_device::read))); } @@ -200,10 +200,10 @@ WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205_device::midi_in) void msx_cart_msx_audio_nms1205_device::device_start() { // Install IO read/write handlers - io_space().install_write_handler(0xc0, 0xc1, write8sm_delegate(FUNC(y8950_device::write), m_y8950.target())); - io_space().install_read_handler(0xc0, 0xc1, read8sm_delegate(FUNC(y8950_device::read), m_y8950.target())); - io_space().install_write_handler(0x00, 0x01, write8sm_delegate(FUNC(acia6850_device::write), m_acia6850.target())); - io_space().install_read_handler(0x04, 0x05, read8sm_delegate(FUNC(acia6850_device::read), m_acia6850.target())); + io_space().install_write_handler(0xc0, 0xc1, write8sm_delegate(*m_y8950, FUNC(y8950_device::write))); + io_space().install_read_handler(0xc0, 0xc1, read8sm_delegate(*m_y8950, FUNC(y8950_device::read))); + io_space().install_write_handler(0x00, 0x01, write8sm_delegate(*m_acia6850, FUNC(acia6850_device::write))); + io_space().install_read_handler(0x04, 0x05, read8sm_delegate(*m_acia6850, FUNC(acia6850_device::read))); } @@ -287,8 +287,8 @@ const tiny_rom_entry *msx_cart_msx_audio_fsca1_device::device_rom_region() const void msx_cart_msx_audio_fsca1_device::device_start() { // Install IO read/write handlers - io_space().install_write_handler(0xc0, 0xc3, write8sm_delegate(FUNC(msx_cart_msx_audio_fsca1_device::write_y8950), this)); - io_space().install_read_handler(0xc0, 0xc3, read8sm_delegate(FUNC(msx_cart_msx_audio_fsca1_device::read_y8950), this)); + io_space().install_write_handler(0xc0, 0xc3, write8sm_delegate(*this, FUNC(msx_cart_msx_audio_fsca1_device::write_y8950))); + io_space().install_read_handler(0xc0, 0xc3, read8sm_delegate(*this, FUNC(msx_cart_msx_audio_fsca1_device::read_y8950))); } diff --git a/src/devices/bus/msx_cart/superloderunner.cpp b/src/devices/bus/msx_cart/superloderunner.cpp index b846a935953..168f9187f8d 100644 --- a/src/devices/bus/msx_cart/superloderunner.cpp +++ b/src/devices/bus/msx_cart/superloderunner.cpp @@ -20,7 +20,7 @@ void msx_cart_superloderunner_device::device_start() save_item(NAME(m_selected_bank)); // Install evil memory write handler - memory_space().install_write_handler(0x0000, 0x0000, write8smo_delegate(FUNC(msx_cart_superloderunner_device::banking), this)); + memory_space().install_write_handler(0x0000, 0x0000, write8smo_delegate(*this, FUNC(msx_cart_superloderunner_device::banking))); } diff --git a/src/devices/bus/msx_cart/yamaha.cpp b/src/devices/bus/msx_cart/yamaha.cpp index c7a33a7e4c7..472b8680b12 100644 --- a/src/devices/bus/msx_cart/yamaha.cpp +++ b/src/devices/bus/msx_cart/yamaha.cpp @@ -106,7 +106,7 @@ void msx_cart_sfg_device::device_start() // This should probably moved up in the bus/slot hierarchy for the msx driver cpu_device *maincpu = machine().device<cpu_device>("maincpu"); - maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(msx_cart_sfg_device::irq_callback),this)); + maincpu->set_irq_acknowledge_callback(FUNC(msx_cart_sfg_device::irq_callback)); } diff --git a/src/devices/bus/msx_slot/disk.cpp b/src/devices/bus/msx_slot/disk.cpp index 309b7f2d80f..78a15b7d841 100644 --- a/src/devices/bus/msx_slot/disk.cpp +++ b/src/devices/bus/msx_slot/disk.cpp @@ -533,8 +533,8 @@ void msx_slot_disk5_device::device_start() save_item(NAME(m_control)); // Install IO read/write handlers - io_space().install_write_handler(0xd0, 0xd4, write8sm_delegate(FUNC(msx_slot_disk5_device::io_write), this)); - io_space().install_read_handler(0xd0, 0xd4, read8sm_delegate(FUNC(msx_slot_disk5_device::io_read), this)); + io_space().install_write_handler(0xd0, 0xd4, write8sm_delegate(*this, FUNC(msx_slot_disk5_device::io_write))); + io_space().install_read_handler(0xd0, 0xd4, read8sm_delegate(*this, FUNC(msx_slot_disk5_device::io_read))); } diff --git a/src/devices/bus/msx_slot/music.cpp b/src/devices/bus/msx_slot/music.cpp index 0e3ae00b0f3..1c5daf86b67 100644 --- a/src/devices/bus/msx_slot/music.cpp +++ b/src/devices/bus/msx_slot/music.cpp @@ -32,7 +32,7 @@ void msx_slot_music_device::device_start() } // Install IO read/write handlers - io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(FUNC(msx_slot_music_device::write_ym2413), this)); + io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(*this, FUNC(msx_slot_music_device::write_ym2413))); } diff --git a/src/devices/bus/msx_slot/ram_mm.cpp b/src/devices/bus/msx_slot/ram_mm.cpp index ade67f6eb66..84498f9afe1 100644 --- a/src/devices/bus/msx_slot/ram_mm.cpp +++ b/src/devices/bus/msx_slot/ram_mm.cpp @@ -41,8 +41,8 @@ void msx_slot_ram_mm_device::device_start() save_item(NAME(m_bank_selected)); // Install IO read/write handlers - io_space().install_read_handler(0xFC, 0xFF, read8sm_delegate(FUNC(msx_slot_ram_mm_device::read_mapper_bank), this)); - io_space().install_write_handler(0xFC, 0xFF, write8sm_delegate(FUNC(msx_slot_ram_mm_device::write_mapper_bank), this)); + io_space().install_read_handler(0xFC, 0xFF, read8sm_delegate(*this, FUNC(msx_slot_ram_mm_device::read_mapper_bank))); + io_space().install_write_handler(0xFC, 0xFF, write8sm_delegate(*this, FUNC(msx_slot_ram_mm_device::write_mapper_bank))); } void msx_slot_ram_mm_device::device_post_load() diff --git a/src/devices/bus/mtx/sdx.cpp b/src/devices/bus/mtx/sdx.cpp index d34e73e7605..6f3a9d33417 100644 --- a/src/devices/bus/mtx/sdx.cpp +++ b/src/devices/bus/mtx/sdx.cpp @@ -163,7 +163,7 @@ void mtx_sdxcpm_device::device_add_mconfig(machine_config &config) m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(mtx_sdxcpm_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(mtx_sdxcpm_device::crtc_update_row)); } @@ -239,8 +239,8 @@ void mtx_sdxbas_device::device_reset() machine().root_device().membank("rommap_bank1")->configure_entry(3, m_sdx_rom->base()); /* SDX FDC */ - io_space().install_readwrite_handler(0x10, 0x13, read8sm_delegate(FUNC(mb8877_device::read), m_fdc.target()), write8sm_delegate(FUNC(mb8877_device::write), m_fdc.target())); - io_space().install_readwrite_handler(0x14, 0x14, read8_delegate(FUNC(mtx_sdx_device::sdx_status_r), this), write8_delegate(FUNC(mtx_sdx_device::sdx_control_w), this)); + io_space().install_readwrite_handler(0x10, 0x13, read8sm_delegate(*m_fdc, FUNC(mb8877_device::read)), write8sm_delegate(*m_fdc, FUNC(mb8877_device::write))); + io_space().install_readwrite_handler(0x14, 0x14, read8_delegate(*this, FUNC(mtx_sdx_device::sdx_status_r)), write8_delegate(*this, FUNC(mtx_sdx_device::sdx_control_w))); } void mtx_sdxcpm_device::device_reset() @@ -248,13 +248,13 @@ void mtx_sdxcpm_device::device_reset() machine().root_device().membank("rommap_bank1")->configure_entry(3, m_sdx_rom->base()); /* SDX FDC */ - io_space().install_readwrite_handler(0x10, 0x13, read8sm_delegate(FUNC(mb8877_device::read), m_fdc.target()), write8sm_delegate(FUNC(mb8877_device::write), m_fdc.target())); - io_space().install_readwrite_handler(0x14, 0x14, read8_delegate(FUNC(mtx_sdx_device::sdx_status_r), this), write8_delegate(FUNC(mtx_sdx_device::sdx_control_w), this)); + io_space().install_readwrite_handler(0x10, 0x13, read8sm_delegate(*m_fdc, FUNC(mb8877_device::read)), write8sm_delegate(*m_fdc, FUNC(mb8877_device::write))); + io_space().install_readwrite_handler(0x14, 0x14, read8_delegate(*this, FUNC(mtx_sdx_device::sdx_status_r)), write8_delegate(*this, FUNC(mtx_sdx_device::sdx_control_w))); /* 80 column */ - io_space().install_readwrite_handler(0x30, 0x33, read8_delegate(FUNC(mtx_sdxcpm_device::mtx_80col_r), this), write8_delegate(FUNC(mtx_sdxcpm_device::mtx_80col_w), this)); - io_space().install_readwrite_handler(0x38, 0x38, read8smo_delegate(FUNC(mc6845_device::status_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target())); - io_space().install_readwrite_handler(0x39, 0x39, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target())); + io_space().install_readwrite_handler(0x30, 0x33, read8_delegate(*this, FUNC(mtx_sdxcpm_device::mtx_80col_r)), write8_delegate(*this, FUNC(mtx_sdxcpm_device::mtx_80col_w))); + io_space().install_readwrite_handler(0x38, 0x38, read8smo_delegate(*m_crtc, FUNC(mc6845_device::status_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::address_w))); + io_space().install_readwrite_handler(0x39, 0x39, read8smo_delegate(*m_crtc, FUNC(mc6845_device::register_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::register_w))); memset(m_80col_char_ram, 0, sizeof(m_80col_char_ram)); memset(m_80col_attr_ram, 0, sizeof(m_80col_attr_ram)); diff --git a/src/devices/bus/nasbus/avc.cpp b/src/devices/bus/nasbus/avc.cpp index 4aacc354567..e25e6164f75 100644 --- a/src/devices/bus/nasbus/avc.cpp +++ b/src/devices/bus/nasbus/avc.cpp @@ -34,7 +34,7 @@ void nascom_avc_device::device_add_mconfig(machine_config &config) m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(6); - m_crtc->set_update_row_callback(FUNC(nascom_avc_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(nascom_avc_device::crtc_update_row)); } @@ -78,9 +78,9 @@ void nascom_avc_device::device_start() void nascom_avc_device::device_reset() { - io_space().install_write_handler(0xb0, 0xb0, write8smo_delegate(FUNC(mc6845_device::address_w), m_crtc.target())); - io_space().install_readwrite_handler(0xb1, 0xb1, read8smo_delegate(FUNC(mc6845_device::register_r), m_crtc.target()), write8smo_delegate(FUNC(mc6845_device::register_w), m_crtc.target())); - io_space().install_write_handler(0xb2, 0xb2, write8_delegate(FUNC(nascom_avc_device::control_w), this)); + io_space().install_write_handler(0xb0, 0xb0, write8smo_delegate(*m_crtc, FUNC(mc6845_device::address_w))); + io_space().install_readwrite_handler(0xb1, 0xb1, read8smo_delegate(*m_crtc, FUNC(mc6845_device::register_r)), write8smo_delegate(*m_crtc, FUNC(mc6845_device::register_w))); + io_space().install_write_handler(0xb2, 0xb2, write8_delegate(*this, FUNC(nascom_avc_device::control_w))); } @@ -132,7 +132,7 @@ WRITE8_MEMBER( nascom_avc_device::control_w ) if (((m_control & 0x07) == 0) && (data & 0x07)) { m_nasbus->ram_disable_w(0); - program_space().install_readwrite_handler(0x8000, 0xbfff, read8_delegate(FUNC(nascom_avc_device::vram_r), this), write8_delegate(FUNC(nascom_avc_device::vram_w), this)); + program_space().install_readwrite_handler(0x8000, 0xbfff, read8_delegate(*this, FUNC(nascom_avc_device::vram_r)), write8_delegate(*this, FUNC(nascom_avc_device::vram_w))); } else if ((data & 0x07) == 0) { diff --git a/src/devices/bus/nasbus/floppy.cpp b/src/devices/bus/nasbus/floppy.cpp index 0f19c846bd0..4b57d7ee0aa 100644 --- a/src/devices/bus/nasbus/floppy.cpp +++ b/src/devices/bus/nasbus/floppy.cpp @@ -89,9 +89,9 @@ void nascom_fdc_device::device_start() void nascom_fdc_device::device_reset() { - io_space().install_readwrite_handler(0xe0, 0xe3, read8sm_delegate(FUNC(fd1793_device::read), m_fdc.target()), write8sm_delegate(FUNC(fd1793_device::write), m_fdc.target())); - io_space().install_readwrite_handler(0xe4, 0xe4, read8_delegate(FUNC(nascom_fdc_device::select_r), this), write8_delegate(FUNC(nascom_fdc_device::select_w), this)); - io_space().install_read_handler(0xe5, 0xe5, read8_delegate(FUNC(nascom_fdc_device::status_r), this)); + io_space().install_readwrite_handler(0xe0, 0xe3, read8sm_delegate(*m_fdc, FUNC(fd1793_device::read)), write8sm_delegate(*m_fdc, FUNC(fd1793_device::write))); + io_space().install_readwrite_handler(0xe4, 0xe4, read8_delegate(*this, FUNC(nascom_fdc_device::select_r)), write8_delegate(*this, FUNC(nascom_fdc_device::select_w))); + io_space().install_read_handler(0xe5, 0xe5, read8_delegate(*this, FUNC(nascom_fdc_device::status_r))); } //------------------------------------------------- diff --git a/src/devices/bus/nubus/bootbug.cpp b/src/devices/bus/nubus/bootbug.cpp index 24763b64dc2..427d35b33b5 100644 --- a/src/devices/bus/nubus/bootbug.cpp +++ b/src/devices/bus/nubus/bootbug.cpp @@ -102,7 +102,7 @@ void nubus_bootbug_device::device_start() slotspace = get_slotspace(); - nubus().install_device(slotspace, slotspace+0xff, read32_delegate(FUNC(nubus_bootbug_device::dev_r), this), write32_delegate(FUNC(nubus_bootbug_device::dev_w), this)); + nubus().install_device(slotspace, slotspace+0xff, read32_delegate(*this, FUNC(nubus_bootbug_device::dev_r)), write32_delegate(*this, FUNC(nubus_bootbug_device::dev_w))); } //------------------------------------------------- diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp index 86f4fca21ec..f54c98ff3f1 100644 --- a/src/devices/bus/nubus/nubus_48gc.cpp +++ b/src/devices/bus/nubus/nubus_48gc.cpp @@ -109,7 +109,7 @@ void jmfb_device::device_start() m_vram.resize(VRAM_SIZE); install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_48gc", &m_vram[0]); - nubus().install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(FUNC(jmfb_device::mac_48gc_r), this), write32_delegate(FUNC(jmfb_device::mac_48gc_w), this)); + nubus().install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(*this, FUNC(jmfb_device::mac_48gc_r)), write32_delegate(*this, FUNC(jmfb_device::mac_48gc_w))); m_timer = timer_alloc(0, nullptr); m_screen = nullptr; // can we look this up now? diff --git a/src/devices/bus/nubus/nubus_asntmc3b.cpp b/src/devices/bus/nubus/nubus_asntmc3b.cpp index f6c0135af5f..2da81f791db 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.cpp +++ b/src/devices/bus/nubus/nubus_asntmc3b.cpp @@ -111,10 +111,10 @@ void nubus_mac8390_device::device_start() // TODO: move 24-bit mirroring down into nubus.c uint32_t ofs_24bit = slotno()<<20; - nubus().install_device(slotspace+0xd0000, slotspace+0xdffff, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this)); - nubus().install_device(slotspace+0xe0000, slotspace+0xe003f, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this)); - nubus().install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_r), this), write8_delegate(FUNC(nubus_mac8390_device::asntm3b_ram_w), this)); - nubus().install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32_delegate(FUNC(nubus_mac8390_device::en_r), this), write32_delegate(FUNC(nubus_mac8390_device::en_w), this)); + nubus().install_device(slotspace+0xd0000, slotspace+0xdffff, read8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w))); + nubus().install_device(slotspace+0xe0000, slotspace+0xe003f, read32_delegate(*this, FUNC(nubus_mac8390_device::en_r)), write32_delegate(*this, FUNC(nubus_mac8390_device::en_w))); + nubus().install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w))); + nubus().install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32_delegate(*this, FUNC(nubus_mac8390_device::en_r)), write32_delegate(*this, FUNC(nubus_mac8390_device::en_w))); } //------------------------------------------------- diff --git a/src/devices/bus/nubus/nubus_cb264.cpp b/src/devices/bus/nubus/nubus_cb264.cpp index 01bff0877da..99d67081ecd 100644 --- a/src/devices/bus/nubus/nubus_cb264.cpp +++ b/src/devices/bus/nubus/nubus_cb264.cpp @@ -95,8 +95,8 @@ void nubus_cb264_device::device_start() m_vram.resize(VRAM_SIZE); install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_cb264", &m_vram[0]); - nubus().install_device(slotspace+0xff6000, slotspace+0xff60ff, read32_delegate(FUNC(nubus_cb264_device::cb264_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_w), this)); - nubus().install_device(slotspace+0xff7000, slotspace+0xff70ff, read32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_r), this), write32_delegate(FUNC(nubus_cb264_device::cb264_ramdac_w), this)); + nubus().install_device(slotspace+0xff6000, slotspace+0xff60ff, read32_delegate(*this, FUNC(nubus_cb264_device::cb264_r)), write32_delegate(*this, FUNC(nubus_cb264_device::cb264_w))); + nubus().install_device(slotspace+0xff7000, slotspace+0xff70ff, read32_delegate(*this, FUNC(nubus_cb264_device::cb264_ramdac_r)), write32_delegate(*this, FUNC(nubus_cb264_device::cb264_ramdac_w))); } //------------------------------------------------- diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp index 36f40eb3184..1dd6bc2ab56 100644 --- a/src/devices/bus/nubus/nubus_image.cpp +++ b/src/devices/bus/nubus/nubus_image.cpp @@ -180,13 +180,13 @@ void nubus_image_device::device_start() // printf("[image %p] slotspace = %x, super = %x\n", this, slotspace, superslotspace); - nubus().install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_image_device::image_r), this), write32_delegate(FUNC(nubus_image_device::image_w), this)); - nubus().install_device(slotspace+4, slotspace+7, read32_delegate(FUNC(nubus_image_device::image_status_r), this), write32_delegate(FUNC(nubus_image_device::image_status_w), this)); - nubus().install_device(slotspace+8, slotspace+11, read32_delegate(FUNC(nubus_image_device::file_cmd_r), this), write32_delegate(FUNC(nubus_image_device::file_cmd_w), this)); - nubus().install_device(slotspace+12, slotspace+15, read32_delegate(FUNC(nubus_image_device::file_data_r), this), write32_delegate(FUNC(nubus_image_device::file_data_w), this)); - nubus().install_device(slotspace+16, slotspace+19, read32_delegate(FUNC(nubus_image_device::file_len_r), this), write32_delegate(FUNC(nubus_image_device::file_len_w), this)); - nubus().install_device(slotspace+20, slotspace+147, read32_delegate(FUNC(nubus_image_device::file_name_r), this), write32_delegate(FUNC(nubus_image_device::file_name_w), this)); - nubus().install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32_delegate(FUNC(nubus_image_device::image_super_r), this), write32_delegate(FUNC(nubus_image_device::image_super_w), this)); + nubus().install_device(slotspace, slotspace+3, read32_delegate(*this, FUNC(nubus_image_device::image_r)), write32_delegate(*this, FUNC(nubus_image_device::image_w))); + nubus().install_device(slotspace+4, slotspace+7, read32_delegate(*this, FUNC(nubus_image_device::image_status_r)), write32_delegate(*this, FUNC(nubus_image_device::image_status_w))); + nubus().install_device(slotspace+8, slotspace+11, read32_delegate(*this, FUNC(nubus_image_device::file_cmd_r)), write32_delegate(*this, FUNC(nubus_image_device::file_cmd_w))); + nubus().install_device(slotspace+12, slotspace+15, read32_delegate(*this, FUNC(nubus_image_device::file_data_r)), write32_delegate(*this, FUNC(nubus_image_device::file_data_w))); + nubus().install_device(slotspace+16, slotspace+19, read32_delegate(*this, FUNC(nubus_image_device::file_len_r)), write32_delegate(*this, FUNC(nubus_image_device::file_len_w))); + nubus().install_device(slotspace+20, slotspace+147, read32_delegate(*this, FUNC(nubus_image_device::file_name_r)), write32_delegate(*this, FUNC(nubus_image_device::file_name_w))); + nubus().install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32_delegate(*this, FUNC(nubus_image_device::image_super_r)), write32_delegate(*this, FUNC(nubus_image_device::image_super_w))); m_image = subdevice<messimg_disk_image_device>(IMAGE_DISK0_TAG); diff --git a/src/devices/bus/nubus/nubus_m2hires.cpp b/src/devices/bus/nubus/nubus_m2hires.cpp index c575f7d94b1..7ba4efe9b30 100644 --- a/src/devices/bus/nubus/nubus_m2hires.cpp +++ b/src/devices/bus/nubus/nubus_m2hires.cpp @@ -93,9 +93,9 @@ void nubus_m2hires_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this)); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2hires_device::m2hires_r), this), write32_delegate(FUNC(nubus_m2hires_device::m2hires_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_m2hires_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2hires_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_m2hires_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2hires_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_m2hires_device::m2hires_r)), write32_delegate(*this, FUNC(nubus_m2hires_device::m2hires_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp index b16391b640d..ea515895cb3 100644 --- a/src/devices/bus/nubus/nubus_m2video.cpp +++ b/src/devices/bus/nubus/nubus_m2video.cpp @@ -95,9 +95,9 @@ void nubus_m2video_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this)); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2video_device::m2video_r), this), write32_delegate(FUNC(nubus_m2video_device::m2video_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_m2video_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2video_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_m2video_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2video_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_m2video_device::m2video_r)), write32_delegate(*this, FUNC(nubus_m2video_device::m2video_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/nubus_radiustpd.cpp b/src/devices/bus/nubus/nubus_radiustpd.cpp index 1ee2e0cb7fb..3f1ccfc9146 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.cpp +++ b/src/devices/bus/nubus/nubus_radiustpd.cpp @@ -94,10 +94,10 @@ void nubus_radiustpd_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_radiustpd_device::vram_r), this), write32_delegate(FUNC(nubus_radiustpd_device::vram_w), this)); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this)); - nubus().install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_radiustpd_device::vram_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_radiustpd_device::vram_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_w))); + nubus().install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/nubus_spec8.cpp b/src/devices/bus/nubus/nubus_spec8.cpp index 1353d3b9a9d..00f5481aee8 100644 --- a/src/devices/bus/nubus/nubus_spec8.cpp +++ b/src/devices/bus/nubus/nubus_spec8.cpp @@ -97,9 +97,9 @@ void nubus_spec8s3_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this)); - nubus().install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_spec8s3_device::vram_r)), write32_delegate(*this, FUNC(nubus_spec8s3_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_spec8s3_device::vram_r)), write32_delegate(*this, FUNC(nubus_spec8s3_device::vram_w))); + nubus().install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(*this, FUNC(nubus_spec8s3_device::spec8s3_r)), write32_delegate(*this, FUNC(nubus_spec8s3_device::spec8s3_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(767, 0), 0); diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp index 2e09a258bd2..b3d85466ee5 100644 --- a/src/devices/bus/nubus/nubus_specpdq.cpp +++ b/src/devices/bus/nubus/nubus_specpdq.cpp @@ -114,8 +114,8 @@ void nubus_specpdq_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_specpdq_device::vram_r), this), write32_delegate(FUNC(nubus_specpdq_device::vram_w), this)); - nubus().install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_specpdq_device::vram_r)), write32_delegate(*this, FUNC(nubus_specpdq_device::vram_w))); + nubus().install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(*this, FUNC(nubus_specpdq_device::specpdq_r)), write32_delegate(*this, FUNC(nubus_specpdq_device::specpdq_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(843, 0), 0); diff --git a/src/devices/bus/nubus/nubus_vikbw.cpp b/src/devices/bus/nubus/nubus_vikbw.cpp index ab3af18fe72..875ddf676f4 100644 --- a/src/devices/bus/nubus/nubus_vikbw.cpp +++ b/src/devices/bus/nubus/nubus_vikbw.cpp @@ -92,8 +92,8 @@ void nubus_vikbw_device::device_start() install_bank(slotspace+0x40000, slotspace+0x40000+VRAM_SIZE-1, "bank_vikbw", &m_vram[0]); install_bank(slotspace+0x940000, slotspace+0x940000+VRAM_SIZE-1, "bank_vikbw2", &m_vram[0]); - nubus().install_device(slotspace, slotspace+3, read32_delegate(FUNC(nubus_vikbw_device::viking_enable_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_disable_w), this)); - nubus().install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(FUNC(nubus_vikbw_device::viking_ack_r), this), write32_delegate(FUNC(nubus_vikbw_device::viking_ack_w), this)); + nubus().install_device(slotspace, slotspace+3, read32_delegate(*this, FUNC(nubus_vikbw_device::viking_enable_r)), write32_delegate(*this, FUNC(nubus_vikbw_device::viking_disable_w))); + nubus().install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(*this, FUNC(nubus_vikbw_device::viking_ack_r)), write32_delegate(*this, FUNC(nubus_vikbw_device::viking_ack_w))); } //------------------------------------------------- diff --git a/src/devices/bus/nubus/nubus_wsportrait.cpp b/src/devices/bus/nubus/nubus_wsportrait.cpp index 12702c052a6..fd85e99b99b 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.cpp +++ b/src/devices/bus/nubus/nubus_wsportrait.cpp @@ -96,9 +96,9 @@ void nubus_wsportrait_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this)); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_wsportrait_device::wsportrait_r), this), write32_delegate(FUNC(nubus_wsportrait_device::wsportrait_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_wsportrait_device::vram_r)), write32_delegate(*this, FUNC(nubus_wsportrait_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_wsportrait_device::vram_r)), write32_delegate(*this, FUNC(nubus_wsportrait_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_wsportrait_device::wsportrait_r)), write32_delegate(*this, FUNC(nubus_wsportrait_device::wsportrait_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(869, 0), 0); diff --git a/src/devices/bus/nubus/pds30_30hr.cpp b/src/devices/bus/nubus/pds30_30hr.cpp index 190872708f6..dbd0018cecd 100644 --- a/src/devices/bus/nubus/pds30_30hr.cpp +++ b/src/devices/bus/nubus/pds30_30hr.cpp @@ -96,8 +96,8 @@ void nubus_xceed30hr_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceed30hr_device::vram_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::vram_w), this)); - nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_xceed30hr_device::vram_r)), write32_delegate(*this, FUNC(nubus_xceed30hr_device::vram_w))); + nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(*this, FUNC(nubus_xceed30hr_device::xceed30hr_r)), write32_delegate(*this, FUNC(nubus_xceed30hr_device::xceed30hr_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/pds30_cb264.cpp b/src/devices/bus/nubus/pds30_cb264.cpp index 4d153596fe0..f7111b2a8e6 100644 --- a/src/devices/bus/nubus/pds30_cb264.cpp +++ b/src/devices/bus/nubus/pds30_cb264.cpp @@ -90,8 +90,8 @@ void nubus_cb264se30_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_cb264se30_device::vram_r), this), write32_delegate(FUNC(nubus_cb264se30_device::vram_w), this)); - nubus().install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_cb264se30_device::vram_r)), write32_delegate(*this, FUNC(nubus_cb264se30_device::vram_w))); + nubus().install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(*this, FUNC(nubus_cb264se30_device::cb264se30_r)), write32_delegate(*this, FUNC(nubus_cb264se30_device::cb264se30_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/pds30_mc30.cpp b/src/devices/bus/nubus/pds30_mc30.cpp index 6770b517deb..068ce736156 100644 --- a/src/devices/bus/nubus/pds30_mc30.cpp +++ b/src/devices/bus/nubus/pds30_mc30.cpp @@ -92,8 +92,8 @@ void nubus_xceedmc30_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceedmc30_device::vram_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::vram_w), this)); - nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_xceedmc30_device::vram_r)), write32_delegate(*this, FUNC(nubus_xceedmc30_device::vram_w))); + nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(*this, FUNC(nubus_xceedmc30_device::xceedmc30_r)), write32_delegate(*this, FUNC(nubus_xceedmc30_device::xceedmc30_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/pds30_procolor816.cpp b/src/devices/bus/nubus/pds30_procolor816.cpp index 440ba6c86d7..0399378216f 100644 --- a/src/devices/bus/nubus/pds30_procolor816.cpp +++ b/src/devices/bus/nubus/pds30_procolor816.cpp @@ -95,9 +95,9 @@ void nubus_procolor816_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this)); - nubus().install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(FUNC(nubus_procolor816_device::procolor816_r), this), write32_delegate(FUNC(nubus_procolor816_device::procolor816_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_procolor816_device::vram_r)), write32_delegate(*this, FUNC(nubus_procolor816_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_procolor816_device::vram_r)), write32_delegate(*this, FUNC(nubus_procolor816_device::vram_w))); + nubus().install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(*this, FUNC(nubus_procolor816_device::procolor816_r)), write32_delegate(*this, FUNC(nubus_procolor816_device::procolor816_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); diff --git a/src/devices/bus/nubus/pds30_sigmalview.cpp b/src/devices/bus/nubus/pds30_sigmalview.cpp index 51f27a03713..84e5fee67c0 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.cpp +++ b/src/devices/bus/nubus/pds30_sigmalview.cpp @@ -90,9 +90,9 @@ void nubus_lview_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this)); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this)); - nubus().install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(FUNC(nubus_lview_device::lview_r), this), write32_delegate(FUNC(nubus_lview_device::lview_w), this)); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_lview_device::vram_r)), write32_delegate(*this, FUNC(nubus_lview_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_lview_device::vram_r)), write32_delegate(*this, FUNC(nubus_lview_device::vram_w))); + nubus().install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(*this, FUNC(nubus_lview_device::lview_r)), write32_delegate(*this, FUNC(nubus_lview_device::lview_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(599, 0), 0); diff --git a/src/devices/bus/nubus/quadralink.cpp b/src/devices/bus/nubus/quadralink.cpp index 9ba40a99748..84855baebc3 100644 --- a/src/devices/bus/nubus/quadralink.cpp +++ b/src/devices/bus/nubus/quadralink.cpp @@ -110,7 +110,7 @@ void nubus_quadralink_device::device_start() slotspace = get_slotspace(); - nubus().install_device(slotspace, slotspace+0xefffff, read32_delegate(FUNC(nubus_quadralink_device::dev_r), this), write32_delegate(FUNC(nubus_quadralink_device::dev_w), this)); + nubus().install_device(slotspace, slotspace+0xefffff, read32_delegate(*this, FUNC(nubus_quadralink_device::dev_r)), write32_delegate(*this, FUNC(nubus_quadralink_device::dev_w))); } //------------------------------------------------- diff --git a/src/devices/bus/sbus/sbus.cpp b/src/devices/bus/sbus/sbus.cpp index 3fa46c124a0..8409d8a2598 100644 --- a/src/devices/bus/sbus/sbus.cpp +++ b/src/devices/bus/sbus/sbus.cpp @@ -111,9 +111,9 @@ void sbus_device::device_start() std::fill(std::begin(m_device_list), std::end(m_device_list), nullptr); m_space = &space(0); - m_space->install_readwrite_handler(0x00000000, 0x01ffffff, read32_delegate(FUNC(sbus_device::slot_timeout_r<0>), this), write32_delegate(FUNC(sbus_device::slot_timeout_w<0>), this)); - m_space->install_readwrite_handler(0x02000000, 0x03ffffff, read32_delegate(FUNC(sbus_device::slot_timeout_r<1>), this), write32_delegate(FUNC(sbus_device::slot_timeout_w<1>), this)); - m_space->install_readwrite_handler(0x04000000, 0x05ffffff, read32_delegate(FUNC(sbus_device::slot_timeout_r<2>), this), write32_delegate(FUNC(sbus_device::slot_timeout_w<2>), this)); + m_space->install_readwrite_handler(0x00000000, 0x01ffffff, read32_delegate(*this, FUNC(sbus_device::slot_timeout_r<0>)), write32_delegate(*this, FUNC(sbus_device::slot_timeout_w<0>))); + m_space->install_readwrite_handler(0x02000000, 0x03ffffff, read32_delegate(*this, FUNC(sbus_device::slot_timeout_r<1>)), write32_delegate(*this, FUNC(sbus_device::slot_timeout_w<1>))); + m_space->install_readwrite_handler(0x04000000, 0x05ffffff, read32_delegate(*this, FUNC(sbus_device::slot_timeout_r<2>)), write32_delegate(*this, FUNC(sbus_device::slot_timeout_w<2>))); } template <unsigned Slot> READ32_MEMBER(sbus_device::slot_timeout_r) diff --git a/src/devices/bus/snes_ctrl/ctrl.cpp b/src/devices/bus/snes_ctrl/ctrl.cpp index 09079bd9c91..c628a049b8c 100644 --- a/src/devices/bus/snes_ctrl/ctrl.cpp +++ b/src/devices/bus/snes_ctrl/ctrl.cpp @@ -61,7 +61,10 @@ device_snes_control_port_interface::~device_snes_control_port_interface() snes_control_port_device::snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SNES_CONTROL_PORT, tag, owner, clock), - device_slot_interface(mconfig, *this), m_device(nullptr) + device_slot_interface(mconfig, *this), + m_onscreen_cb(*this), + m_gunlatch_cb(*this), + m_device(nullptr) { } @@ -82,8 +85,8 @@ snes_control_port_device::~snes_control_port_device() void snes_control_port_device::device_start() { m_device = dynamic_cast<device_snes_control_port_interface *>(get_card_device()); - m_onscreen_cb.bind_relative_to(*owner()); - m_gunlatch_cb.bind_relative_to(*owner()); + m_onscreen_cb.resolve(); + m_gunlatch_cb.resolve(); } diff --git a/src/devices/bus/snes_ctrl/ctrl.h b/src/devices/bus/snes_ctrl/ctrl.h index 37db69537cc..cfcc8f03de9 100644 --- a/src/devices/bus/snes_ctrl/ctrl.h +++ b/src/devices/bus/snes_ctrl/ctrl.h @@ -37,10 +37,8 @@ protected: snes_control_port_device *m_port; }; -typedef device_delegate<bool (int16_t x, int16_t y)> snesctrl_onscreen_delegate; #define SNESCTRL_ONSCREEN_CB(name) bool name(int16_t x, int16_t y) -typedef device_delegate<void (int16_t x, int16_t y)> snesctrl_gunlatch_delegate; #define SNESCTRL_GUNLATCH_CB(name) void name(int16_t x, int16_t y) // ======================> snes_control_port_device @@ -48,6 +46,9 @@ typedef device_delegate<void (int16_t x, int16_t y)> snesctrl_gunlatch_delegate; class snes_control_port_device : public device_t, public device_slot_interface { public: + typedef device_delegate<bool (int16_t x, int16_t y)> onscreen_delegate; + typedef device_delegate<void (int16_t x, int16_t y)> gunlatch_delegate; + // construction/destruction template <typename T> snes_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) @@ -61,8 +62,8 @@ public: snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~snes_control_port_device(); - template <typename... T> void set_onscreen_callback(T &&... args) { m_onscreen_cb = snesctrl_onscreen_delegate(std::forward<T>(args)...); } - template <typename... T> void set_gunlatch_callback(T &&... args) { m_gunlatch_cb = snesctrl_gunlatch_delegate(std::forward<T>(args)...); } + template <typename... T> void set_onscreen_callback(T &&... args) { m_onscreen_cb.set(std::forward<T>(args)...); } + template <typename... T> void set_gunlatch_callback(T &&... args) { m_gunlatch_cb.set(std::forward<T>(args)...); } uint8_t read_pin4(); uint8_t read_pin5(); @@ -77,8 +78,8 @@ protected: // device-level overrides virtual void device_start() override; - snesctrl_onscreen_delegate m_onscreen_cb; - snesctrl_gunlatch_delegate m_gunlatch_cb; + onscreen_delegate m_onscreen_cb; + gunlatch_delegate m_gunlatch_cb; device_snes_control_port_interface *m_device; }; diff --git a/src/devices/bus/spectrum/intf2.cpp b/src/devices/bus/spectrum/intf2.cpp index ab9caf68f8c..7442dfe49a9 100644 --- a/src/devices/bus/spectrum/intf2.cpp +++ b/src/devices/bus/spectrum/intf2.cpp @@ -58,7 +58,7 @@ void spectrum_intf2_device::device_add_mconfig(machine_config &config) { /* cartridge */ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "spectrum_cart", "bin,rom"); - m_cart->set_device_load(FUNC(spectrum_intf2_device::cart_load), this); + m_cart->set_device_load(FUNC(spectrum_intf2_device::cart_load)); SOFTWARE_LIST(config, "cart_list").set_original("spectrum_cart"); } diff --git a/src/devices/bus/svi3x8/slot/sv806.cpp b/src/devices/bus/svi3x8/slot/sv806.cpp index e2319516781..bc4dafbd415 100644 --- a/src/devices/bus/svi3x8/slot/sv806.cpp +++ b/src/devices/bus/svi3x8/slot/sv806.cpp @@ -52,7 +52,7 @@ void sv806_device::device_add_mconfig(machine_config &config) m_crtc->set_screen("80col"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(sv806_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(sv806_device::crtc_update_row)); } diff --git a/src/devices/bus/tanbus/mpvdu.cpp b/src/devices/bus/tanbus/mpvdu.cpp index 8463d90b6c5..d172c93cae0 100644 --- a/src/devices/bus/tanbus/mpvdu.cpp +++ b/src/devices/bus/tanbus/mpvdu.cpp @@ -42,7 +42,7 @@ void tanbus_mpvdu_device::device_add_mconfig(machine_config &config) m_crtc->set_show_border_area(false); m_crtc->set_char_width(12); m_crtc->out_vsync_callback().set(FUNC(tanbus_mpvdu_device::vsync_changed)); - m_crtc->set_update_row_callback(FUNC(tanbus_mpvdu_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(tanbus_mpvdu_device::crtc_update_row)); SAA5050(config, m_trom, DERIVED_CLOCK(1, 1)); m_trom->d_cb().set(FUNC(tanbus_mpvdu_device::videoram_r)); diff --git a/src/devices/bus/tanbus/ravdu.cpp b/src/devices/bus/tanbus/ravdu.cpp index a68a609c18e..2a53497d079 100644 --- a/src/devices/bus/tanbus/ravdu.cpp +++ b/src/devices/bus/tanbus/ravdu.cpp @@ -43,7 +43,7 @@ void tanbus_ravdu_device::device_add_mconfig(machine_config &config) m_crtc->set_show_border_area(false); m_crtc->set_char_width(12); m_crtc->out_vsync_callback().set(FUNC(tanbus_ravdu_device::vsync_changed)); - m_crtc->set_update_row_callback(FUNC(tanbus_ravdu_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(tanbus_ravdu_device::crtc_update_row)); SAA5055(config, m_trom, DERIVED_CLOCK(1, 1)); m_trom->d_cb().set(FUNC(tanbus_ravdu_device::videoram_r)); diff --git a/src/devices/bus/ti99x/990_hd.cpp b/src/devices/bus/ti99x/990_hd.cpp index 8e9c08648a5..a6ae9e63136 100644 --- a/src/devices/bus/ti99x/990_hd.cpp +++ b/src/devices/bus/ti99x/990_hd.cpp @@ -1007,18 +1007,18 @@ void ti990_hdc_device::device_start() void ti990_hdc_device::device_add_mconfig(machine_config &config) { harddisk_image_device &harddisk1(HARDDISK(config, "harddisk1")); - harddisk1.set_device_load(FUNC(ti990_hdc_device::load_hd), this); - harddisk1.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this); + harddisk1.set_device_load(FUNC(ti990_hdc_device::load_hd)); + harddisk1.set_device_unload(FUNC(ti990_hdc_device::unload_hd)); harddisk_image_device &harddisk2(HARDDISK(config, "harddisk2")); - harddisk2.set_device_load(FUNC(ti990_hdc_device::load_hd), this); - harddisk2.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this); + harddisk2.set_device_load(FUNC(ti990_hdc_device::load_hd)); + harddisk2.set_device_unload(FUNC(ti990_hdc_device::unload_hd)); harddisk_image_device &harddisk3(HARDDISK(config, "harddisk3")); - harddisk3.set_device_load(FUNC(ti990_hdc_device::load_hd), this); - harddisk3.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this); + harddisk3.set_device_load(FUNC(ti990_hdc_device::load_hd)); + harddisk3.set_device_unload(FUNC(ti990_hdc_device::unload_hd)); harddisk_image_device &harddisk4(HARDDISK(config, "harddisk4")); - harddisk4.set_device_load(FUNC(ti990_hdc_device::load_hd), this); - harddisk4.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this); + harddisk4.set_device_load(FUNC(ti990_hdc_device::load_hd)); + harddisk4.set_device_unload(FUNC(ti990_hdc_device::unload_hd)); } diff --git a/src/devices/bus/vic20/videopak.cpp b/src/devices/bus/vic20/videopak.cpp index 98a6c054d22..187224721be 100644 --- a/src/devices/bus/vic20/videopak.cpp +++ b/src/devices/bus/vic20/videopak.cpp @@ -112,7 +112,7 @@ void vic20_video_pak_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(MC6845_SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(vic20_video_pak_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(vic20_video_pak_device::crtc_update_row)); } diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp index d9096ca13e2..1866a3c128e 100644 --- a/src/devices/bus/vme/vme_fccpu20.cpp +++ b/src/devices/bus/vme/vme_fccpu20.cpp @@ -254,7 +254,7 @@ DEVICE_INPUT_DEFAULTS_END void vme_fccpu20_device::cpu_space_map(address_map &map) { - map(0xfffffff2, 0xffffffff).lr16("bim irq", [this](offs_t offset) -> u16 { return m_bim->iack(offset+1); }); + map(0xfffffff2, 0xffffffff).lr16(NAME([this](offs_t offset) -> u16 { return m_bim->iack(offset+1); })); } void vme_fccpu20_device::device_add_mconfig(machine_config &config) @@ -459,9 +459,9 @@ void vme_fccpu20_device::device_start() #if 0 // TODO: Setup VME access handlers for shared memory area uint32_t base = 0xFFFF5000; m_vme->install_device(base + 0, base + 1, // Channel B - Data - read8_delegate(FUNC(z80sio_device::db_r), subdevice<z80sio_device>("pit")), write8_delegate(FUNC(z80sio_device::db_w), subdevice<z80sio_device>("pit")), 0x00ff); + read8_delegate(*subdevice<z80sio_device>("pit"), FUNC(z80sio_device::db_r)), write8_delegate(*subdevice<z80sio_device>("pit"), FUNC(z80sio_device::db_w)), 0x00ff); m_vme->install_device(base + 2, base + 3, // Channel B - Control - read8_delegate(FUNC(z80sio_device::cb_r), subdevice<z80sio_device>("pit")), write8_delegate(FUNC(z80sio_device::cb_w), subdevice<z80sio_device>("pit")), 0x00ff); + read8_delegate(*subdevice<z80sio_device>("pit"), FUNC(z80sio_device::cb_r)), write8_delegate(*subdevice<z80sio_device>("pit"), FUNC(z80sio_device::cb_w)), 0x00ff); #endif } diff --git a/src/devices/bus/vme/vme_mzr8300.cpp b/src/devices/bus/vme/vme_mzr8300.cpp index 133c17e9f49..a318ced143f 100644 --- a/src/devices/bus/vme/vme_mzr8300.cpp +++ b/src/devices/bus/vme/vme_mzr8300.cpp @@ -175,20 +175,20 @@ void vme_mzr8300_card_device::device_start() // m_vme->static_set_custom_spaces(*this); m_vme->install_device(vme_device::A16_SC, base + 0, base + 1, // Channel B - Data - read8smo_delegate(FUNC(z80sio_device::db_r), subdevice<z80sio_device>("sio0")), - write8smo_delegate(FUNC(z80sio_device::db_w), subdevice<z80sio_device>("sio0")), 0x00ff); + read8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::db_r)), + write8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::db_w)), 0x00ff); m_vme->install_device(vme_device::A16_SC, base + 2, base + 3, // Channel B - Control - read8smo_delegate(FUNC(z80sio_device::cb_r), subdevice<z80sio_device>("sio0")), - write8smo_delegate(FUNC(z80sio_device::cb_w), subdevice<z80sio_device>("sio0")), 0x00ff); + read8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::cb_r)), + write8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::cb_w)), 0x00ff); m_vme->install_device(vme_device::A16_SC, base + 4, base + 5, // Channel A - Data - read8smo_delegate(FUNC(z80sio_device::da_r), subdevice<z80sio_device>("sio0")), - write8smo_delegate(FUNC(z80sio_device::da_w), subdevice<z80sio_device>("sio0")), 0x00ff); + read8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::da_r)), + write8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::da_w)), 0x00ff); m_vme->install_device(vme_device::A16_SC, base + 6, base + 7, // Channel A - Control - read8smo_delegate(FUNC(z80sio_device::ca_r), subdevice<z80sio_device>("sio0")), - write8smo_delegate(FUNC(z80sio_device::ca_w), subdevice<z80sio_device>("sio0")), 0x00ff); + read8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::ca_r)), + write8smo_delegate(*subdevice<z80sio_device>("sio0"), FUNC(z80sio_device::ca_w)), 0x00ff); m_vme->install_device(vme_device::A16_SC, base + 0x10, base + 0x13, // Am9513 - read8sm_delegate(FUNC(am9513_device::read8), subdevice<am9513_device>("stc")), - write8sm_delegate(FUNC(am9513_device::write8), subdevice<am9513_device>("stc")), 0x00ff); + read8sm_delegate(*subdevice<am9513_device>("stc"), FUNC(am9513_device::read8)), + write8sm_delegate(*subdevice<am9513_device>("stc"), FUNC(am9513_device::write8)), 0x00ff); } void vme_mzr8300_card_device::device_reset() diff --git a/src/devices/bus/vtech/ioexp/joystick.cpp b/src/devices/bus/vtech/ioexp/joystick.cpp index 7570deca3b5..f8521538195 100644 --- a/src/devices/bus/vtech/ioexp/joystick.cpp +++ b/src/devices/bus/vtech/ioexp/joystick.cpp @@ -89,7 +89,7 @@ void vtech_joystick_interface_device::device_start() void vtech_joystick_interface_device::device_reset() { - io_space().install_read_handler(0x20, 0x2f, read8_delegate(FUNC(vtech_joystick_interface_device::joystick_r), this)); + io_space().install_read_handler(0x20, 0x2f, read8_delegate(*this, FUNC(vtech_joystick_interface_device::joystick_r))); } diff --git a/src/devices/bus/vtech/ioexp/printer.cpp b/src/devices/bus/vtech/ioexp/printer.cpp index b927f41d3c4..17e9ab7f139 100644 --- a/src/devices/bus/vtech/ioexp/printer.cpp +++ b/src/devices/bus/vtech/ioexp/printer.cpp @@ -64,9 +64,9 @@ void vtech_printer_interface_device::device_start() void vtech_printer_interface_device::device_reset() { - io_space().install_read_handler(0x00, 0x00, read8_delegate(FUNC(vtech_printer_interface_device::busy_r), this)); - io_space().install_write_handler(0x0d, 0x0d, write8_delegate(FUNC(vtech_printer_interface_device::strobe_w), this)); - io_space().install_write_handler(0x0e, 0x0e, write8_delegate(FUNC(output_latch_device::bus_w), m_latch.target())); + io_space().install_read_handler(0x00, 0x00, read8_delegate(*this, FUNC(vtech_printer_interface_device::busy_r))); + io_space().install_write_handler(0x0d, 0x0d, write8_delegate(*this, FUNC(vtech_printer_interface_device::strobe_w))); + io_space().install_write_handler(0x0e, 0x0e, write8_delegate(*m_latch, FUNC(output_latch_device::bus_w))); } diff --git a/src/devices/bus/vtech/memexp/memory.cpp b/src/devices/bus/vtech/memexp/memory.cpp index 15ccbeb949e..19330332bed 100644 --- a/src/devices/bus/vtech/memexp/memory.cpp +++ b/src/devices/bus/vtech/memexp/memory.cpp @@ -158,7 +158,7 @@ void vtech_laser_64k_device::device_reset() membank(tag())->set_entry(1); // bank switch - io_space().install_write_handler(0x70, 0x7f, write8_delegate(FUNC(vtech_laser_64k_device::bankswitch_w), this)); + io_space().install_write_handler(0x70, 0x7f, write8_delegate(*this, FUNC(vtech_laser_64k_device::bankswitch_w))); } WRITE8_MEMBER( vtech_laser_64k_device::bankswitch_w ) diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp index cf21b7ee006..959ef7d1adc 100644 --- a/src/devices/bus/vtech/memexp/rs232.cpp +++ b/src/devices/bus/vtech/memexp/rs232.cpp @@ -75,8 +75,8 @@ void vtech_rs232_interface_device::device_reset() program_space().install_rom(0x4000, 0x47ff, 0x800, memregion("software")->base()); // data - program_space().install_read_handler(0x5000, 0x57ff, read8_delegate(FUNC(vtech_rs232_interface_device::receive_data_r), this)); - program_space().install_write_handler(0x5800, 0x5fff, write8_delegate(FUNC(vtech_rs232_interface_device::transmit_data_w), this)); + program_space().install_read_handler(0x5000, 0x57ff, read8_delegate(*this, FUNC(vtech_rs232_interface_device::receive_data_r))); + program_space().install_write_handler(0x5800, 0x5fff, write8_delegate(*this, FUNC(vtech_rs232_interface_device::transmit_data_w))); } diff --git a/src/devices/bus/vtech/memexp/rtty.cpp b/src/devices/bus/vtech/memexp/rtty.cpp index 96e394bfb4d..02b3aba005b 100644 --- a/src/devices/bus/vtech/memexp/rtty.cpp +++ b/src/devices/bus/vtech/memexp/rtty.cpp @@ -63,9 +63,9 @@ void vtech_rtty_interface_device::device_reset() program_space().install_rom(0x4000, 0x4fff, 0x1000, memregion("software")->base()); // data - program_space().install_read_handler(0x5000, 0x57ff, read8_delegate(FUNC(vtech_rtty_interface_device::receive_data_r), this)); - program_space().install_write_handler(0x5800, 0x5fff, write8_delegate(FUNC(vtech_rtty_interface_device::transmit_data_w), this)); - program_space().install_write_handler(0x6000, 0x67ff, write8_delegate(FUNC(vtech_rtty_interface_device::relay_w), this)); + program_space().install_read_handler(0x5000, 0x57ff, read8_delegate(*this, FUNC(vtech_rtty_interface_device::receive_data_r))); + program_space().install_write_handler(0x5800, 0x5fff, write8_delegate(*this, FUNC(vtech_rtty_interface_device::transmit_data_w))); + program_space().install_write_handler(0x6000, 0x67ff, write8_delegate(*this, FUNC(vtech_rtty_interface_device::relay_w))); } diff --git a/src/devices/bus/wangpc/lvc.cpp b/src/devices/bus/wangpc/lvc.cpp index 9f6a8d59626..4d31a7b9367 100644 --- a/src/devices/bus/wangpc/lvc.cpp +++ b/src/devices/bus/wangpc/lvc.cpp @@ -129,7 +129,7 @@ void wangpc_lvc_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(8); - m_crtc->set_update_row_callback(FUNC(wangpc_lvc_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(wangpc_lvc_device::crtc_update_row)); m_crtc->out_vsync_callback().set(FUNC(wangpc_lvc_device::vsync_w)); } diff --git a/src/devices/bus/wangpc/mvc.cpp b/src/devices/bus/wangpc/mvc.cpp index af78d16cc29..562e277f982 100644 --- a/src/devices/bus/wangpc/mvc.cpp +++ b/src/devices/bus/wangpc/mvc.cpp @@ -149,7 +149,7 @@ void wangpc_mvc_device::device_add_mconfig(machine_config &config) m_crtc->set_screen(SCREEN_TAG); m_crtc->set_show_border_area(true); m_crtc->set_char_width(10); - m_crtc->set_update_row_callback(FUNC(wangpc_mvc_device::crtc_update_row), this); + m_crtc->set_update_row_callback(FUNC(wangpc_mvc_device::crtc_update_row)); m_crtc->out_vsync_callback().set(FUNC(wangpc_mvc_device::vsync_w)); } diff --git a/src/devices/bus/x68k/x68k_midi.cpp b/src/devices/bus/x68k/x68k_midi.cpp index 011fe5f734f..e4e639fff04 100644 --- a/src/devices/bus/x68k/x68k_midi.cpp +++ b/src/devices/bus/x68k/x68k_midi.cpp @@ -40,7 +40,7 @@ x68k_midi_device::x68k_midi_device(const machine_config &mconfig, const char *ta void x68k_midi_device::device_start() { m_slot = dynamic_cast<x68k_expansion_slot_device *>(owner()); - m_slot->space().install_readwrite_handler(0xeafa00,0xeafa0f,read8_delegate(FUNC(x68k_midi_device::x68k_midi_reg_r),this),write8_delegate(FUNC(x68k_midi_device::x68k_midi_reg_w),this),0x00ff00ff); + m_slot->space().install_readwrite_handler(0xeafa00,0xeafa0f, read8_delegate(*this, FUNC(x68k_midi_device::x68k_midi_reg_r)), write8_delegate(*this, FUNC(x68k_midi_device::x68k_midi_reg_w)), 0x00ff00ff); } void x68k_midi_device::device_reset() diff --git a/src/devices/bus/x68k/x68k_neptunex.cpp b/src/devices/bus/x68k/x68k_neptunex.cpp index 2bf97fa474d..9cc8c022d23 100644 --- a/src/devices/bus/x68k/x68k_neptunex.cpp +++ b/src/devices/bus/x68k/x68k_neptunex.cpp @@ -47,7 +47,7 @@ void x68k_neptune_device::device_start() mac[0] = 0; mac[1] = 0; // avoid gcc warning memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); - m_slot->space().install_readwrite_handler(0xece000,0xece3ff,read16_delegate(FUNC(x68k_neptune_device::x68k_neptune_port_r),this),write16_delegate(FUNC(x68k_neptune_device::x68k_neptune_port_w),this),0xffffffff); + m_slot->space().install_readwrite_handler(0xece000,0xece3ff, read16_delegate(*this, FUNC(x68k_neptune_device::x68k_neptune_port_r)), write16_delegate(*this, FUNC(x68k_neptune_device::x68k_neptune_port_w)), 0xffffffff); } void x68k_neptune_device::device_reset() { diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp index b4233875f1e..67dffd2e33e 100644 --- a/src/devices/bus/x68k/x68k_scsiext.cpp +++ b/src/devices/bus/x68k/x68k_scsiext.cpp @@ -72,7 +72,7 @@ void x68k_scsiext_device::device_start() uint8_t *ROM = machine().root_device().memregion(subtag("scsiexrom").c_str())->base(); machine().root_device().membank("scsi_ext")->set_base(ROM); -m_slot->space().install_readwrite_handler(0xea0000,0xea001f,read8_delegate(FUNC(x68k_scsiext_device::register_r),this),write8_delegate(FUNC(x68k_scsiext_device::register_w),this),0x00ff00ff); + m_slot->space().install_readwrite_handler(0xea0000,0xea001f, read8_delegate(*this, FUNC(x68k_scsiext_device::register_r)), write8_delegate(*this, FUNC(x68k_scsiext_device::register_w)), 0x00ff00ff); } void x68k_scsiext_device::device_reset() |