summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/voodoo_pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/voodoo_pci.h')
-rw-r--r--src/devices/video/voodoo_pci.h15
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;