summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-12 06:07:51 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-12 06:07:51 +0000
commit17e66e39fd2aeb6e083a8567d281df9235b9f2f4 (patch)
treea34dfe5941829bc939167c207f65b5cf7f57078f /src/mess
parent0ef1e6deb4923b27f4c1d95825e453f565b129a3 (diff)
Clear out remaining global inlines in diexec.h.
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/drivers/abc1600.c2
-rw-r--r--src/mess/drivers/adam.c6
-rw-r--r--src/mess/drivers/alphatro.c2
-rw-r--r--src/mess/drivers/apollo.c2
-rw-r--r--src/mess/drivers/apple2.c4
-rw-r--r--src/mess/drivers/apple2gs.c2
-rw-r--r--src/mess/drivers/apricot.c2
-rw-r--r--src/mess/drivers/apricotp.c2
-rw-r--r--src/mess/drivers/atarist.c6
-rw-r--r--src/mess/drivers/avigo.c4
-rw-r--r--src/mess/drivers/bml3.c6
-rw-r--r--src/mess/drivers/bw2.c4
-rw-r--r--src/mess/drivers/cat.c2
-rw-r--r--src/mess/drivers/cxhumax.c12
-rw-r--r--src/mess/drivers/d6800.c2
-rw-r--r--src/mess/drivers/dc.c4
-rw-r--r--src/mess/drivers/dmv.c2
-rw-r--r--src/mess/drivers/eacc.c6
-rw-r--r--src/mess/drivers/elwro800.c2
-rw-r--r--src/mess/drivers/enterp.c2
-rw-r--r--src/mess/drivers/esq5505.c12
-rw-r--r--src/mess/drivers/exelv.c2
-rw-r--r--src/mess/drivers/fidelz80.c6
-rw-r--r--src/mess/drivers/fk1.c2
-rw-r--r--src/mess/drivers/fm7.c4
-rw-r--r--src/mess/drivers/fmtowns.c10
-rw-r--r--src/mess/drivers/gba.c6
-rw-r--r--src/mess/drivers/geneve.c4
-rw-r--r--src/mess/drivers/gp32.c6
-rw-r--r--src/mess/drivers/h8.c6
-rw-r--r--src/mess/drivers/h89.c2
-rw-r--r--src/mess/drivers/homelab.c4
-rw-r--r--src/mess/drivers/homez80.c2
-rw-r--r--src/mess/drivers/iq151.c4
-rw-r--r--src/mess/drivers/jr200.c2
-rw-r--r--src/mess/drivers/kyocera.c2
-rw-r--r--src/mess/drivers/m20.c10
-rw-r--r--src/mess/drivers/m5.c4
-rw-r--r--src/mess/drivers/mac.c24
-rw-r--r--src/mess/drivers/micronic.c2
-rw-r--r--src/mess/drivers/mikromik.c2
-rw-r--r--src/mess/drivers/mirage.c4
-rw-r--r--src/mess/drivers/mk1.c2
-rw-r--r--src/mess/drivers/mod8.c2
-rw-r--r--src/mess/drivers/mstation.c4
-rw-r--r--src/mess/drivers/multi16.c2
-rw-r--r--src/mess/drivers/mz2500.c2
-rw-r--r--src/mess/drivers/nakajies.c4
-rw-r--r--src/mess/drivers/ng_aes.c10
-rw-r--r--src/mess/drivers/ngp.c26
-rw-r--r--src/mess/drivers/ondra.c2
-rw-r--r--src/mess/drivers/osbexec.c4
-rw-r--r--src/mess/drivers/paso1600.c2
-rw-r--r--src/mess/drivers/pasogo.c2
-rw-r--r--src/mess/drivers/pc100.c2
-rw-r--r--src/mess/drivers/pc1512.c4
-rw-r--r--src/mess/drivers/pc6001.c12
-rw-r--r--src/mess/drivers/pc8801.c8
-rw-r--r--src/mess/drivers/pc88va.c4
-rw-r--r--src/mess/drivers/pc9801.c4
-rw-r--r--src/mess/drivers/pce220.c6
-rw-r--r--src/mess/drivers/pcfx.c4
-rw-r--r--src/mess/drivers/pcw.c2
-rw-r--r--src/mess/drivers/pdp1.c2
-rw-r--r--src/mess/drivers/pegasus.c2
-rw-r--r--src/mess/drivers/pk8000.c4
-rw-r--r--src/mess/drivers/pockstat.c8
-rw-r--r--src/mess/drivers/portfoli.c4
-rw-r--r--src/mess/drivers/prestige.c4
-rw-r--r--src/mess/drivers/pv1000.c4
-rw-r--r--src/mess/drivers/pv2000.c2
-rw-r--r--src/mess/drivers/pyl601.c2
-rw-r--r--src/mess/drivers/ql.c10
-rw-r--r--src/mess/drivers/qx10.c2
-rw-r--r--src/mess/drivers/rainbow.c22
-rw-r--r--src/mess/drivers/rex6000.c12
-rw-r--r--src/mess/drivers/samcoupe.c2
-rw-r--r--src/mess/drivers/sm1800.c2
-rw-r--r--src/mess/drivers/smc777.c2
-rw-r--r--src/mess/drivers/socrates.c4
-rw-r--r--src/mess/drivers/spectrum.c2
-rw-r--r--src/mess/drivers/supracan.c28
-rw-r--r--src/mess/drivers/svision.c2
-rw-r--r--src/mess/drivers/tandy2k.c4
-rw-r--r--src/mess/drivers/tek405x.c4
-rw-r--r--src/mess/drivers/ti99_2.c2
-rw-r--r--src/mess/drivers/ti99_4p.c2
-rw-r--r--src/mess/drivers/trs80m2.c2
-rw-r--r--src/mess/drivers/tsispch.c2
-rw-r--r--src/mess/drivers/tvc.c4
-rw-r--r--src/mess/drivers/v1050.c14
-rw-r--r--src/mess/drivers/vboy.c10
-rw-r--r--src/mess/drivers/victor9k.c4
-rw-r--r--src/mess/drivers/vidbrain.c2
-rw-r--r--src/mess/drivers/vixen.c4
-rw-r--r--src/mess/drivers/vk100.c10
-rw-r--r--src/mess/drivers/vt100.c4
-rw-r--r--src/mess/drivers/vt240.c2
-rw-r--r--src/mess/drivers/wangpc.c2
-rw-r--r--src/mess/drivers/x07.c14
-rw-r--r--src/mess/drivers/x1.c10
-rw-r--r--src/mess/drivers/x1twin.c4
-rw-r--r--src/mess/drivers/x68k.c2
-rw-r--r--src/mess/drivers/xerox820.c8
-rw-r--r--src/mess/drivers/xor100.c6
-rw-r--r--src/mess/drivers/z100.c2
-rw-r--r--src/mess/includes/fmtowns.h2
-rw-r--r--src/mess/includes/nes.h2
-rw-r--r--src/mess/includes/pc.h2
-rw-r--r--src/mess/machine/a2bus.c2
-rw-r--r--src/mess/machine/a2bus.h2
-rw-r--r--src/mess/machine/a2eauxslot.c2
-rw-r--r--src/mess/machine/a2eauxslot.h2
-rw-r--r--src/mess/machine/a2softcard.c10
-rw-r--r--src/mess/machine/a2themill.c22
-rw-r--r--src/mess/machine/abc77.c8
-rw-r--r--src/mess/machine/abc99.c14
-rw-r--r--src/mess/machine/advision.c8
-rw-r--r--src/mess/machine/amigacrt.c2
-rw-r--r--src/mess/machine/amstrad.c8
-rw-r--r--src/mess/machine/at.c4
-rw-r--r--src/mess/machine/b2m.c2
-rw-r--r--src/mess/machine/bbc.c2
-rw-r--r--src/mess/machine/bk.c4
-rw-r--r--src/mess/machine/c64_cpm.c8
-rw-r--r--src/mess/machine/compis.c8
-rw-r--r--src/mess/machine/cuda.c32
-rw-r--r--src/mess/machine/dec_lk201.c14
-rw-r--r--src/mess/machine/dgn_beta.c6
-rw-r--r--src/mess/machine/ecbbus.c2
-rw-r--r--src/mess/machine/ecbbus.h2
-rw-r--r--src/mess/machine/egret.c10
-rw-r--r--src/mess/machine/galaxy.c10
-rw-r--r--src/mess/machine/genpc.c4
-rw-r--r--src/mess/machine/hd63450.c4
-rw-r--r--src/mess/machine/i82371ab.c2
-rw-r--r--src/mess/machine/i82371sb.c2
-rw-r--r--src/mess/machine/intv.c18
-rw-r--r--src/mess/machine/isa.c88
-rw-r--r--src/mess/machine/isa.h2
-rw-r--r--src/mess/machine/kb_keytro.c4
-rw-r--r--src/mess/machine/kc_d004.c10
-rw-r--r--src/mess/machine/lisa.c2
-rw-r--r--src/mess/machine/mac.c4
-rw-r--r--src/mess/machine/macpci.c4
-rw-r--r--src/mess/machine/mbc55x.c2
-rw-r--r--src/mess/machine/mboard.c6
-rw-r--r--src/mess/machine/mc68328.c28
-rw-r--r--src/mess/machine/mc80.c4
-rw-r--r--src/mess/machine/mpc105.c4
-rw-r--r--src/mess/machine/mpc105.h2
-rw-r--r--src/mess/machine/msx.c2
-rw-r--r--src/mess/machine/nes.c8
-rw-r--r--src/mess/machine/nes_ines.c2
-rw-r--r--src/mess/machine/nes_pcb.c46
-rw-r--r--src/mess/machine/nubus.c46
-rw-r--r--src/mess/machine/nubus.h2
-rw-r--r--src/mess/machine/orion.c2
-rw-r--r--src/mess/machine/pc.c20
-rw-r--r--src/mess/machine/pc1512kb.c6
-rw-r--r--src/mess/machine/pet.c14
-rw-r--r--src/mess/machine/pk8020.c2
-rw-r--r--src/mess/machine/poly88.c8
-rw-r--r--src/mess/machine/primo.c2
-rw-r--r--src/mess/machine/rmnimbus.c4
-rw-r--r--src/mess/machine/s100.c2
-rw-r--r--src/mess/machine/s100.h2
-rw-r--r--src/mess/machine/sms.c2
-rw-r--r--src/mess/machine/southbridge.c4
-rw-r--r--src/mess/machine/svi318.c2
-rw-r--r--src/mess/machine/tf20.c2
-rw-r--r--src/mess/machine/ti85.c10
-rw-r--r--src/mess/machine/ti99/spchsyn.c6
-rw-r--r--src/mess/machine/ti99/speech8.c6
-rw-r--r--src/mess/machine/trs80.c4
-rw-r--r--src/mess/machine/vector06.c4
-rw-r--r--src/mess/machine/x68k_neptunex.c2
-rw-r--r--src/mess/machine/zx.c2
-rw-r--r--src/mess/video/a7800.c4
-rw-r--r--src/mess/video/atarist.c4
-rw-r--r--src/mess/video/mac.c12
-rw-r--r--src/mess/video/mos6566.c6
-rw-r--r--src/mess/video/v1050.c2
-rw-r--r--src/mess/video/vic6567.c6
-rw-r--r--src/mess/video/zx8301.c4
185 files changed, 585 insertions, 585 deletions
diff --git a/src/mess/drivers/abc1600.c b/src/mess/drivers/abc1600.c
index c78a4b14e02..904c11329e1 100644
--- a/src/mess/drivers/abc1600.c
+++ b/src/mess/drivers/abc1600.c
@@ -1849,7 +1849,7 @@ static IRQ_CALLBACK( abc1600_int_ack )
void abc1600_state::machine_start()
{
// interrupt callback
- device_set_irq_callback(m_maincpu, abc1600_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(abc1600_int_ack);
// HACK fill segment RAM with non-zero values or no boot
memset(m_segment_ram, 0xcd, 0x400);
diff --git a/src/mess/drivers/adam.c b/src/mess/drivers/adam.c
index d750d606c02..e09d02b883f 100644
--- a/src/mess/drivers/adam.c
+++ b/src/mess/drivers/adam.c
@@ -1171,7 +1171,7 @@ static TIMER_DEVICE_CALLBACK( paddle_tick )
// TODO: improve irq behaviour (see drivers/coleco.c)
if (coleco_scan_paddles(timer.machine(), &state->m_joy_status0, &state->m_joy_status1))
- device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
}
@@ -1606,8 +1606,8 @@ WRITE_LINE_MEMBER( adam_state::os3_w )
//logerror("Master 6801 read from %04x data %02x\n", m_ba, m_data_out);
- device_set_input_line(m_netcpu, M6801_SC1_LINE, ASSERT_LINE);
- device_set_input_line(m_netcpu, M6801_SC1_LINE, CLEAR_LINE);
+ m_netcpu->set_input_line(M6801_SC1_LINE, ASSERT_LINE);
+ m_netcpu->set_input_line(M6801_SC1_LINE, CLEAR_LINE);
}
}
}
diff --git a/src/mess/drivers/alphatro.c b/src/mess/drivers/alphatro.c
index 866613afb88..8fb00b9cb4c 100644
--- a/src/mess/drivers/alphatro.c
+++ b/src/mess/drivers/alphatro.c
@@ -178,7 +178,7 @@ static MC6845_UPDATE_ROW( alphatro_update_row )
INPUT_CHANGED_MEMBER( alphatro_state::alphatro_break )
{
- device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE);
}
static ADDRESS_MAP_START( alphatro_map, AS_PROGRAM, 8, alphatro_state )
diff --git a/src/mess/drivers/apollo.c b/src/mess/drivers/apollo.c
index b67125493e5..37c962f98c1 100644
--- a/src/mess/drivers/apollo.c
+++ b/src/mess/drivers/apollo.c
@@ -1080,7 +1080,7 @@ DRIVER_INIT_MEMBER(apollo_state,dn3500)
{
// MLOG1(("driver_init_dn3500"));
- device_set_irq_callback(machine().device(MAINCPU), apollo_irq_acknowledge);
+ machine().device(MAINCPU)->execute().set_irq_acknowledge_callback(apollo_irq_acknowledge);
/* hook the RESET line, which resets a slew of other components */
m68k_set_reset_callback(machine().device(MAINCPU), apollo_reset_instr_callback);
diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c
index e3d5a360cc4..757aaca9112 100644
--- a/src/mess/drivers/apple2.c
+++ b/src/mess/drivers/apple2.c
@@ -225,14 +225,14 @@ static WRITE8_DEVICE_HANDLER(a2bus_irq_w)
{
apple2_state *a2 = device->machine().driver_data<apple2_state>();
- device_set_input_line(a2->m_maincpu, M6502_IRQ_LINE, data);
+ a2->m_maincpu->set_input_line(M6502_IRQ_LINE, data);
}
static WRITE8_DEVICE_HANDLER(a2bus_nmi_w)
{
apple2_state *a2 = device->machine().driver_data<apple2_state>();
- device_set_input_line(a2->m_maincpu, INPUT_LINE_NMI, data);
+ a2->m_maincpu->set_input_line(INPUT_LINE_NMI, data);
}
static WRITE8_DEVICE_HANDLER(a2bus_inh_w)
diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c
index 54fcb523d4c..439e7605644 100644
--- a/src/mess/drivers/apple2gs.c
+++ b/src/mess/drivers/apple2gs.c
@@ -198,7 +198,7 @@ static WRITE8_DEVICE_HANDLER(a2bus_nmi_w)
{
apple2gs_state *a2 = device->machine().driver_data<apple2gs_state>();
- device_set_input_line(a2->m_maincpu, INPUT_LINE_NMI, data);
+ a2->m_maincpu->set_input_line(INPUT_LINE_NMI, data);
}
static WRITE8_DEVICE_HANDLER(a2bus_inh_w)
diff --git a/src/mess/drivers/apricot.c b/src/mess/drivers/apricot.c
index 8dc79faa328..a8a0c9dcb76 100644
--- a/src/mess/drivers/apricot.c
+++ b/src/mess/drivers/apricot.c
@@ -264,7 +264,7 @@ DRIVER_INIT_MEMBER(apricot_state,apricot)
prg->unmap_readwrite(0x40000, 0xeffff);
prg->install_ram(0x00000, ram_size - 1, ram);
- device_set_irq_callback(m_maincpu, apricot_irq_ack);
+ m_maincpu->set_irq_acknowledge_callback(apricot_irq_ack);
m_video_mode = 0;
m_display_on = 1;
diff --git a/src/mess/drivers/apricotp.c b/src/mess/drivers/apricotp.c
index cc09df9bbc6..5aed9a8cad7 100644
--- a/src/mess/drivers/apricotp.c
+++ b/src/mess/drivers/apricotp.c
@@ -557,7 +557,7 @@ static const sn76496_config psg_intf =
void fp_state::machine_start()
{
// register CPU IRQ callback
- device_set_irq_callback(m_maincpu, fp_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(fp_irq_callback);
// allocate memory
m_work_ram = auto_alloc_array(machine(), UINT16, m_ram->size() / 2);
diff --git a/src/mess/drivers/atarist.c b/src/mess/drivers/atarist.c
index 08a83897d52..1b2a3adb9bf 100644
--- a/src/mess/drivers/atarist.c
+++ b/src/mess/drivers/atarist.c
@@ -2205,7 +2205,7 @@ void st_state::machine_start()
configure_memory();
// set CPU interrupt callback
- device_set_irq_callback(m_maincpu, atarist_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(atarist_int_ack);
// allocate timers
m_mouse_timer = machine().scheduler().timer_alloc(FUNC(st_mouse_tick));
@@ -2262,7 +2262,7 @@ void ste_state::machine_start()
configure_memory();
/* set CPU interrupt callback */
- device_set_irq_callback(m_maincpu, atarist_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(atarist_int_ack);
/* allocate timers */
m_dmasound_timer = machine().scheduler().timer_alloc(FUNC(atariste_dmasound_tick));
@@ -2302,7 +2302,7 @@ void stbook_state::machine_start()
}
/* set CPU interrupt callback */
- device_set_irq_callback(m_maincpu, atarist_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(atarist_int_ack);
/* register for state saving */
ste_state::state_save();
diff --git a/src/mess/drivers/avigo.c b/src/mess/drivers/avigo.c
index d8d5b07f454..b835a3c8424 100644
--- a/src/mess/drivers/avigo.c
+++ b/src/mess/drivers/avigo.c
@@ -129,9 +129,9 @@ WRITE8_MEMBER(avigo_state::flash_0x8000_write_handler)
void avigo_state::refresh_ints()
{
if (m_irq!=0)
- device_set_input_line(m_maincpu, 0, HOLD_LINE);
+ m_maincpu->set_input_line(0, HOLD_LINE);
else
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
/* does not do anything yet */
diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c
index 55d96f8e8ef..0644bc45a77 100644
--- a/src/mess/drivers/bml3.c
+++ b/src/mess/drivers/bml3.c
@@ -381,7 +381,7 @@ WRITE8_MEMBER( bml3_state::bml3_firq_mask_w)
if(m_firq_mask)
{
m_firq_status = 0; // clear pending firq
- device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
}
}
@@ -389,7 +389,7 @@ READ8_MEMBER( bml3_state::bml3_firq_status_r )
{
UINT8 res = m_firq_status << 7;
m_firq_status = 0;
- device_set_input_line(m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE);
+ m_maincpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
return res;
}
@@ -610,7 +610,7 @@ static INTERRUPT_GEN( bml3_timer_firq )
if(!state->m_firq_mask)
{
- device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, ASSERT_LINE);
+ state->m_maincpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
state->m_firq_status = 1;
}
}
diff --git a/src/mess/drivers/bw2.c b/src/mess/drivers/bw2.c
index 2802705d58b..bb4d01aeefc 100644
--- a/src/mess/drivers/bw2.c
+++ b/src/mess/drivers/bw2.c
@@ -226,12 +226,12 @@ WRITE_LINE_MEMBER( bw2_state::fdc_drq_w )
{
if (m_maincpu->state_int(Z80_HALT))
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, HOLD_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE);
}
}
else
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
}
diff --git a/src/mess/drivers/cat.c b/src/mess/drivers/cat.c
index debf6b54dc7..8da1025b68e 100644
--- a/src/mess/drivers/cat.c
+++ b/src/mess/drivers/cat.c
@@ -312,7 +312,7 @@ static MACHINE_START(cat)
static MACHINE_RESET(cat)
{
cat_state *state = machine.driver_data<cat_state>();
- device_set_irq_callback(machine.device("maincpu"), cat_int_ack);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(cat_int_ack);
state->m_keyboard_timer->adjust(attotime::zero, 0, attotime::from_hz(120));
}
diff --git a/src/mess/drivers/cxhumax.c b/src/mess/drivers/cxhumax.c
index f1466d540b5..86d9a100a40 100644
--- a/src/mess/drivers/cxhumax.c
+++ b/src/mess/drivers/cxhumax.c
@@ -101,7 +101,7 @@ WRITE32_MEMBER( cxhumax_state::cx_gxa_w )
if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)])
|| (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]))
- device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
break;
default:
@@ -322,7 +322,7 @@ static TIMER_CALLBACK( timer_tick )
/* Interrupt if Timer interrupt is not masked in ITC_INTENABLE_REG */
if (state->m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)] & INT_TIMER_BIT)
- device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
}
}
attotime period = attotime::from_hz(XTAL_54MHz)*state->m_timer_regs.timer[param].timebase;
@@ -418,7 +418,7 @@ WRITE32_MEMBER( cxhumax_state::cx_uart2_w )
/* If INT is enabled at INT Ctrl raise it */
if(m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]&INT_UART2_BIT) {
- device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
}
}
}
@@ -548,9 +548,9 @@ WRITE32_MEMBER( cxhumax_state::cx_intctrl_w )
/* check if */
if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)])
|| (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]))
- device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
else
- device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
}
@@ -734,7 +734,7 @@ WRITE32_MEMBER( cxhumax_state::cx_i2c1_w )
m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= 1<<7;
if (m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)] & (1<<7)) {
verboselog( machine(), 9, "(I2C1) Int\n" );
- device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
}
break;
case I2C_STAT_REG:
diff --git a/src/mess/drivers/d6800.c b/src/mess/drivers/d6800.c
index 2db7581020e..5a31b311572 100644
--- a/src/mess/drivers/d6800.c
+++ b/src/mess/drivers/d6800.c
@@ -183,7 +183,7 @@ static TIMER_DEVICE_CALLBACK( d6800_p )
{
d6800_state *state = timer.machine().driver_data<d6800_state>();
state->m_rtc++;
- device_set_input_line(state->m_maincpu, M6800_IRQ_LINE, (state->m_rtc > 0xf8) ? ASSERT_LINE : CLEAR_LINE);
+ state->m_maincpu->set_input_line(M6800_IRQ_LINE, (state->m_rtc > 0xf8) ? ASSERT_LINE : CLEAR_LINE);
}
diff --git a/src/mess/drivers/dc.c b/src/mess/drivers/dc.c
index ccc7f44275c..5f1a6d2872a 100644
--- a/src/mess/drivers/dc.c
+++ b/src/mess/drivers/dc.c
@@ -45,7 +45,7 @@ static UINT64 *dc_ram;
static READ64_HANDLER( dcus_idle_skip_r )
{
if (space->device().safe_pc()==0xc0ba52a)
- device_spin_until_time(&space->device(), attotime::from_usec(2500));
+ space->device().execute().spin_until_time(attotime::from_usec(2500));
// device_spinuntil_int(&space->device());
return dc_ram[0x2303b0/8];
@@ -54,7 +54,7 @@ static READ64_HANDLER( dcus_idle_skip_r )
static READ64_HANDLER( dcjp_idle_skip_r )
{
if (space->device().safe_pc()==0xc0bac62)
- device_spin_until_time(&space->device(), attotime::from_usec(2500));
+ space->device().execute().spin_until_time(attotime::from_usec(2500));
// device_spinuntil_int(&space->device());
return dc_ram[0x2302f8/8];
diff --git a/src/mess/drivers/dmv.c b/src/mess/drivers/dmv.c
index 2d717d7fc39..ebce5851c1c 100644
--- a/src/mess/drivers/dmv.c
+++ b/src/mess/drivers/dmv.c
@@ -271,7 +271,7 @@ static const upd765_interface dmv_interface =
WRITE_LINE_MEMBER( dmv_state::dma_hrq_changed )
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
// Assert HLDA
i8237_hlda_w(m_dmac, state);
diff --git a/src/mess/drivers/eacc.c b/src/mess/drivers/eacc.c
index 1d5bcfa3488..7e2666ee3d5 100644
--- a/src/mess/drivers/eacc.c
+++ b/src/mess/drivers/eacc.c
@@ -138,7 +138,7 @@ static TIMER_DEVICE_CALLBACK( eacc_cb1 )
eacc_state *state = timer.machine().driver_data<eacc_state>();
state->m_cb1 ^= 1; // 15hz
if (state->m_cb2)
- device_set_input_line(state->m_maincpu, M6800_IRQ_LINE, ASSERT_LINE);
+ state->m_maincpu->set_input_line(M6800_IRQ_LINE, ASSERT_LINE);
}
static TIMER_DEVICE_CALLBACK( eacc_nmi )
@@ -148,7 +148,7 @@ static TIMER_DEVICE_CALLBACK( eacc_nmi )
if (state->m_cb2)
{
state->m_nmi = true;
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
}
@@ -226,7 +226,7 @@ WRITE8_MEMBER( eacc_state::eacc_digit_w )
{
if (m_nmi)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
m_nmi = false;
}
m_digit = data & 0xf8;
diff --git a/src/mess/drivers/elwro800.c b/src/mess/drivers/elwro800.c
index 7f27ada96eb..6d356393f0a 100644
--- a/src/mess/drivers/elwro800.c
+++ b/src/mess/drivers/elwro800.c
@@ -537,7 +537,7 @@ static const cassette_interface elwro800jr_cassette_interface =
static INTERRUPT_GEN( elwro800jr_interrupt )
{
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static const floppy_interface elwro800jr_floppy_interface =
diff --git a/src/mess/drivers/enterp.c b/src/mess/drivers/enterp.c
index 32683d3e002..7dd4a07917d 100644
--- a/src/mess/drivers/enterp.c
+++ b/src/mess/drivers/enterp.c
@@ -172,7 +172,7 @@ static const dave_interface enterprise_dave_interface =
static MACHINE_RESET( enterprise )
{
- device_set_input_line_vector(machine.device("maincpu"), 0, 0xff);
+ machine.device("maincpu")->execute().set_input_line_vector(0, 0xff);
}
diff --git a/src/mess/drivers/esq5505.c b/src/mess/drivers/esq5505.c
index 682d225a819..85d1be5843d 100644
--- a/src/mess/drivers/esq5505.c
+++ b/src/mess/drivers/esq5505.c
@@ -76,7 +76,7 @@ public:
m_dmac(*this, "mc68450")
{ }
- required_device<device_t> m_maincpu;
+ required_device<m68000_device> m_maincpu;
required_device<device_t> m_duart;
optional_device<wd1772_t> m_fdc;
optional_device<esq1x22_t> m_epsvfd;
@@ -270,12 +270,12 @@ static void duart_irq_handler(device_t *device, int state, UINT8 vector)
// printf("\nDUART IRQ: state %d vector %d\n", state, vector);
if (state == ASSERT_LINE)
{
- device_set_input_line_vector(esq5505->m_maincpu, 1, vector);
- device_set_input_line(esq5505->m_maincpu, 1, ASSERT_LINE);
+ esq5505->m_maincpu->set_input_line_vector(1, vector);
+ esq5505->m_maincpu->set_input_line(1, ASSERT_LINE);
}
else
{
- device_set_input_line(esq5505->m_maincpu, 1, CLEAR_LINE);
+ esq5505->m_maincpu->set_input_line(1, CLEAR_LINE);
}
};
@@ -299,7 +299,7 @@ static void duart_output(device_t *device, UINT8 data)
floppy->ss_w((data & 2)>>1);
}
-// printf("DUART output: %02x (PC=%x)\n", data, state->m_maincpu->safe_pc());
+// printf("DUART output: %02x (PC=%x)\n", data, state->m_maincpu->pc());
}
static void duart_tx(device_t *device, int channel, UINT8 data)
@@ -308,7 +308,7 @@ static void duart_tx(device_t *device, int channel, UINT8 data)
if (channel == 1)
{
-// printf("ch %d: [%02x] (PC=%x)\n", channel, data, state->m_maincpu->safe_pc());
+// printf("ch %d: [%02x] (PC=%x)\n", channel, data, state->m_maincpu->pc());
switch (state->m_system_type)
{
case GENERIC:
diff --git a/src/mess/drivers/exelv.c b/src/mess/drivers/exelv.c
index 8618dd78c07..af87fba7c4a 100644
--- a/src/mess/drivers/exelv.c
+++ b/src/mess/drivers/exelv.c
@@ -321,7 +321,7 @@ WRITE8_MEMBER(exelv_state::tms7041_portb_w)
tms5220_wsq_w(m_tms5220c, (data & 0x01) ? 1 : 0);
tms5220_rsq_w(m_tms5220c, (data & 0x02) ? 1 : 0);
- device_set_input_line(m_maincpu, TMS7000_IRQ1_LINE, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(TMS7000_IRQ1_LINE, (data & 0x04) ? CLEAR_LINE : ASSERT_LINE);
/* Check for low->high transition on B6 */
if (!(m_tms7041_portb & 0x40) && (data & 0x40))
diff --git a/src/mess/drivers/fidelz80.c b/src/mess/drivers/fidelz80.c
index 10594ace3bb..f5e345e7940 100644
--- a/src/mess/drivers/fidelz80.c
+++ b/src/mess/drivers/fidelz80.c
@@ -1087,15 +1087,15 @@ static INPUT_CHANGED( fidelz80_trigger_reset )
{
fidelz80_state *state = field.machine().driver_data<fidelz80_state>();
- device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_CHANGED( abc_trigger_reset )
{
fidelz80_state *state = field.machine().driver_data<fidelz80_state>();
- device_set_input_line(state->m_maincpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
- device_set_input_line(state->m_i8041, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_i8041->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
}
static INPUT_PORTS_START( fidelz80 )
diff --git a/src/mess/drivers/fk1.c b/src/mess/drivers/fk1.c
index 1f21478eed4..80b86c3d9f9 100644
--- a/src/mess/drivers/fk1.c
+++ b/src/mess/drivers/fk1.c
@@ -434,7 +434,7 @@ MACHINE_RESET_MEMBER( fk1_state )
membank("bank3")->set_base(ram + 0x8000);
membank("bank4")->set_base(ram + 0xc000);
- device_set_irq_callback(machine().device("maincpu"), fk1_irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(fk1_irq_callback);
}
SCREEN_UPDATE16_MEMBER( fk1_state )
diff --git a/src/mess/drivers/fm7.c b/src/mess/drivers/fm7.c
index 481acd1acff..c8ad1636d23 100644
--- a/src/mess/drivers/fm7.c
+++ b/src/mess/drivers/fm7.c
@@ -1838,8 +1838,8 @@ DRIVER_INIT_MEMBER(fm7_state,fm7)
m_subtimer = machine().scheduler().timer_alloc(FUNC(fm7_subtimer_irq));
m_keyboard_timer = machine().scheduler().timer_alloc(FUNC(fm7_keyboard_poll));
m_fm77av_vsync_timer = machine().scheduler().timer_alloc(FUNC(fm77av_vsync));
- device_set_irq_callback(machine().device("maincpu"),fm7_irq_ack);
- device_set_irq_callback(machine().device("sub"),fm7_sub_irq_ack);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(fm7_irq_ack);
+ machine().device("sub")->execute().set_irq_acknowledge_callback(fm7_sub_irq_ack);
}
static MACHINE_START(fm7)
diff --git a/src/mess/drivers/fmtowns.c b/src/mess/drivers/fmtowns.c
index 14f81c1ac03..d9cd88dc2a1 100644
--- a/src/mess/drivers/fmtowns.c
+++ b/src/mess/drivers/fmtowns.c
@@ -374,7 +374,7 @@ void towns_state::intervaltimer2_timeout()
void towns_state::wait_end()
{
- device_set_input_line(m_maincpu,INPUT_LINE_HALT,CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT,CLEAR_LINE);
}
READ8_MEMBER(towns_state::towns_sys6c_r)
@@ -386,7 +386,7 @@ READ8_MEMBER(towns_state::towns_sys6c_r)
WRITE8_MEMBER(towns_state::towns_sys6c_w)
{
// halts the CPU for 1 microsecond
- device_set_input_line(m_maincpu,INPUT_LINE_HALT,ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT,ASSERT_LINE);
m_towns_wait_timer->adjust(attotime::from_usec(1),0,attotime::never);
}
@@ -2458,7 +2458,7 @@ void towns_state::driver_start()
// CD-ROM init
m_towns_cd.read_timer = machine().scheduler().timer_alloc(FUNC(towns_cdrom_read_byte), (void*)machine().device("dma_1"));
- device_set_irq_callback(machine().device("maincpu"), towns_irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(towns_irq_callback);
machine().device("maincpu")->memory().space(AS_PROGRAM)->install_ram(0x100000,machine().device<ram_device>(RAM_TAG)->size()-1,0xffffffff,0,NULL);
}
@@ -2474,8 +2474,8 @@ void towns_state::machine_reset()
{
address_space *program;
- m_maincpu = machine().device("maincpu");
- program = m_maincpu->memory().space(AS_PROGRAM);
+ m_maincpu = machine().device<cpu_device>("maincpu");
+ program = m_maincpu->space(AS_PROGRAM);
m_dma_1 = machine().device("dma_1");
m_dma_2 = machine().device("dma_2");
m_fdc = machine().device("fdc");
diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c
index 38452d36fc7..025e2538605 100644
--- a/src/mess/drivers/gba.c
+++ b/src/mess/drivers/gba.c
@@ -98,8 +98,8 @@ static void gba_request_irq(running_machine &machine, UINT32 int_type)
// master enable?
if (state->m_IME & 1)
{
- device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
- device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
}
}
}
@@ -1889,7 +1889,7 @@ WRITE32_MEMBER(gba_state::gba_io_w)
m_HALTCNT = data & 0x000000ff;
// either way, wait for an IRQ
- device_spin_until_interrupt(machine().device("maincpu"));
+ machine().device("maincpu")->execute().spin_until_interrupt();
}
}
if( (mem_mask) & 0xffff0000 )
diff --git a/src/mess/drivers/geneve.c b/src/mess/drivers/geneve.c
index 48caeff9c3d..cc70070ae59 100644
--- a/src/mess/drivers/geneve.c
+++ b/src/mess/drivers/geneve.c
@@ -541,7 +541,7 @@ WRITE_LINE_MEMBER( geneve::video_wait_states )
WRITE8_MEMBER( geneve::tms9901_interrupt )
{
/* INTREQ is connected to INT1. */
- device_execute(m_cpu)->set_input_line(INPUT_LINE_99XX_INT1, data);
+ m_cpu->set_input_line(INPUT_LINE_99XX_INT1, data);
}
/* tms9901 setup */
@@ -585,7 +585,7 @@ WRITE_LINE_MEMBER( geneve::inta )
{
m_inta = (state!=0)? ASSERT_LINE : CLEAR_LINE;
m_tms9901->set_single_int(1, state);
- device_execute(m_cpu)->set_input_line(INPUT_LINE_99XX_INT4, state);
+ m_cpu->set_input_line(INPUT_LINE_99XX_INT4, state);
}
/*
diff --git a/src/mess/drivers/gp32.c b/src/mess/drivers/gp32.c
index 6dbb909a38d..692b7ee8925 100644
--- a/src/mess/drivers/gp32.c
+++ b/src/mess/drivers/gp32.c
@@ -492,11 +492,11 @@ static void s3c240x_check_pending_irq( running_machine &machine)
}
state->m_s3c240x_irq_regs[4] |= (1 << int_type); // INTPND
state->m_s3c240x_irq_regs[5] = int_type; // INTOFFSET
- device_set_input_line( machine.device( "maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine.device( "maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
}
else
{
- device_set_input_line( machine.device( "maincpu"), ARM7_IRQ_LINE, CLEAR_LINE);
+ machine.device( "maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
}
}
@@ -509,7 +509,7 @@ static void s3c240x_request_irq( running_machine &machine, UINT32 int_type)
state->m_s3c240x_irq_regs[0] |= (1 << int_type); // SRCPND
state->m_s3c240x_irq_regs[4] |= (1 << int_type); // INTPND
state->m_s3c240x_irq_regs[5] = int_type; // INTOFFSET
- device_set_input_line( machine.device( "maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine.device( "maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
}
else
{
diff --git a/src/mess/drivers/h8.c b/src/mess/drivers/h8.c
index 30b2515f6de..a2d518e4f07 100644
--- a/src/mess/drivers/h8.c
+++ b/src/mess/drivers/h8.c
@@ -57,7 +57,7 @@ static TIMER_DEVICE_CALLBACK( h8_irq_pulse )
{
h8_state *state = timer.machine().driver_data<h8_state>();
if (state->m_irq_ctl & 1)
- device_set_input_line_and_vector(timer.machine().device("maincpu"), INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf);
+ timer.machine().device("maincpu")->execute().set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf);
}
READ8_MEMBER( h8_state::h8_f0_r )
@@ -105,7 +105,7 @@ WRITE8_MEMBER( h8_state::h8_f0_w )
output_set_value("mon_led",(data & 0x20) ? 0 : 1);
beep_set_state(m_beep, (data & 0x80) ? 0 : 1);
- device_set_input_line(machine().device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE);
+ machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
m_irq_ctl &= 0xf0;
if (data & 0x40) m_irq_ctl |= 1;
if (~data & 0x10) m_irq_ctl |= 2;
@@ -197,7 +197,7 @@ But, all of this can only occur if bit 5 of port F0 is low. */
c=m_ff_b^1; // from /Q of 2nd flipflop
m_ff_b=a; // from Q of 1st flipflop
if (c)
- device_set_input_line_and_vector(machine().device("maincpu"), INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7);
+ machine().device("maincpu")->execute().set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7);
}
}
else
diff --git a/src/mess/drivers/h89.c b/src/mess/drivers/h89.c
index b3d5d403487..6a148e87cca 100644
--- a/src/mess/drivers/h89.c
+++ b/src/mess/drivers/h89.c
@@ -101,7 +101,7 @@ static TIMER_DEVICE_CALLBACK( h89_irq_timer )
h89_state *state = timer.machine().driver_data<h89_state>();
if (state->m_port_f2 & 0x02)
- device_set_input_line_and_vector(state->m_maincpu, 0, HOLD_LINE, 0xcf);
+ state->m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf);
}
WRITE8_MEMBER( h89_state::port_f2_w )
diff --git a/src/mess/drivers/homelab.c b/src/mess/drivers/homelab.c
index db510e05776..2eba18c7a59 100644
--- a/src/mess/drivers/homelab.c
+++ b/src/mess/drivers/homelab.c
@@ -72,14 +72,14 @@ static INTERRUPT_GEN( homelab_frame )
{
homelab_state *state = device->machine().driver_data<homelab_state>();
if (state->m_nmi)
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
READ8_MEMBER( homelab_state::key_r ) // offset 27F-2FE
{
if (offset == 0x38) // 0x3838
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
return 0;
}
diff --git a/src/mess/drivers/homez80.c b/src/mess/drivers/homez80.c
index 5db720f3206..e607313122d 100644
--- a/src/mess/drivers/homez80.c
+++ b/src/mess/drivers/homez80.c
@@ -277,7 +277,7 @@ GFXDECODE_END
static INTERRUPT_GEN( homez80_interrupt )
{
homez80_state *state = device->machine().driver_data<homez80_state>();
- device_set_input_line(device, 0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE);
+ device->execute().set_input_line(0, (state->m_irq) ? HOLD_LINE : CLEAR_LINE);
state->m_irq ^= 1;
}
diff --git a/src/mess/drivers/iq151.c b/src/mess/drivers/iq151.c
index c1e33a08189..ef39937b339 100644
--- a/src/mess/drivers/iq151.c
+++ b/src/mess/drivers/iq151.c
@@ -318,7 +318,7 @@ INPUT_PORTS_END
WRITE_LINE_MEMBER( iq151_state::pic_set_int_line )
{
- device_set_input_line(m_maincpu, 0, state ? HOLD_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
}
static INTERRUPT_GEN( iq151_vblank_interrupt )
@@ -352,7 +352,7 @@ DRIVER_INIT_MEMBER(iq151_state,iq151)
membank("boot")->configure_entry(0, RAM + 0xf800);
membank("boot")->configure_entry(1, RAM + 0x0000);
- device_set_irq_callback(m_maincpu, iq151_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(iq151_irq_callback);
// keep machine pointers to slots
m_carts[0] = machine().device<iq151cart_slot_device>("slot1");
diff --git a/src/mess/drivers/jr200.c b/src/mess/drivers/jr200.c
index eb4bb6bbeee..34cbc407f86 100644
--- a/src/mess/drivers/jr200.c
+++ b/src/mess/drivers/jr200.c
@@ -281,7 +281,7 @@ WRITE8_MEMBER(jr200_state::jr200_border_col_w)
static TIMER_CALLBACK(timer_d_callback)
{
- device_set_input_line(machine.firstcpu, 0, HOLD_LINE);
+ machine.firstcpu->set_input_line(0, HOLD_LINE);
}
READ8_MEMBER(jr200_state::mn1271_io_r)
diff --git a/src/mess/drivers/kyocera.c b/src/mess/drivers/kyocera.c
index ee073857016..f64ee56507b 100644
--- a/src/mess/drivers/kyocera.c
+++ b/src/mess/drivers/kyocera.c
@@ -1291,7 +1291,7 @@ static TIMER_DEVICE_CALLBACK( tandy200_tp_tick )
{
tandy200_state *state = timer.machine().driver_data<tandy200_state>();
- device_set_input_line(state->m_maincpu, I8085_RST75_LINE, state->m_tp);
+ state->m_maincpu->set_input_line(I8085_RST75_LINE, state->m_tp);
state->m_tp = !state->m_tp;
}
diff --git a/src/mess/drivers/m20.c b/src/mess/drivers/m20.c
index 64d4f5629e4..964880d6172 100644
--- a/src/mess/drivers/m20.c
+++ b/src/mess/drivers/m20.c
@@ -61,7 +61,7 @@ public:
m_wd177x(*this, "fd1797"),
m_p_videoram(*this, "p_videoram"){ }
- required_device<device_t> m_maincpu;
+ required_device<z8001_device> m_maincpu;
required_device<i8251_device> m_kbdi8251;
required_device<i8251_device> m_ttyi8251;
required_device<i8255_device> m_i8255;
@@ -243,12 +243,12 @@ WRITE_LINE_MEMBER( m20_state::pic_irq_line_w )
if (state)
{
//printf ("PIC raised VI\n");
- device_set_input_line(m_maincpu, 1, ASSERT_LINE);
+ m_maincpu->set_input_line(1, ASSERT_LINE);
}
else
{
//printf ("PIC lowered VI\n");
- device_set_input_line(m_maincpu, 1, CLEAR_LINE);
+ m_maincpu->set_input_line(1, CLEAR_LINE);
}
}
@@ -274,7 +274,7 @@ WRITE_LINE_MEMBER( m20_state::timer_tick_w )
* 8253 is programmed in square wave mode, not rate
* generator mode.
*/
- device_set_input_line(m_maincpu, 0, state ? HOLD_LINE /*ASSERT_LINE*/ : CLEAR_LINE);
+ m_maincpu->set_input_line(0, state ? HOLD_LINE /*ASSERT_LINE*/ : CLEAR_LINE);
}
/* from the M20 hardware reference manual:
@@ -376,7 +376,7 @@ void m20_state::machine_reset()
m_port21 = 0xff;
m_port21_sd = 1;
- device_set_irq_callback(m_maincpu, m20_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(m20_irq_callback);
wd17xx_mr_w(m_wd177x, 0);
//wd17xx_mr_w(m_wd177x, 1);
diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c
index 795b0919174..7a51c316e8c 100644
--- a/src/mess/drivers/m5.c
+++ b/src/mess/drivers/m5.c
@@ -521,8 +521,8 @@ WRITE8_MEMBER( m5_state::ppi_pb_w )
if (data == 0xf0)
{
- device_set_input_line(m_fd5cpu, INPUT_LINE_RESET, ASSERT_LINE);
- device_set_input_line(m_fd5cpu, INPUT_LINE_RESET, CLEAR_LINE);
+ m_fd5cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_fd5cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
}
diff --git a/src/mess/drivers/mac.c b/src/mess/drivers/mac.c
index 02074e7b124..e3c07bb4090 100644
--- a/src/mess/drivers/mac.c
+++ b/src/mess/drivers/mac.c
@@ -182,7 +182,7 @@ READ8_MEMBER( mac_state::mac_sonora_vctl_r )
{
if (offset == 2)
{
-// printf("Sonora: read monitor ID at PC=%x\n", m_maincpu->safe_pc());
+// printf("Sonora: read monitor ID at PC=%x\n", m_maincpu->pc());
return (6 << 4); // 640x480 RGB monitor
}
@@ -256,12 +256,12 @@ READ8_MEMBER ( mac_state::mac_rbv_r )
switch (offset)
{
case 13: // IFR
-// printf("Read IER = %02x (PC=%x) 2=%02x\n", m_rbv_ier, m_maincpu->safe_pc(), m_rbv_regs[2]);
+// printf("Read IER = %02x (PC=%x) 2=%02x\n", m_rbv_ier, m_maincpu->pc(), m_rbv_regs[2]);
data = m_rbv_ifr;
break;
case 14: // IER
-// printf("Read IFR = %02x (PC=%x) 2=%02x\n", m_rbv_ifr, m_maincpu->safe_pc(), m_rbv_regs[2]);
+// printf("Read IFR = %02x (PC=%x) 2=%02x\n", m_rbv_ifr, m_maincpu->pc(), m_rbv_regs[2]);
data = m_rbv_ier;
break;
@@ -271,7 +271,7 @@ READ8_MEMBER ( mac_state::mac_rbv_r )
}
}
-// printf("rbv_r: %x = %02x (PC=%x)\n", offset, data, m_maincpu->safe_pc());
+// printf("rbv_r: %x = %02x (PC=%x)\n", offset, data, m_maincpu->pc());
return data;
}
@@ -281,7 +281,7 @@ WRITE8_MEMBER ( mac_state::mac_rbv_w )
if (offset < 0x100)
{
// if (offset == 0x10)
-// printf("rbv_w: %02x to offset %x (PC=%x)\n", data, offset, m_maincpu->safe_pc());
+// printf("rbv_w: %02x to offset %x (PC=%x)\n", data, offset, m_maincpu->pc());
switch (offset)
{
case 0x00:
@@ -364,7 +364,7 @@ WRITE8_MEMBER ( mac_state::mac_rbv_w )
switch (offset)
{
case 13: // IFR
-// printf("%02x to IFR (PC=%x)\n", data, m_maincpu->safe_pc());
+// printf("%02x to IFR (PC=%x)\n", data, m_maincpu->pc());
if (data & 0x80)
{
data = 0x7f;
@@ -373,7 +373,7 @@ WRITE8_MEMBER ( mac_state::mac_rbv_w )
break;
case 14: // IER
-// printf("%02x to IER (PC=%x)\n", data, m_maincpu->safe_pc());
+// printf("%02x to IER (PC=%x)\n", data, m_maincpu->pc());
if (data & 0x80) // 1 bits write 1s
{
m_rbv_ier |= data & 0x7f;
@@ -440,24 +440,24 @@ READ32_MEMBER(mac_state::buserror_r)
READ8_MEMBER(mac_state::scciop_r)
{
-// printf("scciop_r @ %x (PC=%x)\n", offset, m_maincpu->safe_pc());
+// printf("scciop_r @ %x (PC=%x)\n", offset, m_maincpu->pc());
return 0;
}
WRITE8_MEMBER(mac_state::scciop_w)
{
-// printf("scciop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->safe_pc());
+// printf("scciop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->pc());
}
READ8_MEMBER(mac_state::swimiop_r)
{
-// printf("swimiop_r @ %x (PC=%x)\n", offset, m_maincpu->safe_pc());
+// printf("swimiop_r @ %x (PC=%x)\n", offset, m_maincpu->pc());
return 0;
}
WRITE8_MEMBER(mac_state::swimiop_w)
{
-// printf("swimiop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->safe_pc());
+// printf("swimiop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->pc());
}
READ8_MEMBER(mac_state::pmac_diag_r)
@@ -478,7 +478,7 @@ READ8_MEMBER(mac_state::amic_dma_r)
WRITE8_MEMBER(mac_state::amic_dma_w)
{
-// printf("amic_dma_w: %02x at %x (PC=%x)\n", data, offset+0x1000, m_maincpu->safe_pc());
+// printf("amic_dma_w: %02x at %x (PC=%x)\n", data, offset+0x1000, m_maincpu->pc());
}
// HMC has one register: a 35-bit shift register which is accessed one bit at a time (see pmac6100 code at 4030383c which makes this obvious)
diff --git a/src/mess/drivers/micronic.c b/src/mess/drivers/micronic.c
index 92155156777..f26430c1efa 100644
--- a/src/mess/drivers/micronic.c
+++ b/src/mess/drivers/micronic.c
@@ -348,7 +348,7 @@ void micronic_state::machine_reset()
WRITE_LINE_MEMBER( micronic_state::mc146818_irq )
{
- device_set_input_line(m_maincpu, 0, !state ? HOLD_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(0, !state ? HOLD_LINE : CLEAR_LINE);
}
const struct mc146818_interface micronic_mc146818_config =
diff --git a/src/mess/drivers/mikromik.c b/src/mess/drivers/mikromik.c
index c9a70dce2e4..9509b5ebc14 100644
--- a/src/mess/drivers/mikromik.c
+++ b/src/mess/drivers/mikromik.c
@@ -491,7 +491,7 @@ static I8212_INTERFACE( iop_intf )
WRITE_LINE_MEMBER( mm1_state::dma_hrq_changed )
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
// Assert HLDA
m_dmac->hack_w(state);
diff --git a/src/mess/drivers/mirage.c b/src/mess/drivers/mirage.c
index e15647e679a..235fac13b7e 100644
--- a/src/mess/drivers/mirage.c
+++ b/src/mess/drivers/mirage.c
@@ -83,7 +83,7 @@ public:
m_fdc(*this, "wd1772")
{ }
- required_device<device_t> m_maincpu;
+ required_device<m6809e_device> m_maincpu;
required_device<wd1772_t> m_fdc;
virtual void machine_reset();
@@ -107,7 +107,7 @@ SLOT_INTERFACE_END
void mirage_state::fdc_intrq_w(bool state)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, state);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, state);
}
static void mirage_doc_irq(device_t *device, int state)
diff --git a/src/mess/drivers/mk1.c b/src/mess/drivers/mk1.c
index 9c4e4970de9..037ce43924d 100644
--- a/src/mess/drivers/mk1.c
+++ b/src/mess/drivers/mk1.c
@@ -166,7 +166,7 @@ static MACHINE_START( mk1 )
static void mk1_interrupt( device_t *device, UINT16 addr, int level )
{
- device_set_input_line_vector(device->machine().device("maincpu"), F8_INPUT_LINE_INT_REQ, addr );
+ device->machine().device("maincpu")->execute().set_input_line_vector(F8_INPUT_LINE_INT_REQ, addr );
device->machine().device("maincpu")->execute().set_input_line(F8_INPUT_LINE_INT_REQ, level ? ASSERT_LINE : CLEAR_LINE );
}
diff --git a/src/mess/drivers/mod8.c b/src/mess/drivers/mod8.c
index 76c4abe7212..85d5a281047 100644
--- a/src/mess/drivers/mod8.c
+++ b/src/mess/drivers/mod8.c
@@ -88,7 +88,7 @@ static IRQ_CALLBACK ( mod8_irq_callback )
static MACHINE_RESET(mod8)
{
- device_set_irq_callback(machine.device("maincpu"), mod8_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(mod8_irq_callback);
}
WRITE8_MEMBER( mod8_state::kbd_put )
diff --git a/src/mess/drivers/mstation.c b/src/mess/drivers/mstation.c
index a22b65fbea2..b755613ee94 100644
--- a/src/mess/drivers/mstation.c
+++ b/src/mess/drivers/mstation.c
@@ -262,9 +262,9 @@ WRITE8_MEMBER( mstation_state::port2_w )
void mstation_state::refresh_ints()
{
if (m_irq != 0)
- device_set_input_line(m_maincpu, 0, HOLD_LINE);
+ m_maincpu->set_input_line(0, HOLD_LINE);
else
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
READ8_MEMBER( mstation_state::irq_r )
diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c
index fa2c572a965..7a2a2592694 100644
--- a/src/mess/drivers/multi16.c
+++ b/src/mess/drivers/multi16.c
@@ -133,7 +133,7 @@ static const struct pic8259_interface multi16_pic8259_config =
static MACHINE_START(multi16)
{
- device_set_irq_callback(machine.device("maincpu"), multi16_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(multi16_irq_callback);
}
diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c
index 501b3cfe6f9..53bb212b094 100644
--- a/src/mess/drivers/mz2500.c
+++ b/src/mess/drivers/mz2500.c
@@ -1823,7 +1823,7 @@ static INTERRUPT_GEN( mz2500_vbl )
{
mz2500_state *state = device->machine().driver_data<mz2500_state>();
if(state->m_irq_mask[0])
- device_set_input_line_and_vector(device, 0, HOLD_LINE, state->m_irq_vector[0]);
+ device->execute().set_input_line_and_vector(0, HOLD_LINE, state->m_irq_vector[0]);
state->m_cg_clear_flag = 0;
}
diff --git a/src/mess/drivers/nakajies.c b/src/mess/drivers/nakajies.c
index e49bec0f337..50959c81f67 100644
--- a/src/mess/drivers/nakajies.c
+++ b/src/mess/drivers/nakajies.c
@@ -419,11 +419,11 @@ void nakajies_state::nakajies_update_irqs( running_machine &machine )
if ( vector >= 0xf8 )
{
- device_set_input_line_and_vector( m_maincpu, 0, ASSERT_LINE, vector );
+ m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, vector );
}
else
{
- device_set_input_line( m_maincpu, 0, CLEAR_LINE );
+ m_maincpu->set_input_line(0, CLEAR_LINE );
}
}
diff --git a/src/mess/drivers/ng_aes.c b/src/mess/drivers/ng_aes.c
index c1a9e9280cb..08035f30c80 100644
--- a/src/mess/drivers/ng_aes.c
+++ b/src/mess/drivers/ng_aes.c
@@ -248,20 +248,20 @@ static void start_interrupt_timers( running_machine &machine )
static void audio_cpu_irq(device_t *device, int assert)
{
neogeo_state *state = device->machine().driver_data<neogeo_state>();
- device_set_input_line(state->m_audiocpu, 0, assert ? ASSERT_LINE : CLEAR_LINE);
+ state->m_audiocpu->set_input_line(0, assert ? ASSERT_LINE : CLEAR_LINE);
}
static void audio_cpu_assert_nmi(running_machine &machine)
{
neogeo_state *state = machine.driver_data<neogeo_state>();
- device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, ASSERT_LINE);
+ state->m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
WRITE8_MEMBER(ng_aes_state::audio_cpu_clear_nmi_w)
{
- device_set_input_line(m_audiocpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
@@ -1166,8 +1166,8 @@ static void common_machine_start(running_machine &machine)
state->m_irq3_pending = 1;
/* get devices */
- state->m_maincpu = machine.device("maincpu");
- state->m_audiocpu = machine.device("audiocpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
+ state->m_audiocpu = machine.device<cpu_device>("audiocpu");
state->m_upd4990a = machine.device("upd4990a");
/* register state save */
diff --git a/src/mess/drivers/ngp.c b/src/mess/drivers/ngp.c
index 8503d2f5f7f..ab50dcba6d3 100644
--- a/src/mess/drivers/ngp.c
+++ b/src/mess/drivers/ngp.c
@@ -258,18 +258,18 @@ WRITE8_MEMBER( ngp_state::ngp_io_w )
switch( data )
{
case 0x55: /* Enable Z80 */
- device_resume( m_z80, SUSPEND_REASON_HALT );
+ m_z80->execute().resume(SUSPEND_REASON_HALT );
m_z80->reset();
- device_set_input_line( m_z80, 0, CLEAR_LINE );
+ m_z80->execute().set_input_line(0, CLEAR_LINE );
break;
case 0xAA: /* Disable Z80 */
- device_suspend( m_z80, SUSPEND_REASON_HALT, 1 );
+ m_z80->execute().suspend(SUSPEND_REASON_HALT, 1 );
break;
}
break;
case 0x3a: /* Trigger Z80 NMI */
- device_set_input_line( m_z80, INPUT_LINE_NMI, PULSE_LINE );
+ m_z80->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE );
break;
}
m_io_reg[offset] = data;
@@ -525,7 +525,7 @@ WRITE8_MEMBER( ngp_state::ngp_z80_comm_w )
WRITE8_MEMBER( ngp_state::ngp_z80_signal_main_w )
{
- device_set_input_line( m_tlcs900, TLCS900_INT5, ASSERT_LINE );
+ m_tlcs900->execute().set_input_line(TLCS900_INT5, ASSERT_LINE );
}
@@ -539,10 +539,10 @@ ADDRESS_MAP_END
WRITE8_MEMBER( ngp_state::ngp_z80_clear_irq )
{
- device_set_input_line( m_z80, 0, CLEAR_LINE );
+ m_z80->execute().set_input_line(0, CLEAR_LINE );
/* I am not exactly sure what causes the maincpu INT5 signal to be cleared. This will do for now. */
- device_set_input_line( m_tlcs900, TLCS900_INT5, CLEAR_LINE );
+ m_tlcs900->execute().set_input_line(TLCS900_INT5, CLEAR_LINE );
}
@@ -557,7 +557,7 @@ static INPUT_CHANGED( power_callback )
if ( state->m_io_reg[0x33] & 0x04 )
{
- device_set_input_line( state->m_tlcs900, TLCS900_NMI,
+ state->m_tlcs900->execute().set_input_line(TLCS900_NMI,
(field.machine().root_device().ioport("Power")->read() & 0x01 ) ? CLEAR_LINE : ASSERT_LINE );
}
}
@@ -581,20 +581,20 @@ INPUT_PORTS_END
WRITE8_MEMBER( ngp_state::ngp_vblank_pin_w )
{
- device_set_input_line( m_tlcs900, TLCS900_INT4, data ? ASSERT_LINE : CLEAR_LINE );
+ m_tlcs900->execute().set_input_line(TLCS900_INT4, data ? ASSERT_LINE : CLEAR_LINE );
}
WRITE8_MEMBER( ngp_state::ngp_hblank_pin_w )
{
- device_set_input_line( m_tlcs900, TLCS900_TIO, data ? ASSERT_LINE : CLEAR_LINE );
+ m_tlcs900->execute().set_input_line(TLCS900_TIO, data ? ASSERT_LINE : CLEAR_LINE );
}
WRITE8_MEMBER( ngp_state::ngp_tlcs900_to3 )
{
if ( data && ! m_old_to3 )
- device_set_input_line( m_z80, 0, ASSERT_LINE );
+ m_z80->execute().set_input_line(0, ASSERT_LINE );
m_old_to3 = data;
}
@@ -617,8 +617,8 @@ void ngp_state::machine_reset()
m_dac_r = machine().device<dac_device>( "dac_r" );
m_k1ge = machine().device( "k1ge" );
- device_suspend( m_z80, SUSPEND_REASON_HALT, 1 );
- device_set_input_line( m_z80, 0, CLEAR_LINE );
+ m_z80->execute().suspend(SUSPEND_REASON_HALT, 1 );
+ m_z80->execute().set_input_line(0, CLEAR_LINE );
}
diff --git a/src/mess/drivers/ondra.c b/src/mess/drivers/ondra.c
index 2a74e5b0baa..01d09bf1870 100644
--- a/src/mess/drivers/ondra.c
+++ b/src/mess/drivers/ondra.c
@@ -107,7 +107,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( ondra_interrupt )
{
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static const cassette_interface ondra_cassette_interface =
diff --git a/src/mess/drivers/osbexec.c b/src/mess/drivers/osbexec.c
index 1243b6bf816..ff7d902593d 100644
--- a/src/mess/drivers/osbexec.c
+++ b/src/mess/drivers/osbexec.c
@@ -98,9 +98,9 @@ public:
void update_irq_state(running_machine &machine)
{
if ( m_pia0_irq_state || m_pia1_irq_state )
- device_set_input_line( m_maincpu, 0, ASSERT_LINE );
+ m_maincpu->set_input_line(0, ASSERT_LINE );
else
- device_set_input_line( m_maincpu, 0, CLEAR_LINE );
+ m_maincpu->set_input_line(0, CLEAR_LINE );
}
DECLARE_WRITE8_MEMBER(osbexec_0000_w);
DECLARE_READ8_MEMBER(osbexec_c000_r);
diff --git a/src/mess/drivers/paso1600.c b/src/mess/drivers/paso1600.c
index 00e09e570a7..0a3c5b762c1 100644
--- a/src/mess/drivers/paso1600.c
+++ b/src/mess/drivers/paso1600.c
@@ -292,7 +292,7 @@ static const struct pic8259_interface paso1600_pic8259_config =
static MACHINE_START(paso1600)
{
paso1600_state *state = machine.driver_data<paso1600_state>();
- device_set_irq_callback(state->m_maincpu, paso1600_irq_callback);
+ state->m_maincpu->set_irq_acknowledge_callback(paso1600_irq_callback);
}
diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c
index 86e3e8430fe..0963be05220 100644
--- a/src/mess/drivers/pasogo.c
+++ b/src/mess/drivers/pasogo.c
@@ -460,7 +460,7 @@ static IRQ_CALLBACK(pasogo_irq_callback)
static MACHINE_RESET( pasogo )
{
- device_set_irq_callback(machine.device("maincpu"), pasogo_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pasogo_irq_callback);
}
//static const unsigned i86_address_mask = 0x000fffff;
diff --git a/src/mess/drivers/pc100.c b/src/mess/drivers/pc100.c
index ed2dac1df8f..f8209487f73 100644
--- a/src/mess/drivers/pc100.c
+++ b/src/mess/drivers/pc100.c
@@ -331,7 +331,7 @@ static MACHINE_START(pc100)
{
pc100_state *state = machine.driver_data<pc100_state>();
- device_set_irq_callback(machine.device("maincpu"), pc100_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc100_irq_callback);
state->m_kanji_rom = (UINT16 *)(*machine.root_device().memregion("kanji"));
state->m_vram = (UINT16 *)(*state->memregion("vram"));
}
diff --git a/src/mess/drivers/pc1512.c b/src/mess/drivers/pc1512.c
index 9f7511afbe3..fc489455c22 100644
--- a/src/mess/drivers/pc1512.c
+++ b/src/mess/drivers/pc1512.c
@@ -1203,7 +1203,7 @@ static const isa8bus_interface isabus_intf =
void pc1512_state::machine_start()
{
// register CPU IRQ callback
- device_set_irq_callback(m_maincpu, pc1512_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(pc1512_irq_callback);
// set RAM size
size_t ram_size = m_ram->size();
@@ -1286,7 +1286,7 @@ void pc1512_state::machine_reset()
void pc1640_state::machine_start()
{
// register CPU IRQ callback
- device_set_irq_callback(m_maincpu, pc1512_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(pc1512_irq_callback);
// state saving
save_item(NAME(m_pit1));
diff --git a/src/mess/drivers/pc6001.c b/src/mess/drivers/pc6001.c
index 99588115301..9c4288676ce 100644
--- a/src/mess/drivers/pc6001.c
+++ b/src/mess/drivers/pc6001.c
@@ -1845,7 +1845,7 @@ static INTERRUPT_GEN( pc6001_interrupt )
state->m_cur_keycode = check_joy_press(device->machine());
if(IRQ_LOG) printf("Stick IRQ called 0x16\n");
state->m_irq_vector = 0x16;
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
static INTERRUPT_GEN( pc6001sr_interrupt )
@@ -1856,13 +1856,13 @@ static INTERRUPT_GEN( pc6001sr_interrupt )
state->m_cur_keycode = check_joy_press(device->machine());
if(IRQ_LOG) printf("VRTC IRQ called 0x16\n");
state->m_irq_vector = (state->m_kludge) ? 0x22 : 0x16;
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
}
static IRQ_CALLBACK ( pc6001_irq_callback )
{
pc6001_state *state = device->machine().driver_data<pc6001_state>();
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
return state->m_irq_vector;
}
@@ -2114,7 +2114,7 @@ static MACHINE_RESET(pc6001)
state->m_port_c_8255=0;
- device_set_irq_callback(machine.device("maincpu"),pc6001_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc6001_irq_callback);
state->m_cas_switch = 0;
state->m_cas_offset = 0;
state->m_timer_irq_mask = 1;
@@ -2132,7 +2132,7 @@ static MACHINE_RESET(pc6001m2)
state->m_port_c_8255=0;
- device_set_irq_callback(machine.device("maincpu"),pc6001_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc6001_irq_callback);
state->m_cas_switch = 0;
state->m_cas_offset = 0;
@@ -2168,7 +2168,7 @@ static MACHINE_RESET(pc6001sr)
state->m_port_c_8255=0;
- device_set_irq_callback(machine.device("maincpu"),pc6001_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc6001_irq_callback);
state->m_cas_switch = 0;
state->m_cas_offset = 0;
diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c
index f16ddc1c515..e4dd0f45eff 100644
--- a/src/mess/drivers/pc8801.c
+++ b/src/mess/drivers/pc8801.c
@@ -1887,7 +1887,7 @@ WRITE8_MEMBER(pc8801_state::upd765_mc_w)
READ8_MEMBER(pc8801_state::upd765_tc_r)
{
- //printf("%04x 1\n",m_fdccpu->safe_pc());
+ //printf("%04x 1\n",m_fdccpu->pc());
upd765_tc_w(machine().device("upd765"), 1);
//TODO: I'm not convinced that this works correctly with current hook-up ... 1000 usec is needed by Aploon, a bigger value breaks Alpha.
@@ -2411,7 +2411,7 @@ static INTERRUPT_GEN( pc8801_vrtc_irq )
{
state->m_vrtc_irq_latch = 1;
//IRQ_LOG(("vrtc\n"));
- device_set_input_line(device,0,HOLD_LINE);
+ device->execute().set_input_line(0,HOLD_LINE);
}
}
#endif
@@ -2420,7 +2420,7 @@ static MACHINE_START( pc8801 )
{
pc8801_state *state = machine.driver_data<pc8801_state>();
- device_set_irq_callback(machine.device("maincpu"), pc8801_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc8801_irq_callback);
state->m_rtc->cs_w(1);
state->m_rtc->oe_w(1);
@@ -2447,7 +2447,7 @@ static MACHINE_RESET( pc8801 )
state->m_fdc_irq_opcode = 0; //TODO: copied from PC-88VA, could be wrong here ... should be 0x7f ld a,a in the latter case
state->m_mouse.phase = 0;
- device_set_input_line_vector(machine.device("fdccpu"), 0, 0);
+ machine.device("fdccpu")->execute().set_input_line_vector(0, 0);
{
state->m_txt_color = 2;
diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c
index cbd2d7a4e09..39ad87ed6ea 100644
--- a/src/mess/drivers/pc88va.c
+++ b/src/mess/drivers/pc88va.c
@@ -1528,7 +1528,7 @@ static const struct pic8259_interface pc88va_pic8259_slave_config =
static MACHINE_START( pc88va )
{
pc88va_state *state = machine.driver_data<pc88va_state>();
- device_set_irq_callback(machine.device("maincpu"), pc88va_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pc88va_irq_callback);
state->m_t3_mouse_timer = machine.scheduler().timer_alloc(FUNC(t3_mouse_callback));
state->m_t3_mouse_timer->adjust(attotime::never);
@@ -1558,7 +1558,7 @@ static MACHINE_RESET( pc88va )
state->m_fdc_mode = 0;
state->m_fdc_irq_opcode = 0x00; //0x7f ld a,a !
- device_set_input_line_vector(machine.device("fdccpu"), 0, 0);
+ machine.device("fdccpu")->execute().set_input_line_vector(0, 0);
}
static INTERRUPT_GEN( pc88va_vrtc_irq )
diff --git a/src/mess/drivers/pc9801.c b/src/mess/drivers/pc9801.c
index 5e54e58e305..ee4a41106fd 100644
--- a/src/mess/drivers/pc9801.c
+++ b/src/mess/drivers/pc9801.c
@@ -719,7 +719,7 @@ READ8_MEMBER(pc9801_state::pc9801_40_r)
printf("Read to undefined port [%02x]\n",offset+0x40);
else
{
- //printf("Read to 8251 kbd port [%02x] %08x\n",offset+0x40,m_maincpu->safe_pc());
+ //printf("Read to 8251 kbd port [%02x] %08x\n",offset+0x40,m_maincpu->pc());
if(offset == 1)
{
UINT8 res;
@@ -2525,7 +2525,7 @@ static MACHINE_START(pc9801)
{
pc9801_state *state = machine.driver_data<pc9801_state>();
- device_set_irq_callback(machine.device("maincpu"), irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
state->m_rtc->cs_w(1);
state->m_rtc->oe_w(1);
diff --git a/src/mess/drivers/pce220.c b/src/mess/drivers/pce220.c
index ee8562b6706..5ffecbde431 100644
--- a/src/mess/drivers/pce220.c
+++ b/src/mess/drivers/pce220.c
@@ -618,7 +618,7 @@ static INPUT_CHANGED( kb_irq )
if (state->m_irq_mask & IRQ_FLAG_KEY)
{
- device_set_input_line( state->m_maincpu, 0, newval ? ASSERT_LINE : CLEAR_LINE );
+ state->m_maincpu->set_input_line(0, newval ? ASSERT_LINE : CLEAR_LINE );
state->m_irq_flag = (state->m_irq_flag & 0xfe) | (newval & 0x01);
}
@@ -630,7 +630,7 @@ static INPUT_CHANGED( on_irq )
if (state->m_irq_mask & IRQ_FLAG_ON)
{
- device_set_input_line( state->m_maincpu, 0, newval ? ASSERT_LINE : CLEAR_LINE );
+ state->m_maincpu->set_input_line(0, newval ? ASSERT_LINE : CLEAR_LINE );
state->m_irq_flag = (state->m_irq_flag & 0xfd) | ((newval & 0x01)<<1);
}
@@ -907,7 +907,7 @@ static TIMER_DEVICE_CALLBACK(pce220_timer_callback)
if (state->m_irq_mask & IRQ_FLAG_TIMER)
{
- device_set_input_line( state->m_maincpu, 0, HOLD_LINE );
+ state->m_maincpu->set_input_line(0, HOLD_LINE );
state->m_irq_flag = (state->m_irq_flag & 0xfb) | (state->m_timer_status<<2);
}
diff --git a/src/mess/drivers/pcfx.c b/src/mess/drivers/pcfx.c
index f5acebf1fd5..e38d8c618f9 100644
--- a/src/mess/drivers/pcfx.c
+++ b/src/mess/drivers/pcfx.c
@@ -375,11 +375,11 @@ inline void pcfx_state::check_irqs()
if ( highest_prio >= 0 )
{
- device_set_input_line( m_maincpu, 8 + highest_prio, ASSERT_LINE );
+ m_maincpu->set_input_line(8 + highest_prio, ASSERT_LINE );
}
else
{
- device_set_input_line( m_maincpu, 0, CLEAR_LINE );
+ m_maincpu->set_input_line(0, CLEAR_LINE );
}
}
diff --git a/src/mess/drivers/pcw.c b/src/mess/drivers/pcw.c
index c23f4f06874..b30cd818ccb 100644
--- a/src/mess/drivers/pcw.c
+++ b/src/mess/drivers/pcw.c
@@ -1087,7 +1087,7 @@ static MACHINE_RESET( pcw )
DRIVER_INIT_MEMBER(pcw_state,pcw)
{
- device_set_input_line_vector(machine().device("maincpu"), 0, 0x0ff);
+ machine().device("maincpu")->execute().set_input_line_vector(0, 0x0ff);
/* lower 4 bits are interrupt counter */
m_system_status = 0x000;
diff --git a/src/mess/drivers/pdp1.c b/src/mess/drivers/pdp1.c
index 560c3d6a818..c15247731b5 100644
--- a/src/mess/drivers/pdp1.c
+++ b/src/mess/drivers/pdp1.c
@@ -1604,7 +1604,7 @@ static void iot_dcc(device_t *device, int op2, int nac, int mb, int *io, int ac)
if (state->m_parallel_drum.wc)
delay = delay + PARALLEL_DRUM_WORD_TIME;
} while (state->m_parallel_drum.wc);
- device_adjust_icount(device->machine().device("maincpu"),-device->machine().device<cpu_device>("maincpu")->attotime_to_cycles(delay));
+ device->machine().device("maincpu")->execute().adjust_icount(-device->machine().device<cpu_device>("maincpu")->attotime_to_cycles(delay));
/* if no error, skip */
device->machine().device("maincpu")->state().set_state_int(PDP1_PC, device->machine().device("maincpu")->state().state_int(PDP1_PC)+1);
}
diff --git a/src/mess/drivers/pegasus.c b/src/mess/drivers/pegasus.c
index 250f4dc74ee..e8f20f696af 100644
--- a/src/mess/drivers/pegasus.c
+++ b/src/mess/drivers/pegasus.c
@@ -90,7 +90,7 @@ public:
static TIMER_DEVICE_CALLBACK( pegasus_firq )
{
device_t *cpu = timer.machine().device( "maincpu" );
- device_set_input_line(cpu, M6809_FIRQ_LINE, HOLD_LINE);
+ cpu->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
}
WRITE_LINE_MEMBER( pegasus_state::pegasus_firq_clr )
diff --git a/src/mess/drivers/pk8000.c b/src/mess/drivers/pk8000.c
index a374f218708..39337a85a56 100644
--- a/src/mess/drivers/pk8000.c
+++ b/src/mess/drivers/pk8000.c
@@ -307,7 +307,7 @@ INPUT_PORTS_END
static INTERRUPT_GEN( pk8000_interrupt )
{
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static IRQ_CALLBACK(pk8000_irq_callback)
@@ -319,7 +319,7 @@ static IRQ_CALLBACK(pk8000_irq_callback)
static MACHINE_RESET(pk8000)
{
pk8000_set_bank(machine,0);
- device_set_irq_callback(machine.device("maincpu"), pk8000_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pk8000_irq_callback);
}
static VIDEO_START( pk8000 )
diff --git a/src/mess/drivers/pockstat.c b/src/mess/drivers/pockstat.c
index 2c53019aa50..63d0cd15bbb 100644
--- a/src/mess/drivers/pockstat.c
+++ b/src/mess/drivers/pockstat.c
@@ -337,19 +337,19 @@ static void ps_intc_set_interrupt_line(running_machine &machine, UINT32 line, in
}
if(drvstate->m_intc_regs.hold & drvstate->m_intc_regs.enable & PS_INT_IRQ_MASK)
{
- device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
}
else
{
- device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
}
if(drvstate->m_intc_regs.hold & drvstate->m_intc_regs.enable & PS_INT_FIQ_MASK)
{
- device_set_input_line(machine.device("maincpu"), ARM7_FIRQ_LINE, ASSERT_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, ASSERT_LINE);
}
else
{
- device_set_input_line(machine.device("maincpu"), ARM7_FIRQ_LINE, CLEAR_LINE);
+ machine.device("maincpu")->execute().set_input_line(ARM7_FIRQ_LINE, CLEAR_LINE);
}
}
diff --git a/src/mess/drivers/portfoli.c b/src/mess/drivers/portfoli.c
index 9600bde67ae..8d223db3309 100644
--- a/src/mess/drivers/portfoli.c
+++ b/src/mess/drivers/portfoli.c
@@ -114,7 +114,7 @@ void portfolio_state::check_interrupt()
{
int level = (m_ip & m_ie) ? ASSERT_LINE : CLEAR_LINE;
- device_set_input_line(m_maincpu, INPUT_LINE_INT0, level);
+ m_maincpu->set_input_line(INPUT_LINE_INT0, level);
}
//-------------------------------------------------
@@ -766,7 +766,7 @@ void portfolio_state::machine_start()
address_space *program = m_maincpu->space(AS_PROGRAM);
/* set CPU interrupt vector callback */
- device_set_irq_callback(m_maincpu, portfolio_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(portfolio_int_ack);
/* memory expansions */
switch (machine().device<ram_device>(RAM_TAG)->size())
diff --git a/src/mess/drivers/prestige.c b/src/mess/drivers/prestige.c
index 2e6aff20731..b70226aa449 100644
--- a/src/mess/drivers/prestige.c
+++ b/src/mess/drivers/prestige.c
@@ -396,7 +396,7 @@ static IRQ_CALLBACK( prestige_int_ack )
UINT32 vector;
prestige_state *state = device->machine().driver_data<prestige_state>();
- device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
+ state->m_maincpu->set_input_line(0, CLEAR_LINE);
if (state->m_irq_counter == 0x02)
{
@@ -417,7 +417,7 @@ void prestige_state::machine_start()
UINT8 *ram = m_ram->pointer();
memset(ram, 0x00, m_ram->size());
- device_set_irq_callback(m_maincpu, prestige_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(prestige_int_ack);
membank("bank1")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000);
membank("bank2")->configure_entries(0, 64, memregion("maincpu")->base(), 0x4000);
diff --git a/src/mess/drivers/pv1000.c b/src/mess/drivers/pv1000.c
index a596cc10666..d60e86ac793 100644
--- a/src/mess/drivers/pv1000.c
+++ b/src/mess/drivers/pv1000.c
@@ -349,7 +349,7 @@ static TIMER_CALLBACK( d65010_irq_on_cb )
int next_vpos = vpos + 12;
/* Set IRQ line and schedule release of IRQ line */
- device_set_input_line( state->m_maincpu, 0, ASSERT_LINE );
+ state->m_maincpu->set_input_line(0, ASSERT_LINE );
state->m_irq_off_timer->adjust( state->m_screen->time_until_pos(vpos, 380/2 ) );
/* Schedule next IRQ trigger */
@@ -365,7 +365,7 @@ static TIMER_CALLBACK( d65010_irq_off_cb )
{
pv1000_state *state = machine.driver_data<pv1000_state>();
- device_set_input_line( state->m_maincpu, 0, CLEAR_LINE );
+ state->m_maincpu->set_input_line(0, CLEAR_LINE );
}
diff --git a/src/mess/drivers/pv2000.c b/src/mess/drivers/pv2000.c
index f722564ba4c..94126911521 100644
--- a/src/mess/drivers/pv2000.c
+++ b/src/mess/drivers/pv2000.c
@@ -373,7 +373,7 @@ static MACHINE_RESET( pv2000 )
state->m_key_pressed = 0;
state->m_keyb_column = 0;
- device_set_input_line_vector(machine.device("maincpu"), INPUT_LINE_IRQ0, 0xff);
+ machine.device("maincpu")->execute().set_input_line_vector(INPUT_LINE_IRQ0, 0xff);
memset(&state->memregion("maincpu")->base()[0x7000], 0xff, 0x1000); // initialize RAM
}
diff --git a/src/mess/drivers/pyl601.c b/src/mess/drivers/pyl601.c
index ea1dc5cf14a..33ec53817c0 100644
--- a/src/mess/drivers/pyl601.c
+++ b/src/mess/drivers/pyl601.c
@@ -518,7 +518,7 @@ static INTERRUPT_GEN( pyl601_interrupt )
{
pyl601_state *state = device->machine().driver_data<pyl601_state>();
state->m_tick50_mark = 0x80;
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static LEGACY_FLOPPY_OPTIONS_START(pyldin)
diff --git a/src/mess/drivers/ql.c b/src/mess/drivers/ql.c
index e59cb378f55..74c035416e7 100644
--- a/src/mess/drivers/ql.c
+++ b/src/mess/drivers/ql.c
@@ -163,10 +163,10 @@ WRITE8_MEMBER( ql_state::ipc_port2_w )
{
switch (ipl)
{
- case 0: device_set_input_line(m_maincpu, M68K_IRQ_7, ASSERT_LINE); break;
- case 1: device_set_input_line(m_maincpu, M68K_IRQ_5, ASSERT_LINE); break; // CTRL-ALT-7 pressed
- case 2: device_set_input_line(m_maincpu, M68K_IRQ_2, ASSERT_LINE); break;
- case 3: device_set_input_line(m_maincpu, M68K_IRQ_7, CLEAR_LINE); break;
+ case 0: m_maincpu->set_input_line(M68K_IRQ_7, ASSERT_LINE); break;
+ case 1: m_maincpu->set_input_line(M68K_IRQ_5, ASSERT_LINE); break; // CTRL-ALT-7 pressed
+ case 2: m_maincpu->set_input_line(M68K_IRQ_2, ASSERT_LINE); break;
+ case 3: m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE); break;
}
m_ipl = ipl;
@@ -208,7 +208,7 @@ READ8_MEMBER( ql_state::ipc_port2_r )
// int irq = (m_ser2_rxd | m_ser1_txd);
-// device_set_input_line(m_ipc, INPUT_LINE_IRQ0, irq);
+// m_ipc->execute().set_input_line(INPUT_LINE_IRQ0, irq);
return (m_comdata << 7);
}
diff --git a/src/mess/drivers/qx10.c b/src/mess/drivers/qx10.c
index a7731e8b876..4c5e09bd419 100644
--- a/src/mess/drivers/qx10.c
+++ b/src/mess/drivers/qx10.c
@@ -899,7 +899,7 @@ INPUT_PORTS_END
void qx10_state::machine_start()
{
- device_set_irq_callback(machine().device("maincpu"), irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
}
void qx10_state::machine_reset()
diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c
index 4eb7ef22612..39672811754 100644
--- a/src/mess/drivers/rainbow.c
+++ b/src/mess/drivers/rainbow.c
@@ -194,7 +194,7 @@ static MACHINE_RESET( rainbow )
{
rainbow_state *state = machine.driver_data<rainbow_state>();
- device_set_input_line(state->m_z80, INPUT_LINE_HALT, ASSERT_LINE);
+ state->m_z80->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
state->m_zflip = true;
state->m_z80_halted = true;
@@ -274,28 +274,28 @@ WRITE8_MEMBER(rainbow_state::share_z80_w)
READ8_MEMBER(rainbow_state::i8088_latch_r)
{
// printf("Read %02x from 8088 mailbox\n", m_8088_mailbox);
- device_set_input_line(m_i8088, INPUT_LINE_INT1, CLEAR_LINE);
+ m_i8088->execute().set_input_line(INPUT_LINE_INT1, CLEAR_LINE);
return m_8088_mailbox;
}
WRITE8_MEMBER(rainbow_state::i8088_latch_w)
{
// printf("%02x to Z80 mailbox\n", data);
- device_set_input_line_and_vector(m_z80, 0, ASSERT_LINE, 0xf7);
+ m_z80->execute().set_input_line_and_vector(0, ASSERT_LINE, 0xf7);
m_z80_mailbox = data;
}
READ8_MEMBER(rainbow_state::z80_latch_r)
{
// printf("Read %02x from Z80 mailbox\n", m_z80_mailbox);
- device_set_input_line(m_z80, 0, CLEAR_LINE);
+ m_z80->execute().set_input_line(0, CLEAR_LINE);
return m_z80_mailbox;
}
WRITE8_MEMBER(rainbow_state::z80_latch_w)
{
// printf("%02x to 8088 mailbox\n", data);
- device_set_input_line_and_vector(m_i8088, INPUT_LINE_INT1, ASSERT_LINE, 0x27);
+ m_i8088->execute().set_input_line_and_vector(INPUT_LINE_INT1, ASSERT_LINE, 0x27);
m_8088_mailbox = data;
}
@@ -316,12 +316,12 @@ READ8_MEMBER( rainbow_state::read_video_ram_r )
static INTERRUPT_GEN( vblank_irq )
{
- device_set_input_line_and_vector(device, INPUT_LINE_INT0, ASSERT_LINE, 0x20);
+ device->execute().set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, 0x20);
}
WRITE8_MEMBER( rainbow_state::clear_video_interrupt )
{
- device_set_input_line(m_i8088, INPUT_LINE_INT0, CLEAR_LINE);
+ m_i8088->execute().set_input_line(INPUT_LINE_INT0, CLEAR_LINE);
}
READ8_MEMBER( rainbow_state::diagnostic_r )
@@ -335,7 +335,7 @@ WRITE8_MEMBER( rainbow_state::diagnostic_w )
if (!(data & 1))
{
- device_set_input_line(m_z80, INPUT_LINE_HALT, ASSERT_LINE);
+ m_z80->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_z80_halted = true;
}
@@ -343,7 +343,7 @@ WRITE8_MEMBER( rainbow_state::diagnostic_w )
{
m_zflip = true;
m_z80_halted = false;
- device_set_input_line(m_z80, INPUT_LINE_HALT, CLEAR_LINE);
+ m_z80->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_z80->reset();
}
@@ -354,11 +354,11 @@ void rainbow_state::update_kbd_irq()
{
if ((m_kbd_rx_ready) || (m_kbd_tx_ready))
{
- device_set_input_line_and_vector(m_i8088, INPUT_LINE_INT2, ASSERT_LINE, 0x26);
+ m_i8088->execute().set_input_line_and_vector(INPUT_LINE_INT2, ASSERT_LINE, 0x26);
}
else
{
- device_set_input_line(m_i8088, INPUT_LINE_INT2, CLEAR_LINE);
+ m_i8088->execute().set_input_line(INPUT_LINE_INT2, CLEAR_LINE);
}
}
diff --git a/src/mess/drivers/rex6000.c b/src/mess/drivers/rex6000.c
index 91b519051cc..0706c7b7ec9 100644
--- a/src/mess/drivers/rex6000.c
+++ b/src/mess/drivers/rex6000.c
@@ -141,7 +141,7 @@ UINT8 rex6000_state::identify_bank_type(UINT32 bank)
}
else
{
- //logerror("%04x: unkonwn memory bank %x\n", m_maincpu->safe_pc(), bank);
+ //logerror("%04x: unkonwn memory bank %x\n", m_maincpu->pc(), bank);
return BANK_UNKNOWN;
}
}
@@ -413,7 +413,7 @@ static INPUT_CHANGED( trigger_irq )
{
state->m_irq_flag |= IRQ_FLAG_KEYCHANGE;
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
}
}
@@ -519,7 +519,7 @@ static TIMER_DEVICE_CALLBACK( irq_timer1 )
{
state->m_irq_flag |= IRQ_FLAG_IRQ2;
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
}
}
@@ -532,7 +532,7 @@ static TIMER_DEVICE_CALLBACK( irq_timer2 )
{
state->m_irq_flag |= IRQ_FLAG_IRQ1;
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
}
}
@@ -544,7 +544,7 @@ static TIMER_DEVICE_CALLBACK( sec_timer )
{
state->m_irq_flag |= IRQ_FLAG_1HZ;
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
}
}
@@ -553,7 +553,7 @@ WRITE_LINE_MEMBER( rex6000_state::alarm_irq )
if (!(m_irq_mask & IRQ_FLAG_ALARM) && state)
{
m_irq_flag |= IRQ_FLAG_ALARM;
- device_set_input_line(m_maincpu, 0, HOLD_LINE);
+ m_maincpu->set_input_line(0, HOLD_LINE);
}
}
diff --git a/src/mess/drivers/samcoupe.c b/src/mess/drivers/samcoupe.c
index e4433a03bb4..1e616dc70df 100644
--- a/src/mess/drivers/samcoupe.c
+++ b/src/mess/drivers/samcoupe.c
@@ -342,7 +342,7 @@ void samcoupe_irq(device_t *device, UINT8 src)
samcoupe_state *state = device->machine().driver_data<samcoupe_state>();
/* assert irq and a timer to set it off again */
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
device->machine().scheduler().timer_set(attotime::from_usec(20), FUNC(irq_off), src);
/* adjust STATUS register */
diff --git a/src/mess/drivers/sm1800.c b/src/mess/drivers/sm1800.c
index 5e84e874ea6..c966c3028c6 100644
--- a/src/mess/drivers/sm1800.c
+++ b/src/mess/drivers/sm1800.c
@@ -74,7 +74,7 @@ static IRQ_CALLBACK(sm1800_irq_callback)
MACHINE_RESET_MEMBER(sm1800_state)
{
- device_set_irq_callback(m_maincpu, sm1800_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(sm1800_irq_callback);
}
void sm1800_state::video_start()
diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c
index 109db93057a..849abbf5f23 100644
--- a/src/mess/drivers/smc777.c
+++ b/src/mess/drivers/smc777.c
@@ -1049,7 +1049,7 @@ static INTERRUPT_GEN( smc777_vblank_irq )
smc777_state *state = device->machine().driver_data<smc777_state>();
if(state->m_irq_mask)
- device_set_input_line(device,0,HOLD_LINE);
+ device->execute().set_input_line(0,HOLD_LINE);
}
diff --git a/src/mess/drivers/socrates.c b/src/mess/drivers/socrates.c
index ee0e7939106..8e4cb60f051 100644
--- a/src/mess/drivers/socrates.c
+++ b/src/mess/drivers/socrates.c
@@ -268,7 +268,7 @@ READ8_MEMBER(socrates_state::read_f3)// used for read-only i/o ports as mame/mes
WRITE8_MEMBER(socrates_state::kbmcu_strobe) // strobe the keyboard MCU
{
- //logerror("0x%04X: kbmcu written with %02X!\n", m_maincpu->safe_pc(), data); //if (m_maincpu->safe_pc() != 0x31D)
+ //logerror("0x%04X: kbmcu written with %02X!\n", m_maincpu->pc(), data); //if (m_maincpu->pc() != 0x31D)
// if two writes happen within one frame, reset the keyboard latches
m_kbmcu_rscount++;
if (m_kbmcu_rscount > 1)
@@ -912,7 +912,7 @@ static TIMER_CALLBACK( clear_irq_cb )
static INTERRUPT_GEN( assert_irq )
{
socrates_state *state = device->machine().driver_data<socrates_state>();
- device_set_input_line(device, 0, ASSERT_LINE);
+ device->execute().set_input_line(0, ASSERT_LINE);
device->machine().scheduler().timer_set(downcast<cpu_device *>(device)->cycles_to_attotime(44), FUNC(clear_irq_cb));
// 44 is a complete and total guess, need to properly measure how many clocks/microseconds the int line is high for.
state->m_vblankstate = 1;
diff --git a/src/mess/drivers/spectrum.c b/src/mess/drivers/spectrum.c
index b498eff0ead..3ee17e6826c 100644
--- a/src/mess/drivers/spectrum.c
+++ b/src/mess/drivers/spectrum.c
@@ -663,7 +663,7 @@ GFXDECODE_END
static INTERRUPT_GEN( spec_interrupt )
{
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static const cassette_interface spectrum_cassette_interface =
diff --git a/src/mess/drivers/supracan.c b/src/mess/drivers/supracan.c
index bcfc07ff35e..6de295a19ae 100644
--- a/src/mess/drivers/supracan.c
+++ b/src/mess/drivers/supracan.c
@@ -1142,11 +1142,11 @@ READ8_MEMBER( supracan_state::supracan_6502_soundmem_r )
{
if(m_sound_irq_enable_reg & m_sound_irq_source_reg)
{
- device_set_input_line(machine().device("soundcpu"), 0, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
}
else
{
- device_set_input_line(machine().device("soundcpu"), 0, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
}
break;
@@ -1156,7 +1156,7 @@ READ8_MEMBER( supracan_state::supracan_6502_soundmem_r )
if(!mem->debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", machine(), 3, "supracan_soundreg_r: IRQ source: %04x\n", data);
if(!mem->debugger_access())
{
- device_set_input_line(machine().device("soundcpu"), 0, CLEAR_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
break;
case 0x420:
@@ -1190,7 +1190,7 @@ WRITE8_MEMBER( supracan_state::supracan_6502_soundmem_w )
if(m_sound_cpu_68k_irq_reg &~ data)
{
verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", machine(), 0, "supracan_soundreg_w: sound_cpu_68k_irq_reg: %04x: Triggering M68k IRQ\n", data);
- device_set_input_line(m_maincpu, 7, HOLD_LINE);
+ m_maincpu->set_input_line(7, HOLD_LINE);
}
else
{
@@ -1420,7 +1420,7 @@ WRITE16_MEMBER( supracan_state::supracan_sound_w )
switch ( offset )
{
case 0x000a/2: /* Sound cpu IRQ request. */
- device_set_input_line(machine().device("soundcpu"), 0, ASSERT_LINE);
+ machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
break;
case 0x001c/2: /* Sound cpu control. Bit 0 tied to sound cpu RESET line */
if(data & 0x01)
@@ -1460,7 +1460,7 @@ READ16_MEMBER( supracan_state::supracan_video_r )
if(!mem->debugger_access())
{
//verboselog("maincpu", machine(), 0, "read video IRQ flags (%04x)\n", data);
- device_set_input_line(m_maincpu, 7, CLEAR_LINE);
+ m_maincpu->set_input_line(7, CLEAR_LINE);
}
break;
case 0x02/2: // Current scanline
@@ -1489,7 +1489,7 @@ static TIMER_CALLBACK( supracan_hbl_callback )
{
supracan_state *state = machine.driver_data<supracan_state>();
- device_set_input_line(state->m_maincpu, 3, HOLD_LINE);
+ state->m_maincpu->set_input_line(3, HOLD_LINE);
state->m_hbl_timer->adjust(attotime::never);
}
@@ -1498,7 +1498,7 @@ static TIMER_CALLBACK( supracan_line_on_callback )
{
supracan_state *state = machine.driver_data<supracan_state>();
- device_set_input_line(state->m_maincpu, 5, HOLD_LINE);
+ state->m_maincpu->set_input_line(5, HOLD_LINE);
state->m_line_on_timer->adjust(attotime::never);
}
@@ -1507,7 +1507,7 @@ static TIMER_CALLBACK( supracan_line_off_callback )
{
supracan_state *state = machine.driver_data<supracan_state>();
- device_set_input_line(state->m_maincpu, 5, CLEAR_LINE);
+ state->m_maincpu->set_input_line(5, CLEAR_LINE);
state->m_line_on_timer->adjust(attotime::never);
}
@@ -1541,7 +1541,7 @@ static TIMER_CALLBACK( supracan_video_callback )
if(state->m_irq_mask & 1)
{
verboselog("maincpu", machine, 0, "Triggering VBL IRQ\n\n");
- device_set_input_line(state->m_maincpu, 7, HOLD_LINE);
+ state->m_maincpu->set_input_line(7, HOLD_LINE);
}
break;
}
@@ -1724,7 +1724,7 @@ WRITE16_MEMBER( supracan_state::supracan_video_w )
#if 0
if(!m_irq_mask && !m_hbl_mask)
{
- device_set_input_line(m_maincpu, 7, CLEAR_LINE);
+ m_maincpu->set_input_line(7, CLEAR_LINE);
}
#endif
verboselog("maincpu", machine(), 3, "irq_mask = %04x\n", data);
@@ -1878,7 +1878,7 @@ static INTERRUPT_GEN( supracan_irq )
if(state->m_irq_mask)
{
- device_set_input_line(device, 7, HOLD_LINE);
+ device->execute().set_input_line(7, HOLD_LINE);
}
#endif
}
@@ -1891,11 +1891,11 @@ static INTERRUPT_GEN( supracan_sound_irq )
if(state->m_sound_irq_enable_reg & state->m_sound_irq_source_reg)
{
- device_set_input_line(device->machine().device("soundcpu"), 0, ASSERT_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, ASSERT_LINE);
}
else
{
- device_set_input_line(device->machine().device("soundcpu"), 0, CLEAR_LINE);
+ device->machine().device("soundcpu")->execute().set_input_line(0, CLEAR_LINE);
}
}
diff --git a/src/mess/drivers/svision.c b/src/mess/drivers/svision.c
index a5aa5d36d5c..872b0c1ebba 100644
--- a/src/mess/drivers/svision.c
+++ b/src/mess/drivers/svision.c
@@ -418,7 +418,7 @@ static INTERRUPT_GEN( svision_frame_int )
{
svision_state *state = device->machine().driver_data<svision_state>();
if (state->BANK&1)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
svision_sound_decrement(state->m_sound);
}
diff --git a/src/mess/drivers/tandy2k.c b/src/mess/drivers/tandy2k.c
index d07481aa7bc..4a7cc1d7641 100644
--- a/src/mess/drivers/tandy2k.c
+++ b/src/mess/drivers/tandy2k.c
@@ -121,10 +121,10 @@ WRITE8_MEMBER( tandy2k_state::enable_w )
upd765_reset_w(m_fdc, BIT(data, 5));
// timer 0 enable
- device_set_input_line(m_maincpu, INPUT_LINE_TMRIN0, BIT(data, 6));
+ m_maincpu->set_input_line(INPUT_LINE_TMRIN0, BIT(data, 6));
// timer 1 enable
- device_set_input_line(m_maincpu, INPUT_LINE_TMRIN1, BIT(data, 7));
+ m_maincpu->set_input_line(INPUT_LINE_TMRIN1, BIT(data, 7));
}
WRITE8_MEMBER( tandy2k_state::dma_mux_w )
diff --git a/src/mess/drivers/tek405x.c b/src/mess/drivers/tek405x.c
index e1f9337cd7b..c15653f6d73 100644
--- a/src/mess/drivers/tek405x.c
+++ b/src/mess/drivers/tek405x.c
@@ -64,7 +64,7 @@ void tek4051_state::update_irq()
{
int state = m_kb_pia_irqa | m_kb_pia_irqb | m_x_pia_irqa | m_x_pia_irqb | m_gpib_pia_irqa | m_gpib_pia_irqb | m_com_pia_irqa | m_com_pia_irqb | m_acia_irq;
- device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, state);
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, state);
}
@@ -76,7 +76,7 @@ void tek4051_state::update_nmi()
{
int state = m_y_pia_irqa | m_y_pia_irqb | m_tape_pia_irqa | m_tape_pia_irqb;
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, state);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, state);
}
diff --git a/src/mess/drivers/ti99_2.c b/src/mess/drivers/ti99_2.c
index c93ff6f19ab..04225709441 100644
--- a/src/mess/drivers/ti99_2.c
+++ b/src/mess/drivers/ti99_2.c
@@ -131,7 +131,7 @@ static MACHINE_RESET( ti99_2 )
static INTERRUPT_GEN( ti99_2_vblank_interrupt )
{
ti99_2_state *state = device->machine().driver_data<ti99_2_state>();
- device_set_input_line(device, 1, state->m_irq_state);
+ device->execute().set_input_line(1, state->m_irq_state);
state->m_irq_state = (state->m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE;
}
diff --git a/src/mess/drivers/ti99_4p.c b/src/mess/drivers/ti99_4p.c
index c7363923dbe..7ce6f5bee1e 100644
--- a/src/mess/drivers/ti99_4p.c
+++ b/src/mess/drivers/ti99_4p.c
@@ -335,7 +335,7 @@ READ16_MEMBER( ti99_4p::memread )
WRITE16_MEMBER( ti99_4p::memwrite )
{
-// device_adjust_icount(m_cpu, -4);
+// m_cpu->execute().adjust_icount(-4);
int addroff = offset << 1;
UINT16 zone = addroff & 0xe000;
diff --git a/src/mess/drivers/trs80m2.c b/src/mess/drivers/trs80m2.c
index e8be6e6ba7b..b0e7c52fd48 100644
--- a/src/mess/drivers/trs80m2.c
+++ b/src/mess/drivers/trs80m2.c
@@ -956,7 +956,7 @@ void trs80m16_state::machine_start()
trs80m2_state::machine_start();
// register CPU IRQ callback
- device_set_irq_callback(m_maincpu, trs80m16_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(trs80m16_irq_callback);
// register for state saving
save_item(NAME(m_ual));
diff --git a/src/mess/drivers/tsispch.c b/src/mess/drivers/tsispch.c
index 7ffdca9428d..8510638c00e 100644
--- a/src/mess/drivers/tsispch.c
+++ b/src/mess/drivers/tsispch.c
@@ -272,7 +272,7 @@ void tsispch_state::machine_reset()
int i;
for (i=0; i<32; i++) m_infifo[i] = 0;
m_infifo_tail_ptr = m_infifo_head_ptr = 0;
- device_set_irq_callback(machine().device("maincpu"), irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(irq_callback);
fprintf(stderr,"machine reset\n");
}
diff --git a/src/mess/drivers/tvc.c b/src/mess/drivers/tvc.c
index 7c0e506ce09..17711721e2b 100644
--- a/src/mess/drivers/tvc.c
+++ b/src/mess/drivers/tvc.c
@@ -193,7 +193,7 @@ WRITE8_MEMBER(tvc_state::tvc_flipflop_w)
{
// every write here clears the vblank flipflop
m_int_flipflop = 1;
- device_set_input_line(m_maincpu, 0, CLEAR_LINE);
+ m_maincpu->set_input_line(0, CLEAR_LINE);
}
READ8_MEMBER(tvc_state::tvc_exp_id_r)
@@ -605,7 +605,7 @@ WRITE_LINE_MEMBER(tvc_state::tvc_int_ff_set)
if (state)
{
m_int_flipflop = 0;
- device_set_input_line(m_maincpu, 0, ASSERT_LINE);
+ m_maincpu->set_input_line(0, ASSERT_LINE);
}
}
diff --git a/src/mess/drivers/v1050.c b/src/mess/drivers/v1050.c
index f57a0787b1a..faeb420a727 100644
--- a/src/mess/drivers/v1050.c
+++ b/src/mess/drivers/v1050.c
@@ -343,7 +343,7 @@ WRITE8_MEMBER( v1050_state::dint_w )
WRITE8_MEMBER( v1050_state::dvint_clr_w )
{
- device_set_input_line(m_subcpu, INPUT_LINE_IRQ0, CLEAR_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
READ8_MEMBER( v1050_state::sasi_status_r )
@@ -604,7 +604,7 @@ static WRITE_LINE_DEVICE_HANDLER( pic_int_w )
{
if (state == ASSERT_LINE)
{
- device_set_input_line(device, INPUT_LINE_IRQ0, ASSERT_LINE);
+ device->execute().set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
}
@@ -756,7 +756,7 @@ WRITE8_MEMBER( v1050_state::misc_ppi_pc_w )
if (!m_f_int_enb)
{
set_interrupt(INT_FLOPPY, 0);
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
// baud select
@@ -948,11 +948,11 @@ WRITE_LINE_MEMBER( v1050_state::fdc_drq_w )
{
if (m_f_int_enb)
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, state);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, state);
}
else
{
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
}
@@ -1013,7 +1013,7 @@ static IRQ_CALLBACK( v1050_int_ack )
//logerror("Interrupt Acknowledge Vector: %02x\n", vector);
- device_set_input_line(state->m_maincpu, INPUT_LINE_IRQ0, CLEAR_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
return vector;
}
@@ -1033,7 +1033,7 @@ void v1050_state::machine_start()
m_rtc->cs1_w(1);
// set CPU interrupt callback
- device_set_irq_callback(m_maincpu, v1050_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(v1050_int_ack);
// setup memory banking
UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c
index fb7d71eda4f..25d00517705 100644
--- a/src/mess/drivers/vboy.c
+++ b/src/mess/drivers/vboy.c
@@ -616,7 +616,7 @@ WRITE32_MEMBER( vboy_state::io_w )
*/
if (!(data & 0x08))
{
- device_set_input_line(m_maincpu, 1, CLEAR_LINE);
+ m_maincpu->set_input_line(1, CLEAR_LINE);
}
if (data & 1)
@@ -1201,7 +1201,7 @@ void vboy_state::m_timer_tick()
m_vboy_regs.tcr |= 0x02;
if(m_vboy_regs.tcr & 8)
{
- device_set_input_line(m_maincpu, 1, ASSERT_LINE);
+ m_maincpu->set_input_line(1, ASSERT_LINE);
}
}
@@ -1227,7 +1227,7 @@ static TIMER_DEVICE_CALLBACK( timer_pad_tick )
vboy_state *state = timer.machine().driver_data<vboy_state>();
if((state->m_vboy_regs.kcr & 0x80) == 0)
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
}
static PALETTE_INIT( vboy )
@@ -1243,10 +1243,10 @@ void vboy_state::m_set_irq(UINT16 irq_vector)
m_vip_regs.INTPND |= irq_vector;
if(m_vip_regs.INTENB & m_vip_regs.INTPND)
- device_set_input_line(m_maincpu, 4, ASSERT_LINE);
+ m_maincpu->set_input_line(4, ASSERT_LINE);
if((m_vip_regs.INTENB & m_vip_regs.INTPND) == 0)
- device_set_input_line(m_maincpu, 4, CLEAR_LINE);
+ m_maincpu->set_input_line(4, CLEAR_LINE);
}
/* TODO: obviously all of this needs clean-ups and better implementation ... */
diff --git a/src/mess/drivers/victor9k.c b/src/mess/drivers/victor9k.c
index 9bd1c1a8f35..12b2e7ee0fd 100644
--- a/src/mess/drivers/victor9k.c
+++ b/src/mess/drivers/victor9k.c
@@ -825,7 +825,7 @@ WRITE8_MEMBER( victor9k_state::via6_pb_w )
*/
// motor speed controller reset
- device_set_input_line(m_fdc_cpu, INPUT_LINE_RESET, BIT(data, 2));
+ m_fdc_cpu->set_input_line(INPUT_LINE_RESET, BIT(data, 2));
// stepper enable A
m_se[0] = BIT(data, 6);
@@ -923,7 +923,7 @@ static IRQ_CALLBACK( victor9k_irq_callback )
void victor9k_state::machine_start()
{
// set interrupt callback
- device_set_irq_callback(m_maincpu, victor9k_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(victor9k_irq_callback);
// memory banking
address_space *program = m_maincpu->space(AS_PROGRAM);
diff --git a/src/mess/drivers/vidbrain.c b/src/mess/drivers/vidbrain.c
index 2318fcba0ff..f695d54e526 100644
--- a/src/mess/drivers/vidbrain.c
+++ b/src/mess/drivers/vidbrain.c
@@ -530,7 +530,7 @@ void vidbrain_state::device_timer(emu_timer &timer, device_timer_id id, int para
void vidbrain_state::machine_start()
{
// register IRQ callback
- device_set_irq_callback(m_maincpu, vidbrain_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(vidbrain_int_ack);
// allocate timers
m_timer_ne555 = timer_alloc(TIMER_JOYSTICK);
diff --git a/src/mess/drivers/vixen.c b/src/mess/drivers/vixen.c
index d871fd6f394..e2363ade506 100644
--- a/src/mess/drivers/vixen.c
+++ b/src/mess/drivers/vixen.c
@@ -79,7 +79,7 @@ void vixen_state::update_interrupt()
{
int state = (m_cmd_d1 && m_fdint) || m_vsync || (!m_enb_srq_int && !m_srq) || (!m_enb_atn_int && !m_atn) || (!m_enb_xmt_int && m_txrdy) || (!m_enb_rcv_int && m_rxrdy);
- device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
}
@@ -778,7 +778,7 @@ static IRQ_CALLBACK( vixen_int_ack )
void vixen_state::machine_start()
{
// interrupt callback
- device_set_irq_callback(m_maincpu, vixen_int_ack);
+ m_maincpu->set_irq_acknowledge_callback(vixen_int_ack);
// configure memory banking
UINT8 *ram = m_ram->pointer();
diff --git a/src/mess/drivers/vk100.c b/src/mess/drivers/vk100.c
index b36c412f1ee..b528ee3bef0 100644
--- a/src/mess/drivers/vk100.c
+++ b/src/mess/drivers/vk100.c
@@ -561,7 +561,7 @@ READ8_MEMBER(vk100_state::SYSTAT_A)
{
UINT8 dipswitchLUT[8] = { 1,3,5,7,6,4,2,0 }; // the dipswitches map in a weird order to offsets
#ifdef SYSTAT_A_VERBOSE
- if (m_maincpu->safe_pc() != 0x31D) logerror("0x%04X: SYSTAT_A Read!\n", m_maincpu->safe_pc());
+ if (m_maincpu->pc() != 0x31D) logerror("0x%04X: SYSTAT_A Read!\n", m_maincpu->pc());
#endif
return ((m_vgGO?0:1)<<7)|(vram_read(machine())<<3)|(((ioport("SWITCHES")->read()>>dipswitchLUT[offset])&1)?0x4:0)|(m_vsync?0x2:0);
}
@@ -585,7 +585,7 @@ READ8_MEMBER(vk100_state::SYSTAT_A)
READ8_MEMBER(vk100_state::SYSTAT_B)
{
#ifdef SYSTAT_B_VERBOSE
- logerror("0x%04X: SYSTAT_B Read!\n", m_maincpu->safe_pc());
+ logerror("0x%04X: SYSTAT_B Read!\n", m_maincpu->pc());
#endif
return (m_ACTS<<7)|0x7F;
}
@@ -875,20 +875,20 @@ static MACHINE_RESET( vk100 )
static WRITE_LINE_DEVICE_HANDLER(crtc_vsync)
{
vk100_state *m_state = device->machine().driver_data<vk100_state>();
- device_set_input_line(m_state->m_maincpu, I8085_RST75_LINE, state? ASSERT_LINE : CLEAR_LINE);
+ m_state->m_maincpu->set_input_line(I8085_RST75_LINE, state? ASSERT_LINE : CLEAR_LINE);
m_state->m_vsync = state;
}
static WRITE_LINE_DEVICE_HANDLER(i8251_rxrdy_int)
{
vk100_state *m_state = device->machine().driver_data<vk100_state>();
- device_set_input_line(m_state->m_maincpu, I8085_RST65_LINE, state?ASSERT_LINE:CLEAR_LINE);
+ m_state->m_maincpu->set_input_line(I8085_RST65_LINE, state?ASSERT_LINE:CLEAR_LINE);
}
static WRITE_LINE_DEVICE_HANDLER(i8251_txrdy_int)
{
vk100_state *m_state = device->machine().driver_data<vk100_state>();
- device_set_input_line(m_state->m_maincpu, I8085_RST55_LINE, state?ASSERT_LINE:CLEAR_LINE);
+ m_state->m_maincpu->set_input_line(I8085_RST55_LINE, state?ASSERT_LINE:CLEAR_LINE);
}
static WRITE_LINE_DEVICE_HANDLER(i8251_rts)
diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c
index 354adebf952..17efcf701a3 100644
--- a/src/mess/drivers/vt100.c
+++ b/src/mess/drivers/vt100.c
@@ -356,7 +356,7 @@ static MACHINE_RESET(vt100)
state->m_key_scan = 0;
- device_set_irq_callback(machine.device("maincpu"), vt100_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(vt100_irq_callback);
}
READ8_MEMBER( vt100_state::vt100_read_video_ram_r )
@@ -381,7 +381,7 @@ static INTERRUPT_GEN( vt100_vertical_interrupt )
{
vt100_state *state = device->machine().driver_data<vt100_state>();
state->m_vertical_int = 1;
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
/* F4 Character Displayer */
diff --git a/src/mess/drivers/vt240.c b/src/mess/drivers/vt240.c
index 70ca1c5250b..43c2188f9a8 100644
--- a/src/mess/drivers/vt240.c
+++ b/src/mess/drivers/vt240.c
@@ -142,7 +142,7 @@ static UPD7220_INTERFACE( hgdc_intf )
static INTERRUPT_GEN( vt240_irq )
{
- //device_set_input_line(device, I8085_RST65_LINE, ASSERT_LINE);
+ //device->execute().set_input_line(I8085_RST65_LINE, ASSERT_LINE);
}
static const gfx_layout vt240_chars_8x8 =
diff --git a/src/mess/drivers/wangpc.c b/src/mess/drivers/wangpc.c
index a6cdaabf50d..32a044cb718 100644
--- a/src/mess/drivers/wangpc.c
+++ b/src/mess/drivers/wangpc.c
@@ -1165,7 +1165,7 @@ SLOT_INTERFACE_END
void wangpc_state::machine_start()
{
// register CPU IRQ callback
- device_set_irq_callback(m_maincpu, wangpc_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(wangpc_irq_callback);
// connect serial keyboard
m_uart->connect(m_kb);
diff --git a/src/mess/drivers/x07.c b/src/mess/drivers/x07.c
index c1b3ace8eb9..f037ac03868 100644
--- a/src/mess/drivers/x07.c
+++ b/src/mess/drivers/x07.c
@@ -579,7 +579,7 @@ void x07_state::t6834_r ()
m_regs_r[0] = 0x40;
m_regs_r[1] = m_out.data[m_out.read];
m_regs_r[2] |= 0x01;
- device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE);
+ m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE);
m_rsta_clear->adjust(attotime::from_msec(50));
}
}
@@ -648,7 +648,7 @@ void x07_state::t6834_w ()
m_regs_r[0] = 0x40;
m_regs_r[1] = m_out.data[m_out.read];
m_regs_r[2] |= 0x01;
- device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE);
+ m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE);
m_rsta_clear->adjust(attotime::from_msec(50));
}
}
@@ -805,7 +805,7 @@ void x07_state::receive_bit(int bit)
m_cass_data = 0;
m_bit_count = 0;
- device_set_input_line(m_maincpu, NSC800_RSTB, ASSERT_LINE);
+ m_maincpu->set_input_line(NSC800_RSTB, ASSERT_LINE);
m_rstb_clear->adjust(attotime::from_usec(200));
}
@@ -982,7 +982,7 @@ INPUT_CHANGED_MEMBER( x07_state::kb_break )
m_regs_r[0] = 0x80;
m_regs_r[1] = 0x05;
m_regs_r[2] |= 0x01;
- device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE );
+ m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE );
m_rsta_clear->adjust(attotime::from_msec(50));
}
}
@@ -998,7 +998,7 @@ void x07_state::kb_irq()
memcpy(m_t6834_ram + 0x400, m_t6834_ram + 0x401, 0xff);
m_kb_size--;
m_regs_r[2] |= 0x01;
- device_set_input_line(m_maincpu, NSC800_RSTA, ASSERT_LINE);
+ m_maincpu->set_input_line(NSC800_RSTA, ASSERT_LINE);
m_rsta_clear->adjust(attotime::from_msec(50));
}
}
@@ -1370,7 +1370,7 @@ static TIMER_DEVICE_CALLBACK( blink_timer )
static TIMER_CALLBACK( rsta_clear )
{
x07_state *state = machine.driver_data<x07_state>();
- device_set_input_line(state->m_maincpu, NSC800_RSTA, CLEAR_LINE);
+ state->m_maincpu->set_input_line(NSC800_RSTA, CLEAR_LINE);
if (state->m_kb_size)
state->kb_irq();
@@ -1379,7 +1379,7 @@ static TIMER_CALLBACK( rsta_clear )
static TIMER_CALLBACK( rstb_clear )
{
x07_state *state = machine.driver_data<x07_state>();
- device_set_input_line(state->m_maincpu, NSC800_RSTB, CLEAR_LINE);
+ state->m_maincpu->set_input_line(NSC800_RSTB, CLEAR_LINE);
}
static TIMER_CALLBACK( beep_stop )
diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c
index a185dc5d286..2bbed673aca 100644
--- a/src/mess/drivers/x1.c
+++ b/src/mess/drivers/x1.c
@@ -1942,7 +1942,7 @@ static INPUT_CHANGED( ipl_reset )
//address_space *space = field.machine().device("x1_cpu")->memory().space(AS_PROGRAM);
x1_state *state = field.machine().driver_data<x1_state>();
- device_set_input_line(state->m_x1_cpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_x1_cpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
state->m_ram_bank = 0x00;
if(state->m_is_turbo) { state->m_ex_bank = 0x10; }
@@ -1954,7 +1954,7 @@ static INPUT_CHANGED( nmi_reset )
{
x1_state *state = field.machine().driver_data<x1_state>();
- device_set_input_line(state->m_x1_cpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_x1_cpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
INPUT_PORTS_START( x1 )
@@ -2391,14 +2391,14 @@ static IRQ_CALLBACK(x1_irq_callback)
{
state->m_ctc_irq_flag = 0;
if(state->m_key_irq_flag == 0) // if no other devices are pulling the IRQ line high
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
return state->m_irq_vector;
}
if(state->m_key_irq_flag != 0)
{
state->m_key_irq_flag = 0;
if(state->m_ctc_irq_flag == 0) // if no other devices are pulling the IRQ line high
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
return state->m_key_irq_vector;
}
return state->m_irq_vector;
@@ -2483,7 +2483,7 @@ MACHINE_RESET( x1 )
state->m_io_bank_mode = 0;
- //device_set_irq_callback(machine.device("x1_cpu"), x1_irq_callback);
+ //machine.device("x1_cpu")->execute().set_irq_acknowledge_callback(x1_irq_callback);
state->m_cmt_current_cmd = 0;
state->m_cmt_test = 0;
diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c
index 56e79c9deba..0b1d28a2d18 100644
--- a/src/mess/drivers/x1twin.c
+++ b/src/mess/drivers/x1twin.c
@@ -110,7 +110,7 @@ static INPUT_CHANGED( ipl_reset )
//address_space *space = field.machine().device("x1_cpu")->memory().space(AS_PROGRAM);
x1twin_state *state = field.machine().driver_data<x1twin_state>();
- device_set_input_line(state->m_x1_cpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_x1_cpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
state->m_ram_bank = 0x00;
if(state->m_is_turbo) { state->m_ex_bank = 0x10; }
@@ -122,7 +122,7 @@ static INPUT_CHANGED( nmi_reset )
{
x1twin_state *state = field.machine().driver_data<x1twin_state>();
- device_set_input_line(state->m_x1_cpu, INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
+ state->m_x1_cpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
}
INPUT_PORTS_START( x1twin )
diff --git a/src/mess/drivers/x68k.c b/src/mess/drivers/x68k.c
index a3b31f75159..faea45046f0 100644
--- a/src/mess/drivers/x68k.c
+++ b/src/mess/drivers/x68k.c
@@ -2706,7 +2706,7 @@ DRIVER_INIT_MEMBER(x68k_state,x68000)
mfp_init(machine());
- device_set_irq_callback(machine().device("maincpu"), x68k_int_ack);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(x68k_int_ack);
// init keyboard
m_keyboard.delay = 500; // 3*100+200
diff --git a/src/mess/drivers/xerox820.c b/src/mess/drivers/xerox820.c
index 6db7d062bce..84d2328ac7e 100644
--- a/src/mess/drivers/xerox820.c
+++ b/src/mess/drivers/xerox820.c
@@ -599,9 +599,9 @@ WRITE_LINE_MEMBER( xerox820_state::intrq_w )
m_fdc_irq = state;
if (halt && state)
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
else
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
WRITE_LINE_MEMBER( xerox820_state::drq_w )
@@ -611,9 +611,9 @@ WRITE_LINE_MEMBER( xerox820_state::drq_w )
m_fdc_drq = state;
if (halt && state)
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
else
- device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
static const wd17xx_interface fdc_intf =
diff --git a/src/mess/drivers/xor100.c b/src/mess/drivers/xor100.c
index 91b5ed33d0d..38a8fc5999d 100644
--- a/src/mess/drivers/xor100.c
+++ b/src/mess/drivers/xor100.c
@@ -191,7 +191,7 @@ READ8_MEMBER( xor100_state::fdc_wait_r )
if (!m_fdc_irq && !m_fdc_drq)
{
/* TODO: this is really connected to the Z80 _RDY line */
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
return !m_fdc_irq << 7;
@@ -493,7 +493,7 @@ WRITE_LINE_MEMBER( xor100_state::fdc_irq_w )
if (state)
{
/* TODO: this is really connected to the Z80 _RDY line */
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
}
@@ -504,7 +504,7 @@ WRITE_LINE_MEMBER( xor100_state::fdc_drq_w )
if (state)
{
/* TODO: this is really connected to the Z80 _RDY line */
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
}
diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c
index e88ef74e405..b82f0d76601 100644
--- a/src/mess/drivers/z100.c
+++ b/src/mess/drivers/z100.c
@@ -750,7 +750,7 @@ static MACHINE_START(z100)
{
z100_state *state = machine.driver_data<z100_state>();
- device_set_irq_callback(machine.device("maincpu"), z100_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(z100_irq_callback);
state->m_mc6845 = machine.device<mc6845_device>("crtc");
}
diff --git a/src/mess/includes/fmtowns.h b/src/mess/includes/fmtowns.h
index fc038c264d0..9cd9d90f170 100644
--- a/src/mess/includes/fmtowns.h
+++ b/src/mess/includes/fmtowns.h
@@ -103,7 +103,7 @@ class towns_state : public driver_device
{ }
/* devices */
- device_t* m_maincpu;
+ cpu_device* m_maincpu;
device_t* m_dma_1;
device_t* m_dma_2;
device_t* m_fdc;
diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h
index c395c214249..1c34e305f45 100644
--- a/src/mess/includes/nes.h
+++ b/src/mess/includes/nes.h
@@ -126,7 +126,7 @@ public:
nes_chr_callback m_mmc3_chr_cb;
/* devices */
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
ppu2c0x_device *m_ppu;
device_t *m_sound;
device_t *m_cart;
diff --git a/src/mess/includes/pc.h b/src/mess/includes/pc.h
index 311cfe9515e..29adf1358d9 100644
--- a/src/mess/includes/pc.h
+++ b/src/mess/includes/pc.h
@@ -23,7 +23,7 @@ public:
{
}
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
device_t *m_pic8259;
device_t *m_dma8237;
device_t *m_pit8253;
diff --git a/src/mess/machine/a2bus.c b/src/mess/machine/a2bus.c
index aa2f4d8f644..05532afc5e7 100644
--- a/src/mess/machine/a2bus.c
+++ b/src/mess/machine/a2bus.c
@@ -175,7 +175,7 @@ a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, cons
void a2bus_device::device_start()
{
- m_maincpu = machine().device(m_cputag);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
// resolve callbacks
m_out_irq_func.resolve(m_out_irq_cb, *this);
diff --git a/src/mess/machine/a2bus.h b/src/mess/machine/a2bus.h
index 3fc80c25843..71e9a634137 100644
--- a/src/mess/machine/a2bus.h
+++ b/src/mess/machine/a2bus.h
@@ -105,7 +105,7 @@ protected:
virtual void device_config_complete();
// internal state
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
devcb_resolved_write_line m_out_irq_func;
devcb_resolved_write_line m_out_nmi_func;
diff --git a/src/mess/machine/a2eauxslot.c b/src/mess/machine/a2eauxslot.c
index 568907b525b..39c5562c690 100644
--- a/src/mess/machine/a2eauxslot.c
+++ b/src/mess/machine/a2eauxslot.c
@@ -112,7 +112,7 @@ a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type
void a2eauxslot_device::device_start()
{
- m_maincpu = machine().device(m_cputag);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
// resolve callbacks
m_out_irq_func.resolve(m_out_irq_cb, *this);
diff --git a/src/mess/machine/a2eauxslot.h b/src/mess/machine/a2eauxslot.h
index 8e645c7b352..bcead368242 100644
--- a/src/mess/machine/a2eauxslot.h
+++ b/src/mess/machine/a2eauxslot.h
@@ -97,7 +97,7 @@ protected:
virtual void device_config_complete();
// internal state
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
devcb_resolved_write_line m_out_irq_func;
devcb_resolved_write_line m_out_nmi_func;
diff --git a/src/mess/machine/a2softcard.c b/src/mess/machine/a2softcard.c
index adc2836941e..b8610453d44 100644
--- a/src/mess/machine/a2softcard.c
+++ b/src/mess/machine/a2softcard.c
@@ -85,7 +85,7 @@ void a2bus_softcard_device::device_reset()
m_bEnabled = false;
m_6502space = NULL;
m_FirstZ80Boot = true;
- device_set_input_line(m_z80, INPUT_LINE_HALT, ASSERT_LINE);
+ m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8 data)
@@ -97,8 +97,8 @@ void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8
// steal the 6502's address space
m_6502space = &space;
- device_set_input_line(m_z80, INPUT_LINE_HALT, CLEAR_LINE);
- device_set_input_line(state->m_maincpu, INPUT_LINE_HALT, ASSERT_LINE);
+ m_z80->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
if (m_FirstZ80Boot)
{
@@ -110,8 +110,8 @@ void a2bus_softcard_device::write_cnxx(address_space &space, UINT8 offset, UINT8
}
else
{
- device_set_input_line(m_z80, INPUT_LINE_HALT, ASSERT_LINE);
- device_set_input_line(state->m_maincpu, INPUT_LINE_HALT, CLEAR_LINE);
+ m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_bEnabled = false;
}
}
diff --git a/src/mess/machine/a2themill.c b/src/mess/machine/a2themill.c
index c080f04cba7..1f64df6cdf6 100644
--- a/src/mess/machine/a2themill.c
+++ b/src/mess/machine/a2themill.c
@@ -108,8 +108,8 @@ void a2bus_themill_device::device_reset()
m_flipAddrSpace = false;
m_6809Mode = false;
m_status = 0xc0; // OS9 loader relies on this
- device_set_input_line(m_6809, INPUT_LINE_HALT, ASSERT_LINE);
- device_set_input_line(m_6809, INPUT_LINE_RESET, ASSERT_LINE);
+ m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ m_6809->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
UINT8 a2bus_themill_device::read_c0nx(address_space &space, UINT8 offset)
@@ -141,15 +141,15 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8
m_6502space = &space;
m_6809->reset();
- device_set_input_line(m_6809, INPUT_LINE_HALT, CLEAR_LINE);
- device_set_input_line(m_6809, INPUT_LINE_RESET, CLEAR_LINE);
+ m_6809->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ m_6809->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_bEnabled = true;
m_status &= ~0x04;
}
else
{
- device_set_input_line(m_6809, INPUT_LINE_HALT, ASSERT_LINE);
+ m_6809->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_bEnabled = false;
m_status |= 0x04;
}
@@ -170,12 +170,12 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8
case 3: // 6809 NMI
if (data & 0x80)
{
- device_set_input_line(m_6809, INPUT_LINE_NMI, CLEAR_LINE);
+ m_6809->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
m_status |= 0x08;
}
else
{
- device_set_input_line(m_6809, INPUT_LINE_NMI, ASSERT_LINE);
+ m_6809->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
m_status &= ~0x08;
}
break;
@@ -183,12 +183,12 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8
case 4: // 6809 FIRQ
if (data & 0x80)
{
- device_set_input_line(m_6809, M6809_FIRQ_LINE, CLEAR_LINE);
+ m_6809->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
m_status |= 0x10;
}
else
{
- device_set_input_line(m_6809, M6809_FIRQ_LINE, ASSERT_LINE);
+ m_6809->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
m_status &= ~0x10;
}
break;
@@ -196,12 +196,12 @@ void a2bus_themill_device::write_c0nx(address_space &space, UINT8 offset, UINT8
case 5: // 6809 IRQ
if (data & 0x80)
{
- device_set_input_line(m_6809, M6809_IRQ_LINE, CLEAR_LINE);
+ m_6809->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
m_status |= 0x20;
}
else
{
- device_set_input_line(m_6809, M6809_IRQ_LINE, ASSERT_LINE);
+ m_6809->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
m_status &= ~0x20;
}
break;
diff --git a/src/mess/machine/abc77.c b/src/mess/machine/abc77.c
index b835e104cf6..6712b6e87fb 100644
--- a/src/mess/machine/abc77.c
+++ b/src/mess/machine/abc77.c
@@ -498,10 +498,10 @@ void abc77_device::device_reset()
int ea = BIT(ioport("DSW")->read(), 7);
// trigger reset
- device_set_input_line(m_maincpu, INPUT_LINE_RESET, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_reset_timer->adjust(attotime::from_msec(t));
- device_set_input_line(m_maincpu, MCS48_INPUT_EA, ea ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_EA, ea ? CLEAR_LINE : ASSERT_LINE);
}
@@ -518,7 +518,7 @@ void abc77_device::device_timer(emu_timer &timer, device_timer_id id, int param,
break;
case TIMER_RESET:
- device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
break;
}
}
@@ -638,7 +638,7 @@ WRITE8_MEMBER( abc77_device::j3_w )
WRITE_LINE_MEMBER( abc77_device::rxd_w )
{
- device_set_input_line(m_maincpu, MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mess/machine/abc99.c b/src/mess/machine/abc99.c
index e9eae6c1675..50dc2eae0a5 100644
--- a/src/mess/machine/abc99.c
+++ b/src/mess/machine/abc99.c
@@ -239,7 +239,7 @@ machine_config_constructor abc99_device::device_mconfig_additions() const
INPUT_CHANGED_MEMBER( abc99_device::keyboard_reset )
{
- device_set_input_line(m_mousecpu, INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
+ m_mousecpu->set_input_line(INPUT_LINE_RESET, newval ? CLEAR_LINE : ASSERT_LINE);
}
@@ -459,8 +459,8 @@ ioport_constructor abc99_device::device_input_ports() const
inline void abc99_device::serial_input()
{
- device_set_input_line(m_maincpu, MCS48_INPUT_IRQ, (m_si | m_si_en) ? CLEAR_LINE : ASSERT_LINE);
- device_set_input_line(m_mousecpu, MCS48_INPUT_IRQ, m_si ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_IRQ, (m_si | m_si_en) ? CLEAR_LINE : ASSERT_LINE);
+ m_mousecpu->set_input_line(MCS48_INPUT_IRQ, m_si ? CLEAR_LINE : ASSERT_LINE);
}
@@ -578,8 +578,8 @@ void abc99_device::device_start()
void abc99_device::device_reset()
{
// set EA lines
- device_set_input_line(m_maincpu, MCS48_INPUT_EA, ASSERT_LINE);
- device_set_input_line(m_mousecpu, MCS48_INPUT_EA, ASSERT_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_EA, ASSERT_LINE);
+ m_mousecpu->set_input_line(MCS48_INPUT_EA, ASSERT_LINE);
}
@@ -786,7 +786,7 @@ WRITE8_MEMBER( abc99_device::z5_p2_w )
if (m_reset != reset)
{
m_reset = reset;
- device_set_input_line(m_maincpu, INPUT_LINE_RESET, m_reset ? CLEAR_LINE : ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, m_reset ? CLEAR_LINE : ASSERT_LINE);
}
// serial output
@@ -854,5 +854,5 @@ READ_LINE_MEMBER( abc99_device::txd_r )
WRITE_LINE_MEMBER( abc99_device::reset_w )
{
- device_set_input_line(m_mousecpu, INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE);
+ m_mousecpu->set_input_line(INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mess/machine/advision.c b/src/mess/machine/advision.c
index 928afd84e0b..f6868755f81 100644
--- a/src/mess/machine/advision.c
+++ b/src/mess/machine/advision.c
@@ -40,11 +40,11 @@ void advision_state::machine_start()
void advision_state::machine_reset()
{
/* enable internal ROM */
- device_set_input_line(m_maincpu, MCS48_INPUT_EA, CLEAR_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_EA, CLEAR_LINE);
membank("bank1")->set_entry(0);
/* reset sound CPU */
- device_set_input_line(m_soundcpu, INPUT_LINE_RESET, ASSERT_LINE);
+ m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_rambank = 0x300;
m_frame_start = 0;
@@ -58,7 +58,7 @@ WRITE8_MEMBER( advision_state::bankswitch_w )
{
int ea = BIT(data, 2);
- device_set_input_line(m_maincpu, MCS48_INPUT_EA, ea ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_EA, ea ? ASSERT_LINE : CLEAR_LINE);
membank("bank1")->set_entry(ea);
@@ -79,7 +79,7 @@ READ8_MEMBER( advision_state::ext_ram_r )
if (m_video_bank == 0x06)
{
- device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
+ m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
}
return data;
diff --git a/src/mess/machine/amigacrt.c b/src/mess/machine/amigacrt.c
index 53beead947c..84de5897c9a 100644
--- a/src/mess/machine/amigacrt.c
+++ b/src/mess/machine/amigacrt.c
@@ -166,7 +166,7 @@ static void amiga_ar1_init( running_machine &machine )
amigacrt.ar1_spurious = 0;
/* Install IRQ ACK callback */
- device_set_irq_callback(machine.device("maincpu"), amiga_ar1_irqack);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(amiga_ar1_irqack);
}
/***************************************************************************
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index c8f49e76fc7..df2a7c12ba5 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -1446,7 +1446,7 @@ WRITE8_MEMBER(amstrad_state::amstrad_plus_asic_6000_w)
if ( m_asic.enabled )
{
vector = (data & 0xf8) + (m_plus_irq_cause);
- device_set_input_line_vector(m_maincpu, 0, vector);
+ m_maincpu->set_input_line_vector(0, vector);
logerror("ASIC: IM 2 vector write %02x, data = &%02x\n",vector,data);
}
m_asic.dma_clear = data & 0x01;
@@ -2888,9 +2888,9 @@ static void amstrad_common_init(running_machine &machine)
state->m_maincpu->reset();
if ( state->m_system_type == SYSTEM_CPC || state->m_system_type == SYSTEM_ALESTE )
- device_set_input_line_vector(state->m_maincpu, 0, 0xff);
+ state->m_maincpu->set_input_line_vector(0, 0xff);
else
- device_set_input_line_vector(state->m_maincpu, 0, 0x00);
+ state->m_maincpu->set_input_line_vector(0, 0x00);
/* The opcode timing in the Amstrad is different to the opcode
timing in the core for the Z80 CPU.
@@ -2911,7 +2911,7 @@ static void amstrad_common_init(running_machine &machine)
(const UINT8*)amstrad_cycle_table_ex);
/* Juergen is a cool dude! */
- device_set_irq_callback(state->m_maincpu, amstrad_cpu_acknowledge_int);
+ state->m_maincpu->set_irq_acknowledge_callback(amstrad_cpu_acknowledge_int);
}
static TIMER_CALLBACK( cb_set_resolution )
diff --git a/src/mess/machine/at.c b/src/mess/machine/at.c
index e5ef24e96e2..e59d02387b2 100644
--- a/src/mess/machine/at.c
+++ b/src/mess/machine/at.c
@@ -155,7 +155,7 @@ WRITE8_MEMBER( at_state::at_page8_w )
WRITE_LINE_MEMBER( at_state::pc_dma_hrq_changed )
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
m_dma8237_2->hack_w(state);
@@ -354,7 +354,7 @@ static IRQ_CALLBACK(at_irq_callback)
MACHINE_START( at )
{
- device_set_irq_callback(machine.device("maincpu"), at_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
}
MACHINE_RESET( at )
diff --git a/src/mess/machine/b2m.c b/src/mess/machine/b2m.c
index ec4bffe4cdc..f56de201486 100644
--- a/src/mess/machine/b2m.c
+++ b/src/mess/machine/b2m.c
@@ -372,6 +372,6 @@ MACHINE_RESET(b2m)
state->m_b2m_side = 0;
state->m_b2m_drive = 0;
- device_set_irq_callback(machine.device("maincpu"), b2m_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(b2m_irq_callback);
b2m_set_bank(machine, 7);
}
diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c
index 1581b7e48bb..a356cf700f6 100644
--- a/src/mess/machine/bbc.c
+++ b/src/mess/machine/bbc.c
@@ -1425,7 +1425,7 @@ static void bbc_i8271_interrupt(device_t *device, int state)
{
/* I'll pulse it because if I used hold-line I'm not sure
it would clear - to be checked */
- device_set_input_line(device->machine().device("maincpu"), INPUT_LINE_NMI,PULSE_LINE);
+ device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE);
}
}
diff --git a/src/mess/machine/bk.c b/src/mess/machine/bk.c
index 8bf33c9e731..d8c24e57677 100644
--- a/src/mess/machine/bk.c
+++ b/src/mess/machine/bk.c
@@ -74,14 +74,14 @@ MACHINE_START(bk0010)
static IRQ_CALLBACK(bk0010_irq_callback)
{
bk_state *state = device->machine().driver_data<bk_state>();
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
return state->m_key_irq_vector;
}
MACHINE_RESET( bk0010 )
{
bk_state *state = machine.driver_data<bk_state>();
- device_set_irq_callback(machine.device("maincpu"), bk0010_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(bk0010_irq_callback);
state->m_kbd_state = 0;
state->m_scrool = 01330;
diff --git a/src/mess/machine/c64_cpm.c b/src/mess/machine/c64_cpm.c
index 197d9f3e4ff..937f4ded1bd 100644
--- a/src/mess/machine/c64_cpm.c
+++ b/src/mess/machine/c64_cpm.c
@@ -89,8 +89,8 @@ inline void c64_cpm_cartridge_device::update_signals()
{
if (m_enabled)
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, CLEAR_LINE);
- device_set_input_line(machine().firstcpu, INPUT_LINE_HALT, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
+ machine().firstcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
if (m_reset)
{
@@ -101,8 +101,8 @@ inline void c64_cpm_cartridge_device::update_signals()
}
else
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, ASSERT_LINE);
- device_set_input_line(machine().firstcpu, INPUT_LINE_HALT, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ machine().firstcpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
/*
diff --git a/src/mess/machine/compis.c b/src/mess/machine/compis.c
index 0c781ba1453..efd590297a0 100644
--- a/src/mess/machine/compis.c
+++ b/src/mess/machine/compis.c
@@ -414,7 +414,7 @@ static IRQ_CALLBACK(int_callback)
logerror("(%f) **** Acknowledged interrupt vector %02X\n", device->machine().time().as_double(), state->m_i186.intr.poll_status & 0x1f);
/* clear the interrupt */
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
state->m_i186.intr.pending = 0;
/* clear the request and set the in-service bit */
@@ -1216,7 +1216,7 @@ WRITE16_MEMBER( compis_state::compis_i186_internal_port_w )
/* we need to do this at a time when the I86 context is swapped in */
/* this register is generally set once at startup and never again, so it's a good */
/* time to set it up */
- device_set_irq_callback(m_maincpu, int_callback);
+ m_maincpu->set_irq_acknowledge_callback(int_callback);
break;
case 0x60:
@@ -1367,7 +1367,7 @@ static IRQ_CALLBACK( compis_irq_callback )
DRIVER_INIT_MEMBER(compis_state,compis)
{
- device_set_irq_callback(machine().device("maincpu"), compis_irq_callback);
+ machine().device("maincpu")->execute().set_irq_acknowledge_callback(compis_irq_callback);
memset (&m_compis, 0, sizeof (m_compis) );
}
@@ -1390,7 +1390,7 @@ MACHINE_RESET( compis )
compis_keyb_init(state);
/* OSP PIC 8259 */
- device_set_irq_callback(state->m_maincpu, compis_irq_callback);
+ state->m_maincpu->set_irq_acknowledge_callback(compis_irq_callback);
}
/*-------------------------------------------------------------------------*/
diff --git a/src/mess/machine/cuda.c b/src/mess/machine/cuda.c
index de423c2eb00..1086a1b3a85 100644
--- a/src/mess/machine/cuda.c
+++ b/src/mess/machine/cuda.c
@@ -108,7 +108,7 @@ const rom_entry *cuda_device::device_rom_region() const
void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data)
{
-// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->safe_pc());
+// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->pc());
switch (offset)
{
@@ -138,21 +138,21 @@ void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data)
if (treq != ((data>>1)&1))
{
#ifdef CUDA_SUPER_VERBOSE
- printf("CU-> TREQ: %d (PC=%x)\n", (data>>1)&1, m_maincpu->safe_pc());
+ printf("CU-> TREQ: %d (PC=%x)\n", (data>>1)&1, m_maincpu->pc());
#endif
treq = (data>>1) & 1;
}
if (via_data != ((data>>5)&1))
{
#ifdef CUDA_SUPER_VERBOSE
- printf("CU-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->safe_pc());
+ printf("CU-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->pc());
#endif
via_data = (data>>5) & 1;
}
if (via_clock != ((data>>4)&1))
{
#ifdef CUDA_SUPER_VERBOSE
- printf("CU-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->safe_pc());
+ printf("CU-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->pc());
#endif
via_clock = (data>>4) & 1;
via6522_device *via1 = machine().device<via6522_device>("via6522_0");
@@ -165,7 +165,7 @@ void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data)
if ((data & 8) != reset_line)
{
#ifdef CUDA_SUPER_VERBOSE
- printf("680x0 reset: %d -> %d (PC=%x)\n", (ports[2] & 8)>>3, (data & 8)>>3, m_maincpu->safe_pc());
+ printf("680x0 reset: %d -> %d (PC=%x)\n", (ports[2] & 8)>>3, (data & 8)>>3, m_maincpu->pc());
#endif
reset_line = (data & 8);
// falling edge, should reset the machine too
@@ -193,7 +193,7 @@ READ8_MEMBER( cuda_device::ddr_r )
WRITE8_MEMBER( cuda_device::ddr_w )
{
-// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->safe_pc());
+// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->pc());
send_port(space, offset, ports[offset] & data);
@@ -251,7 +251,7 @@ READ8_MEMBER( cuda_device::ports_r )
incoming |= 0x01;
}
-// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->safe_pc());
+// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->pc());
return incoming;
}
@@ -279,7 +279,7 @@ WRITE8_MEMBER( cuda_device::pll_w )
(data & 0x40) ? 1 : 0,
(data & 0x20) ? 1 : 0,
(data & 0x10) ? 1 : 0,
- (data & 0x08) ? 1 : 0, m_maincpu->safe_pc());
+ (data & 0x08) ? 1 : 0, m_maincpu->pc());
}
#endif
pll_ctrl = data;
@@ -300,7 +300,7 @@ WRITE8_MEMBER( cuda_device::timer_ctrl_w )
{ attotime::from_seconds(8), attotime::from_msec(250.0f), attotime::from_msec(125.1f), attotime::from_msec(62.5f), attotime::from_msec(31.3f) },
};
-// printf("%02x to timer control (PC=%x)\n", data, m_maincpu->safe_pc());
+// printf("%02x to timer control (PC=%x)\n", data, m_maincpu->pc());
if (data & 0x50)
{
@@ -314,12 +314,12 @@ WRITE8_MEMBER( cuda_device::timer_ctrl_w )
if ((timer_ctrl & 0x80) && !(data & 0x80))
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, CLEAR_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_TIMER, CLEAR_LINE);
timer_ctrl &= ~0x80;
}
else if ((timer_ctrl & 0x40) && !(data & 0x40))
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, CLEAR_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_TIMER, CLEAR_LINE);
timer_ctrl &= ~0x40;
}
@@ -334,7 +334,7 @@ READ8_MEMBER( cuda_device::timer_counter_r )
WRITE8_MEMBER( cuda_device::timer_counter_w )
{
-// printf("%02x to timer counter (PC=%x)\n", data, m_maincpu->safe_pc());
+// printf("%02x to timer counter (PC=%x)\n", data, m_maincpu->pc());
timer_counter = data;
ripple_counter = timer_counter;
}
@@ -350,7 +350,7 @@ WRITE8_MEMBER( cuda_device::onesec_w )
if ((onesec & 0x40) && !(data & 0x40))
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, CLEAR_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_CPI, CLEAR_LINE);
}
onesec = data;
@@ -464,7 +464,7 @@ void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param,
if (onesec & 0x10)
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, ASSERT_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_CPI, ASSERT_LINE);
}
}
else
@@ -473,7 +473,7 @@ void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param,
if (timer_ctrl & 0x20)
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, ASSERT_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_TIMER, ASSERT_LINE);
}
ripple_counter--;
@@ -485,7 +485,7 @@ void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param,
if (timer_ctrl & 0x10)
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_TIMER, ASSERT_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_TIMER, ASSERT_LINE);
}
}
}
diff --git a/src/mess/machine/dec_lk201.c b/src/mess/machine/dec_lk201.c
index f4197e2d108..e8200508dd3 100644
--- a/src/mess/machine/dec_lk201.c
+++ b/src/mess/machine/dec_lk201.c
@@ -107,7 +107,7 @@ READ8_MEMBER( lk201_device::ddr_r )
WRITE8_MEMBER( lk201_device::ddr_w )
{
-// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->safe_pc());
+// printf("%02x to PORT %c DDR (PC=%x)\n", data, 'A' + offset, m_maincpu->pc());
send_port(space, offset, ports[offset] & data);
@@ -135,7 +135,7 @@ READ8_MEMBER( lk201_device::ports_r )
// add in ddr-masked version of port writes
incoming |= (ports[offset] & ddrs[offset]);
-// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->safe_pc());
+// printf("PORT %c read = %02x (DDR = %02x latch = %02x) (PC=%x)\n", 'A' + offset, ports[offset], ddrs[offset], ports[offset], m_maincpu->pc());
return incoming;
}
@@ -149,7 +149,7 @@ WRITE8_MEMBER( lk201_device::ports_w )
void lk201_device::send_port(address_space &space, UINT8 offset, UINT8 data)
{
-// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->safe_pc());
+// printf("PORT %c write %02x (DDR = %02x) (PC=%x)\n", 'A' + offset, data, ddrs[offset], m_maincpu->pc());
switch (offset)
{
@@ -187,7 +187,7 @@ READ8_MEMBER( lk201_device::sci_r )
break;
}
-// printf("SCI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->safe_pc());
+// printf("SCI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->pc());
return incoming;
}
@@ -212,7 +212,7 @@ WRITE8_MEMBER( lk201_device::sci_w )
break;
}
-// printf("SCI %02x to %x (PC=%x)\n", data, offset, m_maincpu->safe_pc());
+// printf("SCI %02x to %x (PC=%x)\n", data, offset, m_maincpu->pc());
}
READ8_MEMBER( lk201_device::spi_r )
@@ -232,7 +232,7 @@ READ8_MEMBER( lk201_device::spi_r )
break;
}
-// printf("SPI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->safe_pc());
+// printf("SPI read @ %x = %02x (PC=%x)\n", offset, incoming, m_maincpu->pc());
return incoming;
}
@@ -251,7 +251,7 @@ WRITE8_MEMBER( lk201_device::spi_w )
break;
}
-// printf("SPI %02x to %x (PC=%x)\n", data, offset, m_maincpu->safe_pc());
+// printf("SPI %02x to %x (PC=%x)\n", data, offset, m_maincpu->pc());
}
/*
diff --git a/src/mess/machine/dgn_beta.c b/src/mess/machine/dgn_beta.c
index bc45ce2767d..ca1878fd108 100644
--- a/src/mess/machine/dgn_beta.c
+++ b/src/mess/machine/dgn_beta.c
@@ -702,7 +702,7 @@ static WRITE8_DEVICE_HANDLER(d_pia1_pa_w)
/* CPU un-halted let it run ! */
if (HALT_DMA == CLEAR_LINE)
- device_yield(device->machine().device(MAINCPU_TAG));
+ device->machine().device(MAINCPU_TAG)->execute().yield();
state->m_d_pia1_pa_last = data & 0x80;
}
@@ -741,7 +741,7 @@ static WRITE8_DEVICE_HANDLER(d_pia1_pb_w)
/* CPU un-halted let it run ! */
if (HALT_CPU == CLEAR_LINE)
- device_yield(device->machine().device(DMACPU_TAG));
+ device->machine().device(DMACPU_TAG)->execute().yield();
}
}
@@ -789,7 +789,7 @@ static WRITE8_DEVICE_HANDLER(d_pia2_pa_w)
{
device->machine().device(DMACPU_TAG)->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
logerror("device_yield()\n");
- device_yield(device->machine().device(DMACPU_TAG)); /* Let DMA CPU run */
+ device->machine().device(DMACPU_TAG)->execute().yield(); /* Let DMA CPU run */
}
else
{
diff --git a/src/mess/machine/ecbbus.c b/src/mess/machine/ecbbus.c
index 8c147a32767..1b5781a41f0 100644
--- a/src/mess/machine/ecbbus.c
+++ b/src/mess/machine/ecbbus.c
@@ -144,7 +144,7 @@ ecbbus_device::ecbbus_device(const machine_config &mconfig, const char *tag, dev
void ecbbus_device::device_start()
{
- m_maincpu = machine().device(m_cputag);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
// resolve callbacks
m_out_int_func.resolve(m_out_int_cb, *this);
diff --git a/src/mess/machine/ecbbus.h b/src/mess/machine/ecbbus.h
index 8b9d53b20f3..96bc575823d 100644
--- a/src/mess/machine/ecbbus.h
+++ b/src/mess/machine/ecbbus.h
@@ -123,7 +123,7 @@ protected:
private:
// internal state
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
devcb_resolved_write_line m_out_int_func;
devcb_resolved_write_line m_out_nmi_func;
diff --git a/src/mess/machine/egret.c b/src/mess/machine/egret.c
index b7f8a5c396e..8d8afe65ec8 100644
--- a/src/mess/machine/egret.c
+++ b/src/mess/machine/egret.c
@@ -137,21 +137,21 @@ void egret_device::send_port(address_space &space, UINT8 offset, UINT8 data)
if (xcvr_session != ((data>>1)&1))
{
#ifdef EGRET_SUPER_VERBOSE
- printf("EG-> XCVR_SESSION: %d (PC=%x)\n", (data>>1)&1, m_maincpu->safe_pc());
+ printf("EG-> XCVR_SESSION: %d (PC=%x)\n", (data>>1)&1, m_maincpu->pc());
#endif
xcvr_session = (data>>1) & 1;
}
if (via_data != ((data>>5)&1))
{
#ifdef EGRET_SUPER_VERBOSE
- printf("EG-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->safe_pc());
+ printf("EG-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, m_maincpu->pc());
#endif
via_data = (data>>5) & 1;
}
if (via_clock != ((data>>4)&1))
{
#ifdef EGRET_SUPER_VERBOSE
- printf("EG-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->safe_pc());
+ printf("EG-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, m_maincpu->pc());
#endif
via_clock = (data>>4) & 1;
via6522_device *via1 = machine().device<via6522_device>("via6522_0");
@@ -312,7 +312,7 @@ WRITE8_MEMBER( egret_device::onesec_w )
if ((onesec & 0x40) && !(data & 0x40))
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, CLEAR_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_CPI, CLEAR_LINE);
}
onesec = data;
@@ -419,7 +419,7 @@ void egret_device::device_timer(emu_timer &timer, device_timer_id id, int param,
if (onesec & 0x10)
{
- device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, ASSERT_LINE);
+ m_maincpu->set_input_line(M68HC05EG_INT_CPI, ASSERT_LINE);
}
}
diff --git a/src/mess/machine/galaxy.c b/src/mess/machine/galaxy.c
index 4962afab2c2..8a3fedabf82 100644
--- a/src/mess/machine/galaxy.c
+++ b/src/mess/machine/galaxy.c
@@ -47,7 +47,7 @@ WRITE8_MEMBER(galaxy_state::galaxy_latch_w)
INTERRUPT_GEN( galaxy_interrupt )
{
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static IRQ_CALLBACK ( galaxy_irq_callback )
@@ -123,8 +123,8 @@ static void galaxy_setup_snapshot (running_machine &machine, const UINT8 * data,
break;
}
- device_set_input_line(cpu, INPUT_LINE_NMI, CLEAR_LINE);
- device_set_input_line(cpu, INPUT_LINE_IRQ0, CLEAR_LINE);
+ cpu->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
+ cpu->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
SNAPSHOT_LOAD( galaxy )
@@ -185,7 +185,7 @@ MACHINE_RESET( galaxy )
if (machine.root_device().ioport("ROM2")->read())
state->membank("bank10")->set_base(machine.root_device().memregion("maincpu")->base() + 0x1000);
- device_set_irq_callback(machine.device("maincpu"), galaxy_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(galaxy_irq_callback);
state->m_interrupts_enabled = TRUE;
}
@@ -200,7 +200,7 @@ MACHINE_RESET( galaxyp )
UINT8 *ROM = machine.root_device().memregion("maincpu")->base();
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
- device_set_irq_callback(machine.device("maincpu"), galaxy_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(galaxy_irq_callback);
ROM[0x0037] = 0x29;
ROM[0x03f9] = 0xcd;
diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c
index 9b77cbdb5b1..57b4f972244 100644
--- a/src/mess/machine/genpc.c
+++ b/src/mess/machine/genpc.c
@@ -60,7 +60,7 @@ WRITE8_DEVICE_HANDLER(pc_page_w)
WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma_hrq_changed )
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
m_dma8237->hack_w(state);
@@ -665,7 +665,7 @@ IRQ_CALLBACK(ibm5160_mb_device::pc_irq_callback)
void ibm5160_mb_device::device_reset()
{
- device_set_irq_callback(m_maincpu, pc_irq_callback);
+ m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
m_u73_q2 = 0;
m_out1 = 2; // initial state of pit output is undefined
diff --git a/src/mess/machine/hd63450.c b/src/mess/machine/hd63450.c
index 4a40204b11e..63f05419047 100644
--- a/src/mess/machine/hd63450.c
+++ b/src/mess/machine/hd63450.c
@@ -258,7 +258,7 @@ static void dma_transfer_start(device_t* device, int channel, int dir)
if((dmac->reg[channel].dcr & 0xc0) == 0x00) // Burst transfer
{
device_t *cpu = device->machine().device(dmac->intf->cpu_tag);
- device_set_input_line(cpu, INPUT_LINE_HALT, ASSERT_LINE);
+ cpu->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
dmac->timer[channel]->adjust(attotime::zero, channel, dmac->burst_clock[channel]);
}
else
@@ -440,7 +440,7 @@ void hd63450_single_transfer(device_t* device, int x)
if((dmac->reg[x].dcr & 0xc0) == 0x00)
{
device_t *cpu = device->machine().device(dmac->intf->cpu_tag);
- device_set_input_line(cpu, INPUT_LINE_HALT, CLEAR_LINE);
+ cpu->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
}
if(dmac->intf->dma_end)
diff --git a/src/mess/machine/i82371ab.c b/src/mess/machine/i82371ab.c
index 81e51538a5a..ac25c5ddf08 100644
--- a/src/mess/machine/i82371ab.c
+++ b/src/mess/machine/i82371ab.c
@@ -224,7 +224,7 @@ void i82371ab_device::device_start()
/* setup save states */
save_item(NAME(m_regs));
- device_set_irq_callback(machine().device(":maincpu"), at_irq_callback);
+ machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
}
//-------------------------------------------------
diff --git a/src/mess/machine/i82371sb.c b/src/mess/machine/i82371sb.c
index a020bb94896..ef5cee00877 100644
--- a/src/mess/machine/i82371sb.c
+++ b/src/mess/machine/i82371sb.c
@@ -154,7 +154,7 @@ void i82371sb_device::device_start()
/* setup save states */
save_item(NAME(m_regs));
- device_set_irq_callback(machine().device(":maincpu"), at_irq_callback);
+ machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
}
//-------------------------------------------------
diff --git a/src/mess/machine/intv.c b/src/mess/machine/intv.c
index 7c8ffec2cb6..68762fbe76c 100644
--- a/src/mess/machine/intv.c
+++ b/src/mess/machine/intv.c
@@ -618,11 +618,11 @@ DRIVER_INIT_MEMBER(intv_state,intv)
/* Set Reset and INTR/INTRM Vector */
MACHINE_RESET( intv )
{
- device_set_input_line_vector(machine.device("maincpu"), CP1610_RESET, 0x1000);
+ machine.device("maincpu")->execute().set_input_line_vector(CP1610_RESET, 0x1000);
/* These are actually the same vector, and INTR is unused */
- device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTRM, 0x1004);
- device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTR, 0x1004);
+ machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTRM, 0x1004);
+ machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTR, 0x1004);
/* Set initial PC */
machine.device("maincpu")->state().set_state_int(CP1610_R7, 0x1000);
@@ -638,11 +638,11 @@ MACHINE_RESET( intvecs )
state->membank("bank3")->set_base(machine.root_device().memregion("maincpu")->base() + (0xE000 << 1));
state->membank("bank4")->set_base(machine.root_device().memregion("maincpu")->base() + (0xF000 << 1));
- device_set_input_line_vector(machine.device("maincpu"), CP1610_RESET, 0x1000);
+ machine.device("maincpu")->execute().set_input_line_vector(CP1610_RESET, 0x1000);
/* These are actually the same vector, and INTR is unused */
- device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTRM, 0x1004);
- device_set_input_line_vector(machine.device("maincpu"), CP1610_INT_INTR, 0x1004);
+ machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTRM, 0x1004);
+ machine.device("maincpu")->execute().set_input_line_vector(CP1610_INT_INTR, 0x1004);
/* Set initial PC */
machine.device("maincpu")->state().set_state_int(CP1610_R7, 0x1000);
@@ -663,7 +663,7 @@ static TIMER_CALLBACK(intv_btb_fill)
intv_state *state = machine.driver_data<intv_state>();
UINT8 column;
UINT8 row = state->m_backtab_row;
- //device_adjust_icount(machine.device("maincpu"), -STIC_ROW_FETCH);
+ //machine.device("maincpu")->execute().adjust_icount(-STIC_ROW_FETCH);
for(column=0; column < STIC_BACKTAB_WIDTH; column++)
{
state->m_backtab_buffer[row][column] = state->m_ram16[column + row * STIC_BACKTAB_WIDTH];
@@ -680,7 +680,7 @@ INTERRUPT_GEN( intv_interrupt )
state->m_bus_copy_mode = 1;
state->m_backtab_row = 0;
UINT8 row;
- device_adjust_icount(device->machine().device("maincpu"), -(12*STIC_ROW_BUSRQ+STIC_FRAME_BUSRQ)); // Account for stic cycle stealing
+ device->machine().device("maincpu")->execute().adjust_icount(-(12*STIC_ROW_BUSRQ+STIC_FRAME_BUSRQ)); // Account for stic cycle stealing
device->machine().scheduler().timer_set(device->machine().device<cpu_device>("maincpu")
->cycles_to_attotime(STIC_VBLANK_END), FUNC(intv_interrupt_complete));
for (row=0; row < STIC_BACKTAB_HEIGHT; row++)
@@ -691,7 +691,7 @@ INTERRUPT_GEN( intv_interrupt )
if (state->m_row_delay == 0)
{
- device_adjust_icount(device->machine().device("maincpu"), -STIC_ROW_BUSRQ); // extra row fetch occurs if vertical delay == 0
+ device->machine().device("maincpu")->execute().adjust_icount(-STIC_ROW_BUSRQ); // extra row fetch occurs if vertical delay == 0
}
intv_stic_screenrefresh(device->machine());
diff --git a/src/mess/machine/isa.c b/src/mess/machine/isa.c
index edc4290a44d..1fa0f0a6efd 100644
--- a/src/mess/machine/isa.c
+++ b/src/mess/machine/isa.c
@@ -133,7 +133,7 @@ void isa8_device::device_config_complete()
memset(&m_out_drq2_cb, 0, sizeof(m_out_drq2_cb));
memset(&m_out_drq3_cb, 0, sizeof(m_out_drq3_cb));
}
- m_maincpu = mconfig().device(m_cputag);
+ m_maincpu = mconfig().device<cpu_device>(m_cputag);
}
//**************************************************************************
@@ -201,25 +201,25 @@ void isa8_device::device_reset()
void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_space_func rhandler, const char* rhandler_name, write8_space_func whandler, const char *whandler_name)
{
- int buswidth = m_maincpu->memory().space_config(spacenum)->m_databus_width;
+ int buswidth = m_maincpu->space_config(spacenum)->m_databus_width;
switch(buswidth)
{
case 8:
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0);
break;
case 16:
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff);
break;
case 32:
if ((start % 4) == 0) {
if ((end-start)==1) {
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff);
} else {
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff);
}
} else {
// we handle just misalligned by 2
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000);
}
break;
default:
@@ -231,25 +231,25 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t
void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler)
{
- int buswidth = m_maincpu->memory().space_config(spacenum)->m_databus_width;
+ int buswidth = m_maincpu->space_config(spacenum)->m_databus_width;
switch(buswidth)
{
case 8:
- m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0);
+ m_maincpu->space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0);
break;
case 16:
- m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff);
+ m_maincpu->space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff);
break;
case 32:
if ((start % 4) == 0) {
if ((end-start)==1) {
- m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff);
+ m_maincpu->space(spacenum)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff);
} else {
- m_maincpu->memory().space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
+ m_maincpu->space(spacenum)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
}
} else {
// we handle just misalligned by 2
- m_maincpu->memory().space(spacenum)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000);
+ m_maincpu->space(spacenum)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000);
}
break;
default:
@@ -261,25 +261,25 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t
void isa8_device::install_space(address_spacenum spacenum, device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_device_func rhandler, const char* rhandler_name, write8_device_func whandler, const char *whandler_name)
{
- int buswidth = m_maincpu->memory().space_config(spacenum)->m_databus_width;
+ int buswidth = m_maincpu->space_config(spacenum)->m_databus_width;
switch(buswidth)
{
case 8:
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0);
break;
case 16:
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff);
break;
case 32:
if ((start % 4) == 0) {
if ((end-start)==1) {
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff);
} else {
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff);
}
} else {
// we handle just misalligned by 2
- m_maincpu->memory().space(spacenum)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000);
+ m_maincpu->space(spacenum)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000);
}
break;
default:
@@ -327,14 +327,14 @@ void isa8_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t m
void isa8_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data)
{
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
space->install_readwrite_bank(start, end, mask, mirror, tag );
machine().root_device().membank(tag)->set_base(data);
}
void isa8_device::unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror)
{
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
space->unmap_readwrite(start, end, mask, mirror);
}
@@ -346,7 +346,7 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t ma
UINT8 *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000;
memcpy(dest,src, end - start + 1);
} else {
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
space->install_read_bank(start, end, mask, mirror, tag);
space->unmap_write(start, end, mask, mirror);
machine().root_device().membank(tag)->set_base(machine().root_device().memregion(dev->subtag(tempstring, region))->base());
@@ -355,14 +355,14 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t ma
void isa8_device::unmap_rom(offs_t start, offs_t end, offs_t mask, offs_t mirror)
{
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
space->unmap_read(start, end, mask, mirror);
}
bool isa8_device::is_option_rom_space_available(offs_t start, int size)
{
- m_maincpu = machine().device(m_cputag);
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
for(int i = 0; i < size; i += 4096) // 4KB granularity should be enough
if(space->get_read_ptr(start + i)) return false;
return true;
@@ -404,7 +404,7 @@ void isa8_device::nmi()
{
if (m_nmi_enabled)
{
- device_set_input_line( m_maincpu, INPUT_LINE_NMI, PULSE_LINE );
+ m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
}
}
//**************************************************************************
@@ -518,7 +518,7 @@ void isa16_device::device_config_complete()
memset(&m_out_drq6_cb, 0, sizeof(m_out_drq6_cb));
memset(&m_out_drq7_cb, 0, sizeof(m_out_drq7_cb));
}
- m_maincpu = mconfig().device(m_cputag);
+ m_maincpu = mconfig().device<cpu_device>(m_cputag);
}
//-------------------------------------------------
@@ -544,22 +544,22 @@ void isa16_device::device_start()
void isa16_device::install16_device(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_device_func rhandler, const char* rhandler_name, write16_device_func whandler, const char *whandler_name)
{
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 16:
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0);
break;
case 32:
if ((start % 4) == 0) {
if ((end-start)==1) {
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0x0000ffff);
} else {
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffffffff);
}
} else {
// we handle just misalligned by 2
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(*dev, start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name,0xffff0000);
}
break;
@@ -571,23 +571,23 @@ void isa16_device::install16_device(device_t *dev, offs_t start, offs_t end, off
void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_delegate rhandler, write16_delegate whandler)
{
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 16:
- m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0);
+ m_maincpu->space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0);
break;
case 32:
- m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
+ m_maincpu->space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
if ((start % 4) == 0) {
if ((end-start)==1) {
- m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff);
+ m_maincpu->space(AS_IO)->install_readwrite_handler(start, end+2, mask, mirror, rhandler, whandler, 0x0000ffff);
} else {
- m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
+ m_maincpu->space(AS_IO)->install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
}
} else {
// we handle just misalligned by 2
- m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000);
+ m_maincpu->space(AS_IO)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000);
}
break;
@@ -599,23 +599,23 @@ void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_
void isa16_device::install16_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_space_func rhandler, const char* rhandler_name, write16_space_func whandler, const char *whandler_name)
{
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 16:
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0);
break;
case 32:
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff);
if ((start % 4) == 0) {
if ((end-start)==1) {
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0x0000ffff);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end+2, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0x0000ffff);
} else {
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffffffff);
}
} else {
// we handle just misalligned by 2
- m_maincpu->memory().space(AS_IO)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffff0000);
+ m_maincpu->space(AS_IO)->install_legacy_readwrite_handler(start-2, end, mask, mirror, rhandler, rhandler_name, whandler, whandler_name, 0xffff0000);
}
break;
diff --git a/src/mess/machine/isa.h b/src/mess/machine/isa.h
index 5989c6d0e5f..3e0a8b755b8 100644
--- a/src/mess/machine/isa.h
+++ b/src/mess/machine/isa.h
@@ -190,7 +190,7 @@ protected:
virtual void device_config_complete();
// internal state
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
devcb_resolved_write_line m_out_irq2_func;
devcb_resolved_write_line m_out_irq3_func;
diff --git a/src/mess/machine/kb_keytro.c b/src/mess/machine/kb_keytro.c
index 52f18f6ac11..235552fdb78 100644
--- a/src/mess/machine/kb_keytro.c
+++ b/src/mess/machine/kb_keytro.c
@@ -468,13 +468,13 @@ const rom_entry *pc_kbd_keytronic_pc3270_device::device_rom_region() const
WRITE_LINE_MEMBER( pc_kbd_keytronic_pc3270_device::clock_write )
{
- device_set_input_line( m_cpu, MCS51_INT0_LINE, state );
+ m_cpu->set_input_line(MCS51_INT0_LINE, state );
}
WRITE_LINE_MEMBER( pc_kbd_keytronic_pc3270_device::data_write )
{
- device_set_input_line( m_cpu, MCS51_T0_LINE, state);
+ m_cpu->set_input_line(MCS51_T0_LINE, state);
}
diff --git a/src/mess/machine/kc_d004.c b/src/mess/machine/kc_d004.c
index b902867cd26..6842ae1d98a 100644
--- a/src/mess/machine/kc_d004.c
+++ b/src/mess/machine/kc_d004.c
@@ -245,7 +245,7 @@ void kc_d004_device::device_timer(emu_timer &timer, device_timer_id id, int para
switch(id)
{
case TIMER_RESET:
- device_set_input_line(m_cpu, INPUT_LINE_RESET, ASSERT_LINE);
+ m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
break;
case TIMER_TC_CLEAR:
upd765_tc_w(m_fdc, 0x00);
@@ -331,21 +331,21 @@ void kc_d004_device::io_write(offs_t offset, UINT8 data)
break;
case 0xf4:
if (data & 0x01)
- device_set_input_line(m_cpu, INPUT_LINE_RESET, CLEAR_LINE);
+ m_cpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
if (data & 0x02)
{
for (int i=0; i<0xfc00; i++)
m_cpu->space(AS_PROGRAM)->write_byte(i, 0);
- device_set_input_line(m_cpu, INPUT_LINE_RESET, ASSERT_LINE);
+ m_cpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
if (data & 0x04)
- device_set_input_line(m_cpu, INPUT_LINE_RESET, HOLD_LINE);
+ m_cpu->set_input_line(INPUT_LINE_RESET, HOLD_LINE);
if (data & 0x08)
- device_set_input_line(m_cpu, INPUT_LINE_NMI, HOLD_LINE);
+ m_cpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE);
//printf("D004 CPU state: %x\n", data & 0x0f);
break;
diff --git a/src/mess/machine/lisa.c b/src/mess/machine/lisa.c
index ab6b183ed3d..58bea46d73e 100644
--- a/src/mess/machine/lisa.c
+++ b/src/mess/machine/lisa.c
@@ -328,7 +328,7 @@ static void scan_keyboard(running_machine &machine)
if (keycode == state->m_NMIcode)
{ /* generate NMI interrupt */
machine.device("maincpu")->execute().set_input_line(M68K_IRQ_7, PULSE_LINE);
- device_set_input_line_vector(machine.device("maincpu"), M68K_IRQ_7, M68K_INT_ACK_AUTOVECTOR);
+ machine.device("maincpu")->execute().set_input_line_vector(M68K_IRQ_7, M68K_INT_ACK_AUTOVECTOR);
}
#endif
COPS_queue_data(machine, & keycode, 1);
diff --git a/src/mess/machine/mac.c b/src/mess/machine/mac.c
index 40d81f1a5a4..1e0a1154571 100644
--- a/src/mess/machine/mac.c
+++ b/src/mess/machine/mac.c
@@ -1568,7 +1568,7 @@ READ16_MEMBER ( mac_state::mac_via_r )
logerror("mac_via_r: offset=0x%02x\n", offset);
data = m_via1->read(space, offset);
- device_adjust_icount(m_maincpu, m_via_cycles);
+ m_maincpu->adjust_icount(m_via_cycles);
return (data & 0xff) | (data << 8);
}
@@ -1586,7 +1586,7 @@ WRITE16_MEMBER ( mac_state::mac_via_w )
if (ACCESSING_BITS_8_15)
m_via1->write(space, offset, (data >> 8) & 0xff);
- device_adjust_icount(m_maincpu, m_via_cycles);
+ m_maincpu->adjust_icount(m_via_cycles);
}
/* *************************************************************************
diff --git a/src/mess/machine/macpci.c b/src/mess/machine/macpci.c
index 625b1d7f9ad..aa360d09dca 100644
--- a/src/mess/machine/macpci.c
+++ b/src/mess/machine/macpci.c
@@ -101,7 +101,7 @@ READ16_MEMBER ( macpci_state::mac_via_r )
printf("mac_via_r: offset=0x%02x (PC=%x)\n", offset, m_maincpu->pc());
data = m_via1->read(space, offset);
- device_adjust_icount(m_maincpu, m_via_cycles);
+ m_maincpu->adjust_icount(m_via_cycles);
return data | (data<<8);
}
@@ -119,7 +119,7 @@ WRITE16_MEMBER ( macpci_state::mac_via_w )
if (ACCESSING_BITS_8_15)
m_via1->write(space, offset, (data >> 8) & 0xff);
- device_adjust_icount(m_maincpu, m_via_cycles);
+ m_maincpu->adjust_icount(m_via_cycles);
}
static READ8_DEVICE_HANDLER(mac_adb_via_in_cb2)
diff --git a/src/mess/machine/mbc55x.c b/src/mess/machine/mbc55x.c
index 465e86c063b..fe88d250094 100644
--- a/src/mess/machine/mbc55x.c
+++ b/src/mess/machine/mbc55x.c
@@ -388,7 +388,7 @@ MACHINE_RESET( mbc55x )
{
set_ram_size(machine);
keyboard_reset(machine);
- device_set_irq_callback(machine.device(MAINCPU_TAG), mbc55x_irq_callback);
+ machine.device(MAINCPU_TAG)->execute().set_irq_acknowledge_callback(mbc55x_irq_callback);
}
MACHINE_START( mbc55x )
diff --git a/src/mess/machine/mboard.c b/src/mess/machine/mboard.c
index 8200153b1d7..d17e36af32c 100644
--- a/src/mess/machine/mboard.c
+++ b/src/mess/machine/mboard.c
@@ -219,13 +219,13 @@ WRITE32_HANDLER( mboard_write_board_32 )
WRITE8_HANDLER( mboard_write_LED_8 )
{
write_LED(data);
- device_spin_until_time(&space->device(), attotime::from_usec(7));
+ space->device().execute().spin_until_time(attotime::from_usec(7));
}
WRITE16_HANDLER( mboard_write_LED_16 )
{
write_LED(data >> 8);
- device_spin_until_time(&space->device(), attotime::from_usec(9));
+ space->device().execute().spin_until_time(attotime::from_usec(9));
}
WRITE32_HANDLER( mboard_write_LED_32 )
@@ -235,7 +235,7 @@ WRITE32_HANDLER( mboard_write_LED_32 )
if (offset) write_LED(data);
else write_LED(data >> 24);
logerror("write LED 32 o: %08x d: %08x\n",offset,data);
-// device_spin_until_time(&space->device(), ATTOTIME_IN_USEC(20));
+// space->device().execute().spin_until_time(ATTOTIME_IN_USEC(20));
}
diff --git a/src/mess/machine/mc68328.c b/src/mess/machine/mc68328.c
index 4143c8ff6fd..f4671589aa2 100644
--- a/src/mess/machine/mc68328.c
+++ b/src/mess/machine/mc68328.c
@@ -42,31 +42,31 @@ static void mc68328_set_interrupt_line(device_t *device, UINT32 line, UINT32 act
if(mc68328->regs.isr & INT_M68K_LINE7)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_7, ASSERT_LINE, mc68328->regs.ivr | 0x07);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_7, ASSERT_LINE, mc68328->regs.ivr | 0x07);
}
else if(mc68328->regs.isr & INT_M68K_LINE6)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_6, ASSERT_LINE, mc68328->regs.ivr | 0x06);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_6, ASSERT_LINE, mc68328->regs.ivr | 0x06);
}
else if(mc68328->regs.isr & INT_M68K_LINE5)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_5, ASSERT_LINE, mc68328->regs.ivr | 0x05);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, mc68328->regs.ivr | 0x05);
}
else if(mc68328->regs.isr & INT_M68K_LINE4)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_4, ASSERT_LINE, mc68328->regs.ivr | 0x04);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, mc68328->regs.ivr | 0x04);
}
else if(mc68328->regs.isr & INT_M68K_LINE3)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_3, ASSERT_LINE, mc68328->regs.ivr | 0x03);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_3, ASSERT_LINE, mc68328->regs.ivr | 0x03);
}
else if(mc68328->regs.isr & INT_M68K_LINE2)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_2, ASSERT_LINE, mc68328->regs.ivr | 0x02);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, mc68328->regs.ivr | 0x02);
}
else if(mc68328->regs.isr & INT_M68K_LINE1)
{
- device_set_input_line_and_vector(cpu, M68K_IRQ_1, ASSERT_LINE, mc68328->regs.ivr | 0x01);
+ cpu->execute().set_input_line_and_vector(M68K_IRQ_1, ASSERT_LINE, mc68328->regs.ivr | 0x01);
}
}
}
@@ -76,31 +76,31 @@ static void mc68328_set_interrupt_line(device_t *device, UINT32 line, UINT32 act
if((line & INT_M68K_LINE7) && !(mc68328->regs.isr & INT_M68K_LINE7))
{
- device_set_input_line(cpu, M68K_IRQ_7, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_7, CLEAR_LINE);
}
if((line & INT_M68K_LINE6) && !(mc68328->regs.isr & INT_M68K_LINE6))
{
- device_set_input_line(cpu, M68K_IRQ_6, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_6, CLEAR_LINE);
}
if((line & INT_M68K_LINE5) && !(mc68328->regs.isr & INT_M68K_LINE5))
{
- device_set_input_line(cpu, M68K_IRQ_5, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_5, CLEAR_LINE);
}
if((line & INT_M68K_LINE4) && !(mc68328->regs.isr & INT_M68K_LINE4))
{
- device_set_input_line(cpu, M68K_IRQ_4, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_4, CLEAR_LINE);
}
if((line & INT_M68K_LINE3) && !(mc68328->regs.isr & INT_M68K_LINE3))
{
- device_set_input_line(cpu, M68K_IRQ_3, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_3, CLEAR_LINE);
}
if((line & INT_M68K_LINE2) && !(mc68328->regs.isr & INT_M68K_LINE2))
{
- device_set_input_line(cpu, M68K_IRQ_2, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_2, CLEAR_LINE);
}
if((line & INT_M68K_LINE1) && !(mc68328->regs.isr & INT_M68K_LINE1))
{
- device_set_input_line(cpu, M68K_IRQ_1, CLEAR_LINE);
+ cpu->execute().set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
}
}
diff --git a/src/mess/machine/mc80.c b/src/mess/machine/mc80.c
index 163f62de9de..1bdd2e99887 100644
--- a/src/mess/machine/mc80.c
+++ b/src/mess/machine/mc80.c
@@ -20,7 +20,7 @@ static IRQ_CALLBACK( mc8020_irq_callback )
MACHINE_RESET( mc8020 )
{
- device_set_irq_callback(machine.device("maincpu"), mc8020_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(mc8020_irq_callback);
}
WRITE_LINE_MEMBER( mc80_state::ctc_z0_w )
@@ -114,7 +114,7 @@ static IRQ_CALLBACK( mc8030_irq_callback )
MACHINE_RESET( mc8030 )
{
- device_set_irq_callback(machine.device("maincpu"), mc8030_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(mc8030_irq_callback);
}
READ8_MEMBER( mc80_state::zve_port_a_r )
diff --git a/src/mess/machine/mpc105.c b/src/mess/machine/mpc105.c
index c71a73d2864..f0b46acf50b 100644
--- a/src/mess/machine/mpc105.c
+++ b/src/mess/machine/mpc105.c
@@ -40,7 +40,7 @@ mpc105_device::mpc105_device(const machine_config &mconfig, const char *tag, dev
void mpc105_device::device_start()
{
- m_maincpu = machine().device(m_cputag);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
}
//-------------------------------------------------
@@ -94,7 +94,7 @@ void mpc105_device::update_memory()
if (m_bank_base > 0)
{
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
/* first clear everything out */
space->nop_read(0x00000000, 0x3FFFFFFF);
diff --git a/src/mess/machine/mpc105.h b/src/mess/machine/mpc105.h
index 5a1370ba1f2..42e809f2289 100644
--- a/src/mess/machine/mpc105.h
+++ b/src/mess/machine/mpc105.h
@@ -47,7 +47,7 @@ private:
UINT8 m_bank_enable;
UINT32 m_bank_registers[8];
- device_t* m_maincpu;
+ cpu_device* m_maincpu;
};
diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c
index ae0e60767d7..e0109c859f8 100644
--- a/src/mess/machine/msx.c
+++ b/src/mess/machine/msx.c
@@ -520,7 +520,7 @@ static const UINT8 cc_ex[0x100] = {
DRIVER_INIT_MEMBER(msx_state,msx)
{
- device_set_input_line_vector (machine().device("maincpu"), 0, 0xff);
+ machine().device("maincpu")->execute().set_input_line_vector(0, 0xff);
msx_memory_init (machine());
diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c
index b17cdacfd94..7633cc3f11d 100644
--- a/src/mess/machine/nes.c
+++ b/src/mess/machine/nes.c
@@ -222,7 +222,7 @@ MACHINE_RESET( nes )
static TIMER_CALLBACK( nes_irq_callback )
{
nes_state *state = machine.driver_data<nes_state>();
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_irq_timer->adjust(attotime::never);
}
@@ -296,7 +296,7 @@ MACHINE_START( nes )
init_nes_core(machine);
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(nes_machine_stop),&machine));
- state->m_maincpu = machine.device("maincpu");
+ state->m_maincpu = machine.device<cpu_device>("maincpu");
state->m_sound = machine.device("nessound");
state->m_cart = machine.device("cart");
@@ -1538,13 +1538,13 @@ static void fds_irq( device_t *device, int scanline, int vblank, int blanked )
nes_state *state = device->machine().driver_data<nes_state>();
if (state->m_IRQ_enable_latch)
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
if (state->m_IRQ_enable)
{
if (state->m_IRQ_count <= 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_enable = 0;
state->m_fds_status0 |= 0x01;
}
diff --git a/src/mess/machine/nes_ines.c b/src/mess/machine/nes_ines.c
index 3519b22882d..d7dfa7aa16d 100644
--- a/src/mess/machine/nes_ines.c
+++ b/src/mess/machine/nes_ines.c
@@ -38,7 +38,7 @@ static void ffe_irq( device_t *device, int scanline, int vblank, int blanked )
{
if ((0xffff - state->m_IRQ_count) < 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = 0xffff;
state->m_IRQ_enable = 0;
}
diff --git a/src/mess/machine/nes_pcb.c b/src/mess/machine/nes_pcb.c
index 44398635c90..1369d4f70e6 100644
--- a/src/mess/machine/nes_pcb.c
+++ b/src/mess/machine/nes_pcb.c
@@ -1292,7 +1292,7 @@ static void mmc3_irq( device_t *device, int scanline, int vblank, int blanked )
{
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos()));
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
state->m_IRQ_clear = 0;
@@ -1822,7 +1822,7 @@ static void mmc5_irq( device_t *device, int scanline, int vblank, int blanked )
if (scanline == state->m_IRQ_count)
{
if (state->m_IRQ_enable)
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_status = 0xff;
}
@@ -2461,7 +2461,7 @@ static void jxrom_irq( device_t *device, int scanline, int vblank, int blanked )
if (state->m_IRQ_count <= 114)
{
state->m_IRQ_count = 0xffff;
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
else
state->m_IRQ_count -= 114;
@@ -2834,7 +2834,7 @@ static void bandai_lz_irq( device_t *device, int scanline, int vblank, int blank
{
if (state->m_IRQ_count <= 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = (0xffff - 114 + state->m_IRQ_count); // wrap around the 16 bits counter
}
state->m_IRQ_count -= 114;
@@ -3092,7 +3092,7 @@ static void h3001_irq( device_t *device, int scanline, int vblank, int blanked )
if (state->m_IRQ_count <= 114)
{
state->m_IRQ_enable = 0;
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
}
@@ -3175,7 +3175,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked
{
if ((state->m_IRQ_count & 0x000f) < 114) // always true, but we only update the IRQ once per scanlines so we cannot be more precise :(
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = (state->m_IRQ_count & ~0x000f) | (0x0f - (114 & 0x0f) + (state->m_IRQ_count & 0x000f)); // sort of wrap around the counter
}
// decrements should not affect upper bits, so we don't do anything here (114 > 0x0f)
@@ -3184,7 +3184,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked
{
if ((state->m_IRQ_count & 0x00ff) < 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = (state->m_IRQ_count & ~0x00ff) | (0xff - 114 + (state->m_IRQ_count & 0x00ff)); // wrap around the 8 bits counter
}
else
@@ -3194,7 +3194,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked
{
if ((state->m_IRQ_count & 0x0fff) < 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = (state->m_IRQ_count & ~0x0fff) | (0xfff - 114 + (state->m_IRQ_count & 0x0fff)); // wrap around the 12 bits counter
}
else
@@ -3202,7 +3202,7 @@ static void ss88006_irq( device_t *device, int scanline, int vblank, int blanked
}
else if (state->m_IRQ_count < 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = (0xffff - 114 + state->m_IRQ_count); // wrap around the 16 bits counter
}
else
@@ -3586,7 +3586,7 @@ static void konami_irq( device_t *device, int scanline, int vblank, int blanked
{
state->m_IRQ_count = state->m_IRQ_count_latch;
state->m_IRQ_enable = state->m_IRQ_enable_latch;
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
@@ -3855,7 +3855,7 @@ static void namcot_irq( device_t *device, int scanline, int vblank, int blanked
{
if (state->m_IRQ_count >= (0x7fff - 114))
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_count = 0;
}
else
@@ -4028,7 +4028,7 @@ static void sunsoft3_irq( device_t *device, int scanline, int vblank, int blanke
{
state->m_IRQ_enable = 0;
state->m_IRQ_count = 0xffff;
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
else
state->m_IRQ_count -= 114;
@@ -5100,7 +5100,7 @@ static void futuremedia_irq( device_t *device, int scanline, int vblank, int bla
{
state->m_IRQ_count--;
if (!state->m_IRQ_count)
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
}
@@ -5481,7 +5481,7 @@ static void ks7032_irq( device_t *device, int scanline, int vblank, int blanked
{
state->m_IRQ_enable = 0;
state->m_IRQ_count = state->m_IRQ_count_latch;
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
else
state->m_IRQ_count += 114;
@@ -5594,7 +5594,7 @@ static void mmc_fds_irq( device_t *device, int scanline, int vblank, int blanked
{
if (state->m_IRQ_count <= 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_enable = 0;
state->m_IRQ_status |= 0x01;
}
@@ -7226,7 +7226,7 @@ static void tengen_800032_irq( device_t *device, int scanline, int vblank, int b
{
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos()));
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
}
@@ -7253,7 +7253,7 @@ static void tengen_800032_irq( device_t *device, int scanline, int vblank, int b
{
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos()));
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
}
@@ -8936,7 +8936,7 @@ static void sc127_irq( device_t *device, int scanline, int vblank, int blanked )
{
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos()));
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_enable = 0;
}
}
@@ -9075,7 +9075,7 @@ static void smb2jb_irq( device_t *device, int scanline, int vblank, int blanked
if (state->m_IRQ_count < 0x1000)
{
if ((0x1000 - state->m_IRQ_count) <= 114)
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
else
state->m_IRQ_count += 114;
}
@@ -9361,7 +9361,7 @@ static void btl_smb2a_irq( device_t *device, int scanline, int vblank, int blank
{
state->m_IRQ_count = (state->m_IRQ_count + 1) & 0xfff;
state->m_IRQ_enable = 0;
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
else
state->m_IRQ_count += 114;
@@ -9447,7 +9447,7 @@ static void btl_smb3_irq( device_t *device, int scanline, int vblank, int blanke
{
if ((0xffff - state->m_IRQ_count) < 114)
{
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
state->m_IRQ_enable = 0;
}
@@ -9526,7 +9526,7 @@ static void btl_dn_irq( device_t *device, int scanline, int vblank, int blanked
state->m_IRQ_count = 0;
LOG_MMC(("irq fired, scanline: %d (MAME %d, beam pos: %d)\n", scanline,
device->machine().primary_screen->vpos(), device->machine().primary_screen->hpos()));
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
}
@@ -11408,7 +11408,7 @@ static void shjy3_irq( device_t *device, int scanline, int vblank, int blanked )
{
state->m_IRQ_count = state->m_IRQ_count_latch;
state->m_IRQ_enable = state->m_IRQ_enable | ((state->m_IRQ_enable & 0x01) << 1);
- device_set_input_line(state->m_maincpu, M6502_IRQ_LINE, HOLD_LINE);
+ state->m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
}
else
state->m_IRQ_count++;
diff --git a/src/mess/machine/nubus.c b/src/mess/machine/nubus.c
index f7fc7aa08f9..031559570c6 100644
--- a/src/mess/machine/nubus.c
+++ b/src/mess/machine/nubus.c
@@ -116,7 +116,7 @@ nubus_device::nubus_device(const machine_config &mconfig, device_type type, cons
void nubus_device::device_start()
{
- m_maincpu = machine().device(m_cputag);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
// resolve callbacks
m_out_irq9_func.resolve(m_out_irq9_cb, *this);
m_out_irqa_func.resolve(m_out_irqa_cb, *this);
@@ -141,15 +141,15 @@ void nubus_device::add_nubus_card(device_nubus_card_interface *card)
void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, UINT32 mask)
{
- m_maincpu = machine().device(m_cputag);
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 32:
- m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask);
+ m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask);
break;
case 64:
- m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
+ m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
break;
default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@@ -159,15 +159,15 @@ void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhand
void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, UINT32 mask)
{
- m_maincpu = machine().device(m_cputag);
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 32:
- m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask);
+ m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask);
break;
case 64:
- m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
+ m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
break;
default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@@ -177,15 +177,15 @@ void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhan
void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, UINT32 mask)
{
- m_maincpu = machine().device(m_cputag);
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 32:
- m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask);
+ m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, mask);
break;
case 64:
- m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
+ m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(start, end, rhandler, whandler, ((UINT64)mask<<32)|mask);
break;
default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@@ -195,15 +195,15 @@ void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhan
void nubus_device::install_readonly_device(offs_t start, offs_t end, read32_delegate rhandler, UINT32 mask)
{
- m_maincpu = machine().device(m_cputag);
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 32:
- m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(start, end, rhandler, mask);
+ m_maincpu->space(AS_PROGRAM)->install_read_handler(start, end, rhandler, mask);
break;
case 64:
- m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(start, end, rhandler, ((UINT64)mask<<32)|mask);
+ m_maincpu->space(AS_PROGRAM)->install_read_handler(start, end, rhandler, ((UINT64)mask<<32)|mask);
break;
default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@@ -213,15 +213,15 @@ void nubus_device::install_readonly_device(offs_t start, offs_t end, read32_dele
void nubus_device::install_writeonly_device(offs_t start, offs_t end, write32_delegate whandler, UINT32 mask)
{
- m_maincpu = machine().device(m_cputag);
- int buswidth = m_maincpu->memory().space_config(AS_PROGRAM)->m_databus_width;
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ int buswidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 32:
- m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(start, end, whandler, mask);
+ m_maincpu->space(AS_PROGRAM)->install_write_handler(start, end, whandler, mask);
break;
case 64:
- m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(start, end, whandler, ((UINT64)mask<<32)|mask);
+ m_maincpu->space(AS_PROGRAM)->install_write_handler(start, end, whandler, ((UINT64)mask<<32)|mask);
break;
default:
fatalerror("NUBUS: Bus width %d not supported\n", buswidth);
@@ -232,8 +232,8 @@ void nubus_device::install_writeonly_device(offs_t start, offs_t end, write32_de
void nubus_device::install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data)
{
// printf("install_bank: %s @ %x->%x mask %x mirror %x\n", tag, start, end, mask, mirror);
- m_maincpu = machine().device(m_cputag);
- address_space *space = m_maincpu->memory().space(AS_PROGRAM);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
+ address_space *space = m_maincpu->space(AS_PROGRAM);
space->install_readwrite_bank(start, end, mask, mirror, tag );
machine().root_device().membank(tag)->set_base(data);
}
diff --git a/src/mess/machine/nubus.h b/src/mess/machine/nubus.h
index 532532d35ad..b44ea828ae7 100644
--- a/src/mess/machine/nubus.h
+++ b/src/mess/machine/nubus.h
@@ -113,7 +113,7 @@ protected:
virtual void device_config_complete();
// internal state
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
devcb_resolved_write_line m_out_irq9_func;
devcb_resolved_write_line m_out_irqa_func;
diff --git a/src/mess/machine/orion.c b/src/mess/machine/orion.c
index e860fc50f26..07640dfb44f 100644
--- a/src/mess/machine/orion.c
+++ b/src/mess/machine/orion.c
@@ -374,7 +374,7 @@ INTERRUPT_GEN( orionz80_interrupt )
orion_state *state = device->machine().driver_data<orion_state>();
if ((state->m_orionz80_dispatcher & 0x40)==0x40)
{
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
}
diff --git a/src/mess/machine/pc.c b/src/mess/machine/pc.c
index 66645020ddb..21ca9de4694 100644
--- a/src/mess/machine/pc.c
+++ b/src/mess/machine/pc.c
@@ -171,7 +171,7 @@ WRITE8_MEMBER(pc_state::pc_page_w)
static WRITE_LINE_DEVICE_HANDLER( pc_dma_hrq_changed )
{
pc_state *st = device->machine().driver_data<pc_state>();
- device_set_input_line(st->m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ st->m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( device, state );
@@ -291,7 +291,7 @@ static emu_timer *pc_int_delay_timer;
static TIMER_CALLBACK( pcjr_delayed_pic8259_irq )
{
- device_set_input_line(machine.firstcpu, 0, param ? ASSERT_LINE : CLEAR_LINE);
+ machine.firstcpu->set_input_line(0, param ? ASSERT_LINE : CLEAR_LINE);
}
static WRITE_LINE_DEVICE_HANDLER( pcjr_pic8259_set_int_line )
@@ -302,7 +302,7 @@ static WRITE_LINE_DEVICE_HANDLER( pcjr_pic8259_set_int_line )
}
else
{
- device_set_input_line(device->machine().firstcpu, 0, state ? ASSERT_LINE : CLEAR_LINE);
+ device->machine().firstcpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -645,7 +645,7 @@ static void pcjr_set_keyb_int(running_machine &machine, int state)
pcjr_keyb.latch = 1;
if ( nmi_enabled & 0x80 )
{
- device_set_input_line( st->m_pit8253->machine().firstcpu, INPUT_LINE_NMI, PULSE_LINE );
+ st->m_pit8253->machine().firstcpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
}
}
}
@@ -1447,8 +1447,8 @@ MACHINE_RESET( pc )
{
device_t *speaker = machine.device(SPEAKER_TAG);
pc_state *st = machine.driver_data<pc_state>();
- st->m_maincpu = machine.device("maincpu" );
- device_set_irq_callback(st->m_maincpu, pc_irq_callback);
+ st->m_maincpu = machine.device<cpu_device>("maincpu" );
+ st->m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
st->m_u73_q2 = 0;
st->m_out1 = 0;
@@ -1473,8 +1473,8 @@ MACHINE_RESET( pc )
MACHINE_START( mc1502 )
{
pc_state *st = machine.driver_data<pc_state>();
- st->m_maincpu = machine.device("maincpu" );
- device_set_irq_callback(st->m_maincpu, pc_irq_callback);
+ st->m_maincpu = machine.device<cpu_device>("maincpu" );
+ st->m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
st->m_pic8259 = machine.device("pic8259");
st->m_dma8237 = NULL;
@@ -1499,8 +1499,8 @@ MACHINE_START( pcjr )
pc_fdc_init( machine, &pcjr_fdc_interface_nc );
pcjr_keyb.keyb_signal_timer = machine.scheduler().timer_alloc(FUNC(pcjr_keyb_signal_callback));
pc_int_delay_timer = machine.scheduler().timer_alloc(FUNC(pcjr_delayed_pic8259_irq));
- st->m_maincpu = machine.device("maincpu" );
- device_set_irq_callback(st->m_maincpu, pc_irq_callback);
+ st->m_maincpu = machine.device<cpu_device>("maincpu" );
+ st->m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
st->m_pic8259 = machine.device("pic8259");
st->m_dma8237 = NULL;
diff --git a/src/mess/machine/pc1512kb.c b/src/mess/machine/pc1512kb.c
index 14dc29497aa..34c13958026 100644
--- a/src/mess/machine/pc1512kb.c
+++ b/src/mess/machine/pc1512kb.c
@@ -299,7 +299,7 @@ void pc1512_keyboard_device::device_start()
void pc1512_keyboard_device::device_reset()
{
- device_set_input_line(m_maincpu, MCS48_INPUT_EA, CLEAR_LINE);
+ m_maincpu->set_input_line(MCS48_INPUT_EA, CLEAR_LINE);
}
@@ -311,7 +311,7 @@ void pc1512_keyboard_device::device_timer(emu_timer &timer, device_timer_id id,
{
if (!m_clock_in)
{
- device_set_input_line(m_maincpu, INPUT_LINE_RESET, ASSERT_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
}
@@ -340,7 +340,7 @@ WRITE_LINE_MEMBER( pc1512_keyboard_device::clock_w )
}
else
{
- device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
}
}
diff --git a/src/mess/machine/pet.c b/src/mess/machine/pet.c
index fae44c4947b..0481d382a9f 100644
--- a/src/mess/machine/pet.c
+++ b/src/mess/machine/pet.c
@@ -198,7 +198,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia0_irq_w )
driver_state->m_pia0_irq = state;
int level = (driver_state->m_pia0_irq | driver_state->m_pia1_irq | driver_state->m_via_irq) ? ASSERT_LINE : CLEAR_LINE;
- device_set_input_line(device->machine().firstcpu, INPUT_LINE_IRQ0, level);
+ device->machine().firstcpu->set_input_line(INPUT_LINE_IRQ0, level);
}
const pia6821_interface pet_pia0 =
@@ -249,7 +249,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia1_irq_w )
driver_state->m_pia1_irq = state;
int level = (driver_state->m_pia0_irq | driver_state->m_pia1_irq | driver_state->m_via_irq) ? ASSERT_LINE : CLEAR_LINE;
- device_set_input_line(device->machine().firstcpu, INPUT_LINE_IRQ0, level);
+ device->machine().firstcpu->set_input_line(INPUT_LINE_IRQ0, level);
}
const pia6821_interface pet_pia1 =
@@ -382,7 +382,7 @@ static WRITE_LINE_DEVICE_HANDLER( via_irq_w )
driver_state->m_via_irq = state;
int level = (driver_state->m_pia0_irq | driver_state->m_pia1_irq | driver_state->m_via_irq) ? ASSERT_LINE : CLEAR_LINE;
- device_set_input_line(device->machine().firstcpu, INPUT_LINE_IRQ0, level);
+ device->machine().firstcpu->set_input_line(INPUT_LINE_IRQ0, level);
}
const via6522_interface pet_via =
@@ -770,14 +770,14 @@ INTERRUPT_GEN( pet_frame_interrupt )
{
if (state->ioport("CFG")->read() & 0x04)
{
- device_set_input_line(device, INPUT_LINE_HALT, 1);
- device_set_input_line(device, INPUT_LINE_HALT, 0);
+ device->execute().set_input_line(INPUT_LINE_HALT, 1);
+ device->execute().set_input_line(INPUT_LINE_HALT, 0);
state->m_font |= 2;
}
else
{
- device_set_input_line(device, INPUT_LINE_HALT, 0);
- device_set_input_line(device, INPUT_LINE_HALT, 1);
+ device->execute().set_input_line(INPUT_LINE_HALT, 0);
+ device->execute().set_input_line(INPUT_LINE_HALT, 1);
state->m_font &= ~2;
}
}
diff --git a/src/mess/machine/pk8020.c b/src/mess/machine/pk8020.c
index 729ca9dedc7..9895cde56e6 100644
--- a/src/mess/machine/pk8020.c
+++ b/src/mess/machine/pk8020.c
@@ -998,7 +998,7 @@ MACHINE_RESET( pk8020 )
{
pk8020_state *state = machine.driver_data<pk8020_state>();
pk8020_set_bank(machine,0);
- device_set_irq_callback(machine.device("maincpu"), pk8020_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(pk8020_irq_callback);
state->m_sound_gate = 0;
state->m_sound_level = 0;
diff --git a/src/mess/machine/poly88.c b/src/mess/machine/poly88.c
index 9c5f016facd..2ef0507fe88 100644
--- a/src/mess/machine/poly88.c
+++ b/src/mess/machine/poly88.c
@@ -16,7 +16,7 @@ static TIMER_CALLBACK(poly88_usart_timer_callback)
{
poly88_state *state = machine.driver_data<poly88_state>();
state->m_int_vector = 0xe7;
- device_set_input_line(machine.device("maincpu"), 0, HOLD_LINE);
+ machine.device("maincpu")->execute().set_input_line(0, HOLD_LINE);
}
WRITE8_MEMBER(poly88_state::poly88_baud_rate_w)
@@ -210,7 +210,7 @@ DRIVER_INIT_MEMBER(poly88_state,poly88)
MACHINE_RESET(poly88)
{
poly88_state *state = machine.driver_data<poly88_state>();
- device_set_irq_callback(machine.device("maincpu"), poly88_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(poly88_irq_callback);
state->m_intr = 0;
state->m_last_code = 0;
@@ -221,14 +221,14 @@ INTERRUPT_GEN( poly88_interrupt )
{
poly88_state *state = device->machine().driver_data<poly88_state>();
state->m_int_vector = 0xf7;
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
static WRITE_LINE_DEVICE_HANDLER( poly88_usart_rxready )
{
//poly88_state *drvstate = device->machine().driver_data<poly88_state>();
//drvstate->m_int_vector = 0xe7;
- //device_set_input_line(device, 0, HOLD_LINE);
+ //device->execute().set_input_line(0, HOLD_LINE);
}
const i8251_interface poly88_usart_interface=
diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c
index b0ebe0b6eee..ac580f02bf8 100644
--- a/src/mess/machine/primo.c
+++ b/src/mess/machine/primo.c
@@ -35,7 +35,7 @@ INTERRUPT_GEN( primo_vblank_interrupt )
{
primo_state *state = device->machine().driver_data<primo_state>();
if (state->m_nmi)
- device_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
+ device->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
/*******************************************************************************
diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c
index f17945deaf8..6ac07b26fab 100644
--- a/src/mess/machine/rmnimbus.c
+++ b/src/mess/machine/rmnimbus.c
@@ -203,7 +203,7 @@ static IRQ_CALLBACK(int_callback)
logerror("(%f) **** Acknowledged interrupt vector %02X\n", device->machine().time().as_double(), state->m_i186.intr.poll_status & 0x1f);
/* clear the interrupt */
- device_set_input_line(device, 0, CLEAR_LINE);
+ device->execute().set_input_line(0, CLEAR_LINE);
state->m_i186.intr.pending = 0;
oldreq=state->m_i186.intr.request;
@@ -1178,7 +1178,7 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
/* we need to do this at a time when the I86 context is swapped in */
/* this register is generally set once at startup and never again, so it's a good */
/* time to set it up */
- device_set_irq_callback(&space.device(), int_callback);
+ space.device().execute().set_irq_acknowledge_callback(int_callback);
break;
case 0x60:
diff --git a/src/mess/machine/s100.c b/src/mess/machine/s100.c
index 9c5f5cb8aa8..22286546e42 100644
--- a/src/mess/machine/s100.c
+++ b/src/mess/machine/s100.c
@@ -126,7 +126,7 @@ s100_device::s100_device(const machine_config &mconfig, const char *tag, device_
void s100_device::device_start()
{
- m_maincpu = machine().device(m_cputag);
+ m_maincpu = machine().device<cpu_device>(m_cputag);
// resolve callbacks
m_out_int_func.resolve(m_out_int_cb, *this);
diff --git a/src/mess/machine/s100.h b/src/mess/machine/s100.h
index d16d2fe3d9a..72daae09b34 100644
--- a/src/mess/machine/s100.h
+++ b/src/mess/machine/s100.h
@@ -206,7 +206,7 @@ protected:
private:
// internal state
- device_t *m_maincpu;
+ cpu_device *m_maincpu;
devcb_resolved_write_line m_out_int_func;
devcb_resolved_write_line m_out_nmi_func;
diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c
index f6567b45984..3f12124f5cf 100644
--- a/src/mess/machine/sms.c
+++ b/src/mess/machine/sms.c
@@ -2104,7 +2104,7 @@ WRITE8_MEMBER(sms_state::sms_store_control_w)
WRITE_LINE_DEVICE_HANDLER( sms_store_int_callback )
{
sms_state *driver_state = device->machine().driver_data<sms_state>();
- device_set_input_line(driver_state->m_store_control & 0x01 ? driver_state->m_control_cpu : driver_state->m_main_cpu, 0, state);
+ (driver_state->m_store_control & 0x01 ? driver_state->m_control_cpu : driver_state->m_main_cpu)->execute().set_input_line(0, state);
}
diff --git a/src/mess/machine/southbridge.c b/src/mess/machine/southbridge.c
index 9226e432087..0dc4950c43d 100644
--- a/src/mess/machine/southbridge.c
+++ b/src/mess/machine/southbridge.c
@@ -209,7 +209,7 @@ void southbridge_device::device_start()
m_at_offset1 = 0xff;
- //device_set_irq_callback(machine().device(":maincpu"), at_irq_callback);
+ //machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
}
//-------------------------------------------------
@@ -330,7 +330,7 @@ WRITE8_MEMBER( southbridge_device::at_page8_w )
WRITE_LINE_MEMBER( southbridge_device::pc_dma_hrq_changed )
{
- device_set_input_line(m_maincpu, INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
+ m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
/* Assert HLDA */
i8237_hlda_w( m_dma8237_2, state );
diff --git a/src/mess/machine/svi318.c b/src/mess/machine/svi318.c
index f3a33f378b5..6fc8f16aa4b 100644
--- a/src/mess/machine/svi318.c
+++ b/src/mess/machine/svi318.c
@@ -540,7 +540,7 @@ DRIVER_INIT_MEMBER(svi318_state,svi318)
m_svi.svi318 = 1;
}
- device_set_input_line_vector(machine().device("maincpu"), 0, 0xff);
+ machine().device("maincpu")->execute().set_input_line_vector(0, 0xff);
/* memory */
m_svi.empty_bank = auto_alloc_array(machine(), UINT8, 0x8000);
diff --git a/src/mess/machine/tf20.c b/src/mess/machine/tf20.c
index d0633a3c3a3..b198e350fb8 100644
--- a/src/mess/machine/tf20.c
+++ b/src/mess/machine/tf20.c
@@ -330,7 +330,7 @@ static DEVICE_START( tf20 )
device_t *cpu = device->subdevice("tf20");
address_space *prg = cpu->memory().space(AS_PROGRAM);
- device_set_irq_callback(cpu, tf20_irq_ack);
+ cpu->execute().set_irq_acknowledge_callback(tf20_irq_ack);
/* ram device */
tf20->ram = device->subdevice<ram_device>("ram");
diff --git a/src/mess/machine/ti85.c b/src/mess/machine/ti85.c
index e20dd77cef5..2c3200c43ca 100644
--- a/src/mess/machine/ti85.c
+++ b/src/mess/machine/ti85.c
@@ -22,7 +22,7 @@ static TIMER_CALLBACK(ti85_timer_callback)
{
if (state->m_ON_interrupt_mask && !state->m_ON_pressed)
{
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
state->m_ON_interrupt_status = 1;
if (!state->m_timer_interrupt_mask) state->m_timer_interrupt_mask = 1;
}
@@ -33,7 +33,7 @@ static TIMER_CALLBACK(ti85_timer_callback)
state->m_ON_pressed = 0;
if (state->m_timer_interrupt_mask)
{
- device_set_input_line(state->m_maincpu, 0, HOLD_LINE);
+ state->m_maincpu->set_input_line(0, HOLD_LINE);
state->m_timer_interrupt_status = 1;
}
}
@@ -604,9 +604,9 @@ static void ti8x_snapshot_setup_registers (running_machine &machine, UINT8 * dat
state->m_maincpu->set_state_int(Z80_R, (reg[0x44]&0x7f) | (reg[0x48]&0x80));
- device_set_input_line(state->m_maincpu, 0, 0);
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, 0);
- device_set_input_line(state->m_maincpu, INPUT_LINE_HALT, 0);
+ state->m_maincpu->set_input_line(0, 0);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, 0);
+ state->m_maincpu->set_input_line(INPUT_LINE_HALT, 0);
}
static void ti85_setup_snapshot (running_machine &machine, UINT8 * data)
diff --git a/src/mess/machine/ti99/spchsyn.c b/src/mess/machine/ti99/spchsyn.c
index 10e38352932..478d9cdbde5 100644
--- a/src/mess/machine/ti99/spchsyn.c
+++ b/src/mess/machine/ti99/spchsyn.c
@@ -108,7 +108,7 @@ READ8Z_MEMBER( ti_speech_synthesizer_device::readz )
{
if ((offset & m_select_mask)==m_select_value)
{
- device_adjust_icount(machine().device("maincpu"),-(18+3)); /* this is just a minimum, it can be more */
+ machine().device("maincpu")->execute().adjust_icount(-(18+3)); /* this is just a minimum, it can be more */
*value = m_vsp->read(space, offset, 0xff) & 0xff;
if (VERBOSE>4) LOG("spchsyn: read value = %02x\n", *value);
}
@@ -121,7 +121,7 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write )
{
if ((offset & m_select_mask)==(m_select_value | 0x0400))
{
- device_adjust_icount(machine().device("maincpu"),-(54+3)); /* this is just an approx. minimum, it can be much more */
+ machine().device("maincpu")->execute().adjust_icount(-(54+3)); /* this is just an approx. minimum, it can be much more */
/* RN: the stupid design of the tms5220 core means that ready is cleared */
/* when there are 15 bytes in FIFO. It should be 16. Of course, if */
@@ -133,7 +133,7 @@ WRITE8_MEMBER( ti_speech_synthesizer_device::write )
int cycles_to_ready = machine().device<cpu_device>("maincpu")->attotime_to_cycles(time_to_ready);
if (VERBOSE>8) LOG("spchsyn: time to ready: %f -> %d\n", time_to_ready.as_double(), (int) cycles_to_ready);
- device_adjust_icount(machine().device("maincpu"),-cycles_to_ready);
+ machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready);
machine().scheduler().timer_set(attotime::zero, FUNC_NULL);
}
if (VERBOSE>4) LOG("spchsyn: write value = %02x\n", data);
diff --git a/src/mess/machine/ti99/speech8.c b/src/mess/machine/ti99/speech8.c
index 0e725931b2e..6f10b12e5a2 100644
--- a/src/mess/machine/ti99/speech8.c
+++ b/src/mess/machine/ti99/speech8.c
@@ -72,7 +72,7 @@ READ8Z_MEMBER( ti998_spsyn_device::readz )
{
if ((offset & m_select_mask)==m_select_value)
{
- device_adjust_icount(machine().device("maincpu"),-(18+3)); /* this is just a minimum, it can be more */
+ machine().device("maincpu")->execute().adjust_icount(-(18+3)); /* this is just a minimum, it can be more */
*value = m_vsp->read(space, offset, 0xff) & 0xff;
if (VERBOSE>4) LOG("speech8: read value = %02x\n", *value);
}
@@ -85,7 +85,7 @@ WRITE8_MEMBER( ti998_spsyn_device::write )
{
if ((offset & m_select_mask)==(m_select_value | 0x0400))
{
- device_adjust_icount(machine().device("maincpu"),-(54+3)); /* this is just an approx. minimum, it can be much more */
+ machine().device("maincpu")->execute().adjust_icount(-(54+3)); /* this is just an approx. minimum, it can be much more */
/* RN: the stupid design of the tms5220 core means that ready is cleared */
/* when there are 15 bytes in FIFO. It should be 16. Of course, if */
@@ -97,7 +97,7 @@ WRITE8_MEMBER( ti998_spsyn_device::write )
int cycles_to_ready = machine().device<cpu_device>("maincpu")->attotime_to_cycles(time_to_ready);
if (VERBOSE>8) LOG("speech8: time to ready: %f -> %d\n", time_to_ready.as_double(), (int) cycles_to_ready);
- device_adjust_icount(machine().device("maincpu"),-cycles_to_ready);
+ machine().device("maincpu")->execute().adjust_icount(-cycles_to_ready);
machine().scheduler().timer_set(attotime::zero, FUNC_NULL);
}
if (VERBOSE>4) LOG("speech8: write value = %02x\n", data);
diff --git a/src/mess/machine/trs80.c b/src/mess/machine/trs80.c
index fe65af2549b..ce1fb505a2f 100644
--- a/src/mess/machine/trs80.c
+++ b/src/mess/machine/trs80.c
@@ -636,13 +636,13 @@ INTERRUPT_GEN( trs80_rtc_interrupt )
if (state->m_mask & IRQ_M4_RTC)
{
state->m_irq |= IRQ_M4_RTC;
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
}
else // Model 1
{
state->m_irq |= IRQ_M1_RTC;
- device_set_input_line(device, 0, HOLD_LINE);
+ device->execute().set_input_line(0, HOLD_LINE);
}
}
diff --git a/src/mess/machine/vector06.c b/src/mess/machine/vector06.c
index 32c18d598b8..3c2a4251ba8 100644
--- a/src/mess/machine/vector06.c
+++ b/src/mess/machine/vector06.c
@@ -127,7 +127,7 @@ INTERRUPT_GEN( vector06_interrupt )
vector06_state *state = device->machine().driver_data<vector06_state>();
state->m_vblank_state++;
if (state->m_vblank_state>1) state->m_vblank_state=0;
- device_set_input_line(device,0,state->m_vblank_state ? HOLD_LINE : CLEAR_LINE);
+ device->execute().set_input_line(0,state->m_vblank_state ? HOLD_LINE : CLEAR_LINE);
}
@@ -173,7 +173,7 @@ MACHINE_RESET( vector06 )
vector06_state *state = machine.driver_data<vector06_state>();
address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
- device_set_irq_callback(machine.device("maincpu"), vector06_irq_callback);
+ machine.device("maincpu")->execute().set_irq_acknowledge_callback(vector06_irq_callback);
space->install_read_bank (0x0000, 0x7fff, "bank1");
space->install_write_bank(0x0000, 0x7fff, "bank2");
space->install_read_bank (0x8000, 0xffff, "bank3");
diff --git a/src/mess/machine/x68k_neptunex.c b/src/mess/machine/x68k_neptunex.c
index d616dbb7029..58fb3868162 100644
--- a/src/mess/machine/x68k_neptunex.c
+++ b/src/mess/machine/x68k_neptunex.c
@@ -146,7 +146,7 @@ WRITE8_MEMBER(x68k_neptune_device::x68k_neptune_mem_write)
WRITE_LINE_MEMBER(x68k_neptune_device::x68k_neptune_irq_w)
{
- device_set_input_line_vector(machine().device("maincpu"),2, NEPTUNE_IRQ_VECTOR);
+ machine().device("maincpu")->execute().set_input_line_vector(2, NEPTUNE_IRQ_VECTOR);
m_slot->irq2_w(state);
logerror("Neptune: IRQ2 set to %i\n",state);
}
diff --git a/src/mess/machine/zx.c b/src/mess/machine/zx.c
index 3ced7842752..fb51fafd391 100644
--- a/src/mess/machine/zx.c
+++ b/src/mess/machine/zx.c
@@ -388,7 +388,7 @@ WRITE8_MEMBER( zx_state::zx81_io_w )
zx_ula_bkgnd(1);
if (m_ula_frame_vsync == 2)
{
- device_spin_until_time(&mem->device(),machine().primary_screen->time_until_pos(height - 1, 0));
+ mem->device().execute().spin_until_time(machine().primary_screen->time_until_pos(height - 1, 0));
m_ula_scanline_count = height - 1;
logerror ("S: %d B: %d\n", machine().primary_screen->vpos(), machine().primary_screen->hpos());
}
diff --git a/src/mess/video/a7800.c b/src/mess/video/a7800.c
index 2936f532eb1..6a780b79f9f 100644
--- a/src/mess/video/a7800.c
+++ b/src/mess/video/a7800.c
@@ -418,7 +418,7 @@ TIMER_DEVICE_CALLBACK( a7800_interrupt )
if( state->m_maria_dli )
{
state->m_maria_dli = 0;
- device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, PULSE_LINE);
+ state->m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
}
@@ -481,7 +481,7 @@ WRITE8_MEMBER(a7800_state::a7800_MARIA_w)
m_maria_palette[0][3] = data;
break;
case 0x04:
- device_spin_until_trigger(machine().device("maincpu"), TRIGGER_HSYNC);
+ machine().device("maincpu")->execute().spin_until_trigger(TRIGGER_HSYNC);
m_maria_wsync=1;
break;
diff --git a/src/mess/video/atarist.c b/src/mess/video/atarist.c
index 5e6212ee924..b06e206b1da 100644
--- a/src/mess/video/atarist.c
+++ b/src/mess/video/atarist.c
@@ -235,13 +235,13 @@ void st_state::glue_tick()
if ((y == m_shifter_vblank_start) && (x == 0))
{
- device_set_input_line(m_maincpu, M68K_IRQ_4, HOLD_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
m_shifter_ofs = m_shifter_base;
}
if (x == m_shifter_hblank_start)
{
- device_set_input_line(m_maincpu, M68K_IRQ_2, HOLD_LINE);
+ m_maincpu->set_input_line(M68K_IRQ_2, HOLD_LINE);
// m_shifter_ofs += (m_shifter_lineofs * 2); // STe
}
diff --git a/src/mess/video/mac.c b/src/mess/video/mac.c
index 56c0ec16bcb..e8a524511d1 100644
--- a/src/mess/video/mac.c
+++ b/src/mess/video/mac.c
@@ -714,7 +714,7 @@ VIDEO_RESET(macdafb)
READ32_MEMBER(mac_state::dafb_r)
{
-// if (offset != 0x108/4) printf("DAFB: Read @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->safe_pc());
+// if (offset != 0x108/4) printf("DAFB: Read @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->pc());
switch (offset<<2)
{
@@ -745,7 +745,7 @@ READ32_MEMBER(mac_state::dafb_r)
WRITE32_MEMBER(mac_state::dafb_w)
{
-// if (offset != 0x10c/4) printf("DAFB: Write %08x @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->safe_pc());
+// if (offset != 0x10c/4) printf("DAFB: Write %08x @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->pc());
switch (offset<<2)
{
@@ -809,14 +809,14 @@ WRITE32_MEMBER(mac_state::dafb_w)
READ32_MEMBER(mac_state::dafb_dac_r)
{
-// printf("DAFB: Read DAC @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->safe_pc());
+// printf("DAFB: Read DAC @ %x (mask %x PC=%x)\n", offset*4, mem_mask, m_maincpu->pc());
return 0;
}
WRITE32_MEMBER(mac_state::dafb_dac_w)
{
-// if ((offset > 0) && (offset != 0x10/4)) printf("DAFB: Write %08x to DAC @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->safe_pc());
+// if ((offset > 0) && (offset != 0x10/4)) printf("DAFB: Write %08x to DAC @ %x (mask %x PC=%x)\n", data, offset*4, mem_mask, m_maincpu->pc());
switch (offset<<2)
{
@@ -1018,7 +1018,7 @@ READ32_MEMBER(mac_state::macwd_r)
break;
default:
-// printf("macwd_r: @ %x, mask %08x (PC=%x)\n", offset, mem_mask, m_maincpu->safe_pc());
+// printf("macwd_r: @ %x, mask %08x (PC=%x)\n", offset, mem_mask, m_maincpu->pc());
break;
}
return 0;
@@ -1052,7 +1052,7 @@ WRITE32_MEMBER(mac_state::macwd_w)
break;
default:
-// printf("macwd_w: %x @ %x, mask %08x (PC=%x)\n", data, offset, mem_mask, m_maincpu->safe_pc());
+// printf("macwd_w: %x @ %x, mask %08x (PC=%x)\n", data, offset, mem_mask, m_maincpu->pc());
break;
}
}
diff --git a/src/mess/video/mos6566.c b/src/mess/video/mos6566.c
index 5cff9dc3b4f..2eeadd3bcf1 100644
--- a/src/mess/video/mos6566.c
+++ b/src/mess/video/mos6566.c
@@ -330,7 +330,7 @@ inline void mos6566_device::vic2_suspend_cpu()
m_first_ba_cycle = m_cycles_counter;
if (m_in_rdy_workaround_func(0) != 7 )
{
-// device_suspend(machine.firstcpu, SUSPEND_REASON_SPIN, 0);
+// machine.firstcpu->suspend(SUSPEND_REASON_SPIN, 0);
}
m_device_suspended = 1;
}
@@ -341,7 +341,7 @@ inline void mos6566_device::vic2_resume_cpu()
{
if (m_device_suspended == 1)
{
- // device_resume(machine.firstcpu, SUSPEND_REASON_SPIN);
+ // machine.firstcpu->resume(SUSPEND_REASON_SPIN);
m_device_suspended = 0;
}
}
@@ -2025,7 +2025,7 @@ void mos6569_device::execute_run()
if ((cpu_cycles == vic_cycles) && (m_rdy_cycles > 0))
{
- device_spin_until_time (m_cpu, m_cpu->cycles_to_attotime(m_rdy_cycles));
+ m_cpu->spin_until_time(m_cpu->cycles_to_attotime(m_rdy_cycles));
m_rdy_cycles = 0;
}
diff --git a/src/mess/video/v1050.c b/src/mess/video/v1050.c
index 21be3cf250b..b1b8f9d1208 100644
--- a/src/mess/video/v1050.c
+++ b/src/mess/video/v1050.c
@@ -89,7 +89,7 @@ static MC6845_UPDATE_ROW( v1050_update_row )
WRITE_LINE_MEMBER( v1050_state::crtc_vs_w )
{
- device_set_input_line(m_subcpu, INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
+ m_subcpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
set_interrupt(INT_VSYNC, state);
}
diff --git a/src/mess/video/vic6567.c b/src/mess/video/vic6567.c
index fde3a985888..3c4b5d7c82d 100644
--- a/src/mess/video/vic6567.c
+++ b/src/mess/video/vic6567.c
@@ -377,7 +377,7 @@ INLINE void vic2_suspend_cpu( running_machine &machine, vic2_state *vic2 )
vic2->first_ba_cycle = vic2->cycles_counter;
if (vic2->in_rdy_workaround_func(0) != 7 )
{
-// device_suspend(machine.firstcpu, SUSPEND_REASON_SPIN, 0);
+// machine.firstcpu->suspend(SUSPEND_REASON_SPIN, 0);
}
vic2->device_suspended = 1;
}
@@ -388,7 +388,7 @@ INLINE void vic2_resume_cpu( running_machine &machine, vic2_state *vic2 )
{
if (vic2->device_suspended == 1)
{
- // device_resume(machine.firstcpu, SUSPEND_REASON_SPIN);
+ // machine.firstcpu->resume(SUSPEND_REASON_SPIN);
vic2->device_suspended = 0;
}
}
@@ -1607,7 +1607,7 @@ if (machine.input().code_pressed_once(KEYCODE_Z)) printf("b:%02x 1:%02x 2:%02x 3
if ((cpu_cycles == vic_cycles) && (vic2->rdy_cycles > 0))
{
- device_spin_until_time (machine.firstcpu, vic2->cpu->cycles_to_attotime(vic2->rdy_cycles));
+ machine.firstcpu->spin_until_time(vic2->cpu->cycles_to_attotime(vic2->rdy_cycles));
vic2->rdy_cycles = 0;
}
diff --git a/src/mess/video/zx8301.c b/src/mess/video/zx8301.c
index 0223080b802..c828c0cd12c 100644
--- a/src/mess/video/zx8301.c
+++ b/src/mess/video/zx8301.c
@@ -226,7 +226,7 @@ READ8_MEMBER( zx8301_device::data_r )
if (m_vda)
{
- device_spin_until_time(m_cpu, m_screen->time_until_pos(256, 0));
+ m_cpu->spin_until_time(m_screen->time_until_pos(256, 0));
}
return readbyte(offset);
@@ -243,7 +243,7 @@ WRITE8_MEMBER( zx8301_device::data_w )
if (m_vda)
{
- device_spin_until_time(m_cpu, m_screen->time_until_pos(256, 0));
+ m_cpu->spin_until_time(m_screen->time_until_pos(256, 0));
}
writebyte(offset, data);