diff options
author | Vas Crabb <vas@vastheman.com> | 2018-05-23 18:19:09 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-05-23 18:19:09 +1000 |
commit | 8d6115163e8023e29f9fa90c1fbc52c123043818 (patch) | |
tree | e0be82f8ef5ab67e8fcfc100fd6b855b50fca038 /src/devices/video | |
parent | bd321522b6e92b76b729d8480b292eb48a0bb161 (diff) |
remove another device-specific MCFG macro, because standard is better than better, especially with constructor overloads (nw)
Diffstat (limited to 'src/devices/video')
-rw-r--r-- | src/devices/video/voodoo_pci.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/devices/video/voodoo_pci.h b/src/devices/video/voodoo_pci.h index c744bb10dc3..cf1fdbebb6d 100644 --- a/src/devices/video/voodoo_pci.h +++ b/src/devices/video/voodoo_pci.h @@ -10,12 +10,6 @@ #include "machine/pci.h" #include "voodoo.h" -#define MCFG_VOODOO_PCI_ADD(_tag, _type, _cpu_tag, _screen_tag) \ - MCFG_PCI_DEVICE_ADD(_tag, VOODOO_PCI, 0, 0, 0, 0) \ - downcast<voodoo_pci_device &>(*device).set_type(_type); \ - downcast<voodoo_pci_device &>(*device).set_cpu_tag(_cpu_tag); \ - downcast<voodoo_pci_device &>(*device).set_screen_tag(_screen_tag); - #define MCFG_VOODOO_PCI_FBMEM(_value) \ downcast<voodoo_pci_device &>(*device).set_fbmem(_value); @@ -24,6 +18,15 @@ class voodoo_pci_device : public pci_device { public: + template <typename T, typename U> + voodoo_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int type, T &&cpu_tag, U &&screen_tag) + : voodoo_pci_device(mconfig, tag, owner, clock) + { + set_type(type); + set_cpu_tag(std::forward<T>(cpu_tag)); + set_screen_tag(std::forward<U>(screen_tag)); + } + voodoo_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; |