a few changes for consistency (nw)

This commit is contained in:
smf- 2013-05-11 13:23:33 +00:00
parent 3a8b7344f0
commit 11722241d8
2 changed files with 7 additions and 8 deletions

View File

@ -12,7 +12,6 @@
***************************************************************************/
#include "emu.h"
#include "ay8910.h"
#include "2608intf.h"
#include "fm.h"
@ -136,7 +135,7 @@ void ym2608_device::device_post_load()
void ym2608_device::device_start()
{
static const ay8910_interface generic_ay8910 =
static const ay8910_interface default_ay8910_config =
{
AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT,
AY8910_DEFAULT_LOADS,
@ -147,11 +146,11 @@ void ym2608_device::device_start()
void *pcmbufa;
int pcmsizea;
const ay8910_interface *ay8910_intf = m_ay8910_intf != NULL ? m_ay8910_intf : &generic_ay8910;
const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config;
m_irq_handler.resolve();
/* FIXME: Force to use simgle output */
m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_intf);
m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config);
assert_always(m_psg != NULL, "Error creating YM2608/AY8910 chip");
/* Timer Handler set */

View File

@ -11,8 +11,8 @@ void ym2608_update_request(void *param);
#define MCFG_YM2608_IRQ_HANDLER(_devcb) \
devcb = &ym2608_device::set_irq_handler(*device, DEVCB2_##_devcb);
#define MCFG_YM2608_AY8910_INTF(_ay8910_intf) \
ym2608_device::set_ay8910_intf(*device, _ay8910_intf);
#define MCFG_YM2608_AY8910_INTF(_ay8910_config) \
ym2608_device::set_ay8910_config(*device, _ay8910_config);
class ym2608_device : public device_t,
public device_sound_interface
@ -22,7 +22,7 @@ public:
// static configuration helpers
template<class _Object> static devcb2_base &set_irq_handler(device_t &device, _Object object) { return downcast<ym2608_device &>(device).m_irq_handler.set_callback(object); }
static void set_ay8910_intf(device_t &device, const ay8910_interface *ay8910_intf) { downcast<ym2608_device &>(device).m_ay8910_intf = ay8910_intf; }
static void set_ay8910_config(device_t &device, const ay8910_interface *ay8910_config) { downcast<ym2608_device &>(device).m_ay8910_config = ay8910_config; }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
@ -52,7 +52,7 @@ private:
void * m_chip;
void * m_psg;
devcb2_write_line m_irq_handler;
const ay8910_interface *m_ay8910_intf;
const ay8910_interface *m_ay8910_config;
};
extern const device_type YM2608;