diff options
author | 2011-03-27 01:19:26 +0000 | |
---|---|---|
committer | 2011-03-27 01:19:26 +0000 | |
commit | 4b3aa02618def3caec417d71713ab6deb3c965d0 (patch) | |
tree | 547277cbe133e3dfec570f7ad6bfee5cc0f64153 /src/emu/machine/tmp68301.c | |
parent | d89c4e7b8b522148ceb2d9a655211d74bac8eb84 (diff) |
Added device_t::memory() to fetch a reference to the memory interface,
or assert if not present.
Split address_space::install_[legacy_]handler into
install_[legacy_]read_handler, install_[legacy_]write_handler,
and install_[legacy_]readwrite_handler.
Added variants of address_space handler installers which don't take
mirror or mask parameters, since this is by far the most common case.
Deprecated API cleanup. Simple search & replace:
cpu_suspend ==> device_suspend
cpu_resume ==> device_resume
cpu_yield ==> device_yield
cpu_spin ==> device_spin
cpu_spinuntil_trigger ==> device_spin_until_trigger
cpu_spinuntil_time ==> device_spin_until_time
cpu_spinuntil_int ==> device_spin_until_interrupt
cpu_eat_cycles ==> device_eat_cycles
cpu_adjust_icount ==> device_adjust_icount
cpu_triggerint ==> device_triggerint
cpu_set_input_line ==> device_set_input_line
cpu_set_input_line_vector ==> device_set_input_line_vector
cpu_set_input_line_and_vector ==> device_set_input_line_and_vector
cpu_set_irq_callback ==> device_set_irq_callback
More complex changes:
device_memory(device) ==> device->memory()
device_get_space(device, spacenum) ==> device->memory().space(spacenum)
cpu_get_address_space(cpu, spacenum) ==> cpu->memory().space(spacenum)
cputag_get_address_space(mach, tag, spacenum) ==> mach->device("tag")->memory().space(spacenum)
cputag_get_clock(mach, tag) ==> mach->device("tag")->unscaled_clock()
cputag_set_clock(mach, tag, hz) ==> mach->device("tag")->set_unscaled_clock(hz)
Some regex'es for the more prevalent cases above:
S: cpu_get_address_space( *)\(( *)([^,]+)( *), *
R: \3->memory().space\1\(\2
S: cputag_get_address_space( *)\(( *)([^,]+)( *),( *)([^,]+)( *), *
R: \3->device\1\(\2\6\7\)->memory().space\1\(\2
S: cputag_get_clock( *)\(( *)([^,]+)( *),( *)([^ )]+) *\)
R: \3->device\1\(\2\6\7\)->unscaled_clock\(\)
Diffstat (limited to 'src/emu/machine/tmp68301.c')
-rw-r--r-- | src/emu/machine/tmp68301.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c index cd55c153cb2..2767b2277d5 100644 --- a/src/emu/machine/tmp68301.c +++ b/src/emu/machine/tmp68301.c @@ -47,7 +47,7 @@ static TIMER_CALLBACK( tmp68301_timer_callback ) tmp68301_irq_vector[level] = IVNR & 0x00e0; tmp68301_irq_vector[level] += 4+i; - cpu_set_input_line(machine->firstcpu,level,HOLD_LINE); + device_set_input_line(machine->firstcpu,level,HOLD_LINE); } if (TCR & 0x0080) // N/1 @@ -120,7 +120,7 @@ MACHINE_RESET( tmp68301 ) for (i = 0; i < 3; i++) tmp68301_IE[i] = 0; - cpu_set_irq_callback(machine->firstcpu, tmp68301_irq_callback); + device_set_irq_callback(machine->firstcpu, tmp68301_irq_callback); } /* Update the IRQ state based on all possible causes */ @@ -150,7 +150,7 @@ static void update_irq_state(running_machine *machine) tmp68301_IE[i] = 0; // Interrupts are edge triggerred - cpu_set_input_line(machine->firstcpu,level,HOLD_LINE); + device_set_input_line(machine->firstcpu,level,HOLD_LINE); } } } |