mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
astrocde: fix stereo sound regression in wow
This commit is contained in:
parent
1fb6085a18
commit
fafca0b281
@ -276,7 +276,7 @@ void ebases_state::coin_w(uint8_t data)
|
||||
|
||||
void astrocde_state::gorf_sound_switch_w(int state)
|
||||
{
|
||||
m_astrocade_sound1->set_output_gain(0, state ? 0.0 : 1.0);
|
||||
m_astrocade_sound[0]->set_output_gain(0, state ? 0.0 : 1.0);
|
||||
m_votrax->set_output_gain(0, state ? 1.0 : 0.0);
|
||||
}
|
||||
|
||||
@ -528,8 +528,8 @@ void tenpindx_state::sub_map(address_map &map)
|
||||
void astrocde_state::port_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x000f).select(0xff00).rw(FUNC(astrocde_state::video_register_r), FUNC(astrocde_state::video_register_w));
|
||||
map(0x0010, 0x001f).select(0xff00).r("astrocade1", FUNC(astrocade_io_device::read));
|
||||
map(0x0010, 0x0018).select(0xff00).w("astrocade1", FUNC(astrocade_io_device::write));
|
||||
map(0x0010, 0x001f).select(0xff00).r(m_astrocade_sound[0], FUNC(astrocade_io_device::read));
|
||||
map(0x0010, 0x0018).select(0xff00).w(m_astrocade_sound[0], FUNC(astrocade_io_device::write));
|
||||
map(0x0019, 0x0019).mirror(0xff00).w(FUNC(astrocde_state::expand_register_w));
|
||||
}
|
||||
|
||||
@ -545,8 +545,8 @@ void seawolf2_state::port_map_discrete(address_map &map)
|
||||
map(0x19, 0x19).w(FUNC(astrocde_state::expand_register_w));
|
||||
map(0x40, 0x40).mirror(0x18).w(FUNC(seawolf2_state::sound_1_w));
|
||||
map(0x41, 0x41).mirror(0x18).w(FUNC(seawolf2_state::sound_2_w));
|
||||
map(0x42, 0x42).mirror(0x18).w("lamplatch2", FUNC(output_latch_device::write));
|
||||
map(0x43, 0x43).mirror(0x18).w("lamplatch1", FUNC(output_latch_device::write));
|
||||
map(0x42, 0x42).mirror(0x18).w("lamplatch1", FUNC(output_latch_device::write));
|
||||
map(0x43, 0x43).mirror(0x18).w("lamplatch0", FUNC(output_latch_device::write));
|
||||
}
|
||||
|
||||
|
||||
@ -569,7 +569,7 @@ void astrocde_state::port_map_mono_pattern(address_map &map)
|
||||
void astrocde_state::port_map_stereo_pattern(address_map &map)
|
||||
{
|
||||
port_map_mono_pattern(map);
|
||||
map(0x0050, 0x0058).select(0xff00).w(m_astrocade_sound2, FUNC(astrocade_io_device::write));
|
||||
map(0x0050, 0x0058).select(0xff00).w(m_astrocade_sound[1], FUNC(astrocade_io_device::write));
|
||||
}
|
||||
|
||||
|
||||
@ -599,7 +599,7 @@ void astrocde_state::port_map_16col_pattern_nosound(address_map &map)
|
||||
void demndrgn_state::port_map_16col_pattern_demndrgn(address_map &map)
|
||||
{
|
||||
port_map_16col_pattern_nosound(map);
|
||||
map(0x0010, 0x001f).select(0xff00).r("astrocade1", FUNC(astrocade_io_device::read));
|
||||
map(0x0010, 0x001f).select(0xff00).r(m_astrocade_sound[0], FUNC(astrocade_io_device::read));
|
||||
map(0x0097, 0x0097).mirror(0xff00).w(FUNC(demndrgn_state::sound_w));
|
||||
}
|
||||
|
||||
@ -1151,7 +1151,6 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sound definitions
|
||||
@ -1169,6 +1168,8 @@ static const char *const seawolf_sample_names[] =
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* CPU configurations
|
||||
@ -1229,9 +1230,9 @@ void astrocde_state::astrocade_mono_sound(machine_config &config)
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ASTROCADE_IO(config, m_astrocade_sound1, ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound1->si_cb().set(FUNC(astrocde_state::input_mux_r));
|
||||
m_astrocade_sound1->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
ASTROCADE_IO(config, m_astrocade_sound[0], ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound[0]->si_cb().set(FUNC(astrocde_state::input_mux_r));
|
||||
m_astrocade_sound[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
|
||||
}
|
||||
|
||||
|
||||
@ -1241,12 +1242,12 @@ void astrocde_state::astrocade_stereo_sound(machine_config &config)
|
||||
SPEAKER(config, "lspeaker").front_left();
|
||||
SPEAKER(config, "rspeaker").front_right();
|
||||
|
||||
ASTROCADE_IO(config, m_astrocade_sound1, ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound1->si_cb().set(FUNC(astrocde_state::input_mux_r));
|
||||
m_astrocade_sound1->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound1->add_route(ALL_OUTPUTS, "lspeaker", 1.00);
|
||||
ASTROCADE_IO(config, m_astrocade_sound[0], ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound[0]->si_cb().set(FUNC(astrocde_state::input_mux_r));
|
||||
m_astrocade_sound[0]->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.35);
|
||||
|
||||
ASTROCADE_IO(config, m_astrocade_sound2, ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "rspeaker", 1.00);
|
||||
ASTROCADE_IO(config, m_astrocade_sound[1], ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "rspeaker", 0.35);
|
||||
|
||||
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024B on CPU board at U18, CLK = VERTDR, Q7 used for RESET
|
||||
}
|
||||
@ -1267,7 +1268,7 @@ void seawolf2_state::seawolf2(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &seawolf2_state::seawolf2_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &seawolf2_state::port_map_discrete);
|
||||
|
||||
output_latch_device &lamplatch1(OUTPUT_LATCH(config, "lamplatch1")); // 74174 on game board at N2
|
||||
output_latch_device &lamplatch1(OUTPUT_LATCH(config, "lamplatch0")); // 74174 on game board at N2
|
||||
lamplatch1.bit_handler<0>().set_output("lamp6"); // right player torpedo 4 available
|
||||
lamplatch1.bit_handler<1>().set_output("lamp5"); // right player torpedo 3 available
|
||||
lamplatch1.bit_handler<2>().set_output("lamp4"); // right player torpedo 2 available
|
||||
@ -1276,7 +1277,7 @@ void seawolf2_state::seawolf2(machine_config &config)
|
||||
lamplatch1.bit_handler<4>().append_output("lamp1").invert(); // right player reload (active low)
|
||||
lamplatch1.bit_handler<5>().set_output("lamp0"); // right player explosion (hit)
|
||||
|
||||
output_latch_device &lamplatch2(OUTPUT_LATCH(config, "lamplatch2")); // 74174 on game board at P2
|
||||
output_latch_device &lamplatch2(OUTPUT_LATCH(config, "lamplatch1")); // 74174 on game board at P2
|
||||
lamplatch2.bit_handler<0>().set_output("lamp13"); // left player torpedo 4 available
|
||||
lamplatch2.bit_handler<1>().set_output("lamp12"); // left player torpedo 3 available
|
||||
lamplatch2.bit_handler<2>().set_output("lamp11"); // left player torpedo 2 available
|
||||
@ -1313,7 +1314,7 @@ void ebases_state::ebases(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &ebases_state::ebases_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &ebases_state::port_map_ebases);
|
||||
|
||||
m_astrocade_sound1->so_cb<1>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound[0]->so_cb<1>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
|
||||
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024 on CPU board at U18, CLK = VERTDR, Q7 used for RESET
|
||||
}
|
||||
@ -1327,8 +1328,8 @@ void astrocde_state::spacezap(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &astrocde_state::spacezap_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &astrocde_state::port_map_mono_pattern);
|
||||
|
||||
m_astrocade_sound1->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound1->so_cb<3>().set("outlatch", FUNC(output_latch_device::write));
|
||||
m_astrocade_sound[0]->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound[0]->so_cb<3>().set("outlatch", FUNC(output_latch_device::write));
|
||||
|
||||
output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch", 0)); // MC14174B on game board at U16
|
||||
outlatch.bit_handler<0>().set(FUNC(astrocde_state::coin_counter_w<0>));
|
||||
@ -1362,14 +1363,8 @@ void astrocde_state::wow(machine_config &config)
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "center").front_center();
|
||||
|
||||
m_astrocade_sound1->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound1->so_cb<7>().set(FUNC(astrocde_state::votrax_speech_w));
|
||||
|
||||
m_astrocade_sound1->reset_routes();
|
||||
m_astrocade_sound1->add_route(ALL_OUTPUTS, "lspeaker", 0.35);
|
||||
|
||||
m_astrocade_sound2->reset_routes();
|
||||
m_astrocade_sound2->add_route(ALL_OUTPUTS, "lspeaker", 0.35);
|
||||
m_astrocade_sound[0]->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound[0]->so_cb<7>().set(FUNC(astrocde_state::votrax_speech_w));
|
||||
|
||||
VOTRAX_SC01(config, m_votrax, 756000);
|
||||
|
||||
@ -1417,18 +1412,18 @@ void astrocde_state::gorf(machine_config &config)
|
||||
SPEAKER(config, "upper", 0.0, 0.0, 1.0);
|
||||
SPEAKER(config, "lower", 0.0, -0.5, 1.0);
|
||||
|
||||
ASTROCADE_IO(config, m_astrocade_sound1, ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound1->si_cb().set(FUNC(astrocde_state::input_mux_r));
|
||||
m_astrocade_sound1->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound1->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound1->so_cb<6>().set("lamplatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound1->so_cb<7>().set(FUNC(astrocde_state::votrax_speech_w));
|
||||
m_astrocade_sound1->add_route(ALL_OUTPUTS, "upper", 0.45);
|
||||
ASTROCADE_IO(config, m_astrocade_sound[0], ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound[0]->si_cb().set(FUNC(astrocde_state::input_mux_r));
|
||||
m_astrocade_sound[0]->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w));
|
||||
m_astrocade_sound[0]->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound[0]->so_cb<6>().set("lamplatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound[0]->so_cb<7>().set(FUNC(astrocde_state::votrax_speech_w));
|
||||
m_astrocade_sound[0]->add_route(ALL_OUTPUTS, "upper", 0.35);
|
||||
|
||||
ASTROCADE_IO(config, m_astrocade_sound2, ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "lower", 0.45);
|
||||
ASTROCADE_IO(config, m_astrocade_sound[1], ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "lower", 0.35);
|
||||
|
||||
VOTRAX_SC01(config, m_votrax, 756000);
|
||||
m_votrax->add_route(ALL_OUTPUTS, "upper", 0.55);
|
||||
m_votrax->add_route(ALL_OUTPUTS, "upper", 0.45);
|
||||
}
|
||||
|
||||
void astrocde_state::robby(machine_config &config)
|
||||
@ -1449,7 +1444,7 @@ void astrocde_state::robby(machine_config &config)
|
||||
outlatch.q_out_cb<6>().set_output("led0");
|
||||
outlatch.q_out_cb<7>().set_output("led1");
|
||||
|
||||
m_astrocade_sound1->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
m_astrocade_sound[0]->so_cb<5>().set("outlatch", FUNC(cd4099_device::write_nibble_d0));
|
||||
}
|
||||
|
||||
void astrocde_state::profpac(machine_config &config)
|
||||
@ -1478,8 +1473,8 @@ void astrocde_state::profpac(machine_config &config)
|
||||
lamplatch.bit_handler<5>().set_output("lamp4"); // right lamp B
|
||||
lamplatch.bit_handler<6>().set_output("lamp5"); // right lamp C
|
||||
|
||||
m_astrocade_sound1->so_cb<4>().set("outlatch", FUNC(output_latch_device::write));
|
||||
m_astrocade_sound1->so_cb<5>().set("lamplatch", FUNC(output_latch_device::write));
|
||||
m_astrocade_sound[0]->so_cb<4>().set("outlatch", FUNC(output_latch_device::write));
|
||||
m_astrocade_sound[0]->so_cb<5>().set("lamplatch", FUNC(output_latch_device::write));
|
||||
}
|
||||
|
||||
void demndrgn_state::demndrgn(machine_config &config)
|
||||
@ -1498,10 +1493,10 @@ void demndrgn_state::demndrgn(machine_config &config)
|
||||
outlatch.bit_handler<3>().set_output("led1");
|
||||
outlatch.bit_handler<4>().set(FUNC(demndrgn_state::input_select_w));
|
||||
|
||||
m_astrocade_sound1->so_cb<4>().set("outlatch", FUNC(output_latch_device::write));
|
||||
m_astrocade_sound1->so_cb<4>().append(FUNC(demndrgn_state::trackball_reset_w));
|
||||
m_astrocade_sound1->pot_cb<0>().set_ioport("FIREX");
|
||||
m_astrocade_sound1->pot_cb<1>().set_ioport("FIREY");
|
||||
m_astrocade_sound[0]->so_cb<4>().set("outlatch", FUNC(output_latch_device::write));
|
||||
m_astrocade_sound[0]->so_cb<4>().append(FUNC(demndrgn_state::trackball_reset_w));
|
||||
m_astrocade_sound[0]->pot_cb<0>().set_ioport("FIREX");
|
||||
m_astrocade_sound[0]->pot_cb<1>().set_ioport("FIREY");
|
||||
}
|
||||
|
||||
void tenpindx_state::tenpindx(machine_config &config)
|
||||
|
@ -34,8 +34,7 @@ public:
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_votrax(*this, "votrax"),
|
||||
m_astrocade_sound1(*this, "astrocade1"),
|
||||
m_astrocade_sound2(*this, "astrocade2"),
|
||||
m_astrocade_sound(*this, "astrocade%u", 0),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_protected_ram(*this, "protected_ram"),
|
||||
m_nvram(*this, "nvram"),
|
||||
@ -44,14 +43,12 @@ public:
|
||||
m_soundlatch(*this, "soundlatch"),
|
||||
m_bank4000(*this, "bank4000"),
|
||||
m_bank8000(*this, "bank8000"),
|
||||
m_handle(*this, "P%uHANDLE", 1U),
|
||||
m_interrupt_scanline(0xff)
|
||||
m_handle(*this, "P%uHANDLE", 1U)
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<votrax_sc01_device> m_votrax;
|
||||
optional_device<astrocade_io_device> m_astrocade_sound1;
|
||||
optional_device<astrocade_io_device> m_astrocade_sound2;
|
||||
optional_device_array<astrocade_io_device, 2> m_astrocade_sound;
|
||||
optional_shared_ptr<uint8_t> m_videoram;
|
||||
optional_shared_ptr<uint8_t> m_protected_ram;
|
||||
optional_shared_ptr<uint8_t> m_nvram;
|
||||
@ -73,7 +70,7 @@ public:
|
||||
std::unique_ptr<uint8_t[]> m_sparklestar{};
|
||||
uint8_t m_interrupt_enabl = 0U;
|
||||
uint8_t m_interrupt_vector = 0U;
|
||||
uint8_t m_interrupt_scanline = 0U;
|
||||
uint8_t m_interrupt_scanline = 0xff;
|
||||
uint8_t m_vertical_feedback = 0U;
|
||||
uint8_t m_horizontal_feedback = 0U;
|
||||
emu_timer *m_scanline_timer = nullptr;
|
||||
@ -107,6 +104,7 @@ public:
|
||||
uint8_t m_profpac_writemode = 0U;
|
||||
uint16_t m_profpac_writemask = 0U;
|
||||
uint8_t m_profpac_vw = 0U;
|
||||
|
||||
void protected_ram_enable_w(uint8_t data);
|
||||
uint8_t protected_ram_r(offs_t offset);
|
||||
void protected_ram_w(offs_t offset, uint8_t data);
|
||||
|
@ -578,7 +578,7 @@ void astrocde_state::video_register_w(offs_t offset, uint8_t data)
|
||||
case 0x17: /* noise volume register */
|
||||
case 0x18: /* sound block transfer */
|
||||
if (m_video_config & AC_SOUND_PRESENT)
|
||||
m_astrocade_sound1->write(space, offset, data);
|
||||
m_astrocade_sound[0]->write(space, offset, data);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ private:
|
||||
required_ioport_array<4> m_keypad;
|
||||
};
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
*
|
||||
* Memory maps
|
||||
@ -84,11 +85,12 @@ void astrocde_home_state::astrocade_mem(address_map &map)
|
||||
void astrocde_home_state::astrocade_io(address_map &map)
|
||||
{
|
||||
map(0x00, 0x0f).select(0xff00).rw(FUNC(astrocde_state::video_register_r), FUNC(astrocde_state::video_register_w));
|
||||
map(0x10, 0x1f).select(0xff00).r("astrocade1", FUNC(astrocade_io_device::read));
|
||||
map(0x10, 0x18).select(0xff00).w("astrocade1", FUNC(astrocade_io_device::write));
|
||||
map(0x10, 0x1f).select(0xff00).r(m_astrocade_sound[0], FUNC(astrocade_io_device::read));
|
||||
map(0x10, 0x18).select(0xff00).w(m_astrocade_sound[0], FUNC(astrocade_io_device::write));
|
||||
map(0x19, 0x19).mirror(0xff00).w(FUNC(astrocde_state::expand_register_w));
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Input ports
|
||||
@ -210,13 +212,13 @@ void astrocde_home_state::astrocde(machine_config &config)
|
||||
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
ASTROCADE_IO(config, m_astrocade_sound1, ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound1->si_cb().set(FUNC(astrocde_home_state::inputs_r));
|
||||
m_astrocade_sound1->pot_cb<0>().set(m_ctrl[0], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound1->pot_cb<1>().set(m_ctrl[1], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound1->pot_cb<2>().set(m_ctrl[2], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound1->pot_cb<3>().set(m_ctrl[3], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound1->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
ASTROCADE_IO(config, m_astrocade_sound[0], ASTROCADE_CLOCK/4);
|
||||
m_astrocade_sound[0]->si_cb().set(FUNC(astrocde_home_state::inputs_r));
|
||||
m_astrocade_sound[0]->pot_cb<0>().set(m_ctrl[0], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound[0]->pot_cb<1>().set(m_ctrl[1], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound[0]->pot_cb<2>().set(m_ctrl[2], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound[0]->pot_cb<3>().set(m_ctrl[3], FUNC(astrocade_ctrl_port_device::read_knob));
|
||||
m_astrocade_sound[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
|
||||
|
||||
/* expansion port */
|
||||
ASTROCADE_EXP_SLOT(config, m_exp, astrocade_exp, nullptr);
|
||||
@ -254,6 +256,7 @@ ROM_START( astrocdw )
|
||||
ROM_LOAD( "bioswhit.bin", 0x0000, 0x2000, CRC(6eb53e79) SHA1(d84341feec1a0a0e8aa6151b649bc3cf6ef69fbf) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Driver initialization
|
||||
|
Loading…
Reference in New Issue
Block a user