diff options
author | Ted Green <tedgreen99@protonmail.com> | 2018-09-03 12:11:45 -0600 |
---|---|---|
committer | Ted Green <tedgreen99@protonmail.com> | 2018-09-03 12:23:53 -0600 |
commit | 2673bd6e1673ba55d7db51a6508237c1416c9cd4 (patch) | |
tree | cb87e368a5f48f9062277e1b62fd22892037876e | |
parent | f9676d8f1d40d31513bee602fb531443093bd2c3 (diff) |
MCFG removal (nw).
-rw-r--r-- | src/devices/machine/gt64xxx.cpp | 7 | ||||
-rw-r--r-- | src/devices/machine/gt64xxx.h | 71 | ||||
-rw-r--r-- | src/devices/machine/smc91c9x.h | 1 | ||||
-rw-r--r-- | src/mame/audio/cage.h | 1 | ||||
-rw-r--r-- | src/mame/drivers/iteagle.cpp | 158 | ||||
-rw-r--r-- | src/mame/drivers/seattle.cpp | 315 | ||||
-rw-r--r-- | src/mame/drivers/vegas.cpp | 348 | ||||
-rw-r--r-- | src/mame/machine/iteagle_fpga.h | 6 | ||||
-rw-r--r-- | src/mame/machine/midwayic.h | 3 |
9 files changed, 444 insertions, 466 deletions
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp index f2fafbc9dae..df1f2e336a8 100644 --- a/src/devices/machine/gt64xxx.cpp +++ b/src/devices/machine/gt64xxx.cpp @@ -147,7 +147,8 @@ #define GINT_RETRYCTR_SHIFT (20) -DEFINE_DEVICE_TYPE(GT64XXX, gt64xxx_device, "gt64xxx", "Galileo GT-64XXX System Controller") +DEFINE_DEVICE_TYPE(GT64010, gt64010_device, "gt64010", "Galileo GT-64010 System Controller") +DEFINE_DEVICE_TYPE(GT64111, gt64111_device, "gt64111", "Galileo GT-64111 System Controller") void gt64xxx_device::config_map(address_map &map) { @@ -160,8 +161,8 @@ void gt64xxx_device::cpu_map(address_map &map) map(0x00000000, 0x00000cff).rw(FUNC(gt64xxx_device::cpu_if_r), FUNC(gt64xxx_device::cpu_if_w)); } -gt64xxx_device::gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : pci_host_device(mconfig, GT64XXX, tag, owner, clock) +gt64xxx_device::gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : pci_host_device(mconfig, type, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG), m_be(0), m_autoconfig(0), m_irq_num(-1) , m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32) , m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32) diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h index 1488c058cd5..d1962514177 100644 --- a/src/devices/machine/gt64xxx.h +++ b/src/devices/machine/gt64xxx.h @@ -12,36 +12,8 @@ #include "pci.h" #include "cpu/mips/mips3.h" -// Supports R4600/4650/4700/R5000 CPUs -#define MCFG_GT64010_ADD(_tag, _cpu_tag, _clock, _irq_num) \ - MCFG_DEVICE_ADD(_tag, GT64XXX, _clock, _cpu_tag, _irq_num) \ - downcast<gt64xxx_device &>(*device).set_ids_host(0x11ab0146, 0x03, 0x00000000); - -// Supports the following 32-bit bus CPUs: -// IDT RC4640 and RC4650 (in 32-bit mode) -// QED RM523X -// NEC/Toshiba VR4300 -#define MCFG_GT64111_ADD(_tag, _cpu_tag, _clock, _irq_num) \ - MCFG_DEVICE_ADD(_tag, GT64XXX, _clock, _cpu_tag, _irq_num) \ - downcast<gt64xxx_device &>(*device).set_ids(0x414611ab, 0x10, 0x058000, 0x00000000); - -#define MCFG_GT64XXX_SET_BE_CPU(_be) \ - downcast<gt64xxx_device &>(*device).set_be(_be); - -#define MCFG_GT64XXX_IRQ_ADD(_irq_num) \ - downcast<gt64xxx_device &>(*device).set_irq_info(_irq_num); - -#define MCFG_GT64XXX_SET_CS(_cs_num, _map) \ - downcast<gt64xxx_device &>(*device).set_map(_cs_num, address_map_constructor(&_map, #_map, this), this); - -#define MCFG_GT64XX_SET_SIMM(_index, _size) \ - downcast<gt64xxx_device &>(*device).set_simm_size(_index, _size); - -#define MCFG_GT64XX_SET_SIMM0(_size) \ - downcast<gt64xxx_device &>(*device).set_simm0_size(_size); - -#define MCFG_GT64XX_SET_SIMM1(_size) \ - downcast<gt64xxx_device &>(*device).set_simm1_size(_size); +DECLARE_DEVICE_TYPE(GT64010, gt64010_device) +DECLARE_DEVICE_TYPE(GT64111, gt64111_device) /************************************* * Structures @@ -49,14 +21,14 @@ class gt64xxx_device : public pci_host_device { public: template <typename T> - gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) - : gt64xxx_device(mconfig, tag, owner, clock) + gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + : gt64xxx_device(mconfig, type, const char *tag, owner, clock) { set_cpu_tag(std::forward<T>(cpu_tag)); set_irq_num(irq_num); } - gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, @@ -187,6 +159,37 @@ private: address_space* dma_decode_address(uint32_t &addr); }; -DECLARE_DEVICE_TYPE(GT64XXX, gt64xxx_device) +// Supports R4600/4650/4700/R5000 CPUs +class gt64010_device : public gt64xxx_device { +public: + template <typename T> + gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + : gt64010_device(mconfig, tag, owner, clock) + { + set_ids_host(0x11ab0146, 0x03, 0x00000000); + set_cpu_tag(std::forward<T>(cpu_tag)); + set_irq_num(irq_num); + } + gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : gt64xxx_device(mconfig, GT64010, tag, owner, clock) {} +}; + +// Supports the following 32-bit bus CPUs: +// IDT RC4640 and RC4650 (in 32-bit mode) +// QED RM523X +// NEC/Toshiba VR4300 +class gt64111_device : public gt64xxx_device { +public: + template <typename T> + gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + : gt64111_device(mconfig, tag, owner, clock) + { + set_ids(0x414611ab, 0x10, 0x058000, 0x00000000); + set_cpu_tag(std::forward<T>(cpu_tag)); + set_irq_num(irq_num); + } + gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : gt64xxx_device(mconfig, GT64111, tag, owner, clock) {} +}; #endif // MAME_MACHINE_GT64XXX_H diff --git a/src/devices/machine/smc91c9x.h b/src/devices/machine/smc91c9x.h index b0695c4f6cb..c74a39594ab 100644 --- a/src/devices/machine/smc91c9x.h +++ b/src/devices/machine/smc91c9x.h @@ -19,6 +19,7 @@ class smc91c9x_device : public device_t,public device_network_interface { public: template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); } + auto irq_handler() { return m_irq_handler.bind(); } DECLARE_READ16_MEMBER( read ); DECLARE_WRITE16_MEMBER( write ); diff --git a/src/mame/audio/cage.h b/src/mame/audio/cage.h index c2954dae928..9beaeac1516 100644 --- a/src/mame/audio/cage.h +++ b/src/mame/audio/cage.h @@ -36,6 +36,7 @@ public: void set_speedup(offs_t speedup) { m_speedup = speedup; } template <class Object> devcb_base &set_irqhandler_callback(Object &&cb) { return m_irqhandler.set_callback(std::forward<Object>(cb)); } + auto irq_handler() { return m_irqhandler.bind(); } void reset_w(int state); diff --git a/src/mame/drivers/iteagle.cpp b/src/mame/drivers/iteagle.cpp index e72941e749f..8a28f5bfb4e 100644 --- a/src/mame/drivers/iteagle.cpp +++ b/src/mame/drivers/iteagle.cpp @@ -115,15 +115,28 @@ www.multitech.com //************************************* // Main iteagle driver //************************************* +#define PCI_ID_NILE ":pci:00.0" +#define PCI_ID_PERIPH ":pci:06.0" +#define PCI_ID_IDE ":pci:06.1" +// Secondary IDE Control ":pci:06.2" +#define PCI_ID_SOUND ":pci:07.0" +#define PCI_ID_FPGA ":pci:08.0" +#define PCI_ID_VIDEO ":pci:09.0" +#define PCI_ID_EEPROM ":pci:0a.0" + class iteagle_state : public driver_device { public: iteagle_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_fpga(*this, PCI_ID_FPGA) + , m_eeprom(*this, PCI_ID_EEPROM) {} required_device<mips3_device> m_maincpu; + required_device<iteagle_fpga_device> m_fpga; + required_device<iteagle_eeprom_device> m_eeprom; virtual void machine_start() override; virtual void machine_reset() override; @@ -152,49 +165,43 @@ void iteagle_state::machine_reset() { } -#define PCI_ID_NILE ":pci:00.0" -#define PCI_ID_PERIPH ":pci:06.0" -#define PCI_ID_IDE ":pci:06.1" -// Seconday IDE Control ":pci:06.2" -#define PCI_ID_SOUND ":pci:07.0" -#define PCI_ID_FPGA ":pci:08.0" -#define PCI_ID_VIDEO ":pci:09.0" -#define PCI_ID_EEPROM ":pci:0a.0" - MACHINE_CONFIG_START(iteagle_state::iteagle) - /* basic machine hardware */ - MCFG_DEVICE_ADD(m_maincpu, VR4310LE, 166666666) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(8192) - MCFG_MIPS3_SYSTEM_CLOCK(66666667) - - MCFG_DEVICE_ADD(":pci", PCI_ROOT, 0) - MCFG_DEVICE_ADD(PCI_ID_NILE, VRC4373, 0, m_maincpu) - MCFG_VRC4373_SET_RAM(0x00800000) - MCFG_VRC4373_SET_SIMM0(0x02000000) - ITEAGLE_PERIPH(config, PCI_ID_PERIPH, 0); - IDE_PCI(config, PCI_ID_IDE, 0, 0x1080C693, 0x00, 0x0).irq_handler().set_inputline(m_maincpu, MIPS3_IRQ2); + VR4310LE(config, m_maincpu, 166666666); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(8192); + m_maincpu->set_system_clock(66666667); - iteagle_fpga_device &iteagle_fpga(ITEAGLE_FPGA(config, PCI_ID_FPGA, 0, "screen", m_maincpu, MIPS3_IRQ1, MIPS3_IRQ4)); - iteagle_fpga.in_callback<iteagle_fpga_device::IO_SW5>().set_ioport("SW5"); - iteagle_fpga.in_callback<iteagle_fpga_device::IO_IN1>().set_ioport("IN1"); - iteagle_fpga.in_callback<iteagle_fpga_device::IO_SYSTEM>().set_ioport("SYSTEM"); - iteagle_fpga.trackx_callback().set_ioport("TRACKX1"); - iteagle_fpga.tracky_callback().set_ioport("TRACKY1"); - iteagle_fpga.gunx_callback().set_ioport("GUNX1"); - iteagle_fpga.guny_callback().set_ioport("GUNY1"); + PCI_ROOT(config, ":pci", 0); + + vrc4373_device &vrc4373(VRC4373(config, PCI_ID_NILE, 0, m_maincpu)); + vrc4373.set_ram_size(0x00800000); + vrc4373.set_simm0_size(0x02000000); + + ITEAGLE_PERIPH(config, PCI_ID_PERIPH, 0); + IDE_PCI(config, PCI_ID_IDE, 0, 0x1080C693, 0x00, 0x0) + .irq_handler() + .set_inputline(m_maincpu, MIPS3_IRQ2); + + ITEAGLE_FPGA(config, m_fpga, 0, "screen", m_maincpu, MIPS3_IRQ1, MIPS3_IRQ4); + m_fpga->in_callback<iteagle_fpga_device::IO_SW5>().set_ioport("SW5"); + m_fpga->in_callback<iteagle_fpga_device::IO_IN1>().set_ioport("IN1"); + m_fpga->in_callback<iteagle_fpga_device::IO_SYSTEM>().set_ioport("SYSTEM"); + m_fpga->trackx_callback().set_ioport("TRACKX1"); + m_fpga->tracky_callback().set_ioport("TRACKY1"); + m_fpga->gunx_callback().set_ioport("GUNX1"); + m_fpga->guny_callback().set_ioport("GUNY1"); es1373_device &pci_sound(ES1373(config, PCI_ID_SOUND, 0)); pci_sound.add_route(0, PCI_ID_SOUND":lspeaker", 1.0).add_route(1, PCI_ID_SOUND":rspeaker", 1.0); pci_sound.irq_handler().set_inputline(m_maincpu, MIPS3_IRQ3); - MCFG_DEVICE_ADD(PCI_ID_VIDEO, VOODOO_3_PCI, 0, m_maincpu, "screen") - MCFG_VOODOO_PCI_FBMEM(16) + voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config, PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo.set_fbmem(16); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo") MCFG_VOODOO_VBLANK_CB(WRITELINE(PCI_ID_FPGA, iteagle_fpga_device, vblank_update)) - MCFG_DEVICE_ADD( PCI_ID_EEPROM, ITEAGLE_EEPROM, 0) + ITEAGLE_EEPROM(config, m_eeprom, 0); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -205,110 +212,85 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::gtfore01) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000401, 0x0b0b0b) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0401, 0x7) + m_fpga->set_init_info(0x01000401, 0x0b0b0b); + m_eeprom->set_info(0x0401, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::gtfore02) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000402, 0x020201) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0402, 0x7) + m_fpga->set_init_info(0x01000402, 0x020201); + m_eeprom->set_info(0x0402, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::gtfore03) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000403, 0x0a0b0a) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0403, 0x7) + m_fpga->set_init_info(0x01000403, 0x0a0b0a); + m_eeprom->set_info(0x0403, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::gtfore04) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000404, 0x0a020b) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0404, 0x7) + m_fpga->set_init_info(0x01000404, 0x0a020b); + m_eeprom->set_info(0x0404, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::gtfore05) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000405, 0x0b0a0c) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0405, 0x7); + m_fpga->set_init_info(0x01000405, 0x0b0a0c); + m_eeprom->set_info(0x0405, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::gtfore06) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000406, 0x0c0b0d) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0406, 0x9); + m_fpga->set_init_info(0x01000406, 0x0c0b0d); + m_eeprom->set_info(0x0406, 0x9); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::carnking) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000a01, 0x0e0a0a) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0a01, 0x9) + m_fpga->set_init_info(0x01000a01, 0x0e0a0a); + m_eeprom->set_info(0x0a01, 0x9); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::bbh) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) // 0xXX01XXXX = tournament board - MCFG_ITEAGLE_FPGA_INIT(0x02010600, 0x0b0a0a) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0000, 0x7) + m_fpga->set_init_info(0x02010600, 0x0b0a0a); + m_eeprom->set_info(0x0000, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::bbhsc) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) // 0xXX01XXXX = tournament board - MCFG_ITEAGLE_FPGA_INIT(0x02010600, 0x0c0a0a) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0000, 0x7) + m_fpga->set_init_info(0x02010600, 0x0c0a0a); + m_eeprom->set_info(0x0000, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::bbh2sp) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x02010602, 0x0d0a0a) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0000, 0x7) + m_fpga->set_init_info(0x02010602, 0x0d0a0a); + m_eeprom->set_info(0x0000, 0x7); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::bbhcotw) iteagle(config); - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x02010603, 0x080704) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9) + m_fpga->set_init_info(0x02010603, 0x080704); + m_eeprom->set_info(0x0603, 0x9); MACHINE_CONFIG_END MACHINE_CONFIG_START(iteagle_state::virtpool) iteagle(config); // Not sure what the actual value should be // Setting a lower frequency helps delay the tutorial screen premature cut-out - MCFG_DEVICE_MODIFY("maincpu") - MCFG_DEVICE_CLOCK(99999999) - MCFG_MIPS3_SYSTEM_CLOCK(33333333) - - MCFG_DEVICE_REPLACE(PCI_ID_VIDEO, VOODOO_1_PCI, 0, m_maincpu, "screen") - MCFG_VOODOO_PCI_FBMEM(4) - MCFG_VOODOO_PCI_TMUMEM(4, 4) - - MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000202, 0x080808) - MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0202, 0x7) + m_maincpu->set_clock(99999999); + m_maincpu->set_system_clock(33333333); + + voodoo_1_pci_device &voodoo(VOODOO_1_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo.set_fbmem(4); + voodoo.set_tmumem(4, 4); + + m_fpga->set_init_info(0x01000202, 0x080808); + m_eeprom->set_info(0x0202, 0x7); MACHINE_CONFIG_END diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp index 848f6cd8e3d..4e4286b38cc 100644 --- a/src/mame/drivers/seattle.cpp +++ b/src/mame/drivers/seattle.cpp @@ -223,6 +223,10 @@ #define SYSTEM_CLOCK 50000000 +#define PCI_ID_GALILEO ":pci:00.0" +#define PCI_ID_VIDEO ":pci:08.0" +#define PCI_ID_IDE ":pci:09.0" + /* various board configurations */ #define PHOENIX_CONFIG (0) #define SEATTLE_CONFIG (1) @@ -276,6 +280,7 @@ public: : driver_device(mconfig, type, tag), m_nvram(*this, "nvram"), m_maincpu(*this, "maincpu"), + m_galileo(*this, PCI_ID_GALILEO), m_cage(*this, "cage"), m_dcs(*this, "dcs"), m_screen(*this, "screen"), @@ -331,6 +336,7 @@ public: private: required_device<nvram_device> m_nvram; required_device<mips3_device> m_maincpu; + required_device<gt64010_device> m_galileo; optional_device<atari_cage_seattle_device> m_cage; optional_device<dcs_audio_device> m_dcs; required_device<screen_device> m_screen; @@ -1883,35 +1889,31 @@ INPUT_PORTS_END * Machine drivers * *************************************/ -#define PCI_ID_GALILEO ":pci:00.0" -#define PCI_ID_VIDEO ":pci:08.0" -#define PCI_ID_IDE ":pci:09.0" - MACHINE_CONFIG_START(seattle_state::seattle_common) /* basic machine hardware */ - MCFG_DEVICE_ADD(m_maincpu, R5000LE, SYSTEM_CLOCK*3) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(SYSTEM_CLOCK) + R5000LE(config, m_maincpu, SYSTEM_CLOCK * 3); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(16384); + m_maincpu->set_system_clock(SYSTEM_CLOCK); // PCI Bus Devices - MCFG_DEVICE_ADD(":pci", PCI_ROOT, 0) + PCI_ROOT(config, ":pci", 0); - MCFG_GT64010_ADD(PCI_ID_GALILEO, ":maincpu", SYSTEM_CLOCK, GALILEO_IRQ_NUM) - MCFG_GT64XXX_SET_CS(0, seattle_state::seattle_cs0_map) - MCFG_GT64XXX_SET_CS(1, seattle_state::seattle_cs1_map) - MCFG_GT64XXX_SET_CS(2, seattle_state::seattle_cs2_map) - MCFG_GT64XXX_SET_CS(3, seattle_state::seattle_cs3_map) - MCFG_GT64XX_SET_SIMM0(0x00800000) + GT64010(config, m_galileo, SYSTEM_CLOCK, m_maincpu, GALILEO_IRQ_NUM); + m_galileo->set_map(0, address_map_constructor(&seattle_state::seattle_cs0_map, "seattle_cs0_map", this), this); + m_galileo->set_map(1, address_map_constructor(&seattle_state::seattle_cs1_map, "seattle_cs1_map", this), this); + m_galileo->set_map(2, address_map_constructor(&seattle_state::seattle_cs2_map, "seattle_cs2_map", this), this); + m_galileo->set_map(3, address_map_constructor(&seattle_state::seattle_cs3_map, "seattle_cs3_map", this), this); + m_galileo->set_simm0_size(0x00800000); ide_pci_device &ide(IDE_PCI(config, PCI_ID_IDE, 0, 0x100b0002, 0x01, 0x0)); ide.irq_handler().set_inputline(m_maincpu, IDE_IRQ_NUM); ide.set_legacy_top(0x0a0); - MCFG_DEVICE_ADD(PCI_ID_VIDEO, VOODOO_1_PCI, 0, m_maincpu, m_screen) - MCFG_VOODOO_PCI_FBMEM(2) - MCFG_VOODOO_PCI_TMUMEM(4, 0) + voodoo_1_pci_device &voodoo(VOODOO_1_PCI(config, PCI_ID_VIDEO, 0, m_maincpu, m_screen)); + voodoo.set_fbmem(2); + voodoo.set_tmumem(4, 0); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo") MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, seattle_state, vblank_assert)) MCFG_VOODOO_STALL_CB(WRITELINE(PCI_ID_GALILEO, gt64xxx_device, pci_stall)) @@ -1930,60 +1932,52 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::phoenixsa) seattle_common(config); - MCFG_DEVICE_REPLACE(m_maincpu, R4700LE, SYSTEM_CLOCK*2) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(SYSTEM_CLOCK) - - MCFG_DEVICE_MODIFY(PCI_ID_GALILEO) - MCFG_GT64XX_SET_SIMM0(0x00200000) - MCFG_GT64XX_SET_SIMM1(0x00200000) + R4700LE(config.replace(), m_maincpu, SYSTEM_CLOCK * 2); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(16384); + m_maincpu->set_system_clock(SYSTEM_CLOCK); + + m_galileo->set_simm0_size(0x00200000); + m_galileo->set_simm1_size(0x00200000); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::seattle150) seattle_common(config); - MCFG_DEVICE_REPLACE(m_maincpu, R5000LE, SYSTEM_CLOCK*3) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(SYSTEM_CLOCK) + R5000LE(config.replace(), m_maincpu, SYSTEM_CLOCK * 3); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(16384); + m_maincpu->set_system_clock(SYSTEM_CLOCK); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::seattle150_widget) seattle150(config); - MCFG_SMC91C94_ADD("ethernet") - MCFG_SMC91C94_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ethernet_interrupt)) + SMC91C94(config, m_ethernet, 0); + m_ethernet->irq_handler().set(FUNC(seattle_state::ethernet_interrupt)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::seattle200) - seattle_common(config); - MCFG_DEVICE_REPLACE(m_maincpu, R5000LE, SYSTEM_CLOCK*4) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(SYSTEM_CLOCK) + seattle150(config); + m_maincpu->set_clock(SYSTEM_CLOCK * 4); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::seattle200_widget) seattle200(config); - MCFG_SMC91C94_ADD("ethernet") - MCFG_SMC91C94_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ethernet_interrupt)) + SMC91C94(config, m_ethernet, 0); + m_ethernet->irq_handler().set(FUNC(seattle_state::ethernet_interrupt)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::flagstaff) - seattle_common(config); - MCFG_DEVICE_REPLACE(m_maincpu, R5000LE, SYSTEM_CLOCK*4) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(SYSTEM_CLOCK) + seattle150(config); + m_maincpu->set_clock(SYSTEM_CLOCK * 4); - MCFG_DEVICE_MODIFY(PCI_ID_GALILEO) - MCFG_GT64XXX_SET_CS(3, seattle_state::seattle_flagstaff_cs3_map) + m_galileo->set_map(3, address_map_constructor(&seattle_state::seattle_flagstaff_cs3_map, "seattle_flagstaff_cs3_map", this), this); - MCFG_SMC91C94_ADD("ethernet") - MCFG_SMC91C94_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ethernet_interrupt)) + SMC91C94(config, m_ethernet, 0); + m_ethernet->irq_handler().set(FUNC(seattle_state::ethernet_interrupt)); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO) MCFG_VOODOO_PCI_FBMEM(2) @@ -1994,168 +1988,167 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::wg3dh) phoenixsa(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x3839) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_STANDARD) - MCFG_MIDWAY_IOASIC_UPPER(310/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x3839); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); + m_ioasic->set_upper(310/* others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::mace) seattle150(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x3839) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_MACE) - MCFG_MIDWAY_IOASIC_UPPER(319/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x3839); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_MACE); + m_ioasic->set_upper(319/* others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::sfrush) flagstaff(config); - MCFG_DEVICE_ADD("cage", ATARI_CAGE_SEATTLE, 0) - MCFG_ATARI_CAGE_SPEEDUP(0x5236) - MCFG_ATARI_CAGE_IRQ_CALLBACK(WRITE8("ioasic",midway_ioasic_device,cage_irq_handler)) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_STANDARD) - MCFG_MIDWAY_IOASIC_UPPER(315/* no alternates */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(100) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, seattle_state, wheel_board_w)) + atari_cage_seattle_device &cage(ATARI_CAGE_SEATTLE(config, "cage", 0)); + cage.set_speedup(0x5236); + cage.irq_handler().set(m_ioasic, FUNC(midway_ioasic_device::cage_irq_handler)); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); + m_ioasic->set_upper(315/* no alternates */); + m_ioasic->set_yearoffs(100); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); + m_ioasic->aux_output_handler().set(FUNC(seattle_state::wheel_board_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::sfrushrk) flagstaff(config); - MCFG_DEVICE_ADD("cage", ATARI_CAGE_SEATTLE, 0) - MCFG_ATARI_CAGE_SPEEDUP(0x5329) - MCFG_ATARI_CAGE_IRQ_CALLBACK(WRITE8("ioasic",midway_ioasic_device,cage_irq_handler)) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_SFRUSHRK) - MCFG_MIDWAY_IOASIC_UPPER(331/* unknown */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(100) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, seattle_state, wheel_board_w)) + atari_cage_seattle_device &cage(ATARI_CAGE_SEATTLE(config, "cage", 0)); + cage.set_speedup(0x5329); + cage.irq_handler().set(m_ioasic, FUNC(midway_ioasic_device::cage_irq_handler)); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_SFRUSHRK); + m_ioasic->set_upper(331/* unknown */); + m_ioasic->set_yearoffs(100); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); + m_ioasic->aux_output_handler().set(FUNC(seattle_state::wheel_board_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::sfrushrkw) sfrushrk(config); - MCFG_DEVICE_MODIFY("ioasic") - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_STANDARD) + m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::calspeed) seattle150_widget(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x39c0) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_CALSPEED) - MCFG_MIDWAY_IOASIC_UPPER(328/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(100) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x39c0); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_CALSPEED); + m_ioasic->set_upper(328/* others? */); + m_ioasic->set_yearoffs(100); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::vaportrx) seattle200_widget(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x39c2) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_VAPORTRX) - MCFG_MIDWAY_IOASIC_UPPER(324/* 334? unknown */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(100) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x39c2); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_VAPORTRX); + m_ioasic->set_upper(324/* 334? unknown */); + m_ioasic->set_yearoffs(100); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::biofreak) seattle150(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x3835) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_STANDARD) - MCFG_MIDWAY_IOASIC_UPPER(231/* no alternates */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x3835); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); + m_ioasic->set_upper(231/* no alternates */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::blitz) seattle150(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x39c2) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_BLITZ99) - MCFG_MIDWAY_IOASIC_UPPER(444/* or 528 */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x39c2); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); + m_ioasic->set_upper(444/* or 528 */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::blitz99) seattle150(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0afb) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_BLITZ99) - MCFG_MIDWAY_IOASIC_UPPER(481/* or 484 or 520 */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x0afb); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); + m_ioasic->set_upper(481/* or 484 or 520 */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::blitz2k) seattle150(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_BLITZ99) - MCFG_MIDWAY_IOASIC_UPPER(494/* or 498 */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x0b5d); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); + m_ioasic->set_upper(494/* or 498 */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::carnevil) seattle150(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0af7) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_CARNEVIL) - MCFG_MIDWAY_IOASIC_UPPER(469/* 469 or 486 or 528 */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x0af7); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_CARNEVIL); + m_ioasic->set_upper(469/* 469 or 486 or 528 */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END MACHINE_CONFIG_START(seattle_state::hyprdriv) seattle200_widget(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(2) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0af7) - - MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_HYPRDRIV) - MCFG_MIDWAY_IOASIC_UPPER(469/* unknown */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, seattle_state, ioasic_irq)) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(2); + dcs.set_polling_offset(0x0af7); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_HYPRDRIV); + m_ioasic->set_upper(469/* unknown */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(seattle_state::ioasic_irq)); MACHINE_CONFIG_END /************************************* diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp index b0ac848a432..40c2f46e4fb 100644 --- a/src/mame/drivers/vegas.cpp +++ b/src/mame/drivers/vegas.cpp @@ -1742,13 +1742,13 @@ void vegas_state::vegas_cs8_map(address_map &map) MACHINE_CONFIG_START(vegas_state::vegascore) /* basic machine hardware */ - MCFG_DEVICE_ADD(m_maincpu, R5000LE, vegas_state::SYSTEM_CLOCK*2) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(vegas_state::SYSTEM_CLOCK) + R5000LE(config, m_maincpu, vegas_state::SYSTEM_CLOCK * 2); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(16384); + m_maincpu->set_system_clock(vegas_state::SYSTEM_CLOCK); // PCI Bus Devices - MCFG_DEVICE_ADD(":pci", PCI_ROOT, 0) + PCI_ROOT(config, ":pci", 0); VRC5074(config, m_nile, 100000000, m_maincpu); m_nile->set_sdram_size(0, 0x00800000); @@ -1763,9 +1763,9 @@ MACHINE_CONFIG_START(vegas_state::vegascore) ide.irq_handler().set(PCI_ID_NILE, FUNC(vrc5074_device::pci_intr_d)); //ide.set_pif(0x8f); - MCFG_DEVICE_ADD(PCI_ID_VIDEO, VOODOO_2_PCI, 0, m_maincpu, "screen") - MCFG_VOODOO_PCI_FBMEM(2) - MCFG_VOODOO_PCI_TMUMEM(4, 4) + voodoo_2_pci_device &voodoo(VOODOO_2_PCI(config, PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo.set_fbmem(2); + voodoo.set_tmumem(4, 4); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo") MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, vegas_state, vblank_assert)) @@ -1773,8 +1773,8 @@ MACHINE_CONFIG_START(vegas_state::vegascore) m_timekeeper->reset_cb().set(FUNC(vegas_state::watchdog_reset)); m_timekeeper->irq_cb().set(FUNC(vegas_state::watchdog_irq)); - MCFG_SMC91C94_ADD(m_ethernet) - MCFG_SMC91C94_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ethernet_interrupt)) + SMC91C94(config, m_ethernet, 0); + m_ethernet->irq_handler().set(FUNC(vegas_state::ethernet_interrupt)); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1795,8 +1795,7 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::vegas250) vegascore(config); - MCFG_DEVICE_MODIFY("maincpu") - MCFG_DEVICE_CLOCK(vegas_state::SYSTEM_CLOCK*2.5) + m_maincpu->set_clock(vegas_state::SYSTEM_CLOCK*2.5); MACHINE_CONFIG_END @@ -1808,8 +1807,8 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::vegasban) vegas32m(config); - MCFG_DEVICE_REPLACE(PCI_ID_VIDEO, VOODOO_BANSHEE_PCI, 0, m_maincpu, "screen") - MCFG_VOODOO_PCI_FBMEM(16) + voodoo_banshee_pci_device &voodoo(VOODOO_BANSHEE_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo.set_fbmem(16); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo") MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, vegas_state, vblank_assert)) MACHINE_CONFIG_END @@ -1817,13 +1816,13 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::vegasv3) vegas32m(config); - MCFG_DEVICE_REPLACE("maincpu", RM7000LE, vegas_state::SYSTEM_CLOCK*2.5) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(vegas_state::SYSTEM_CLOCK) + RM7000LE(config.replace(), m_maincpu, vegas_state::SYSTEM_CLOCK * 2.5); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(16384); + m_maincpu->set_system_clock(vegas_state::SYSTEM_CLOCK); - MCFG_DEVICE_REPLACE(PCI_ID_VIDEO, VOODOO_3_PCI, 0, m_maincpu, "screen") - MCFG_VOODOO_PCI_FBMEM(16) + voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo.set_fbmem(16); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo") MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, vegas_state, vblank_assert)) MACHINE_CONFIG_END @@ -1831,45 +1830,45 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::denver) vegascore(config); - MCFG_DEVICE_REPLACE(m_maincpu, RM7000LE, vegas_state::SYSTEM_CLOCK*2.5) - MCFG_MIPS3_ICACHE_SIZE(16384) - MCFG_MIPS3_DCACHE_SIZE(16384) - MCFG_MIPS3_SYSTEM_CLOCK(vegas_state::SYSTEM_CLOCK) + RM7000LE(config.replace(), m_maincpu, vegas_state::SYSTEM_CLOCK * 2.5); + m_maincpu->set_icache_size(16384); + m_maincpu->set_dcache_size(16384); + m_maincpu->set_system_clock(vegas_state::SYSTEM_CLOCK); m_nile->set_sdram_size(0, 0x02000000); m_nile->set_map(8, address_map_constructor(&vegas_state::vegas_cs8_map, "vegas_cs8_map", this), this); - MCFG_DEVICE_REPLACE(PCI_ID_VIDEO, VOODOO_3_PCI, 0, m_maincpu, "screen") - MCFG_VOODOO_PCI_FBMEM(16) + voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo.set_fbmem(16); MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo") MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, vegas_state, vblank_assert)) // TL16C552 UART - MCFG_DEVICE_ADD(m_uart1, NS16550, XTAL(1'843'200)) - MCFG_INS8250_OUT_TX_CB(WRITELINE("ttys01", rs232_port_device, write_txd)) - MCFG_INS8250_OUT_DTR_CB(WRITELINE("ttys01", rs232_port_device, write_dtr)) - MCFG_INS8250_OUT_RTS_CB(WRITELINE("ttys01", rs232_port_device, write_rts)) - MCFG_INS8250_OUT_INT_CB(WRITELINE(*this, vegas_state, duart_irq_cb)) - - MCFG_DEVICE_ADD(m_uart2, NS16550, XTAL(1'843'200)) - MCFG_INS8250_OUT_TX_CB(WRITELINE("ttys02", rs232_port_device, write_txd)) - MCFG_INS8250_OUT_DTR_CB(WRITELINE("ttys02", rs232_port_device, write_dtr)) - MCFG_INS8250_OUT_RTS_CB(WRITELINE("ttys02", rs232_port_device, write_rts)) - MCFG_INS8250_OUT_INT_CB(WRITELINE(*this, vegas_state, duart_irq_cb)) - - MCFG_DEVICE_ADD("ttys01", RS232_PORT, default_rs232_devices, nullptr) - MCFG_RS232_RXD_HANDLER(WRITELINE(m_uart1, ins8250_uart_device, rx_w)) - MCFG_RS232_DCD_HANDLER(WRITELINE(m_uart1, ins8250_uart_device, dcd_w)) - MCFG_RS232_DSR_HANDLER(WRITELINE(m_uart1, ins8250_uart_device, dsr_w)) - MCFG_RS232_RI_HANDLER(WRITELINE(m_uart1, ins8250_uart_device, ri_w)) - MCFG_RS232_CTS_HANDLER(WRITELINE(m_uart1, ins8250_uart_device, cts_w)) - - MCFG_DEVICE_ADD("ttys02", RS232_PORT, default_rs232_devices, nullptr) - MCFG_RS232_RXD_HANDLER(WRITELINE(m_uart2, ins8250_uart_device, rx_w)) - MCFG_RS232_DCD_HANDLER(WRITELINE(m_uart2, ins8250_uart_device, dcd_w)) - MCFG_RS232_DSR_HANDLER(WRITELINE(m_uart2, ins8250_uart_device, dsr_w)) - MCFG_RS232_RI_HANDLER(WRITELINE(m_uart2, ins8250_uart_device, ri_w)) - MCFG_RS232_CTS_HANDLER(WRITELINE(m_uart2, ins8250_uart_device, cts_w)) + NS16550(config, m_uart1, XTAL(1'843'200)); + m_uart1->out_tx_callback().set("ttys01", FUNC(rs232_port_device::write_txd)); + m_uart1->out_dtr_callback().set("ttys01", FUNC(rs232_port_device::write_dtr)); + m_uart1->out_rts_callback().set("ttys01", FUNC(rs232_port_device::write_rts)); + m_uart1->out_int_callback().set(FUNC(vegas_state::duart_irq_cb)); + + NS16550(config, m_uart2, XTAL(1'843'200)); + m_uart1->out_tx_callback().set("ttys02", FUNC(rs232_port_device::write_txd)); + m_uart1->out_dtr_callback().set("ttys02", FUNC(rs232_port_device::write_dtr)); + m_uart1->out_rts_callback().set("ttys02", FUNC(rs232_port_device::write_rts)); + m_uart1->out_int_callback().set(FUNC(vegas_state::duart_irq_cb)); + + rs232_port_device &ttys01(RS232_PORT(config, "ttys01", 0)); + ttys01.rxd_handler().set(m_uart1, FUNC(ins8250_uart_device::rx_w)); + ttys01.dcd_handler().set(m_uart1, FUNC(ins8250_uart_device::dcd_w)); + ttys01.dsr_handler().set(m_uart1, FUNC(ins8250_uart_device::dsr_w)); + ttys01.ri_handler().set(m_uart1, FUNC(ins8250_uart_device::ri_w)); + ttys01.cts_handler().set(m_uart1, FUNC(ins8250_uart_device::cts_w)); + + rs232_port_device &ttys02(RS232_PORT(config, "ttys02", 0)); + ttys02.rxd_handler().set(m_uart2, FUNC(ins8250_uart_device::rx_w)); + ttys02.dcd_handler().set(m_uart2, FUNC(ins8250_uart_device::dcd_w)); + ttys02.dsr_handler().set(m_uart2, FUNC(ins8250_uart_device::dsr_w)); + ttys02.ri_handler().set(m_uart2, FUNC(ins8250_uart_device::ri_w)); + ttys02.cts_handler().set(m_uart2, FUNC(ins8250_uart_device::cts_w)); MACHINE_CONFIG_END @@ -1877,177 +1876,178 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::gauntleg) vegas(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_CALSPEED) - MCFG_MIDWAY_IOASIC_UPPER(340/* 340=39", 322=27", others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_CALSPEED); + m_ioasic->set_upper(340/* 340=39", 322=27", others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::gauntdl) vegas(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_GAUNTDL) - MCFG_MIDWAY_IOASIC_UPPER(346/* 347, others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_GAUNTDL); + m_ioasic->set_upper(346/* 347, others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::warfa) vegas250(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_MACE) - MCFG_MIDWAY_IOASIC_UPPER(337/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_MACE); + m_ioasic->set_upper(337/* others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::tenthdeg) vegas(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2115, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0afb) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_GAUNTDL) - MCFG_MIDWAY_IOASIC_UPPER(330/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0afb); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_GAUNTDL); + m_ioasic->set_upper(330/* others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::roadburn) vegas32m(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_DSIO, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0ddd) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_STANDARD) - MCFG_MIDWAY_IOASIC_UPPER(325/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + dcs2_audio_dsio_device &dcs(DCS2_AUDIO_DSIO(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0ddd); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); + m_ioasic->set_upper(325/* others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::nbashowt) vegasban(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_MACE) + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_MACE); // 528 494 478 development pic, 487 NBA - MCFG_MIDWAY_IOASIC_UPPER(487/* or 478 or 487 */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - //MCFG_MIDWAY_IOASIC_AUTO_ACK(1) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, vegas_state, i40_w)) + m_ioasic->set_upper(487/* or 478 or 487 */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + //m_ioasic->set_auto_ack(1) + m_ioasic->aux_output_handler().set(FUNC(vegas_state::i40_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::nbanfl) vegasban(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_BLITZ99) - MCFG_MIDWAY_IOASIC_UPPER(498/* or 478 or 487 */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - //MCFG_MIDWAY_IOASIC_AUTO_ACK(1) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, vegas_state, i40_w)) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); + m_ioasic->set_upper(498/* or 478 or 487 */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + //m_ioasic->set_auto_ack(1) + m_ioasic->aux_output_handler().set(FUNC(vegas_state::i40_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::nbagold) vegasban(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_GAUNTDL) - MCFG_MIDWAY_IOASIC_UPPER( 494 /* 494 109 ??? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - //MCFG_MIDWAY_IOASIC_AUTO_ACK(1) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, vegas_state, i40_w)) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_GAUNTDL); + m_ioasic->set_upper(494 /* 494 109 ??? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + //m_ioasic->set_auto_ack(1) + m_ioasic->aux_output_handler().set(FUNC(vegas_state::i40_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::sf2049) denver(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_DENVER_5CH, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(8) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x872) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_STANDARD) - MCFG_MIDWAY_IOASIC_UPPER(336/* others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, vegas_state, wheel_board_w)) + dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs", 0)); + dcs.set_dram_in_mb(8); + dcs.set_polling_offset(0x872); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); + m_ioasic->set_upper(336/* others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); + m_ioasic->aux_output_handler().set(FUNC(vegas_state::wheel_board_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::sf2049se) denver(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_DENVER_5CH, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(8) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x872) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_SFRUSHRK) - MCFG_MIDWAY_IOASIC_UPPER(352/*352 336 others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, vegas_state, wheel_board_w)) + dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs", 0)); + dcs.set_dram_in_mb(8); + dcs.set_polling_offset(0x872); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_SFRUSHRK); + m_ioasic->set_upper(352/*352 336 others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); + m_ioasic->aux_output_handler().set(FUNC(vegas_state::wheel_board_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::sf2049te) denver(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_DENVER_5CH, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(8) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x872) - - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_SFRUSHRK) - MCFG_MIDWAY_IOASIC_UPPER(348/* 348 others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - MCFG_MIDWAY_IOASIC_AUTO_ACK(1) - MCFG_MIDWAY_IOASIC_AUX_OUT_CB(WRITE32(*this, vegas_state, wheel_board_w)) + dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs", 0)); + dcs.set_dram_in_mb(8); + dcs.set_polling_offset(0x872); + + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_SFRUSHRK); + m_ioasic->set_upper(348/* 348 others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + m_ioasic->set_auto_ack(1); + m_ioasic->aux_output_handler().set(FUNC(vegas_state::wheel_board_w)); MACHINE_CONFIG_END MACHINE_CONFIG_START(vegas_state::cartfury) vegasv3(config); - MCFG_DEVICE_ADD("dcs", DCS2_AUDIO_2104, 0) - MCFG_DCS2_AUDIO_DRAM_IN_MB(4) - MCFG_DCS2_AUDIO_POLLING_OFFSET(0x0b5d) + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs.set_dram_in_mb(4); + dcs.set_polling_offset(0x0b5d); - MCFG_DEVICE_ADD(m_ioasic, MIDWAY_IOASIC, 0) - MCFG_MIDWAY_IOASIC_SHUFFLE(MIDWAY_IOASIC_CARNEVIL) + midway_ioasic_device &ioasic(MIDWAY_IOASIC(config, m_ioasic, 0)); + m_ioasic->set_shuffle(MIDWAY_IOASIC_CARNEVIL); // 433, 495 Development PIC - MCFG_MIDWAY_IOASIC_UPPER(495/*433, 495 others? */) - MCFG_MIDWAY_IOASIC_YEAR_OFFS(80) - MCFG_MIDWAY_IOASIC_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ioasic_irq)) - //MCFG_MIDWAY_IOASIC_AUTO_ACK(1) + m_ioasic->set_upper(495/*433, 495 others? */); + m_ioasic->set_yearoffs(80); + m_ioasic->irq_handler().set(FUNC(vegas_state::ioasic_irq)); + //m_ioasic->set_auto_ack(1) MACHINE_CONFIG_END diff --git a/src/mame/machine/iteagle_fpga.h b/src/mame/machine/iteagle_fpga.h index 717e8f12e37..2a057a5be1f 100644 --- a/src/mame/machine/iteagle_fpga.h +++ b/src/mame/machine/iteagle_fpga.h @@ -13,12 +13,6 @@ #include "bus/rs232/rs232.h" #include "screen.h" -#define MCFG_ITEAGLE_FPGA_INIT(_version, _seq_init) \ - downcast<iteagle_fpga_device &>(*device).set_init_info(_version, _seq_init); - -#define MCFG_ITEAGLE_EEPROM_INIT(_sw_version, _hw_version) \ - downcast<iteagle_eeprom_device &>(*device).set_info(_sw_version, _hw_version); - // Functional emulation of AMD AM85C30 serial controller // Two channels, A & B class iteagle_am85c30 diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h index 8d764d34999..ee9362e15ea 100644 --- a/src/mame/machine/midwayic.h +++ b/src/mame/machine/midwayic.h @@ -161,6 +161,9 @@ public: template <class Object> devcb_base &set_irqhandler_callback(Object &&cb) { return m_irq_callback.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_serial_tx_callback(Object &&cb) { return m_serial_tx_cb.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_aux_output_callback(Object &&cb) { return m_aux_output_cb.set_callback(std::forward<Object>(cb)); } + auto irq_handler() { return m_irq_callback.bind(); } + auto serial_tx_handler() { return m_serial_tx_cb.bind(); } + auto aux_output_handler() { return m_aux_output_cb.bind(); } void set_shuffle_state(int state); void fifo_w(uint16_t data); |