mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
es550x_device: converted to devcb2 (nw)
This commit is contained in:
parent
3de7df04c9
commit
8cb2897cc1
@ -148,7 +148,14 @@ es550x_device::es550x_device(const machine_config &mconfig, device_type type, co
|
||||
#if MAKE_WAVS
|
||||
m_wavraw(NULL),
|
||||
#endif
|
||||
m_eslog(NULL)
|
||||
m_eslog(NULL),
|
||||
m_region0(NULL),
|
||||
m_region1(NULL),
|
||||
m_region2(NULL),
|
||||
m_region3(NULL),
|
||||
m_channels(0),
|
||||
m_irq_cb(*this),
|
||||
m_read_port_cb(*this)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
@ -163,36 +170,6 @@ es5506_device::es5506_device(const machine_config &mconfig, const char *tag, dev
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void es550x_device::device_config_complete()
|
||||
{
|
||||
}
|
||||
|
||||
void es5506_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const es5506_interface *intf = reinterpret_cast<const es5506_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
*static_cast<es5506_interface *>(this) = *intf;
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
m_region0 = "";
|
||||
m_region1 = "";
|
||||
m_region2 = "";
|
||||
m_region3 = "";
|
||||
m_channels = 0;
|
||||
memset(&m_irq_callback, 0, sizeof(m_irq_callback));
|
||||
memset(&m_read_port, 0, sizeof(m_read_port));
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
@ -225,8 +202,8 @@ void es5506_device::device_start()
|
||||
|
||||
/* initialize the rest of the structure */
|
||||
m_master_clock = clock();
|
||||
m_irq_callback_func.resolve(m_irq_callback, *this);
|
||||
m_port_read_func.resolve(m_read_port, *this);
|
||||
m_irq_cb.resolve();
|
||||
m_read_port_cb.resolve();
|
||||
m_irqv = 0x80;
|
||||
m_channels = channels;
|
||||
|
||||
@ -338,30 +315,6 @@ es5505_device::es5505_device(const machine_config &mconfig, const char *tag, dev
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void es5505_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const es5505_interface *intf = reinterpret_cast<const es5505_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
*static_cast<es5505_interface *>(this) = *intf;
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
m_es5505_region0 = "";
|
||||
m_es5505_region1 = "";
|
||||
m_es5505_channels = 0;
|
||||
memset(&m_es5505_irq_callback, 0, sizeof(m_es5505_irq_callback));
|
||||
memset(&m_es5505_read_port, 0, sizeof(m_es5505_read_port));
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
@ -373,8 +326,8 @@ void es5505_device::device_start()
|
||||
int channels = 1; /* 1 channel by default, for backward compatibility */
|
||||
|
||||
/* only override the number of channels if the value is in the valid range 1 .. 4 */
|
||||
if (1 <= m_es5505_channels && m_es5505_channels <= 4)
|
||||
channels = m_es5505_channels;
|
||||
if (1 <= m_channels && m_channels <= 4)
|
||||
channels = m_channels;
|
||||
|
||||
/* debugging */
|
||||
if (LOG_COMMANDS && !m_eslog)
|
||||
@ -384,15 +337,15 @@ void es5505_device::device_start()
|
||||
m_stream = machine().sound().stream_alloc(*this, 0, 2 * channels, clock() / (16*32), this);
|
||||
|
||||
/* initialize the regions */
|
||||
m_region_base[0] = m_es5505_region0 ? (UINT16 *)machine().root_device().memregion(m_es5505_region0)->base() : NULL;
|
||||
m_region_base[1] = m_es5505_region1 ? (UINT16 *)machine().root_device().memregion(m_es5505_region1)->base() : NULL;
|
||||
m_region_base[0] = m_region0 ? (UINT16 *)machine().root_device().memregion(m_region0)->base() : NULL;
|
||||
m_region_base[1] = m_region1 ? (UINT16 *)machine().root_device().memregion(m_region1)->base() : NULL;
|
||||
|
||||
/* initialize the rest of the structure */
|
||||
m_master_clock = clock();
|
||||
m_irq_callback_func.resolve(m_es5505_irq_callback, *this);
|
||||
m_port_read_func.resolve(m_es5505_read_port, *this);
|
||||
m_irq_cb.resolve();
|
||||
m_read_port_cb.resolve();
|
||||
m_irqv = 0x80;
|
||||
m_es5505_channels = channels;
|
||||
m_channels = channels;
|
||||
|
||||
/* compute the tables */
|
||||
compute_tables();
|
||||
@ -467,8 +420,8 @@ void es5505_device::device_start()
|
||||
void es550x_device::update_irq_state()
|
||||
{
|
||||
/* ES5505/6 irq line has been set high - inform the host */
|
||||
if (!m_irq_callback_func.isnull())
|
||||
m_irq_callback_func(1); /* IRQB set high */
|
||||
if (!m_irq_cb.isnull())
|
||||
m_irq_cb(1); /* IRQB set high */
|
||||
}
|
||||
|
||||
void es550x_device::update_internal_irq_state()
|
||||
@ -484,8 +437,8 @@ void es550x_device::update_internal_irq_state()
|
||||
|
||||
m_irqv=0x80;
|
||||
|
||||
if (!m_irq_callback_func.isnull())
|
||||
m_irq_callback_func(0); /* IRQB set low */
|
||||
if (!m_irq_cb.isnull())
|
||||
m_irq_cb(0); /* IRQB set low */
|
||||
}
|
||||
|
||||
/**********************************************************************************************
|
||||
@ -1095,7 +1048,7 @@ void es5505_device::generate_samples(INT32 **outputs, int offset, int samples)
|
||||
return;
|
||||
|
||||
/* clear out the accumulators */
|
||||
for (int i = 0; i < m_es5505_channels << 1; i++)
|
||||
for (int i = 0; i < m_channels << 1; i++)
|
||||
{
|
||||
memset(outputs[i] + offset, 0, sizeof(INT32) * samples);
|
||||
}
|
||||
@ -1111,7 +1064,7 @@ void es5505_device::generate_samples(INT32 **outputs, int offset, int samples)
|
||||
voice->control |= CONTROL_STOP0;
|
||||
|
||||
int voice_channel = (voice->control & CONTROL_CAMASK) >> 10;
|
||||
int channel = voice_channel % m_es5505_channels;
|
||||
int channel = voice_channel % m_channels;
|
||||
int l = channel << 1;
|
||||
int r = l + 1;
|
||||
INT32 *left = outputs[l] + offset;
|
||||
@ -1512,8 +1465,8 @@ inline UINT32 es5506_device::reg_read_low(es550x_voice *voice, offs_t offset)
|
||||
break;
|
||||
|
||||
case 0x68/8: /* PAR */
|
||||
if (!m_port_read_func.isnull())
|
||||
result = m_port_read_func(0);
|
||||
if (!m_read_port_cb.isnull())
|
||||
result = m_read_port_cb(0);
|
||||
break;
|
||||
|
||||
case 0x70/8: /* IRQV */
|
||||
@ -1588,8 +1541,8 @@ inline UINT32 es5506_device::reg_read_high(es550x_voice *voice, offs_t offset)
|
||||
break;
|
||||
|
||||
case 0x68/8: /* PAR */
|
||||
if (!m_port_read_func.isnull())
|
||||
result = m_port_read_func(0);
|
||||
if (!m_read_port_cb.isnull())
|
||||
result = m_read_port_cb(0);
|
||||
break;
|
||||
|
||||
case 0x70/8: /* IRQV */
|
||||
@ -1610,8 +1563,8 @@ inline UINT32 es5506_device::reg_read_test(es550x_voice *voice, offs_t offset)
|
||||
switch (offset)
|
||||
{
|
||||
case 0x68/8: /* PAR */
|
||||
if (!m_port_read_func.isnull())
|
||||
result = m_port_read_func(0);
|
||||
if (!m_read_port_cb.isnull())
|
||||
result = m_read_port_cb(0);
|
||||
break;
|
||||
|
||||
case 0x70/8: /* IRQV */
|
||||
@ -2171,8 +2124,8 @@ inline UINT16 es5505_device::reg_read_test(es550x_voice *voice, offs_t offset)
|
||||
break;
|
||||
|
||||
case 0x09: /* PAR */
|
||||
if (!m_port_read_func.isnull())
|
||||
result = m_port_read_func(0);
|
||||
if (!m_read_port_cb.isnull())
|
||||
result = m_read_port_cb(0);
|
||||
break;
|
||||
|
||||
case 0x0f: /* PAGE */
|
||||
|
@ -14,26 +14,43 @@
|
||||
|
||||
#define MAKE_WAVS 0
|
||||
|
||||
#define MCFG_ES5506_REGION0(_region) \
|
||||
es5506_device::set_region0(*device, _region);
|
||||
|
||||
struct es5505_interface
|
||||
{
|
||||
const char * m_es5505_region0; /* memory region where the sample ROM lives */
|
||||
const char * m_es5505_region1; /* memory region where the sample ROM lives */
|
||||
int m_es5505_channels; /* number of output channels: 1 .. 4 */
|
||||
devcb_write_line m_es5505_irq_callback; /* irq callback */
|
||||
devcb_read16 m_es5505_read_port; /* input port read */
|
||||
};
|
||||
#define MCFG_ES5506_REGION1(_region) \
|
||||
es5506_device::set_region1(*device, _region);
|
||||
|
||||
#define MCFG_ES5506_REGION2(_region) \
|
||||
es5506_device::set_region2(*device, _region);
|
||||
|
||||
#define MCFG_ES5506_REGION3(_region) \
|
||||
es5506_device::set_region3(*device, _region);
|
||||
|
||||
#define MCFG_ES5506_CHANNELS(_chan) \
|
||||
es5506_device::set_channels(*device, _chan);
|
||||
|
||||
#define MCFG_ES5506_IRQ_CB(_devcb) \
|
||||
devcb = &es5506_device::set_irq_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_ES5506_READ_PORT_CB(_devcb) \
|
||||
devcb = &es5506_device::set_read_port_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
|
||||
#define MCFG_ES5505_REGION0(_region) \
|
||||
es5505_device::set_region0(*device, _region);
|
||||
|
||||
#define MCFG_ES5505_REGION1(_region) \
|
||||
es5505_device::set_region1(*device, _region);
|
||||
|
||||
#define MCFG_ES5505_CHANNELS(_chan) \
|
||||
es5505_device::set_channels(*device, _chan);
|
||||
|
||||
#define MCFG_ES5505_IRQ_CB(_devcb) \
|
||||
devcb = &es5505_device::set_irq_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_ES5505_READ_PORT_CB(_devcb) \
|
||||
devcb = &es5505_device::set_read_port_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
struct es5506_interface
|
||||
{
|
||||
const char * m_region0; /* memory region where the sample ROM lives */
|
||||
const char * m_region1; /* memory region where the sample ROM lives */
|
||||
const char * m_region2; /* memory region where the sample ROM lives */
|
||||
const char * m_region3; /* memory region where the sample ROM lives */
|
||||
int m_channels; /* number of output channels: 1 .. 6 */
|
||||
devcb_write_line m_irq_callback; /* irq callback */
|
||||
devcb_read16 m_read_port; /* input port read */
|
||||
};
|
||||
|
||||
/* struct describing a single playing voice */
|
||||
|
||||
@ -100,10 +117,18 @@ class es550x_device : public device_t,
|
||||
public:
|
||||
es550x_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
~es550x_device() {}
|
||||
|
||||
static void set_region0(device_t &device, const char *region0) { downcast<es550x_device &>(device).m_region0 = region0; }
|
||||
static void set_region1(device_t &device, const char *region1) { downcast<es550x_device &>(device).m_region1 = region1; }
|
||||
static void set_region2(device_t &device, const char *region2) { downcast<es550x_device &>(device).m_region2 = region2; }
|
||||
static void set_region3(device_t &device, const char *region3) { downcast<es550x_device &>(device).m_region3 = region3; }
|
||||
static void set_channels(device_t &device, int channels) { downcast<es550x_device &>(device).m_channels = channels; }
|
||||
template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<es550x_device &>(device).m_irq_cb.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_read_port_callback(device_t &device, _Object object) { return downcast<es550x_device &>(device).m_read_port_cb.set_callback(object); }
|
||||
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
virtual void device_stop();
|
||||
virtual void device_reset();
|
||||
@ -118,8 +143,6 @@ protected:
|
||||
UINT32 m_write_latch; /* currently accumulated data for write */
|
||||
UINT32 m_read_latch; /* currently accumulated data for read */
|
||||
UINT32 m_master_clock; /* master clock frequency */
|
||||
devcb_resolved_write_line m_irq_callback_func; /* IRQ callback */
|
||||
devcb_resolved_read16 m_port_read_func; /* input port read */
|
||||
|
||||
UINT8 m_current_page; /* current register page */
|
||||
UINT8 m_active_voices; /* number of active voices */
|
||||
@ -141,6 +164,14 @@ protected:
|
||||
#endif
|
||||
|
||||
FILE *m_eslog;
|
||||
|
||||
const char * m_region0; /* memory region where the sample ROM lives */
|
||||
const char * m_region1; /* memory region where the sample ROM lives */
|
||||
const char * m_region2; /* memory region where the sample ROM lives */
|
||||
const char * m_region3; /* memory region where the sample ROM lives */
|
||||
int m_channels; /* number of output channels: 1 .. 6 */
|
||||
devcb2_write_line m_irq_cb; /* irq callback */
|
||||
devcb2_read16 m_read_port_cb; /* input port read */
|
||||
|
||||
void update_irq_state();
|
||||
void update_internal_irq_state();
|
||||
@ -152,8 +183,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class es5506_device : public es550x_device,
|
||||
public es5506_interface
|
||||
class es5506_device : public es550x_device
|
||||
{
|
||||
public:
|
||||
es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
@ -165,7 +195,6 @@ public:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
|
||||
// sound stream update overrides
|
||||
@ -186,8 +215,7 @@ private:
|
||||
extern const device_type ES5506;
|
||||
|
||||
|
||||
class es5505_device : public es550x_device,
|
||||
public es5505_interface
|
||||
class es5505_device : public es550x_device
|
||||
{
|
||||
public:
|
||||
es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
@ -198,7 +226,6 @@ public:
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
@ -305,15 +305,6 @@ WRITE_LINE_MEMBER(taito_en_device::duart_irq_handler)
|
||||
IP5: 1MHz
|
||||
*/
|
||||
|
||||
static const es5505_interface es5505_taito_en_config =
|
||||
{
|
||||
"ensoniq.0", /* Bank 0: Unused by F3 games? */
|
||||
"ensoniq.0", /* Bank 1: All games seem to use this */
|
||||
1, /* channels */
|
||||
DEVCB_NULL /* IRQ */
|
||||
};
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Machine driver
|
||||
@ -334,7 +325,9 @@ MACHINE_CONFIG_FRAGMENT( taito_en_sound )
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ensoniq", ES5505, XTAL_30_4761MHz / 2)
|
||||
MCFG_SOUND_CONFIG(es5505_taito_en_config)
|
||||
MCFG_ES5505_REGION0("ensoniq.0")
|
||||
MCFG_ES5505_REGION1("ensoniq.0")
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.08)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.08)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -1639,24 +1639,6 @@ static INPUT_PORTS_START( aama )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sound definitions
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const es5506_interface es5506_config =
|
||||
{
|
||||
"ensoniq.0",
|
||||
"ensoniq.1",
|
||||
"ensoniq.2",
|
||||
"ensoniq.3",
|
||||
1 /* channels */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Machine driver
|
||||
@ -1692,7 +1674,11 @@ static MACHINE_CONFIG_START( timekill, itech32_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, SOUND_CLOCK)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("ensoniq.0")
|
||||
MCFG_ES5506_REGION1("ensoniq.1")
|
||||
MCFG_ES5506_REGION2("ensoniq.2")
|
||||
MCFG_ES5506_REGION3("ensoniq.3")
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.1)
|
||||
|
||||
/* via */
|
||||
|
@ -568,17 +568,6 @@ WRITE_LINE_MEMBER(macrossp_state::irqhandler)
|
||||
// m_audiocpu->set_input_line(1, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const es5506_interface es5506_config =
|
||||
{
|
||||
"ensoniq.0",
|
||||
"ensoniq.1",
|
||||
"ensoniq.2",
|
||||
"ensoniq.3",
|
||||
1, /* channels */
|
||||
DEVCB_DRIVER_LINE_MEMBER(macrossp_state,irqhandler)
|
||||
};
|
||||
|
||||
|
||||
void macrossp_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_sndpending));
|
||||
@ -623,7 +612,12 @@ static MACHINE_CONFIG_START( macrossp, macrossp_state )
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, 16000000)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("ensoniq.0")
|
||||
MCFG_ES5506_REGION1("ensoniq.1")
|
||||
MCFG_ES5506_REGION2("ensoniq.2")
|
||||
MCFG_ES5506_REGION3("ensoniq.3")
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_ES5506_IRQ_CB(WRITELINE(macrossp_state, irqhandler))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.1)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.1)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -2484,15 +2484,6 @@ GFXDECODE_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static const es5506_interface es5506_config =
|
||||
{
|
||||
"ensoniq.0",
|
||||
"ensoniq.1",
|
||||
"ensoniq.2",
|
||||
"ensoniq.3",
|
||||
1 /* channels */
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Some games (e.g. hypreac2) oddly map the high bits of the tile code
|
||||
@ -2601,7 +2592,11 @@ static MACHINE_CONFIG_START( ssv, ssv_state )
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, SSV_MASTER_CLOCK)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("ensoniq.0")
|
||||
MCFG_ES5506_REGION1("ensoniq.1")
|
||||
MCFG_ES5506_REGION2("ensoniq.2")
|
||||
MCFG_ES5506_REGION3("ensoniq.3")
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.1)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.1)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -607,15 +607,6 @@ static const hd63450_interface dmac_interface =
|
||||
{attotime::from_usec(32),attotime::from_nsec(450),attotime::from_nsec(50),attotime::from_nsec(50)}, // Burst mode timing (guesstimate)
|
||||
};
|
||||
|
||||
static const es5505_interface es5505_config =
|
||||
{
|
||||
"waverom", /* Bank 0 */
|
||||
"waverom2", /* Bank 1 */
|
||||
4, /* channels */
|
||||
DEVCB_DRIVER_LINE_MEMBER(esq5505_state, esq5505_otis_irq), /* irq */
|
||||
DEVCB_DRIVER_MEMBER16(esq5505_state, analog_r) /* ADC */
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( vfx, esq5505_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(vfx_map)
|
||||
@ -647,7 +638,11 @@ static MACHINE_CONFIG_START( vfx, esq5505_state )
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
MCFG_SOUND_ADD("otis", ES5505, XTAL_10MHz)
|
||||
MCFG_SOUND_CONFIG(es5505_config)
|
||||
MCFG_ES5505_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5505_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5505_CHANNELS(4) /* channels */
|
||||
MCFG_ES5505_IRQ_CB(WRITELINE(esq5505_state, esq5505_otis_irq)) /* irq */
|
||||
MCFG_ES5505_READ_PORT_CB(READ16(esq5505_state, analog_r)) /* ADC */
|
||||
MCFG_SOUND_ROUTE_EX(0, "pump", 1.0, 0)
|
||||
MCFG_SOUND_ROUTE_EX(1, "pump", 1.0, 1)
|
||||
MCFG_SOUND_ROUTE_EX(2, "pump", 1.0, 2)
|
||||
@ -718,7 +713,11 @@ static MACHINE_CONFIG_START(vfx32, esq5505_state)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
MCFG_SOUND_ADD("otis", ES5505, XTAL_30_4761MHz / 2)
|
||||
MCFG_SOUND_CONFIG(es5505_config)
|
||||
MCFG_ES5505_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5505_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5505_CHANNELS(4) /* channels */
|
||||
MCFG_ES5505_IRQ_CB(WRITELINE(esq5505_state, esq5505_otis_irq)) /* irq */
|
||||
MCFG_ES5505_READ_PORT_CB(READ16(esq5505_state, analog_r)) /* ADC */
|
||||
MCFG_SOUND_ROUTE_EX(0, "pump", 1.0, 0)
|
||||
MCFG_SOUND_ROUTE_EX(1, "pump", 1.0, 1)
|
||||
MCFG_SOUND_ROUTE_EX(2, "pump", 1.0, 2)
|
||||
|
@ -88,17 +88,6 @@ READ16_MEMBER(esqasr_state::esq5506_read_adc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const es5506_interface es5506_config =
|
||||
{
|
||||
"waverom", /* Bank 0 */
|
||||
"waverom2", /* Bank 1 */
|
||||
"waverom3", /* Bank 0 */
|
||||
"waverom4", /* Bank 1 */
|
||||
1, /* channels */
|
||||
DEVCB_DRIVER_LINE_MEMBER(esqasr_state,esq5506_otto_irq), /* irq */
|
||||
DEVCB_DRIVER_MEMBER16(esqasr_state, esq5506_read_adc)
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( asr, esqasr_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) // actually MC68302
|
||||
MCFG_CPU_PROGRAM_MAP(asr_map)
|
||||
@ -110,7 +99,13 @@ static MACHINE_CONFIG_START( asr, esqasr_state )
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, XTAL_16MHz)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5506_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5506_REGION2("waverom3") /* Bank 0 */
|
||||
MCFG_ES5506_REGION3("waverom4") /* Bank 1 */
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_ES5506_IRQ_CB(WRITELINE(esqasr_state, esq5506_otto_irq)) /* irq */
|
||||
MCFG_ES5506_READ_PORT_CB(READ16(esqasr_state, esq5506_read_adc))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 2.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 2.0)
|
||||
MACHINE_CONFIG_END
|
||||
@ -126,7 +121,13 @@ static MACHINE_CONFIG_START( asrx, esqasr_state )
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, XTAL_16MHz)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5506_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5506_REGION2("waverom3") /* Bank 0 */
|
||||
MCFG_ES5506_REGION3("waverom4") /* Bank 1 */
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_ES5506_IRQ_CB(WRITELINE(esqasr_state, esq5506_otto_irq)) /* irq */
|
||||
MCFG_ES5506_READ_PORT_CB(READ16(esqasr_state, esq5506_read_adc))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 2.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 2.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -198,28 +198,6 @@ WRITE_LINE_MEMBER(esqkt_state::duart_tx_b)
|
||||
m_sq1panel->rx_w(state);
|
||||
}
|
||||
|
||||
static const es5506_interface es5506_config =
|
||||
{
|
||||
"waverom", /* Bank 0 */
|
||||
"waverom2", /* Bank 1 */
|
||||
"waverom3", /* Bank 0 */
|
||||
"waverom4", /* Bank 1 */
|
||||
1, /* channels */
|
||||
DEVCB_DRIVER_LINE_MEMBER(esqkt_state,esq5506_otto_irq), /* irq */
|
||||
DEVCB_DRIVER_MEMBER16(esqkt_state, esq5506_read_adc)
|
||||
};
|
||||
|
||||
static const es5506_interface es5506_2_config =
|
||||
{
|
||||
"waverom", /* Bank 0 */
|
||||
"waverom2", /* Bank 1 */
|
||||
"waverom3", /* Bank 0 */
|
||||
"waverom4", /* Bank 1 */
|
||||
1, /* channels */
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( kt, esqkt_state )
|
||||
MCFG_CPU_ADD("maincpu", M68EC020, XTAL_16MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(kt_map)
|
||||
@ -245,11 +223,21 @@ static MACHINE_CONFIG_START( kt, esqkt_state )
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, XTAL_16MHz)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5506_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5506_REGION2("waverom3") /* Bank 0 */
|
||||
MCFG_ES5506_REGION3("waverom4") /* Bank 1 */
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_ES5506_IRQ_CB(WRITELINE(esqkt_state, esq5506_otto_irq)) /* irq */
|
||||
MCFG_ES5506_READ_PORT_CB(READ16(esqkt_state, esq5506_read_adc))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
|
||||
MCFG_SOUND_ADD("ensoniq2", ES5506, XTAL_16MHz)
|
||||
MCFG_SOUND_CONFIG(es5506_2_config)
|
||||
MCFG_ES5506_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5506_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5506_REGION2("waverom3") /* Bank 0 */
|
||||
MCFG_ES5506_REGION3("waverom4") /* Bank 1 */
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -243,28 +243,6 @@ READ16_MEMBER(esqmr_state::esq5506_read_adc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const es5506_interface es5506_config =
|
||||
{
|
||||
"waverom", /* Bank 0 */
|
||||
"waverom2", /* Bank 1 */
|
||||
"waverom3", /* Bank 0 */
|
||||
"waverom4", /* Bank 1 */
|
||||
1, /* channels */
|
||||
DEVCB_DRIVER_LINE_MEMBER(esqmr_state,esq5506_otto_irq), /* irq */
|
||||
DEVCB_DRIVER_MEMBER16(esqmr_state, esq5506_read_adc)
|
||||
};
|
||||
|
||||
static const es5506_interface es5506_2_config =
|
||||
{
|
||||
"waverom", /* Bank 0 */
|
||||
"waverom2", /* Bank 1 */
|
||||
"waverom3", /* Bank 0 */
|
||||
"waverom4", /* Bank 1 */
|
||||
1, /* channels */
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( mr, esqmr_state )
|
||||
MCFG_CPU_ADD("maincpu", M68340, XTAL_16MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(mr_map)
|
||||
@ -273,11 +251,21 @@ static MACHINE_CONFIG_START( mr, esqmr_state )
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, XTAL_16MHz)
|
||||
MCFG_SOUND_CONFIG(es5506_config)
|
||||
MCFG_ES5506_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5506_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5506_REGION2("waverom3") /* Bank 0 */
|
||||
MCFG_ES5506_REGION3("waverom4") /* Bank 1 */
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_ES5506_IRQ_CB(WRITELINE(esqmr_state, esq5506_otto_irq)) /* irq */
|
||||
MCFG_ES5506_READ_PORT_CB(READ16(esqmr_state, esq5506_read_adc))
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
|
||||
MCFG_SOUND_ADD("ensoniq2", ES5506, XTAL_16MHz)
|
||||
MCFG_SOUND_CONFIG(es5506_2_config)
|
||||
MCFG_ES5506_REGION0("waverom") /* Bank 0 */
|
||||
MCFG_ES5506_REGION1("waverom2") /* Bank 1 */
|
||||
MCFG_ES5506_REGION2("waverom3") /* Bank 0 */
|
||||
MCFG_ES5506_REGION3("waverom4") /* Bank 1 */
|
||||
MCFG_ES5506_CHANNELS(1) /* channels */
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 0.5)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 0.5)
|
||||
MACHINE_CONFIG_END
|
||||
|
Loading…
Reference in New Issue
Block a user