summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2018-08-22 18:12:27 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2018-08-22 18:12:27 +0200
commitd1f7028027bac36a032a382846b1918ae6a837ce (patch)
tree0e04748d09eac41535ba841b69b6690e8096203b /src/mame
parentd8c4c128c8cbeb1359483571c4eba14411cdd6e4 (diff)
i8155.cpp: deMCFGfied (nw)
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/amusco.cpp14
-rw-r--r--src/mame/drivers/cp1.cpp12
-rw-r--r--src/mame/drivers/equites.cpp10
-rw-r--r--src/mame/drivers/exp85.cpp2
-rw-r--r--src/mame/drivers/g627.cpp10
-rw-r--r--src/mame/drivers/kyocera.cpp40
-rw-r--r--src/mame/drivers/mephistp.cpp10
-rw-r--r--src/mame/drivers/meyc8088.cpp18
-rw-r--r--src/mame/drivers/paranoia.cpp10
-rw-r--r--src/mame/drivers/sbugger.cpp10
-rw-r--r--src/mame/drivers/sdk85.cpp6
-rw-r--r--src/mame/drivers/testconsole.cpp2
-rw-r--r--src/mame/drivers/tourvis.cpp10
-rw-r--r--src/mame/drivers/unkhorse.cpp8
-rw-r--r--src/mame/drivers/vixen.cpp20
-rw-r--r--src/mame/drivers/vp415.cpp8
16 files changed, 96 insertions, 94 deletions
diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp
index 0c18032b648..54263f56049 100644
--- a/src/mame/drivers/amusco.cpp
+++ b/src/mame/drivers/amusco.cpp
@@ -558,17 +558,17 @@ MACHINE_CONFIG_START(amusco_state::amusco)
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
- MCFG_DEVICE_ADD("lpt_interface", I8155, 0)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, amusco_state, lpt_data_w))
- MCFG_I8155_IN_PORTB_CB(READ8(*this, amusco_state, lpt_status_r))
+ i8155_device &i8155a(I8155(config, "lpt_interface", 0));
+ i8155a.out_pa_callback().set(FUNC(amusco_state::lpt_data_w));
+ i8155a.in_pb_callback().set(FUNC(amusco_state::lpt_status_r));
// Port C uses ALT 3 mode, which MAME does not currently emulate
MCFG_DEVICE_ADD("rtc", MSM5832, 32.768_kHz_XTAL)
- MCFG_DEVICE_ADD("rtc_interface", I8155, 0)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, amusco_state, rtc_control_w))
- MCFG_I8155_IN_PORTC_CB(READ8("rtc", msm5832_device, data_r))
- MCFG_I8155_OUT_PORTC_CB(WRITE8("rtc", msm5832_device, data_w))
+ i8155_device &i8155b(I8155(config, "rtc_interface", 0));
+ i8155b.out_pa_callback().set(FUNC(amusco_state::rtc_control_w));
+ i8155b.in_pc_callback().set("rtc", FUNC(msm5832_device::data_r));
+ i8155b.out_pc_callback().set("rtc", FUNC(msm5832_device::data_w));
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(30), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH)
diff --git a/src/mame/drivers/cp1.cpp b/src/mame/drivers/cp1.cpp
index 7fdf206a24c..ff9532ff477 100644
--- a/src/mame/drivers/cp1.cpp
+++ b/src/mame/drivers/cp1.cpp
@@ -277,13 +277,13 @@ MACHINE_CONFIG_START(cp1_state::cp1)
maincpu.t0_in_cb().set_log("t0_r");
maincpu.t1_in_cb().set_log("t1_r");
- MCFG_DEVICE_ADD("i8155", I8155, 0)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, cp1_state, i8155_porta_w))
- MCFG_I8155_IN_PORTB_CB(READ8(*this, cp1_state, i8155_portb_r))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, cp1_state, i8155_portb_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, cp1_state, i8155_portc_w))
+ i8155_device &i8155(I8155(config, "i8155", 0));
+ i8155.out_pa_callback().set(FUNC(cp1_state::i8155_porta_w));
+ i8155.in_pb_callback().set(FUNC(cp1_state::i8155_portb_r));
+ i8155.out_pb_callback().set(FUNC(cp1_state::i8155_portb_w));
+ i8155.out_pc_callback().set(FUNC(cp1_state::i8155_portc_w));
- MCFG_DEVICE_ADD("i8155_cp3", I8155, 0)
+ I8155(config, "i8155_cp3", 0);
config.set_default_layout(layout_cp1);
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index 8a408c924d4..07878546874 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -1047,11 +1047,11 @@ MACHINE_CONFIG_START(equites_state::common_sound)
MCFG_DEVICE_IO_MAP(sound_portmap)
MCFG_I8085A_CLK_OUT_DEVICE("audio8155")
- MCFG_DEVICE_ADD("audio8155", I8155, 0)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, equites_state, equites_8155_porta_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, equites_state, equites_8155_portb_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, equites_state, equites_8155_portc_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, equites_state, equites_8155_timer_pulse))
+ i8155_device &i8155(I8155(config, "audio8155", 0));
+ i8155.out_pa_callback().set(FUNC(equites_state::equites_8155_porta_w));
+ i8155.out_pb_callback().set(FUNC(equites_state::equites_8155_portb_w));
+ i8155.out_pc_callback().set(FUNC(equites_state::equites_8155_portc_w));
+ i8155.out_to_callback().set(FUNC(equites_state::equites_8155_timer_pulse));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/drivers/exp85.cpp b/src/mame/drivers/exp85.cpp
index efadf87c382..a6c4eea8cf6 100644
--- a/src/mame/drivers/exp85.cpp
+++ b/src/mame/drivers/exp85.cpp
@@ -194,7 +194,7 @@ MACHINE_CONFIG_START(exp85_state::exp85)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* devices */
- MCFG_DEVICE_ADD(I8155_TAG, I8155, 6.144_MHz_XTAL/2)
+ I8155(config, I8155_TAG, 6.144_MHz_XTAL/2);
MCFG_DEVICE_ADD(I8355_TAG, I8355, 6.144_MHz_XTAL/2)
MCFG_I8355_IN_PA_CB(READ8(*this, exp85_state, i8355_a_r))
diff --git a/src/mame/drivers/g627.cpp b/src/mame/drivers/g627.cpp
index 322780abe5a..63f78774e00 100644
--- a/src/mame/drivers/g627.cpp
+++ b/src/mame/drivers/g627.cpp
@@ -302,11 +302,11 @@ MACHINE_CONFIG_START(g627_state::g627)
MCFG_DEVICE_PROGRAM_MAP(mem_map)
MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_ADD("i8156", I8156, 14138000/8)
- MCFG_I8155_IN_PORTA_CB(READ8(*this, g627_state, porta_r))
- MCFG_I8155_IN_PORTB_CB(READ8(*this, g627_state, portb_r))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, g627_state, portc_w))
- MCFG_I8155_OUT_TIMEROUT_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ i8156_device &i8156(I8156(config, "i8156", 14138000/8));
+ i8156.in_pa_callback().set(FUNC(g627_state::porta_r));
+ i8156.in_pb_callback().set(FUNC(g627_state::portb_r));
+ i8156.out_pc_callback().set(FUNC(g627_state::portc_w));
+ i8156.out_to_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp
index 29cf737aa30..a7348a87446 100644
--- a/src/mame/drivers/kyocera.cpp
+++ b/src/mame/drivers/kyocera.cpp
@@ -1363,11 +1363,11 @@ MACHINE_CONFIG_START(kc85_state::kc85)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* devices */
- MCFG_DEVICE_ADD(I8155_TAG, I8155, XTAL(4'915'200)/2)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, kc85_state, i8155_pa_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, kc85_state, i8155_pb_w))
- MCFG_I8155_IN_PORTC_CB(READ8(*this, kc85_state, i8155_pc_r))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, kc85_state, i8155_to_w))
+ i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
+ i8155.out_pa_callback().set(FUNC(kc85_state::i8155_pa_w));
+ i8155.out_pb_callback().set(FUNC(kc85_state::i8155_pb_w));
+ i8155.in_pc_callback().set(FUNC(kc85_state::i8155_pc_r));
+ i8155.out_to_callback().set(FUNC(kc85_state::i8155_to_w));
MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL(32'768), NOOP, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
@@ -1411,11 +1411,11 @@ MACHINE_CONFIG_START(pc8201_state::pc8201)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* devices */
- MCFG_DEVICE_ADD(I8155_TAG, I8155, XTAL(4'915'200)/2)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, kc85_state, i8155_pa_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, kc85_state, i8155_pb_w))
- MCFG_I8155_IN_PORTC_CB(READ8(*this, kc85_state, i8155_pc_r))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, kc85_state, i8155_to_w))
+ i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
+ i8155.out_pa_callback().set(FUNC(kc85_state::i8155_pa_w));
+ i8155.out_pb_callback().set(FUNC(kc85_state::i8155_pb_w));
+ i8155.in_pc_callback().set(FUNC(kc85_state::i8155_pc_r));
+ i8155.out_to_callback().set(FUNC(kc85_state::i8155_to_w));
MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL(32'768), NOOP, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
@@ -1469,11 +1469,11 @@ MACHINE_CONFIG_START(trsm100_state::trsm100)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
/* devices */
- MCFG_DEVICE_ADD(I8155_TAG, I8155, XTAL(4'915'200)/2)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, kc85_state, i8155_pa_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, kc85_state, i8155_pb_w))
- MCFG_I8155_IN_PORTC_CB(READ8(*this, kc85_state, i8155_pc_r))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, kc85_state, i8155_to_w))
+ i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
+ i8155.out_pa_callback().set(FUNC(kc85_state::i8155_pa_w));
+ i8155.out_pb_callback().set(FUNC(kc85_state::i8155_pb_w));
+ i8155.in_pc_callback().set(FUNC(kc85_state::i8155_pc_r));
+ i8155.out_to_callback().set(FUNC(kc85_state::i8155_to_w));
MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL(32'768), NOOP, INPUTLINE(I8085_TAG, I8085_RST75_LINE))
@@ -1526,11 +1526,11 @@ MACHINE_CONFIG_START(tandy200_state::tandy200)
// MCFG_TCM5089_ADD(TCM5089_TAG, XTAL(3'579'545))
/* devices */
- MCFG_DEVICE_ADD(I8155_TAG, I8155, XTAL(4'915'200)/2)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, tandy200_state, i8155_pa_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, tandy200_state, i8155_pb_w))
- MCFG_I8155_IN_PORTC_CB(READ8(*this, tandy200_state, i8155_pc_r))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, tandy200_state, i8155_to_w))
+ i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
+ i8155.out_pa_callback().set(FUNC(tandy200_state::i8155_pa_w));
+ i8155.out_pb_callback().set(FUNC(tandy200_state::i8155_pb_w));
+ i8155.in_pc_callback().set(FUNC(tandy200_state::i8155_pc_r));
+ i8155.out_to_callback().set(FUNC(tandy200_state::i8155_to_w));
MCFG_DEVICE_ADD(RP5C01A_TAG, RP5C01, XTAL(32'768))
diff --git a/src/mame/drivers/mephistp.cpp b/src/mame/drivers/mephistp.cpp
index 915909fc55e..7ae993818ae 100644
--- a/src/mame/drivers/mephistp.cpp
+++ b/src/mame/drivers/mephistp.cpp
@@ -172,11 +172,13 @@ MACHINE_CONFIG_START(mephisto_pinball_state::mephisto)
//MCFG_I8256_IRQ_HANDLER(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
//MCFG_I8256_TXD_HANDLER(INPUTLINE("audiocpu", MCS51_RX_LINE))
- MCFG_DEVICE_ADD("ic20", I8155, XTAL(18'000'000)/6)
- //MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE("muart", i8256_device, write_txc))
+ I8155(config, "ic20", XTAL(18'000'000)/6);
+ //i8155_device &i8155_1(I8155(config, "ic20", XTAL(18'000'000)/6));
+ //i8155_1.out_to_callback().set("muart", FUNC(i8256_device::write_txc));
- MCFG_DEVICE_ADD("ic9", I8155, XTAL(18'000'000)/6)
- //MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, mephisto_pinball_state, clk_shift_w))
+ I8155(config, "ic9", XTAL(18'000'000)/6);
+ //i8155_device &i8155_2(I8155(config, "ic9", XTAL(18'000'000)/6));
+ //i8155_2.out_to_callback().set(FUNC(mephisto_pinball_state::clk_shift_w));
MCFG_DEVICE_ADD("soundcpu", I8051, XTAL(12'000'000))
MCFG_DEVICE_PROGRAM_MAP(mephisto_8051_map) // EA tied high for external program ROM
diff --git a/src/mame/drivers/meyc8088.cpp b/src/mame/drivers/meyc8088.cpp
index 04610e5e222..78b09f77814 100644
--- a/src/mame/drivers/meyc8088.cpp
+++ b/src/mame/drivers/meyc8088.cpp
@@ -370,19 +370,19 @@ MACHINE_CONFIG_START(meyc8088_state::meyc8088)
MCFG_DEVICE_ADD(m_maincpu, I8088, (XTAL(15'000'000) / 3) * 0.95) // NOTE: underclocked to prevent errors on diagnostics, MAME i8088 cycle timing is probably inaccurate
MCFG_DEVICE_PROGRAM_MAP(meyc8088_map)
- MCFG_DEVICE_ADD("i8155_1", I8155, XTAL(15'000'000) / (3*1))
+ i8155_device &i8155_1(I8155(config, "i8155_1", XTAL(15'000'000) / (3*1)));
// all ports set to input
- MCFG_I8155_IN_PORTA_CB(READ8(*this, meyc8088_state, input_r))
- MCFG_I8155_IN_PORTB_CB(IOPORT("SW"))
- MCFG_I8155_IN_PORTC_CB(READ8(*this, meyc8088_state, status_r))
+ i8155_1.in_pa_callback().set(FUNC(meyc8088_state::input_r));
+ i8155_1.in_pb_callback().set_ioport("SW");
+ i8155_1.in_pc_callback().set(FUNC(meyc8088_state::status_r));
// i8251A trigger txc/rxc (debug related, unpopulated on sold boards)
- MCFG_DEVICE_ADD("i8155_2", I8155, XTAL(15'000'000) / (3*32))
+ i8155_device &i8155_2(I8155(config, "i8155_2", XTAL(15'000'000) / (3*32)));
// all ports set to output
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, meyc8088_state, lights2_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, meyc8088_state, lights1_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, meyc8088_state, common_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE("dac", dac_bit_interface, write))
+ i8155_2.out_pa_callback().set(FUNC(meyc8088_state::lights2_w));
+ i8155_2.out_pb_callback().set(FUNC(meyc8088_state::lights1_w));
+ i8155_2.out_pc_callback().set(FUNC(meyc8088_state::common_w));
+ i8155_2.out_to_callback().set("dac", FUNC(dac_bit_interface::write));
MCFG_NVRAM_ADD_0FILL("nvram")
diff --git a/src/mame/drivers/paranoia.cpp b/src/mame/drivers/paranoia.cpp
index fbe47b2aa19..e51b1d7e0bd 100644
--- a/src/mame/drivers/paranoia.cpp
+++ b/src/mame/drivers/paranoia.cpp
@@ -185,11 +185,11 @@ MACHINE_CONFIG_START(paranoia_state::paranoia)
MCFG_DEVICE_PROGRAM_MAP(paranoia_z80_map)
MCFG_DEVICE_IO_MAP(paranoia_z80_io_map)
- MCFG_DEVICE_ADD("i8155", I8155, 1000000 /*?*/)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, paranoia_state, i8155_a_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, paranoia_state, i8155_b_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, paranoia_state, i8155_c_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, paranoia_state, i8155_timer_out))
+ i8155_device &i8155(I8155(config, "i8155", 1000000 /*?*/));
+ i8155.out_pa_callback().set(FUNC(paranoia_state::i8155_a_w));
+ i8155.out_pb_callback().set(FUNC(paranoia_state::i8155_b_w));
+ i8155.out_pc_callback().set(FUNC(paranoia_state::i8155_c_w));
+ i8155.out_to_callback().set(FUNC(paranoia_state::i8155_timer_out));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/sbugger.cpp b/src/mame/drivers/sbugger.cpp
index b7870da3b67..b45c15a53cb 100644
--- a/src/mame/drivers/sbugger.cpp
+++ b/src/mame/drivers/sbugger.cpp
@@ -220,11 +220,11 @@ MACHINE_CONFIG_START(sbugger_state::sbugger)
MCFG_DEVICE_PROGRAM_MAP(sbugger_map)
MCFG_DEVICE_IO_MAP(sbugger_io_map)
- MCFG_DEVICE_ADD("i8156", I8156, 200000) /* freq is an approximation */
- MCFG_I8155_IN_PORTA_CB(IOPORT("INPUTS"))
- MCFG_I8155_IN_PORTB_CB(IOPORT("DSW1"))
- MCFG_I8155_IN_PORTC_CB(IOPORT("DSW2"))
- MCFG_I8155_OUT_TIMEROUT_CB(INPUTLINE("maincpu", I8085_RST75_LINE))
+ i8156_device &i8156(I8156(config, "i8156", 200000)); /* freq is an approximation */
+ i8156.in_pa_callback().set_ioport("INPUTS");
+ i8156.in_pb_callback().set_ioport("DSW1");
+ i8156.in_pc_callback().set_ioport("DSW2");
+ i8156.out_to_callback().set_inputline(m_maincpu, I8085_RST75_LINE);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sbugger)
diff --git a/src/mame/drivers/sdk85.cpp b/src/mame/drivers/sdk85.cpp
index 239942208ae..dbca31faeb1 100644
--- a/src/mame/drivers/sdk85.cpp
+++ b/src/mame/drivers/sdk85.cpp
@@ -158,10 +158,10 @@ MACHINE_CONFIG_START(sdk85_state::sdk85)
MCFG_DEVICE_ADD("expromio", I8355, 6.144_MHz_XTAL / 2) // Expansion ROM (A15)
- MCFG_DEVICE_ADD("ramio", I8155, 6.144_MHz_XTAL / 2) // Basic RAM (A16)
- MCFG_I8155_OUT_TIMEROUT_CB(INPUTLINE("maincpu", I8085_TRAP_LINE))
+ i8155_device &i8155(I8155(config, "ramio", 6.144_MHz_XTAL / 2)); // Basic RAM (A16)
+ i8155.out_to_callback().set_inputline(m_maincpu, I8085_TRAP_LINE);
- MCFG_DEVICE_ADD("expramio", I8155, 6.144_MHz_XTAL / 2) // Expansion RAM (A17)
+ I8155(config, "expramio", 6.144_MHz_XTAL / 2); // Expansion RAM (A17)
/* video hardware */
config.set_default_layout(layout_sdk85);
diff --git a/src/mame/drivers/testconsole.cpp b/src/mame/drivers/testconsole.cpp
index ee68ee91d28..f9e118cc6c2 100644
--- a/src/mame/drivers/testconsole.cpp
+++ b/src/mame/drivers/testconsole.cpp
@@ -180,7 +180,7 @@ MACHINE_CONFIG_START(whouse_testcons_state::whousetc)
MCFG_DEVICE_PROGRAM_MAP(program_map)
MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_ADD("i8155", I8155, 6.144_MHz_XTAL)
+ I8155(config, "i8155", 6.144_MHz_XTAL);
MCFG_DEVICE_ADD("i8255", I8255, 0)
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index 6b04d125006..19daf8c831d 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -419,11 +419,11 @@ MACHINE_CONFIG_START(tourvision_state::tourvision)
MCFG_HUC6270_VRAM_SIZE(0x10000)
MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADD("i8155", I8155, 1000000 /*?*/)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(*this, tourvision_state, tourvision_i8155_a_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, tourvision_state, tourvision_i8155_b_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, tourvision_state, tourvision_i8155_c_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, tourvision_state, tourvision_timer_out))
+ i8155_device &i8155(I8155(config, "i8155", 1000000 /*?*/));
+ i8155.out_pa_callback().set(FUNC(tourvision_state::tourvision_i8155_a_w));
+ i8155.out_pb_callback().set(FUNC(tourvision_state::tourvision_i8155_b_w));
+ i8155.out_pc_callback().set(FUNC(tourvision_state::tourvision_i8155_c_w));
+ i8155.out_to_callback().set(FUNC(tourvision_state::tourvision_timer_out));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/unkhorse.cpp b/src/mame/drivers/unkhorse.cpp
index 290caa9a691..becbcfb60ee 100644
--- a/src/mame/drivers/unkhorse.cpp
+++ b/src/mame/drivers/unkhorse.cpp
@@ -199,10 +199,10 @@ MACHINE_CONFIG_START(horse_state::horse)
MCFG_DEVICE_PROGRAM_MAP(horse_map)
MCFG_DEVICE_IO_MAP(horse_io_map)
- MCFG_DEVICE_ADD("i8155", I8155, XTAL(12'000'000) / 4) // port A input, B output, C output but unused
- MCFG_I8155_IN_PORTA_CB(READ8(*this, horse_state, input_r))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, horse_state, output_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE("speaker", speaker_sound_device, level_w))
+ i8155_device &i8155(I8155(config, "i8155", XTAL(12'000'000) / 4)); // port A input, B output, C output but unused
+ i8155.in_pa_callback().set(FUNC(horse_state::input_r));
+ i8155.out_pb_callback().set(FUNC(horse_state::output_w));
+ i8155.out_to_callback().set("speaker", FUNC(speaker_sound_device::level_w));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp
index 010e24cf639..19455fbff65 100644
--- a/src/mame/drivers/vixen.cpp
+++ b/src/mame/drivers/vixen.cpp
@@ -764,16 +764,16 @@ MACHINE_CONFIG_START(vixen_state::vixen)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
// devices
- MCFG_DEVICE_ADD(P8155H_TAG, I8155, 23.9616_MHz_XTAL / 6)
- MCFG_I8155_IN_PORTA_CB(READ8(*this, vixen_state, i8155_pa_r))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, vixen_state, i8155_pb_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, vixen_state, i8155_pc_w))
-
- MCFG_DEVICE_ADD(P8155H_IO_TAG, I8155, 23.9616_MHz_XTAL / 6)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(m_ieee488, ieee488_device, host_dio_w))
- MCFG_I8155_OUT_PORTB_CB(WRITE8(*this, vixen_state, io_i8155_pb_w))
- MCFG_I8155_OUT_PORTC_CB(WRITE8(*this, vixen_state, io_i8155_pc_w))
- MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(*this, vixen_state, io_i8155_to_w))
+ i8155_device &i8155(I8155(config, P8155H_TAG, 23.9616_MHz_XTAL / 6));
+ i8155.in_pa_callback().set(FUNC(vixen_state::i8155_pa_r));
+ i8155.out_pb_callback().set(FUNC(vixen_state::i8155_pb_w));
+ i8155.out_pc_callback().set(FUNC(vixen_state::i8155_pc_w));
+
+ i8155_device &i8155_io(I8155(config, P8155H_IO_TAG, 23.9616_MHz_XTAL / 6));
+ i8155_io.out_pa_callback().set(m_ieee488, FUNC(ieee488_device::host_dio_w));
+ i8155_io.out_pb_callback().set(FUNC(vixen_state::io_i8155_pb_w));
+ i8155_io.out_pc_callback().set(FUNC(vixen_state::io_i8155_pc_w));
+ i8155_io.out_to_callback().set(FUNC(vixen_state::io_i8155_to_w));
MCFG_DEVICE_ADD(P8251A_TAG, I8251, 0)
MCFG_I8251_TXD_HANDLER(WRITELINE(RS232_TAG, rs232_port_device, write_txd))
diff --git a/src/mame/drivers/vp415.cpp b/src/mame/drivers/vp415.cpp
index 8bc039dc66c..0881c3e66ae 100644
--- a/src/mame/drivers/vp415.cpp
+++ b/src/mame/drivers/vp415.cpp
@@ -528,10 +528,10 @@ MACHINE_CONFIG_START(vp415_state::vp415)
MCFG_DEVICE_PROGRAM_MAP(drive_program_map)
MCFG_DEVICE_IO_MAP(drive_io_map)
- MCFG_DEVICE_ADD(I8155_TAG, I8155, 0)
- MCFG_I8155_OUT_PORTA_CB(WRITE8(CHARGEN_TAG, mb88303_device, da_w))
- MCFG_I8155_IN_PORTB_CB(READ8(*this, vp415_state, drive_i8155_pb_r))
- MCFG_I8155_IN_PORTC_CB(READ8(*this, vp415_state, drive_i8155_pc_r))
+ i8155_device &i8155(I8155(config, I8155_TAG, 0));
+ i8155.out_pa_callback().set(CHARGEN_TAG, FUNC(mb88303_device::da_w));
+ i8155.in_pb_callback().set(FUNC(vp415_state::drive_i8155_pb_r));
+ i8155.in_pc_callback().set(FUNC(vp415_state::drive_i8155_pc_r));
MCFG_DEVICE_ADD(I8255_TAG, I8255, 0)
MCFG_I8255_OUT_PORTA_CB(WRITE8(*this, vp415_state, drive_i8255_pa_w))