cdp1802: Eliminate devcb2 MCFG macros (nw)

This commit is contained in:
AJR 2018-08-17 19:30:01 -04:00
parent 7bbe476cc9
commit 6885e72f6c
13 changed files with 135 additions and 186 deletions

View File

@ -83,42 +83,6 @@
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_COSMAC_WAIT_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_wait_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_CLEAR_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_clear_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF1_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_ef1_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF2_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_ef2_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF3_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_ef3_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_EF4_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_ef4_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_Q_CALLBACK(_write) \
downcast<cosmac_device &>(*device).set_q_wr_callback(DEVCB_##_write);
#define MCFG_COSMAC_DMAR_CALLBACK(_read) \
downcast<cosmac_device &>(*device).set_dma_rd_callback(DEVCB_##_read);
#define MCFG_COSMAC_DMAW_CALLBACK(_write) \
downcast<cosmac_device &>(*device).set_dma_wr_callback(DEVCB_##_write);
#define MCFG_COSMAC_SC_CALLBACK(_write) \
downcast<cosmac_device &>(*device).set_sc_wr_callback(DEVCB_##_write);
//**************************************************************************
// ENUMERATIONS
//**************************************************************************
@ -204,17 +168,6 @@ public:
auto sc_cb() { return m_write_sc.bind(); }
auto tpb_cb() { return m_write_tpb.bind(); }
template <class Object> devcb_base &set_wait_rd_callback(Object &&cb) { return m_read_wait.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_clear_rd_callback(Object &&cb) { return m_read_clear.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ef1_rd_callback(Object &&cb) { return m_read_ef[0].set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ef2_rd_callback(Object &&cb) { return m_read_ef[1].set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ef3_rd_callback(Object &&cb) { return m_read_ef[2].set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ef4_rd_callback(Object &&cb) { return m_read_ef[3].set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_q_wr_callback(Object &&cb) { return m_write_q.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_rd_callback(Object &&cb) { return m_read_dma.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_wr_callback(Object &&cb) { return m_write_dma.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_sc_wr_callback(Object &&cb) { return m_write_sc.set_callback(std::forward<Object>(cb)); }
// public interfaces
offs_t get_memory_address();

View File

@ -508,18 +508,18 @@ QUICKLOAD_LOAD_MEMBER( cosmicos_state, cosmicos )
MACHINE_CONFIG_START(cosmicos_state::cosmicos)
/* basic machine hardware */
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(1'750'000))
MCFG_DEVICE_PROGRAM_MAP(cosmicos_mem)
MCFG_DEVICE_IO_MAP(cosmicos_io)
MCFG_COSMAC_WAIT_CALLBACK(READLINE(*this, cosmicos_state, wait_r))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, cosmicos_state, clear_r))
MCFG_COSMAC_EF1_CALLBACK(READLINE(*this, cosmicos_state, ef1_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, cosmicos_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, cosmicos_state, ef3_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, cosmicos_state, ef4_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, cosmicos_state, q_w))
MCFG_COSMAC_DMAR_CALLBACK(READ8(*this, cosmicos_state, dma_r))
MCFG_COSMAC_SC_CALLBACK(WRITE8(*this, cosmicos_state, sc_w))
CDP1802(config, m_maincpu, XTAL(1'750'000));
m_maincpu->set_addrmap(AS_PROGRAM, &cosmicos_state::cosmicos_mem);
m_maincpu->set_addrmap(AS_IO, &cosmicos_state::cosmicos_io);
m_maincpu->wait_cb().set(FUNC(cosmicos_state::wait_r));
m_maincpu->clear_cb().set(FUNC(cosmicos_state::clear_r));
m_maincpu->ef1_cb().set(FUNC(cosmicos_state::ef1_r));
m_maincpu->ef2_cb().set(FUNC(cosmicos_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(cosmicos_state::ef3_r));
m_maincpu->ef4_cb().set(FUNC(cosmicos_state::ef4_r));
m_maincpu->q_cb().set(FUNC(cosmicos_state::q_w));
m_maincpu->dma_rd_cb().set(FUNC(cosmicos_state::dma_r));
m_maincpu->sc_cb().set(FUNC(cosmicos_state::sc_w));
/* video hardware */
config.set_default_layout(layout_cosmicos);

View File

@ -237,16 +237,16 @@ QUICKLOAD_LOAD_MEMBER( elf2_state, elf )
MACHINE_CONFIG_START(elf2_state::elf2)
/* basic machine hardware */
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(3'579'545)/2)
MCFG_DEVICE_PROGRAM_MAP(elf2_mem)
MCFG_DEVICE_IO_MAP(elf2_io)
MCFG_COSMAC_WAIT_CALLBACK(READLINE(*this, elf2_state, wait_r))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, elf2_state, clear_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, elf2_state, ef4_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, elf2_state, q_w))
MCFG_COSMAC_DMAR_CALLBACK(READ8(*this, elf2_state, dma_r))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(CDP1861_TAG, cdp1861_device, dma_w))
MCFG_COSMAC_SC_CALLBACK(WRITE8(*this, elf2_state, sc_w))
CDP1802(config, m_maincpu, XTAL(3'579'545)/2);
m_maincpu->set_addrmap(AS_PROGRAM, &elf2_state::elf2_mem);
m_maincpu->set_addrmap(AS_IO, &elf2_state::elf2_io);
m_maincpu->wait_cb().set(FUNC(elf2_state::wait_r));
m_maincpu->clear_cb().set(FUNC(elf2_state::clear_r));
m_maincpu->ef4_cb().set(FUNC(elf2_state::ef4_r));
m_maincpu->q_cb().set(FUNC(elf2_state::q_w));
m_maincpu->dma_rd_cb().set(FUNC(elf2_state::dma_r));
m_maincpu->dma_wr_cb().set(m_vdc, FUNC(cdp1861_device::dma_w));
m_maincpu->sc_cb().set(FUNC(elf2_state::sc_w));
/* video hardware */
config.set_default_layout(layout_elf2);

View File

@ -308,15 +308,15 @@ QUICKLOAD_LOAD_MEMBER( eti660_state, eti660 )
MACHINE_CONFIG_START(eti660_state::eti660)
/* basic machine hardware */
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(8'867'238)/5)
MCFG_DEVICE_PROGRAM_MAP(mem_map)
MCFG_DEVICE_IO_MAP(io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, eti660_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, eti660_state, ef2_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, eti660_state, ef4_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, eti660_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(*this, eti660_state, dma_w))
CDP1802(config, m_maincpu, XTAL(8'867'238)/5);
m_maincpu->set_addrmap(AS_PROGRAM, &eti660_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &eti660_state::io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(eti660_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(eti660_state::ef2_r));
m_maincpu->ef4_cb().set(FUNC(eti660_state::ef4_r));
m_maincpu->q_cb().set(FUNC(eti660_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(eti660_state::dma_w));
/* video hardware */
MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL(8'867'238)/5)

View File

@ -120,20 +120,21 @@ static DEVICE_INPUT_DEFAULTS_START( serial_keyb )
DEVICE_INPUT_DEFAULTS_END
MACHINE_CONFIG_START(microkit_state::microkit)
void microkit_state::microkit(machine_config &config)
{
// basic machine hardware
MCFG_DEVICE_ADD("maincpu", CDP1802, 1750000)
MCFG_DEVICE_PROGRAM_MAP(microkit_mem)
MCFG_DEVICE_IO_MAP(microkit_io)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, microkit_state, clear_r))
CDP1802(config, m_maincpu, 1750000);
m_maincpu->set_addrmap(AS_PROGRAM, &microkit_state::microkit_mem);
m_maincpu->set_addrmap(AS_IO, &microkit_state::microkit_io);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(microkit_state::clear_r));
/* video hardware */
MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "keyboard")
MCFG_RS232_RXD_HANDLER(INPUTLINE("maincpu", COSMAC_INPUT_LINE_EF4))
MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("keyboard", serial_keyb)
MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MACHINE_CONFIG_END
RS232_PORT(config, m_rs232, default_rs232_devices, "keyboard");
m_rs232->rxd_handler().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF4);
m_rs232->set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(serial_keyb));
GENERIC_TERMINAL(config, m_terminal, 0);
}
ROM_START( microkit )
ROM_REGION( 0x200, "maincpu", ROMREGION_INVERT )

View File

@ -472,14 +472,14 @@ WRITE_LINE_MEMBER( play_1_state::clock_w )
MACHINE_CONFIG_START(play_1_state::play_1)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", CDP1802, 400000) // 2 gates, 1 cap, 1 resistor oscillating somewhere between 350 to 450 kHz
MCFG_DEVICE_PROGRAM_MAP(play_1_map)
MCFG_DEVICE_IO_MAP(play_1_io)
MCFG_COSMAC_WAIT_CALLBACK(READLINE(*this, play_1_state, wait_r))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, play_1_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, play_1_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, play_1_state, ef3_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, play_1_state, ef4_r))
CDP1802(config, m_maincpu, 400000); // 2 gates, 1 cap, 1 resistor oscillating somewhere between 350 to 450 kHz
m_maincpu->set_addrmap(AS_PROGRAM, &play_1_state::play_1_map);
m_maincpu->set_addrmap(AS_IO, &play_1_state::play_1_io);
m_maincpu->wait_cb().set(FUNC(play_1_state::wait_r));
m_maincpu->clear_cb().set(FUNC(play_1_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(play_1_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(play_1_state::ef3_r));
m_maincpu->ef4_cb().set(FUNC(play_1_state::ef4_r));
MCFG_NVRAM_ADD_0FILL("nvram")

View File

@ -508,11 +508,11 @@ MACHINE_CONFIG_START(play_3_state::play_3)
/* Sound */
genpin_audio(config);
MCFG_DEVICE_ADD("audiocpu", CDP1802, 3.579545_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(play_3_audio_map)
MCFG_DEVICE_IO_MAP(play_3_audio_io)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, play_3_state, clear_a_r))
CDP1802(config, m_audiocpu, 3.579545_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &play_3_state::play_3_audio_map);
m_maincpu->set_addrmap(AS_IO, &play_3_state::play_3_audio_io);
m_audiocpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(play_3_state::clear_a_r));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();

View File

@ -649,15 +649,15 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(studio2_state::studio2)
/* basic machine hardware */
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, 1760000) /* the real clock is derived from an oscillator circuit */
MCFG_DEVICE_PROGRAM_MAP(studio2_map)
MCFG_DEVICE_IO_MAP(studio2_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, studio2_state, clear_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, studio2_state, ef3_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, studio2_state, ef4_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, studio2_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(CDP1861_TAG, cdp1861_device, dma_w))
CDP1802(config, m_maincpu, 1760000); /* the real clock is derived from an oscillator circuit */
m_maincpu->set_addrmap(AS_PROGRAM, &studio2_state::studio2_map);
m_maincpu->set_addrmap(AS_IO, &studio2_state::studio2_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(studio2_state::clear_r));
m_maincpu->ef3_cb().set(FUNC(studio2_state::ef3_r));
m_maincpu->ef4_cb().set(FUNC(studio2_state::ef4_r));
m_maincpu->q_cb().set(FUNC(studio2_state::q_w));
m_maincpu->dma_wr_cb().set(m_vdc, FUNC(cdp1861_device::dma_w));
/* video hardware */
MCFG_DEVICE_ADD(CDP1861_TAG, CDP1861, 1760000)
@ -668,23 +668,22 @@ MACHINE_CONFIG_START(studio2_state::studio2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("beeper", BEEP, 300)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00);
studio2_cartslot(config);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(visicom_state::visicom)
/* basic machine hardware */
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(3'579'545)/2)
MCFG_DEVICE_PROGRAM_MAP(visicom_map)
MCFG_DEVICE_IO_MAP(visicom_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, visicom_state, clear_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, visicom_state, ef3_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, visicom_state, ef4_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, visicom_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(*this, visicom_state, dma_w))
CDP1802(config, m_maincpu, XTAL(3'579'545)/2);
m_maincpu->set_addrmap(AS_PROGRAM, &visicom_state::visicom_map);
m_maincpu->set_addrmap(AS_IO, &visicom_state::visicom_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(visicom_state::clear_r));
m_maincpu->ef3_cb().set(FUNC(visicom_state::ef3_r));
m_maincpu->ef4_cb().set(FUNC(visicom_state::ef4_r));
m_maincpu->q_cb().set(FUNC(visicom_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(visicom_state::dma_w));
/* video hardware */
MCFG_DEVICE_ADD(CDP1861_TAG, CDP1861, XTAL(3'579'545)/2)
@ -696,8 +695,7 @@ MACHINE_CONFIG_START(visicom_state::visicom)
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("beeper", BEEP, 300)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00);
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "visicom_cart")
MCFG_GENERIC_EXTENSIONS("bin,rom")
@ -708,15 +706,15 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(mpt02_state::mpt02)
/* basic machine hardware */
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, CDP1864_CLOCK)
MCFG_DEVICE_PROGRAM_MAP(mpt02_map)
MCFG_DEVICE_IO_MAP(mpt02_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, mpt02_state, clear_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, mpt02_state, ef3_r))
MCFG_COSMAC_EF4_CALLBACK(READLINE(*this, mpt02_state, ef4_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, mpt02_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(*this, mpt02_state, dma_w))
CDP1802(config, m_maincpu, CDP1864_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &mpt02_state::mpt02_map);
m_maincpu->set_addrmap(AS_IO, &mpt02_state::mpt02_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(mpt02_state::clear_r));
m_maincpu->ef3_cb().set(FUNC(mpt02_state::ef3_r));
m_maincpu->ef4_cb().set(FUNC(mpt02_state::ef4_r));
m_maincpu->q_cb().set(FUNC(mpt02_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(mpt02_state::dma_w));
/* video hardware */
MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, CDP1864_CLOCK)
@ -724,8 +722,7 @@ MACHINE_CONFIG_START(mpt02_state::mpt02)
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("beeper", BEEP, 300)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00);
MCFG_CDP1864_ADD(CDP1864_TAG, SCREEN_TAG, CDP1864_CLOCK, CONSTANT(0), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT), INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1), NOOP, READLINE(*this, mpt02_state, rdata_r), READLINE(*this, mpt02_state, bdata_r), READLINE(*this, mpt02_state, gdata_r))
MCFG_CDP1864_CHROMINANCE(RES_K(4.7), RES_K(8.2), RES_K(4.7), RES_K(22))

View File

@ -716,15 +716,15 @@ QUICKLOAD_LOAD_MEMBER( tmc1800_base_state, tmc1800 )
MACHINE_CONFIG_START(tmc1800_state::tmc1800)
// basic system hardware
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(1'750'000))
MCFG_DEVICE_PROGRAM_MAP(tmc1800_map)
MCFG_DEVICE_IO_MAP(tmc1800_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, tmc1800_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, tmc1800_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, tmc1800_state, ef3_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, tmc1800_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(CDP1861_TAG, cdp1861_device, dma_w))
CDP1802(config, m_maincpu, 1.75_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &tmc1800_state::tmc1800_map);
m_maincpu->set_addrmap(AS_IO, &tmc1800_state::tmc1800_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(tmc1800_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(tmc1800_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(tmc1800_state::ef3_r));
m_maincpu->q_cb().set(FUNC(tmc1800_state::q_w));
m_maincpu->dma_wr_cb().set(m_vdc, FUNC(cdp1861_device::dma_w));
// video hardware
tmc1800_video(config);
@ -732,8 +732,7 @@ MACHINE_CONFIG_START(tmc1800_state::tmc1800)
// sound hardware
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS, "mono", 0.25);
// devices
MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0)
@ -746,14 +745,14 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(osc1000b_state::osc1000b)
// basic system hardware
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(1'750'000))
MCFG_DEVICE_PROGRAM_MAP(osc1000b_map)
MCFG_DEVICE_IO_MAP(osc1000b_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, osc1000b_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, osc1000b_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, osc1000b_state, ef3_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, osc1000b_state, q_w))
CDP1802(config, m_maincpu, 1.75_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &osc1000b_state::osc1000b_map);
m_maincpu->set_addrmap(AS_IO, &osc1000b_state::osc1000b_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(osc1000b_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(osc1000b_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(osc1000b_state::ef3_r));
m_maincpu->q_cb().set(FUNC(osc1000b_state::q_w));
// video hardware
osc1000b_video(config);
@ -761,8 +760,7 @@ MACHINE_CONFIG_START(osc1000b_state::osc1000b)
// sound hardware
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS, "mono", 0.25);
// devices
MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0)
@ -775,15 +773,15 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(tmc2000_state::tmc2000)
// basic system hardware
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(1'750'000))
MCFG_DEVICE_PROGRAM_MAP(tmc2000_map)
MCFG_DEVICE_IO_MAP(tmc2000_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, tmc2000_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, tmc2000_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, tmc2000_state, ef3_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, tmc2000_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(*this, tmc2000_state, dma_w))
CDP1802(config, m_maincpu, 1.75_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &tmc2000_state::tmc2000_map);
m_maincpu->set_addrmap(AS_IO, &tmc2000_state::tmc2000_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(tmc2000_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(tmc2000_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(tmc2000_state::ef3_r));
m_maincpu->q_cb().set(FUNC(tmc2000_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(tmc2000_state::dma_w));
// video hardware
tmc2000_video(config);
@ -799,15 +797,15 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(nano_state::nano)
// basic system hardware
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(1'750'000))
MCFG_DEVICE_PROGRAM_MAP(nano_map)
MCFG_DEVICE_IO_MAP(nano_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, nano_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, nano_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, nano_state, ef3_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, nano_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(CDP1864_TAG, cdp1864_device, dma_w))
CDP1802(config, m_maincpu, 1.75_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &nano_state::nano_map);
m_maincpu->set_addrmap(AS_IO, &nano_state::nano_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(nano_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(nano_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(nano_state::ef3_r));
m_maincpu->q_cb().set(FUNC(nano_state::q_w));
m_maincpu->dma_wr_cb().set(m_cti, FUNC(cdp1864_device::dma_w));
// video hardware
nano_video(config);

View File

@ -282,15 +282,15 @@ void tmc2000e_state::machine_reset()
MACHINE_CONFIG_START(tmc2000e_state::tmc2000e)
// basic system hardware
MCFG_DEVICE_ADD(CDP1802_TAG, CDP1802, XTAL(1'750'000))
MCFG_DEVICE_PROGRAM_MAP(tmc2000e_map)
MCFG_DEVICE_IO_MAP(tmc2000e_io_map)
MCFG_COSMAC_WAIT_CALLBACK(CONSTANT(1))
MCFG_COSMAC_CLEAR_CALLBACK(READLINE(*this, tmc2000e_state, clear_r))
MCFG_COSMAC_EF2_CALLBACK(READLINE(*this, tmc2000e_state, ef2_r))
MCFG_COSMAC_EF3_CALLBACK(READLINE(*this, tmc2000e_state, ef3_r))
MCFG_COSMAC_Q_CALLBACK(WRITELINE(*this, tmc2000e_state, q_w))
MCFG_COSMAC_DMAW_CALLBACK(WRITE8(*this, tmc2000e_state, dma_w))
CDP1802(config, m_maincpu, 1.75_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &tmc2000e_state::tmc2000e_map);
m_maincpu->set_addrmap(AS_IO, &tmc2000e_state::tmc2000e_io_map);
m_maincpu->wait_cb().set_constant(1);
m_maincpu->clear_cb().set(FUNC(tmc2000e_state::clear_r));
m_maincpu->ef2_cb().set(FUNC(tmc2000e_state::ef2_r));
m_maincpu->ef3_cb().set(FUNC(tmc2000e_state::ef3_r));
m_maincpu->q_cb().set(FUNC(tmc2000e_state::q_w));
m_maincpu->dma_wr_cb().set(FUNC(tmc2000e_state::dma_w));
// video hardware
MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL(1'750'000))

View File

@ -63,7 +63,7 @@ private:
virtual void machine_start() override;
required_device<cpu_device> m_maincpu;
required_device<cosmac_device> m_maincpu;
required_device<cdp1861_device> m_vdc;
required_device<mm74c922_device> m_kb;
required_device<dm9368_device> m_led_l;

View File

@ -38,7 +38,7 @@ public:
DECLARE_QUICKLOAD_LOAD_MEMBER( tmc1800 );
protected:
required_device<cpu_device> m_maincpu;
required_device<cosmac_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
required_memory_region m_rom;
required_ioport m_run;

View File

@ -65,7 +65,7 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
required_device<cosmac_device> m_maincpu;
required_device<cdp1864_device> m_cti;
required_device<cassette_image_device> m_cassette;
required_shared_ptr<uint8_t> m_colorram;