mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
change some more device_mconfig_additions to device_add_mconfig (nw)
This commit is contained in:
parent
aaed83a91f
commit
57d1c36ead
@ -85,21 +85,6 @@
|
|||||||
|
|
||||||
DEFINE_DEVICE_TYPE(A2BUS_MOUSE, a2bus_mouse_device, "a2mouse", "Apple II Mouse Card")
|
DEFINE_DEVICE_TYPE(A2BUS_MOUSE, a2bus_mouse_device, "a2mouse", "Apple II Mouse Card")
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( mouse )
|
|
||||||
MCFG_CPU_ADD(MOUSE_MCU_TAG, M68705P3, 2043600)
|
|
||||||
MCFG_M68705_PORTA_R_CB(READ8(a2bus_mouse_device, mcu_port_a_r))
|
|
||||||
MCFG_M68705_PORTB_R_CB(READ8(a2bus_mouse_device, mcu_port_b_r))
|
|
||||||
MCFG_M68705_PORTA_W_CB(WRITE8(a2bus_mouse_device, mcu_port_a_w))
|
|
||||||
MCFG_M68705_PORTB_W_CB(WRITE8(a2bus_mouse_device, mcu_port_b_w))
|
|
||||||
MCFG_M68705_PORTC_W_CB(WRITE8(a2bus_mouse_device, mcu_port_c_w))
|
|
||||||
|
|
||||||
MCFG_DEVICE_ADD(MOUSE_PIA_TAG, PIA6821, 1021800)
|
|
||||||
MCFG_PIA_WRITEPA_HANDLER(WRITE8(a2bus_mouse_device, pia_out_a))
|
|
||||||
MCFG_PIA_WRITEPB_HANDLER(WRITE8(a2bus_mouse_device, pia_out_b))
|
|
||||||
MCFG_PIA_IRQA_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqa_w))
|
|
||||||
MCFG_PIA_IRQB_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqb_w))
|
|
||||||
MACHINE_CONFIG_END
|
|
||||||
|
|
||||||
ROM_START( mouse )
|
ROM_START( mouse )
|
||||||
ROM_REGION(0x800, MOUSE_ROM_REGION, 0)
|
ROM_REGION(0x800, MOUSE_ROM_REGION, 0)
|
||||||
ROM_LOAD( "341-0270-c.4b", 0x000000, 0x000800, CRC(0bcd1e8e) SHA1(3a9d881a8a8d30f55b9719aceebbcf717f829d6f) )
|
ROM_LOAD( "341-0270-c.4b", 0x000000, 0x000800, CRC(0bcd1e8e) SHA1(3a9d881a8a8d30f55b9719aceebbcf717f829d6f) )
|
||||||
@ -138,14 +123,24 @@ ioport_constructor a2bus_mouse_device::device_input_ports() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
machine_config_additions - device-specific
|
device_add_mconfig - device-specific
|
||||||
machine configurations
|
machine configurations
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
|
|
||||||
machine_config_constructor a2bus_mouse_device::device_mconfig_additions() const
|
MACHINE_CONFIG_MEMBER(a2bus_mouse_device::device_add_mconfig)
|
||||||
{
|
MCFG_CPU_ADD(MOUSE_MCU_TAG, M68705P3, 2043600)
|
||||||
return MACHINE_CONFIG_NAME(mouse);
|
MCFG_M68705_PORTA_R_CB(READ8(a2bus_mouse_device, mcu_port_a_r))
|
||||||
}
|
MCFG_M68705_PORTB_R_CB(READ8(a2bus_mouse_device, mcu_port_b_r))
|
||||||
|
MCFG_M68705_PORTA_W_CB(WRITE8(a2bus_mouse_device, mcu_port_a_w))
|
||||||
|
MCFG_M68705_PORTB_W_CB(WRITE8(a2bus_mouse_device, mcu_port_b_w))
|
||||||
|
MCFG_M68705_PORTC_W_CB(WRITE8(a2bus_mouse_device, mcu_port_c_w))
|
||||||
|
|
||||||
|
MCFG_DEVICE_ADD(MOUSE_PIA_TAG, PIA6821, 1021800)
|
||||||
|
MCFG_PIA_WRITEPA_HANDLER(WRITE8(a2bus_mouse_device, pia_out_a))
|
||||||
|
MCFG_PIA_WRITEPB_HANDLER(WRITE8(a2bus_mouse_device, pia_out_b))
|
||||||
|
MCFG_PIA_IRQA_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqa_w))
|
||||||
|
MCFG_PIA_IRQB_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqb_w))
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
rom_region - device-specific ROM region
|
rom_region - device-specific ROM region
|
||||||
|
@ -30,10 +30,21 @@ public:
|
|||||||
a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
// optional information overrides
|
// optional information overrides
|
||||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
|
||||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||||
virtual ioport_constructor device_input_ports() const override;
|
virtual ioport_constructor device_input_ports() const override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
|
virtual void device_add_mconfig(machine_config &config) override;
|
||||||
|
virtual void device_start() override;
|
||||||
|
virtual void device_reset() override;
|
||||||
|
|
||||||
|
// overrides of standard a2bus slot functions
|
||||||
|
virtual uint8_t read_c0nx(address_space &space, uint8_t offset) override;
|
||||||
|
virtual void write_c0nx(address_space &space, uint8_t offset, uint8_t data) override;
|
||||||
|
virtual uint8_t read_cnxx(address_space &space, uint8_t offset) override;
|
||||||
|
|
||||||
DECLARE_WRITE8_MEMBER(pia_out_a);
|
DECLARE_WRITE8_MEMBER(pia_out_a);
|
||||||
DECLARE_WRITE8_MEMBER(pia_out_b);
|
DECLARE_WRITE8_MEMBER(pia_out_b);
|
||||||
DECLARE_WRITE_LINE_MEMBER(pia_irqa_w);
|
DECLARE_WRITE_LINE_MEMBER(pia_irqa_w);
|
||||||
@ -45,17 +56,6 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(mcu_port_b_w);
|
DECLARE_WRITE8_MEMBER(mcu_port_b_w);
|
||||||
DECLARE_WRITE8_MEMBER(mcu_port_c_w);
|
DECLARE_WRITE8_MEMBER(mcu_port_c_w);
|
||||||
|
|
||||||
protected:
|
|
||||||
a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
|
||||||
|
|
||||||
virtual void device_start() override;
|
|
||||||
virtual void device_reset() override;
|
|
||||||
|
|
||||||
// overrides of standard a2bus slot functions
|
|
||||||
virtual uint8_t read_c0nx(address_space &space, uint8_t offset) override;
|
|
||||||
virtual void write_c0nx(address_space &space, uint8_t offset, uint8_t data) override;
|
|
||||||
virtual uint8_t read_cnxx(address_space &space, uint8_t offset) override;
|
|
||||||
|
|
||||||
required_device<pia6821_device> m_pia;
|
required_device<pia6821_device> m_pia;
|
||||||
required_device<m68705p_device> m_mcu;
|
required_device<m68705p_device> m_mcu;
|
||||||
required_ioport m_mouseb;
|
required_ioport m_mouseb;
|
||||||
|
@ -49,17 +49,6 @@ INPUT_PORTS_START(a1200_us_keyboard)
|
|||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
MACHINE_CONFIG_START(a1200kbd_revB)
|
|
||||||
MCFG_CPU_ADD("mpu", M68HC705C8A, XTAL_3MHz)
|
|
||||||
MCFG_M68HC05_PORTB_R_CB(READ8(a1200_kbd_device, mpu_portb_r));
|
|
||||||
MCFG_M68HC05_PORTD_R_CB(IOPORT("MOD"));
|
|
||||||
MCFG_M68HC05_PORTA_W_CB(WRITE8(a1200_kbd_device, mpu_porta_w));
|
|
||||||
MCFG_M68HC05_PORTB_W_CB(WRITE8(a1200_kbd_device, mpu_portb_w));
|
|
||||||
MCFG_M68HC05_PORTC_W_CB(WRITE8(a1200_kbd_device, mpu_portc_w));
|
|
||||||
MCFG_M68HC05_TCMP_CB(WRITELINE(a1200_kbd_device, mpu_tcmp));
|
|
||||||
MACHINE_CONFIG_END
|
|
||||||
|
|
||||||
|
|
||||||
ROM_START(a1200kbd_revB)
|
ROM_START(a1200kbd_revB)
|
||||||
ROM_REGION(0x2000, "mpu", 0)
|
ROM_REGION(0x2000, "mpu", 0)
|
||||||
ROM_LOAD("DFA_Rev_B_A1200_HC705.bin", 0x0000, 0x2000, CRC(2a77eec4) SHA1(301ec6a69404457d912c89e3fc54095eda9f0e93))
|
ROM_LOAD("DFA_Rev_B_A1200_HC705.bin", 0x0000, 0x2000, CRC(2a77eec4) SHA1(301ec6a69404457d912c89e3fc54095eda9f0e93))
|
||||||
@ -137,10 +126,15 @@ WRITE_LINE_MEMBER(a1200_kbd_device::mpu_tcmp)
|
|||||||
m_host->krst_w(state);
|
m_host->krst_w(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
machine_config_constructor a1200_kbd_device::device_mconfig_additions() const
|
MACHINE_CONFIG_MEMBER(a1200_kbd_device::device_add_mconfig)
|
||||||
{
|
MCFG_CPU_ADD("mpu", M68HC705C8A, XTAL_3MHz)
|
||||||
return MACHINE_CONFIG_NAME(a1200kbd_revB);
|
MCFG_M68HC05_PORTB_R_CB(READ8(a1200_kbd_device, mpu_portb_r));
|
||||||
}
|
MCFG_M68HC05_PORTD_R_CB(IOPORT("MOD"));
|
||||||
|
MCFG_M68HC05_PORTA_W_CB(WRITE8(a1200_kbd_device, mpu_porta_w));
|
||||||
|
MCFG_M68HC05_PORTB_W_CB(WRITE8(a1200_kbd_device, mpu_portb_w));
|
||||||
|
MCFG_M68HC05_PORTC_W_CB(WRITE8(a1200_kbd_device, mpu_portc_w));
|
||||||
|
MCFG_M68HC05_TCMP_CB(WRITELINE(a1200_kbd_device, mpu_tcmp));
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
const tiny_rom_entry *a1200_kbd_device::device_rom_region() const
|
const tiny_rom_entry *a1200_kbd_device::device_rom_region() const
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,7 @@ public:
|
|||||||
// from host
|
// from host
|
||||||
virtual DECLARE_WRITE_LINE_MEMBER(kdat_w) override;
|
virtual DECLARE_WRITE_LINE_MEMBER(kdat_w) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
// MPU I/O
|
// MPU I/O
|
||||||
DECLARE_READ8_MEMBER(mpu_portb_r);
|
DECLARE_READ8_MEMBER(mpu_portb_r);
|
||||||
DECLARE_WRITE8_MEMBER(mpu_porta_w);
|
DECLARE_WRITE8_MEMBER(mpu_porta_w);
|
||||||
@ -38,9 +39,8 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(mpu_portc_w);
|
DECLARE_WRITE8_MEMBER(mpu_portc_w);
|
||||||
DECLARE_WRITE_LINE_MEMBER(mpu_tcmp);
|
DECLARE_WRITE_LINE_MEMBER(mpu_tcmp);
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||||
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 ioport_constructor device_input_ports() const override;
|
||||||
|
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
@ -58,11 +58,6 @@ ADDRESS_MAP_START( mpu6500_map, AS_PROGRAM, 8, a500_kbd_device )
|
|||||||
AM_RANGE(0x800, 0xfff) AM_ROM AM_REGION("ic1", 0)
|
AM_RANGE(0x800, 0xfff) AM_ROM AM_REGION("ic1", 0)
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
MACHINE_CONFIG_START( kbd_pcb )
|
|
||||||
MCFG_CPU_ADD("ic1", M6502, XTAL_3MHz / 2)
|
|
||||||
MCFG_CPU_PROGRAM_MAP(mpu6500_map)
|
|
||||||
MACHINE_CONFIG_END
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// rom_region - device-specific ROM region
|
// rom_region - device-specific ROM region
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -141,10 +136,10 @@ INPUT_PORTS_END
|
|||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
machine_config_constructor a500_kbd_device::device_mconfig_additions() const
|
MACHINE_CONFIG_MEMBER(a500_kbd_device::device_add_mconfig)
|
||||||
{
|
MCFG_CPU_ADD("ic1", M6502, XTAL_3MHz / 2)
|
||||||
return MACHINE_CONFIG_NAME(kbd_pcb);
|
MCFG_CPU_PROGRAM_MAP(mpu6500_map)
|
||||||
}
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
const tiny_rom_entry *a500_kbd_device::device_rom_region() const
|
const tiny_rom_entry *a500_kbd_device::device_rom_region() const
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ protected:
|
|||||||
|
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||||
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_start() override;
|
||||||
virtual void device_reset() override;
|
virtual void device_reset() override;
|
||||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user