gayle: removed MCFG macros (nw)

This commit is contained in:
Ivan Vangelista 2018-11-15 20:22:45 +01:00
parent 00391d6124
commit d14efd5e72
3 changed files with 22 additions and 42 deletions

View File

@ -58,6 +58,9 @@ void gayle_device::device_start()
m_cs0_write.resolve_safe();
m_cs1_read.resolve_safe(0xffff);
m_cs1_write.resolve_safe();
save_item(NAME(m_gayle_id_count));
save_item(NAME(m_gayle_reg));
}
//-------------------------------------------------

View File

@ -14,31 +14,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_GAYLE_ADD(_tag, _clock, _id) \
MCFG_DEVICE_ADD(_tag, GAYLE, _clock) \
downcast<gayle_device &>(*device).set_id(_id);
#define MCFG_GAYLE_INT2_HANDLER(_devcb) \
downcast<gayle_device &>(*device).set_int2_handler(DEVCB_##_devcb);
#define MCFG_GAYLE_CS0_READ_HANDLER(_devcb) \
downcast<gayle_device &>(*device).set_cs0_read_handler(DEVCB_##_devcb);
#define MCFG_GAYLE_CS0_WRITE_HANDLER(_devcb) \
downcast<gayle_device &>(*device).set_cs0_write_handler(DEVCB_##_devcb);
#define MCFG_GAYLE_CS1_READ_HANDLER(_devcb) \
downcast<gayle_device &>(*device).set_cs1_read_handler(DEVCB_##_devcb);
#define MCFG_GAYLE_CS1_WRITE_HANDLER(_devcb) \
downcast<gayle_device &>(*device).set_cs1_write_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -52,11 +27,11 @@ public:
gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
template <class Object> devcb_base &set_int2_handler(Object &&cb) { return m_int2_w.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cs0_read_handler(Object &&cb) { return m_cs0_read.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cs0_write_handler(Object &&cb) { return m_cs0_write.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cs1_read_handler(Object &&cb) { return m_cs1_read.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_cs1_write_handler(Object &&cb) { return m_cs1_write.set_callback(std::forward<Object>(cb)); }
auto int2_handler() { return m_int2_w.bind(); }
auto cs0_read_handler() { return m_cs0_read.bind(); }
auto cs0_write_handler() { return m_cs0_write.bind(); }
auto cs1_read_handler() { return m_cs1_read.bind(); }
auto cs1_write_handler() { return m_cs1_write.bind(); }
// interface
DECLARE_WRITE_LINE_MEMBER( ide_interrupt_w );

View File

@ -1932,12 +1932,13 @@ MACHINE_CONFIG_START(a600_state::a600)
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_2mb_map16).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
MCFG_GAYLE_ADD("gayle", amiga_state::CLK_28M_PAL / 2, a600_state::GAYLE_ID)
MCFG_GAYLE_INT2_HANDLER(WRITELINE(*this, a600_state, gayle_int2_w))
MCFG_GAYLE_CS0_READ_HANDLER(READ16("ata", ata_interface_device, cs0_r))
MCFG_GAYLE_CS0_WRITE_HANDLER(WRITE16("ata", ata_interface_device, cs0_w))
MCFG_GAYLE_CS1_READ_HANDLER(READ16("ata", ata_interface_device, cs1_r))
MCFG_GAYLE_CS1_WRITE_HANDLER(WRITE16("ata", ata_interface_device, cs1_w))
gayle_device &gayle(GAYLE(config, "gayle", amiga_state::CLK_28M_PAL / 2));
gayle.set_id(a600_state::GAYLE_ID);
gayle.int2_handler().set(FUNC(a600_state::gayle_int2_w));
gayle.cs0_read_handler().set("ata", FUNC(ata_interface_device::cs0_r));
gayle.cs0_write_handler().set("ata", FUNC(ata_interface_device::cs0_w));
gayle.cs1_read_handler().set("ata", FUNC(ata_interface_device::cs1_r));
gayle.cs1_write_handler().set("ata", FUNC(ata_interface_device::cs1_w));
ata_interface_device &ata(ATA_INTERFACE(config, "ata").options(ata_devices, "hdd", nullptr, false));
ata.irq_handler().set("gayle", FUNC(gayle_device::ide_interrupt_w));
@ -1989,12 +1990,13 @@ MACHINE_CONFIG_START(a1200_state::a1200)
MCFG_VIDEO_START_OVERRIDE(amiga_state, amiga_aga)
MCFG_GAYLE_ADD("gayle", amiga_state::CLK_28M_PAL / 2, a1200_state::GAYLE_ID)
MCFG_GAYLE_INT2_HANDLER(WRITELINE(*this, a1200_state, gayle_int2_w))
MCFG_GAYLE_CS0_READ_HANDLER(READ16("ata", ata_interface_device, cs0_r))
MCFG_GAYLE_CS0_WRITE_HANDLER(WRITE16("ata", ata_interface_device, cs0_w))
MCFG_GAYLE_CS1_READ_HANDLER(READ16("ata", ata_interface_device, cs1_r))
MCFG_GAYLE_CS1_WRITE_HANDLER(WRITE16("ata", ata_interface_device, cs1_w))
gayle_device &gayle(GAYLE(config, "gayle", amiga_state::CLK_28M_PAL / 2));
gayle.set_id(a1200_state::GAYLE_ID);
gayle.int2_handler().set(FUNC(a1200_state::gayle_int2_w));
gayle.cs0_read_handler().set("ata", FUNC(ata_interface_device::cs0_r));
gayle.cs0_write_handler().set("ata", FUNC(ata_interface_device::cs0_w));
gayle.cs1_read_handler().set("ata", FUNC(ata_interface_device::cs1_r));
gayle.cs1_write_handler().set("ata", FUNC(ata_interface_device::cs1_w));
ata_interface_device &ata(ATA_INTERFACE(config, "ata").options(ata_devices, "hdd", nullptr, false));
ata.irq_handler().set("gayle", FUNC(gayle_device::ide_interrupt_w));