redalert: all ends up doing the same sound start anyway (nw)

This commit is contained in:
Vas Crabb 2018-05-17 15:08:53 +10:00
parent 07e254b95b
commit fd82e415fd
2 changed files with 36 additions and 40 deletions

View File

@ -130,7 +130,7 @@ void redalert_state::redalert_audio_map(address_map &map)
*
*************************************/
SOUND_START_MEMBER(redalert_state,redalert)
void redalert_state::sound_start()
{
save_item(NAME(m_ay8910_latch_1));
save_item(NAME(m_ay8910_latch_2));
@ -227,8 +227,6 @@ MACHINE_CONFIG_START(redalert_state::redalert_audio)
redalert_audio_m37b(config);
redalert_audio_voice(config);
MCFG_SOUND_START_OVERRIDE( redalert_state, redalert )
MACHINE_CONFIG_END
/*************************************
@ -243,8 +241,6 @@ MACHINE_CONFIG_START(redalert_state::ww3_audio)
redalert_audio_m37b(config);
MCFG_SOUND_START_OVERRIDE( redalert_state, redalert )
MACHINE_CONFIG_END
/*************************************
@ -324,19 +320,6 @@ void redalert_state::demoneye_audio_map(address_map &map)
}
/*************************************
*
* Demoneye-X audio start
*
*************************************/
SOUND_START_MEMBER( redalert_state, demoneye )
{
save_item(NAME(m_ay8910_latch_1));
save_item(NAME(m_ay8910_latch_2));
}
/*************************************
*
@ -355,8 +338,6 @@ MACHINE_CONFIG_START(redalert_state::demoneye_audio)
MCFG_PIA_WRITEPA_HANDLER(WRITE8(*this, redalert_state, demoneye_ay8910_data_w))
MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, redalert_state, demoneye_ay8910_latch_1_w))
MCFG_SOUND_START_OVERRIDE( redalert_state, demoneye )
SPEAKER(config, "mono").front_center();
MCFG_GENERIC_LATCH_8_ADD("soundlatch")

View File

@ -8,6 +8,10 @@
ask. - Mike Balfour (mab22@po.cwru.edu)
****************************************************************************/
#ifndef MAME_INCLUDES_REDALERT_H
#define MAME_INCLUDES_REDALERT_H
#pragma once
#include "machine/gen_latch.h"
#include "sound/hc55516.h"
@ -16,8 +20,8 @@
class redalert_state : public driver_device
{
public:
redalert_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
redalert_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_bitmap_videoram(*this, "bitmap_videoram"),
m_charmap_videoram(*this, "charram"),
m_video_control(*this, "video_control"),
@ -27,10 +31,9 @@ public:
m_cvsd(*this, "cvsd"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch"),
m_soundlatch2(*this, "soundlatch2") { }
uint8_t m_ay8910_latch_1;
uint8_t m_ay8910_latch_2;
m_soundlatch2(*this, "soundlatch2")
{
}
required_shared_ptr<uint8_t> m_bitmap_videoram;
required_shared_ptr<uint8_t> m_charmap_videoram;
@ -58,8 +61,6 @@ public:
DECLARE_WRITE8_MEMBER(demoneye_audio_command_w);
DECLARE_VIDEO_START(redalert);
DECLARE_VIDEO_START(ww3);
DECLARE_SOUND_START(redalert);
DECLARE_SOUND_START(demoneye);
uint32_t screen_update_redalert(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_demoneye(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
uint32_t screen_update_panther(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@ -74,24 +75,38 @@ public:
void get_pens(pen_t *pens);
void get_panther_pens(pen_t *pens);
void demoneye(machine_config &config);
void demoneye_video(machine_config &config);
void demoneye_audio(machine_config &config);
void ww3(machine_config &config);
void ww3_video(machine_config &config);
void ww3_audio(machine_config &config);
void panther(machine_config &config);
void panther_video(machine_config &config);
void redalert(machine_config &config);
void redalert_video(machine_config &config);
protected:
virtual void sound_start() override;
void redalert_video_common(machine_config &config);
void redalert_audio(machine_config &config);
void redalert_video(machine_config &config);
void ww3_video(machine_config &config);
void panther_video(machine_config &config);
void demoneye_video(machine_config &config);
void redalert_audio_m37b(machine_config &config);
void redalert_audio_voice(machine_config &config);
void demoneye_audio_map(address_map &map);
void demoneye_main_map(address_map &map);
void panther_main_map(address_map &map);
void redalert_audio_map(address_map &map);
void redalert_audio(machine_config &config);
void ww3_audio(machine_config &config);
void demoneye_audio(machine_config &config);
void redalert_main_map(address_map &map);
void redalert_voice_map(address_map &map);
void ww3_main_map(address_map &map);
void panther_main_map(address_map &map);
void demoneye_main_map(address_map &map);
void redalert_audio_map(address_map &map);
void demoneye_audio_map(address_map &map);
void redalert_voice_map(address_map &map);
private:
uint8_t m_ay8910_latch_1;
uint8_t m_ay8910_latch_2;
};
#endif // MAME_INCLUDES_REDALERT_H