summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cischeat.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-03-27 01:19:26 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-03-27 01:19:26 +0000
commit4b3aa02618def3caec417d71713ab6deb3c965d0 (patch)
tree547277cbe133e3dfec570f7ad6bfee5cc0f64153 /src/mame/drivers/cischeat.c
parentd89c4e7b8b522148ceb2d9a655211d74bac8eb84 (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/mame/drivers/cischeat.c')
-rw-r--r--src/mame/drivers/cischeat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mame/drivers/cischeat.c b/src/mame/drivers/cischeat.c
index 8bc9c265d1d..1d191a328a2 100644
--- a/src/mame/drivers/cischeat.c
+++ b/src/mame/drivers/cischeat.c
@@ -1588,11 +1588,11 @@ GFXDECODE_END
static INTERRUPT_GEN( cischeat_interrupt )
{
if (cpu_getiloops(device)==0)
- cpu_set_input_line(device, 4, HOLD_LINE); /* Once */
+ device_set_input_line(device, 4, HOLD_LINE); /* Once */
else
{
- if (cpu_getiloops(device)%2) cpu_set_input_line(device, 2, HOLD_LINE);
- else cpu_set_input_line(device, 1, HOLD_LINE);
+ if (cpu_getiloops(device)%2) device_set_input_line(device, 2, HOLD_LINE);
+ else device_set_input_line(device, 1, HOLD_LINE);
}
}
@@ -1744,8 +1744,8 @@ static INTERRUPT_GEN( interrupt_scudhamm )
{
switch ( cpu_getiloops(device) )
{
- case 0: cpu_set_input_line(device, 3, HOLD_LINE); break; // update palette, layers etc. Not the sprites.
- case 14: cpu_set_input_line(device, 2, HOLD_LINE); break; // "real" vblank. It just sets a flag that
+ case 0: device_set_input_line(device, 3, HOLD_LINE); break; // update palette, layers etc. Not the sprites.
+ case 14: device_set_input_line(device, 2, HOLD_LINE); break; // "real" vblank. It just sets a flag that
// the main loop polls before updating the sprites.
default: break;
}
@@ -1796,8 +1796,8 @@ static INTERRUPT_GEN( interrupt_armchmp2)
{
switch ( cpu_getiloops(device) )
{
- case 0: cpu_set_input_line(device, 4, HOLD_LINE); break;
- case 14: cpu_set_input_line(device, 2, HOLD_LINE); break;
+ case 0: device_set_input_line(device, 4, HOLD_LINE); break;
+ case 14: device_set_input_line(device, 2, HOLD_LINE); break;
default: break;
}
@@ -2554,7 +2554,7 @@ ROM_END
static DRIVER_INIT( wildplt )
{
- memory_install_read16_handler(cputag_get_address_space(machine, "cpu1", ADDRESS_SPACE_PROGRAM), 0x080000, 0x087fff, 0, 0, wildplt_vregs_r );
+ memory_install_read16_handler(machine->device("cpu1")->memory().space(ADDRESS_SPACE_PROGRAM), 0x080000, 0x087fff, 0, 0, wildplt_vregs_r );
DRIVER_INIT_CALL(f1gpstar);
}