mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
1st half of devices/machine to device_add_mconfig (nw)
This commit is contained in:
parent
7f88e1ca5e
commit
8b8f2db8c4
@ -64,21 +64,16 @@ DEFINE_DEVICE_TYPE(MC68153, bim68153_device, "m68153bim", "Motor
|
||||
DEFINE_DEVICE_TYPE(EI68C153, ei68c153_device, "ei68c153", "EPIC EI68C153 BIM")
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_mconfig_additions -
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
MACHINE_CONFIG_START( m68153 )
|
||||
MACHINE_CONFIG_MEMBER( bim68153_device::device_add_mconfig )
|
||||
LOG("%s\n", FUNCNAME);
|
||||
MCFG_DEVICE_ADD(CHN0_TAG, MC68153_CHANNEL, 0)
|
||||
MCFG_DEVICE_ADD(CHN1_TAG, MC68153_CHANNEL, 0)
|
||||
MCFG_DEVICE_ADD(CHN2_TAG, MC68153_CHANNEL, 0)
|
||||
MCFG_DEVICE_ADD(CHN3_TAG, MC68153_CHANNEL, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor bim68153_device::device_mconfig_additions() const
|
||||
{
|
||||
LOG("%s\n", FUNCNAME);
|
||||
return MACHINE_CONFIG_NAME( m68153 );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
@ -165,7 +165,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
void trigger_interrupt(int ch);
|
||||
int get_channel_index(bim68153_channel *ch);
|
||||
|
@ -43,8 +43,7 @@ static ADDRESS_MAP_START( m68307_internal_map, AS_PROGRAM, 16, m68307_cpu_device
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( 68307fragment )
|
||||
MACHINE_CONFIG_MEMBER( m68307_cpu_device::device_add_mconfig )
|
||||
MCFG_MC68681_ADD("internal68681", 16000000/4) // ?? Mhz - should be specified in inline config
|
||||
MCFG_MC68681_IRQ_CALLBACK(WRITELINE(m68307_cpu_device, m68307_duart_irq_handler))
|
||||
MCFG_MC68681_A_TX_CALLBACK(WRITELINE(m68307_cpu_device, m68307_duart_txa))
|
||||
@ -53,11 +52,6 @@ static MACHINE_CONFIG_START( 68307fragment )
|
||||
MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(m68307_cpu_device, m68307_duart_output_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor m68307_cpu_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( 68307fragment );
|
||||
}
|
||||
|
||||
|
||||
m68307_cpu_device::m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: m68000_device(mconfig, tag, owner, clock, M68307, 16, 24, ADDRESS_MAP_NAME(m68307_internal_map)),
|
||||
|
@ -42,11 +42,6 @@ public:
|
||||
template <class Object> static devcb_base &set_inport_cb(device_t &device, Object &&cb) { return downcast<m68307_cpu_device &>(device).read_inport.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &set_outport_cb(device_t &device, Object &&cb) { return downcast<m68307_cpu_device &>(device).write_outport.set_callback(std::forward<Object>(cb)); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(m68307_duart_irq_handler);
|
||||
DECLARE_WRITE_LINE_MEMBER(m68307_duart_txa) { write_a_tx(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER(m68307_duart_txb) { write_b_tx(state); }
|
||||
DECLARE_READ8_MEMBER(m68307_duart_input_r) { return read_inport(); }
|
||||
DECLARE_WRITE8_MEMBER(m68307_duart_output_w) { write_outport(data); }
|
||||
uint16_t simple_read_immediate_16_m68307(offs_t address);
|
||||
|
||||
|
||||
@ -80,7 +75,7 @@ protected:
|
||||
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
|
||||
virtual uint32_t disasm_max_opcode_bytes() const override { return 10; }
|
||||
@ -94,6 +89,12 @@ protected:
|
||||
void serial_interrupt(int vector);
|
||||
void mbus_interrupt();
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(m68307_duart_irq_handler);
|
||||
DECLARE_WRITE_LINE_MEMBER(m68307_duart_txa) { write_a_tx(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER(m68307_duart_txb) { write_b_tx(state); }
|
||||
DECLARE_READ8_MEMBER(m68307_duart_input_r) { return read_inport(); }
|
||||
DECLARE_WRITE8_MEMBER(m68307_duart_output_w) { write_outport(data); }
|
||||
|
||||
void init16_m68307(address_space &space);
|
||||
|
||||
int calc_cs(offs_t address) const;
|
||||
|
@ -19,19 +19,13 @@
|
||||
DEFINE_DEVICE_TYPE(TTL166, ttl166_device, "ttl166", "SN54/74166")
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( ttl166 )
|
||||
MACHINE_CONFIG_MEMBER( ttl166_device::device_add_mconfig )
|
||||
MCFG_TIMER_DRIVER_ADD("timer", ttl166_device, qh_output)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor ttl166_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( ttl166 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
|
@ -59,11 +59,9 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(clock_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(shift_load_w);
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(qh_output);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
@ -79,6 +77,8 @@ private:
|
||||
int m_ser;
|
||||
int m_clk;
|
||||
int m_shld;
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(qh_output);
|
||||
};
|
||||
|
||||
|
||||
|
@ -208,14 +208,10 @@ kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag,
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( keyboard )
|
||||
MACHINE_CONFIG_MEMBER( kbdc8042_device::device_add_mconfig )
|
||||
MCFG_AT_KEYB_ADD("at_keyboard", 1, WRITELINE(kbdc8042_device, keyboard_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor kbdc8042_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( keyboard );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
device_start - device-specific startup
|
||||
|
@ -57,8 +57,6 @@ public:
|
||||
// construction/destruction
|
||||
kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
static void set_keyboard_type(device_t &device, kbdc8042_type_t keybtype) { downcast<kbdc8042_device &>(device).m_keybtype = keybtype; }
|
||||
template <class Object> static devcb_base &set_system_reset_callback(device_t &device, Object &&cb) { return downcast<kbdc8042_device &>(device).m_system_reset_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &set_gate_a20_callback(device_t &device, Object &&cb) { return downcast<kbdc8042_device &>(device).m_gate_a20_cb.set_callback(std::forward<Object>(cb)); }
|
||||
@ -70,7 +68,6 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( data_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( write_out2 );
|
||||
DECLARE_WRITE_LINE_MEMBER( keyboard_w );
|
||||
|
||||
void at_8042_set_outport(uint8_t data, int initial);
|
||||
void at_8042_receive(uint8_t data);
|
||||
@ -81,7 +78,9 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
uint8_t m_inport, m_outport, m_data, m_command;
|
||||
|
||||
struct {
|
||||
@ -118,6 +117,8 @@ protected:
|
||||
devcb_write_line m_output_buffer_empty_cb;
|
||||
|
||||
devcb_write8 m_speaker_cb;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( keyboard_w );
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
@ -34,18 +34,12 @@
|
||||
DEFINE_DEVICE_TYPE(AKIKO, akiko_device, "akiko", "CBM AKIKO")
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( akiko )
|
||||
MACHINE_CONFIG_MEMBER( akiko_device::device_add_mconfig )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor akiko_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( akiko );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
|
@ -85,7 +85,7 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_stop() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
// 1X CDROM sector time in msec (300KBps)
|
||||
|
@ -24,16 +24,6 @@ static INPUT_PORTS_START( at_keybc )
|
||||
PORT_DIPSETTING( 0x00, "Color/Graphics adapter" )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// machine fragment
|
||||
static MACHINE_CONFIG_START( at_keybc )
|
||||
MCFG_CPU_ADD("at_keybc", I8042, DERIVED_CLOCK(1,1))
|
||||
MCFG_MCS48_PORT_T0_IN_CB(READLINE(at_keyboard_controller_device, t0_r))
|
||||
MCFG_MCS48_PORT_T1_IN_CB(READLINE(at_keyboard_controller_device, t1_r))
|
||||
MCFG_MCS48_PORT_P1_IN_CB(READ8(at_keyboard_controller_device, p1_r))
|
||||
MCFG_MCS48_PORT_P2_IN_CB(READ8(at_keyboard_controller_device, p2_r))
|
||||
MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(at_keyboard_controller_device, p2_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
// rom definition for the 8042 internal rom
|
||||
ROM_START( at_keybc )
|
||||
ROM_REGION(0x800, "at_keybc", 0)
|
||||
@ -85,14 +75,17 @@ ioport_constructor at_keyboard_controller_device::device_input_ports() const
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor at_keyboard_controller_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(at_keybc);
|
||||
}
|
||||
MACHINE_CONFIG_MEMBER( at_keyboard_controller_device::device_add_mconfig )
|
||||
MCFG_CPU_ADD("at_keybc", I8042, DERIVED_CLOCK(1,1))
|
||||
MCFG_MCS48_PORT_T0_IN_CB(READLINE(at_keyboard_controller_device, t0_r))
|
||||
MCFG_MCS48_PORT_T1_IN_CB(READLINE(at_keyboard_controller_device, t1_r))
|
||||
MCFG_MCS48_PORT_P1_IN_CB(READ8(at_keyboard_controller_device, p1_r))
|
||||
MCFG_MCS48_PORT_P2_IN_CB(READ8(at_keyboard_controller_device, p2_r))
|
||||
MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(at_keyboard_controller_device, p2_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/*-------------------------------------------------
|
||||
device_start - device-specific startup
|
||||
|
@ -55,13 +55,6 @@ public:
|
||||
template <class Object> static devcb_base &set_keyboard_clock_callback(device_t &device, Object &&cb) { return downcast<at_keyboard_controller_device &>(device).m_keyboard_clock_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &set_keyboard_data_callback(device_t &device, Object &&cb) { return downcast<at_keyboard_controller_device &>(device).m_keyboard_data_cb.set_callback(std::forward<Object>(cb)); }
|
||||
|
||||
// internal 8042 interface
|
||||
DECLARE_READ_LINE_MEMBER( t0_r );
|
||||
DECLARE_READ_LINE_MEMBER( t1_r );
|
||||
DECLARE_READ8_MEMBER( p1_r );
|
||||
DECLARE_READ8_MEMBER( p2_r );
|
||||
DECLARE_WRITE8_MEMBER( p2_w );
|
||||
|
||||
// interface to the host pc
|
||||
DECLARE_READ8_MEMBER( data_r );
|
||||
DECLARE_WRITE8_MEMBER( data_w );
|
||||
@ -79,12 +72,19 @@ protected:
|
||||
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
// internal state
|
||||
upi41_cpu_device *m_cpu;
|
||||
|
||||
// internal 8042 interface
|
||||
DECLARE_READ_LINE_MEMBER( t0_r );
|
||||
DECLARE_READ_LINE_MEMBER( t1_r );
|
||||
DECLARE_READ8_MEMBER( p1_r );
|
||||
DECLARE_READ8_MEMBER( p2_r );
|
||||
DECLARE_WRITE8_MEMBER( p2_w );
|
||||
|
||||
// interface to the host pc
|
||||
devcb_write_line m_system_reset_cb;
|
||||
devcb_write_line m_gate_a20_cb;
|
||||
|
@ -269,21 +269,16 @@ void ata_interface_device::device_start()
|
||||
}
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( ata_interface )
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( ata_interface_device::device_add_mconfig )
|
||||
MCFG_DEVICE_ADD( "0", ATA_SLOT, 0 )
|
||||
MCFG_DEVICE_ADD( "1", ATA_SLOT, 0 )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor ata_interface_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( ata_interface );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// ATA SLOT DEVICE
|
||||
|
@ -99,7 +99,7 @@ protected:
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual void set_irq(int state);
|
||||
virtual void set_dmarq(int state);
|
||||
|
@ -26,22 +26,16 @@ atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( atapicdr )
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( atapi_cdrom_device::device_add_mconfig )
|
||||
MCFG_CDROM_ADD("image")
|
||||
MCFG_CDROM_INTERFACE("cdrom")
|
||||
MCFG_SOUND_ADD("cdda", CDDA, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor atapi_cdrom_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( atapicdr );
|
||||
}
|
||||
|
||||
void atapi_cdrom_device::device_start()
|
||||
{
|
||||
m_image = subdevice<cdrom_image_device>("image");
|
||||
|
@ -29,7 +29,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual void perform_diagnostic() override;
|
||||
virtual void identify_packet_device() override;
|
||||
|
@ -20,11 +20,10 @@
|
||||
DEFINE_DEVICE_TYPE(CR511B, cr511b_device, "cr511b", "CR-511-B CD-ROM drive")
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( cr511b )
|
||||
MACHINE_CONFIG_MEMBER( cr511b_device::device_add_mconfig )
|
||||
MCFG_CDROM_ADD("cdrom")
|
||||
MCFG_CDROM_INTERFACE("cdrom")
|
||||
MCFG_SOUND_ADD("cdda", CDDA, 0)
|
||||
@ -32,11 +31,6 @@ static MACHINE_CONFIG_START( cr511b )
|
||||
MCFG_SOUND_ROUTE(1, ":rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor cr511b_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( cr511b );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
|
@ -105,7 +105,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
private:
|
||||
|
@ -93,11 +93,10 @@ const float cs4031_device::m_dma_clock_divider[] =
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( cs4031 )
|
||||
MACHINE_CONFIG_MEMBER( cs4031_device::device_add_mconfig )
|
||||
MCFG_DEVICE_ADD("dma1", AM9517A, 0)
|
||||
MCFG_I8237_OUT_HREQ_CB(DEVWRITELINE("dma2", am9517a_device, dreq0_w))
|
||||
MCFG_I8237_OUT_EOP_CB(WRITELINE(cs4031_device, dma1_eop_w))
|
||||
@ -145,11 +144,6 @@ static MACHINE_CONFIG_START( cs4031 )
|
||||
MCFG_MC146818_CENTURY_INDEX(0x32)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor cs4031_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( cs4031 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
|
@ -83,9 +83,6 @@ public:
|
||||
// construction/destruction
|
||||
cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
// callbacks
|
||||
template <class Obj> devcb_base &set_ior_callback(Obj &&ior) { return m_read_ior.set_callback(std::forward<Obj>(ior)); }
|
||||
template <class Obj> devcb_base &set_iow_callback(Obj &&iow) { return m_write_iow.set_callback(std::forward<Obj>(iow)); }
|
||||
@ -97,41 +94,6 @@ public:
|
||||
template <class Obj> devcb_base &set_a20m_callback(Obj &&a20m) { return m_write_a20m.set_callback(std::forward<Obj>(a20m)); }
|
||||
template <class Obj> devcb_base &set_spkr_callback(Obj &&spkr) { return m_write_spkr.set_callback(std::forward<Obj>(spkr)); }
|
||||
|
||||
// not really public
|
||||
DECLARE_READ8_MEMBER( dma_read_byte );
|
||||
DECLARE_WRITE8_MEMBER( dma_write_byte );
|
||||
DECLARE_READ8_MEMBER( dma_read_word );
|
||||
DECLARE_WRITE8_MEMBER( dma_write_word );
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_eop_w );
|
||||
DECLARE_READ8_MEMBER( dma1_ior0_r ) { return m_read_ior(0); }
|
||||
DECLARE_READ8_MEMBER( dma1_ior1_r ) { return m_read_ior(1); }
|
||||
DECLARE_READ8_MEMBER( dma1_ior2_r ) { return m_read_ior(2); }
|
||||
DECLARE_READ8_MEMBER( dma1_ior3_r ) { return m_read_ior(3); }
|
||||
DECLARE_READ8_MEMBER( dma2_ior1_r ) { uint16_t const result = m_read_ior(5); m_dma_high_byte = result >> 8; return result; }
|
||||
DECLARE_READ8_MEMBER( dma2_ior2_r ) { uint16_t const result = m_read_ior(6); m_dma_high_byte = result >> 8; return result; }
|
||||
DECLARE_READ8_MEMBER( dma2_ior3_r ) { uint16_t const result = m_read_ior(7); m_dma_high_byte = result >> 8; return result; }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow0_w ) { m_write_iow(0, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow1_w ) { m_write_iow(1, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow2_w ) { m_write_iow(2, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow3_w ) { m_write_iow(3, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma2_iow1_w ) { m_write_iow(5, (m_dma_high_byte << 8) | data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma2_iow2_w ) { m_write_iow(6, (m_dma_high_byte << 8) | data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma2_iow3_w ) { m_write_iow(7, (m_dma_high_byte << 8) | data, 0xffff); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack0_w ) { set_dma_channel(0, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack1_w ) { set_dma_channel(1, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack2_w ) { set_dma_channel(2, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack3_w ) { set_dma_channel(3, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack0_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack1_w ) { set_dma_channel(5, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack2_w ) { set_dma_channel(6, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack3_w ) { set_dma_channel(7, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_hreq_w ) { m_write_hold(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( intc1_int_w ) { m_write_intr(state); }
|
||||
DECLARE_READ8_MEMBER( intc1_slave_ack_r );
|
||||
DECLARE_WRITE_LINE_MEMBER( ctc_out1_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( ctc_out2_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( rtc_irq_w );
|
||||
|
||||
// internal io
|
||||
DECLARE_WRITE8_MEMBER( config_address_w );
|
||||
DECLARE_READ8_MEMBER( config_data_r );
|
||||
@ -190,6 +152,8 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_reset_after_children() override;
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
devcb_read16 m_read_ior;
|
||||
@ -279,6 +243,40 @@ private:
|
||||
bool m_address_valid;
|
||||
|
||||
uint8_t m_registers[0x20];
|
||||
|
||||
DECLARE_READ8_MEMBER( dma_read_byte );
|
||||
DECLARE_WRITE8_MEMBER( dma_write_byte );
|
||||
DECLARE_READ8_MEMBER( dma_read_word );
|
||||
DECLARE_WRITE8_MEMBER( dma_write_word );
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_eop_w );
|
||||
DECLARE_READ8_MEMBER( dma1_ior0_r ) { return m_read_ior(0); }
|
||||
DECLARE_READ8_MEMBER( dma1_ior1_r ) { return m_read_ior(1); }
|
||||
DECLARE_READ8_MEMBER( dma1_ior2_r ) { return m_read_ior(2); }
|
||||
DECLARE_READ8_MEMBER( dma1_ior3_r ) { return m_read_ior(3); }
|
||||
DECLARE_READ8_MEMBER( dma2_ior1_r ) { uint16_t const result = m_read_ior(5); m_dma_high_byte = result >> 8; return result; }
|
||||
DECLARE_READ8_MEMBER( dma2_ior2_r ) { uint16_t const result = m_read_ior(6); m_dma_high_byte = result >> 8; return result; }
|
||||
DECLARE_READ8_MEMBER( dma2_ior3_r ) { uint16_t const result = m_read_ior(7); m_dma_high_byte = result >> 8; return result; }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow0_w ) { m_write_iow(0, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow1_w ) { m_write_iow(1, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow2_w ) { m_write_iow(2, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma1_iow3_w ) { m_write_iow(3, data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma2_iow1_w ) { m_write_iow(5, (m_dma_high_byte << 8) | data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma2_iow2_w ) { m_write_iow(6, (m_dma_high_byte << 8) | data, 0xffff); }
|
||||
DECLARE_WRITE8_MEMBER( dma2_iow3_w ) { m_write_iow(7, (m_dma_high_byte << 8) | data, 0xffff); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack0_w ) { set_dma_channel(0, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack1_w ) { set_dma_channel(1, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack2_w ) { set_dma_channel(2, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma1_dack3_w ) { set_dma_channel(3, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack0_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack1_w ) { set_dma_channel(5, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack2_w ) { set_dma_channel(6, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_dack3_w ) { set_dma_channel(7, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma2_hreq_w ) { m_write_hold(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( intc1_int_w ) { m_write_intr(state); }
|
||||
DECLARE_READ8_MEMBER( intc1_slave_ack_r );
|
||||
DECLARE_WRITE_LINE_MEMBER( ctc_out1_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( ctc_out2_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( rtc_irq_w );
|
||||
};
|
||||
|
||||
|
||||
|
@ -1442,13 +1442,9 @@ void diablo_hd_device::device_timer(emu_timer &timer, device_timer_id id, int pa
|
||||
}
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START( diablo_drive )
|
||||
MACHINE_CONFIG_MEMBER( diablo_hd_device::device_add_mconfig )
|
||||
MCFG_DIABLO_ADD("drive")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor diablo_hd_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( diablo_drive );
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(DIABLO_HD, diablo_hd_device, "diablo_hd", "Diablo Disk")
|
||||
|
@ -68,7 +68,7 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
template <typename Format, typename... Params> void logprintf(int level, Format &&fmt, Params &&... args);
|
||||
|
@ -49,14 +49,9 @@ void fdc37c665gt_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START(fdc37c665gt)
|
||||
MACHINE_CONFIG_MEMBER(fdc37c665gt_device::device_add_mconfig)
|
||||
MCFG_DEVICE_ADD("uart1", NS16550, XTAL_24MHz/13)
|
||||
MCFG_DEVICE_ADD("uart2", NS16550, XTAL_24MHz/13)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor fdc37c665gt_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(fdc37c665gt);
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(FDC37C665GT, fdc37c665gt_device, "fdc37c665gt", "FDC37C665GT")
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
required_device<ns16550_device> m_uart1;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:Wilbert Pol, Miodrag Milanovic
|
||||
/***************************************************************************
|
||||
|
||||
machine/genpc.c
|
||||
machine/genpc.cpp
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
@ -395,7 +395,12 @@ DEFINE_DEVICE_TYPE(IBM5160_MOTHERBOARD, ibm5160_mb_device, "ibm5160_mb", "IBM 51
|
||||
// DEVICE CONFIGURATION
|
||||
//**************************************************************************
|
||||
|
||||
static MACHINE_CONFIG_START( ibm5160_mb_config )
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( ibm5160_mb_device::device_add_mconfig )
|
||||
MCFG_DEVICE_ADD("pit8253", PIT8253, 0)
|
||||
MCFG_PIT8253_CLK0(XTAL_14_31818MHz/12) /* heartbeat IRQ */
|
||||
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
|
||||
@ -451,17 +456,6 @@ static MACHINE_CONFIG_START( ibm5160_mb_config )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor ibm5160_mb_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( ibm5160_mb_config );
|
||||
}
|
||||
|
||||
|
||||
static INPUT_PORTS_START( ibm5160_mb )
|
||||
PORT_START("DSW0") /* IN1 */
|
||||
PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives")
|
||||
@ -524,8 +518,8 @@ ibm5160_mb_device::ibm5160_mb_device(
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, m_maincpu(*owner, "maincpu")
|
||||
, m_pic8259(*this, "pic8259")
|
||||
, m_dma8237(*this, "dma8237")
|
||||
, m_pit8253(*this, "pit8253")
|
||||
, m_dma8237(*this, "dma8237")
|
||||
, m_ppi8255(*this, "ppi8255")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_isabus(*this, "isa")
|
||||
@ -591,8 +585,13 @@ DEFINE_DEVICE_TYPE(IBM5150_MOTHERBOARD, ibm5150_mb_device, "ibm5150_mb", "IBM 51
|
||||
//**************************************************************************
|
||||
// DEVICE CONFIGURATION
|
||||
//**************************************************************************
|
||||
static MACHINE_CONFIG_START( ibm5150_mb_config )
|
||||
MCFG_FRAGMENT_ADD(ibm5160_mb_config)
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( ibm5150_mb_device::device_add_mconfig )
|
||||
ibm5160_mb_device::device_add_mconfig(config);
|
||||
|
||||
MCFG_DEVICE_MODIFY("pc_kbdc")
|
||||
MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5150_mb_device, keyboard_clock_w))
|
||||
@ -605,17 +604,6 @@ static MACHINE_CONFIG_START( ibm5150_mb_config )
|
||||
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor ibm5150_mb_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( ibm5150_mb_config );
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
@ -775,8 +763,13 @@ WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w )
|
||||
|
||||
DEFINE_DEVICE_TYPE(EC1841_MOTHERBOARD, ec1841_mb_device, "ec1841_mb", "EC-1840 motherboard")
|
||||
|
||||
static MACHINE_CONFIG_START( ec1841_mb_config )
|
||||
MCFG_FRAGMENT_ADD(ibm5160_mb_config)
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( ec1841_mb_device::device_add_mconfig )
|
||||
ibm5160_mb_device::device_add_mconfig(config);
|
||||
|
||||
MCFG_DEVICE_MODIFY("ppi8255")
|
||||
MCFG_I8255_OUT_PORTB_CB(WRITE8(ec1841_mb_device, pc_ppi_portb_w))
|
||||
@ -786,17 +779,6 @@ static MACHINE_CONFIG_START( ec1841_mb_config )
|
||||
MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ec1841_mb_device, keyboard_clock_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor ec1841_mb_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( ec1841_mb_config );
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( ec1841_mb )
|
||||
PORT_START("DSW0") /* SA1 */
|
||||
PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives")
|
||||
@ -908,8 +890,13 @@ pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, device_typ
|
||||
// DEVICE CONFIGURATION
|
||||
//**************************************************************************
|
||||
|
||||
static MACHINE_CONFIG_START( pc_noppi_mb_config )
|
||||
MCFG_FRAGMENT_ADD(ibm5160_mb_config)
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( pc_noppi_mb_device::device_add_mconfig )
|
||||
ibm5160_mb_device::device_add_mconfig(config);
|
||||
|
||||
MCFG_DEVICE_REMOVE("pc_kbdc")
|
||||
MCFG_DEVICE_REMOVE("ppi8255")
|
||||
@ -918,16 +905,6 @@ MACHINE_CONFIG_END
|
||||
static INPUT_PORTS_START( pc_noppi_mb )
|
||||
INPUT_PORTS_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor pc_noppi_mb_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( pc_noppi_mb_config );
|
||||
}
|
||||
|
||||
ioport_constructor pc_noppi_mb_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( pc_noppi_mb );
|
||||
|
@ -36,22 +36,32 @@ public:
|
||||
// inline configuration
|
||||
static void static_set_cputag(device_t &device, const char *tag);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
DECLARE_ADDRESS_MAP(map, 8);
|
||||
|
||||
uint8_t m_pit_out2;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(pc_page_w);
|
||||
DECLARE_WRITE8_MEMBER(nmi_enable_w);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata );
|
||||
|
||||
protected:
|
||||
ibm5160_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
public:
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
|
||||
protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
public:
|
||||
required_device<pic8259_device> m_pic8259;
|
||||
required_device<am9517a_device> m_dma8237;
|
||||
required_device<pit8253_device> m_pit8253;
|
||||
required_device<am9517a_device> m_dma8237;
|
||||
protected:
|
||||
optional_device<i8255_device> m_ppi8255;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<isa8_device> m_isabus;
|
||||
@ -65,7 +75,6 @@ public:
|
||||
int m_dma_channel;
|
||||
uint8_t m_dma_offset[4];
|
||||
uint8_t m_pc_spkrdata;
|
||||
uint8_t m_pit_out2;
|
||||
bool m_cur_eop;
|
||||
|
||||
uint8_t m_nmi_enabled;
|
||||
@ -107,14 +116,8 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( pc_dack2_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( pc_dack3_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( pc_speaker_set_spkrdata );
|
||||
|
||||
DECLARE_WRITE8_MEMBER(pc_page_w);
|
||||
DECLARE_WRITE8_MEMBER(nmi_enable_w);
|
||||
|
||||
const char *m_cputag;
|
||||
|
||||
private:
|
||||
void pc_select_dma_channel(int channel, bool state);
|
||||
};
|
||||
|
||||
@ -134,18 +137,17 @@ public:
|
||||
// construction/destruction
|
||||
ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
|
||||
|
||||
protected:
|
||||
ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
public:
|
||||
|
||||
DECLARE_READ8_MEMBER ( pc_ppi_porta_r );
|
||||
DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
|
||||
DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
|
||||
@ -166,12 +168,13 @@ public:
|
||||
// construction/destruction
|
||||
ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
virtual void device_start() override;
|
||||
|
||||
public:
|
||||
private:
|
||||
DECLARE_READ8_MEMBER ( pc_ppi_portc_r );
|
||||
DECLARE_WRITE8_MEMBER( pc_ppi_portb_w );
|
||||
|
||||
@ -196,7 +199,7 @@ public:
|
||||
protected:
|
||||
pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
};
|
||||
|
||||
|
@ -95,10 +95,10 @@ const tiny_rom_entry *i80130_device::device_rom_region() const
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG_START( i80130 )
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( i80130 )
|
||||
MACHINE_CONFIG_MEMBER( i80130_device::device_add_mconfig )
|
||||
MCFG_PIC8259_ADD("pic", DEVWRITELINE(DEVICE_SELF, i80130_device, irq_w), VCC, NOOP)
|
||||
|
||||
MCFG_DEVICE_ADD("pit", PIT8254, 0)
|
||||
@ -111,17 +111,6 @@ static MACHINE_CONFIG_START( i80130 )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor i80130_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( i80130 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
|
@ -62,10 +62,6 @@ public:
|
||||
virtual DECLARE_ADDRESS_MAP(rom_map, 16);
|
||||
virtual DECLARE_ADDRESS_MAP(io_map, 16);
|
||||
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
uint8_t inta_r() { return m_pic->acknowledge(); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( ir0_w ) { m_pic->ir0_w(state); }
|
||||
@ -77,11 +73,6 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( ir6_w ) { m_pic->ir6_w(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( ir7_w ) { m_pic->ir7_w(state); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( systick_w ) { m_write_systick(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( delay_w ) { m_write_delay(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( baud_w ) { m_write_baud(state); }
|
||||
|
||||
DECLARE_READ16_MEMBER( io_r );
|
||||
DECLARE_WRITE16_MEMBER( io_w );
|
||||
|
||||
@ -89,7 +80,11 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
private:
|
||||
required_device<pic8259_device> m_pic;
|
||||
required_device<pit8254_device> m_pit;
|
||||
|
||||
@ -99,6 +94,11 @@ protected:
|
||||
devcb_write_line m_write_systick;
|
||||
devcb_write_line m_write_delay;
|
||||
devcb_write_line m_write_baud;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( systick_w ) { m_write_systick(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( delay_w ) { m_write_delay(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( baud_w ) { m_write_baud(state); }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user