diff options
Diffstat (limited to 'src/mame/drivers/wallc.cpp')
-rw-r--r-- | src/mame/drivers/wallc.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mame/drivers/wallc.cpp b/src/mame/drivers/wallc.cpp index 2e2f738e2e0..88fbf57ed72 100644 --- a/src/mame/drivers/wallc.cpp +++ b/src/mame/drivers/wallc.cpp @@ -51,6 +51,7 @@ Thanks to HIGHWAYMAN for providing info on how to get to these epoxies #include "emu.h" #include "cpu/z80/z80.h" +#include "machine/adc0804.h" #include "sound/ay8910.h" #include "video/resnet.h" #include "emupal.h" @@ -294,14 +295,13 @@ void wallc_state::wallc_map(address_map &map) map(0xb000, 0xb000).portr("DSW1"); map(0xb200, 0xb200).portr("SYSTEM"); - map(0xb400, 0xb400).portr("DIAL"); - map(0xb600, 0xb600).portr("DSW2"); + map(0xb400, 0xb400).r("adc", FUNC(adc0804_device::read_and_write)); map(0xb000, 0xb000).nopw(); map(0xb100, 0xb100).w(FUNC(wallc_state::wallc_coin_counter_w)); map(0xb200, 0xb200).nopw(); map(0xb500, 0xb500).w("aysnd", FUNC(ay8912_device::address_w)); - map(0xb600, 0xb600).w("aysnd", FUNC(ay8912_device::data_w)); + map(0xb600, 0xb600).rw("aysnd", FUNC(ay8912_device::data_r), FUNC(ay8912_device::data_w)); } void wallc_state::unkitpkr_map(address_map &map) @@ -522,6 +522,8 @@ void wallc_state::wallc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &wallc_state::wallc_map); m_maincpu->set_vblank_int("screen", FUNC(wallc_state::irq0_line_hold)); + ADC0804(config, "adc", 640000).vin_callback().set_ioport("DIAL"); // clock not verified + /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -536,7 +538,9 @@ void wallc_state::wallc(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8912(config, "aysnd", 12288000 / 8).add_route(ALL_OUTPUTS, "mono", 0.30); + ay8912_device &aysnd(AY8912(config, "aysnd", 12288000 / 8)); + aysnd.port_a_read_callback().set_ioport("DSW2"); + aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); } void wallc_state::wallca(machine_config &config) @@ -548,6 +552,7 @@ void wallc_state::wallca(machine_config &config) void wallc_state::unkitpkr(machine_config &config) { wallc(config); + config.device_remove("adc"); m_maincpu->set_addrmap(AS_PROGRAM, &wallc_state::unkitpkr_map); @@ -555,7 +560,6 @@ void wallc_state::unkitpkr(machine_config &config) subdevice<palette_device>("palette")->set_init(FUNC(wallc_state::unkitpkr_palette)); /* sound hardware */ - subdevice<ay8912_device>("aysnd")->port_a_read_callback().set_ioport("DSW2"); subdevice<ay8912_device>("aysnd")->reset_routes().add_route(ALL_OUTPUTS, "mono", 0.50); } |