Modernized the beep and taitosnd devices. [Andrew Gardner]

This commit is contained in:
Andrew Gardner 2013-03-06 04:33:54 +00:00
parent 1230f110d6
commit c64c35d64a
92 changed files with 891 additions and 943 deletions

View File

@ -14,49 +14,65 @@
#include "emu.h"
#include "sound/beep.h"
#define BEEP_RATE (48000)
#define BEEP_RATE 48000
struct beep_state
// device type definition
const device_type BEEP = &device_creator<beep_device>;
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// beep_device - constructor
//-------------------------------------------------
beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, BEEP, "Beep", tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(NULL),
m_enable(0),
m_frequency(0),
m_incr(0),
m_signal(0)
{
sound_stream *stream; /* stream number */
int enable; /* enable beep */
int frequency; /* set frequency - this can be changed using the appropiate function */
int incr; /* initial wave state */
INT16 signal; /* current signal */
};
INLINE beep_state *get_safe_token(device_t *device)
{
assert(device != NULL);
assert(device->type() == BEEP);
return (beep_state *)downcast<beep_device *>(device)->token();
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
/*************************************
*
* Stream updater
*
*************************************/
static STREAM_UPDATE( beep_sound_update )
void beep_device::device_start()
{
m_stream = stream_alloc(0, 1, BEEP_RATE);
m_enable = 0;
m_frequency = 3250;
m_incr = 0;
m_signal = 0x07fff;
}
//-------------------------------------------------
// sound_stream_update - handle a stream update
//-------------------------------------------------
void beep_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
beep_state *bs = (beep_state *) param;
stream_sample_t *buffer = outputs[0];
INT16 signal = bs->signal;
INT16 signal = m_signal;
int clock = 0, rate = BEEP_RATE / 2;
/* get progress through wave */
int incr = bs->incr;
int incr = m_incr;
if (bs->frequency > 0)
clock = bs->frequency;
if (m_frequency > 0)
clock = m_frequency;
/* if we're not enabled, just fill with 0 */
if ( !bs->enable || clock == 0 )
if ( !m_enable || clock == 0 )
{
memset( buffer, 0, samples * sizeof(*buffer) );
return;
@ -75,127 +91,55 @@ static STREAM_UPDATE( beep_sound_update )
}
/* store progress through wave */
bs->incr = incr;
bs->signal = signal;
m_incr = incr;
m_signal = signal;
}
//-------------------------------------------------
// changing state to on from off will restart tone
//-------------------------------------------------
/*************************************
*
* Sound handler start
*
*************************************/
static DEVICE_START( beep )
void beep_device::set_state(int on)
{
beep_state *pBeep = get_safe_token(device);
pBeep->stream = device->machine().sound().stream_alloc(*device, 0, 1, BEEP_RATE, pBeep, beep_sound_update );
pBeep->enable = 0;
pBeep->frequency = 3250;
pBeep->incr = 0;
pBeep->signal = 0x07fff;
}
/*************************************
*
* changing state to on from off will restart tone
*
*************************************/
void beep_set_state(device_t *device, int on)
{
beep_state *info = get_safe_token(device);
/* only update if new state is not the same as old state */
if (info->enable == on)
if (m_enable == on)
return;
info->stream->update();
m_stream->update();
m_enable = on;
info->enable = on;
/* restart wave from beginning */
info->incr = 0;
info->signal = 0x07fff;
m_incr = 0;
m_signal = 0x07fff;
}
/*************************************
*
* setting new frequency starts from beginning
*
*************************************/
//-------------------------------------------------
// setting new frequency starts from beginning
//-------------------------------------------------
void beep_set_frequency(device_t *device,int frequency)
void beep_device::set_frequency(int frequency)
{
beep_state *info = get_safe_token(device);
if (info->frequency == frequency)
if (m_frequency == frequency)
return;
info->stream->update();
info->frequency = frequency;
info->signal = 0x07fff;
info->incr = 0;
m_stream->update();
m_frequency = frequency;
m_signal = 0x07fff;
m_incr = 0;
}
/*************************************
*
* change a channel volume
*
*************************************/
//-------------------------------------------------
// change a channel volume
//-------------------------------------------------
void beep_set_volume(device_t *device, int volume)
void beep_device::set_volume(int volume)
{
beep_state *info = get_safe_token(device);
info->stream->update();
m_stream->update();
volume = 100 * volume / 7;
downcast<beep_device *>(device)->set_output_gain(0, volume);
}
const device_type BEEP = &device_creator<beep_device>;
beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, BEEP, "Beep", tag, owner, clock),
device_sound_interface(mconfig, *this)
{
m_token = global_alloc_clear(beep_state);
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
void beep_device::device_config_complete()
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void beep_device::device_start()
{
DEVICE_START_NAME( beep )(this);
}
//-------------------------------------------------
// sound_stream_update - handle a stream update
//-------------------------------------------------
void beep_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");
set_output_gain(0, volume);
}

View File

@ -3,33 +3,40 @@
#ifndef __BEEP_H__
#define __BEEP_H__
#include "devlegcy.h"
#define BEEPER_TAG "beeper"
void beep_set_state(device_t *device, int on);
void beep_set_frequency(device_t *device, int frequency);
void beep_set_volume(device_t *device, int volume);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> beep_device
class beep_device : public device_t,
public device_sound_interface
public device_sound_interface
{
public:
beep_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~beep_device() { global_free(m_token); }
~beep_device() { }
// access to legacy token
void *token() const { assert(m_token != NULL); return m_token; }
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
public:
void set_state(int on);
void set_frequency(int frequency);
void set_volume(int volume);
private:
// internal state
void *m_token;
sound_stream *m_stream; /* stream number */
int m_enable; /* enable beep */
int m_frequency; /* set frequency - this can be changed using the appropiate function */
int m_incr; /* initial wave state */
INT16 m_signal; /* current signal */
};
extern const device_type BEEP;

View File

@ -15,320 +15,33 @@
#define TC0140SYT_PORT01_FULL_MASTER (0x04)
#define TC0140SYT_PORT23_FULL_MASTER (0x08)
struct tc0140syt_state
{
UINT8 slavedata[4]; /* Data on master->slave port (4 nibbles) */
UINT8 masterdata[4]; /* Data on slave->master port (4 nibbles) */
UINT8 mainmode; /* Access mode on master cpu side */
UINT8 submode; /* Access mode on slave cpu side */
UINT8 status; /* Status data */
UINT8 nmi_enabled; /* 1 if slave cpu has nmi's enabled */
UINT8 nmi_req; /* 1 if slave cpu has a pending nmi */
device_t *mastercpu; /* this is the maincpu */
device_t *slavecpu; /* this is the audiocpu */
};
/*****************************************************************************
INLINE FUNCTIONS
*****************************************************************************/
INLINE tc0140syt_state *get_safe_token( device_t *device )
{
assert(device != NULL);
assert(device->type() == TC0140SYT);
return (tc0140syt_state *)downcast<tc0140syt_device *>(device)->token();
}
INLINE const tc0140syt_interface *get_interface( device_t *device )
{
assert(device != NULL);
assert((device->type() == TC0140SYT));
return (const tc0140syt_interface *) device->static_config();
}
/*****************************************************************************
DEVICE HANDLERS
*****************************************************************************/
static void interrupt_controller( device_t *device )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
if (tc0140syt->nmi_req && tc0140syt->nmi_enabled)
{
tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
tc0140syt->nmi_req = 0;
}
}
WRITE8_DEVICE_HANDLER( tc0140syt_port_w )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
data &= 0x0f;
tc0140syt->mainmode = data;
//logerror("taitosnd: Master cpu mode [%02x]\n", data);
if (data > 4)
{
logerror("tc0140syt : error Master entering unknown mode[%02x]\n", data);
}
}
WRITE8_DEVICE_HANDLER( tc0140syt_comm_w )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
data &= 0x0f; /*this is important, otherwise ballbros won't work*/
switch (tc0140syt->mainmode)
{
case 0x00: // mode #0
tc0140syt->slavedata[tc0140syt->mainmode ++] = data;
//logerror("taitosnd: Master cpu written port 0, data %01x\n", data);
break;
case 0x01: // mode #1
tc0140syt->slavedata[tc0140syt->mainmode ++] = data;
tc0140syt->status |= TC0140SYT_PORT01_FULL;
tc0140syt->nmi_req = 1;
//logerror("taitosnd: Master cpu sends 0/1 : %01x%01x\n", tc0140syt->slavedata[1], tc0140syt->slavedata[0]);
break;
case 0x02: // mode #2
tc0140syt->slavedata[tc0140syt->mainmode ++] = data;
//logerror("taitosnd: Master cpu written port 2, data %01\n", data);
break;
case 0x03: // mode #3
tc0140syt->slavedata[tc0140syt->mainmode ++] = data;
tc0140syt->status |= TC0140SYT_PORT23_FULL;
tc0140syt->nmi_req = 1;
//logerror("taitosnd: Master cpu sends 2/3 : %01x%01x\n", tc0140syt->slavedata[3], tc0140syt->slavedata[2]);
break;
case 0x04: // port status
//logerror("taitosnd: Master issued control value %02x (PC = %08x) \n",data, space.device().safe_pc() );
/* this does a hi-lo transition to reset the sound cpu */
if (data)
tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
else
{
tc0140syt->slavecpu->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
tc0140syt->mastercpu->execute().spin(); /* otherwise no sound in driftout */
}
break;
default:
//logerror("taitosnd: Master cpu written in mode [%02x] data[%02x]\n", tc0140syt->mainmode, data);
break;
}
}
READ8_DEVICE_HANDLER( tc0140syt_comm_r )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
switch( tc0140syt->mainmode )
{
case 0x00: // mode #0
//logerror("taitosnd: Master cpu read portdata %01x\n", tc0140syt->masterdata[0]);
return tc0140syt->masterdata[tc0140syt->mainmode ++];
case 0x01: // mode #1
//logerror("taitosnd: Master cpu receives 0/1 : %01x%01x\n", tc0140syt->masterdata[1], tc0140syt->masterdata[0]);
tc0140syt->status &= ~TC0140SYT_PORT01_FULL_MASTER;
return tc0140syt->masterdata[tc0140syt->mainmode ++];
case 0x02: // mode #2
//logerror("taitosnd: Master cpu read masterdata %01x\n", tc0140syt->masterdata[2]);
return tc0140syt->masterdata[tc0140syt->mainmode ++];
case 0x03: // mode #3
//logerror("taitosnd: Master cpu receives 2/3 : %01x%01x\n", tc0140syt->masterdata[3], tc0140syt->masterdata[2]);
tc0140syt->status &= ~TC0140SYT_PORT23_FULL_MASTER;
return tc0140syt->masterdata[tc0140syt->mainmode ++];
case 0x04: // port status
//logerror("tc0140syt : Master cpu read status : %02x\n", tc0140syt->status);
return tc0140syt->status;
default:
//logerror("tc0140syt : Master cpu read in mode [%02x]\n", tc0140syt->mainmode);
return 0;
}
}
//SLAVE SIDE
WRITE8_DEVICE_HANDLER( tc0140syt_slave_port_w )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
data &= 0x0f;
tc0140syt->submode = data;
//logerror("taitosnd: Slave cpu mode [%02x]\n", data);
if (data > 6)
logerror("tc0140syt error : Slave cpu unknown mode[%02x]\n", data);
}
WRITE8_DEVICE_HANDLER( tc0140syt_slave_comm_w )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
data &= 0x0f;
switch (tc0140syt->submode)
{
case 0x00: // mode #0
tc0140syt->masterdata[tc0140syt->submode ++] = data;
//logerror("taitosnd: Slave cpu written port 0, data %01x\n", data);
break;
case 0x01: // mode #1
tc0140syt->masterdata[tc0140syt->submode ++] = data;
tc0140syt->status |= TC0140SYT_PORT01_FULL_MASTER;
//logerror("taitosnd: Slave cpu sends 0/1 : %01x%01x\n" , tc0140syt->masterdata[1] , tc0140syt->masterdata[0]);
tc0140syt->slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
break;
case 0x02: // mode #2
//logerror("taitosnd: Slave cpu written port 2, data %01x\n", data);
tc0140syt->masterdata[tc0140syt->submode ++] = data;
break;
case 0x03: // mode #3
tc0140syt->masterdata[tc0140syt->submode ++] = data;
tc0140syt->status |= TC0140SYT_PORT23_FULL_MASTER;
//logerror("taitosnd: Slave cpu sends 2/3 : %01x%01x\n" , tc0140syt->masterdata[3] , tc0140syt->masterdata[2]);
tc0140syt->slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
break;
case 0x04: // port status
//tc0140syt->status = TC0140SYT_SET_OK;
//logerror("tc0140syt : Slave cpu status ok.\n");
break;
case 0x05: // nmi disable
tc0140syt->nmi_enabled = 0;
break;
case 0x06: // nmi enable
tc0140syt->nmi_enabled = 1;
break;
default:
//logerror("tc0140syt: Slave cpu written in mode [%02x] data[%02x]\n" , tc0140syt->submode, data & 0xff);
break;
}
interrupt_controller(device);
}
READ8_DEVICE_HANDLER( tc0140syt_slave_comm_r )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
UINT8 res = 0;
switch ( tc0140syt->submode )
{
case 0x00: // mode #0
//logerror("taitosnd: Slave cpu read slavedata %01x\n", tc0140syt->slavedata[0]);
res = tc0140syt->slavedata[tc0140syt->submode ++];
break;
case 0x01: // mode #1
//logerror("taitosnd: Slave cpu receives 0/1 : %01x%01x PC=%4x\n", tc0140syt->slavedata[1] , tc0140syt->slavedata[0],space.device().safe_pc());
tc0140syt->status &= ~TC0140SYT_PORT01_FULL;
res = tc0140syt->slavedata[tc0140syt->submode ++];
break;
case 0x02: // mode #2
//logerror("taitosnd: Slave cpu read slavedata %01x\n", tc0140syt->slavedata[2]);
res = tc0140syt->slavedata[tc0140syt->submode ++];
break;
case 0x03: // mode #3
//logerror("taitosnd: Slave cpu receives 2/3 : %01x%01x\n", tc0140syt->slavedata[3] , tc0140syt->slavedata[2]);
tc0140syt->status &= ~TC0140SYT_PORT23_FULL;
res = tc0140syt->slavedata[tc0140syt->submode ++];
break;
case 0x04: // port status
//logerror("tc0140syt : Slave cpu read status : %02x\n", tc0140syt->status);
res = tc0140syt->status;
break;
default:
//logerror("tc0140syt : Slave cpu read in mode [%02x]\n", tc0140syt->submode);
res = 0;
break;
}
interrupt_controller(device);
return res;
}
/*****************************************************************************
DEVICE INTERFACE
*****************************************************************************/
static DEVICE_START( tc0140syt )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
const tc0140syt_interface *intf = get_interface(device);
/* use the given gfx set */
tc0140syt->mastercpu = device->machine().device(intf->master);
tc0140syt->slavecpu = device->machine().device(intf->slave);
device->save_item(NAME(tc0140syt->mainmode));
device->save_item(NAME(tc0140syt->submode));
device->save_item(NAME(tc0140syt->status));
device->save_item(NAME(tc0140syt->nmi_enabled));
device->save_item(NAME(tc0140syt->nmi_req));
device->save_item(NAME(tc0140syt->slavedata));
device->save_item(NAME(tc0140syt->masterdata));
}
static DEVICE_RESET( tc0140syt )
{
tc0140syt_state *tc0140syt = get_safe_token(device);
int i;
tc0140syt->mainmode = 0;
tc0140syt->submode = 0;
tc0140syt->status = 0;
tc0140syt->nmi_enabled = 0;
tc0140syt->nmi_req = 0;
for (i = 0; i < 4; i++)
{
tc0140syt->slavedata[i] = 0;
tc0140syt->masterdata[i] = 0;
}
}
// device type definition
const device_type TC0140SYT = &device_creator<tc0140syt_device>;
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// tc0140syt_device - constructor
//-------------------------------------------------
tc0140syt_device::tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0140SYT, "Taito TC0140SYT", tag, owner, clock)
: device_t(mconfig, TC0140SYT, "Taito TC0140SYT", tag, owner, clock),
m_mainmode(0),
m_submode(0),
m_status(0),
m_nmi_enabled(0),
m_nmi_req(0),
m_mastercpu(NULL),
m_slavecpu(NULL)
{
m_token = global_alloc_clear(tc0140syt_state);
memset(m_slavedata, 0, sizeof(UINT8)*4);
memset(m_masterdata, 0, sizeof(UINT8)*4);
}
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
// complete
//-------------------------------------------------
void tc0140syt_device::device_config_complete()
{
}
//-------------------------------------------------
// device_start - device-specific startup
@ -336,14 +49,263 @@ void tc0140syt_device::device_config_complete()
void tc0140syt_device::device_start()
{
DEVICE_START_NAME( tc0140syt )(this);
const tc0140syt_interface *intf = reinterpret_cast<const tc0140syt_interface*>(static_config());
/* use the given gfx set */
m_mastercpu = machine().device(intf->master);
m_slavecpu = machine().device(intf->slave);
save_item(NAME(m_mainmode));
save_item(NAME(m_submode));
save_item(NAME(m_status));
save_item(NAME(m_nmi_enabled));
save_item(NAME(m_nmi_req));
save_item(NAME(m_slavedata));
save_item(NAME(m_masterdata));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void tc0140syt_device::device_reset()
{
DEVICE_RESET_NAME( tc0140syt )(this);
int i;
m_mainmode = 0;
m_submode = 0;
m_status = 0;
m_nmi_enabled = 0;
m_nmi_req = 0;
for (i = 0; i < 4; i++)
{
m_slavedata[i] = 0;
m_masterdata[i] = 0;
}
}
//-------------------------------------------------
// DEVICE HANDLERS
//-------------------------------------------------
void tc0140syt_device::interrupt_controller( )
{
if (m_nmi_req && m_nmi_enabled)
{
m_slavecpu->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
m_nmi_req = 0;
}
}
//-------------------------------------------------
// MASTER SIDE
//-------------------------------------------------
WRITE8_MEMBER( tc0140syt_device::tc0140syt_port_w )
{
data &= 0x0f;
m_mainmode = data;
//logerror("taitosnd: Master cpu mode [%02x]\n", data);
if (data > 4)
{
logerror("tc0140syt : error Master entering unknown mode[%02x]\n", data);
}
}
WRITE8_MEMBER( tc0140syt_device::tc0140syt_comm_w )
{
data &= 0x0f; /*this is important, otherwise ballbros won't work*/
switch (m_mainmode)
{
case 0x00: // mode #0
m_slavedata[m_mainmode ++] = data;
//logerror("taitosnd: Master cpu written port 0, data %01x\n", data);
break;
case 0x01: // mode #1
m_slavedata[m_mainmode ++] = data;
m_status |= TC0140SYT_PORT01_FULL;
m_nmi_req = 1;
//logerror("taitosnd: Master cpu sends 0/1 : %01x%01x\n", m_slavedata[1], m_slavedata[0]);
break;
case 0x02: // mode #2
m_slavedata[m_mainmode ++] = data;
//logerror("taitosnd: Master cpu written port 2, data %01\n", data);
break;
case 0x03: // mode #3
m_slavedata[m_mainmode ++] = data;
m_status |= TC0140SYT_PORT23_FULL;
m_nmi_req = 1;
//logerror("taitosnd: Master cpu sends 2/3 : %01x%01x\n", m_slavedata[3], m_slavedata[2]);
break;
case 0x04: // port status
//logerror("taitosnd: Master issued control value %02x (PC = %08x) \n",data, space.device().safe_pc() );
/* this does a hi-lo transition to reset the sound cpu */
if (data)
m_slavecpu->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
else
{
m_slavecpu->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
m_mastercpu->execute().spin(); /* otherwise no sound in driftout */
}
break;
default:
//logerror("taitosnd: Master cpu written in mode [%02x] data[%02x]\n", m_mainmode, data);
break;
}
}
READ8_MEMBER( tc0140syt_device::tc0140syt_comm_r )
{
switch( m_mainmode )
{
case 0x00: // mode #0
//logerror("taitosnd: Master cpu read portdata %01x\n", m_masterdata[0]);
return m_masterdata[m_mainmode ++];
case 0x01: // mode #1
//logerror("taitosnd: Master cpu receives 0/1 : %01x%01x\n", m_masterdata[1], m_masterdata[0]);
m_status &= ~TC0140SYT_PORT01_FULL_MASTER;
return m_masterdata[m_mainmode ++];
case 0x02: // mode #2
//logerror("taitosnd: Master cpu read masterdata %01x\n", m_masterdata[2]);
return m_masterdata[m_mainmode ++];
case 0x03: // mode #3
//logerror("taitosnd: Master cpu receives 2/3 : %01x%01x\n", m_masterdata[3], m_masterdata[2]);
m_status &= ~TC0140SYT_PORT23_FULL_MASTER;
return m_masterdata[m_mainmode ++];
case 0x04: // port status
//logerror("tc0140syt : Master cpu read status : %02x\n", m_status);
return m_status;
default:
//logerror("tc0140syt : Master cpu read in mode [%02x]\n", m_mainmode);
return 0;
}
}
//-------------------------------------------------
//SLAVE SIDE
//-------------------------------------------------
WRITE8_MEMBER( tc0140syt_device::tc0140syt_slave_port_w )
{
data &= 0x0f;
m_submode = data;
//logerror("taitosnd: Slave cpu mode [%02x]\n", data);
if (data > 6)
logerror("tc0140syt error : Slave cpu unknown mode[%02x]\n", data);
}
WRITE8_MEMBER( tc0140syt_device::tc0140syt_slave_comm_w )
{
data &= 0x0f;
switch (m_submode)
{
case 0x00: // mode #0
m_masterdata[m_submode ++] = data;
//logerror("taitosnd: Slave cpu written port 0, data %01x\n", data);
break;
case 0x01: // mode #1
m_masterdata[m_submode ++] = data;
m_status |= TC0140SYT_PORT01_FULL_MASTER;
//logerror("taitosnd: Slave cpu sends 0/1 : %01x%01x\n" , m_masterdata[1] , m_masterdata[0]);
m_slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
break;
case 0x02: // mode #2
//logerror("taitosnd: Slave cpu written port 2, data %01x\n", data);
m_masterdata[m_submode ++] = data;
break;
case 0x03: // mode #3
m_masterdata[m_submode ++] = data;
m_status |= TC0140SYT_PORT23_FULL_MASTER;
//logerror("taitosnd: Slave cpu sends 2/3 : %01x%01x\n" , m_masterdata[3] , m_masterdata[2]);
m_slavecpu->execute().spin(); /* writing should take longer than emulated, so spin */
break;
case 0x04: // port status
//m_status = TC0140SYT_SET_OK;
//logerror("tc0140syt : Slave cpu status ok.\n");
break;
case 0x05: // nmi disable
m_nmi_enabled = 0;
break;
case 0x06: // nmi enable
m_nmi_enabled = 1;
break;
default:
//logerror("tc0140syt: Slave cpu written in mode [%02x] data[%02x]\n" , m_submode, data & 0xff);
break;
}
interrupt_controller();
}
READ8_MEMBER( tc0140syt_device::tc0140syt_slave_comm_r )
{
UINT8 res = 0;
switch ( m_submode )
{
case 0x00: // mode #0
//logerror("taitosnd: Slave cpu read slavedata %01x\n", m_slavedata[0]);
res = m_slavedata[m_submode ++];
break;
case 0x01: // mode #1
//logerror("taitosnd: Slave cpu receives 0/1 : %01x%01x PC=%4x\n", m_slavedata[1] , m_slavedata[0],space.device().safe_pc());
m_status &= ~TC0140SYT_PORT01_FULL;
res = m_slavedata[m_submode ++];
break;
case 0x02: // mode #2
//logerror("taitosnd: Slave cpu read slavedata %01x\n", m_slavedata[2]);
res = m_slavedata[m_submode ++];
break;
case 0x03: // mode #3
//logerror("taitosnd: Slave cpu receives 2/3 : %01x%01x\n", m_slavedata[3] , m_slavedata[2]);
m_status &= ~TC0140SYT_PORT23_FULL;
res = m_slavedata[m_submode ++];
break;
case 0x04: // port status
//logerror("tc0140syt : Slave cpu read status : %02x\n", m_status);
res = m_status;
break;
default:
//logerror("tc0140syt : Slave cpu read in mode [%02x]\n", m_submode);
res = 0;
break;
}
interrupt_controller();
return res;
}

View File

@ -1,12 +1,20 @@
#ifndef __TAITOSND_H__
#define __TAITOSND_H__
#include "devlegcy.h"
#include "devcb.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_TC0140SYT_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, TC0140SYT, 0) \
MCFG_DEVICE_CONFIG(_interface)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
struct tc0140syt_interface
{
@ -14,49 +22,48 @@ struct tc0140syt_interface
const char *slave;
};
// ======================> tc0140syt_device
class tc0140syt_device : public device_t
{
public:
tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~tc0140syt_device() { global_free(m_token); }
~tc0140syt_device() { }
// access to legacy token
void *token() const { assert(m_token != NULL); return m_token; }
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
public:
// MASTER (8bit bus) control functions
DECLARE_WRITE8_MEMBER( tc0140syt_port_w );
DECLARE_WRITE8_MEMBER( tc0140syt_comm_w );
DECLARE_READ8_MEMBER( tc0140syt_comm_r );
// SLAVE (8bit bus) control functions ONLY
DECLARE_WRITE8_MEMBER( tc0140syt_slave_port_w );
DECLARE_READ8_MEMBER( tc0140syt_slave_comm_r );
DECLARE_WRITE8_MEMBER( tc0140syt_slave_comm_w );
private:
// internal state
void *m_token;
void interrupt_controller();
private:
UINT8 m_slavedata[4]; /* Data on master->slave port (4 nibbles) */
UINT8 m_masterdata[4]; /* Data on slave->master port (4 nibbles) */
UINT8 m_mainmode; /* Access mode on master cpu side */
UINT8 m_submode; /* Access mode on slave cpu side */
UINT8 m_status; /* Status data */
UINT8 m_nmi_enabled; /* 1 if slave cpu has nmi's enabled */
UINT8 m_nmi_req; /* 1 if slave cpu has a pending nmi */
device_t *m_mastercpu; /* this is the maincpu */
device_t *m_slavecpu; /* this is the audiocpu */
};
extern const device_type TC0140SYT;
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_TC0140SYT_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, TC0140SYT, 0) \
MCFG_DEVICE_CONFIG(_interface)
/***************************************************************************
DEVICE I/O FUNCTIONS
***************************************************************************/
/* MASTER (8bit bus) control functions */
DECLARE_WRITE8_DEVICE_HANDLER( tc0140syt_port_w );
DECLARE_WRITE8_DEVICE_HANDLER( tc0140syt_comm_w );
DECLARE_READ8_DEVICE_HANDLER( tc0140syt_comm_r );
/* SLAVE (8bit bus) control functions ONLY */
DECLARE_WRITE8_DEVICE_HANDLER( tc0140syt_slave_port_w );
DECLARE_READ8_DEVICE_HANDLER( tc0140syt_slave_comm_r );
DECLARE_WRITE8_DEVICE_HANDLER( tc0140syt_slave_comm_w );
#endif /*__TAITOSND_H__*/

View File

@ -318,8 +318,8 @@ static ADDRESS_MAP_START( bonzeadv_map, AS_PROGRAM, 16, asuka_state )
AM_RANGE(0x3b0000, 0x3b0001) AM_READ_PORT("DSWB")
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(watchdog_reset16_w)
AM_RANGE(0x3d0000, 0x3d0001) AM_READNOP
AM_RANGE(0x3e0000, 0x3e0001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x3e0000, 0x3e0001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x8007ff) AM_READWRITE(bonzeadv_cchip_ram_r, bonzeadv_cchip_ram_w)
AM_RANGE(0x800802, 0x800803) AM_READWRITE(bonzeadv_cchip_ctrl_r, bonzeadv_cchip_ctrl_w)
AM_RANGE(0x800c00, 0x800c01) AM_WRITE(bonzeadv_cchip_bank_w)
@ -334,8 +334,8 @@ static ADDRESS_MAP_START( asuka_map, AS_PROGRAM, 16, asuka_state )
AM_RANGE(0x1076f0, 0x1076f1) AM_READNOP /* Mofflott init does dummy reads here */
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_step1_word_w)
AM_RANGE(0x3a0000, 0x3a0003) AM_WRITE(asuka_spritectrl_w)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x400000, 0x40000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0xc10000, 0xc103ff) AM_WRITENOP /* error in Asuka init code */
@ -346,8 +346,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cadash_map, AS_PROGRAM, 16, asuka_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x080000, 0x080003) AM_WRITE(asuka_spritectrl_w)
AM_RANGE(0x0c0000, 0x0c0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x0c0002, 0x0c0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x0c0000, 0x0c0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x0c0002, 0x0c0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x100000, 0x107fff) AM_RAM
AM_RANGE(0x800000, 0x800fff) AM_READWRITE(cadash_share_r,cadash_share_w) /* network ram */
AM_RANGE(0x900000, 0x90000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
@ -364,8 +364,8 @@ static ADDRESS_MAP_START( eto_map, AS_PROGRAM, 16 /* N.B. tc100scn mirror over
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x400000, 0x40000f) AM_DEVREAD8_LEGACY("tc0220ioc", tc0220ioc_r, 0x00ff) /* service mode mirror */
AM_RANGE(0x4a0000, 0x4a0003) AM_WRITE(asuka_spritectrl_w)
AM_RANGE(0x4e0000, 0x4e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x4e0002, 0x4e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x4e0000, 0x4e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x4e0002, 0x4e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("pc090oj", pc090oj_word_r, pc090oj_word_w) /* sprite ram */
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVWRITE_LEGACY("tc0100scn", tc0100scn_word_w)
AM_RANGE(0xd00000, 0xd0ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
@ -380,8 +380,8 @@ static ADDRESS_MAP_START( bonzeadv_z80_map, AS_PROGRAM, 8, asuka_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xe600, 0xe600) AM_WRITENOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP
@ -395,8 +395,8 @@ static ADDRESS_MAP_START( z80_map, AS_PROGRAM, 8, asuka_state )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
// AM_RANGE(0x9002, 0x9100) AM_READNOP
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xb000, 0xb000) AM_WRITE(asuka_msm5205_address_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(asuka_msm5205_start_w)
AM_RANGE(0xd000, 0xd000) AM_WRITE(asuka_msm5205_stop_w)
@ -408,8 +408,8 @@ static ADDRESS_MAP_START( cadash_z80_map, AS_PROGRAM, 8, asuka_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
ADDRESS_MAP_END
/*

View File

@ -174,7 +174,7 @@ READ16_MEMBER(darius_state::darius_ioc_r)
switch (offset)
{
case 0x01:
return (tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff); /* sound interface read */
return (m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff); /* sound interface read */
case 0x04:
return ioport("P1")->read();
@ -203,12 +203,12 @@ WRITE16_MEMBER(darius_state::darius_ioc_w)
{
case 0x00: /* sound interface write */
tc0140syt_port_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
return;
case 0x01: /* sound interface write */
tc0140syt_comm_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
return;
case 0x28: /* unknown, written by both cpus - always 0? */
@ -466,8 +466,8 @@ static ADDRESS_MAP_START( darius_sound_map, AS_PROGRAM, 8, darius_state )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w)
AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w)
AM_RANGE(0xb000, 0xb000) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xb001, 0xb001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xb000, 0xb000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xb001, 0xb001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(darius_fm0_pan)
AM_RANGE(0xc400, 0xc400) AM_WRITE(darius_fm1_pan)
AM_RANGE(0xc800, 0xc800) AM_WRITE(darius_psg0_pan)
@ -830,7 +830,7 @@ void darius_state::machine_start()
m_cpub = machine().device("cpub");
m_adpcm = machine().device("adpcm");
m_pc080sn = machine().device("pc080sn");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
m_lscreen = machine().device("lscreen");
m_mscreen = machine().device("mscreen");

View File

@ -158,7 +158,7 @@ INPUT_CHANGED_MEMBER(destiny_state::coin_inserted)
WRITE8_MEMBER(destiny_state::sound_w)
{
// a0: sound on/off
beep_set_state(machine().device(BEEPER_TAG), ~offset & 1);
machine().device<beep_device>(BEEPER_TAG)->set_state(~offset & 1);
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, destiny_state )
@ -247,8 +247,8 @@ INPUT_PORTS_END
void destiny_state::machine_start()
{
beep_set_frequency(machine().device(BEEPER_TAG),800); // TODO: determine exact frequency thru schematics
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(800); // TODO: determine exact frequency thru schematics
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
}
void destiny_state::machine_reset()

View File

@ -286,8 +286,8 @@ INTERRUPT_GEN_MEMBER(dlair_state::vblank_callback)
if (beep != NULL)
{
z80ctc_device *ctc = machine().device<z80ctc_device>("ctc");
beep_set_state(beep, 1);
beep_set_frequency(beep, ATTOSECONDS_TO_HZ(ctc->period(0).attoseconds));
beep->set_state(1);
beep->set_frequency(ATTOSECONDS_TO_HZ(ctc->period(0).attoseconds));
}
}

View File

@ -151,8 +151,8 @@ static ADDRESS_MAP_START( cpub_map, AS_PROGRAM, 8, exzisus_state )
AM_RANGE(0xc000, 0xc5ff) AM_READWRITE(exzisus_objectram_0_r, exzisus_objectram_0_w) AM_SHARE("objectram0")
AM_RANGE(0xc600, 0xdfff) AM_READWRITE(exzisus_videoram_0_r, exzisus_videoram_0_w) AM_SHARE("videoram0")
AM_RANGE(0xe000, 0xefff) AM_RAM
AM_RANGE(0xf000, 0xf000) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_port_w)
AM_RANGE(0xf001, 0xf001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xf000, 0xf000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_port_w)
AM_RANGE(0xf001, 0xf001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xf400, 0xf400) AM_READ_PORT("P1")
AM_RANGE(0xf400, 0xf400) AM_WRITE(exzisus_cpub_bankswitch_w)
AM_RANGE(0xf401, 0xf401) AM_READ_PORT("P2")
@ -176,8 +176,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, exzisus_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xa000, 0xa000) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
ADDRESS_MAP_END

View File

@ -346,25 +346,25 @@ WRITE16_MEMBER(mlanding_state::ml_sub_reset_w)
WRITE16_MEMBER(mlanding_state::ml_to_sound_w)
{
device_t *tc0140syt = machine().device("tc0140syt");
tc0140syt_device *tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
if (offset == 0)
tc0140syt_port_w(tc0140syt, space, 0, data & 0xff);
tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
else if (offset == 1)
{
//machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
tc0140syt_comm_w(tc0140syt, space, 0, data & 0xff);
tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
}
}
WRITE8_MEMBER(mlanding_state::ml_sound_to_main_w)
{
device_t *tc0140syt = machine().device("tc0140syt");
tc0140syt_device *tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
if (offset == 0)
tc0140syt_slave_port_w(tc0140syt, space, 0, data & 0xff);
tc0140syt->tc0140syt_slave_port_w(space, 0, data & 0xff);
else if (offset == 1)
{
//machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
tc0140syt_slave_comm_w(tc0140syt, space, 0, data & 0xff);
tc0140syt->tc0140syt_slave_comm_w(space, 0, data & 0xff);
}
}
@ -489,7 +489,7 @@ static ADDRESS_MAP_START( mlanding_mem, AS_PROGRAM, 16, mlanding_state )
AM_RANGE(0x2d0000, 0x2d0003) AM_WRITE(ml_to_sound_w)
AM_RANGE(0x2d0000, 0x2d0001) AM_READNOP
AM_RANGE(0x2d0002, 0x2d0003) AM_DEVREAD8_LEGACY("tc0140syt", tc0140syt_comm_r, 0x00ff)
AM_RANGE(0x2d0002, 0x2d0003) AM_DEVREAD8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, 0x00ff)
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
AM_RANGE(0x280000, 0x2807ff) AM_READWRITE(ml_mecha_ram_r,ml_mecha_ram_w)
@ -542,7 +542,7 @@ static ADDRESS_MAP_START( mlanding_z80_mem, AS_PROGRAM, 8, mlanding_state )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_MIRROR(0x00fe) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xa000, 0xa001) AM_WRITE(ml_sound_to_main_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREAD_LEGACY("tc0140syt", tc0140syt_slave_comm_r)
AM_RANGE(0xa001, 0xa001) AM_DEVREAD("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r)
// AM_RANGE(0xb000, 0xb000) AM_WRITE_LEGACY(ml_msm5205_address_w) //guess
// AM_RANGE(0xc000, 0xc000) AM_DEVWRITE_LEGACY("msm", ml_msm5205_start_w)

View File

@ -364,9 +364,9 @@ WRITE8_MEMBER(ninjaw_state::sound_bankswitch_w)
WRITE16_MEMBER(ninjaw_state::ninjaw_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
#ifdef MAME_DEBUG
if (data & 0xff00)
@ -377,7 +377,7 @@ WRITE16_MEMBER(ninjaw_state::ninjaw_sound_w)
READ16_MEMBER(ninjaw_state::ninjaw_sound_r)
{
if (offset == 1)
return ((tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff));
return ((m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff));
else
return 0;
}
@ -489,8 +489,8 @@ static ADDRESS_MAP_START( ninjaw_sound_map, AS_PROGRAM, 8, ninjaw_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r,ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r,tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r,tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITE(ninjaw_pancontrol) /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -800,7 +800,7 @@ void ninjaw_state::machine_start()
m_maincpu = machine().device<cpu_device>("maincpu");
m_audiocpu = machine().device<cpu_device>("audiocpu");
m_subcpu = machine().device<cpu_device>("sub");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
m_tc0100scn_1 = machine().device("tc0100scn_1");
m_tc0100scn_2 = machine().device("tc0100scn_2");
m_tc0100scn_3 = machine().device("tc0100scn_3");

View File

@ -367,8 +367,8 @@ static ADDRESS_MAP_START( opwolf_map, AS_PROGRAM, 16, opwolf_state )
AM_RANGE(0x380000, 0x380003) AM_WRITE(opwolf_spritectrl_w) // usually 0x4, changes when you fire
AM_RANGE(0x3a0000, 0x3a0003) AM_READ(opwolf_lightgun_r) /* lightgun, read at $11e0/6 */
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITENOP /* watchdog ?? */
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc10000, 0xc1ffff) AM_WRITEONLY /* error in init code (?) */
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE_LEGACY("pc080sn", pc080sn_yscroll_word_w)
@ -388,8 +388,8 @@ static ADDRESS_MAP_START( opwolfb_map, AS_PROGRAM, 16, opwolf_state )
AM_RANGE(0x380000, 0x380003) AM_WRITE(opwolf_spritectrl_w) // usually 0x4, changes when you fire
AM_RANGE(0x3a0000, 0x3a0003) AM_READ(opwolf_lightgun_r) /* lightgun, read at $11e0/6 */
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITENOP /* watchdog ?? */
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc10000, 0xc1ffff) AM_WRITEONLY /* error in init code (?) */
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE_LEGACY("pc080sn", pc080sn_yscroll_word_w)
@ -540,8 +540,8 @@ static ADDRESS_MAP_START( opwolf_sound_z80_map, AS_PROGRAM, 8, opwolf_state )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
AM_RANGE(0x9002, 0x9100) AM_READNOP
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xb000, 0xb006) AM_WRITE(opwolf_adpcm_b_w)
AM_RANGE(0xc000, 0xc006) AM_WRITE(opwolf_adpcm_c_w)
AM_RANGE(0xd000, 0xd000) AM_WRITE(opwolf_adpcm_d_w)

View File

@ -397,15 +397,15 @@ WRITE8_MEMBER(othunder_state::sound_bankswitch_w)
WRITE16_MEMBER(othunder_state::othunder_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
}
READ16_MEMBER(othunder_state::othunder_sound_r)
{
if (offset == 1)
return ((tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff));
return ((m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff));
else
return 0;
}
@ -466,8 +466,8 @@ static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8, othunder_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITE(othunder_TC0310FAM_w) /* pan */
AM_RANGE(0xe600, 0xe600) AM_WRITENOP /* ? */
AM_RANGE(0xea00, 0xea00) AM_READ_PORT(ROTARY_PORT_TAG) /* rotary input */
@ -671,7 +671,7 @@ void othunder_state::machine_start()
m_tc0220ioc = machine().device("tc0220ioc");
m_tc0100scn = machine().device("tc0100scn");
m_tc0110pcr = machine().device("tc0110pcr");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
m_2610_0l = machine().device<filter_volume_device>("2610.0l");
m_2610_0r = machine().device<filter_volume_device>("2610.0r");
m_2610_1l = machine().device<filter_volume_device>("2610.1l");

View File

@ -332,13 +332,13 @@ WRITE8_MEMBER(pcxt_state::port_b_w)
pit8253_gate2_w(m_pit8253, BIT(data, 0));
pcxt_speaker_set_spkrdata( data & 0x02 );
m_port_b_data = data;
// device_t *beep = machine().device("beep");
// device_t *beep = machine().device<beep_device>("beep");
// device_t *cvsd = machine().device("cvsd");
// hc55516_digit_w(cvsd, data);
// popmessage("%02x\n",data);
// beep_set_state(beep, 0);
// beep_set_state(beep, 1);
// beep_set_frequency(beep, m_port_b_data);
// beep->beep_set_state(0);
// beep->beep_set_state(1);
// beep->beep_set_frequency(m_port_b_data);
}
WRITE8_MEMBER(pcxt_state::wss_1_w)

View File

@ -352,8 +352,8 @@ static ADDRESS_MAP_START( rbisland_map, AS_PROGRAM, 16, rbisland_state )
AM_RANGE(0x3a0000, 0x3a0001) AM_WRITE(rbisland_spritectrl_w)
AM_RANGE(0x3b0000, 0x3b0003) AM_READ_PORT("DSWB")
AM_RANGE(0x3c0000, 0x3c0003) AM_WRITENOP /* written very often, watchdog? */
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r,tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r,tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x8007ff) AM_READWRITE(rbisland_cchip_ram_r,rbisland_cchip_ram_w)
AM_RANGE(0x800802, 0x800803) AM_READWRITE(rbisland_cchip_ctrl_r,rbisland_cchip_ctrl_w)
AM_RANGE(0x800c00, 0x800c01) AM_WRITE(rbisland_cchip_bank_w)
@ -411,8 +411,8 @@ static ADDRESS_MAP_START( rbisland_sound_map, AS_PROGRAM, 8, rbisland_state )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
AM_RANGE(0x9002, 0x9100) AM_READNOP
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( jumping_sound_map, AS_PROGRAM, 8, rbisland_state )

View File

@ -216,8 +216,8 @@ static ADDRESS_MAP_START( rastan_map, AS_PROGRAM, 16, rastan_state )
AM_RANGE(0x390008, 0x390009) AM_READ_PORT("DSWA")
AM_RANGE(0x39000a, 0x39000b) AM_READ_PORT("DSWB")
AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(watchdog_reset16_w)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x3e0000, 0x3e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x3e0002, 0x3e0003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xc00000, 0xc0ffff) AM_DEVREADWRITE_LEGACY("pc080sn", pc080sn_word_r, pc080sn_word_w)
AM_RANGE(0xc20000, 0xc20003) AM_DEVWRITE_LEGACY("pc080sn", pc080sn_yscroll_word_w)
AM_RANGE(0xc40000, 0xc40003) AM_DEVWRITE_LEGACY("pc080sn", pc080sn_xscroll_word_w)
@ -231,8 +231,8 @@ static ADDRESS_MAP_START( rastan_s_map, AS_PROGRAM, 8, rastan_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xb000, 0xb000) AM_WRITE(rastan_msm5205_address_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(rastan_msm5205_start_w)
AM_RANGE(0xd000, 0xd000) AM_WRITE(rastan_msm5205_stop_w)

View File

@ -252,9 +252,9 @@ WRITE8_MEMBER(slapshot_state::sound_bankswitch_w)
WRITE16_MEMBER(slapshot_state::slapshot_msb_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, space, 0, (data >> 8) & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, (data >> 8) & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, space, 0, (data >> 8) & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, (data >> 8) & 0xff);
#ifdef MAME_DEBUG
if (data & 0xff)
@ -265,7 +265,7 @@ WRITE16_MEMBER(slapshot_state::slapshot_msb_sound_w)
READ16_MEMBER(slapshot_state::slapshot_msb_sound_r)
{
if (offset == 1)
return ((tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff) << 8);
return ((m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff) << 8);
else
return 0;
}
@ -314,8 +314,8 @@ static ADDRESS_MAP_START( opwolf3_z80_sound_map, AS_PROGRAM, 8, slapshot_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r,ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -519,7 +519,7 @@ void slapshot_state::machine_start()
m_maincpu = machine().device<cpu_device>("maincpu");
m_audiocpu = machine().device<cpu_device>("audiocpu");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
m_tc0480scp = machine().device("tc0480scp");
m_tc0360pri = machine().device("tc0360pri");
m_tc0640fio = machine().device("tc0640fio");

View File

@ -504,8 +504,8 @@ static ADDRESS_MAP_START( rastsag2_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x600000, 0x607fff) AM_RAM /* Main RAM */ /*ashura up to 603fff only*/
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xa00000, 0xa0000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
ADDRESS_MAP_END
@ -514,8 +514,8 @@ static ADDRESS_MAP_START( crimec_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x600000, 0x600001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x600000, 0x600001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x801fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0xa00000, 0xa0ffff) AM_RAM /* Main RAM */
ADDRESS_MAP_END
@ -523,8 +523,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( tetrist_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x200000, 0x200001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x200001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x600000, 0x60000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
AM_RANGE(0x800000, 0x807fff) AM_RAM /* Main RAM */
@ -538,8 +538,8 @@ static ADDRESS_MAP_START( tetrista_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x600000, 0x600001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0xff00)
AM_RANGE(0x800000, 0x803fff) AM_RAM /* Main RAM */
AM_RANGE(0xa00000, 0xa00001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xa00000, 0xa00001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
ADDRESS_MAP_END
@ -548,8 +548,8 @@ static ADDRESS_MAP_START( hitice_map, AS_PROGRAM, 16, taitob_state )
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x600000, 0x60000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
AM_RANGE(0x610000, 0x610001) AM_READ_PORT("P3_P4")
AM_RANGE(0x700000, 0x700001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x700002, 0x700003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x700000, 0x700001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x700002, 0x700003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x803fff) AM_RAM /* Main RAM */
AM_RANGE(0xa00000, 0xa01fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0xb00000, 0xb7ffff) AM_RAM_WRITE(hitice_pixelram_w) AM_SHARE("pixelram")
@ -561,8 +561,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( rambo3_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x200000, 0x200001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x200001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x600000, 0x60000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
AM_RANGE(0x600010, 0x600011) AM_READ(tracky1_lo_r) /*player 1*/
@ -587,8 +587,8 @@ static ADDRESS_MAP_START( pbobble_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x500028, 0x500029) AM_WRITE(player_34_coin_ctrl_w) /* simply locks coins 3&4 out */
AM_RANGE(0x50002e, 0x50002f) AM_READ_PORT("P3_P4_B") /* shown in service mode, game omits to read it */
AM_RANGE(0x600000, 0x600003) AM_WRITE(gain_control_w)
AM_RANGE(0x700000, 0x700001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x700002, 0x700003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x700000, 0x700001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x700002, 0x700003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x801fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x900000, 0x90ffff) AM_RAM /* Main RAM */
ADDRESS_MAP_END
@ -603,16 +603,16 @@ static ADDRESS_MAP_START( spacedx_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x500028, 0x500029) AM_WRITE(player_34_coin_ctrl_w) /* simply locks coins 3&4 out */
AM_RANGE(0x50002e, 0x50002f) AM_READ_PORT("P3_P4_B")
AM_RANGE(0x600000, 0x600003) AM_WRITE(gain_control_w)
AM_RANGE(0x700000, 0x700001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x700002, 0x700003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x700000, 0x700001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x700002, 0x700003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x801fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x900000, 0x90ffff) AM_RAM /* Main RAM */
ADDRESS_MAP_END
static ADDRESS_MAP_START( spacedxo_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x100001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x100000, 0x100001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x20000f) AM_DEVREAD8_LEGACY("tc0220ioc", tc0220ioc_r, 0x00ff) AM_WRITE(spacedxo_tc0220ioc_w)
AM_RANGE(0x210000, 0x210001) AM_READ_PORT("IN3")
AM_RANGE(0x220000, 0x220001) AM_READ_PORT("IN4")
@ -632,8 +632,8 @@ static ADDRESS_MAP_START( qzshowby_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x200028, 0x200029) AM_READWRITE(player_34_coin_ctrl_r, player_34_coin_ctrl_w)
AM_RANGE(0x20002e, 0x20002f) AM_READ_PORT("P3_P4_B") /* player 3,4 buttons */
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x600000, 0x600001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x600000, 0x600001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x700000, 0x700003) AM_WRITE(gain_control_w)
AM_RANGE(0x800000, 0x801fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x900000, 0x90ffff) AM_RAM /* Main RAM */
@ -642,8 +642,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( viofight_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x200000, 0x200001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x200001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
TC0180VCU_MEMRW( 0x400000 )
AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x800000, 0x80000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
@ -658,15 +658,15 @@ static ADDRESS_MAP_START( masterw_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x800000, 0x800001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0xff00)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0xff00)
AM_RANGE(0xa00000, 0xa00001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xa00000, 0xa00001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
ADDRESS_MAP_END
static ADDRESS_MAP_START( silentd_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x100001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x100000, 0x100001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
// AM_RANGE(0x10001a, 0x10001b) AM_READNOP // ??? read at $1e344
// AM_RANGE(0x10001c, 0x10001d) AM_READNOP // ??? read at $1e356
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
@ -688,8 +688,8 @@ static ADDRESS_MAP_START( selfeena_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x400000, 0x40000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00)
AM_RANGE(0x410000, 0x41000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0xff00) /* mirror address - seems to be only used for coin control */
AM_RANGE(0x500000, 0x500001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x500002, 0x500003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x500000, 0x500001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x500002, 0x500003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
ADDRESS_MAP_END
@ -698,8 +698,8 @@ static ADDRESS_MAP_START( sbm_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM /* Main RAM */
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_wordswap_r, tc0510nio_halfword_wordswap_w)
AM_RANGE(0x320000, 0x320001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
TC0180VCU_MEMRW( 0x900000 )
ADDRESS_MAP_END
@ -710,15 +710,15 @@ static ADDRESS_MAP_START( realpunc_map, AS_PROGRAM, 16, taitob_state )
AM_RANGE(0x130000, 0x13ffff) AM_RAM // Check me
AM_RANGE(0x180000, 0x18000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_wordswap_r, tc0510nio_halfword_wordswap_w)
AM_RANGE(0x184000, 0x184001) AM_WRITE(realpunc_video_ctrl_w)
AM_RANGE(0x188000, 0x188001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x188002, 0x188003) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_comm_w, 0xff00)
AM_RANGE(0x188000, 0x188001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x188002, 0x188003) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x18c000, 0x18c001) AM_WRITE(realpunc_output_w)
TC0180VCU_MEMRW( 0x200000 )
AM_RANGE(0x280000, 0x281fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x300001) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_status_r, hd63484_address_w)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE_LEGACY("hd63484", hd63484_data_r, hd63484_data_w)
// AM_RANGE(0x320000, 0x320001) AM_READ_LEGACY(SMH_NOP) // ?
AM_RANGE(0x320002, 0x320003) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_comm_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_w, 0xff00)
ADDRESS_MAP_END
static ADDRESS_MAP_START( masterw_sound_map, AS_PROGRAM, 8, taitob_state )
@ -726,8 +726,8 @@ static ADDRESS_MAP_START( masterw_sound_map, AS_PROGRAM, 8, taitob_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taitob_state )
@ -735,8 +735,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taitob_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xe600, 0xe600) AM_WRITENOP /* ? */
AM_RANGE(0xea00, 0xea00) AM_READNOP
@ -751,8 +751,8 @@ static ADDRESS_MAP_START( viofight_sound_map, AS_PROGRAM, 8, taitob_state )
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
AM_RANGE(0xb000, 0xb001) AM_DEVREADWRITE("oki", okim6295_device, read, write) /* yes, both addresses for the same chip */
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
ADDRESS_MAP_END

View File

@ -684,8 +684,8 @@ static ADDRESS_MAP_START( finalb_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
AM_RANGE(0x200000, 0x200007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_word_w) /* palette */
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x810000, 0x81ffff) AM_WRITENOP /* error in game init code ? */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
@ -698,8 +698,8 @@ static ADDRESS_MAP_START( dondokod_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -710,8 +710,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( megab_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x100001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x100000, 0x100001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x100002, 0x100003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x120000, 0x12000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x180000, 0x180fff) AM_READWRITE(cchip2_word_r, cchip2_word_w) AM_SHARE("cchip2_ram")
AM_RANGE(0x200000, 0x20ffff) AM_RAM
@ -727,8 +727,8 @@ static ADDRESS_MAP_START( thundfox_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x101fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x220000, 0x220001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x220002, 0x220003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x220000, 0x220001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x220002, 0x220003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x300000, 0x30ffff) AM_RAM
AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE_LEGACY("tc0100scn_1", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
@ -744,8 +744,8 @@ static ADDRESS_MAP_START( cameltry_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x300018, 0x30001f) AM_READ(cameltry_paddle_r)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x813fff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -759,8 +759,8 @@ static ADDRESS_MAP_START( qtorimon_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
AM_RANGE(0x200000, 0x200007) AM_DEVREADWRITE_LEGACY("tc0110pcr", tc0110pcr_word_r, tc0110pcr_word_w) /* palette */
AM_RANGE(0x500000, 0x50000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x600000, 0x600001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x600000, 0x600001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -772,8 +772,8 @@ static ADDRESS_MAP_START( liquidk_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -792,8 +792,8 @@ static ADDRESS_MAP_START( quizhq_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x580000, 0x580001) AM_READ_PORT("DSWA")
AM_RANGE(0x580002, 0x580003) AM_READ_PORT("IN1")
AM_RANGE(0x580004, 0x580005) AM_READ_PORT("IN2")
AM_RANGE(0x600000, 0x600001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x600000, 0x600001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x600002, 0x600003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x680000, 0x680001) AM_WRITENOP /* ??? */
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x810000, 0x81ffff) AM_WRITENOP /* error in init code ? */
@ -806,8 +806,8 @@ static ADDRESS_MAP_START( ssi_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w)
AM_RANGE(0x200000, 0x20ffff) AM_RAM
AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
// AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* ?? */
AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps (not used) */
AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
@ -819,8 +819,8 @@ static ADDRESS_MAP_START( gunfront_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_wordswap_r, tc0510nio_halfword_wordswap_w)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -839,8 +839,8 @@ static ADDRESS_MAP_START( growl_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x320002, 0x320003) AM_READ_PORT("IN1")
AM_RANGE(0x320004, 0x320005) AM_READ_PORT("IN2")
AM_RANGE(0x340000, 0x340001) AM_WRITE(watchdog_reset16_w)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x500000, 0x50000f) AM_WRITE(taitof2_spritebank_w)
AM_RANGE(0x504000, 0x504001) AM_WRITENOP /* unknown... various values */
AM_RANGE(0x508000, 0x50800f) AM_READ_PORT("IN3")
@ -861,8 +861,8 @@ static ADDRESS_MAP_START( mjnquest_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x320000, 0x320001) AM_WRITE(mjnquest_inputselect_w)
AM_RANGE(0x330000, 0x330001) AM_WRITENOP /* watchdog ? */
AM_RANGE(0x350000, 0x350001) AM_WRITENOP /* watchdog ? */
AM_RANGE(0x360000, 0x360001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x360002, 0x360003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x360000, 0x360001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x360002, 0x360003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x380000, 0x380001) AM_DEVWRITE_LEGACY("tc0100scn", tc0100scn_gfxbank_w) /* scr gfx bank select */
AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x420000, 0x42000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
@ -887,8 +887,8 @@ static ADDRESS_MAP_START( footchmp_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x70000e, 0x70000f) AM_READ_PORT("IN3")
AM_RANGE(0x700010, 0x700011) AM_READ_PORT("IN4")
AM_RANGE(0x800000, 0x800001) AM_WRITE(watchdog_reset16_w) /* ??? */
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
ADDRESS_MAP_END
static ADDRESS_MAP_START( koshien_map, AS_PROGRAM, 16, taitof2_state )
@ -896,8 +896,8 @@ static ADDRESS_MAP_START( koshien_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
AM_RANGE(0x200000, 0x201fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x320002, 0x320003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -908,8 +908,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( yuyugogo_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
@ -926,8 +926,8 @@ static ADDRESS_MAP_START( ninjak_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x300000, 0x30000f) AM_READ(ninjak_input_r)
AM_RANGE(0x30000e, 0x30000f) AM_WRITE(ninjak_coin_word_w)
AM_RANGE(0x380000, 0x380001) AM_WRITE(watchdog_reset16_w) /* ??? */
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x600000, 0x60000f) AM_WRITE(taitof2_spritebank_w)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
@ -946,8 +946,8 @@ static ADDRESS_MAP_START( solfigtr_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x320002, 0x320003) AM_READ_PORT("IN1")
AM_RANGE(0x320004, 0x320005) AM_READ_PORT("IN2")
AM_RANGE(0x340000, 0x340001) AM_WRITE(watchdog_reset16_w) /* NOT VERIFIED */
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x400000, 0x400001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x400002, 0x400003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x500000, 0x50000f) AM_WRITE(taitof2_spritebank_w)
AM_RANGE(0x504000, 0x504001) AM_WRITENOP /* unknown... various values */
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
@ -959,8 +959,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( qzquest_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x17ffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w)
AM_RANGE(0x300000, 0x300001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x400000, 0x401fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
AM_RANGE(0x500000, 0x50ffff) AM_RAM
AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_SHARE("spriteram")
@ -970,8 +970,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pulirula_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x0bffff) AM_ROM
AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x300000, 0x30ffff) AM_RAM
AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w) /* ROZ tilemap */
AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
@ -995,16 +995,16 @@ static ADDRESS_MAP_START( metalb_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x600000, 0x60001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)
AM_RANGE(0x700000, 0x703fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x800000, 0x80000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_wordswap_r, tc0510nio_halfword_wordswap_w)
AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x900002, 0x900003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x900002, 0x900003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
// AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP /* ??? */
ADDRESS_MAP_END
static ADDRESS_MAP_START( qzchikyu_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x17ffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w)
AM_RANGE(0x300000, 0x300001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x400000, 0x401fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
AM_RANGE(0x500000, 0x50ffff) AM_RAM
AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_SHARE("spriteram")
@ -1020,8 +1020,8 @@ static ADDRESS_MAP_START( yesnoj_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
// AM_RANGE(0x700000, 0x70000b) AM_READ_LEGACY(yesnoj_unknown_r) /* what's this? */
AM_RANGE(0x800000, 0x800001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x800000, 0x800001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x900002, 0x900003) AM_WRITENOP /* lots of similar writes */
AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("IN0")
AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("IN1")
@ -1048,8 +1048,8 @@ static ADDRESS_MAP_START( deadconx_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x70000a, 0x70000b) AM_READ_PORT("IN0")
AM_RANGE(0x70000c, 0x70000d) AM_READ_PORT("IN1")
AM_RANGE(0x800000, 0x800001) AM_WRITE(watchdog_reset16_w) /* ??? */
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
ADDRESS_MAP_END
static ADDRESS_MAP_START( dinorex_map, AS_PROGRAM, 16, taitof2_state )
@ -1062,15 +1062,15 @@ static ADDRESS_MAP_START( dinorex_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_word_r, tc0100scn_word_w) /* tilemaps */
AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE_LEGACY("tc0100scn", tc0100scn_ctrl_word_r, tc0100scn_ctrl_word_w)
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP /* watchdog? */
ADDRESS_MAP_END
static ADDRESS_MAP_START( qjinsei_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x300000, 0x30ffff) AM_RAM
AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* watchdog ? */
AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
@ -1087,8 +1087,8 @@ static ADDRESS_MAP_START( qcrayon_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x100000, 0x10ffff) AM_RAM
// AM_RANGE(0x200000, 0x200001) AM_WRITENOP /* unknown */
AM_RANGE(0x300000, 0x3fffff) AM_ROM AM_REGION("extra", 0) /* extra data rom */
AM_RANGE(0x500000, 0x500001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x500002, 0x500003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x500000, 0x500001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x500002, 0x500003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")
@ -1108,15 +1108,15 @@ static ADDRESS_MAP_START( qcrayon2_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x600000, 0x67ffff) AM_ROM AM_REGION("extra", 0) /* extra data rom */
AM_RANGE(0x700000, 0x70000f) AM_DEVREADWRITE_LEGACY("tc0510nio", tc0510nio_halfword_r, tc0510nio_halfword_w)
AM_RANGE(0x900000, 0x90001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff) /* ?? */
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0xb00000, 0xb017ff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
ADDRESS_MAP_END
static ADDRESS_MAP_START( driftout_map, AS_PROGRAM, 16, taitof2_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
AM_RANGE(0x300000, 0x30ffff) AM_RAM
AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w) /* ROZ tilemap */
AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
@ -1155,8 +1155,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taitof2_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank2")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -1171,8 +1171,8 @@ static ADDRESS_MAP_START( cameltrya_sound_map, AS_PROGRAM, 8, taitof2_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM // I can't see a bank control, but there ARE some bytes past 0x8000
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
// AM_RANGE(0xb000, 0xb000) AM_WRITE_LEGACY(unknown_w) // probably controlling sample player?
AM_RANGE(0xb000, 0xb001) AM_MIRROR(0x0001) AM_DEVREADWRITE("oki", okim6295_device, read, write)
ADDRESS_MAP_END

View File

@ -251,8 +251,8 @@ static ADDRESS_MAP_START( syvalion_map, AS_PROGRAM, 16, taitoh_state )
AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM AM_SHARE("m68000_mainram")
AM_RANGE(0x200000, 0x200001) AM_READ8(syvalion_input_bypass_r, 0x00ff) AM_DEVWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_w, 0x00ff)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
ADDRESS_MAP_END
@ -262,8 +262,8 @@ static ADDRESS_MAP_START( recordbr_map, AS_PROGRAM, 16, taitoh_state )
AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM AM_SHARE("m68000_mainram")
AM_RANGE(0x200000, 0x200001) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_portreg_r, tc0220ioc_portreg_w, 0x00ff)
AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_port_r, tc0220ioc_port_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
ADDRESS_MAP_END
@ -272,8 +272,8 @@ static ADDRESS_MAP_START( dleague_map, AS_PROGRAM, 16, taitoh_state )
AM_RANGE(0x000000, 0x05ffff) AM_ROM
AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM AM_SHARE("m68000_mainram")
AM_RANGE(0x200000, 0x20000f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x300000, 0x300001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x300002, 0x300003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x400000, 0x420fff) AM_DEVREADWRITE_LEGACY("tc0080vco", tc0080vco_word_r, tc0080vco_word_w)
AM_RANGE(0x500800, 0x500fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
AM_RANGE(0x600000, 0x600001) AM_WRITENOP /* ?? writes zero once per frame */
@ -285,8 +285,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taitoh_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan control */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */

View File

@ -672,8 +672,8 @@ static ADDRESS_MAP_START( fhawk_2_map, AS_PROGRAM, 8, taitol_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank6")
AM_RANGE(0xc000, 0xc000) AM_WRITE(rombank2switch_w)
AM_RANGE(0xc800, 0xc800) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_port_w)
AM_RANGE(0xc801, 0xc801) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xc800, 0xc800) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_port_w)
AM_RANGE(0xc801, 0xc801) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xd000, 0xd000) AM_READ_PORT("DSWA") AM_WRITENOP // Direct copy of input port 0
AM_RANGE(0xd001, 0xd001) AM_READ_PORT("DSWB")
AM_RANGE(0xd002, 0xd002) AM_READ_PORT("IN0")
@ -688,8 +688,8 @@ static ADDRESS_MAP_START( fhawk_3_map, AS_PROGRAM, 8, taitol_state )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank7")
AM_RANGE(0x8000, 0x9fff) AM_RAM
AM_RANGE(0xe000, 0xe000) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe000, 0xe000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
ADDRESS_MAP_END
@ -699,8 +699,8 @@ static ADDRESS_MAP_START( raimais_map, AS_PROGRAM, 8, taitol_state )
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("share1")
AM_RANGE(0x8800, 0x8800) AM_READWRITE(mux_r, mux_w)
AM_RANGE(0x8801, 0x8801) AM_WRITE(mux_ctrl_w) AM_READNOP // Watchdog or interrupt ack (value ignored)
AM_RANGE(0x8c00, 0x8c00) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_port_w)
AM_RANGE(0x8c01, 0x8c01) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0x8c00, 0x8c00) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_port_w)
AM_RANGE(0x8c01, 0x8c01) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xa000, 0xbfff) AM_RAM
ADDRESS_MAP_END
@ -724,8 +724,8 @@ static ADDRESS_MAP_START( raimais_3_map, AS_PROGRAM, 8, taitol_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank7")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xe600, 0xe600) AM_WRITENOP /* ? */
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -751,8 +751,8 @@ static ADDRESS_MAP_START( champwr_2_map, AS_PROGRAM, 8, taitol_state )
AM_RANGE(0xe004, 0xe004) AM_WRITE(control2_w)
AM_RANGE(0xe007, 0xe007) AM_READ_PORT("IN2")
AM_RANGE(0xe008, 0xe00f) AM_READNOP
AM_RANGE(0xe800, 0xe800) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_port_w)
AM_RANGE(0xe801, 0xe801) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xe800, 0xe800) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_port_w)
AM_RANGE(0xe801, 0xe801) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w)
AM_RANGE(0xf000, 0xf000) AM_READWRITE(rombank2switch_r, rombank2switch_w)
ADDRESS_MAP_END
@ -761,8 +761,8 @@ static ADDRESS_MAP_START( champwr_3_map, AS_PROGRAM, 8, taitol_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank7")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
AM_RANGE(0xa000, 0xa000) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xb000, 0xb000) AM_WRITE(champwr_msm5205_hi_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(champwr_msm5205_lo_w)
AM_RANGE(0xd000, 0xd000) AM_WRITE(champwr_msm5205_start_w)

View File

@ -433,8 +433,8 @@ static ADDRESS_MAP_START( superman_map, AS_PROGRAM, 16, taitox_state )
AM_RANGE(0x400000, 0x400001) AM_WRITENOP /* written each frame at $3aa2, mostly 0x10 */
AM_RANGE(0x500000, 0x500007) AM_READ(superman_dsw_input_r)
AM_RANGE(0x600000, 0x600001) AM_WRITENOP /* written each frame at $3ab0, mostly 0x10 */
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x900000, 0x9007ff) AM_READWRITE_LEGACY(cchip1_ram_r, cchip1_ram_w)
AM_RANGE(0x900802, 0x900803) AM_READWRITE_LEGACY(cchip1_ctrl_r, cchip1_ctrl_w)
AM_RANGE(0x900c00, 0x900c01) AM_WRITE_LEGACY(cchip1_bank_w)
@ -450,8 +450,8 @@ static ADDRESS_MAP_START( daisenpu_map, AS_PROGRAM, 16, taitox_state )
// AM_RANGE(0x400000, 0x400001) AM_WRITENOP /* written each frame at $2ac, values change */
AM_RANGE(0x500000, 0x50000f) AM_READ(superman_dsw_input_r)
// AM_RANGE(0x600000, 0x600001) AM_WRITENOP /* written each frame at $2a2, values change */
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
@ -465,8 +465,8 @@ static ADDRESS_MAP_START( gigandes_map, AS_PROGRAM, 16, taitox_state )
AM_RANGE(0x400000, 0x400001) AM_WRITENOP /* 0x1 written each frame at $d42, watchdog? */
AM_RANGE(0x500000, 0x500007) AM_READ(superman_dsw_input_r)
AM_RANGE(0x600000, 0x600001) AM_WRITENOP /* 0x1 written each frame at $d3c, watchdog? */
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
@ -480,8 +480,8 @@ static ADDRESS_MAP_START( ballbros_map, AS_PROGRAM, 16, taitox_state )
AM_RANGE(0x400000, 0x400001) AM_WRITENOP /* 0x1 written each frame at $c56, watchdog? */
AM_RANGE(0x500000, 0x50000f) AM_READ(superman_dsw_input_r)
AM_RANGE(0x600000, 0x600001) AM_WRITENOP /* 0x1 written each frame at $c4e, watchdog? */
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x800001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x800002, 0x800003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x900000, 0x90000f) AM_READWRITE(daisenpu_input_r, daisenpu_input_w)
AM_RANGE(0xb00000, 0xb00fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) // Sprites Y
@ -498,8 +498,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taitox_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank2")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -512,8 +512,8 @@ static ADDRESS_MAP_START( daisenpu_sound_map, AS_PROGRAM, 8, taitox_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank2")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */

View File

@ -1417,9 +1417,9 @@ WRITE8_MEMBER(taitoz_state::sound_bankswitch_w)
WRITE16_MEMBER(taitoz_state::taitoz_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
#ifdef MAME_DEBUG
// if (data & 0xff00)
@ -1435,7 +1435,7 @@ WRITE16_MEMBER(taitoz_state::taitoz_sound_w)
READ16_MEMBER(taitoz_state::taitoz_sound_r)
{
if (offset == 1)
return (tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff);
return (m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff);
else
return 0;
}
@ -1444,9 +1444,9 @@ READ16_MEMBER(taitoz_state::taitoz_sound_r)
WRITE16_MEMBER(taitoz_state::taitoz_msb_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, 0, (data >> 8) & 0xff);
m_tc0140syt->tc0140syt_port_w(0, (data >> 8) & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, 0, (data >> 8) & 0xff);
m_tc0140syt->tc0140syt_comm_w(0, (data >> 8) & 0xff);
#ifdef MAME_DEBUG
if (data & 0xff)
@ -1462,7 +1462,7 @@ WRITE16_MEMBER(taitoz_state::taitoz_msb_sound_w)
READ16_MEMBER(taitoz_state::taitoz_msb_sound_r)
{
if (offset == 1)
return ((tc0140syt_comm_r(m_tc0140syt, 0) & 0xff) << 8);
return ((m_tc0140syt->tc0140syt_comm_r(0) & 0xff) << 8);
else
return 0;
}
@ -1746,8 +1746,8 @@ static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8, taitoz_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITE(taitoz_pancontrol) /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -3039,7 +3039,7 @@ MACHINE_START_MEMBER(taitoz_state,bshark)
m_tc0150rod = machine().device("tc0150rod");
m_tc0480scp = machine().device("tc0480scp");
m_tc0220ioc = machine().device("tc0220ioc");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
save_item(NAME(m_cpua_ctrl));

View File

@ -401,8 +401,8 @@ static ADDRESS_MAP_START( airsys_map, AS_PROGRAM, 16, taitoair_state )
AM_RANGE(0xa00000, 0xa00007) AM_READ(stick_input_r)
AM_RANGE(0xa00100, 0xa00107) AM_READ(stick2_input_r)
AM_RANGE(0xa00200, 0xa0020f) AM_DEVREADWRITE8_LEGACY("tc0220ioc", tc0220ioc_r, tc0220ioc_w, 0x00ff) /* other I/O */
AM_RANGE(0xa80000, 0xa80001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0xa80002, 0xa80003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xa80000, 0xa80001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0xa80002, 0xa80003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xb00000, 0xb007ff) AM_RAM /* "power common ram" (mecha drive) */
ADDRESS_MAP_END
@ -413,8 +413,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, taitoair_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan control */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */

View File

@ -419,9 +419,9 @@ WRITE8_MEMBER(topspeed_state::sound_bankswitch_w)/* assumes Z80 sandwiched betwe
WRITE8_MEMBER(topspeed_state::topspeed_tc0140syt_comm_w)
{
device_t *device = machine().device("tc0140syt");
tc0140syt_device *device = machine().device<tc0140syt_device>("tc0140syt");
machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
tc0140syt_comm_w(device, space, 0, data);
device->tc0140syt_comm_w(space, 0, data);
}
static void topspeed_msm5205_clock( device_t *device, int chip )
@ -502,8 +502,8 @@ static ADDRESS_MAP_START( topspeed_map, AS_PROGRAM, 16, topspeed_state )
AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(sharedram_r, sharedram_w) AM_SHARE("sharedram")
AM_RANGE(0x500000, 0x503fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_word_w) AM_SHARE("paletteram")
AM_RANGE(0x600002, 0x600003) AM_WRITE(cpua_ctrl_w)
AM_RANGE(0x7e0000, 0x7e0001) AM_READNOP AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0x7e0002, 0x7e0003) AM_DEVREAD8_LEGACY("tc0140syt", tc0140syt_comm_r, 0x00ff) AM_WRITE8(topspeed_tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x7e0000, 0x7e0001) AM_READNOP AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0x7e0002, 0x7e0003) AM_DEVREAD8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, 0x00ff) AM_WRITE8(topspeed_tc0140syt_comm_w, 0x00ff)
AM_RANGE(0x800000, 0x8003ff) AM_RAM AM_SHARE("raster_ctrl")
AM_RANGE(0x800400, 0x80ffff) AM_RAM
AM_RANGE(0xa00000, 0xa0ffff) AM_DEVREADWRITE_LEGACY("pc080sn_1", pc080sn_word_r, pc080sn_word_w)
@ -534,8 +534,8 @@ static ADDRESS_MAP_START( z80_map, AS_PROGRAM, 8, topspeed_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
AM_RANGE(0x8000, 0x8fff) AM_RAM
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xa001, 0xa001) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xb000, 0xd3ff) AM_WRITE(topspeed_msm5205_command_w)
AM_RANGE(0xd400, 0xd400) AM_WRITENOP // ym2151 volume
AM_RANGE(0xd600, 0xd600) AM_WRITENOP // ym2151 volume

View File

@ -71,8 +71,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, volfied_state )
AM_RANGE(0x600000, 0x600001) AM_WRITE(volfied_video_mask_w)
AM_RANGE(0x700000, 0x700001) AM_WRITE(volfied_sprite_ctrl_w)
AM_RANGE(0xd00000, 0xd00001) AM_READWRITE(volfied_video_ctrl_r, volfied_video_ctrl_w)
AM_RANGE(0xe00000, 0xe00001) AM_DEVWRITE8_LEGACY("tc0140syt", tc0140syt_port_w, 0x00ff)
AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8_LEGACY("tc0140syt", tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xe00000, 0xe00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0x00ff)
AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0x00ff)
AM_RANGE(0xf00000, 0xf007ff) AM_READWRITE(volfied_cchip_ram_r, volfied_cchip_ram_w)
AM_RANGE(0xf00802, 0xf00803) AM_READWRITE(volfied_cchip_ctrl_r, volfied_cchip_ctrl_w)
AM_RANGE(0xf00c00, 0xf00c01) AM_WRITE(volfied_cchip_bank_w)
@ -81,8 +81,8 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( z80_map, AS_PROGRAM, 8, volfied_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0x87ff) AM_RAM
AM_RANGE(0x8800, 0x8800) AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0x8801, 0x8801) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0x8800, 0x8800) AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0x8801, 0x8801) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w)
AM_RANGE(0x9800, 0x9800) AM_WRITENOP /* ? */
ADDRESS_MAP_END

View File

@ -178,15 +178,15 @@ WRITE8_MEMBER(warriorb_state::sound_bankswitch_w)
WRITE16_MEMBER(warriorb_state::warriorb_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
}
READ16_MEMBER(warriorb_state::warriorb_sound_r)
{
if (offset == 1)
return ((tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff));
return ((m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff));
else
return 0;
}
@ -259,8 +259,8 @@ static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8, warriorb_state )
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank10")
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITE(warriorb_pancontrol) /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -509,7 +509,7 @@ void warriorb_state::machine_start()
m_maincpu = machine().device<cpu_device>("maincpu");
m_audiocpu = machine().device<cpu_device>("audiocpu");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
m_tc0100scn_1 = machine().device("tc0100scn_1");
m_tc0100scn_2 = machine().device("tc0100scn_2");

View File

@ -614,15 +614,15 @@ WRITE8_MEMBER(wgp_state::sound_bankswitch_w)
WRITE16_MEMBER(wgp_state::wgp_sound_w)
{
if (offset == 0)
tc0140syt_port_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
else if (offset == 1)
tc0140syt_comm_w(m_tc0140syt, space, 0, data & 0xff);
m_tc0140syt->tc0140syt_comm_w(space, 0, data & 0xff);
}
READ16_MEMBER(wgp_state::wgp_sound_r)
{
if (offset == 1)
return ((tc0140syt_comm_r(m_tc0140syt, space, 0) & 0xff));
return ((m_tc0140syt->tc0140syt_comm_r(space, 0) & 0xff));
else
return 0;
}
@ -671,8 +671,8 @@ static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8, wgp_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xea00, 0xea00) AM_READNOP
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@ -940,7 +940,7 @@ void wgp_state::machine_start()
m_maincpu = machine().device<cpu_device>("maincpu");
m_audiocpu = machine().device<cpu_device>("audiocpu");
m_subcpu = machine().device<cpu_device>("sub");
m_tc0140syt = machine().device("tc0140syt");
m_tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
m_tc0100scn = machine().device("tc0100scn");
save_item(NAME(m_cpua_ctrl));

View File

@ -1105,21 +1105,21 @@ WRITE8_MEMBER(zn_state::fx1a_sound_bankswitch_w)
READ32_MEMBER(zn_state::taitofx1a_ymsound_r)
{
device_t *tc0140syt = machine().device("tc0140syt");
return tc0140syt_comm_r(tc0140syt, space, 0) << 16;
tc0140syt_device *tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
return tc0140syt->tc0140syt_comm_r(space, 0) << 16;
}
WRITE32_MEMBER(zn_state::taitofx1a_ymsound_w)
{
device_t *tc0140syt = machine().device("tc0140syt");
tc0140syt_device *tc0140syt = machine().device<tc0140syt_device>("tc0140syt");
if (mem_mask == 0x0000ffff)
{
tc0140syt_port_w(tc0140syt, space, 0, data & 0xff);
tc0140syt->tc0140syt_port_w(space, 0, data & 0xff);
}
else
{
tc0140syt_comm_w(tc0140syt, space, 0, (data >> 16) & 0xff);
tc0140syt->tc0140syt_comm_w(space, 0, (data >> 16) & 0xff);
}
}
@ -1147,8 +1147,8 @@ static ADDRESS_MAP_START( fx1a_sound_map, AS_PROGRAM, 8, zn_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0xc000, 0xdfff) AM_RAM
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE_LEGACY("tc0140syt", tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE_LEGACY("tc0140syt", tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, tc0140syt_slave_comm_r, tc0140syt_slave_comm_w)
AM_RANGE(0xe400, 0xe403) AM_WRITENOP /* pan */
AM_RANGE(0xee00, 0xee00) AM_NOP /* ? */
AM_RANGE(0xf000, 0xf000) AM_WRITENOP /* ? */

View File

@ -5,6 +5,7 @@
*************************************************************************/
#include <sound/flt_vol.h>
#include <audio/taitosnd.h>
#define DARIUS_VOL_MAX (3*2 + 2)
#define DARIUS_PAN_MAX (2 + 2 + 1) /* FM 2port + PSG 2port + DA 1port */
@ -39,7 +40,7 @@ public:
cpu_device *m_audiocpu;
device_t *m_cpub;
device_t *m_adpcm;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
device_t *m_pc080sn;
device_t *m_lscreen;

View File

@ -5,6 +5,7 @@
*************************************************************************/
#include <sound/flt_vol.h>
#include <audio/taitosnd.h>
class ninjaw_state : public driver_device
{
@ -25,7 +26,7 @@ public:
cpu_device *m_maincpu;
cpu_device *m_audiocpu;
cpu_device *m_subcpu;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
device_t *m_tc0100scn_1;
device_t *m_tc0100scn_2;
device_t *m_tc0100scn_3;

View File

@ -6,6 +6,7 @@
#include "machine/eeprom.h"
#include <sound/flt_vol.h>
#include <audio/taitosnd.h>
struct othunder_tempsprite
{
@ -44,7 +45,7 @@ public:
device_t *m_tc0220ioc;
device_t *m_tc0100scn;
device_t *m_tc0110pcr;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
filter_volume_device *m_2610_0l;
filter_volume_device *m_2610_0r;
filter_volume_device *m_2610_1l;

View File

@ -4,6 +4,8 @@
*************************************************************************/
#include <audio/taitosnd.h>
struct slapshot_tempsprite
{
int gfx;
@ -49,7 +51,7 @@ public:
/* devices */
cpu_device *m_maincpu;
cpu_device *m_audiocpu;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
device_t *m_tc0480scp;
device_t *m_tc0360pri;
device_t *m_tc0640fio;

View File

@ -5,6 +5,7 @@
*************************************************************************/
#include <audio/taitosnd.h>
#include "machine/eeprom.h"
class taitoz_state : public driver_device
@ -38,7 +39,7 @@ public:
device_t *m_tc0150rod;
device_t *m_tc0100scn;
device_t *m_tc0220ioc;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
DECLARE_WRITE16_MEMBER(cpua_ctrl_w);
DECLARE_WRITE16_MEMBER(chasehq_cpua_ctrl_w);

View File

@ -5,6 +5,7 @@
*************************************************************************/
#include <sound/flt_vol.h>
#include <audio/taitosnd.h>
class warriorb_state : public driver_device
{
@ -23,7 +24,7 @@ public:
/* devices */
cpu_device *m_maincpu;
cpu_device *m_audiocpu;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
device_t *m_tc0100scn_1;
device_t *m_tc0100scn_2;
device_t *m_lscreen;

View File

@ -4,6 +4,8 @@
*************************************************************************/
#include <audio/taitosnd.h>
class wgp_state : public driver_device
{
public:
@ -44,7 +46,7 @@ public:
cpu_device *m_audiocpu;
cpu_device *m_subcpu;
device_t *m_tc0100scn;
device_t *m_tc0140syt;
tc0140syt_device *m_tc0140syt;
DECLARE_READ16_MEMBER(sharedram_r);
DECLARE_WRITE16_MEMBER(sharedram_w);
DECLARE_WRITE16_MEMBER(cpua_ctrl_w);

View File

@ -222,7 +222,7 @@ WRITE8_MEMBER( a5105_state::a5105_ab_w )
break;
case 6:
beep_set_state(m_beep, BIT(data, 0));
m_beep->set_state(BIT(data, 0));
break;
}
}
@ -482,7 +482,7 @@ void a5105_state::machine_reset()
{
address_space &space = m_maincpu->space(AS_PROGRAM);
a5105_ab_w(space, 0, 9); // turn motor off
beep_set_frequency(m_beep, 500);
m_beep->set_frequency(500);
m_ram_base = (UINT8*)machine().device<ram_device>(RAM_TAG)->pointer();
m_rom_base = (UINT8*)machine().root_device().memregion("maincpu")->base();

View File

@ -76,7 +76,7 @@ private:
TIMER_CALLBACK_MEMBER(alphatro_state::alphatro_beepoff)
{
beep_set_state(m_beep, 0);
m_beep->set_state(0);
}
READ8_MEMBER( alphatro_state::port10_r )
@ -102,7 +102,7 @@ WRITE8_MEMBER( alphatro_state::port10_w )
if (length)
{
machine().scheduler().timer_set(attotime::from_msec(length), timer_expired_delegate(FUNC(alphatro_state::alphatro_beepoff),this));
beep_set_state(m_beep, 1);
m_beep->set_state(1);
}
m_cass->change_state( BIT(data, 3) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
@ -360,8 +360,8 @@ void alphatro_state::machine_reset()
m_sys_timer->adjust(attotime::from_usec(10),0,attotime::from_usec(10));
m_serial_timer->adjust(attotime::from_hz(500),0,attotime::from_hz(500)); // USART clock - this is a guesstimate
m_timer_bit = 0;
beep_set_state(m_beep, 0);
beep_set_frequency(m_beep, 950); /* piezo-device needs to be measured */
m_beep->set_state(0);
m_beep->set_frequency(950); /* piezo-device needs to be measured */
}
void alphatro_state::palette_init()

View File

@ -285,7 +285,7 @@ WRITE8_MEMBER( bigbord2_state::portc8_w )
break;
case 7:
// beeper
beep_set_state(m_beeper, m_c8[7]);
m_beeper->set_state(m_c8[7]);
break;
}
}
@ -556,8 +556,8 @@ void bigbord2_state::machine_reset()
UINT8 i;
for (i = 0; i < 8; i++)
m_c8[i] = 0;
beep_set_state(m_beeper, 0);
beep_set_frequency(m_beeper, 950); // actual frequency is unknown
m_beeper->set_state(0);
m_beeper->set_frequency(950); // actual frequency is unknown
membank("bankr")->set_entry(0);
membank("bankv")->set_entry(0);
membank("banka")->set_entry(0);

View File

@ -133,7 +133,7 @@ WRITE8_MEMBER( bmjr_state::tape_w )
{
if(!m_tape_switch)
{
beep_set_state(m_beep, !BIT(data, 7));
m_beep->set_state(!BIT(data, 7));
}
else
{
@ -333,8 +333,8 @@ void bmjr_state::palette_init()
void bmjr_state::machine_start()
{
beep_set_frequency(m_beep, 1200); //guesswork
beep_set_state(m_beep, 0);
m_beep->set_frequency(1200); //guesswork
m_beep->set_state(0);
}
void bmjr_state::machine_reset()

View File

@ -364,7 +364,7 @@ READ8_MEMBER( bml3_state::bml3_beep_r)
WRITE8_MEMBER( bml3_state::bml3_beep_w)
{
beep_set_state(m_beep,!BIT(data, 7));
m_beep->set_state(!BIT(data, 7));
}
READ8_MEMBER( bml3_state::bml3_a000_r) { return m_extram[offset + 0xa000]; }
@ -632,8 +632,8 @@ void bml3_state::palette_init()
void bml3_state::machine_start()
{
beep_set_frequency(machine().device(BEEPER_TAG),1200); //guesswork
beep_set_state(machine().device(BEEPER_TAG),0);
m_beep->set_frequency(1200); //guesswork
m_beep->set_state(0);
m_extram = auto_alloc_array(machine(),UINT8,0x10000);
}

View File

@ -206,10 +206,10 @@ INPUT_CHANGED_MEMBER(ex800_state::online_switch)
void ex800_state::machine_start()
{
m_irq_state = ASSERT_LINE;
device_t *speaker = machine().device(BEEPER_TAG);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
/* Setup beep */
beep_set_state(speaker, 0);
beep_set_frequency(speaker, 4000); /* measured at 4000 Hz */
speaker->set_state(0);
speaker->set_frequency(4000); /* measured at 4000 Hz */
}
@ -265,11 +265,11 @@ WRITE8_MEMBER(ex800_state::ex800_portb_w)
WRITE8_MEMBER(ex800_state::ex800_portc_w)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
if (data & 0x80)
beep_set_state(speaker, 0);
speaker->set_state(0);
else
beep_set_state(speaker, 1);
speaker->set_state(1);
logerror("PC W %x @%x\n", data, space.device().safe_pc());
}

View File

@ -667,7 +667,7 @@ WRITE8_MEMBER( fidelz80_state::fidelz80_portc_w )
WRITE8_MEMBER( fidelz80_state::cc10_porta_w )
{
beep_set_state(m_beep, (data & 0x80) ? 0 : 1);
m_beep->set_state((data & 0x80) ? 0 : 1);
m_digit_data = data;

View File

@ -236,7 +236,7 @@ READ8_MEMBER(fm7_state::fm7_irq_cause_r)
TIMER_CALLBACK_MEMBER(fm7_state::fm7_beeper_off)
{
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
logerror("timed beeper off\n");
}
@ -246,23 +246,23 @@ WRITE8_MEMBER(fm7_state::fm7_beeper_w)
if(!m_speaker_active) // speaker not active, disable all beeper sound
{
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
return;
}
if(data & 0x80)
{
if(m_speaker_active)
beep_set_state(machine().device(BEEPER_TAG),1);
machine().device<beep_device>(BEEPER_TAG)->set_state(1);
}
else
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
if(data & 0x40)
{
if(m_speaker_active)
{
beep_set_state(machine().device(BEEPER_TAG),1);
machine().device<beep_device>(BEEPER_TAG)->set_state(1);
logerror("timed beeper on\n");
machine().scheduler().timer_set(attotime::from_msec(205), timer_expired_delegate(FUNC(fm7_state::fm7_beeper_off),this));
}
@ -279,7 +279,7 @@ READ8_MEMBER(fm7_state::fm7_sub_beeper_r)
{
if(m_speaker_active)
{
beep_set_state(machine().device(BEEPER_TAG),1);
machine().device<beep_device>(BEEPER_TAG)->set_state(1);
logerror("timed beeper on\n");
machine().scheduler().timer_set(attotime::from_msec(205), timer_expired_delegate(FUNC(fm7_state::fm7_beeper_off),this));
}
@ -1848,8 +1848,8 @@ MACHINE_START_MEMBER(fm7_state,fm7)
memset(m_shared_ram,0xff,0x80);
m_type = SYS_FM7;
beep_set_frequency(machine().device(BEEPER_TAG),1200);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(1200);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
}
MACHINE_START_MEMBER(fm7_state,fm77av)
@ -1869,8 +1869,8 @@ MACHINE_START_MEMBER(fm7_state,fm77av)
membank("bank21")->set_base(RAM+0x800);
m_type = SYS_FM77AV;
beep_set_frequency(machine().device(BEEPER_TAG),1200);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(1200);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
}
MACHINE_START_MEMBER(fm7_state,fm11)
@ -1880,8 +1880,8 @@ MACHINE_START_MEMBER(fm7_state,fm11)
memset(m_shared_ram,0xff,0x80);
m_type = SYS_FM11;
beep_set_frequency(machine().device(BEEPER_TAG),1200);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(1200);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
// last part of Initiate ROM is visible at the end of RAM too (interrupt vectors)
memcpy(RAM+0x3fff0,ROM+0x0ff0,16);
}
@ -1889,8 +1889,8 @@ MACHINE_START_MEMBER(fm7_state,fm11)
MACHINE_START_MEMBER(fm7_state,fm16)
{
m_type = SYS_FM16;
beep_set_frequency(machine().device(BEEPER_TAG),1200);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(1200);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
}
void fm7_state::machine_reset()

View File

@ -106,7 +106,7 @@ WRITE16_MEMBER( glasgow_state::glasgow_lcd_flag_w )
{
UINT16 lcd_flag = data & 0x8100;
beep_set_state(m_beep, BIT(lcd_flag, 8));
m_beep->set_state(BIT(lcd_flag, 8));
if (lcd_flag)
m_led7 = 255;
@ -153,7 +153,7 @@ WRITE16_MEMBER( glasgow_state::write_lcd_flag )
// UINT8 lcd_flag;
mboard_lcd_invert = 0;
// lcd_flag=data >> 8;
//beep_set_state(0, (data >> 8) & 1 ? 1 : 0);
//m_beep->set_state((data >> 8) & 1 ? 1 : 0);
if ((data >> 8) == 0)
{
mboard_key_selector = 1;
@ -175,7 +175,7 @@ WRITE16_MEMBER( glasgow_state::write_lcd_flag )
WRITE16_MEMBER( glasgow_state::write_irq_flag )
{
beep_set_state(m_beep, data & 0x100);
m_beep->set_state(data & 0x100);
logerror("Write 0x800004 = %x \n", data);
m_irq_flag = 1;
m_beeper = data;
@ -236,7 +236,7 @@ WRITE32_MEMBER( glasgow_state::write_lcd_flag32 )
//logerror("LCD Flag 32 = %x \n", data >> 24);
//beep_set_state(0, (data >> 24) & 1 ? 1 : 0);
//m_beep->set_state((data >> 24) & 1 ? 1 : 0);
// if (lcd_flag != 0)
// m_led7 = 255;
@ -269,7 +269,7 @@ READ16_MEMBER(glasgow_state::read_board_amsterd)
WRITE32_MEMBER( glasgow_state::write_beeper32 )
{
beep_set_state(m_beep, data & 0x01000000);
m_beep->set_state(data & 0x01000000);
logerror("Write 0x8000004 = %x \n", data);
m_irq_flag = 1;
m_beeper = data;
@ -290,7 +290,7 @@ void glasgow_state::machine_start()
mboard_key_selector = 0;
m_irq_flag = 0;
m_lcd_shift_counter = 3;
beep_set_frequency(m_beep, 44);
m_beep->set_frequency(44);
mboard_savestate_register();
}
@ -299,7 +299,7 @@ void glasgow_state::machine_start()
MACHINE_START_MEMBER(glasgow_state,dallas32)
{
m_lcd_shift_counter = 3;
beep_set_frequency(m_beep, 44);
m_beep->set_frequency(44);
mboard_savestate_register();
}

View File

@ -73,7 +73,7 @@ public:
TIMER_CALLBACK_MEMBER(h19_state::h19_beepoff)
{
beep_set_state(m_beep, 0);
m_beep->set_state(0);
}
READ8_MEMBER( h19_state::h19_80_r )
@ -99,7 +99,7 @@ WRITE8_MEMBER( h19_state::h19_c0_w )
offset 20-3F = terminal bell */
UINT8 length = (offset & 0x20) ? 200 : 4;
beep_set_state(m_beep, 1);
m_beep->set_state(1);
machine().scheduler().timer_set(attotime::from_msec(length), timer_expired_delegate(FUNC(h19_state::h19_beepoff),this));
}
@ -291,7 +291,7 @@ INPUT_PORTS_END
void h19_state::machine_reset()
{
beep_set_frequency(m_beep, H19_BEEP_FRQ);
m_beep->set_frequency(H19_BEEP_FRQ);
}
void h19_state::video_start()

View File

@ -102,7 +102,7 @@ WRITE8_MEMBER( h8_state::h8_f0_w )
if (m_digit) output_set_digit_value(m_digit, m_segment);
output_set_value("mon_led",(data & 0x20) ? 0 : 1);
beep_set_state(m_beep, (data & 0x80) ? 0 : 1);
m_beep->set_state((data & 0x80) ? 0 : 1);
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
m_irq_ctl &= 0xf0;
@ -167,7 +167,7 @@ INPUT_PORTS_END
void h8_state::machine_reset()
{
beep_set_frequency(m_beep, H8_BEEP_FRQ);
m_beep->set_frequency(H8_BEEP_FRQ);
output_set_value("pwr_led", 0);
m_irq_ctl = 1;
}

View File

@ -68,7 +68,7 @@ public:
protected:
required_device<via6522_device> m_via;
required_device<cassette_image_device> m_cassette;
required_device<device_t> m_beeper;
required_device<beep_device> m_beeper;
required_device<device_t> m_speaker;
required_memory_region m_region_maincpu;
required_ioport m_line0;
@ -94,7 +94,7 @@ WRITE8_MEMBER(jr100_state::jr100_via_w)
m_beep_en = ((data & 0xe0) == 0xe0);
if(!m_beep_en)
beep_set_state(m_beeper,0);
m_beeper->set_state(0);
}
/* T1L-L */
@ -113,8 +113,8 @@ WRITE8_MEMBER(jr100_state::jr100_via_w)
/* writing here actually enables the beeper, if above masking condition is satisfied */
if(m_beep_en)
{
beep_set_state(m_beeper,1);
beep_set_frequency(m_beeper,894886.25 / (double)(m_t1latch) / 2.0);
m_beeper->set_state(1);
m_beeper->set_frequency(894886.25 / (double)(m_t1latch) / 2.0);
}
}
m_via->write(space,offset,data);
@ -198,8 +198,8 @@ INPUT_PORTS_END
void jr100_state::machine_start()
{
beep_set_frequency(m_beeper,0);
beep_set_state(m_beeper,0);
m_beeper->set_frequency(0);
m_beeper->set_state(0);
}
void jr100_state::machine_reset()

View File

@ -73,7 +73,7 @@ public:
protected:
required_device<cpu_device> m_maincpu;
required_device<device_t> m_beeper;
required_device<beep_device> m_beeper;
required_memory_region m_pcg;
required_memory_region m_gfx_rom;
required_memory_region m_gfx_ram;
@ -297,7 +297,7 @@ READ8_MEMBER(jr200_state::mcu_keyb_r)
WRITE8_MEMBER(jr200_state::jr200_beep_w)
{
/* writing 0x0e enables the beeper, writing anything else disables it */
beep_set_state(m_beeper,((data & 0xf) == 0x0e) ? 1 : 0);
m_beeper->set_state(((data & 0xf) == 0x0e) ? 1 : 0);
}
WRITE8_MEMBER(jr200_state::jr200_beep_freq_w)
@ -308,7 +308,7 @@ WRITE8_MEMBER(jr200_state::jr200_beep_freq_w)
beep_freq = ((m_freq_reg[0]<<8) | (m_freq_reg[1] & 0xff)) + 1;
beep_set_frequency(m_beeper,84000 / beep_freq);
m_beeper->set_frequency(84000 / beep_freq);
}
WRITE8_MEMBER(jr200_state::jr200_border_col_w)
@ -516,8 +516,8 @@ GFXDECODE_END
void jr200_state::machine_start()
{
beep_set_frequency(m_beeper,0);
beep_set_state(m_beeper,0);
m_beeper->set_frequency(0);
m_beeper->set_state(0);
m_timer_d = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(jr200_state::timer_d_callback),this));
}

View File

@ -108,7 +108,7 @@ WRITE8_MEMBER( lx800_state::lx800_portc_w )
logerror("--> err: %d, ack: %d, fire: %d, buzzer: %d\n", BIT(data, 4), BIT(data, 5), BIT(data, 6), BIT(data, 7));
output_set_value("online_led", !BIT(data, 2));
beep_set_state(m_beep, !BIT(data, 7));
m_beep->set_state(!BIT(data, 7));
}
@ -146,8 +146,8 @@ WRITE_LINE_MEMBER( lx800_state::lx800_reset_w )
void lx800_state::machine_start()
{
beep_set_state(m_beep, 0);
beep_set_frequency(m_beep, 4000); /* ? */
m_beep->set_state(0);
m_beep->set_frequency(4000); /* ? */
}

View File

@ -393,20 +393,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_nmi)
m_allowNMI = 0;
m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
}
beep_set_state(m_beep, m_led_status&64?1:0);
m_beep->set_state(m_led_status&64?1:0);
}
TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_nmi_r5)
{
m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
beep_set_state(m_beep, m_led_status&64?1:0);
m_beep->set_state(m_led_status&64?1:0);
}
TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_irq)//only mm2
{
m_maincpu->set_input_line(M65C02_IRQ_LINE, HOLD_LINE);
beep_set_state(m_beep, m_led_status&64?1:0);
m_beep->set_state(m_led_status&64?1:0);
}
void mephisto_state::machine_start()

View File

@ -157,8 +157,8 @@ WRITE8_MEMBER( micronic_state::beep_w )
500, 444, 400, 364, 333, 308, 286, 267
};
beep_set_frequency(m_beep, frequency[data & 0x0f]);
beep_set_state(m_beep, (data & 0x0f) ? 1 : 0);
m_beep->set_frequency(frequency[data & 0x0f]);
m_beep->set_state((data & 0x0f) ? 1 : 0);
}
READ8_MEMBER( micronic_state::irq_flag_r )

View File

@ -243,7 +243,10 @@ WRITE8_MEMBER(polgar_state::write_polgar_IO)
m_lcdc->write(space, BIT(data,0), lcd_char);
}
if (BIT(data,2) || BIT(data,3)) beep_set_state(machine().device("beep"),1); else beep_set_state(machine().device("beep"),0);
if (BIT(data,2) || BIT(data,3))
machine().device<beep_device>("beep")->set_state(1);
else
machine().device<beep_device>("beep")->set_state(0);
if (BIT(data,7) && BIT(data, 4)) {
for (i = 0;i < 8;i++)
@ -408,9 +411,12 @@ WRITE8_MEMBER(polgar_state::milano_write_LED)
WRITE8_MEMBER(polgar_state::megaiv_write_LED)
{
if (BIT(data,7)) beep_set_state(machine().device("beep"),1); else beep_set_state(machine().device("beep"),0);
output_set_led_value(102,BIT(data,1)?1:0);
output_set_led_value(107,BIT(data,6)?1:0);
if (BIT(data,7))
machine().device<beep_device>("beep")->set_state(1);
else
machine().device<beep_device>("beep")->set_state(0);
output_set_led_value(102,BIT(data,1)?1:0);
output_set_led_value(107,BIT(data,6)?1:0);
// logerror("LEDs FUNC = %02x found = %d\n",data,found);
logerror("LED mask %d\n",data);
@ -468,8 +474,14 @@ if ((data & 0xa1) == 0xa1) {
found = 1;
}
if (BIT(data,7)) beep_set_state(machine().device("beep"),1); else beep_set_state(machine().device("beep"),0);
if (BIT(data,1)) beep_set_state(machine().device("beep"),1); else beep_set_state(machine().device("beep"),0);
if (BIT(data,7))
machine().device<beep_device>("beep")->set_state(1);
else
machine().device<beep_device>("beep")->set_state(0);
if (BIT(data,1))
machine().device<beep_device>("beep")->set_state(1);
else
machine().device<beep_device>("beep")->set_state(0);
// logerror("LEDs FUNC = %02x found = %d\n",data,found);
if (!found) {
logerror("unknown LED mask %d\n",data);
@ -711,7 +723,10 @@ READ32_MEMBER(polgar_state::read_keys_BPL32)
WRITE8_MEMBER(polgar_state::beep_academy)
{
if (!BIT(data,7)) beep_set_state(machine().device("beep"),1); else beep_set_state(machine().device("beep"),0);
if (!BIT(data,7))
machine().device<beep_device>("beep")->set_state(1);
else
machine().device<beep_device>("beep")->set_state(0);
}
WRITE8_MEMBER(polgar_state::megaiv_IO)
@ -863,7 +878,7 @@ WRITE16_MEMBER(polgar_state::write_LCD_data)
void polgar_state::write_IOenable(unsigned char data,address_space &space)
{
hd44780_device * hd44780 = space.machine().device<hd44780_device>("hd44780");
device_t *speaker = space.machine().device("beep");
beep_device *speaker = machine().device<beep_device>("beep");
if (BIT(data,5) && BIT(data,4)) {
if (BIT(data,1)) {
@ -888,7 +903,10 @@ void polgar_state::write_IOenable(unsigned char data,address_space &space)
logerror("Write to IOENBL data: %08x\n",data);
if (BIT(data,2) || BIT(data,3)) beep_set_state(speaker,1); else beep_set_state(speaker,0);
if (BIT(data,2) || BIT(data,3))
speaker->set_state(1);
else
speaker->set_state(0);
}
}

View File

@ -629,7 +629,7 @@ static I8255_INTERFACE( ppi8255_intf_0 )
WRITE8_MEMBER( multi8_state::ym2203_porta_w )
{
beep_set_state(m_beep, (data & 0x08));
m_beep->set_state((data & 0x08));
}
static const ym2203_interface ym2203_config =
@ -655,8 +655,8 @@ void multi8_state::machine_start()
void multi8_state::machine_reset()
{
beep_set_frequency(machine().device(BEEPER_TAG),1200); //guesswork
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(1200); //guesswork
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
m_mcu_init = 0;
}

View File

@ -120,7 +120,7 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<device_t> m_mb8877a;
required_device<device_t> m_pit8253;
required_device<device_t> m_beeper;
required_device<beep_device> m_beeper;
required_memory_region m_region_tvram;
required_memory_region m_region_gvram;
required_memory_region m_region_chargen;
@ -555,8 +555,8 @@ void mz2000_state::machine_reset()
m_tvram_enable = 0;
m_gvram_enable = 0;
beep_set_frequency(m_beeper,4096);
beep_set_state(m_beeper,0);
m_beeper->set_frequency(4096);
m_beeper->set_state(0);
m_color_mode = m_io_config->read() & 1;
m_has_fdc = (m_io_config->read() & 2) >> 1;
@ -732,7 +732,7 @@ WRITE8_MEMBER(mz2000_state::mz2000_portc_w)
m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
beep_set_state(m_beeper,data & 0x04);
m_beeper->set_state(data & 0x04);
m_old_portc = data;
}

View File

@ -1806,8 +1806,8 @@ void mz2500_state::machine_reset()
m_cg_clear_flag = 0;
beep_set_frequency(machine().device(BEEPER_TAG),4096);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(4096);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
// m_monitor_type = machine().root_device().ioport("DSW1")->read() & 0x40 ? 1 : 0;
}
@ -1921,7 +1921,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_portc_w)
m_old_portc = data;
beep_set_state(machine().device(BEEPER_TAG),data & 0x04);
machine().device<beep_device>(BEEPER_TAG)->set_state(data & 0x04);
m_screen_enable = data & 1;

View File

@ -672,15 +672,15 @@ static void nc_sound_update(running_machine &machine, int channel)
int on;
int frequency;
int period;
const char *beep_device = NULL;
const char *beeper_device = NULL;
switch(channel)
{
case 0:
beep_device = "beep.1";
beeper_device = "beep.1";
break;
case 1:
beep_device = "beep.2";
beeper_device = "beep.2";
break;
}
@ -693,9 +693,9 @@ static void nc_sound_update(running_machine &machine, int channel)
frequency = (int)(1000000.0f/((float)((period & 0x07fff)<<1) * 1.6276f));
/* set state */
beep_set_state(machine.device(beep_device), on);
machine.device<beep_device>(beeper_device)->set_state(on);
/* set frequency */
beep_set_frequency(machine.device(beep_device), frequency);
machine.device<beep_device>(beeper_device)->set_frequency(frequency);
}
WRITE8_MEMBER(nc_state::nc_sound_w)

View File

@ -339,12 +339,12 @@ WRITE8_MEMBER( c1p_state::osi630_ctrl_w )
*/
beep_set_state(m_beep, BIT(data, 1));
m_beep->set_state(BIT(data, 1));
}
WRITE8_MEMBER( c1p_state::osi630_sound_w )
{
if (data) beep_set_frequency(m_beep, 49152 / data);
if (data) m_beep->set_frequency(49152 / data);
}
/* Disk Drive */
@ -933,9 +933,9 @@ ROM_END
TIMER_CALLBACK_MEMBER(sb2m600_state::setup_beep)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_set_state(speaker, 0);
beep_set_frequency(speaker, 300);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
speaker->set_state(0);
speaker->set_frequency(300);
}
DRIVER_INIT_MEMBER(c1p_state,c1p)

View File

@ -443,7 +443,7 @@ static UINT8 pb2000c_port_r(hd61700_cpu_device &device)
static void port_w(hd61700_cpu_device &device, UINT8 data)
{
beep_set_state(device.machine().device(BEEPER_TAG), (BIT(data,7) ^ BIT(data,6)));
device.machine().device<beep_device>(BEEPER_TAG)->set_state((BIT(data,7) ^ BIT(data,6)));
//printf("%x\n", data);
}

View File

@ -217,7 +217,7 @@ WRITE8_MEMBER( pc100_state::pc100_output_w )
if(offset == 0)
{
m_timer_mode = (data & 0x18) >> 3;
beep_set_state(machine().device(BEEPER_TAG),((data & 0x40) >> 6) ^ 1);
machine().device<beep_device>(BEEPER_TAG)->set_state(((data & 0x40) >> 6) ^ 1);
printf("%02x\n",data & 0xc0);
}
}
@ -427,8 +427,8 @@ void pc100_state::machine_start()
void pc100_state::machine_reset()
{
beep_set_frequency(machine().device(BEEPER_TAG),2400);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(2400);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
}
INTERRUPT_GEN_MEMBER(pc100_state::pc100_vblank_irq)

View File

@ -122,7 +122,7 @@ READ8_MEMBER( pc2000_state::beep_r )
WRITE8_MEMBER( pc2000_state::beep_w )
{
beep_set_state(m_beep, BIT(data, 3));
m_beep->set_state(BIT(data, 3));
m_beep_state = data;
}

View File

@ -52,7 +52,7 @@ WRITE8_MEMBER( pc4_state::bank_w )
WRITE8_MEMBER( pc4_state::beep_w )
{
beep_set_state(m_beep, data&0x40);
m_beep->set_state(data&0x40);
}
static ADDRESS_MAP_START(pc4_mem, AS_PROGRAM, 8, pc4_state)

View File

@ -1184,10 +1184,10 @@ WRITE8_MEMBER(pc8801_state::pc8801_ctrl_w)
m_rtc->clk_w((data & 4) >> 2);
if(((m_device_ctrl_data & 0x20) == 0x00) && ((data & 0x20) == 0x20))
beep_set_state(machine().device(BEEPER_TAG),1);
machine().device<beep_device>(BEEPER_TAG)->set_state(1);
if(((m_device_ctrl_data & 0x20) == 0x20) && ((data & 0x20) == 0x00))
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
if((m_device_ctrl_data & 0x40) != (data & 0x40))
{
@ -1214,7 +1214,7 @@ WRITE8_MEMBER(pc8801_state::pc8801_ctrl_w)
/* TODO: is SING a buzzer mask? Bastard Special relies on this ... */
if(m_device_ctrl_data & 0x80)
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
m_device_ctrl_data = data;
}
@ -2475,8 +2475,8 @@ void pc8801_state::machine_reset()
m_crtc.status = 0;
}
beep_set_frequency(machine().device(BEEPER_TAG),2400);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(2400);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
#ifdef USE_PROPER_I8214
{

View File

@ -3109,7 +3109,7 @@ READ8_MEMBER(pc9801_state::ppi_prn_portb_r){ return machine().root_device().iopo
WRITE8_MEMBER(pc9801_state::ppi_sys_portc_w)
{
beep_set_state(machine().device(BEEPER_TAG),!(data & 0x08));
machine().device<beep_device>(BEEPER_TAG)->set_state(!(data & 0x08));
}
static I8255A_INTERFACE( ppi_system_intf )
@ -3426,8 +3426,8 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801_common)
m_tvram[(0x3fe0)+i*2] = default_memsw_data[i];
}
beep_set_frequency(machine().device(BEEPER_TAG),2400);
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(2400);
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
m_nmi_ff = 0;
m_mouse.control = 0xff;

View File

@ -376,7 +376,7 @@ READ8_MEMBER( pce220_state::port18_r )
WRITE8_MEMBER( pce220_state::port18_w )
{
beep_set_state(m_beep, BIT(data, 7));
m_beep->set_state(BIT(data, 7));
m_serial->out_busy(BIT(data, 0));
m_serial->out_dout(BIT(data, 1));

View File

@ -407,7 +407,7 @@ WRITE8_MEMBER(pcw_state::pcw_vdu_video_control_register_w)
WRITE8_MEMBER(pcw_state::pcw_system_control_w)
{
upd765a_device *fdc = machine().device<upd765a_device>("upd765");
device_t *speaker = machine().device(BEEPER_TAG);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
LOG(("SYSTEM CONTROL: %d\n",data));
switch (data)
@ -545,14 +545,14 @@ WRITE8_MEMBER(pcw_state::pcw_system_control_w)
/* beep on */
case 11:
{
beep_set_state(speaker,1);
speaker->set_state(1);
}
break;
/* beep off */
case 12:
{
beep_set_state(speaker,0);
speaker->set_state(0);
}
break;
@ -996,9 +996,9 @@ ADDRESS_MAP_END
TIMER_CALLBACK_MEMBER(pcw_state::setup_beep)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_set_state(speaker, 0);
beep_set_frequency(speaker, 3750);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
speaker->set_state(0);
speaker->set_frequency(3750);
}

View File

@ -842,14 +842,14 @@ WRITE8_MEMBER(pcw16_state::pcw16_system_control_w)
/* bleeper on */
case 0x0b:
{
beep_set_state(m_speaker,1);
m_speaker->set_state(1);
}
break;
/* bleeper off */
case 0x0c:
{
beep_set_state(m_speaker,0);
m_speaker->set_state(0);
}
break;
@ -1005,7 +1005,7 @@ void pcw16_state::machine_reset()
void pcw16_state::machine_start()
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
m_system_status = 0;
m_interrupt_counter = 0;
@ -1015,8 +1015,8 @@ void pcw16_state::machine_start()
at_keyboard_init(machine(), AT_KEYBOARD_TYPE_AT);
at_keyboard_set_scan_code_set(3);
beep_set_state(speaker,0);
beep_set_frequency(speaker,3750);
speaker->set_state(0);
speaker->set_frequency(3750);
}
static INPUT_PORTS_START(pcw16)

View File

@ -153,10 +153,10 @@ void psion_state::io_rw(address_space &space, UINT16 offset)
m_kb_counter = 0;
break;
case 0x180:
beep_set_state(m_beep, 1);
m_beep->set_state(1);
break;
case 0x1c0:
beep_set_state(m_beep, 0);
m_beep->set_state(0);
break;
case 0x240:
if (offset == 0x260 && (m_rom_bank_count || m_ram_bank_count))

View File

@ -233,16 +233,16 @@ WRITE8_MEMBER( rex6000_state::beep_w )
case 1: //tone mode control
if (m_beep_mode)
{
beep_set_state(m_beep, BIT(data, 0));
m_beep->set_state(BIT(data, 0));
//the beeper frequency is update only if the bit 1 is set
if (BIT(data, 1))
beep_set_frequency(m_beep, 16384 / (((m_beep_io[2] | (m_beep_io[3]<<8)) & 0x0fff) + 2));
m_beep->set_frequency(16384 / (((m_beep_io[2] | (m_beep_io[3]<<8)) & 0x0fff) + 2));
}
break;
case 4: //select alarm/tone mode
if (m_beep_mode != BIT(data, 0))
beep_set_state(m_beep, 0); //turned off when mode changes
m_beep->set_state(0); //turned off when mode changes
m_beep_mode = BIT(data, 0);
break;

View File

@ -45,7 +45,7 @@ READ8_MEMBER( sc2_state::sc2_beep )
{
m_beep_state = ~m_beep_state;
beep_set_state(m_beep, m_beep_state);
m_beep->set_state(m_beep_state);
}
return 0xff;

View File

@ -528,7 +528,7 @@ WRITE8_MEMBER(smc777_state::system_output_w)
m_raminh_prefetch = (UINT8)(space.device().state().state_int(Z80_R)) & 0x7f;
break;
case 0x02: printf("Interlace %s\n",data & 0x10 ? "on" : "off"); break;
case 0x05: beep_set_state(machine().device(BEEPER_TAG),data & 0x10); break;
case 0x05: machine().device<beep_device>(BEEPER_TAG)->set_state(data & 0x10); break;
default: printf("System FF W %02x\n",data); break;
}
}
@ -990,8 +990,8 @@ void smc777_state::machine_reset()
m_raminh_prefetch = 0xff;
m_pal_mode = 0x10;
beep_set_frequency(machine().device(BEEPER_TAG),300); //TODO: correct frequency
beep_set_state(machine().device(BEEPER_TAG),0);
machine().device<beep_device>(BEEPER_TAG)->set_frequency(300); //TODO: correct frequency
machine().device<beep_device>(BEEPER_TAG)->set_state(0);
}

View File

@ -446,7 +446,7 @@ READ_LINE_MEMBER( studio2_state::ef4_r )
WRITE_LINE_MEMBER( studio2_state::q_w )
{
beep_set_state(m_speaker, state);
m_speaker->set_state(state);
}
static COSMAC_INTERFACE( studio2_cosmac_intf )
@ -629,9 +629,9 @@ ROM_END
TIMER_CALLBACK_MEMBER(studio2_state::setup_beep)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_set_state(speaker, 0);
beep_set_frequency(speaker, 300);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
speaker->set_state(0);
speaker->set_frequency(300);
}
DRIVER_INIT_MEMBER(studio2_state,studio2)

View File

@ -566,11 +566,11 @@ WRITE8_MEMBER( supercon_state::supercon_port4_w )
if ( m_data_1F00 & 0x80 )
{
beep_set_state(m_beep, 1);
m_beep->set_state(1);
m_emu_started=TRUE;
}
else
beep_set_state(m_beep ,0);
m_beep->set_state(0);
}
TIMER_CALLBACK_MEMBER(supercon_state::mouse_click)

View File

@ -112,6 +112,7 @@ Notes:
*/
#include "includes/tmc1800.h"
#include "sound/beep.h"
/* Read/Write Handlers */
@ -907,9 +908,9 @@ ROM_END
TIMER_CALLBACK_MEMBER(tmc1800_state::setup_beep)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_set_state(speaker, 0);
beep_set_frequency( speaker, 0 );
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
speaker->set_state(0);
speaker->set_frequency(0);
}
DRIVER_INIT_MEMBER(tmc1800_state,tmc1800)

View File

@ -500,7 +500,7 @@ WRITE8_MEMBER(vk100_state::KBDW)
#ifdef LED_VERBOSE
if (BIT(data, 6)) logerror("kb keyclick bit 6 set: not emulated yet (multivibrator)!\n");
#endif
beep_set_state( m_speaker, BIT(data, 7));
m_speaker->set_state(BIT(data, 7));
#ifdef LED_VERBOSE
logerror("LED state: %02X: %s %s %s %s %s %s\n", data&0xFF, (data&0x20)?"------- LOCAL ":"ON LINE ----- ", (data&0x10)?"--------- ":"NO SCROLL ", (data&0x8)?"----- ":"BASIC ", (data&0x4)?"--------- ":"HARD-COPY ", (data&0x2)?"-- ":"L1 ", (data&0x1)?"-- ":"L2 ");
#endif
@ -865,7 +865,7 @@ INPUT_PORTS_END
void vk100_state::machine_start()
{
beep_set_frequency( m_speaker, 116 ); //116 hz (page 172 of TM), but duty cycle is wrong here!
m_speaker->set_frequency(116); //116 hz (page 172 of TM), but duty cycle is wrong here!
output_set_value("online_led",1);
output_set_value("local_led", 0);
output_set_value("noscroll_led",1);

View File

@ -145,7 +145,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(vt100_state::keyboard_callback)
WRITE8_MEMBER( vt100_state::vt100_keyboard_w )
{
beep_set_frequency( m_speaker, 786 ); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz
m_speaker->set_frequency(786); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz
output_set_value("online_led",BIT(data, 5) ? 0 : 1);
output_set_value("local_led", BIT(data, 5));
output_set_value("locked_led",BIT(data, 4) ? 0 : 1);
@ -154,7 +154,7 @@ WRITE8_MEMBER( vt100_state::vt100_keyboard_w )
output_set_value("l3_led", BIT(data, 1) ? 0 : 1);
output_set_value("l4_led", BIT(data, 0) ? 0 : 1);
m_key_scan = BIT(data, 6);
beep_set_state( m_speaker, BIT(data, 7));
m_speaker->set_state(BIT(data, 7));
}
READ8_MEMBER( vt100_state::vt100_keyboard_r )
@ -353,7 +353,7 @@ void vt100_state::machine_reset()
m_keyboard_int = 0;
m_receiver_int = 0;
m_vertical_int = 0;
beep_set_frequency( m_speaker, 786 ); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz
m_speaker->set_frequency(786); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz
output_set_value("online_led",1);
output_set_value("local_led", 0);
output_set_value("locked_led",1);

View File

@ -1185,13 +1185,13 @@ WRITE8_MEMBER( x07_state::x07_io_w )
#if(1)
if((data & 0x0e) == 0x0e)
{
beep_set_state(m_beep, 1);
beep_set_frequency(m_beep, 192000 / ((m_regs_w[2] | (m_regs_w[3] << 8)) & 0x0fff));
m_beep->set_state(1);
m_beep->set_frequency(192000 / ((m_regs_w[2] | (m_regs_w[3] << 8)) & 0x0fff));
m_beep_stop->adjust(attotime::from_msec(m_ram->pointer()[0x450] * 0x20));
}
else
beep_set_state(m_beep, 0);
m_beep->set_state(0);
#endif
break;
@ -1374,7 +1374,7 @@ TIMER_CALLBACK_MEMBER(x07_state::rstb_clear)
TIMER_CALLBACK_MEMBER(x07_state::beep_stop)
{
beep_set_state(m_beep, 0);
m_beep->set_state(0);
}
static const gfx_layout x07_charlayout =

View File

@ -199,7 +199,7 @@ INPUT_PORTS_END
TIMER_CALLBACK_MEMBER( bigboard_state::bigboard_beepoff )
{
beep_set_state(m_beeper, 0);
m_beeper->set_state(0);
}
/* Z80 PIO */
@ -291,7 +291,7 @@ WRITE8_MEMBER( bigboard_state::kbpio_pa_w )
if (BIT(data, 5) & (!m_bit5))
{
machine().scheduler().timer_set(attotime::from_msec(40), timer_expired_delegate(FUNC(bigboard_state::bigboard_beepoff),this));
beep_set_state(m_beeper, 1);
m_beeper->set_state(1);
}
m_bit5 = BIT(data, 5);
}
@ -599,8 +599,8 @@ void bigboard_state::machine_reset()
bankswitch(1);
/* bigboard has a one-pulse output to drive a user-supplied beeper */
beep_set_state(m_beeper, 0);
beep_set_frequency(m_beeper, 950);
m_beeper->set_state(0);
m_beeper->set_frequency(950);
m_fdc->reset();
}

View File

@ -129,7 +129,7 @@ static Z80PIO_INTERFACE( pio2_intf ) // keyboard PIO
//Bits0,1 not connected; 2,3,4,5 go to a connector; 6 goes to 'graphics' LED; 7 goes to speaker.
WRITE8_MEMBER( z9001_state::port88_w )
{
beep_set_state(m_beeper, BIT(data, 7));
m_beeper->set_state(BIT(data, 7));
}
WRITE_LINE_MEMBER( z9001_state::cass_w )
@ -150,7 +150,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(z9001_state::timer_callback)
void z9001_state::machine_reset()
{
beep_set_frequency(m_beeper, 800);
m_beeper->set_frequency(800);
m_maincpu->set_state_int(Z80_PC, 0xf000);
}

View File

@ -58,19 +58,19 @@ READ8_MEMBER( zrt80_state::zrt80_10_r )
TIMER_CALLBACK_MEMBER(zrt80_state::zrt80_beepoff)
{
beep_set_state(m_beep, 0);
m_beep->set_state(0);
}
WRITE8_MEMBER(zrt80_state::zrt80_30_w)
{
machine().scheduler().timer_set(attotime::from_msec(100), timer_expired_delegate(FUNC(zrt80_state::zrt80_beepoff),this));
beep_set_state(m_beep, 1);
m_beep->set_state(1);
}
WRITE8_MEMBER(zrt80_state::zrt80_38_w)
{
machine().scheduler().timer_set(attotime::from_msec(400), timer_expired_delegate(FUNC(zrt80_state::zrt80_beepoff),this));
beep_set_state(m_beep, 1);
m_beep->set_state(1);
}
static ADDRESS_MAP_START(zrt80_mem, AS_PROGRAM, 8, zrt80_state)
@ -181,7 +181,7 @@ INPUT_PORTS_END
void zrt80_state::machine_reset()
{
beep_set_frequency(m_beep, 800);
m_beep->set_frequency(800);
m_term_data = 0;
}

View File

@ -17,11 +17,11 @@ class fidelz80_state : public driver_device
public:
fidelz80_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_speech(*this, "speech"),
m_beep(*this, BEEPER_TAG),
m_i8041(*this, "mcu"),
m_i8243(*this, "i8243")
m_maincpu(*this, "maincpu"),
m_speech(*this, "speech"),
m_beep(*this, BEEPER_TAG),
m_i8041(*this, "mcu"),
m_i8243(*this, "i8243")
{ }
required_device<cpu_device> m_maincpu;

View File

@ -93,7 +93,7 @@ class c1p_state : public sb2m600_state
public:
c1p_state(const machine_config &mconfig, device_type type, const char *tag)
: sb2m600_state(mconfig, type, tag),
m_beep(*this, BEEPER_TAG)
m_beep(*this, BEEPER_TAG)
{ }
required_device<beep_device> m_beep;

View File

@ -22,13 +22,13 @@ class psion_state : public driver_device
public:
psion_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_lcdc(*this, "hd44780"),
m_beep(*this, BEEPER_TAG),
m_pack1(*this, "pack1"),
m_pack2(*this, "pack2"),
m_sys_register(*this, "sys_register"),
m_ram(*this, "ram"){ }
m_maincpu(*this, "maincpu"),
m_lcdc(*this, "hd44780"),
m_beep(*this, BEEPER_TAG),
m_pack1(*this, "pack1"),
m_pack2(*this, "pack2"),
m_sys_register(*this, "sys_register"),
m_ram(*this, "ram"){ }
required_device<cpu_device> m_maincpu;
required_device<hd44780_device> m_lcdc;

View File

@ -22,12 +22,12 @@ class studio2_state : public driver_device
public:
studio2_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, CDP1802_TAG),
m_speaker(*this, BEEPER_TAG),
m_vdc(*this, CDP1861_TAG),
m_clear(*this, "CLEAR"),
m_a(*this, "A"),
m_b(*this, "B")
m_maincpu(*this, CDP1802_TAG),
m_speaker(*this, BEEPER_TAG),
m_vdc(*this, CDP1861_TAG),
m_clear(*this, "CLEAR"),
m_a(*this, "A"),
m_b(*this, "B")
{ }
required_device<cosmac_device> m_maincpu;

View File

@ -10,7 +10,6 @@
#include "imagedev/snapquik.h"
#include "machine/ram.h"
#include "machine/rescap.h"
#include "sound/beep.h"
#include "sound/cdp1864.h"
#include "video/cdp1861.h"

View File

@ -114,7 +114,7 @@ class bigboard_state : public xerox820_state
public:
bigboard_state(const machine_config &mconfig, device_type type, const char *tag)
: xerox820_state(mconfig, type, tag),
m_beeper(*this, BEEPER_TAG)
m_beeper(*this, BEEPER_TAG)
{ }
required_device<beep_device> m_beeper;

View File

@ -185,7 +185,7 @@ void apollo_kbd_device::beeper::start(apollo_kbd_device *device)
{
m_device = device;
LOG2(("start apollo_kbd::beeper"));
m_beeper = m_device->machine().device("beep");
m_beeper = m_device->machine().device<beep_device>("beep");
m_timer = m_device->machine().scheduler().timer_alloc(FUNC(static_beeper_callback), this);
}
@ -197,15 +197,15 @@ void apollo_kbd_device::beeper::reset()
void apollo_kbd_device::beeper::off()
{
beep_set_state(m_beeper, 0);
m_beeper->set_state(0);
}
void apollo_kbd_device::beeper::on()
{
if (keyboard_has_beeper())
{
beep_set_frequency(m_beeper, 1000);
beep_set_state(m_beeper, 1);
m_beeper->set_frequency(1000);
m_beeper->set_state(1);
m_timer->adjust( attotime::from_msec(10), 0, attotime::zero);
}
}
@ -223,7 +223,7 @@ void apollo_kbd_device::beeper::beeper_callback()
TIMER_CALLBACK( apollo_kbd_device::beeper::static_beeper_callback )
{
reinterpret_cast<beeper *> (ptr)->beeper_callback();
reinterpret_cast<beeper*>(ptr)->beeper_callback();
}
//**************************************************************************

View File

@ -15,6 +15,7 @@
#define __APOLLO_KBD_H__
#include "emu.h"
#include "sound/beep.h"
// BSD-derived systems get very sad when you party with system reserved names.
#ifdef getchar
@ -105,7 +106,7 @@ private:
static TIMER_CALLBACK( static_beeper_callback );
apollo_kbd_device *m_device; // pointer back to our device
device_t *m_beeper; // the keyboard beeper device
beep_device *m_beeper; // the keyboard beeper device
emu_timer * m_timer; // timer to clock data in
};

View File

@ -177,7 +177,7 @@ static const UINT16 electron_screen_base[8] = { 0x3000, 0x3000, 0x3000, 0x4000,
WRITE8_MEMBER(electron_state::electron_ula_w)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
int i = electron_palette_offset[(( offset >> 1 ) & 0x03)];
logerror( "ULA: write offset %02x <- %02x\n", offset & 0x0f, data );
switch( offset & 0x0f )
@ -237,7 +237,7 @@ WRITE8_MEMBER(electron_state::electron_ula_w)
case 0x06: /* Counter divider */
if ( m_ula.communication_mode == 0x01)
{
beep_set_frequency( speaker, 1000000 / ( 16 * ( data + 1 ) ) );
speaker->set_frequency( 1000000 / ( 16 * ( data + 1 ) ) );
}
break;
case 0x07: /* Misc. */
@ -245,19 +245,19 @@ WRITE8_MEMBER(electron_state::electron_ula_w)
switch( m_ula.communication_mode )
{
case 0x00: /* cassette input */
beep_set_state( speaker, 0 );
speaker->set_state( 0 );
electron_tape_start();
break;
case 0x01: /* sound generation */
beep_set_state( speaker, 1 );
speaker->set_state( 1 );
electron_tape_stop();
break;
case 0x02: /* cassette output */
beep_set_state( speaker, 0 );
speaker->set_state( 0 );
electron_tape_stop();
break;
case 0x03: /* not used */
beep_set_state( speaker, 0 );
speaker->set_state( 0 );
electron_tape_stop();
break;
}
@ -316,9 +316,9 @@ void electron_interrupt_handler(running_machine &machine, int mode, int interrup
TIMER_CALLBACK_MEMBER(electron_state::setup_beep)
{
device_t *speaker = machine().device(BEEPER_TAG);
beep_set_state( speaker, 0 );
beep_set_frequency( speaker, 300 );
beep_device *speaker = machine().device<beep_device>(BEEPER_TAG);
speaker->set_state( 0 );
speaker->set_frequency( 300 );
}
void electron_state::machine_reset()

View File

@ -66,7 +66,7 @@
struct kay_kbd_t
{
device_t *beeper;
beep_device *beeper;
UINT8 buff[16];
UINT8 head;
UINT8 tail;
@ -287,11 +287,11 @@ MACHINE_RESET_MEMBER(kaypro_state,kay_kbd)
/* disable CapsLock LED initially */
set_led_status(machine(), 1, 1);
set_led_status(machine(), 1, 0);
kbd->beeper = machine().device(BEEPER_TAG);
kbd->beeper = machine().device<beep_device>(BEEPER_TAG);
kbd->beep_on = 1;
kbd->control_status = 0x14;
beep_set_state(kbd->beeper, 0);
beep_set_frequency(kbd->beeper, 950); /* piezo-device needs to be measured */
kbd->beeper->set_state(0);
kbd->beeper->set_frequency(950); /* piezo-device needs to be measured */
kbd->head = kbd->tail = 0; /* init buffer */
}
@ -471,7 +471,7 @@ static TIMER_CALLBACK( kay_kbd_beepoff )
{
kaypro_state *state = machine.driver_data<kaypro_state>();
kay_kbd_t *kbd = state->m_kbd;
beep_set_state(kbd->beeper, 0);
kbd->beeper->set_state(0);
kbd->control_status |= 4;
}
@ -509,7 +509,7 @@ void kay_kbd_d_w( running_machine &machine, UINT8 data )
{
kbd->control_status &= 0xfb;
machine.scheduler().timer_set(attotime::from_msec(length), FUNC(kay_kbd_beepoff));
beep_set_state(kbd->beeper, 1);
kbd->beeper->set_state(1);
}
}
}

View File

@ -389,11 +389,11 @@ TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
if ( (ra==2) || (ra== 6) )
{
beep_set_state( m_beep, m_beep_state );
m_beep->set_state( m_beep_state );
}
else
{
beep_set_state( m_beep, 0 );
m_beep->set_state( 0 );
}
m_video_timer->adjust(machine().primary_screen->time_until_pos(y + 1, 0 ));
@ -401,8 +401,8 @@ TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
TIMER_CALLBACK_MEMBER(osborne1_state::setup_osborne1)
{
beep_set_state( m_beep, 0 );
beep_set_frequency( m_beep, 300 /* 60 * 240 / 2 */ );
m_beep->set_state( 0 );
m_beep->set_frequency( 300 /* 60 * 240 / 2 */ );
m_pia1->ca1_w(0);
}

View File

@ -91,7 +91,7 @@ struct vdt_t
unsigned int cursor_address; /* current cursor address (controlled by the computer, affects both display and I/O protocol) */
unsigned int cursor_address_mask; /* 1023 for 960-char model, 2047 for 1920-char model */
emu_timer *beep_timer; /* beep clock (beeps ends when timer times out) */
emu_timer *beep_timer; /* beep clock (beeps ends when timer times out) */
/*void *blink_clock;*/ /* cursor blink clock */
UINT8 keyboard_data; /* last code pressed on keyboard */
@ -230,7 +230,7 @@ void vdt911_init(running_machine &machine)
static TIMER_CALLBACK(setup_beep)
{
beep_set_frequency(machine.device(BEEPER_TAG), 2000);
machine.device<beep_device>(BEEPER_TAG)->set_frequency(2000);
}
@ -311,7 +311,7 @@ static TIMER_CALLBACK(blink_callback)
*/
static TIMER_CALLBACK(beep_callback)
{
beep_set_state(machine.device(BEEPER_TAG), 0);
machine.device<beep_device>(BEEPER_TAG)->set_state(0);
}
/*
@ -485,7 +485,7 @@ WRITE8_DEVICE_HANDLER( vdt911_cru_w )
case 0xe:
/* beep enable strobe - not tested */
beep_set_state(space.machine().device(BEEPER_TAG), 1);
space.machine().device<beep_device>(BEEPER_TAG)->set_state(1);
vdt->beep_timer->adjust(attotime::from_usec(300));
break;