diff options
Diffstat (limited to 'src/mame/machine/xevious.c')
-rw-r--r-- | src/mame/machine/xevious.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mame/machine/xevious.c b/src/mame/machine/xevious.c index 4f91a43ec69..e691c4d228b 100644 --- a/src/mame/machine/xevious.c +++ b/src/mame/machine/xevious.c @@ -25,7 +25,7 @@ static char battles_customio_data; static char battles_sound_played; -void battles_customio_init(running_machine *machine) +void battles_customio_init(running_machine &machine) { battles_customio_command = 0; battles_customio_prev_command = 0; @@ -44,18 +44,18 @@ TIMER_DEVICE_CALLBACK( battles_nmi_generate ) { if( battles_customio_command_count == 0 ) { - cputag_set_input_line(timer.machine, "sub3", INPUT_LINE_NMI, PULSE_LINE); + cputag_set_input_line(timer.machine(), "sub3", INPUT_LINE_NMI, PULSE_LINE); } else { - cputag_set_input_line(timer.machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); - cputag_set_input_line(timer.machine, "sub3", INPUT_LINE_NMI, PULSE_LINE); + cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE); + cputag_set_input_line(timer.machine(), "sub3", INPUT_LINE_NMI, PULSE_LINE); } } else { - cputag_set_input_line(timer.machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); - cputag_set_input_line(timer.machine, "sub3", INPUT_LINE_NMI, PULSE_LINE); + cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE); + cputag_set_input_line(timer.machine(), "sub3", INPUT_LINE_NMI, PULSE_LINE); } battles_customio_command_count++; } @@ -89,7 +89,7 @@ READ8_HANDLER( battles_customio3_r ) WRITE8_HANDLER( battles_customio0_w ) { - timer_device *timer = space->machine->device<timer_device>("battles_nmi"); + timer_device *timer = space->machine().device<timer_device>("battles_nmi"); logerror("CPU0 %04x: custom I/O Write = %02x\n",cpu_get_pc(space->cpu),data); @@ -144,12 +144,12 @@ WRITE8_HANDLER( battles_customio_data3_w ) WRITE8_HANDLER( battles_CPU4_coin_w ) { - set_led_status(space->machine, 0,data & 0x02); // Start 1 - set_led_status(space->machine, 1,data & 0x01); // Start 2 + set_led_status(space->machine(), 0,data & 0x02); // Start 1 + set_led_status(space->machine(), 1,data & 0x01); // Start 2 - coin_counter_w(space->machine, 0,data & 0x20); - coin_counter_w(space->machine, 1,data & 0x10); - coin_lockout_global_w(space->machine, ~data & 0x04); + coin_counter_w(space->machine(), 0,data & 0x20); + coin_counter_w(space->machine(), 1,data & 0x10); + coin_lockout_global_w(space->machine(), ~data & 0x04); } @@ -157,7 +157,7 @@ WRITE8_HANDLER( battles_noise_sound_w ) { logerror("CPU3 %04x: 50%02x Write = %02x\n",cpu_get_pc(space->cpu),offset,data); if( (battles_sound_played == 0) && (data == 0xFF) ){ - samples_device *samples = space->machine->device<samples_device>("samples"); + samples_device *samples = space->machine().device<samples_device>("samples"); if( customio[0] == 0x40 ){ sample_start (samples, 0, 0, 0); } @@ -174,10 +174,10 @@ READ8_HANDLER( battles_input_port_r ) switch ( offset ) { default: - case 0: return ~BITSWAP8(input_port_read(space->machine, "IN0H"),7,6,5,4,2,3,1,0); - case 1: return ~input_port_read(space->machine, "IN1L"); - case 2: return ~input_port_read(space->machine, "IN1H"); - case 3: return ~input_port_read(space->machine, "IN0L"); + case 0: return ~BITSWAP8(input_port_read(space->machine(), "IN0H"),7,6,5,4,2,3,1,0); + case 1: return ~input_port_read(space->machine(), "IN1L"); + case 2: return ~input_port_read(space->machine(), "IN1H"); + case 3: return ~input_port_read(space->machine(), "IN0L"); } } |