mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
modernised the YM3526, which also required adding write lines to the 6502, 6809 and z80 [smf]
This commit is contained in:
parent
cd3930106c
commit
7bafec4fbf
@ -721,4 +721,9 @@ UINT8 m6502_device::mi_default_nd::read_decrypted(UINT16 adr)
|
||||
return read(adr);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( m6502_device::irq_line )
|
||||
{
|
||||
set_input_line( M6502_IRQ_LINE, state );
|
||||
}
|
||||
|
||||
#include "cpu/m6502/m6502.inc"
|
||||
|
@ -55,6 +55,8 @@ public:
|
||||
m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
m6502_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);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( irq_line );
|
||||
|
||||
UINT64 get_cycle();
|
||||
bool get_sync() const { return sync; }
|
||||
void disable_direct() { direct_disabled = true; }
|
||||
|
@ -577,3 +577,13 @@ m6809e_device::m6809e_device(const machine_config &mconfig, const char *tag, dev
|
||||
: m6809_base_device(mconfig, "M6809E", tag, owner, clock, M6809E, 4)
|
||||
{
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( m6809_base_device::irq_line )
|
||||
{
|
||||
set_input_line( M6809_IRQ_LINE, state );
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( m6809_base_device::firq_line )
|
||||
{
|
||||
set_input_line( M6809_FIRQ_LINE, state );
|
||||
}
|
||||
|
@ -51,6 +51,9 @@ public:
|
||||
// inline configuration helpers
|
||||
static void static_set_config(device_t &device, const m6809_config &config);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( irq_line );
|
||||
DECLARE_WRITE_LINE_MEMBER( firq_line );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
@ -3926,5 +3926,26 @@ CPU_GET_INFO( nsc800 )
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_LEGACY_CPU_DEVICE(Z80, z80);
|
||||
DEFINE_LEGACY_CPU_DEVICE(NSC800, nsc800);
|
||||
z80_device::z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, cpu_get_info_func info)
|
||||
: legacy_cpu_device(mconfig, type, tag, owner, clock, info)
|
||||
{
|
||||
}
|
||||
|
||||
z80_device::z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
|
||||
: legacy_cpu_device(mconfig, type, tag, owner, clock, CPU_GET_INFO_NAME(z80))
|
||||
{
|
||||
}
|
||||
|
||||
const device_type Z80 = &legacy_device_creator<z80_device>;
|
||||
|
||||
nsc800_device::nsc800_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
|
||||
: z80_device(mconfig, type, tag, owner, clock, CPU_GET_INFO_NAME(nsc800))
|
||||
{
|
||||
}
|
||||
|
||||
const device_type NSC800 = &legacy_device_creator<nsc800_device>;
|
||||
|
||||
WRITE_LINE_MEMBER( z80_device::irq_line )
|
||||
{
|
||||
set_input_line( INPUT_LINE_IRQ0, state );
|
||||
}
|
||||
|
@ -26,9 +26,29 @@ enum
|
||||
Z80_GENPCBASE = STATE_GENPCBASE
|
||||
};
|
||||
|
||||
DECLARE_LEGACY_CPU_DEVICE(Z80, z80);
|
||||
DECLARE_LEGACY_CPU_DEVICE(NSC800, nsc800);
|
||||
class z80_device : public legacy_cpu_device
|
||||
{
|
||||
public:
|
||||
z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( irq_line );
|
||||
|
||||
protected:
|
||||
z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock, cpu_get_info_func info);
|
||||
};
|
||||
|
||||
extern const device_type Z80;
|
||||
|
||||
class nsc800_device : public z80_device
|
||||
{
|
||||
public:
|
||||
nsc800_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
extern const device_type NSC800;
|
||||
|
||||
CPU_GET_INFO( z80 );
|
||||
CPU_GET_INFO( nsc800 );
|
||||
CPU_DISASSEMBLE( z80 );
|
||||
|
||||
void z80_set_cycle_tables(device_t *device, const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex);
|
||||
|
@ -22,135 +22,143 @@
|
||||
#include "sound/fmopl.h"
|
||||
|
||||
|
||||
struct ym3526_state
|
||||
{
|
||||
sound_stream * stream;
|
||||
emu_timer * timer[2];
|
||||
void * chip;
|
||||
const ym3526_interface *intf;
|
||||
device_t *device;
|
||||
|
||||
devcb_resolved_write_line out_int_func;
|
||||
};
|
||||
|
||||
|
||||
INLINE ym3526_state *get_safe_token(device_t *device)
|
||||
{
|
||||
assert(device != NULL);
|
||||
assert(device->type() == YM3526);
|
||||
return (ym3526_state *)downcast<ym3526_device *>(device)->token();
|
||||
}
|
||||
|
||||
|
||||
/* IRQ Handler */
|
||||
static void IRQHandler(void *param,int irq)
|
||||
{
|
||||
ym3526_state *info = (ym3526_state *)param;
|
||||
info->out_int_func(irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
ym3526_device *ym3526 = (ym3526_device *) param;
|
||||
ym3526->_IRQHandler(irq);
|
||||
}
|
||||
|
||||
void ym3526_device::_IRQHandler(int irq)
|
||||
{
|
||||
if (!m_irq_handler.isnull())
|
||||
m_irq_handler(irq);
|
||||
}
|
||||
|
||||
/* Timer overflow callback from timer.c */
|
||||
static TIMER_CALLBACK( timer_callback_0 )
|
||||
void ym3526_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
ym3526_state *info = (ym3526_state *)ptr;
|
||||
ym3526_timer_over(info->chip,0);
|
||||
switch(id)
|
||||
{
|
||||
case 0:
|
||||
ym3526_timer_over(m_chip,0);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ym3526_timer_over(m_chip,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
static TIMER_CALLBACK( timer_callback_1 )
|
||||
|
||||
static void timer_handler(void *param,int c,attotime period)
|
||||
{
|
||||
ym3526_state *info = (ym3526_state *)ptr;
|
||||
ym3526_timer_over(info->chip,1);
|
||||
ym3526_device *ym3526 = (ym3526_device *) param;
|
||||
ym3526->_timer_handler(c, period);
|
||||
}
|
||||
/* TimerHandler from fm.c */
|
||||
static void TimerHandler(void *param,int c,attotime period)
|
||||
|
||||
void ym3526_device::_timer_handler(int c,attotime period)
|
||||
{
|
||||
ym3526_state *info = (ym3526_state *)param;
|
||||
if( period == attotime::zero )
|
||||
{ /* Reset FM Timer */
|
||||
info->timer[c]->enable(false);
|
||||
m_timer[c]->enable(false);
|
||||
}
|
||||
else
|
||||
{ /* Start FM Timer */
|
||||
info->timer[c]->adjust(period);
|
||||
m_timer[c]->adjust(period);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static STREAM_UPDATE( ym3526_stream_update )
|
||||
/* update request from fm.c */
|
||||
void ym3526_update_request(void *param, int interval)
|
||||
{
|
||||
ym3526_state *info = (ym3526_state *)param;
|
||||
ym3526_update_one(info->chip, outputs[0], samples);
|
||||
ym3526_device *ym3526 = (ym3526_device *) param;
|
||||
ym3526->_ym3526_update_request();
|
||||
}
|
||||
|
||||
static void _stream_update(void *param, int interval)
|
||||
void ym3526_device::_ym3526_update_request()
|
||||
{
|
||||
ym3526_state *info = (ym3526_state *)param;
|
||||
info->stream->update();
|
||||
m_stream->update();
|
||||
}
|
||||
|
||||
|
||||
static DEVICE_START( ym3526 )
|
||||
{
|
||||
static const ym3526_interface dummy = { DEVCB_NULL };
|
||||
ym3526_state *info = get_safe_token(device);
|
||||
int rate = device->clock()/72;
|
||||
|
||||
info->intf = device->static_config() ? (const ym3526_interface *)device->static_config() : &dummy;
|
||||
info->device = device;
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
{
|
||||
ym3526_update_one(m_chip, outputs[0], samples);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::device_start()
|
||||
{
|
||||
int rate = clock()/72;
|
||||
|
||||
// resolve callbacks
|
||||
info->out_int_func.resolve(info->intf->out_int_func, *device);
|
||||
m_irq_handler.resolve();
|
||||
|
||||
/* stream system initialize */
|
||||
info->chip = ym3526_init(device,device->clock(),rate);
|
||||
assert_always(info->chip != NULL, "Error creating YM3526 chip");
|
||||
m_chip = ym3526_init(this,clock(),rate);
|
||||
assert_always(m_chip != NULL, "Error creating YM3526 chip");
|
||||
|
||||
info->stream = device->machine().sound().stream_alloc(*device,0,1,rate,info,ym3526_stream_update);
|
||||
m_stream = machine().sound().stream_alloc(*this,0,1,rate);
|
||||
/* YM3526 setup */
|
||||
ym3526_set_timer_handler (info->chip, TimerHandler, info);
|
||||
ym3526_set_irq_handler (info->chip, IRQHandler, info);
|
||||
ym3526_set_update_handler(info->chip, _stream_update, info);
|
||||
ym3526_set_timer_handler (m_chip, timer_handler, this);
|
||||
ym3526_set_irq_handler (m_chip, IRQHandler, this);
|
||||
ym3526_set_update_handler(m_chip, ym3526_update_request, this);
|
||||
|
||||
info->timer[0] = device->machine().scheduler().timer_alloc(FUNC(timer_callback_0), info);
|
||||
info->timer[1] = device->machine().scheduler().timer_alloc(FUNC(timer_callback_1), info);
|
||||
m_timer[0] = timer_alloc(0);
|
||||
m_timer[1] = timer_alloc(1);
|
||||
}
|
||||
|
||||
static DEVICE_STOP( ym3526 )
|
||||
//-------------------------------------------------
|
||||
// device_stop - device-specific stop
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::device_stop()
|
||||
{
|
||||
ym3526_state *info = get_safe_token(device);
|
||||
ym3526_shutdown(info->chip);
|
||||
ym3526_shutdown(m_chip);
|
||||
}
|
||||
|
||||
static DEVICE_RESET( ym3526 )
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::device_reset()
|
||||
{
|
||||
ym3526_state *info = get_safe_token(device);
|
||||
ym3526_reset_chip(info->chip);
|
||||
ym3526_reset_chip(m_chip);
|
||||
}
|
||||
|
||||
|
||||
READ8_DEVICE_HANDLER( ym3526_r )
|
||||
READ8_MEMBER( ym3526_device::read )
|
||||
{
|
||||
ym3526_state *info = get_safe_token(device);
|
||||
return ym3526_read(info->chip, offset & 1);
|
||||
return ym3526_read(m_chip, offset & 1);
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( ym3526_w )
|
||||
WRITE8_MEMBER( ym3526_device::write )
|
||||
{
|
||||
ym3526_state *info = get_safe_token(device);
|
||||
ym3526_write(info->chip, offset & 1, data);
|
||||
ym3526_write(m_chip, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_DEVICE_HANDLER( ym3526_status_port_r ) { return ym3526_r(device, space, 0); }
|
||||
READ8_DEVICE_HANDLER( ym3526_read_port_r ) { return ym3526_r(device, space, 1); }
|
||||
WRITE8_DEVICE_HANDLER( ym3526_control_port_w ) { ym3526_w(device, space, 0, data); }
|
||||
WRITE8_DEVICE_HANDLER( ym3526_write_port_w ) { ym3526_w(device, space, 1, data); }
|
||||
READ8_MEMBER( ym3526_device::status_port_r ) { return read(space, 0); }
|
||||
READ8_MEMBER( ym3526_device::read_port_r ) { return read(space, 1); }
|
||||
WRITE8_MEMBER( ym3526_device::control_port_w ) { write(space, 0, data); }
|
||||
WRITE8_MEMBER( ym3526_device::write_port_w ) { write(space, 1, data); }
|
||||
|
||||
|
||||
const device_type YM3526 = &device_creator<ym3526_device>;
|
||||
|
||||
ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, YM3526, "YM3526", tag, owner, clock),
|
||||
device_sound_interface(mconfig, *this)
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_irq_handler(*this)
|
||||
{
|
||||
m_token = global_alloc_clear(ym3526_state);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -162,40 +170,3 @@ ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, dev
|
||||
void ym3526_device::device_config_complete()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::device_start()
|
||||
{
|
||||
DEVICE_START_NAME( ym3526 )(this);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::device_reset()
|
||||
{
|
||||
DEVICE_RESET_NAME( ym3526 )(this);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_stop - device-specific stop
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::device_stop()
|
||||
{
|
||||
DEVICE_STOP_NAME( ym3526 )(this);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void ym3526_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
{
|
||||
// should never get here
|
||||
fatalerror("sound_stream_update called; not applicable to legacy sound devices\n");
|
||||
}
|
||||
|
@ -3,30 +3,32 @@
|
||||
#ifndef __3526INTF_H__
|
||||
#define __3526INTF_H__
|
||||
|
||||
#include "devlegcy.h"
|
||||
#include "emu.h"
|
||||
|
||||
struct ym3526_interface
|
||||
{
|
||||
devcb_write_line out_int_func;
|
||||
};
|
||||
|
||||
DECLARE_READ8_DEVICE_HANDLER( ym3526_r );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( ym3526_w );
|
||||
|
||||
DECLARE_READ8_DEVICE_HANDLER( ym3526_status_port_r );
|
||||
DECLARE_READ8_DEVICE_HANDLER( ym3526_read_port_r );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( ym3526_control_port_w );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( ym3526_write_port_w );
|
||||
#define MCFG_YM3526_IRQ_HANDLER(_devcb) \
|
||||
devcb = &ym3526_device::set_irq_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
class ym3526_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~ym3526_device() { global_free(m_token); }
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb2_base &set_irq_handler(device_t &device, _Object object) { return downcast<ym3526_device &>(device).m_irq_handler.set_callback(object); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
DECLARE_READ8_MEMBER( status_port_r );
|
||||
DECLARE_READ8_MEMBER( read_port_r );
|
||||
DECLARE_WRITE8_MEMBER( control_port_w );
|
||||
DECLARE_WRITE8_MEMBER( write_port_w );
|
||||
|
||||
void _IRQHandler(int irq);
|
||||
void _timer_handler(int c,attotime period);
|
||||
void _ym3526_update_request();
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -34,11 +36,17 @@ protected:
|
||||
virtual void device_stop();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
sound_stream * m_stream;
|
||||
emu_timer * m_timer[2];
|
||||
void * m_chip;
|
||||
devcb2_write_line m_irq_handler;
|
||||
};
|
||||
|
||||
extern const device_type YM3526;
|
||||
|
@ -102,7 +102,7 @@ static ADDRESS_MAP_START( battlane_map, AS_PROGRAM, 8, battlane_state )
|
||||
AM_RANGE(0x1c01, 0x1c01) AM_READ_PORT("P2") AM_WRITE(battlane_scrollx_w)
|
||||
AM_RANGE(0x1c02, 0x1c02) AM_READ_PORT("DSW1") AM_WRITE(battlane_scrolly_w)
|
||||
AM_RANGE(0x1c03, 0x1c03) AM_READ_PORT("DSW2") AM_WRITE(battlane_cpu_command_w)
|
||||
AM_RANGE(0x1c04, 0x1c05) AM_DEVREADWRITE_LEGACY("ymsnd", ym3526_r, ym3526_w)
|
||||
AM_RANGE(0x1c04, 0x1c05) AM_DEVREADWRITE("ymsnd", ym3526_device, read, write)
|
||||
AM_RANGE(0x1e00, 0x1e3f) AM_WRITE(battlane_palette_w)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM_WRITE(battlane_bitmap_w) AM_SHARE("share4")
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
@ -246,18 +246,6 @@ static GFXDECODE_START( battlane )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sound interface
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("maincpu", M6809_FIRQ_LINE)
|
||||
};
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Machine driver
|
||||
@ -305,7 +293,7 @@ static MACHINE_CONFIG_START( battlane, battlane_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("maincpu", m6809_device, firq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -147,7 +147,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, brkthru_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
@ -342,18 +342,6 @@ static GFXDECODE_START( brkthru )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Sound interface
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", M6809_IRQ_LINE)
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -412,7 +400,7 @@ static MACHINE_CONFIG_START( brkthru, brkthru_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.50)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, MASTER_CLOCK/4)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6809_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -459,7 +447,7 @@ static MACHINE_CONFIG_START( darwin, brkthru_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.50)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, MASTER_CLOCK/4)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6809_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -307,7 +307,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bublbobl_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x8fff) AM_RAM
|
||||
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
|
||||
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w)
|
||||
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym2", ym3526_device, read, write)
|
||||
AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITE(bublbobl_sound_status_w)
|
||||
AM_RANGE(0xb001, 0xb001) AM_WRITE(bublbobl_sh_nmi_enable_w) AM_READNOP
|
||||
AM_RANGE(0xb002, 0xb002) AM_WRITE(bublbobl_sh_nmi_disable_w)
|
||||
|
@ -173,7 +173,7 @@ READ8_MEMBER(cop01_state::kludge)
|
||||
|
||||
static ADDRESS_MAP_START( mightguy_audio_io_map, AS_IO, 8, cop01_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w)
|
||||
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ymsnd", ym3526_device, write)
|
||||
AM_RANGE(0x02, 0x02) AM_WRITENOP /* 1412M2? */
|
||||
AM_RANGE(0x03, 0x03) AM_WRITENOP /* 1412M2? */
|
||||
AM_RANGE(0x03, 0x03) AM_READ(kludge) /* 1412M2? */
|
||||
|
@ -855,7 +855,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( oscar_s_map, AS_PROGRAM, 8, dec8_state )
|
||||
AM_RANGE(0x0000, 0x05ff) AM_RAM
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ym1", ym2203_device, write)
|
||||
AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
|
||||
AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -864,7 +864,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( ym3526_s_map, AS_PROGRAM, 8, dec8_state )
|
||||
AM_RANGE(0x0000, 0x05ff) AM_RAM
|
||||
AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -873,7 +873,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( csilver_s_map, AS_PROGRAM, 8, dec8_state )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM
|
||||
AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ym1", ym2203_device, write)
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0x1800, 0x1800) AM_WRITE(csilver_adpcm_data_w) /* ADPCM data for the MSM5205 chip */
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(csilver_sound_bank_w)
|
||||
AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
|
||||
@ -1908,11 +1908,6 @@ WRITE_LINE_MEMBER(dec8_state::irqhandler)
|
||||
m_audiocpu->set_input_line(0, state); /* M6502_IRQ_LINE */
|
||||
}
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", M6502_IRQ_LINE)
|
||||
};
|
||||
|
||||
static const ym3812_interface ym3812_config =
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(dec8_state,irqhandler)
|
||||
@ -2045,7 +2040,7 @@ static MACHINE_CONFIG_START( lastmisn, dec8_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -2094,7 +2089,7 @@ static MACHINE_CONFIG_START( shackled, dec8_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -2143,7 +2138,7 @@ static MACHINE_CONFIG_START( gondo, dec8_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -2192,7 +2187,7 @@ static MACHINE_CONFIG_START( garyoret, dec8_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -2294,7 +2289,7 @@ static MACHINE_CONFIG_START( csilver, dec8_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
|
||||
MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz) /* verified on pcb */
|
||||
@ -2350,7 +2345,7 @@ static MACHINE_CONFIG_START( oscar, dec8_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.20)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -270,7 +270,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, exprraid_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
|
||||
AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w)
|
||||
AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ym2", ym3526_device, read, write)
|
||||
AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -439,11 +439,6 @@ WRITE_LINE_MEMBER(exprraid_state::irqhandler)
|
||||
m_slave->set_input_line_and_vector(0, state, 0xff);
|
||||
}
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(exprraid_state,irqhandler)
|
||||
};
|
||||
|
||||
#if 0
|
||||
INTERRUPT_GEN_MEMBER(exprraid_state::exprraid_interrupt)
|
||||
{
|
||||
@ -509,7 +504,7 @@ static MACHINE_CONFIG_START( exprraid, exprraid_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3600000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(exprraid_state, irqhandler))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -411,7 +411,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( wheelrun_sound_map, AS_PROGRAM, 8, fantland_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM
|
||||
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3526_r, ym3526_w )
|
||||
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ymsnd", ym3526_device, read, write)
|
||||
|
||||
AM_RANGE(0xb000, 0xb000) AM_WRITENOP // on a car crash / hit
|
||||
AM_RANGE(0xc000, 0xc000) AM_WRITENOP // ""
|
||||
@ -1015,11 +1015,6 @@ static MACHINE_CONFIG_START( borntofi, fantland_state )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static const ym3526_interface wheelrun_ym3526_interface =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", INPUT_LINE_IRQ0)
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( wheelrun, fantland_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -1049,7 +1044,7 @@ static MACHINE_CONFIG_START( wheelrun, fantland_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_14MHz/4)
|
||||
MCFG_SOUND_CONFIG(wheelrun_ym3526_interface)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", z80_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -394,7 +394,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, firetrap_state )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w)
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ymsnd", ym3526_device, write)
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(firetrap_adpcm_data_w) /* ADPCM data for the MSM5205 chip */
|
||||
AM_RANGE(0x2400, 0x2400) AM_WRITE(firetrap_sound_2400_w)
|
||||
AM_RANGE(0x2800, 0x2800) AM_WRITE(firetrap_sound_bankselect_w)
|
||||
|
@ -113,7 +113,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, galivan_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w)
|
||||
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ymsnd", ym3526_device, write)
|
||||
AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_device, write_unsigned8)
|
||||
AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_device, write_unsigned8)
|
||||
AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r)
|
||||
|
@ -434,7 +434,7 @@ static ADDRESS_MAP_START( karnov_sound_map, AS_PROGRAM, 8, karnov_state )
|
||||
AM_RANGE(0x0000, 0x05ff) AM_RAM
|
||||
AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ym1", ym2203_device, write)
|
||||
AM_RANGE(0x1800, 0x1801) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
|
||||
AM_RANGE(0x1800, 0x1801) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -745,11 +745,6 @@ INTERRUPT_GEN_MEMBER(karnov_state::karnov_interrupt)
|
||||
device.execute().set_input_line(7, HOLD_LINE); /* VBL */
|
||||
}
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", M6502_IRQ_LINE)
|
||||
};
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Machine driver
|
||||
@ -823,7 +818,7 @@ static MACHINE_CONFIG_START( karnov, karnov_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -864,7 +859,7 @@ static MACHINE_CONFIG_START( wndrplnt, karnov_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -111,7 +111,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( maniach_sound_map, AS_PROGRAM, 8, matmania_state )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w)
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ymsnd", ym3526_device, write)
|
||||
AM_RANGE(0x2002, 0x2002) AM_DEVWRITE("dac", dac_device, write_signed8)
|
||||
AM_RANGE(0x2004, 0x2004) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
@ -341,12 +341,6 @@ static MACHINE_CONFIG_START( matmania, matmania_state )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", M6809_FIRQ_LINE)
|
||||
};
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(matmania_state,maniach)
|
||||
{
|
||||
MACHINE_START_CALL_MEMBER(matmania);
|
||||
@ -418,7 +412,7 @@ static MACHINE_CONFIG_START( maniach, matmania_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM3526, 3600000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6809_device, firq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
|
||||
MCFG_DAC_ADD("dac")
|
||||
|
@ -69,7 +69,7 @@ static ADDRESS_MAP_START( metlclsh_master_map, AS_PROGRAM, 8, metlclsh_state )
|
||||
/**/AM_RANGE(0xcc00, 0xcc2f) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
|
||||
AM_RANGE(0xd000, 0xd001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
|
||||
/**/AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(metlclsh_fgram_w) AM_SHARE("fgram")
|
||||
AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym2", ym3526_w )
|
||||
AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0xe800, 0xe9ff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0xfff0, 0xffff) AM_ROM // Reset/IRQ vectors
|
||||
ADDRESS_MAP_END
|
||||
@ -254,12 +254,6 @@ GFXDECODE_END
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
|
||||
};
|
||||
|
||||
|
||||
void metlclsh_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_write_mask));
|
||||
@ -308,7 +302,7 @@ static MACHINE_CONFIG_START( metlclsh, metlclsh_state )
|
||||
MCFG_SOUND_ROUTE(3, "mono", 0.50)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("maincpu", m6809_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -207,7 +207,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, missb2_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x8fff) AM_RAM
|
||||
AM_RANGE(0x9000, 0x9000) AM_DEVREADWRITE("oki", okim6295_device, read, write)
|
||||
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3526_r, ym3526_w)
|
||||
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ymsnd", ym3526_device, read, write)
|
||||
AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITENOP // message for main cpu
|
||||
AM_RANGE(0xb001, 0xb001) AM_READNOP AM_WRITE(bublbobl_sh_nmi_enable_w) // bit 0: message pending for main cpu, bit 1: message pending for sound cpu
|
||||
AM_RANGE(0xb002, 0xb002) AM_WRITE(bublbobl_sh_nmi_disable_w)
|
||||
@ -422,11 +422,6 @@ WRITE_LINE_MEMBER(missb2_state::irqhandler)
|
||||
// m_audiocpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(missb2_state,irqhandler)
|
||||
};
|
||||
|
||||
/* Interrupt Generator */
|
||||
|
||||
INTERRUPT_GEN_MEMBER(missb2_state::missb2_interrupt)
|
||||
@ -487,7 +482,7 @@ static MACHINE_CONFIG_START( missb2, missb2_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM3526, MAIN_XTAL/8)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(missb2_state, irqhandler))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
|
||||
|
||||
MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
|
||||
|
@ -705,7 +705,7 @@ static ADDRESS_MAP_START( renegade_sound_map, AS_PROGRAM, 8, renegade_state )
|
||||
AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x1800, 0x1800) AM_WRITENOP // this gets written the same values as 0x2000
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(adpcm_play_w)
|
||||
AM_RANGE(0x2800, 0x2801) AM_DEVREADWRITE_LEGACY("ymsnd", ym3526_r,ym3526_w)
|
||||
AM_RANGE(0x2800, 0x2801) AM_DEVREADWRITE("ymsnd", ym3526_device, read, write)
|
||||
AM_RANGE(0x3000, 0x3000) AM_WRITENOP /* adpcm related? stereo pan? */
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -915,12 +915,6 @@ static GFXDECODE_START( renegade )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", M6809_FIRQ_LINE)
|
||||
};
|
||||
|
||||
|
||||
void renegade_state::machine_reset()
|
||||
{
|
||||
m_bank = 0;
|
||||
@ -958,7 +952,7 @@ static MACHINE_CONFIG_START( renegade, renegade_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM3526, 12000000/4)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6809_device, firq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
|
||||
MCFG_SOUND_ADD("adpcm", RENEGADE_ADPCM, 8000)
|
||||
|
@ -246,7 +246,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, sidepckt_state )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x1001) AM_DEVWRITE("ym1", ym2203_device, write)
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ym2", ym3526_device, write)
|
||||
AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -378,12 +378,6 @@ static GFXDECODE_START( sidepckt )
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
static const ym3526_interface ym3526_config =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", M6502_IRQ_LINE)
|
||||
};
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( sidepckt, sidepckt_state )
|
||||
|
||||
@ -415,7 +409,7 @@ static MACHINE_CONFIG_START( sidepckt, sidepckt_state )
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, 3000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", m6502_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -468,16 +468,6 @@ WRITE_LINE_MEMBER(snk_state::ymirq_callback_2)
|
||||
}
|
||||
|
||||
|
||||
static const ym3526_interface ym3526_config_1 =
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(snk_state,ymirq_callback_1)
|
||||
};
|
||||
|
||||
static const ym3526_interface ym3526_config_2 =
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(snk_state,ymirq_callback_2)
|
||||
};
|
||||
|
||||
static const ym3812_interface ym3812_config_1 =
|
||||
{
|
||||
DEVCB_DRIVER_LINE_MEMBER(snk_state,ymirq_callback_1)
|
||||
@ -1430,7 +1420,7 @@ static ADDRESS_MAP_START( tnk3_YM3526_sound_map, AS_PROGRAM, 8, snk_state )
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0xc000, 0xc000) AM_READ(tnk3_busy_clear_r)
|
||||
AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ym1", ym3526_r, ym3526_w)
|
||||
AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE("ym1", ym3526_device, read, write)
|
||||
AM_RANGE(0xe004, 0xe004) AM_READ(tnk3_cmdirq_ack_r)
|
||||
AM_RANGE(0xe006, 0xe006) AM_READ(tnk3_ymirq_ack_r)
|
||||
ADDRESS_MAP_END
|
||||
@ -1440,7 +1430,7 @@ static ADDRESS_MAP_START( aso_YM3526_sound_map, AS_PROGRAM, 8, snk_state )
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
||||
AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(tnk3_busy_clear_r)
|
||||
AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym3526_r, ym3526_w)
|
||||
AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ym1", ym3526_device, read, write)
|
||||
// AM_RANGE(0xf002, 0xf002) AM_READNOP unknown
|
||||
AM_RANGE(0xf004, 0xf004) AM_READ(tnk3_cmdirq_ack_r)
|
||||
AM_RANGE(0xf006, 0xf006) AM_READ(tnk3_ymirq_ack_r)
|
||||
@ -1450,10 +1440,10 @@ static ADDRESS_MAP_START( YM3526_YM3526_sound_map, AS_PROGRAM, 8, snk_state )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ym1", ym3526_status_port_r, ym3526_control_port_w)
|
||||
AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ym1", ym3526_write_port_w)
|
||||
AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE_LEGACY("ym2", ym3526_status_port_r, ym3526_control_port_w)
|
||||
AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("ym2", ym3526_write_port_w)
|
||||
AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE("ym1", ym3526_device, status_port_r, control_port_w)
|
||||
AM_RANGE(0xec00, 0xec00) AM_DEVWRITE("ym1", ym3526_device, write_port_w)
|
||||
AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE("ym2", ym3526_device, status_port_r, control_port_w)
|
||||
AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("ym2", ym3526_device, write_port_w)
|
||||
AM_RANGE(0xf800, 0xf800) AM_READWRITE(snk_sound_status_r, snk_sound_status_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1470,8 +1460,8 @@ static ADDRESS_MAP_START( YM3526_Y8950_sound_map, AS_PROGRAM, 8, snk_state )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM
|
||||
AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ym1", ym3526_status_port_r, ym3526_control_port_w)
|
||||
AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ym1", ym3526_write_port_w)
|
||||
AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE("ym1", ym3526_device, status_port_r, control_port_w)
|
||||
AM_RANGE(0xec00, 0xec00) AM_DEVWRITE("ym1", ym3526_device, write_port_w)
|
||||
AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE_LEGACY("ym2", y8950_status_port_r, y8950_control_port_w)
|
||||
AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("ym2", y8950_write_port_w)
|
||||
AM_RANGE(0xf800, 0xf800) AM_READWRITE(snk_sound_status_r, snk_sound_status_w)
|
||||
@ -3808,7 +3798,7 @@ static MACHINE_CONFIG_START( tnk3, snk_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ym1", YM3526, XTAL_8MHz/2) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config_1)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(snk_state, ymirq_callback_1))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -3838,7 +3828,7 @@ static MACHINE_CONFIG_DERIVED( athena, tnk3 )
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SOUND_ADD("ym2", YM3526, XTAL_8MHz/2) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config_2)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(snk_state, ymirq_callback_2))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -3892,11 +3882,11 @@ static MACHINE_CONFIG_START( ikari, snk_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ym1", YM3526, XTAL_8MHz/2) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config_1)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(snk_state, ymirq_callback_1))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", YM3526, XTAL_8MHz/2) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config_2)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(snk_state, ymirq_callback_2))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -3948,7 +3938,7 @@ static MACHINE_CONFIG_START( bermudat, snk_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ym1", YM3526, XTAL_8MHz/2) /* verified on pcb */
|
||||
MCFG_SOUND_CONFIG(ym3526_config_1)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(snk_state, ymirq_callback_1))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", Y8950, XTAL_8MHz/2) /* verified on pcb */
|
||||
@ -4052,7 +4042,7 @@ static MACHINE_CONFIG_START( tdfever, snk_state )
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_SOUND_ADD("ym1", YM3526, 4000000)
|
||||
MCFG_SOUND_CONFIG(ym3526_config_1)
|
||||
MCFG_YM3526_IRQ_HANDLER(WRITELINE(snk_state, ymirq_callback_1))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
|
||||
MCFG_SOUND_ADD("ym2", Y8950, 4000000)
|
||||
|
@ -267,7 +267,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( bestbest_sound_map, AS_PROGRAM, 8, suna16_state )
|
||||
AM_RANGE( 0x0000, 0xbfff ) AM_ROM // ROM
|
||||
AM_RANGE( 0xc000, 0xc001 ) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w) //
|
||||
AM_RANGE( 0xc000, 0xc001 ) AM_DEVWRITE("ymsnd", ym3526_device, write)
|
||||
AM_RANGE( 0xc002, 0xc003 ) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) // AY8910
|
||||
AM_RANGE( 0xe000, 0xe7ff ) AM_RAM // RAM
|
||||
AM_RANGE( 0xf000, 0xf000 ) AM_WRITE(soundlatch2_byte_w ) // To PCM Z80
|
||||
@ -948,11 +948,6 @@ MACHINE_CONFIG_END
|
||||
Best Of Best
|
||||
***************************************************************************/
|
||||
|
||||
static const ym3526_interface bestbest_ym3526_interface =
|
||||
{
|
||||
DEVCB_CPU_INPUT_LINE("audiocpu", INPUT_LINE_IRQ0)
|
||||
};
|
||||
|
||||
WRITE8_MEMBER(suna16_state::bestbest_ay8910_port_a_w)
|
||||
{
|
||||
// ?
|
||||
@ -1005,7 +1000,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state )
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_24MHz/8) /* 3MHz */
|
||||
MCFG_SOUND_CONFIG(bestbest_ym3526_interface)
|
||||
MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", z80_device, irq_line))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
|
||||
|
||||
|
@ -234,7 +234,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_3526_io_map, AS_IO, 8, terracre_state )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xff)
|
||||
AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w)
|
||||
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ymsnd", ym3526_device, write)
|
||||
AM_RANGE(0x02, 0x02) AM_DEVWRITE("dac1", dac_device, write_signed8)
|
||||
AM_RANGE(0x03, 0x03) AM_DEVWRITE("dac2", dac_device, write_signed8)
|
||||
AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r)
|
||||
|
Loading…
Reference in New Issue
Block a user