mirror of
https://github.com/holub/mame
synced 2025-06-01 02:21:48 +03:00
Modernized trackfld and timeplt audio devices. [Osso]
This commit is contained in:
parent
3baca7a8b9
commit
37f23cdf06
@ -11,60 +11,48 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/flt_rc.h"
|
||||
#include "audio/timeplt.h"
|
||||
#include "devlegcy.h"
|
||||
|
||||
|
||||
#define MASTER_CLOCK XTAL_14_31818MHz
|
||||
|
||||
struct timeplt_audio_state
|
||||
|
||||
const device_type TIMEPLT_AUDIO = &device_creator<timeplt_audio_device>;
|
||||
|
||||
timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, TIMEPLT_AUDIO, "Time Pilot Audio", tag, owner, clock, "timeplt_audio", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_last_irq_state(0)
|
||||
{
|
||||
UINT8 m_last_irq_state;
|
||||
cpu_device *m_soundcpu;
|
||||
|
||||
device_t *m_filter_0_0;
|
||||
device_t *m_filter_0_1;
|
||||
device_t *m_filter_0_2;
|
||||
device_t *m_filter_1_0;
|
||||
device_t *m_filter_1_1;
|
||||
device_t *m_filter_1_2;
|
||||
};
|
||||
|
||||
INLINE timeplt_audio_state *get_safe_token( device_t *device )
|
||||
{
|
||||
assert(device != NULL);
|
||||
assert(device->type() == TIMEPLT_AUDIO);
|
||||
|
||||
return (timeplt_audio_state *)downcast<timeplt_audio_device *>(device)->token();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Initialization
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static DEVICE_START( timeplt_audio )
|
||||
void timeplt_audio_device::device_config_complete()
|
||||
{
|
||||
running_machine &machine = device->machine();
|
||||
timeplt_audio_state *state = get_safe_token(device);
|
||||
|
||||
state->m_soundcpu = machine.device<cpu_device>("tpsound");
|
||||
state->m_filter_0_0 = machine.device("filter.0.0");
|
||||
state->m_filter_0_1 = machine.device("filter.0.1");
|
||||
state->m_filter_0_2 = machine.device("filter.0.2");
|
||||
state->m_filter_1_0 = machine.device("filter.1.0");
|
||||
state->m_filter_1_1 = machine.device("filter.1.1");
|
||||
state->m_filter_1_2 = machine.device("filter.1.2");
|
||||
|
||||
state->m_last_irq_state = 0;
|
||||
device->save_item(NAME(state->m_last_irq_state));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void timeplt_audio_device::device_start()
|
||||
{
|
||||
m_soundcpu = machine().device<cpu_device>("tpsound");
|
||||
m_filter_0_0 = machine().device("filter.0.0");
|
||||
m_filter_0_1 = machine().device("filter.0.1");
|
||||
m_filter_0_2 = machine().device("filter.0.2");
|
||||
m_filter_1_0 = machine().device("filter.1.0");
|
||||
m_filter_1_1 = machine().device("filter.1.1");
|
||||
m_filter_1_2 = machine().device("filter.1.2");
|
||||
|
||||
m_last_irq_state = 0;
|
||||
save_item(NAME(m_last_irq_state));
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -90,16 +78,14 @@ static DEVICE_START( timeplt_audio )
|
||||
/* Bit 7 comes from the QA output of the LS90 producing a sequence of */
|
||||
/* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */
|
||||
|
||||
static READ8_DEVICE_HANDLER( timeplt_portB_r )
|
||||
READ8_MEMBER( timeplt_audio_device::portB_r )
|
||||
{
|
||||
timeplt_audio_state *state = get_safe_token(device);
|
||||
|
||||
static const int timeplt_timer[10] =
|
||||
{
|
||||
0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0
|
||||
};
|
||||
|
||||
return timeplt_timer[(state->m_soundcpu->total_cycles() / 512) % 10];
|
||||
return timeplt_timer[(m_soundcpu->total_cycles() / 512) % 10];
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +96,7 @@ static READ8_DEVICE_HANDLER( timeplt_portB_r )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void filter_w( device_t *device, int data )
|
||||
void timeplt_audio_device::filter_w( device_t *device, int data )
|
||||
{
|
||||
int C = 0;
|
||||
|
||||
@ -123,16 +109,14 @@ static void filter_w( device_t *device, int data )
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_DEVICE_HANDLER( timeplt_filter_w )
|
||||
WRITE8_MEMBER( timeplt_audio_device::filter_w )
|
||||
{
|
||||
timeplt_audio_state *state = get_safe_token(device);
|
||||
|
||||
filter_w(state->m_filter_1_0, (offset >> 0) & 3);
|
||||
filter_w(state->m_filter_1_1, (offset >> 2) & 3);
|
||||
filter_w(state->m_filter_1_2, (offset >> 4) & 3);
|
||||
filter_w(state->m_filter_0_0, (offset >> 6) & 3);
|
||||
filter_w(state->m_filter_0_1, (offset >> 8) & 3);
|
||||
filter_w(state->m_filter_0_2, (offset >> 10) & 3);
|
||||
filter_w(m_filter_1_0, (offset >> 0) & 3);
|
||||
filter_w(m_filter_1_1, (offset >> 2) & 3);
|
||||
filter_w(m_filter_1_2, (offset >> 4) & 3);
|
||||
filter_w(m_filter_0_0, (offset >> 6) & 3);
|
||||
filter_w(m_filter_0_1, (offset >> 8) & 3);
|
||||
filter_w(m_filter_0_2, (offset >> 10) & 3);
|
||||
}
|
||||
|
||||
|
||||
@ -143,18 +127,15 @@ static WRITE8_DEVICE_HANDLER( timeplt_filter_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_HANDLER( timeplt_sh_irqtrigger_w )
|
||||
WRITE8_MEMBER( timeplt_audio_device::sh_irqtrigger_w )
|
||||
{
|
||||
device_t *audio = space.machine().device("timeplt_audio");
|
||||
timeplt_audio_state *state = get_safe_token(audio);
|
||||
|
||||
if (state->m_last_irq_state == 0 && data)
|
||||
if (m_last_irq_state == 0 && data)
|
||||
{
|
||||
/* setting bit 0 low then high triggers IRQ on the sound CPU */
|
||||
state->m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
m_soundcpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
state->m_last_irq_state = data;
|
||||
m_last_irq_state = data;
|
||||
}
|
||||
|
||||
|
||||
@ -172,14 +153,14 @@ static ADDRESS_MAP_START( timeplt_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay1", ay8910_device, address_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
|
||||
AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay2", ay8910_device, address_w)
|
||||
AM_RANGE(0x8000, 0xffff) AM_DEVWRITE_LEGACY("timeplt_audio", timeplt_filter_w)
|
||||
AM_RANGE(0x8000, 0xffff) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, filter_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( locomotn_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM
|
||||
AM_RANGE(0x3000, 0x3fff) AM_DEVWRITE_LEGACY("timeplt_audio", timeplt_filter_w)
|
||||
AM_RANGE(0x3000, 0x3fff) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, filter_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
|
||||
AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay1", ay8910_device, address_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
|
||||
@ -199,7 +180,7 @@ static const ay8910_interface timeplt_ay8910_interface =
|
||||
AY8910_LEGACY_OUTPUT,
|
||||
AY8910_DEFAULT_LOADS,
|
||||
DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r),
|
||||
DEVCB_DEVICE_HANDLER("timeplt_audio", timeplt_portB_r),
|
||||
DEVCB_DEVICE_MEMBER("timeplt_audio", timeplt_audio_device, portB_r),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
};
|
||||
@ -257,38 +238,6 @@ MACHINE_CONFIG_DERIVED( locomotn_sound, timeplt_sound )
|
||||
MCFG_CPU_PROGRAM_MAP(locomotn_sound_map)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/*****************************************************************************
|
||||
DEVICE DEFINITION
|
||||
*****************************************************************************/
|
||||
|
||||
const device_type TIMEPLT_AUDIO = &device_creator<timeplt_audio_device>;
|
||||
|
||||
timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, TIMEPLT_AUDIO, "Time Pilot Audio", tag, owner, clock, "timeplt_audio", __FILE__),
|
||||
device_sound_interface(mconfig, *this)
|
||||
{
|
||||
m_token = global_alloc_clear(timeplt_audio_state);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void timeplt_audio_device::device_config_complete()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void timeplt_audio_device::device_start()
|
||||
{
|
||||
DEVICE_START_NAME( timeplt_audio )(this);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
@ -1,17 +1,18 @@
|
||||
DECLARE_WRITE8_HANDLER( timeplt_sh_irqtrigger_w );
|
||||
|
||||
MACHINE_CONFIG_EXTERN( timeplt_sound );
|
||||
MACHINE_CONFIG_EXTERN( locomotn_sound );
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/flt_rc.h"
|
||||
|
||||
class timeplt_audio_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~timeplt_audio_device() { global_free(m_token); }
|
||||
~timeplt_audio_device() {}
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
DECLARE_WRITE8_MEMBER( sh_irqtrigger_w );
|
||||
DECLARE_WRITE8_MEMBER( filter_w );
|
||||
DECLARE_READ8_MEMBER( portB_r );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -19,9 +20,23 @@ protected:
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
UINT8 m_last_irq_state;
|
||||
cpu_device *m_soundcpu;
|
||||
|
||||
device_t *m_filter_0_0;
|
||||
device_t *m_filter_0_1;
|
||||
device_t *m_filter_0_2;
|
||||
device_t *m_filter_1_0;
|
||||
device_t *m_filter_1_1;
|
||||
device_t *m_filter_1_2;
|
||||
|
||||
void filter_w( device_t *device, int data );
|
||||
};
|
||||
|
||||
MACHINE_CONFIG_EXTERN( timeplt_sound );
|
||||
MACHINE_CONFIG_EXTERN( locomotn_sound );
|
||||
|
||||
extern const device_type TIMEPLT_AUDIO;
|
||||
|
@ -1,173 +1,22 @@
|
||||
#include "emu.h"
|
||||
#include "sound/vlm5030.h"
|
||||
#include "sound/sn76496.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
#include "includes/trackfld.h"
|
||||
#include "audio/trackfld.h"
|
||||
#include "devlegcy.h"
|
||||
|
||||
|
||||
#define TIMER_RATE (4096/4)
|
||||
|
||||
struct trackfld_audio_state
|
||||
{
|
||||
/* sound-related */
|
||||
int m_last_addr;
|
||||
int m_last_irq;
|
||||
|
||||
cpu_device *m_audiocpu;
|
||||
device_t *m_vlm;
|
||||
};
|
||||
|
||||
|
||||
INLINE trackfld_audio_state *get_safe_token( device_t *device )
|
||||
{
|
||||
assert(device != NULL);
|
||||
assert(device->type() == TRACKFLD_AUDIO);
|
||||
|
||||
return (trackfld_audio_state *)downcast<trackfld_audio_device *>(device)->token();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Initialization
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static DEVICE_START( trackfld_audio )
|
||||
{
|
||||
trackfld_audio_state *state = get_safe_token(device);
|
||||
|
||||
state->m_audiocpu = device->machine().device<cpu_device>("audiocpu");
|
||||
state->m_vlm = device->machine().device("vlm");
|
||||
|
||||
/* sound */
|
||||
device->save_item(NAME(state->m_last_addr));
|
||||
device->save_item(NAME(state->m_last_irq));
|
||||
}
|
||||
|
||||
static DEVICE_RESET( trackfld_audio )
|
||||
{
|
||||
trackfld_audio_state *state = get_safe_token(device);
|
||||
|
||||
state->m_last_addr = 0;
|
||||
state->m_last_irq = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* The timer port on TnF and HyperSports sound hardware is derived from
|
||||
a 14.318 MHz clock crystal which is passed through a couple of 74ls393
|
||||
ripple counters.
|
||||
Various outputs of the ripper counters clock the various chips.
|
||||
The Z80 uses 14.318 MHz / 4 (3.4MHz)
|
||||
The SN chip uses 14.318 MHz / 8 (1.7MHz)
|
||||
And the timer is connected to 14.318 MHz / 4096
|
||||
As we are using the Z80 clockrate as a base value we need to multiply
|
||||
the no of cycles by 4 to undo the 14.318/4 operation
|
||||
*/
|
||||
|
||||
READ8_HANDLER( trackfld_sh_timer_r )
|
||||
{
|
||||
UINT32 clock = space.machine().device<cpu_device>("audiocpu")->total_cycles() / TIMER_RATE;
|
||||
|
||||
return clock & 0xF;
|
||||
}
|
||||
|
||||
READ8_DEVICE_HANDLER( trackfld_speech_r )
|
||||
{
|
||||
return vlm5030_bsy(device) ? 0x10 : 0;
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( trackfld_sound_w )
|
||||
{
|
||||
device_t *audio = space.machine().device("trackfld_audio");
|
||||
trackfld_audio_state *state = get_safe_token(audio);
|
||||
int changes = offset ^ state->m_last_addr;
|
||||
|
||||
/* A7 = data enable for VLM5030 (don't care ) */
|
||||
/* A8 = STA pin (1->0 data data , 0->1 start speech */
|
||||
/* A9 = RST pin 1=reset */
|
||||
|
||||
/* A8 VLM5030 ST pin */
|
||||
if (changes & 0x100)
|
||||
vlm5030_st(device, offset & 0x100);
|
||||
|
||||
/* A9 VLM5030 RST pin */
|
||||
if (changes & 0x200)
|
||||
vlm5030_rst(device, offset & 0x200);
|
||||
|
||||
state->m_last_addr = offset;
|
||||
}
|
||||
|
||||
READ8_HANDLER( hyperspt_sh_timer_r )
|
||||
{
|
||||
device_t *audio = space.machine().device("trackfld_audio");
|
||||
trackfld_audio_state *state = get_safe_token(audio);
|
||||
UINT32 clock = state->m_audiocpu->total_cycles() / TIMER_RATE;
|
||||
|
||||
if (state->m_vlm != NULL)
|
||||
return (clock & 0x3) | (vlm5030_bsy(state->m_vlm) ? 0x04 : 0);
|
||||
else
|
||||
return (clock & 0x3);
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( hyperspt_sound_w )
|
||||
{
|
||||
device_t *audio = space.machine().device("trackfld_audio");
|
||||
trackfld_audio_state *state = get_safe_token(audio);
|
||||
int changes = offset ^ state->m_last_addr;
|
||||
|
||||
/* A3 = data enable for VLM5030 (don't care ) */
|
||||
/* A4 = STA pin (1->0 data data , 0->1 start speech */
|
||||
/* A5 = RST pin 1=reset */
|
||||
/* A6 = VLM5030 output disable (don't care ) */
|
||||
/* A7 = kONAMI DAC output disable (don't care ) */
|
||||
/* A8 = SN76489 output disable (don't care ) */
|
||||
|
||||
/* A4 VLM5030 ST pin */
|
||||
if (changes & 0x10)
|
||||
vlm5030_st(device, offset & 0x10);
|
||||
|
||||
/* A5 VLM5030 RST pin */
|
||||
if( changes & 0x20 )
|
||||
vlm5030_rst(device, offset & 0x20);
|
||||
|
||||
state->m_last_addr = offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_HANDLER( konami_sh_irqtrigger_w )
|
||||
{
|
||||
device_t *audio = space.machine().device("trackfld_audio");
|
||||
trackfld_audio_state *state = get_safe_token(audio);
|
||||
if (state->m_last_irq == 0 && data)
|
||||
{
|
||||
/* setting bit 0 low then high triggers IRQ on the sound CPU */
|
||||
state->m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
state->m_last_irq = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
DEVICE DEFINITION
|
||||
*****************************************************************************/
|
||||
|
||||
const device_type TRACKFLD_AUDIO = &device_creator<trackfld_audio_device>;
|
||||
|
||||
trackfld_audio_device::trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, TRACKFLD_AUDIO, "Track And Field Audio", tag, owner, clock, "trackfld_audio", __FILE__),
|
||||
device_sound_interface(mconfig, *this)
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_last_addr(0),
|
||||
m_last_irq(0)
|
||||
{
|
||||
m_token = global_alloc_clear(trackfld_audio_state);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -186,7 +35,12 @@ void trackfld_audio_device::device_config_complete()
|
||||
|
||||
void trackfld_audio_device::device_start()
|
||||
{
|
||||
DEVICE_START_NAME( trackfld_audio )(this);
|
||||
m_audiocpu =machine().device<cpu_device>("audiocpu");
|
||||
m_vlm = machine().device("vlm");
|
||||
|
||||
/* sound */
|
||||
save_item(NAME(m_last_addr));
|
||||
save_item(NAME(m_last_irq));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -195,7 +49,95 @@ void trackfld_audio_device::device_start()
|
||||
|
||||
void trackfld_audio_device::device_reset()
|
||||
{
|
||||
DEVICE_RESET_NAME( trackfld_audio )(this);
|
||||
m_last_addr = 0;
|
||||
m_last_irq = 0;
|
||||
}
|
||||
|
||||
/* The timer port on TnF and HyperSports sound hardware is derived from
|
||||
a 14.318 MHz clock crystal which is passed through a couple of 74ls393
|
||||
ripple counters.
|
||||
Various outputs of the ripper counters clock the various chips.
|
||||
The Z80 uses 14.318 MHz / 4 (3.4MHz)
|
||||
The SN chip uses 14.318 MHz / 8 (1.7MHz)
|
||||
And the timer is connected to 14.318 MHz / 4096
|
||||
As we are using the Z80 clockrate as a base value we need to multiply
|
||||
the no of cycles by 4 to undo the 14.318/4 operation
|
||||
*/
|
||||
|
||||
READ8_MEMBER( trackfld_audio_device::trackfld_sh_timer_r )
|
||||
{
|
||||
UINT32 clock = space.machine().device<cpu_device>("audiocpu")->total_cycles() / TIMER_RATE;
|
||||
|
||||
return clock & 0xF;
|
||||
}
|
||||
|
||||
READ8_MEMBER( trackfld_audio_device::trackfld_speech_r )
|
||||
{
|
||||
return vlm5030_bsy(m_vlm) ? 0x10 : 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( trackfld_audio_device::trackfld_sound_w )
|
||||
{
|
||||
int changes = offset ^ m_last_addr;
|
||||
|
||||
/* A7 = data enable for VLM5030 (don't care ) */
|
||||
/* A8 = STA pin (1->0 data data , 0->1 start speech */
|
||||
/* A9 = RST pin 1=reset */
|
||||
|
||||
/* A8 VLM5030 ST pin */
|
||||
if (changes & 0x100)
|
||||
vlm5030_st(m_vlm, offset & 0x100);
|
||||
|
||||
/* A9 VLM5030 RST pin */
|
||||
if (changes & 0x200)
|
||||
vlm5030_rst(m_vlm, offset & 0x200);
|
||||
|
||||
m_last_addr = offset;
|
||||
}
|
||||
|
||||
READ8_MEMBER( trackfld_audio_device::hyperspt_sh_timer_r )
|
||||
{
|
||||
UINT32 clock = m_audiocpu->total_cycles() / TIMER_RATE;
|
||||
|
||||
if (m_vlm != NULL)
|
||||
return (clock & 0x3) | (vlm5030_bsy(m_vlm) ? 0x04 : 0);
|
||||
else
|
||||
return (clock & 0x3);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( trackfld_audio_device::hyperspt_sound_w )
|
||||
{
|
||||
int changes = offset ^ m_last_addr;
|
||||
|
||||
/* A3 = data enable for VLM5030 (don't care ) */
|
||||
/* A4 = STA pin (1->0 data data , 0->1 start speech */
|
||||
/* A5 = RST pin 1=reset */
|
||||
/* A6 = VLM5030 output disable (don't care ) */
|
||||
/* A7 = kONAMI DAC output disable (don't care ) */
|
||||
/* A8 = SN76489 output disable (don't care ) */
|
||||
|
||||
/* A4 VLM5030 ST pin */
|
||||
if (changes & 0x10)
|
||||
vlm5030_st(m_vlm, offset & 0x10);
|
||||
|
||||
/* A5 VLM5030 RST pin */
|
||||
if( changes & 0x20 )
|
||||
vlm5030_rst(m_vlm, offset & 0x20);
|
||||
|
||||
m_last_addr = offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE8_MEMBER( trackfld_audio_device::konami_sh_irqtrigger_w )
|
||||
{
|
||||
if (m_last_irq == 0 && data)
|
||||
{
|
||||
/* setting bit 0 low then high triggers IRQ on the sound CPU */
|
||||
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff);
|
||||
}
|
||||
|
||||
m_last_irq = data;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -1,21 +1,22 @@
|
||||
DECLARE_WRITE8_HANDLER( konami_sh_irqtrigger_w );
|
||||
DECLARE_READ8_HANDLER( trackfld_sh_timer_r );
|
||||
DECLARE_READ8_DEVICE_HANDLER( trackfld_speech_r );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( trackfld_sound_w );
|
||||
DECLARE_READ8_HANDLER( hyperspt_sh_timer_r );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( hyperspt_sound_w );
|
||||
DECLARE_WRITE8_HANDLER( konami_SN76496_latch_w );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( konami_SN76496_w );
|
||||
#include "sound/vlm5030.h"
|
||||
#include "cpu/m6800/m6800.h"
|
||||
|
||||
class trackfld_audio_device : public device_t,
|
||||
public device_sound_interface
|
||||
{
|
||||
public:
|
||||
trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~trackfld_audio_device() { global_free(m_token); }
|
||||
~trackfld_audio_device() {}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(konami_sh_irqtrigger_w );
|
||||
DECLARE_READ8_MEMBER(trackfld_sh_timer_r );
|
||||
DECLARE_READ8_MEMBER(trackfld_speech_r );
|
||||
DECLARE_WRITE8_MEMBER(trackfld_sound_w );
|
||||
DECLARE_READ8_MEMBER(hyperspt_sh_timer_r );
|
||||
DECLARE_WRITE8_MEMBER(hyperspt_sound_w );
|
||||
DECLARE_WRITE8_MEMBER(konami_SN76496_latch_w );
|
||||
DECLARE_WRITE8_MEMBER(konami_SN76496_w );
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -24,9 +25,14 @@ protected:
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
int m_last_addr;
|
||||
int m_last_irq;
|
||||
|
||||
cpu_device *m_audiocpu;
|
||||
device_t *m_vlm;
|
||||
};
|
||||
|
||||
extern const device_type TRACKFLD_AUDIO;
|
||||
|
@ -36,7 +36,7 @@ static ADDRESS_MAP_START( hyperspt_map, AS_PROGRAM, 8, hyperspt_state )
|
||||
AM_RANGE(0x10c0, 0x10ff) AM_RAM AM_SHARE("scroll") /* Scroll amount */
|
||||
AM_RANGE(0x1400, 0x1400) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0x1480, 0x1480) AM_WRITE(hyperspt_flipscreen_w)
|
||||
AM_RANGE(0x1481, 0x1481) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1481, 0x1481) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1483, 0x1484) AM_WRITE(hyperspt_coin_counter_w)
|
||||
AM_RANGE(0x1487, 0x1487) AM_WRITE(irq_mask_w) /* Interrupt enable */
|
||||
AM_RANGE(0x1500, 0x1500) AM_WRITE(soundlatch_byte_w)
|
||||
@ -57,7 +57,7 @@ static ADDRESS_MAP_START( roadf_map, AS_PROGRAM, 8, hyperspt_state )
|
||||
AM_RANGE(0x10c0, 0x10ff) AM_RAM AM_SHARE("scroll") /* Scroll amount */
|
||||
AM_RANGE(0x1400, 0x1400) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0x1480, 0x1480) AM_WRITE(hyperspt_flipscreen_w)
|
||||
AM_RANGE(0x1481, 0x1481) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1481, 0x1481) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1483, 0x1484) AM_WRITE(hyperspt_coin_counter_w)
|
||||
AM_RANGE(0x1487, 0x1487) AM_WRITE(irq_mask_w) /* Interrupt enable */
|
||||
AM_RANGE(0x1500, 0x1500) AM_WRITE(soundlatch_byte_w)
|
||||
@ -77,9 +77,9 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, hyperspt_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x4fff) AM_RAM
|
||||
AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_READ_LEGACY(hyperspt_sh_timer_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) /* speech data */
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE_LEGACY("vlm", hyperspt_sound_w) /* speech and output control */
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, hyperspt_sound_w) /* speech and output control */
|
||||
AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
|
||||
AM_RANGE(0xe001, 0xe001) AM_WRITE(konami_SN76496_latch_w) /* Loads the snd command into the snd latch */
|
||||
AM_RANGE(0xe002, 0xe002) AM_WRITE(konami_SN76496_w) /* This address triggers the SN chip to read the data port. */
|
||||
@ -89,7 +89,7 @@ static ADDRESS_MAP_START( soundb_map, AS_PROGRAM, 8, hyperspt_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x4fff) AM_RAM
|
||||
AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_READ_LEGACY(hyperspt_sh_timer_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_NOP
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE("hyprolyb_adpcm", hyprolyb_adpcm_device, write) /* speech and output control */
|
||||
AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
|
||||
|
@ -60,7 +60,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, pooyan_state )
|
||||
AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x5e7f) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x5e7f) AM_WRITE(soundlatch_byte_w)
|
||||
AM_RANGE(0xa180, 0xa180) AM_MIRROR(0x5e78) AM_WRITE(irq_enable_w)
|
||||
AM_RANGE(0xa181, 0xa181) AM_MIRROR(0x5e78) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w)
|
||||
AM_RANGE(0xa181, 0xa181) AM_MIRROR(0x5e78) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
|
||||
AM_RANGE(0xa183, 0xa183) AM_MIRROR(0x5e78) AM_WRITENOP // ???
|
||||
AM_RANGE(0xa187, 0xa187) AM_MIRROR(0x5e78) AM_WRITE(pooyan_flipscreen_w)
|
||||
ADDRESS_MAP_END
|
||||
|
@ -192,7 +192,6 @@ TODO:
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/namco.h"
|
||||
#include "sound/samples.h"
|
||||
#include "audio/timeplt.h"
|
||||
#include "includes/rallyx.h"
|
||||
|
||||
#define MASTER_CLOCK XTAL_18_432MHz
|
||||
@ -271,7 +270,7 @@ WRITE8_MEMBER(rallyx_state::locomotn_latch_w)
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00: /* SOUNDON */
|
||||
timeplt_sh_irqtrigger_w(space,0,bit);
|
||||
m_timeplt_audio->sh_irqtrigger_w(space,0,bit);
|
||||
break;
|
||||
|
||||
case 0x01: /* INTST */
|
||||
|
@ -56,7 +56,7 @@ static ADDRESS_MAP_START( rocnrope_map, AS_PROGRAM, 8, rocnrope_state )
|
||||
AM_RANGE(0x5000, 0x5fff) AM_RAM
|
||||
AM_RANGE(0x8000, 0x8000) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0x8080, 0x8080) AM_WRITE(rocnrope_flipscreen_w)
|
||||
AM_RANGE(0x8081, 0x8081) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x8081, 0x8081) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x8082, 0x8082) AM_WRITENOP /* interrupt acknowledge??? */
|
||||
AM_RANGE(0x8083, 0x8083) AM_WRITENOP /* Coin counter 1 */
|
||||
AM_RANGE(0x8084, 0x8084) AM_WRITENOP /* Coin counter 2 */
|
||||
|
@ -94,9 +94,9 @@ static ADDRESS_MAP_START( sbasketb_sound_map, AS_PROGRAM, 8, sbasketb_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM
|
||||
AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_READ_LEGACY(hyperspt_sh_timer_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_DEVREAD("trackfld_audio", trackfld_audio_device, hyperspt_sh_timer_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) /* speech data */
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE_LEGACY("vlm", hyperspt_sound_w) /* speech and output controll */
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, hyperspt_sound_w) /* speech and output controll */
|
||||
AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("dac", dac_device, write_unsigned8)
|
||||
AM_RANGE(0xe001, 0xe001) AM_WRITE(konami_SN76496_latch_w) /* Loads the snd command into the snd latch */
|
||||
AM_RANGE(0xe002, 0xe002) AM_WRITE(konami_SN76496_w) /* This address triggers the SN chip to read the data port. */
|
||||
|
@ -141,7 +141,7 @@ static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state )
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w)
|
||||
AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w)
|
||||
AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w)
|
||||
AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
|
||||
AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r)
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1")
|
||||
@ -163,7 +163,7 @@ static ADDRESS_MAP_START( psurge_main_map, AS_PROGRAM, 8, timeplt_state )
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w)
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w)
|
||||
AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w)
|
||||
AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
|
||||
AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r)
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1")
|
||||
@ -186,7 +186,7 @@ static ADDRESS_MAP_START( chkun_main_map, AS_PROGRAM, 8, timeplt_state )
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w)
|
||||
AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w)
|
||||
AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w)
|
||||
AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
|
||||
AM_RANGE(0xc30a, 0xc30c) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_coin_counter_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_READ(timeplt_scanline_r)
|
||||
AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_READ_PORT("DSW1")
|
||||
|
@ -224,7 +224,7 @@ WRITE8_MEMBER(trackfld_state::irq_mask_w)
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, trackfld_state )
|
||||
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x007f) AM_WRITE(watchdog_reset_w) /* AFE */
|
||||
AM_RANGE(0x1080, 0x1080) AM_MIRROR(0x0078) AM_WRITE(trackfld_flipscreen_w) /* FLIP */
|
||||
AM_RANGE(0x1081, 0x1081) AM_MIRROR(0x0078) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* 26 */ /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1081, 0x1081) AM_MIRROR(0x0078) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w) /* 26 */ /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1082, 0x1082) AM_MIRROR(0x0078) AM_WRITENOP /* 25 */
|
||||
AM_RANGE(0x1083, 0x1084) AM_MIRROR(0x0078) AM_WRITE(coin_w) /* 24, 23 */
|
||||
AM_RANGE(0x1085, 0x1085) AM_MIRROR(0x0078) AM_WRITENOP /* CN3.2 */
|
||||
@ -279,7 +279,7 @@ static ADDRESS_MAP_START( yieartf_map, AS_PROGRAM, 8, trackfld_state )
|
||||
AM_RANGE(0x0003, 0x0003) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w)
|
||||
AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x007f) AM_WRITE(watchdog_reset_w) /* AFE */
|
||||
AM_RANGE(0x1080, 0x1080) AM_MIRROR(0x0078) AM_WRITE(trackfld_flipscreen_w) /* FLIP */
|
||||
AM_RANGE(0x1081, 0x1081) AM_MIRROR(0x0078) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* 26 */ /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1081, 0x1081) AM_MIRROR(0x0078) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w) /* 26 */ /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1082, 0x1082) AM_MIRROR(0x0078) AM_WRITE(yieartf_nmi_mask_w) /* 25 */
|
||||
AM_RANGE(0x1083, 0x1084) AM_MIRROR(0x0078) AM_WRITE(coin_w) /* 24, 23 */
|
||||
AM_RANGE(0x1085, 0x1085) AM_MIRROR(0x0078) AM_WRITENOP /* CN3.2 */
|
||||
@ -309,7 +309,7 @@ static ADDRESS_MAP_START( reaktor_map, AS_PROGRAM, 8, trackfld_state )
|
||||
/* all usual addresses +0x8000 */
|
||||
AM_RANGE(0x9000, 0x9000) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0x9080, 0x9080) AM_WRITE(trackfld_flipscreen_w)
|
||||
AM_RANGE(0x9081, 0x9081) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x9081, 0x9081) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x9083, 0x9084) AM_WRITE(coin_w)
|
||||
AM_RANGE(0x9087, 0x9087) AM_WRITE(irq_mask_w)
|
||||
AM_RANGE(0x9100, 0x9100) AM_WRITE(soundlatch_byte_w)
|
||||
@ -342,7 +342,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( mastkin_map, AS_PROGRAM, 8, trackfld_state )
|
||||
AM_RANGE(0x1000, 0x1000) AM_WRITE(watchdog_reset_w)
|
||||
AM_RANGE(0x10b0, 0x10b0) AM_WRITE(trackfld_flipscreen_w)
|
||||
AM_RANGE(0x10b1, 0x10b1) AM_READNOP AM_WRITE_LEGACY(konami_sh_irqtrigger_w)
|
||||
AM_RANGE(0x10b1, 0x10b1) AM_READNOP AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w)
|
||||
AM_RANGE(0x10b3, 0x10b4) AM_WRITE(coin_w) // actually not used
|
||||
AM_RANGE(0x10b7, 0x10b7) AM_READNOP AM_WRITE(irq_mask_w)
|
||||
AM_RANGE(0x1100, 0x1100) AM_WRITE(soundlatch_byte_w)
|
||||
@ -369,7 +369,7 @@ static ADDRESS_MAP_START( wizzquiz_map, AS_PROGRAM, 8, trackfld_state )
|
||||
AM_RANGE(0x0000, 0x007f) AM_RAM
|
||||
AM_RANGE(0x1000, 0x1000) AM_READWRITE(watchdog_reset_r, watchdog_reset_w)
|
||||
AM_RANGE(0x1080, 0x1080) AM_WRITE(trackfld_flipscreen_w)
|
||||
AM_RANGE(0x1081, 0x1081) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1081, 0x1081) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */
|
||||
AM_RANGE(0x1083, 0x1084) AM_WRITE(coin_w)
|
||||
AM_RANGE(0x1087, 0x1087) AM_WRITE(irq_mask_w)
|
||||
AM_RANGE(0x1100, 0x1100) AM_WRITE(soundlatch_byte_w)
|
||||
@ -404,13 +404,13 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, trackfld_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x1c00) AM_RAM
|
||||
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_READ_LEGACY(trackfld_sh_timer_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_sh_timer_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE(konami_SN76496_latch_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_READ(trackfld_SN76496_r) AM_WRITE(konami_SN76496_w)
|
||||
AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_device, write_unsigned8)
|
||||
AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x1ff8) AM_NOP /* watch dog ?; reaktor reads here */
|
||||
AM_RANGE(0xe002, 0xe002) AM_MIRROR(0x1ff8) AM_DEVREAD_LEGACY("vlm", trackfld_speech_r)
|
||||
AM_RANGE(0xe003, 0xe003) AM_MIRROR(0x1ff8) AM_MASK(0x0380) AM_DEVWRITE_LEGACY("vlm", trackfld_sound_w)
|
||||
AM_RANGE(0xe002, 0xe002) AM_MIRROR(0x1ff8) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_speech_r)
|
||||
AM_RANGE(0xe003, 0xe003) AM_MIRROR(0x1ff8) AM_MASK(0x0380) AM_DEVWRITE("trackfld_audio", trackfld_audio_device, trackfld_sound_w)
|
||||
AM_RANGE(0xe004, 0xe004) AM_MIRROR(0x1ff8) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -418,7 +418,7 @@ static ADDRESS_MAP_START( hyprolyb_sound_map, AS_PROGRAM, 8, trackfld_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x1c00) AM_RAM
|
||||
AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_READ_LEGACY(trackfld_sh_timer_r)
|
||||
AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_DEVREAD("trackfld_audio", trackfld_audio_device, trackfld_sh_timer_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE(konami_SN76496_latch_w)
|
||||
AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_READ(trackfld_SN76496_r) AM_WRITE(konami_SN76496_w)
|
||||
AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1ff8) AM_DEVWRITE("dac", dac_device, write_unsigned8)
|
||||
|
@ -131,7 +131,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tutankhm_state )
|
||||
AM_RANGE(0x8206, 0x8206) AM_MIRROR(0x00f8) AM_WRITE(tutankhm_flip_screen_x_w)
|
||||
AM_RANGE(0x8207, 0x8207) AM_MIRROR(0x00f8) AM_WRITE(tutankhm_flip_screen_y_w)
|
||||
AM_RANGE(0x8300, 0x8300) AM_MIRROR(0x00ff) AM_WRITE(tutankhm_bankselect_w)
|
||||
AM_RANGE(0x8600, 0x8600) AM_MIRROR(0x00ff) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w)
|
||||
AM_RANGE(0x8600, 0x8600) AM_MIRROR(0x00ff) AM_DEVWRITE("timeplt_audio", timeplt_audio_device, sh_irqtrigger_w)
|
||||
AM_RANGE(0x8700, 0x8700) AM_MIRROR(0x00ff) AM_WRITE(soundlatch_byte_w)
|
||||
AM_RANGE(0x8800, 0x8fff) AM_RAM
|
||||
AM_RANGE(0x9000, 0x9fff) AM_ROMBANK("bank1")
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "audio/timeplt.h"
|
||||
#include "sound/samples.h"
|
||||
|
||||
struct jungler_star
|
||||
@ -15,7 +16,8 @@ public:
|
||||
m_videoram(*this, "videoram"),
|
||||
m_radarattr(*this, "radarattr"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_samples(*this, "samples") { }
|
||||
m_samples(*this, "samples"),
|
||||
m_timeplt_audio(*this, "timeplt_audio") { }
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
@ -40,6 +42,7 @@ public:
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<samples_device> m_samples;
|
||||
optional_device<timeplt_audio_device> m_timeplt_audio;
|
||||
|
||||
UINT8 m_main_irq_mask;
|
||||
DECLARE_WRITE8_MEMBER(rallyx_interrupt_vector_w);
|
||||
|
Loading…
Reference in New Issue
Block a user