From 2032792ba3ab89e9b8bfbd718a134ac278eb15b9 Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Fri, 7 Dec 2018 11:32:05 +0100 Subject: -tms1xxx: Removed MCFG macros. -eva.cpp: Refactored into subclasses. nw --- src/devices/cpu/cop400/cop400.h | 11 + src/devices/cpu/tms1000/tms0270.cpp | 15 +- src/devices/cpu/tms1000/tms0270.h | 19 +- src/devices/cpu/tms1000/tms0970.cpp | 33 +- src/devices/cpu/tms1000/tms0980.cpp | 33 +- src/devices/cpu/tms1000/tms1000.cpp | 12 +- src/devices/cpu/tms1000/tms1000c.cpp | 12 +- src/devices/cpu/tms1000/tms1400.cpp | 12 +- src/devices/cpu/tms1000/tms1k_base.h | 40 +-- src/devices/cpu/tms1000/tp0320.cpp | 12 +- src/devices/machine/pla.h | 7 + src/devices/sound/tms5110.h | 5 + src/mame/drivers/eva.cpp | 155 +++++----- src/mame/drivers/hh_tms1k.cpp | 580 +++++++++++++++++------------------ src/mame/drivers/microvsn.cpp | 10 +- src/mame/drivers/ticalc1x.cpp | 102 +++--- src/mame/drivers/tispeak.cpp | 49 ++- src/mame/drivers/tispellb.cpp | 34 +- 18 files changed, 561 insertions(+), 580 deletions(-) diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h index 3fa806d2b06..383b89372a1 100644 --- a/src/devices/cpu/cop400/cop400.h +++ b/src/devices/cpu/cop400/cop400.h @@ -134,6 +134,17 @@ public: template devcb_base &set_write_so_callback(Object &&cb) { return m_write_so.set_callback(std::forward(cb)); } template devcb_base &set_write_sk_callback(Object &&cb) { return m_write_sk.set_callback(std::forward(cb)); } template devcb_base &set_read_cko_callback(Object &&cb) { return m_read_cko.set_callback(std::forward(cb)); } + auto read_l() { return m_read_l.bind(); } + auto read_l_tristate() { return m_read_l_tristate.bind(); } + auto write_l() { return m_write_l.bind(); } + auto read_g() { return m_read_g.bind(); } + auto write_g() { return m_write_g.bind(); } + auto write_d() { return m_write_d.bind(); } + auto read_in() { return m_read_in.bind(); } + auto read_si() { return m_read_si.bind(); } + auto write_so() { return m_write_so.bind(); } + auto write_sk() { return m_write_sk.bind(); } + auto read_cko() { return m_read_cko.bind(); } void set_config(cop400_cki_bond cki, cop400_cko_bond cko, bool has_microbus) { diff --git a/src/devices/cpu/tms1000/tms0270.cpp b/src/devices/cpu/tms1000/tms0270.cpp index 99cbd496590..5d1eb2b14d1 100644 --- a/src/devices/cpu/tms1000/tms0270.cpp +++ b/src/devices/cpu/tms1000/tms0270.cpp @@ -32,16 +32,13 @@ tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char // machine configs -MACHINE_CONFIG_START(tms0270_cpu_device::device_add_mconfig) - +void tms0270_cpu_device::device_add_mconfig(machine_config &config) +{ // main opcodes PLA, microinstructions PLA, output PLA - MCFG_PLA_ADD("ipla", 9, 22, 24) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("mpla", 6, 22, 64) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 6, 16, 48) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "ipla", 9, 22, 24).set_format(pla_device::FMT::BERKELEY); + PLA(config, "mpla", 6, 22, 64).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 6, 16, 48).set_format(pla_device::FMT::BERKELEY); +} // device_start/reset diff --git a/src/devices/cpu/tms1000/tms0270.h b/src/devices/cpu/tms1000/tms0270.h index d0947e5bc47..3043119e2aa 100644 --- a/src/devices/cpu/tms1000/tms0270.h +++ b/src/devices/cpu/tms1000/tms0270.h @@ -14,26 +14,15 @@ #include "tms0980.h" -// TMS0270 was designed to interface with TMS5100, set it up at driver level -#define MCFG_TMS0270_READ_CTL_CB(_devcb) \ - downcast(*device).set_read_ctl_callback(DEVCB_##_devcb); - -#define MCFG_TMS0270_WRITE_CTL_CB(_devcb) \ - downcast(*device).set_write_ctl_callback(DEVCB_##_devcb); - -#define MCFG_TMS0270_WRITE_PDC_CB(_devcb) \ - downcast(*device).set_write_pdc_callback(DEVCB_##_devcb); - - class tms0270_cpu_device : public tms0980_cpu_device { public: tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - // configuration helpers - template devcb_base &set_read_ctl_callback(Object &&cb) { return m_read_ctl.set_callback(std::forward(cb)); } - template devcb_base &set_write_ctl_callback(Object &&cb) { return m_write_ctl.set_callback(std::forward(cb)); } - template devcb_base &set_write_pdc_callback(Object &&cb) { return m_write_pdc.set_callback(std::forward(cb)); } + // TMS0270 was designed to interface with TMS5100, set it up at driver level + auto read_ctl() { return m_read_ctl.bind(); } + auto write_ctl() { return m_write_ctl.bind(); } + auto write_pdc() { return m_write_pdc.bind(); } protected: // overrides diff --git a/src/devices/cpu/tms1000/tms0970.cpp b/src/devices/cpu/tms1000/tms0970.cpp index e401f2cd323..be7a1c717f8 100644 --- a/src/devices/cpu/tms1000/tms0970.cpp +++ b/src/devices/cpu/tms1000/tms0970.cpp @@ -48,29 +48,22 @@ tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char // machine configs -MACHINE_CONFIG_START(tms0950_cpu_device::device_add_mconfig) - +void tms0950_cpu_device::device_add_mconfig(machine_config &config) +{ // microinstructions PLA, output PLA, segment PLA - MCFG_PLA_ADD("mpla", 8, 16, 30) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 4, 8, 10) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("spla", 3, 8, 8) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(tms0970_cpu_device::device_add_mconfig) + PLA(config, "mpla", 8, 16, 30).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 4, 8, 10).set_format(pla_device::FMT::BERKELEY); + PLA(config, "spla", 3, 8, 8).set_format(pla_device::FMT::BERKELEY); +} +void tms0970_cpu_device::device_add_mconfig(machine_config &config) +{ // main opcodes PLA, microinstructions PLA, output PLA, segment PLA - MCFG_PLA_ADD("ipla", 8, 15, 18) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("mpla", 5, 15, 32) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 4, 8, 16) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("spla", 3, 8, 8) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "ipla", 8, 15, 18).set_format(pla_device::FMT::BERKELEY); + PLA(config, "mpla", 5, 15, 32).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 4, 8, 16).set_format(pla_device::FMT::BERKELEY); + PLA(config, "spla", 3, 8, 8).set_format(pla_device::FMT::BERKELEY); +} // device_reset diff --git a/src/devices/cpu/tms1000/tms0980.cpp b/src/devices/cpu/tms1000/tms0980.cpp index 3140c7ca517..8521505d585 100644 --- a/src/devices/cpu/tms1000/tms0980.cpp +++ b/src/devices/cpu/tms1000/tms0980.cpp @@ -61,29 +61,22 @@ tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char // machine configs -MACHINE_CONFIG_START(tms0980_cpu_device::device_add_mconfig) - +void tms0980_cpu_device::device_add_mconfig(machine_config &config) +{ // main opcodes PLA, microinstructions PLA, output PLA, segment PLA - MCFG_PLA_ADD("ipla", 9, 22, 24) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("mpla", 6, 20, 64) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 4, 8, 16) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("spla", 3, 8, 8) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(tms1980_cpu_device::device_add_mconfig) + PLA(config, "ipla", 9, 22, 24).set_format(pla_device::FMT::BERKELEY); + PLA(config, "mpla", 6, 20, 64).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 4, 8, 16).set_format(pla_device::FMT::BERKELEY); + PLA(config, "spla", 3, 8, 8).set_format(pla_device::FMT::BERKELEY); +} +void tms1980_cpu_device::device_add_mconfig(machine_config &config) +{ // main opcodes PLA, microinstructions PLA, output PLA - MCFG_PLA_ADD("ipla", 9, 22, 24) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("mpla", 6, 22, 64) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 5, 7, 32) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "ipla", 9, 22, 24).set_format(pla_device::FMT::BERKELEY); + PLA(config, "mpla", 6, 22, 64).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 5, 7, 32).set_format(pla_device::FMT::BERKELEY); +} // disasm diff --git a/src/devices/cpu/tms1000/tms1000.cpp b/src/devices/cpu/tms1000/tms1000.cpp index d9455fe5bc3..f99aacc637f 100644 --- a/src/devices/cpu/tms1000/tms1000.cpp +++ b/src/devices/cpu/tms1000/tms1000.cpp @@ -107,14 +107,12 @@ mc141200_cpu_device::mc141200_cpu_device(const machine_config &mconfig, const ch // machine configs -MACHINE_CONFIG_START(tms1000_cpu_device::device_add_mconfig) - +void tms1000_cpu_device::device_add_mconfig(machine_config &config) +{ // microinstructions PLA, output PLA - MCFG_PLA_ADD("mpla", 8, 16, 30) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 5, 8, 20) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "mpla", 8, 16, 30).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 5, 8, 20).set_format(pla_device::FMT::BERKELEY); +} // disasm diff --git a/src/devices/cpu/tms1000/tms1000c.cpp b/src/devices/cpu/tms1000/tms1000c.cpp index d83e822be44..defc8482eef 100644 --- a/src/devices/cpu/tms1000/tms1000c.cpp +++ b/src/devices/cpu/tms1000/tms1000c.cpp @@ -31,14 +31,12 @@ tms1000c_cpu_device::tms1000c_cpu_device(const machine_config &mconfig, const ch // machine configs -MACHINE_CONFIG_START(tms1000c_cpu_device::device_add_mconfig) - +void tms1000c_cpu_device::device_add_mconfig(machine_config &config) +{ // microinstructions PLA, output PLA - MCFG_PLA_ADD("mpla", 8, 16, 32) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 5, 8, 32) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "mpla", 8, 16, 32).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 5, 8, 32).set_format(pla_device::FMT::BERKELEY); +} // microinstructions decode (different order, no active-negative) diff --git a/src/devices/cpu/tms1000/tms1400.cpp b/src/devices/cpu/tms1000/tms1400.cpp index 67effbe3ad0..31da9295f48 100644 --- a/src/devices/cpu/tms1000/tms1400.cpp +++ b/src/devices/cpu/tms1000/tms1400.cpp @@ -67,14 +67,12 @@ tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char // machine configs -MACHINE_CONFIG_START(tms1400_cpu_device::device_add_mconfig) - +void tms1400_cpu_device::device_add_mconfig(machine_config &config) +{ // microinstructions PLA, output PLA - MCFG_PLA_ADD("mpla", 8, 16, 30) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("opla", 5, 8, 32) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "mpla", 8, 16, 30).set_format(pla_device::FMT::BERKELEY); + PLA(config, "opla", 5, 8, 32).set_format(pla_device::FMT::BERKELEY); +} // device_reset diff --git a/src/devices/cpu/tms1000/tms1k_base.h b/src/devices/cpu/tms1000/tms1k_base.h index 481e9ad0d49..7a394b8dfbb 100644 --- a/src/devices/cpu/tms1000/tms1k_base.h +++ b/src/devices/cpu/tms1000/tms1k_base.h @@ -17,27 +17,6 @@ #include "machine/pla.h" -// K input pins -#define MCFG_TMS1XXX_READ_K_CB(_devcb) \ - downcast(*device).set_read_k_callback(DEVCB_##_devcb); - -// O/Segment output pins -#define MCFG_TMS1XXX_WRITE_O_CB(_devcb) \ - downcast(*device).set_write_o_callback(DEVCB_##_devcb); - -// Use this if the output PLA is unknown: -// If the microinstructions (or other) PLA is unknown, try using one from another romset. -#define MCFG_TMS1XXX_OUTPUT_PLA(_pla) \ - downcast(*device).set_output_pla(_pla); - -// R output pins (also called D on some chips) -#define MCFG_TMS1XXX_WRITE_R_CB(_devcb) \ - downcast(*device).set_write_r_callback(DEVCB_##_devcb); - -// OFF request on TMS0980 and up -#define MCFG_TMS1XXX_POWER_OFF_CB(_devcb) \ - downcast(*device).set_power_off_callback(DEVCB_##_devcb); - // HALT input pin on CMOS chips (use set_input_line) #define TMS1XXX_INPUT_LINE_HALT 0 @@ -87,11 +66,20 @@ class tms1k_base_device : public cpu_device { public: - // configuration helpers - template devcb_base &set_read_k_callback(Object &&cb) { return m_read_k.set_callback(std::forward(cb)); } - template devcb_base &set_write_o_callback(Object &&cb) { return m_write_o.set_callback(std::forward(cb)); } - template devcb_base &set_write_r_callback(Object &&cb) { return m_write_r.set_callback(std::forward(cb)); } - template devcb_base &set_power_off_callback(Object &&cb) { return m_power_off.set_callback(std::forward(cb)); } + // K input pins + auto k() { return m_read_k.bind(); } + + // O/Segment output pins + auto o() { return m_write_o.bind(); } + + // R output pins (also called D on some chips) + auto r() { return m_write_r.bind(); } + + // OFF request on TMS0980 and up + auto power_off() { return m_power_off.bind(); } + + // Use this if the output PLA is unknown: + // If the microinstructions (or other) PLA is unknown, try using one from another romset. void set_output_pla(const u16 *output_pla) { m_output_pla_table = output_pla; } u8 debug_peek_o_index() { return m_o_index; } // get output PLA index, for debugging (don't use in emulation) diff --git a/src/devices/cpu/tms1000/tp0320.cpp b/src/devices/cpu/tms1000/tp0320.cpp index 62ca7072ab2..57c53b240fd 100644 --- a/src/devices/cpu/tms1000/tp0320.cpp +++ b/src/devices/cpu/tms1000/tp0320.cpp @@ -42,14 +42,12 @@ tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char * // machine configs -MACHINE_CONFIG_START(tp0320_cpu_device::device_add_mconfig) - +void tp0320_cpu_device::device_add_mconfig(machine_config &config) +{ // main opcodes PLA(partial), microinstructions PLA - MCFG_PLA_ADD("ipla", 9, 6, 8) - MCFG_PLA_FILEFORMAT(BERKELEY) - MCFG_PLA_ADD("mpla", 6, 22, 64) - MCFG_PLA_FILEFORMAT(BERKELEY) -MACHINE_CONFIG_END + PLA(config, "ipla", 9, 6, 8).set_format(pla_device::FMT::BERKELEY); + PLA(config, "mpla", 6, 22, 64).set_format(pla_device::FMT::BERKELEY); +} // disasm diff --git a/src/devices/machine/pla.h b/src/devices/machine/pla.h index 0d3fef80cc0..b6cfeb42eb8 100644 --- a/src/devices/machine/pla.h +++ b/src/devices/machine/pla.h @@ -76,6 +76,13 @@ public: // construction/destruction pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t inputs, uint32_t outputs, uint32_t terms) + : pla_device(mconfig, tag, owner, (uint32_t)0) + { + set_num_inputs(inputs); + set_num_outputs(outputs); + set_num_terms(terms); + } // configuration helpers void set_num_inputs(uint32_t i) { m_inputs = i; } diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h index b4a5a48d68d..4857326b697 100644 --- a/src/devices/sound/tms5110.h +++ b/src/devices/sound/tms5110.h @@ -56,6 +56,11 @@ public: template devcb_base &set_addr_callback(Object &&cb) { return m_addr_cb.set_callback(std::forward(cb)); } template devcb_base &set_data_callback(Object &&cb) { return m_data_cb.set_callback(std::forward(cb)); } template devcb_base &set_romclk_callback(Object &&cb) { return m_romclk_cb.set_callback(std::forward(cb)); } + auto m0() { return m_m0_cb.bind(); } + auto m1() { return m_m1_cb.bind(); } + auto addr() { return m_addr_cb.bind(); } + auto data() { return m_data_cb.bind(); } + auto romclk() { return m_romclk_cb.bind(); } DECLARE_WRITE8_MEMBER( ctl_w ); DECLARE_READ8_MEMBER( ctl_r ); diff --git a/src/mame/drivers/eva.cpp b/src/mame/drivers/eva.cpp index eca2245ce3d..a1352be716f 100644 --- a/src/mame/drivers/eva.cpp +++ b/src/mame/drivers/eva.cpp @@ -29,46 +29,66 @@ #include "speaker.h" -class eva_state : public driver_device +class eva_base_state : public driver_device { public: - eva_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_tms5100(*this, "tms5100"), - m_tms6100(*this, "tms6100") + eva_base_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_tms5100(*this, "tms5100") + , m_tms6100(*this, "tms6100") { } - void tms5110_route(machine_config &config); - void eva11(machine_config &config); - void eva24(machine_config &config); + void eva_sound(machine_config &config); -private: +protected: // devices - required_device m_maincpu; required_device m_tms5100; required_device m_tms6100; +}; - // EVA-24 - DECLARE_READ8_MEMBER(eva24_read_g); - DECLARE_WRITE8_MEMBER(eva24_write_g); - DECLARE_WRITE8_MEMBER(eva24_write_d); +class eva11_state : public eva_base_state +{ +public: + eva11_state(const machine_config &mconfig, device_type type, const char *tag) + : eva_base_state(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + { } - u8 m_g; + void eva(machine_config &config); - // EVA-11 - DECLARE_READ8_MEMBER(eva11_read_k); - DECLARE_WRITE16_MEMBER(eva11_write_o); - DECLARE_WRITE16_MEMBER(eva11_write_r); +private: + // devices + required_device m_maincpu; - virtual void machine_start() override; - virtual void machine_reset() override; + DECLARE_READ8_MEMBER(read_k); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_WRITE16_MEMBER(write_r); }; +class eva24_state : public eva_base_state +{ +public: + eva24_state(const machine_config &mconfig, device_type type, const char *tag) + : eva_base_state(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + { } + + void eva(machine_config &config); + +private: + virtual void machine_start() override; -// machine start/reset + // devices + required_device m_maincpu; + + DECLARE_READ8_MEMBER(read_g); + DECLARE_WRITE8_MEMBER(write_g); + DECLARE_WRITE8_MEMBER(write_d); + + u8 m_g; +}; -void eva_state::machine_start() +void eva24_state::machine_start() { // zerofill m_g = 0; @@ -77,10 +97,6 @@ void eva_state::machine_start() save_item(NAME(m_g)); } -void eva_state::machine_reset() -{ -} - /*************************************************************************** @@ -91,19 +107,19 @@ void eva_state::machine_reset() // EVA-24 -WRITE8_MEMBER(eva_state::eva24_write_g) +WRITE8_MEMBER(eva24_state::write_g) { // G3: TMS5100 PDC pin m_tms5100->pdc_w(data >> 3 & 1); m_g = data; } -READ8_MEMBER(eva_state::eva24_read_g) +READ8_MEMBER(eva24_state::read_g) { return m_g; } -WRITE8_MEMBER(eva_state::eva24_write_d) +WRITE8_MEMBER(eva24_state::write_d) { // D3210: TMS5100 CTL8421 m_tms5100->ctl_w(space, 0, data & 0xf); @@ -112,19 +128,19 @@ WRITE8_MEMBER(eva_state::eva24_write_d) // EVA-11 -WRITE16_MEMBER(eva_state::eva11_write_r) +WRITE16_MEMBER(eva11_state::write_r) { // R7: TMS5100 PDC pin m_tms5100->pdc_w(data >> 7 & 1); } -WRITE16_MEMBER(eva_state::eva11_write_o) +WRITE16_MEMBER(eva11_state::write_o) { // O3210: TMS5100 CTL8421 m_tms5100->ctl_w(space, 0, data & 0xf); } -READ8_MEMBER(eva_state::eva11_read_k) +READ8_MEMBER(eva11_state::read_k) { // K84: TMS5100 CTL81(O30) u8 ctl = m_tms5100->ctl_r(space, 0); @@ -157,50 +173,43 @@ INPUT_PORTS_END ***************************************************************************/ -MACHINE_CONFIG_START(eva_state::tms5110_route) - - /* sound hardware */ - MCFG_DEVICE_MODIFY("tms5100") - MCFG_TMS5110_M0_CB(WRITELINE(m_tms6100, tms6100_device, m0_w)) - MCFG_TMS5110_M1_CB(WRITELINE(m_tms6100, tms6100_device, m1_w)) - MCFG_TMS5110_ADDR_CB(WRITE8(m_tms6100, tms6100_device, add_w)) - MCFG_TMS5110_DATA_CB(READLINE(m_tms6100, tms6100_device, data_line_r)) - MCFG_TMS5110_ROMCLK_CB(WRITELINE(m_tms6100, tms6100_device, clk_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(eva_state::eva24) - - /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", COP420, 640_kHz_XTAL/2) // guessed - MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed - MCFG_COP400_WRITE_D_CB(WRITE8(*this, eva_state, eva24_write_d)) - MCFG_COP400_WRITE_G_CB(WRITE8(*this, eva_state, eva24_write_g)) - MCFG_COP400_READ_G_CB(READ8(*this, eva_state, eva24_read_g)) - +void eva_base_state::eva_sound(machine_config &config) +{ /* sound hardware */ TMS6100(config, m_tms6100, 640_kHz_XTAL/4); SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("tms5100", TMS5110A, 640_kHz_XTAL) - tms5110_route(config); -MACHINE_CONFIG_END - -MACHINE_CONFIG_START(eva_state::eva11) + TMS5110A(config, m_tms5100, 640_kHz_XTAL); + m_tms5100->m0().set(m_tms6100, FUNC(tms6100_device::m0_w)); + m_tms5100->m1().set(m_tms6100, FUNC(tms6100_device::m1_w)); + m_tms5100->addr().set(m_tms6100, FUNC(tms6100_device::add_w)); + m_tms5100->data().set(m_tms6100, FUNC(tms6100_device::data_line_r)); + m_tms5100->romclk().set(m_tms6100, FUNC(tms6100_device::clk_w)); + m_tms5100->add_route(ALL_OUTPUTS, "mono", 0.5); +} +void eva24_state::eva(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 640_kHz_XTAL/2) // from TMS5110A CPU CK - MCFG_TMS1XXX_READ_K_CB(READ8(*this, eva_state, eva11_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, eva_state, eva11_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, eva_state, eva11_write_r)) + COP420(config, m_maincpu, 640_kHz_XTAL/2); // guessed + m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed + m_maincpu->write_d().set(FUNC(eva24_state::write_d)); + m_maincpu->write_g().set(FUNC(eva24_state::write_g)); + m_maincpu->read_g().set(FUNC(eva24_state::read_g)); - /* sound hardware */ - TMS6100(config, m_tms6100, 640_kHz_XTAL/4); + eva_sound(config); +} - SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("tms5100", TMS5110A, 640_kHz_XTAL) - tms5110_route(config); -MACHINE_CONFIG_END +void eva11_state::eva(machine_config &config) +{ + /* basic machine hardware */ + TMS1000(config, m_maincpu, 640_kHz_XTAL/2); // from TMS5110A CPU CK + m_maincpu->k().set(FUNC(eva11_state::read_k)); + m_maincpu->o().set(FUNC(eva11_state::write_o)); + m_maincpu->r().set(FUNC(eva11_state::write_r)); + + eva_sound(config); +} @@ -233,6 +242,6 @@ ROM_END -// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -SYST( 1984, eva24, 0, 0, eva24, eva24, eva_state, empty_init, "Chrysler", "Electronic Voice Alert (24-function)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) -SYST( 1983, eva11, eva24, 0, eva11, eva11, eva_state, empty_init, "Chrysler", "Electronic Voice Alert (11-function)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +SYST( 1984, eva24, 0, 0, eva, eva24, eva24_state, empty_init, "Chrysler", "Electronic Voice Alert (24-function)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +SYST( 1983, eva11, eva24, 0, eva, eva11, eva11_state, empty_init, "Chrysler", "Electronic Voice Alert (11-function)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index a284b3b7d33..24c47bfd6c1 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -532,10 +532,10 @@ static const s16 matchnum_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 }; MACHINE_CONFIG_START(matchnum_state::matchnum) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 325000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, matchnum_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, matchnum_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, matchnum_state, write_o)) + TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(matchnum_state::read_k)); + m_maincpu->r().set(FUNC(matchnum_state::write_r)); + m_maincpu->o().set(FUNC(matchnum_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_matchnum); @@ -632,10 +632,10 @@ static const s16 arrball_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 }; MACHINE_CONFIG_START(arrball_state::arrball) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 325000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, arrball_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, arrball_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, arrball_state, write_o)) + TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(arrball_state::read_k)); + m_maincpu->r().set(FUNC(arrball_state::write_r)); + m_maincpu->o().set(FUNC(arrball_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_arrball); @@ -812,11 +812,11 @@ static const u16 mathmagi_output_pla[0x20] = MACHINE_CONFIG_START(mathmagi_state::mathmagi) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 175000) // approximation - RC osc. R=68K, C=82pF - MCFG_TMS1XXX_OUTPUT_PLA(mathmagi_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, mathmagi_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, mathmagi_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, mathmagi_state, write_o)) + TMS1100(config, m_maincpu, 175000); // approximation - RC osc. R=68K, C=82pF + m_maincpu->set_output_pla(mathmagi_output_pla); + m_maincpu->k().set(FUNC(mathmagi_state::read_k)); + m_maincpu->r().set(FUNC(mathmagi_state::write_r)); + m_maincpu->o().set(FUNC(mathmagi_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_mathmagi); @@ -915,18 +915,18 @@ static INPUT_PORTS_START( bcheetah ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") INPUT_PORTS_END -MACHINE_CONFIG_START(bcheetah_state::bcheetah) - +void bcheetah_state::bcheetah(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 100000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, bcheetah_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, bcheetah_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, bcheetah_state, write_o)) + TMS1000(config, m_maincpu, 100000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(bcheetah_state::read_k)); + m_maincpu->r().set(FUNC(bcheetah_state::write_r)); + m_maincpu->o().set(FUNC(bcheetah_state::write_o)); config.set_default_layout(layout_bcheetah); /* no sound! */ -MACHINE_CONFIG_END +} @@ -1045,10 +1045,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(amaztron_state::amaztron) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 300000) // approximation - RC osc. R=33K?, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, amaztron_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, amaztron_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, amaztron_state, write_o)) + TMS1100(config, m_maincpu, 300000); // approximation - RC osc. R=33K?, C=100pF + m_maincpu->k().set(FUNC(amaztron_state::read_k)); + m_maincpu->r().set(FUNC(amaztron_state::write_r)); + m_maincpu->o().set(FUNC(amaztron_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_amaztron); @@ -1222,11 +1222,11 @@ static const u16 zodiac_output_pla[0x20] = MACHINE_CONFIG_START(zodiac_state::zodiac) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=18K, C=100pF - MCFG_TMS1XXX_OUTPUT_PLA(zodiac_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, zodiac_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, zodiac_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, zodiac_state, write_o)) + TMS1100(config, m_maincpu, 500000); // approximation - RC osc. R=18K, C=100pF + m_maincpu->set_output_pla(zodiac_output_pla); + m_maincpu->k().set(FUNC(zodiac_state::read_k)); + m_maincpu->r().set(FUNC(zodiac_state::write_r)); + m_maincpu->o().set(FUNC(zodiac_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_zodiac); @@ -1338,10 +1338,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(cqback_state::cqback) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 310000) // approximation - RC osc. R=33K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cqback_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cqback_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cqback_state, write_o)) + TMS1100(config, m_maincpu, 310000); // approximation - RC osc. R=33K, C=100pF + m_maincpu->k().set(FUNC(cqback_state::read_k)); + m_maincpu->r().set(FUNC(cqback_state::write_r)); + m_maincpu->o().set(FUNC(cqback_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cqback); @@ -1456,10 +1456,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(h2hfootb_state::h2hfootb) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 310000) // approximation - RC osc. R=39K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, h2hfootb_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, h2hfootb_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, h2hfootb_state, write_o)) + TMS1100(config, m_maincpu, 310000); // approximation - RC osc. R=39K, C=100pF + m_maincpu->k().set(FUNC(h2hfootb_state::read_k)); + m_maincpu->r().set(FUNC(h2hfootb_state::write_r)); + m_maincpu->o().set(FUNC(h2hfootb_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_h2hfootb); @@ -1597,10 +1597,10 @@ void h2hhockey_state::machine_start() MACHINE_CONFIG_START(h2hhockey_state::h2hhockey) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 375000) // approximation - RC osc. R=43K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, h2hhockey_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, h2hhockey_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, h2hhockey_state, write_o)) + TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=43K, C=100pF + m_maincpu->k().set(FUNC(h2hhockey_state::read_k)); + m_maincpu->r().set(FUNC(h2hhockey_state::write_r)); + m_maincpu->o().set(FUNC(h2hhockey_state::write_o)); MCFG_TIMER_DRIVER_ADD("cap_empty", h2hhockey_state, cap_empty_callback) @@ -1738,10 +1738,10 @@ void h2hbaseb_state::machine_reset() MACHINE_CONFIG_START(h2hbaseb_state::h2hbaseb) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1170, 350000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(*this, h2hbaseb_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, h2hbaseb_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, h2hbaseb_state, write_o)) + TMS1170(config, m_maincpu, 350000); // see set_clock + m_maincpu->k().set(FUNC(h2hbaseb_state::read_k)); + m_maincpu->r().set(FUNC(h2hbaseb_state::write_r)); + m_maincpu->o().set(FUNC(h2hbaseb_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_h2hbaseb); @@ -1850,10 +1850,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(h2hboxing_state::h2hboxing) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=39K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, h2hboxing_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, h2hboxing_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, h2hboxing_state, write_o)) + TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=39K, C=100pF + m_maincpu->k().set(FUNC(h2hboxing_state::read_k)); + m_maincpu->r().set(FUNC(h2hboxing_state::write_r)); + m_maincpu->o().set(FUNC(h2hboxing_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_h2hboxing); @@ -2021,10 +2021,10 @@ void quizwizc_state::machine_start() MACHINE_CONFIG_START(quizwizc_state::quizwizc) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 300000) // approximation - RC osc. R=43K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, quizwizc_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, quizwizc_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, quizwizc_state, write_o)) + TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=43K, C=100pF + m_maincpu->k().set(FUNC(quizwizc_state::read_k)); + m_maincpu->r().set(FUNC(quizwizc_state::write_r)); + m_maincpu->o().set(FUNC(quizwizc_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_quizwizc); @@ -2197,10 +2197,10 @@ void tc4_state::machine_start() MACHINE_CONFIG_START(tc4_state::tc4) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, 450000) // approximation - RC osc. R=27.3K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tc4_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tc4_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tc4_state, write_o)) + TMS1400(config, m_maincpu, 450000); // approximation - RC osc. R=27.3K, C=100pF + m_maincpu->k().set(FUNC(tc4_state::read_k)); + m_maincpu->r().set(FUNC(tc4_state::write_r)); + m_maincpu->o().set(FUNC(tc4_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_tc4); @@ -2312,10 +2312,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(cnbaskb_state::cnbaskb) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 400000) // approximation - RC osc. R=39K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cnbaskb_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cnbaskb_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cnbaskb_state, write_o)) + TMS1000(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + m_maincpu->k().set(FUNC(cnbaskb_state::read_k)); + m_maincpu->r().set(FUNC(cnbaskb_state::write_r)); + m_maincpu->o().set(FUNC(cnbaskb_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cnbaskb); @@ -2425,10 +2425,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(cmsport_state::cmsport) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 375000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cmsport_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cmsport_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cmsport_state, write_o)) + TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(cmsport_state::read_k)); + m_maincpu->r().set(FUNC(cmsport_state::write_r)); + m_maincpu->o().set(FUNC(cmsport_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cmsport); @@ -2551,10 +2551,10 @@ static const s16 cnfball_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 }; MACHINE_CONFIG_START(cnfball_state::cnfball) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 400000) // approximation - RC osc. R=39K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cnfball_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cnfball_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cnfball_state, write_o)) + TMS1000(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + m_maincpu->k().set(FUNC(cnfball_state::read_k)); + m_maincpu->r().set(FUNC(cnfball_state::write_r)); + m_maincpu->o().set(FUNC(cnfball_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cnfball); @@ -2677,11 +2677,11 @@ static const u16 cnfball2_output_pla[0x20] = MACHINE_CONFIG_START(cnfball2_state::cnfball2) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_OUTPUT_PLA(cnfball2_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cnfball2_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cnfball2_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cnfball2_state, write_o)) + TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->set_output_pla(cnfball2_output_pla); + m_maincpu->k().set(FUNC(cnfball2_state::read_k)); + m_maincpu->r().set(FUNC(cnfball2_state::write_r)); + m_maincpu->o().set(FUNC(cnfball2_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cnfball2); @@ -2819,10 +2819,10 @@ INPUT_CHANGED_MEMBER(eleciq_state::reset_button) MACHINE_CONFIG_START(eleciq_state::eleciq) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 325000) // approximation - RC osc. R=47K, C=50pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, eleciq_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, eleciq_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, eleciq_state, write_o)) + TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=50pF + m_maincpu->k().set(FUNC(eleciq_state::read_k)); + m_maincpu->r().set(FUNC(eleciq_state::write_r)); + m_maincpu->o().set(FUNC(eleciq_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_eleciq); @@ -2924,10 +2924,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(esoccer_state::esoccer) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=47K, C=33pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, esoccer_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, esoccer_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, esoccer_state, write_o)) + TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=33pF + m_maincpu->k().set(FUNC(esoccer_state::read_k)); + m_maincpu->r().set(FUNC(esoccer_state::write_r)); + m_maincpu->o().set(FUNC(esoccer_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_esoccer); @@ -3058,10 +3058,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ebball_state::ebball) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 375000) // approximation - RC osc. R=43K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ebball_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ebball_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ebball_state, write_o)) + TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=43K, C=47pF + m_maincpu->k().set(FUNC(ebball_state::read_k)); + m_maincpu->r().set(FUNC(ebball_state::write_r)); + m_maincpu->o().set(FUNC(ebball_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ebball); @@ -3181,10 +3181,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ebball2_state::ebball2) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ebball2_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ebball2_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ebball2_state, write_o)) + TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(ebball2_state::read_k)); + m_maincpu->r().set(FUNC(ebball2_state::write_r)); + m_maincpu->o().set(FUNC(ebball2_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ebball2); @@ -3361,10 +3361,10 @@ void ebball3_state::machine_reset() MACHINE_CONFIG_START(ebball3_state::ebball3) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 340000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ebball3_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ebball3_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ebball3_state, write_o)) + TMS1100(config, m_maincpu, 340000); // see set_clock + m_maincpu->k().set(FUNC(ebball3_state::read_k)); + m_maincpu->r().set(FUNC(ebball3_state::write_r)); + m_maincpu->o().set(FUNC(ebball3_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ebball3); @@ -3472,10 +3472,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(esbattle_state::esbattle) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 425000) // approximation - RC osc. R=47K, C=33pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, esbattle_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, esbattle_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, esbattle_state, write_o)) + TMS1000(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=33pF + m_maincpu->k().set(FUNC(esbattle_state::read_k)); + m_maincpu->r().set(FUNC(esbattle_state::write_r)); + m_maincpu->o().set(FUNC(esbattle_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_esbattle); @@ -3581,10 +3581,10 @@ void einvader_state::machine_reset() MACHINE_CONFIG_START(einvader_state::einvader) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 320000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(IOPORT("IN.0")) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, einvader_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, einvader_state, write_o)) + TMS1100(config, m_maincpu, 320000); // see set_clock + m_maincpu->k().set_ioport("IN.0"); + m_maincpu->r().set(FUNC(einvader_state::write_r)); + m_maincpu->o().set(FUNC(einvader_state::write_o)); /* video hardware */ MCFG_SCREEN_SVG_ADD("screen", "svg") @@ -3701,10 +3701,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(efootb4_state::efootb4) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1670, 475000) // approximation - RC osc. R=42K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, efootb4_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, efootb4_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, efootb4_state, write_o)) + TMS1670(config, m_maincpu, 475000); // approximation - RC osc. R=42K, C=47pF + m_maincpu->k().set(FUNC(efootb4_state::read_k)); + m_maincpu->r().set(FUNC(efootb4_state::write_r)); + m_maincpu->o().set(FUNC(efootb4_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_efootb4); @@ -3822,10 +3822,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ebaskb2_state::ebaskb2) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 360000) // approximation - RC osc. R=33K, C=82pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ebaskb2_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ebaskb2_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ebaskb2_state, write_o)) + TMS1100(config, m_maincpu, 360000); // approximation - RC osc. R=33K, C=82pF + m_maincpu->k().set(FUNC(ebaskb2_state::read_k)); + m_maincpu->r().set(FUNC(ebaskb2_state::write_r)); + m_maincpu->o().set(FUNC(ebaskb2_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ebaskb2); @@ -3961,10 +3961,10 @@ void raisedvl_state::machine_reset() MACHINE_CONFIG_START(raisedvl_state::raisedvl) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 350000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(*this, raisedvl_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, raisedvl_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, raisedvl_state, write_o)) + TMS1100(config, m_maincpu, 350000); // see set_clock + m_maincpu->k().set(FUNC(raisedvl_state::read_k)); + m_maincpu->r().set(FUNC(raisedvl_state::write_r)); + m_maincpu->o().set(FUNC(raisedvl_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_raisedvl); @@ -4092,10 +4092,10 @@ INPUT_CHANGED_MEMBER(f2pbball_state::reset_button) MACHINE_CONFIG_START(f2pbball_state::f2pbball) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 325000) // approximation - RC osc. R=51K, C=39pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, f2pbball_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, f2pbball_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, f2pbball_state, write_o)) + TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=51K, C=39pF + m_maincpu->k().set(FUNC(f2pbball_state::read_k)); + m_maincpu->r().set(FUNC(f2pbball_state::write_r)); + m_maincpu->o().set(FUNC(f2pbball_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_f2pbball); @@ -4229,10 +4229,10 @@ void f3in1_state::machine_reset() MACHINE_CONFIG_START(f3in1_state::f3in1) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 300000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(*this, f3in1_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, f3in1_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, f3in1_state, write_o)) + TMS1100(config, m_maincpu, 300000); // see set_clock + m_maincpu->k().set(FUNC(f3in1_state::read_k)); + m_maincpu->r().set(FUNC(f3in1_state::write_r)); + m_maincpu->o().set(FUNC(f3in1_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_f3in1); @@ -4374,10 +4374,10 @@ void gpoker_state::machine_reset() MACHINE_CONFIG_START(gpoker_state::gpoker) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1370, 350000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, gpoker_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, gpoker_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, gpoker_state, write_o)) + TMS1370(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(gpoker_state::read_k)); + m_maincpu->r().set(FUNC(gpoker_state::write_r)); + m_maincpu->o().set(FUNC(gpoker_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_gpoker); @@ -4487,10 +4487,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(gjackpot_state::gjackpot) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1670, 450000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, gpoker_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, gjackpot_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, gpoker_state, write_o)) + TMS1670(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(gpoker_state::read_k)); + m_maincpu->r().set(FUNC(gjackpot_state::write_r)); + m_maincpu->o().set(FUNC(gpoker_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_gjackpot); @@ -4592,10 +4592,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ginv1000_state::ginv1000) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1370, 340000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ginv1000_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ginv1000_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ginv1000_state, write_o)) + TMS1370(config, m_maincpu, 340000); // approximation + m_maincpu->k().set(FUNC(ginv1000_state::read_k)); + m_maincpu->r().set(FUNC(ginv1000_state::write_r)); + m_maincpu->o().set(FUNC(ginv1000_state::write_o)); /* video hardware */ MCFG_SCREEN_SVG_ADD("screen", "svg") @@ -4721,10 +4721,10 @@ void ginv2000_state::machine_reset() MACHINE_CONFIG_START(ginv2000_state::ginv2000) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1370, 425000) // approximation - RC osc. R=36K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ginv2000_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ginv2000_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ginv2000_state, write_o)) + TMS1370(config, m_maincpu, 425000); // approximation - RC osc. R=36K, C=47pF + m_maincpu->k().set(FUNC(ginv2000_state::read_k)); + m_maincpu->r().set(FUNC(ginv2000_state::write_r)); + m_maincpu->o().set(FUNC(ginv2000_state::write_o)); TMS1024(config, m_expander); m_expander->write_port4_callback().set(FUNC(ginv2000_state::expander_w)); @@ -4869,10 +4869,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(fxmcr165_state::fxmcr165) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 400_kHz_XTAL) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, fxmcr165_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, fxmcr165_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, fxmcr165_state, write_o)) + TMS1100(config, m_maincpu, 400_kHz_XTAL); + m_maincpu->k().set(FUNC(fxmcr165_state::read_k)); + m_maincpu->r().set(FUNC(fxmcr165_state::write_r)); + m_maincpu->o().set(FUNC(fxmcr165_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_fxmcr165); @@ -4997,11 +4997,11 @@ static const s16 elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff }; MACHINE_CONFIG_START(elecdet_state::elecdet) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0980, 425000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, elecdet_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, elecdet_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, elecdet_state, write_o)) - MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(*this, hh_tms1k_state, auto_power_off)) + TMS0980(config, m_maincpu, 425000); // approximation + m_maincpu->k().set(FUNC(elecdet_state::read_k)); + m_maincpu->r().set(FUNC(elecdet_state::write_r)); + m_maincpu->o().set(FUNC(elecdet_state::write_o)); + m_maincpu->power_off().set(FUNC(hh_tms1k_state::auto_power_off)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_elecdet); @@ -5125,10 +5125,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(starwbc_state::starwbc) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 325000) // approximation - RC osc. R=51K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, starwbc_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, starwbc_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, starwbc_state, write_o)) + TMS1100(config, m_maincpu, 325000); // approximation - RC osc. R=51K, C=47pF + m_maincpu->k().set(FUNC(starwbc_state::read_k)); + m_maincpu->r().set(FUNC(starwbc_state::write_r)); + m_maincpu->o().set(FUNC(starwbc_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_starwbc); @@ -5252,10 +5252,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(astro_state::astro) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1470, 450000) // approximation - RC osc. R=4.7K, C=33pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, astro_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, astro_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, astro_state, write_o)) + TMS1470(config, m_maincpu, 450000); // approximation - RC osc. R=4.7K, C=33pF + m_maincpu->k().set(FUNC(astro_state::read_k)); + m_maincpu->r().set(FUNC(astro_state::write_r)); + m_maincpu->o().set(FUNC(astro_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_astro); @@ -5417,11 +5417,11 @@ static const u16 elecbowl_output_pla[0x20] = MACHINE_CONFIG_START(elecbowl_state::elecbowl) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pF - MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, elecbowl_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, elecbowl_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, elecbowl_state, write_o)) + TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=33K, C=100pF + m_maincpu->set_output_pla(elecbowl_output_pla); + m_maincpu->k().set(FUNC(elecbowl_state::read_k)); + m_maincpu->r().set(FUNC(elecbowl_state::write_r)); + m_maincpu->o().set(FUNC(elecbowl_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_elecbowl); @@ -5574,9 +5574,9 @@ INPUT_PORTS_END MACHINE_CONFIG_START(horseran_state::horseran) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 300000) // approximation - RC osc. R=56K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, horseran_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, horseran_state, write_r)) + TMS1100(config, m_maincpu, 300000); // approximation - RC osc. R=56K, C=47pF + m_maincpu->k().set(FUNC(horseran_state::read_k)); + m_maincpu->r().set(FUNC(horseran_state::write_r)); /* video hardware */ MCFG_DEVICE_ADD("lcd", HLCD0569, 1100) // C=0.022uF @@ -5753,10 +5753,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(mdndclab_state::mdndclab) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 475000) // approximation - RC osc. R=27K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, mdndclab_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, mdndclab_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, mdndclab_state, write_o)) + TMS1100(config, m_maincpu, 475000); // approximation - RC osc. R=27K, C=100pF + m_maincpu->k().set(FUNC(mdndclab_state::read_k)); + m_maincpu->r().set(FUNC(mdndclab_state::write_r)); + m_maincpu->o().set(FUNC(mdndclab_state::write_o)); /* no visual feedback! */ config.set_default_layout(layout_mdndclab); // playing board @@ -5857,10 +5857,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(comp4_state::comp4) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0970, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, comp4_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, comp4_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, comp4_state, write_o)) + TMS0970(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(comp4_state::read_k)); + m_maincpu->r().set(FUNC(comp4_state::write_r)); + m_maincpu->o().set(FUNC(comp4_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_comp4); @@ -6007,10 +6007,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(bship_state::bship) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=100K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, bship_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, bship_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, bship_state, write_o)) + TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=100K, C=47pF + m_maincpu->k().set(FUNC(bship_state::read_k)); + m_maincpu->r().set(FUNC(bship_state::write_r)); + m_maincpu->o().set(FUNC(bship_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_bship); @@ -6110,10 +6110,10 @@ READ8_MEMBER(bshipb_state::read_k) MACHINE_CONFIG_START(bshipb_state::bshipb) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=100K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, bshipb_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, bshipb_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, bshipb_state, write_o)) + TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=100K, C=47pF + m_maincpu->k().set(FUNC(bshipb_state::read_k)); + m_maincpu->r().set(FUNC(bshipb_state::write_r)); + m_maincpu->o().set(FUNC(bshipb_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_bship); @@ -6228,9 +6228,9 @@ INPUT_PORTS_END MACHINE_CONFIG_START(simon_state::simon) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=33K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, simon_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, simon_state, write_r)) + TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=33K, C=100pF + m_maincpu->k().set(FUNC(simon_state::read_k)); + m_maincpu->r().set(FUNC(simon_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_simon); @@ -6369,9 +6369,9 @@ void ssimon_state::machine_reset() MACHINE_CONFIG_START(ssimon_state::ssimon) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 275000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ssimon_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ssimon_state, write_r)) + TMS1100(config, m_maincpu, 275000); // see set_clock + m_maincpu->k().set(FUNC(ssimon_state::read_k)); + m_maincpu->r().set(FUNC(ssimon_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ssimon); @@ -6549,10 +6549,10 @@ static const s16 bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2 MACHINE_CONFIG_START(bigtrak_state::bigtrak) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=83K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, bigtrak_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, bigtrak_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, bigtrak_state, write_o)) + TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=83K, C=100pF + m_maincpu->k().set(FUNC(bigtrak_state::read_k)); + m_maincpu->r().set(FUNC(bigtrak_state::write_r)); + m_maincpu->o().set(FUNC(bigtrak_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("gearbox", bigtrak_state, gearbox_sim_tick, attotime::from_msec(1)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) @@ -6782,10 +6782,10 @@ void mbdtower_state::machine_start() MACHINE_CONFIG_START(mbdtower_state::mbdtower) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, mbdtower_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, mbdtower_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, mbdtower_state, write_o)) + TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=43K, C=56pF + m_maincpu->k().set(FUNC(mbdtower_state::read_k)); + m_maincpu->r().set(FUNC(mbdtower_state::write_r)); + m_maincpu->o().set(FUNC(mbdtower_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("tower_motor", mbdtower_state, motor_sim_tick, attotime::from_msec(3500/0x80)) // ~3.5sec for a full rotation MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) @@ -6893,10 +6893,10 @@ static const s16 arcmania_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3* MACHINE_CONFIG_START(arcmania_state::arcmania) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 250000) // approximation - RC osc. R=56K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, arcmania_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, arcmania_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, arcmania_state, write_o)) + TMS1100(config, m_maincpu, 250000); // approximation - RC osc. R=56K, C=100pF + m_maincpu->k().set(FUNC(arcmania_state::read_k)); + m_maincpu->r().set(FUNC(arcmania_state::write_r)); + m_maincpu->o().set(FUNC(arcmania_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_arcmania); @@ -7012,10 +7012,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(cnsector_state::cnsector) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0970, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cnsector_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cnsector_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cnsector_state, write_o)) + TMS0970(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(cnsector_state::read_k)); + m_maincpu->r().set(FUNC(cnsector_state::write_r)); + m_maincpu->o().set(FUNC(cnsector_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cnsector); @@ -7126,10 +7126,10 @@ static const s16 merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, MACHINE_CONFIG_START(merlin_state::merlin) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, merlin_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, merlin_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, merlin_state, write_o)) + TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=33K, C=100pF + m_maincpu->k().set(FUNC(merlin_state::read_k)); + m_maincpu->r().set(FUNC(merlin_state::write_r)); + m_maincpu->o().set(FUNC(merlin_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_merlin); @@ -7191,10 +7191,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(mmerlin_state::mmerlin) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=30K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, mmerlin_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, mmerlin_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, mmerlin_state, write_o)) + TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=30K, C=100pF + m_maincpu->k().set(FUNC(mmerlin_state::read_k)); + m_maincpu->r().set(FUNC(mmerlin_state::write_r)); + m_maincpu->o().set(FUNC(mmerlin_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_mmerlin); @@ -7307,11 +7307,11 @@ static const s16 stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4 MACHINE_CONFIG_START(stopthief_state::stopthief) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0980, 425000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, stopthief_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, stopthief_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, stopthief_state, write_o)) - MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(*this, hh_tms1k_state, auto_power_off)) + TMS0980(config, m_maincpu, 425000); // approximation + m_maincpu->k().set(FUNC(stopthief_state::read_k)); + m_maincpu->r().set(FUNC(stopthief_state::write_r)); + m_maincpu->o().set(FUNC(stopthief_state::write_o)); + m_maincpu->power_off().set(FUNC(hh_tms1k_state::auto_power_off)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_stopthief); @@ -7421,10 +7421,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(bankshot_state::bankshot) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, bankshot_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, bankshot_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, bankshot_state, write_o)) + TMS1400(config, m_maincpu, 475000); // approximation - RC osc. R=24K, C=100pF + m_maincpu->k().set(FUNC(bankshot_state::read_k)); + m_maincpu->r().set(FUNC(bankshot_state::write_r)); + m_maincpu->o().set(FUNC(bankshot_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_bankshot); @@ -7538,10 +7538,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(splitsec_state::splitsec) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, splitsec_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, splitsec_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, splitsec_state, write_o)) + TMS1400(config, m_maincpu, 475000); // approximation - RC osc. R=24K, C=100pF + m_maincpu->k().set(FUNC(splitsec_state::read_k)); + m_maincpu->r().set(FUNC(splitsec_state::write_r)); + m_maincpu->o().set(FUNC(splitsec_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_splitsec); @@ -7656,10 +7656,10 @@ static const s16 lostreas_speaker_levels[16] = MACHINE_CONFIG_START(lostreas_state::lostreas) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 425000) // approximation - RC osc. R=39K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, lostreas_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, lostreas_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, lostreas_state, write_o)) + TMS1100(config, m_maincpu, 425000); // approximation - RC osc. R=39K, C=47pF + m_maincpu->k().set(FUNC(lostreas_state::read_k)); + m_maincpu->r().set(FUNC(lostreas_state::write_r)); + m_maincpu->o().set(FUNC(lostreas_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_lostreas); @@ -7777,11 +7777,11 @@ static const u16 alphie_output_pla[0x20] = MACHINE_CONFIG_START(alphie_state::alphie) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 350000) // approximation - MCFG_TMS1XXX_OUTPUT_PLA(alphie_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, alphie_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, alphie_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, alphie_state, write_o)) + TMS1000(config, m_maincpu, 350000); // approximation + m_maincpu->set_output_pla(alphie_output_pla); + m_maincpu->k().set(FUNC(alphie_state::read_k)); + m_maincpu->r().set(FUNC(alphie_state::write_r)); + m_maincpu->o().set(FUNC(alphie_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("arm_position", alphie_state, show_arm_position, attotime::from_msec(50)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) @@ -7888,10 +7888,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(tcfball_state::tcfball) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=56K, C=24pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tcfball_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tcfball_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tcfball_state, write_o)) + TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=56K, C=24pF + m_maincpu->k().set(FUNC(tcfball_state::read_k)); + m_maincpu->r().set(FUNC(tcfball_state::write_r)); + m_maincpu->o().set(FUNC(tcfball_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_tcfball); @@ -7953,11 +7953,11 @@ static const u16 tcfballa_output_pla[0x20] = MACHINE_CONFIG_START(tcfballa_state::tcfballa) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=50pF - MCFG_TMS1XXX_OUTPUT_PLA(tcfballa_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tcfballa_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tcfballa_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tcfballa_state, write_o)) + TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=50pF + m_maincpu->set_output_pla(tcfballa_output_pla); + m_maincpu->k().set(FUNC(tcfballa_state::read_k)); + m_maincpu->r().set(FUNC(tcfballa_state::write_r)); + m_maincpu->o().set(FUNC(tcfballa_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_tcfballa); @@ -8117,11 +8117,11 @@ static const u16 tandy12_output_pla[0x20] = MACHINE_CONFIG_START(tandy12_state::tandy12) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 400000) // approximation - RC osc. R=39K, C=47pF - MCFG_TMS1XXX_OUTPUT_PLA(tandy12_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tandy12_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tandy12_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tandy12_state, write_o)) + TMS1100(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + m_maincpu->set_output_pla(tandy12_output_pla); + m_maincpu->k().set(FUNC(tandy12_state::read_k)); + m_maincpu->r().set(FUNC(tandy12_state::write_r)); + m_maincpu->o().set(FUNC(tandy12_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_tandy12); @@ -8226,10 +8226,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(monkeysee_state::monkeysee) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 250000) // approximation - RC osc. R=68K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, monkeysee_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, monkeysee_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, monkeysee_state, write_o)) + TMS1000(config, m_maincpu, 250000); // approximation - RC osc. R=68K, C=47pF + m_maincpu->k().set(FUNC(monkeysee_state::read_k)); + m_maincpu->r().set(FUNC(monkeysee_state::write_r)); + m_maincpu->o().set(FUNC(monkeysee_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_monkeysee); @@ -8375,10 +8375,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(speechp_state::speechp) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 400000) // approximation - RC osc. R=39K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, speechp_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, speechp_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, speechp_state, write_o)) + TMS1000(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + m_maincpu->k().set(FUNC(speechp_state::read_k)); + m_maincpu->r().set(FUNC(speechp_state::write_r)); + m_maincpu->o().set(FUNC(speechp_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_speechp); @@ -8457,10 +8457,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(timaze_state::timaze) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=80K, C=27pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, timaze_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, timaze_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, timaze_state, write_o)) + TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=80K, C=27pF + m_maincpu->k().set(FUNC(timaze_state::read_k)); + m_maincpu->r().set(FUNC(timaze_state::write_r)); + m_maincpu->o().set(FUNC(timaze_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_timaze); @@ -8559,10 +8559,10 @@ static const s16 copycat_speaker_levels[4] = { 0, 0x7fff, -0x8000, 0 }; MACHINE_CONFIG_START(copycat_state::copycat) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 320000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, copycat_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, copycat_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, copycat_state, write_o)) + TMS1000(config, m_maincpu, 320000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(copycat_state::read_k)); + m_maincpu->r().set(FUNC(copycat_state::write_r)); + m_maincpu->o().set(FUNC(copycat_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_copycat); @@ -8635,10 +8635,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(copycatm2_state::copycatm2) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1730, 275000) // approximation - RC osc. R=100K, C=47pF - MCFG_TMS1XXX_READ_K_CB(IOPORT("IN.0")) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, copycatm2_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, copycatm2_state, write_o)) + TMS1730(config, m_maincpu, 275000); // approximation - RC osc. R=100K, C=47pF + m_maincpu->k().set_ioport("IN.0"); + m_maincpu->r().set(FUNC(copycatm2_state::write_r)); + m_maincpu->o().set(FUNC(copycatm2_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_copycatm2); @@ -8706,10 +8706,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ditto_state::ditto) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1730, 275000) // approximation - RC osc. R=100K, C=47pF - MCFG_TMS1XXX_READ_K_CB(IOPORT("IN.0")) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ditto_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ditto_state, write_o)) + TMS1730(config, m_maincpu, 275000); // approximation - RC osc. R=100K, C=47pF + m_maincpu->k().set_ioport("IN.0"); + m_maincpu->r().set(FUNC(ditto_state::write_r)); + m_maincpu->o().set(FUNC(ditto_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ditto); @@ -8822,10 +8822,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ss7in1_state::ss7in1) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, 450000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ss7in1_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ss7in1_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ss7in1_state, write_o)) + TMS1400(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(ss7in1_state::read_k)); + m_maincpu->r().set(FUNC(ss7in1_state::write_r)); + m_maincpu->o().set(FUNC(ss7in1_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_7in1ss); @@ -9015,10 +9015,10 @@ void tbreakup_state::machine_start() MACHINE_CONFIG_START(tbreakup_state::tbreakup) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1040, 325000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tbreakup_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tbreakup_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tbreakup_state, write_o)) + TMS1040(config, m_maincpu, 325000); // see set_clock + m_maincpu->k().set(FUNC(tbreakup_state::read_k)); + m_maincpu->r().set(FUNC(tbreakup_state::write_r)); + m_maincpu->o().set(FUNC(tbreakup_state::write_o)); TMS1025(config, m_expander); m_expander->write_port1_callback().set(FUNC(tbreakup_state::expander_w)); @@ -9148,10 +9148,10 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button) MACHINE_CONFIG_START(phpball_state::phpball) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, phpball_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, phpball_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, phpball_state, write_o)) + TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->k().set(FUNC(phpball_state::read_k)); + m_maincpu->r().set(FUNC(phpball_state::write_r)); + m_maincpu->o().set(FUNC(phpball_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_hh_tms1k_test); @@ -9283,11 +9283,11 @@ static const u16 ssports4_output_pla[0x20] = MACHINE_CONFIG_START(ssports4_state::ssports4) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pF - MCFG_TMS1XXX_OUTPUT_PLA(ssports4_output_pla) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ssports4_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ssports4_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ssports4_state, write_o)) + TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + m_maincpu->set_output_pla(ssports4_output_pla); + m_maincpu->k().set(FUNC(ssports4_state::read_k)); + m_maincpu->r().set(FUNC(ssports4_state::write_r)); + m_maincpu->o().set(FUNC(ssports4_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ssports4); @@ -9453,10 +9453,10 @@ void xl25_state::machine_reset() MACHINE_CONFIG_START(xl25_state::xl25) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000C, 300000) // approximation - RC osc. R=5.6K, C=47pF - MCFG_TMS1XXX_READ_K_CB(READ8(*this, xl25_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, xl25_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, xl25_state, write_o)) + TMS1000C(config, m_maincpu, 300000); // approximation - RC osc. R=5.6K, C=47pF + m_maincpu->k().set(FUNC(xl25_state::read_k)); + m_maincpu->r().set(FUNC(xl25_state::write_r)); + m_maincpu->o().set(FUNC(xl25_state::write_o)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_xl25); diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp index 38e8d8f4ec6..9076da5c595 100644 --- a/src/mame/drivers/microvsn.cpp +++ b/src/mame/drivers/microvsn.cpp @@ -643,11 +643,11 @@ MACHINE_CONFIG_START(microvision_state::microvision) MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, microvision_state, i8021_t1_read)) MCFG_MCS48_PORT_BUS_IN_CB(READ8(*this, microvision_state, i8021_bus_read)) - MCFG_DEVICE_ADD("maincpu2", TMS1100, 500000) // most games seem to be running at approximately this speed - MCFG_TMS1XXX_OUTPUT_PLA( microvision_output_pla_0 ) - MCFG_TMS1XXX_READ_K_CB( READ8( *this, microvision_state, tms1100_read_k ) ) - MCFG_TMS1XXX_WRITE_O_CB( WRITE16( *this, microvision_state, tms1100_write_o ) ) - MCFG_TMS1XXX_WRITE_R_CB( WRITE16( *this, microvision_state, tms1100_write_r ) ) + TMS1100(config, m_tms1100, 500000); // most games seem to be running at approximately this speed + m_tms1100->set_output_pla(microvision_output_pla_0); + m_tms1100->k().set(FUNC(microvision_state::tms1100_read_k)); + m_tms1100->o().set(FUNC(microvision_state::tms1100_write_o)); + m_tms1100->r().set(FUNC(microvision_state::tms1100_write_r)); MCFG_SCREEN_ADD("screen", LCD) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp index d4653966847..11f782fcd89 100644 --- a/src/mame/drivers/ticalc1x.cpp +++ b/src/mame/drivers/ticalc1x.cpp @@ -190,10 +190,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(cmulti8_state::cmulti8) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1070, 250000) // approximation - RC osc. R=56K, C=68pf - MCFG_TMS1XXX_READ_K_CB(READ8(*this, cmulti8_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, cmulti8_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, cmulti8_state, write_r)) + TMS1070(config, m_maincpu, 250000); // approximation - RC osc. R=56K, C=68pf + m_maincpu->k().set(FUNC(cmulti8_state::read_k)); + m_maincpu->o().set(FUNC(cmulti8_state::write_o)); + m_maincpu->r().set(FUNC(cmulti8_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_cmulti8); @@ -407,10 +407,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(tisr16_state::tisr16) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 300000) // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tisr16_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tisr16_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tisr16_state, write_r)) + TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq) + m_maincpu->k().set(FUNC(tisr16_state::read_k)); + m_maincpu->o().set(FUNC(tisr16_state::write_o)); + m_maincpu->r().set(FUNC(tisr16_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_tisr16); @@ -549,10 +549,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ti1250_state::ti1250) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0950, 200000) // approximation - RC osc. R=68K, C=68pf - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ti1250_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ti1250_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ti1250_state, write_r)) + TMS0950(config, m_maincpu, 200000); // approximation - RC osc. R=68K, C=68pf + m_maincpu->k().set(FUNC(ti1250_state::read_k)); + m_maincpu->o().set(FUNC(ti1250_state::write_o)); + m_maincpu->r().set(FUNC(ti1250_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ti1250); @@ -564,10 +564,10 @@ MACHINE_CONFIG_START(ti1250_state::ti1270) ti1250(config); /* basic machine hardware */ - MCFG_DEVICE_REPLACE("maincpu", TMS0970, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ti1250_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ti1250_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ti1250_state, write_r)) + TMS0970(config.replace(), m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(ti1250_state::read_k)); + m_maincpu->o().set(FUNC(ti1250_state::write_o)); + m_maincpu->r().set(FUNC(ti1250_state::write_r)); config.set_default_layout(layout_ti1270); MACHINE_CONFIG_END @@ -679,10 +679,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ti25503_state::ti25503) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1000, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ti25503_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ti25503_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ti25503_state, write_r)) + TMS1000(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(ti25503_state::read_k)); + m_maincpu->o().set(FUNC(ti25503_state::write_o)); + m_maincpu->r().set(FUNC(ti25503_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ti25503); @@ -782,10 +782,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ti1000_state::ti1000) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1990, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ti1000_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ti1000_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ti1000_state, write_r)) + TMS1990(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(ti1000_state::read_k)); + m_maincpu->o().set(FUNC(ti1000_state::write_o)); + m_maincpu->r().set(FUNC(ti1000_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ti1270); @@ -884,10 +884,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(wizatron_state::wizatron) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0970, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, wizatron_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, wizatron_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, wizatron_state, write_r)) + TMS0970(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(wizatron_state::read_k)); + m_maincpu->o().set(FUNC(wizatron_state::write_o)); + m_maincpu->r().set(FUNC(wizatron_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_wizatron); @@ -961,10 +961,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(lilprof_state::lilprof) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0970, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, lilprof_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, lilprof_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, wizatron_state, write_r)) + TMS0970(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(lilprof_state::read_k)); + m_maincpu->o().set(FUNC(lilprof_state::write_o)); + m_maincpu->r().set(FUNC(wizatron_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_wizatron); @@ -1074,10 +1074,10 @@ INPUT_PORTS_END MACHINE_CONFIG_START(lilprof78_state::lilprof78) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1990, 250000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, lilprof78_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, lilprof78_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, lilprof78_state, write_r)) + TMS1990(config, m_maincpu, 250000); // approximation + m_maincpu->k().set(FUNC(lilprof78_state::read_k)); + m_maincpu->o().set(FUNC(lilprof78_state::write_o)); + m_maincpu->r().set(FUNC(lilprof78_state::write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_wizatron); @@ -1188,11 +1188,11 @@ INPUT_PORTS_END MACHINE_CONFIG_START(dataman_state::dataman) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1980, 300000) // patent says 300kHz - MCFG_TMS1XXX_READ_K_CB(READ8(*this, dataman_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, dataman_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, dataman_state, write_r)) - MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(*this, hh_tms1k_state, auto_power_off)) + TMS1980(config, m_maincpu, 300000); // patent says 300kHz + m_maincpu->k().set(FUNC(dataman_state::read_k)); + m_maincpu->o().set(FUNC(dataman_state::write_o)); + m_maincpu->r().set(FUNC(dataman_state::write_r)); + m_maincpu->power_off().set(FUNC(hh_tms1k_state::auto_power_off)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_dataman); @@ -1258,11 +1258,11 @@ INPUT_PORTS_END MACHINE_CONFIG_START(mathmarv_state::mathmarv) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1980, 300000) // assume same as dataman - MCFG_TMS1XXX_READ_K_CB(READ8(*this, dataman_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, dataman_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, mathmarv_state, write_r)) - MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(*this, hh_tms1k_state, auto_power_off)) + TMS1980(config, m_maincpu, 300000); // assume same as dataman + m_maincpu->k().set(FUNC(dataman_state::read_k)); + m_maincpu->o().set(FUNC(dataman_state::write_o)); + m_maincpu->r().set(FUNC(mathmarv_state::write_r)); + m_maincpu->power_off().set(FUNC(hh_tms1k_state::auto_power_off)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_mathmarv); @@ -1521,11 +1521,11 @@ INPUT_PORTS_END MACHINE_CONFIG_START(ti30_state::ti30) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0980, 400000) // guessed - MCFG_TMS1XXX_READ_K_CB(READ8(*this, ti30_state, read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ti30_state, write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ti30_state, write_r)) - MCFG_TMS1XXX_POWER_OFF_CB(WRITELINE(*this, hh_tms1k_state, auto_power_off)) + TMS0980(config, m_maincpu, 400000); // guessed + m_maincpu->k().set(FUNC(ti30_state::read_k)); + m_maincpu->o().set(FUNC(ti30_state::write_o)); + m_maincpu->r().set(FUNC(ti30_state::write_r)); + m_maincpu->power_off().set(FUNC(hh_tms1k_state::auto_power_off)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_ti30); diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index 7ee95c29cd0..63d26875622 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -1283,14 +1283,14 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(tispeak_state::snmath) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0270, MASTER_CLOCK/2) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispeak_state, snspell_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, snmath_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispeak_state, snspell_write_r)) + tms0270_cpu_device &tms(TMS0270(config, m_maincpu, MASTER_CLOCK/2)); + tms.k().set(FUNC(tispeak_state::snspell_read_k)); + tms.o().set(FUNC(tispeak_state::snmath_write_o)); + tms.r().set(FUNC(tispeak_state::snspell_write_r)); - MCFG_TMS0270_READ_CTL_CB(READ8("tms5100", tms5110_device, ctl_r)) - MCFG_TMS0270_WRITE_CTL_CB(WRITE8("tms5100", tms5110_device, ctl_w)) - MCFG_TMS0270_WRITE_PDC_CB(WRITELINE("tms5100", tms5110_device, pdc_w)) + tms.read_ctl().set("tms5100", FUNC(tms5110_device::ctl_r)); + tms.write_ctl().set("tms5100", FUNC(tms5110_device::ctl_w)); + tms.write_pdc().set("tms5100", FUNC(tms5110_device::pdc_w)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_snmath); @@ -1308,8 +1308,7 @@ MACHINE_CONFIG_START(tispeak_state::sns_cd2801) snmath(config); /* basic machine hardware */ - MCFG_DEVICE_MODIFY("maincpu") - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, snspell_write_o)) + m_maincpu->o().set(FUNC(tispeak_state::snspell_write_o)); config.set_default_layout(layout_snspell); @@ -1356,8 +1355,7 @@ MACHINE_CONFIG_START(tispeak_state::snread) snmath(config); /* basic machine hardware */ - MCFG_DEVICE_MODIFY("maincpu") - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, snspell_write_o)) + m_maincpu->o().set(FUNC(tispeak_state::snspell_write_o)); config.set_default_layout(layout_snread); @@ -1374,9 +1372,8 @@ MACHINE_CONFIG_START(tispeak_state::lantutor) snmath(config); /* basic machine hardware */ - MCFG_DEVICE_MODIFY("maincpu") - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, snspell_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispeak_state, lantutor_write_r)) + m_maincpu->o().set(FUNC(tispeak_state::snspell_write_o)); + m_maincpu->r().set(FUNC(tispeak_state::lantutor_write_r)); config.set_default_layout(layout_snread); @@ -1393,10 +1390,10 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(tispeak_state::snspellc) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, MASTER_CLOCK/2) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispeak_state, snspellc_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, snspellc_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispeak_state, snspellc_write_r)) + TMS1100(config, m_maincpu, MASTER_CLOCK/2); + m_maincpu->k().set(FUNC(tispeak_state::snspellc_read_k)); + m_maincpu->o().set(FUNC(tispeak_state::snspellc_write_o)); + m_maincpu->r().set(FUNC(tispeak_state::snspellc_write_r)); /* no visual feedback! */ @@ -1427,10 +1424,10 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(tispeak_state::vocaid) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1100, MASTER_CLOCK/2) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispeak_state, tntell_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, snspellc_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispeak_state, snspellc_write_r)) + TMS1100(config, m_maincpu, MASTER_CLOCK/2); + m_maincpu->k().set(FUNC(tispeak_state::tntell_read_k)); + m_maincpu->o().set(FUNC(tispeak_state::snspellc_write_o)); + m_maincpu->r().set(FUNC(tispeak_state::snspellc_write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) MCFG_TIMER_DRIVER_ADD_PERIODIC("ol_timer", tispeak_state, tntell_get_overlay, attotime::from_msec(50)) @@ -1459,10 +1456,10 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(tispeak_state::k28m2) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS1400, MASTER_CLOCK/2) - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispeak_state, k28_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispeak_state, k28_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispeak_state, k28_write_r)) + TMS1400(config, m_maincpu, MASTER_CLOCK/2); + m_maincpu->k().set(FUNC(tispeak_state::k28_read_k)); + m_maincpu->o().set(FUNC(tispeak_state::k28_write_o)); + m_maincpu->r().set(FUNC(tispeak_state::k28_write_r)); MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) config.set_default_layout(layout_k28m2); diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp index aa41f86b7f9..837a253f775 100644 --- a/src/mame/drivers/tispellb.cpp +++ b/src/mame/drivers/tispellb.cpp @@ -348,17 +348,17 @@ INPUT_PORTS_END MACHINE_CONFIG_START(tispellb_state::rev1) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0270, 350000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispellb_state, main_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispellb_state, main_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispellb_state, main_write_r)) - MCFG_TMS0270_READ_CTL_CB(READ8(*this, tispellb_state, rev1_ctl_r)) - MCFG_TMS0270_WRITE_CTL_CB(WRITE8(*this, tispellb_state, rev1_ctl_w)) - - MCFG_DEVICE_ADD("subcpu", TMS1980, 350000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispellb_state, sub_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispellb_state, sub_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispellb_state, sub_write_r)) + tms0270_cpu_device &tms(TMS0270(config, m_maincpu, 350000)); // approximation + tms.k().set(FUNC(tispellb_state::main_read_k)); + tms.o().set(FUNC(tispellb_state::main_write_o)); + tms.r().set(FUNC(tispellb_state::main_write_r)); + tms.read_ctl().set(FUNC(tispellb_state::rev1_ctl_r)); + tms.write_ctl().set(FUNC(tispellb_state::rev1_ctl_w)); + + tms1980_cpu_device &subcpu(TMS1980(config, m_subcpu, 350000)); // approximation + subcpu.k().set(FUNC(tispellb_state::sub_read_k)); + subcpu.o().set(FUNC(tispellb_state::sub_write_o)); + subcpu.r().set(FUNC(tispellb_state::sub_write_r)); MCFG_QUANTUM_PERFECT_CPU("maincpu") @@ -372,12 +372,12 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(tispellb_state::rev2) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", TMS0270, 350000) // approximation - MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispellb_state, main_read_k)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispellb_state, rev2_write_o)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispellb_state, rev2_write_r)) - MCFG_TMS0270_READ_CTL_CB(READ8(m_tms6100, tms6100_device, data_r)) - MCFG_TMS0270_WRITE_CTL_CB(WRITE8(m_tms6100, tms6100_device, add_w)) + tms0270_cpu_device &tms(TMS0270(config, m_maincpu, 350000)); // approximation + tms.k().set(FUNC(tispellb_state::main_read_k)); + tms.o().set(FUNC(tispellb_state::rev2_write_o)); + tms.r().set(FUNC(tispellb_state::rev2_write_r)); + tms.read_ctl().set(m_tms6100, FUNC(tms6100_device::data_r)); + tms.write_ctl().set(m_tms6100, FUNC(tms6100_device::add_w)); TMS6100(config, m_tms6100, 350000); m_tms6100->enable_4bit_mode(true); -- cgit v1.2.3