diff --git a/src/mame/audio/mw8080bw.c b/src/mame/audio/mw8080bw.c index 46054e2473e..7ce4a766b1e 100644 --- a/src/mame/audio/mw8080bw.c +++ b/src/mame/audio/mw8080bw.c @@ -567,20 +567,22 @@ MACHINE_DRIVER_END void maze_write_discrete(running_machine *machine, UINT8 maze_tone_timing_state) { + const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); + /* controls need to be active low */ int controls = ~input_port_read(machine, "IN0") & 0xff; - discrete_sound_w(machine, MAZE_TONE_TIMING, maze_tone_timing_state); - discrete_sound_w(machine, MAZE_P1_DATA, controls & 0x0f); - discrete_sound_w(machine, MAZE_P2_DATA, (controls >> 4) & 0x0f); - discrete_sound_w(machine, MAZE_JOYSTICK_IN_USE, controls != 0xff); + discrete_sound_w(space, MAZE_TONE_TIMING, maze_tone_timing_state); + discrete_sound_w(space, MAZE_P1_DATA, controls & 0x0f); + discrete_sound_w(space, MAZE_P2_DATA, (controls >> 4) & 0x0f); + discrete_sound_w(space, MAZE_JOYSTICK_IN_USE, controls != 0xff); /* The coin line is connected directly to the discrete circuit. */ /* We can't really do that, so updating it with the tone timing is close enough. */ /* A better option might be to update it at vblank or set a timer to do it. */ /* The only noticeable difference doing it here, is that the controls don't */ /* imediately start making tones if pressed right after the coin is inserted. */ - discrete_sound_w(machine, MAZE_COIN, (~input_port_read(machine, "IN1") >> 3) & 0x01); + discrete_sound_w(space, MAZE_COIN, (~input_port_read(machine, "IN1") >> 3) & 0x01); }