summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nubus
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-10-26 12:47:04 +1100
committer Vas Crabb <vas@vastheman.com>2019-10-26 12:47:04 +1100
commitf81fbdb8d4356b7a526a902726463e2f1af00615 (patch)
treef73f8746dc3cd1feb81afdb3cb4e6b0b99141ea0 /src/devices/bus/nubus
parentbc7c6ea17e1b38f6fb488177e01c63577fbbcf71 (diff)
Make devdelegate more like devcb for configuration. This is a
fundamental change to show device delegates are configured. Device delegates are now aware of the current device during configuration and will resolve string tags relative to it. This means that device delegates need a device to be supplied on construction so they can find the machine configuration object. There's a one-dimensional array helper to make it easier to construct arrays of device delegates with the same owner. (I didn't make an n-dimensional one because I didn't hit a use case, but it would be a simple addition.) There's no more bind_relative_to member - just call resolve() like you would for a devcb. There's also no need to cast nullptr when creating a late bind device delegate. The flip side is that for an overloaded or non-capturing lambda you'll need to cast to the desired type. There is one less conditional branch in the hot path for calls for delegates bound to a function pointer of member function pointer. This comes at the cost of one additional unconditional branch in the hot path for calls to delegates bound to functoids (lambdas, functions that don't take an object reference, other callable objects). This applies to all delegates, not just device delegates. Address spaces will now print an error message if a late bind error is encountered while installing a handler. This will give the range and address range, hopefully making it easier to guess which memory map is faulty. For the simple case of allowing a device_delegate member to be configured, use a member like this: template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); } For a case where different delegates need to be used depending on the function signature, see src/emu/screen.h (the screen update function setters). Device delegates now take a target specification and function pointer. The target may be: * Target omitted, implying the current device being configured. This can only be used during configuration. It will work as long as the current device is not removed/replaced. * A tag string relative to the current device being configured. This can only be used during configuration. It will not be callable until .resolve() is called. It will work as long as the current device is not removed/replaced. * A device finder (required_device/optional_device). The delegate will late bind to the current target of the device finder. It will not be callable until .resolve() is called. It will work properly if the target device is replaced, as long as the device finder's base object isn't removed/replaced. * A reference to an object. It will be callable immediately. It will work as long as the target object is not removed/replaced. The target types and restrictions are pretty similar to what you already have on object finders and devcb, so it shouldn't cause any surprises. Note that dereferencing a device finder will changes the effect. To illustrate this: ... required_device<some_device> m_dev; ... m_dev(*this, "dev") ... // will late bind to "dev" relative to *this // will work if "dev" hasn't been created yet or is replaced later // won't work if *this is removed/replaced // won't be callable until resolve() is called cb1.set(m_dev, FUNC(some_device::w)); ... // will bind to current target of m_dev // will not work if m_dev is not resolved // will not work if "dev" is replaced later // will be callable immediately cb2.set(*m_dev, FUNC(some_device::w)); ... The order of the target and name has been reversed for functoids (lambdas and other callable objects). This allows the NAME macro to be used on lambdas and functoids. For example: foo.set_something(NAME([this] (u8 data) { m_something = data; })); I realise the diagnostic messages get ugly if you use NAME on a large lambda. You can still give a literal name, you just have to place it after the lambda rather than before. This is uglier, but it's intentional. I'm trying to drive developers away from a certain style. While it's nice that you can put half the driver code in the memory map, it detracts from readability. It's hard to visualise the memory range mappings if the memory map functions are punctuated by large lambdas. There's also slightly higher overhead for calling a delegate bound to a functoid. If the code is prettier for trivial lambdas but uglier for non-trivial lambdas in address maps, it will hopefully steer people away from putting non-trivial lambdas in memory maps. There were some devices that were converted from using plain delegates without adding bind_relative_to calls. I fixed some of them (e.g. LaserDisc) but I probably missed some. These will likely crash on unresolved delegate calls. There are some devices that reset delegates at configuration complete or start time, preventing them from being set up during configuration (e.g. src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp). This goes against the design principles of how device delegates should be used, but I didn't change them because I don't trust myself to find all the places they're used. I've definitely broken some stuff with this (I know about asterix), so report issues and bear with me until I get it all fixed.
Diffstat (limited to 'src/devices/bus/nubus')
-rw-r--r--src/devices/bus/nubus/bootbug.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_48gc.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_asntmc3b.cpp8
-rw-r--r--src/devices/bus/nubus/nubus_cb264.cpp4
-rw-r--r--src/devices/bus/nubus/nubus_image.cpp14
-rw-r--r--src/devices/bus/nubus/nubus_m2hires.cpp6
-rw-r--r--src/devices/bus/nubus/nubus_m2video.cpp6
-rw-r--r--src/devices/bus/nubus/nubus_radiustpd.cpp8
-rw-r--r--src/devices/bus/nubus/nubus_spec8.cpp6
-rw-r--r--src/devices/bus/nubus/nubus_specpdq.cpp4
-rw-r--r--src/devices/bus/nubus/nubus_vikbw.cpp4
-rw-r--r--src/devices/bus/nubus/nubus_wsportrait.cpp6
-rw-r--r--src/devices/bus/nubus/pds30_30hr.cpp4
-rw-r--r--src/devices/bus/nubus/pds30_cb264.cpp4
-rw-r--r--src/devices/bus/nubus/pds30_mc30.cpp4
-rw-r--r--src/devices/bus/nubus/pds30_procolor816.cpp6
-rw-r--r--src/devices/bus/nubus/pds30_sigmalview.cpp6
-rw-r--r--src/devices/bus/nubus/quadralink.cpp2
18 files changed, 48 insertions, 48 deletions
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)));
}
//-------------------------------------------------