mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Modernized the x1_010 device. [Osso]
This commit is contained in:
parent
50f6e6cf3d
commit
45c37b7627
@ -60,8 +60,6 @@ Registers:
|
||||
#define LOG_REGISTER_WRITE(x) do { if (VERBOSE_REGISTER_WRITE) logerror x; } while (0)
|
||||
#define LOG_REGISTER_READ(x) do { if (VERBOSE_REGISTER_READ) logerror x; } while (0)
|
||||
|
||||
#define SETA_NUM_CHANNELS 16
|
||||
|
||||
#define FREQ_BASE_BITS 8 // Frequency fixed decimal shift bits
|
||||
#define ENV_BASE_BITS 16 // wave form envelope fixed decimal shift bits
|
||||
#define VOL_BASE (2*32*256/30) // Volume base
|
||||
@ -77,54 +75,153 @@ struct X1_010_CHANNEL {
|
||||
unsigned char reserve[2];
|
||||
};
|
||||
|
||||
struct x1_010_state
|
||||
{
|
||||
/* Variables only used here */
|
||||
int rate; // Output sampling rate (Hz)
|
||||
sound_stream * stream; // Stream handle
|
||||
int address; // address eor data
|
||||
const UINT8 *region; // region name
|
||||
int sound_enable; // sound output enable/disable
|
||||
UINT8 reg[0x2000]; // X1-010 Register & wave form area
|
||||
UINT8 HI_WORD_BUF[0x2000]; // X1-010 16bit access ram check avoidance work
|
||||
UINT32 smp_offset[SETA_NUM_CHANNELS];
|
||||
UINT32 env_offset[SETA_NUM_CHANNELS];
|
||||
|
||||
UINT32 base_clock;
|
||||
};
|
||||
|
||||
/* mixer tables and internal buffers */
|
||||
//static short *mixer_buffer = NULL;
|
||||
|
||||
INLINE x1_010_state *get_safe_token(device_t *device)
|
||||
|
||||
const device_type X1_010 = &device_creator<x1_010_device>;
|
||||
|
||||
x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, X1_010, "X1-010", tag, owner, clock, "x1_010", __FILE__),
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_rate(0),
|
||||
m_stream(NULL),
|
||||
m_region(NULL),
|
||||
m_sound_enable(0),
|
||||
//m_reg[0x2000],
|
||||
//m_HI_WORD_BUF[0x2000],
|
||||
//m_smp_offset[SETA_NUM_CHANNELS],
|
||||
//m_env_offset[SETA_NUM_CHANNELS],
|
||||
m_base_clock(0)
|
||||
{
|
||||
assert(device != NULL);
|
||||
assert(device->type() == X1_010);
|
||||
return (x1_010_state *)downcast<x1_010_device *>(device)->token();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void x1_010_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const x1_010_interface *intf = reinterpret_cast<const x1_010_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
*static_cast<x1_010_interface *>(this) = *intf;
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
m_adr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void x1_010_device::device_start()
|
||||
{
|
||||
int i;
|
||||
|
||||
m_region = *region();
|
||||
m_base_clock = clock();
|
||||
m_rate = clock() / 1024;
|
||||
|
||||
for( i = 0; i < SETA_NUM_CHANNELS; i++ ) {
|
||||
m_smp_offset[i] = 0;
|
||||
m_env_offset[i] = 0;
|
||||
}
|
||||
/* Print some more debug info */
|
||||
LOG_SOUND(("masterclock = %d rate = %d\n", clock(), m_rate ));
|
||||
|
||||
/* get stream channels */
|
||||
m_stream = machine().sound().stream_alloc(*this, 0, 2, m_rate, this);
|
||||
|
||||
save_item(NAME(m_rate));
|
||||
save_item(NAME(m_sound_enable));
|
||||
save_item(NAME(m_reg));
|
||||
save_item(NAME(m_HI_WORD_BUF));
|
||||
save_item(NAME(m_smp_offset));
|
||||
save_item(NAME(m_env_offset));
|
||||
save_item(NAME(m_base_clock));
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
generate sound to the mix buffer
|
||||
--------------------------------------------------------------*/
|
||||
static STREAM_UPDATE( seta_update )
|
||||
void x1_010_device::enable_w(int data)
|
||||
{
|
||||
m_sound_enable = data;
|
||||
}
|
||||
|
||||
/* Use these for 8 bit CPUs */
|
||||
|
||||
|
||||
READ8_MEMBER( x1_010_device::read )
|
||||
{
|
||||
offset ^= m_adr;
|
||||
return m_reg[offset];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( x1_010_device::write )
|
||||
{
|
||||
int channel, reg;
|
||||
offset ^= m_adr;
|
||||
|
||||
channel = offset/sizeof(X1_010_CHANNEL);
|
||||
reg = offset%sizeof(X1_010_CHANNEL);
|
||||
|
||||
if( channel < SETA_NUM_CHANNELS && reg == 0
|
||||
&& (m_reg[offset]&1) == 0 && (data&1) != 0 ) {
|
||||
m_smp_offset[channel] = 0;
|
||||
m_env_offset[channel] = 0;
|
||||
}
|
||||
LOG_REGISTER_WRITE(("%s: offset %6X : data %2X\n", machine().describe_context(), offset, data ));
|
||||
m_reg[offset] = data;
|
||||
}
|
||||
|
||||
|
||||
/* Use these for 16 bit CPUs */
|
||||
|
||||
READ16_MEMBER( x1_010_device::word_r )
|
||||
{
|
||||
UINT16 ret;
|
||||
|
||||
ret = m_HI_WORD_BUF[offset]<<8;
|
||||
ret += (read( space, offset )&0xff);
|
||||
LOG_REGISTER_READ(( "%s: Read X1-010 Offset:%04X Data:%04X\n", machine().describe_context(), offset, ret ));
|
||||
return ret;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( x1_010_device::word_w )
|
||||
{
|
||||
m_HI_WORD_BUF[offset] = (data>>8)&0xff;
|
||||
write( space, offset, data&0xff );
|
||||
LOG_REGISTER_WRITE(( "%s: Write X1-010 Offset:%04X Data:%04X\n", machine().describe_context(), offset, data ));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
{
|
||||
x1_010_state *info = (x1_010_state *)param;
|
||||
X1_010_CHANNEL *reg;
|
||||
int ch, i, volL, volR, freq;
|
||||
register INT8 *start, *end, data;
|
||||
register UINT8 *env;
|
||||
register UINT32 smp_offs, smp_step, env_offs, env_step, delta;
|
||||
const UINT8 *snd1 = info->region;
|
||||
const UINT8 *snd1 = m_region;
|
||||
|
||||
// mixer buffer zero clear
|
||||
memset( outputs[0], 0, samples*sizeof(*outputs[0]) );
|
||||
memset( outputs[1], 0, samples*sizeof(*outputs[1]) );
|
||||
|
||||
// if( info->sound_enable == 0 ) return;
|
||||
// if( m_sound_enable == 0 ) return;
|
||||
|
||||
for( ch = 0; ch < SETA_NUM_CHANNELS; ch++ ) {
|
||||
reg = (X1_010_CHANNEL *)&(info->reg[ch*sizeof(X1_010_CHANNEL)]);
|
||||
reg = (X1_010_CHANNEL *)&(m_reg[ch*sizeof(X1_010_CHANNEL)]);
|
||||
if( (reg->status&1) != 0 ) { // Key On
|
||||
stream_sample_t *bufL = outputs[0];
|
||||
stream_sample_t *bufR = outputs[1];
|
||||
@ -133,12 +230,12 @@ static STREAM_UPDATE( seta_update )
|
||||
end = (INT8 *)((0x100-reg->end)*0x1000+snd1);
|
||||
volL = ((reg->volume>>4)&0xf)*VOL_BASE;
|
||||
volR = ((reg->volume>>0)&0xf)*VOL_BASE;
|
||||
smp_offs = info->smp_offset[ch];
|
||||
smp_offs = m_smp_offset[ch];
|
||||
freq = reg->frequency&0x1f;
|
||||
// Meta Fox does not write the frequency register. Ever
|
||||
if( freq == 0 ) freq = 4;
|
||||
smp_step = (UINT32)((float)info->base_clock/8192.0
|
||||
*freq*(1<<FREQ_BASE_BITS)/(float)info->rate);
|
||||
smp_step = (UINT32)((float)m_base_clock/8192.0
|
||||
*freq*(1<<FREQ_BASE_BITS)/(float)m_rate);
|
||||
if( smp_offs == 0 ) {
|
||||
LOG_SOUND(( "Play sample %p - %p, channel %X volume %d:%d freq %X step %X offset %X\n",
|
||||
start, end, ch, volL, volR, freq, smp_step, smp_offs ));
|
||||
@ -155,16 +252,16 @@ static STREAM_UPDATE( seta_update )
|
||||
*bufR++ += (data*volR/256);
|
||||
smp_offs += smp_step;
|
||||
}
|
||||
info->smp_offset[ch] = smp_offs;
|
||||
m_smp_offset[ch] = smp_offs;
|
||||
} else { // Wave form
|
||||
start = (INT8 *)&(info->reg[reg->volume*128+0x1000]);
|
||||
smp_offs = info->smp_offset[ch];
|
||||
start = (INT8 *)&(m_reg[reg->volume*128+0x1000]);
|
||||
smp_offs = m_smp_offset[ch];
|
||||
freq = (reg->pitch_hi<<8)+reg->frequency;
|
||||
smp_step = (UINT32)((float)info->base_clock/128.0/1024.0/4.0*freq*(1<<FREQ_BASE_BITS)/(float)info->rate);
|
||||
smp_step = (UINT32)((float)m_base_clock/128.0/1024.0/4.0*freq*(1<<FREQ_BASE_BITS)/(float)m_rate);
|
||||
|
||||
env = (UINT8 *)&(info->reg[reg->end*128]);
|
||||
env_offs = info->env_offset[ch];
|
||||
env_step = (UINT32)((float)info->base_clock/128.0/1024.0/4.0*reg->start*(1<<ENV_BASE_BITS)/(float)info->rate);
|
||||
env = (UINT8 *)&(m_reg[reg->end*128]);
|
||||
env_offs = m_env_offset[ch];
|
||||
env_step = (UINT32)((float)m_base_clock/128.0/1024.0/4.0*reg->start*(1<<ENV_BASE_BITS)/(float)m_rate);
|
||||
/* Print some more debug info */
|
||||
if( smp_offs == 0 ) {
|
||||
LOG_SOUND(( "Play waveform %X, channel %X volume %X freq %4X step %X offset %X\n",
|
||||
@ -187,136 +284,9 @@ static STREAM_UPDATE( seta_update )
|
||||
smp_offs += smp_step;
|
||||
env_offs += env_step;
|
||||
}
|
||||
info->smp_offset[ch] = smp_offs;
|
||||
info->env_offset[ch] = env_offs;
|
||||
m_smp_offset[ch] = smp_offs;
|
||||
m_env_offset[ch] = env_offs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static DEVICE_START( x1_010 )
|
||||
{
|
||||
int i;
|
||||
const x1_010_interface *intf = (const x1_010_interface *)device->static_config();
|
||||
x1_010_state *info = get_safe_token(device);
|
||||
|
||||
info->region = *device->region();
|
||||
info->base_clock = device->clock();
|
||||
info->rate = device->clock() / 1024;
|
||||
info->address = intf->adr;
|
||||
|
||||
for( i = 0; i < SETA_NUM_CHANNELS; i++ ) {
|
||||
info->smp_offset[i] = 0;
|
||||
info->env_offset[i] = 0;
|
||||
}
|
||||
/* Print some more debug info */
|
||||
LOG_SOUND(("masterclock = %d rate = %d\n", device->clock(), info->rate ));
|
||||
|
||||
/* get stream channels */
|
||||
info->stream = device->machine().sound().stream_alloc(*device,0,2,info->rate,info,seta_update);
|
||||
}
|
||||
|
||||
|
||||
void seta_sound_enable_w(device_t *device, int data)
|
||||
{
|
||||
x1_010_state *info = get_safe_token(device);
|
||||
info->sound_enable = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Use these for 8 bit CPUs */
|
||||
|
||||
|
||||
READ8_DEVICE_HANDLER( seta_sound_r )
|
||||
{
|
||||
x1_010_state *info = get_safe_token(device);
|
||||
offset ^= info->address;
|
||||
return info->reg[offset];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
WRITE8_DEVICE_HANDLER( seta_sound_w )
|
||||
{
|
||||
x1_010_state *info = get_safe_token(device);
|
||||
int channel, reg;
|
||||
offset ^= info->address;
|
||||
|
||||
channel = offset/sizeof(X1_010_CHANNEL);
|
||||
reg = offset%sizeof(X1_010_CHANNEL);
|
||||
|
||||
if( channel < SETA_NUM_CHANNELS && reg == 0
|
||||
&& (info->reg[offset]&1) == 0 && (data&1) != 0 ) {
|
||||
info->smp_offset[channel] = 0;
|
||||
info->env_offset[channel] = 0;
|
||||
}
|
||||
LOG_REGISTER_WRITE(("%s: offset %6X : data %2X\n", device->machine().describe_context(), offset, data ));
|
||||
info->reg[offset] = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Use these for 16 bit CPUs */
|
||||
|
||||
READ16_DEVICE_HANDLER( seta_sound_word_r )
|
||||
{
|
||||
x1_010_state *info = get_safe_token(device);
|
||||
UINT16 ret;
|
||||
|
||||
ret = info->HI_WORD_BUF[offset]<<8;
|
||||
ret += (seta_sound_r( device, space, offset )&0xff);
|
||||
LOG_REGISTER_READ(( "%s: Read X1-010 Offset:%04X Data:%04X\n", device->machine().describe_context(), offset, ret ));
|
||||
return ret;
|
||||
}
|
||||
|
||||
WRITE16_DEVICE_HANDLER( seta_sound_word_w )
|
||||
{
|
||||
x1_010_state *info = get_safe_token(device);
|
||||
info->HI_WORD_BUF[offset] = (data>>8)&0xff;
|
||||
seta_sound_w( device, space, offset, data&0xff );
|
||||
LOG_REGISTER_WRITE(( "%s: Write X1-010 Offset:%04X Data:%04X\n", device->machine().describe_context(), offset, data ));
|
||||
}
|
||||
|
||||
|
||||
const device_type X1_010 = &device_creator<x1_010_device>;
|
||||
|
||||
x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, X1_010, "X1-010", tag, owner, clock, "x1_010", __FILE__),
|
||||
device_sound_interface(mconfig, *this)
|
||||
{
|
||||
m_token = global_alloc_clear(x1_010_state);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void x1_010_device::device_config_complete()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void x1_010_device::device_start()
|
||||
{
|
||||
DEVICE_START_NAME( x1_010 )(this);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
|
||||
{
|
||||
// should never get here
|
||||
fatalerror("sound_stream_update called; not applicable to legacy sound devices\n");
|
||||
}
|
||||
|
@ -3,32 +3,30 @@
|
||||
#ifndef __X1_010_H__
|
||||
#define __X1_010_H__
|
||||
|
||||
#include "devlegcy.h"
|
||||
|
||||
#define SETA_NUM_CHANNELS 16
|
||||
|
||||
struct x1_010_interface
|
||||
{
|
||||
int adr; /* address */
|
||||
int m_adr; /* address */
|
||||
};
|
||||
|
||||
|
||||
DECLARE_READ8_DEVICE_HANDLER ( seta_sound_r );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( seta_sound_w );
|
||||
|
||||
DECLARE_READ16_DEVICE_HANDLER ( seta_sound_word_r );
|
||||
DECLARE_WRITE16_DEVICE_HANDLER( seta_sound_word_w );
|
||||
|
||||
void seta_sound_enable_w(device_t *device, int data);
|
||||
|
||||
class x1_010_device : public device_t,
|
||||
public device_sound_interface
|
||||
public device_sound_interface,
|
||||
public x1_010_interface
|
||||
{
|
||||
public:
|
||||
x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~x1_010_device() { global_free(m_token); }
|
||||
~x1_010_device() {}
|
||||
|
||||
DECLARE_READ8_MEMBER ( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
DECLARE_READ16_MEMBER ( word_r );
|
||||
DECLARE_WRITE16_MEMBER( word_w );
|
||||
|
||||
void enable_w(int data);
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -38,7 +36,18 @@ protected:
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
|
||||
/* Variables only used here */
|
||||
int m_rate; // Output sampling rate (Hz)
|
||||
sound_stream * m_stream; // Stream handle
|
||||
const UINT8 *m_region; // region name
|
||||
int m_sound_enable; // sound output enable/disable
|
||||
UINT8 m_reg[0x2000]; // X1-010 Register & wave form area
|
||||
UINT8 m_HI_WORD_BUF[0x2000]; // X1-010 16bit access ram check avoidance work
|
||||
UINT32 m_smp_offset[SETA_NUM_CHANNELS];
|
||||
UINT32 m_env_offset[SETA_NUM_CHANNELS];
|
||||
|
||||
UINT32 m_base_clock;
|
||||
};
|
||||
|
||||
extern const device_type X1_010;
|
||||
|
@ -161,8 +161,10 @@ class champbwl_state : public tnzs_state
|
||||
{
|
||||
public:
|
||||
champbwl_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: tnzs_state(mconfig, type, tag) { }
|
||||
: tnzs_state(mconfig, type, tag),
|
||||
m_x1(*this, "x1snd") { }
|
||||
|
||||
required_device<x1_010_device> m_x1;
|
||||
UINT8 m_last_trackball_val[2];
|
||||
DECLARE_READ8_MEMBER(trackball_r);
|
||||
DECLARE_WRITE8_MEMBER(champbwl_misc_w);
|
||||
@ -209,7 +211,7 @@ static ADDRESS_MAP_START( champbwl_map, AS_PROGRAM, 8, champbwl_state )
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
|
||||
AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r, seta_sound_w)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVREADWRITE("x1snd", x1_010_device, read, write)
|
||||
AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
|
||||
AM_RANGE(0xe300, 0xe303) AM_MIRROR(0xfc) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8) /* control registers (0x80 mirror used by Arkanoid 2) */
|
||||
AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8) /* enable / disable background transparency */
|
||||
@ -248,7 +250,7 @@ static ADDRESS_MAP_START( doraemon, AS_PROGRAM, 8, champbwl_state )
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xa000, 0xafff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodelow_r8, spritecodelow_w8)
|
||||
AM_RANGE(0xb000, 0xbfff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecodehigh_r8, spritecodehigh_w8)
|
||||
AM_RANGE(0xc000, 0xc07f) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r,seta_sound_w) // Sound
|
||||
AM_RANGE(0xc000, 0xc07f) AM_DEVREADWRITE("x1snd", x1_010_device, read, write) // Sound
|
||||
AM_RANGE(0xe000, 0xe2ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r8, spriteylow_w8)
|
||||
AM_RANGE(0xe300, 0xe303) AM_DEVWRITE("spritegen", seta001_device, spritectrl_w8)
|
||||
AM_RANGE(0xe800, 0xe800) AM_DEVWRITE("spritegen", seta001_device, spritebgflag_w8) /* enable / disable background transparency */
|
||||
|
@ -1366,7 +1366,6 @@ Note: on screen copyright is (c)1998 Coinmaster.
|
||||
#include "sound/2612intf.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/x1_010.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
@ -1647,7 +1646,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( downtown_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x000000, 0x09ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0x200000, 0x200001) AM_NOP // watchdog? (twineagl)
|
||||
AM_RANGE(0x300000, 0x300001) AM_WRITENOP // IRQ enable/acknowledge?
|
||||
AM_RANGE(0x400000, 0x400007) AM_WRITE(twineagl_tilebank_w) // special tile banking to animate water in twineagl
|
||||
@ -1816,7 +1815,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( atehate_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM // ROM
|
||||
AM_RANGE(0x900000, 0x9fffff) AM_RAM // RAM
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0x200000, 0x200001) AM_WRITENOP // ? watchdog ?
|
||||
AM_RANGE(0x300000, 0x300001) AM_WRITENOP // ? 0 (irq ack lev 2?)
|
||||
AM_RANGE(0x500000, 0x500001) AM_WRITENOP // ? (end of lev 1: bit 4 goes 1,0,1)
|
||||
@ -1859,7 +1858,7 @@ static ADDRESS_MAP_START( blandia_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xb04000, 0xb0ffff) AM_RAM // (jjsquawk)
|
||||
AM_RANGE(0xb80000, 0xb83fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
|
||||
AM_RANGE(0xb84000, 0xb8ffff) AM_RAM // (jjsquawk)
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd00007) AM_WRITENOP // ?
|
||||
AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // ? VBlank IRQ Ack
|
||||
AM_RANGE(0xf00000, 0xf00001) AM_WRITENOP // ? Sound IRQ Ack
|
||||
@ -1894,7 +1893,7 @@ static ADDRESS_MAP_START( blandiap_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
|
||||
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd00007) AM_WRITENOP // ?
|
||||
AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP // ? VBlank IRQ Ack
|
||||
AM_RANGE(0xf00000, 0xf00001) AM_WRITENOP // ? Sound IRQ Ack
|
||||
@ -1974,7 +1973,7 @@ static ADDRESS_MAP_START( wrofaero_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
|
||||
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
#if __uPD71054_TIMER
|
||||
AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ?
|
||||
#else
|
||||
@ -2050,7 +2049,7 @@ static ADDRESS_MAP_START( jjsquawb_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xa0a600, 0xa0a607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
|
||||
// AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
|
||||
AM_RANGE(0xb0c000, 0xb0ffff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // RZ: Sprites Code + X + Attr
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
#if __uPD71054_TIMER
|
||||
AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ?
|
||||
#else
|
||||
@ -2077,7 +2076,7 @@ static ADDRESS_MAP_START( orbs_map, AS_PROGRAM, 16, seta_state )
|
||||
//AM_RANGE(0x600000, 0x60000f) AM_READ(krzybowl_input_r ) // P1
|
||||
AM_RANGE(0x8000f0, 0x8000f1) AM_RAM // NVRAM
|
||||
AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
|
||||
@ -2158,7 +2157,7 @@ static ADDRESS_MAP_START( keroppi_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM
|
||||
AM_RANGE(0x900000, 0x900001) AM_WRITENOP // ?
|
||||
AM_RANGE(0x900002, 0x900003) AM_WRITE(keroppi_prize_w) //
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
|
||||
@ -2189,7 +2188,7 @@ static ADDRESS_MAP_START( blockcar_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1") // P1
|
||||
AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2
|
||||
AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
|
||||
@ -2226,7 +2225,7 @@ static ADDRESS_MAP_START( daioh_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xb04000, 0xb13fff) AM_RAM
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP //
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -2239,7 +2238,7 @@ static ADDRESS_MAP_START( drgnunit_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x000000, 0x0bffff) AM_ROM // ROM
|
||||
AM_RANGE(0xf00000, 0xf0ffff) AM_RAM // RAM (qzkklogy)
|
||||
AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM (drgnunit,stg)
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0x200000, 0x200001) AM_WRITENOP // Watchdog
|
||||
AM_RANGE(0x300000, 0x300001) AM_WRITENOP // ? IRQ Ack
|
||||
AM_RANGE(0x500000, 0x500001) AM_RAM_WRITE(seta_vregs_w) AM_SHARE("vregs") // Coin Lockout + Video Registers
|
||||
@ -2353,7 +2352,7 @@ static ADDRESS_MAP_START( extdwnhl_map, AS_PROGRAM, 16, seta_state )
|
||||
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xb04000, 0xb13fff) AM_RAM //
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xe00000, 0xe03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -2390,7 +2389,7 @@ static ADDRESS_MAP_START( kamenrid_map, AS_PROGRAM, 16, seta_state )
|
||||
#else
|
||||
AM_RANGE(0xc00000, 0xc00007) AM_WRITENOP // ?
|
||||
#endif
|
||||
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/* almost identical to kamenrid */
|
||||
@ -2419,7 +2418,7 @@ static ADDRESS_MAP_START( madshark_map, AS_PROGRAM, 16, seta_state )
|
||||
#else
|
||||
AM_RANGE(0xc00000, 0xc00007) AM_WRITENOP // ?
|
||||
#endif
|
||||
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -2466,7 +2465,7 @@ static ADDRESS_MAP_START( magspeed_map, AS_PROGRAM, 16, seta_state )
|
||||
#else
|
||||
AM_RANGE(0xc00000, 0xc00007) AM_WRITENOP // ?
|
||||
#endif
|
||||
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -2511,7 +2510,7 @@ static ADDRESS_MAP_START( krzybowl_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x600000, 0x60000f) AM_READ(krzybowl_input_r) // P1
|
||||
AM_RANGE(0x8000f0, 0x8000f1) AM_RAM // NVRAM
|
||||
AM_RANGE(0x800100, 0x8001ff) AM_RAM // NVRAM
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
/**/AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
|
||||
@ -2557,7 +2556,7 @@ static ADDRESS_MAP_START( msgundam_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xa80000, 0xa83fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
|
||||
AM_RANGE(0xb00000, 0xb00005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl
|
||||
AM_RANGE(0xb80000, 0xb80005) AM_RAM AM_SHARE("vctrl_2") // VRAM 2&3 Ctrl
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
#if __uPD71054_TIMER
|
||||
AM_RANGE(0xd00000, 0xd00007) AM_WRITE(timer_regs_w) // ?
|
||||
#else
|
||||
@ -2581,7 +2580,7 @@ static ADDRESS_MAP_START( oisipuzl_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins
|
||||
AM_RANGE(0x400000, 0x400001) AM_WRITENOP // ? IRQ Ack
|
||||
AM_RANGE(0x500000, 0x500005) AM_RAM_WRITE(seta_vregs_w) AM_SHARE("vregs") // Coin Lockout + Video Registers
|
||||
AM_RANGE(0x700000, 0x703fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x700000, 0x703fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0x800000, 0x803fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1
|
||||
AM_RANGE(0x880000, 0x883fff) AM_RAM_WRITE(seta_vram_2_w) AM_SHARE("vram_2") // VRAM 2&3
|
||||
/**/AM_RANGE(0x900000, 0x900005) AM_RAM AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl
|
||||
@ -2672,7 +2671,7 @@ static ADDRESS_MAP_START( kiwame_map, AS_PROGRAM, 16, seta_state )
|
||||
/**/AM_RANGE(0xa00000, 0xa005ff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spriteylow_r16, spriteylow_w16) // Sprites Y
|
||||
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
|
||||
AM_RANGE(0xb00000, 0xb003ff) AM_RAM AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd00009) AM_READ(kiwame_input_r) // mahjong panel
|
||||
AM_RANGE(0xe00000, 0xe00003) AM_READ(seta_dsw_r) // DSW
|
||||
ADDRESS_MAP_END
|
||||
@ -2697,7 +2696,7 @@ WRITE16_MEMBER(seta_state::thunderl_protection_w)
|
||||
static ADDRESS_MAP_START( thunderl_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM
|
||||
AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0x200000, 0x200001) AM_WRITENOP // ?
|
||||
AM_RANGE(0x300000, 0x300001) AM_WRITENOP // ?
|
||||
AM_RANGE(0x400000, 0x40ffff) AM_WRITE(thunderl_protection_w) // Protection (not in wits)
|
||||
@ -2721,7 +2720,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( thunderlbl_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM
|
||||
AM_RANGE(0xffc000, 0xffffff) AM_RAM // RAM
|
||||
// AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
// AM_RANGE(0x100000, 0x103fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0x200000, 0x200001) AM_WRITENOP // ?
|
||||
AM_RANGE(0x300000, 0x300001) AM_WRITENOP // ?
|
||||
// AM_RANGE(0x400000, 0x40ffff) AM_WRITE(thunderl_protection_w) // Protection (not in wits)
|
||||
@ -2807,7 +2806,7 @@ static ADDRESS_MAP_START( umanclub_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0xa00600, 0xa00607) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritectrl_r16, spritectrl_w16)
|
||||
/**/AM_RANGE(0xa80000, 0xa80001) AM_RAM // ? 0x4000
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -2875,7 +2874,7 @@ static ADDRESS_MAP_START( pairlove_map, AS_PROGRAM, 16, seta_state )
|
||||
AM_RANGE(0x500002, 0x500003) AM_READ_PORT("P2") // P2
|
||||
AM_RANGE(0x500004, 0x500005) AM_READ_PORT("COINS") // Coins
|
||||
AM_RANGE(0x900000, 0x9001ff) AM_READWRITE(pairlove_prot_r,pairlove_prot_w)
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb00fff) AM_RAM AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc00000, 0xc03fff) AM_RAM AM_DEVREADWRITE("spritegen", seta001_device, spritecode_r16, spritecode_w16) // Sprites Code + X + Attr
|
||||
AM_RANGE(0xd00000, 0xd00001) AM_RAM // ? 0x4000
|
||||
@ -2965,7 +2964,7 @@ static ADDRESS_MAP_START( inttoote_map, AS_PROGRAM, 16, seta_state )
|
||||
|
||||
AM_RANGE(0x800000, 0x80001f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0x00ff)
|
||||
|
||||
AM_RANGE(0x900000, 0x903fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r, seta_sound_word_w ) // Sound
|
||||
AM_RANGE(0x900000, 0x903fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
|
||||
AM_RANGE(0xa00000, 0xa00005) AM_WRITEONLY AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1
|
||||
@ -3027,7 +3026,7 @@ static ADDRESS_MAP_START( jockeyc_map, AS_PROGRAM, 16, seta_state )
|
||||
|
||||
AM_RANGE(0x800000, 0x80001f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0x00ff)
|
||||
|
||||
AM_RANGE(0x900000, 0x903fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r, seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x900000, 0x903fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
|
||||
AM_RANGE(0xa00000, 0xa00005) AM_WRITEONLY AM_SHARE("vctrl_0") // VRAM 0&1 Ctrl
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_RAM_WRITE(seta_vram_0_w) AM_SHARE("vram_0") // VRAM 0&1
|
||||
@ -3166,7 +3165,7 @@ WRITE8_MEMBER(seta_state::calibr50_soundlatch2_w)
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( calibr50_sub_map, AS_PROGRAM, 8, seta_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r,seta_sound_w) // Sound
|
||||
AM_RANGE(0x0000, 0x1fff) AM_DEVREADWRITE("x1snd", x1_010_device, read ,write) // Sound
|
||||
AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) // From Main CPU
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE(sub_bankswitch_w) // Bankswitching
|
||||
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") // Banked ROM
|
||||
@ -3202,7 +3201,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( utoukond_sound_map, AS_PROGRAM, 8, seta_state )
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xefff) AM_RAM
|
||||
AM_RANGE(0xf000, 0xffff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r,seta_sound_w)
|
||||
AM_RANGE(0xf000, 0xffff) AM_DEVREADWRITE("x1snd", x1_010_device, read, write)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( utoukond_sound_io_map, AS_IO, 8, seta_state )
|
||||
|
@ -112,7 +112,6 @@ reelquak:
|
||||
#include "machine/tmp68301.h"
|
||||
#include "cpu/h83002/h8.h"
|
||||
#include "sound/okim9810.h"
|
||||
#include "sound/x1_010.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/ticket.h"
|
||||
@ -168,7 +167,7 @@ static ADDRESS_MAP_START( grdians_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x700004, 0x700005) AM_READ_PORT("SYSTEM") // Coins
|
||||
AM_RANGE(0x70000c, 0x70000d) AM_READ(watchdog_reset16_r) // Watchdog
|
||||
AM_RANGE(0x800000, 0x800001) AM_WRITE(grdians_lockout_w)
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xc40000, 0xc4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc50000, 0xc5ffff) AM_RAM // cleared
|
||||
@ -206,7 +205,7 @@ static ADDRESS_MAP_START( gundamex_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x70000a, 0x70000b) AM_READ_PORT("IN1") // P2
|
||||
AM_RANGE(0x70000c, 0x70000d) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x800000, 0x800001) AM_WRITE(grdians_lockout_w)
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xc40000, 0xc4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc50000, 0xc5ffff) AM_RAM // cleared
|
||||
@ -265,7 +264,7 @@ static ADDRESS_MAP_START( mj4simai_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x600300, 0x600301) AM_READ_PORT("DSW1") // DSW 1
|
||||
AM_RANGE(0x600302, 0x600303) AM_READ_PORT("DSW2") // DSW 2
|
||||
AM_RANGE(0x600300, 0x60030f) AM_WRITE(seta2_sound_bank_w) // Samples Banks
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xc40000, 0xc4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc60000, 0xc6003f) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs") // Video Registers
|
||||
@ -288,7 +287,7 @@ static ADDRESS_MAP_START( myangel_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x700300, 0x700301) AM_READ_PORT("DSW1") // DSW 1
|
||||
AM_RANGE(0x700302, 0x700303) AM_READ_PORT("DSW2") // DSW 2
|
||||
AM_RANGE(0x700310, 0x70031f) AM_WRITE(seta2_sound_bank_w) // Samples Banks
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xc40000, 0xc4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc60000, 0xc6003f) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs") // Video Registers
|
||||
@ -311,7 +310,7 @@ static ADDRESS_MAP_START( myangel2_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x600300, 0x600301) AM_READ_PORT("DSW1") // DSW 1
|
||||
AM_RANGE(0x600302, 0x600303) AM_READ_PORT("DSW2") // DSW 2
|
||||
AM_RANGE(0x600300, 0x60030f) AM_WRITE(seta2_sound_bank_w) // Samples Banks
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xd00000, 0xd3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xd40000, 0xd4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xd60000, 0xd6003f) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs") // Video Registers
|
||||
@ -359,7 +358,7 @@ static ADDRESS_MAP_START( pzlbowl_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x800000, 0x83ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0x840000, 0x84ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0x860000, 0x86003f) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs") // Video Registers
|
||||
AM_RANGE(0x900000, 0x903fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0x900000, 0x903fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xfffc00, 0xffffff) AM_READWRITE_LEGACY(tmp68301_regs_r, tmp68301_regs_w) // TMP68301 Registers
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -385,7 +384,7 @@ static ADDRESS_MAP_START( penbros_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0xb00000, 0xb3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xb40000, 0xb4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xb60000, 0xb6003f) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs")
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xfffc00, 0xffffff) AM_READWRITE_LEGACY(tmp68301_regs_r, tmp68301_regs_w) // TMP68301 Registers
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -440,7 +439,7 @@ static ADDRESS_MAP_START( reelquak_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE(0x400300, 0x400301) AM_READ_PORT("DSW1") // DSW 1
|
||||
AM_RANGE(0x400302, 0x400303) AM_READ_PORT("DSW2") // DSW 2
|
||||
AM_RANGE(0x400300, 0x40030f) AM_WRITE(seta2_sound_bank_w) // Samples Banks
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r,seta_sound_word_w) // Sound
|
||||
AM_RANGE(0xb00000, 0xb03fff) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
AM_RANGE(0xc00000, 0xc3ffff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0xc40000, 0xc4ffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0xc60000, 0xc6003f) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs") // Video Registers
|
||||
@ -502,7 +501,7 @@ static ADDRESS_MAP_START( samshoot_map, AS_PROGRAM, 16, seta2_state )
|
||||
AM_RANGE( 0x840000, 0x84ffff ) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE( 0x860000, 0x86003f ) AM_WRITE(seta2_vregs_w) AM_SHARE("vregs") // Video Registers
|
||||
|
||||
AM_RANGE( 0x900000, 0x903fff ) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_word_r, seta_sound_word_w ) // Sound
|
||||
AM_RANGE( 0x900000, 0x903fff ) AM_DEVREADWRITE("x1snd", x1_010_device, word_r, word_w) // Sound
|
||||
|
||||
AM_RANGE( 0xfffd0a, 0xfffd0b ) AM_READ_PORT("DSW2") // parallel data register (DSW 2)
|
||||
AM_RANGE( 0xfffc00, 0xffffff ) AM_READWRITE_LEGACY(tmp68301_regs_r, tmp68301_regs_w) // TMP68301 Registers
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "sound/x1_010.h"
|
||||
#include "video/seta001.h"
|
||||
|
||||
#define __uPD71054_TIMER 1
|
||||
@ -33,6 +34,7 @@ public:
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_subcpu(*this,"sub"),
|
||||
m_seta001(*this, "spritegen"),
|
||||
m_x1(*this, "x1snd"),
|
||||
m_sharedram(*this,"sharedram"),
|
||||
m_workram(*this,"workram"),
|
||||
m_vregs(*this,"vregs"),
|
||||
@ -50,6 +52,7 @@ public:
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
optional_device<cpu_device> m_subcpu;
|
||||
required_device<seta001_device> m_seta001;
|
||||
optional_device<x1_010_device> m_x1;
|
||||
|
||||
optional_shared_ptr<UINT8> m_sharedram;
|
||||
optional_shared_ptr<UINT16> m_workram;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "sound/okim9810.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/x1_010.h"
|
||||
|
||||
class seta2_state : public driver_device
|
||||
{
|
||||
@ -12,6 +13,7 @@ public:
|
||||
m_vregs(*this, "vregs", 0),
|
||||
m_funcube_outputs(*this, "funcube_outputs"),
|
||||
m_funcube_leds(*this, "funcube_leds"),
|
||||
m_x1(*this, "x1snd"),
|
||||
m_oki(*this, "oki"),
|
||||
m_eeprom(*this, "eeprom"){ }
|
||||
|
||||
@ -23,6 +25,11 @@ public:
|
||||
|
||||
optional_shared_ptr<UINT8> m_funcube_outputs;
|
||||
optional_shared_ptr<UINT8> m_funcube_leds;
|
||||
|
||||
optional_device<x1_010_device> m_x1;
|
||||
optional_device<okim9810_device> m_oki;
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
|
||||
int m_xoffset;
|
||||
int m_yoffset;
|
||||
int m_keyboard_row;
|
||||
@ -80,6 +87,4 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(funcube_interrupt);
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
void funcube_debug_outputs();
|
||||
optional_device<okim9810_device> m_oki;
|
||||
optional_device<eeprom_device> m_eeprom;
|
||||
};
|
||||
|
@ -136,7 +136,6 @@ Note: if MAME_DEBUG is defined, pressing Z with:
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "sound/x1_010.h"
|
||||
#include "includes/seta.h"
|
||||
|
||||
/* note that drgnunit, stg and qzkklogy run on the same board, yet they need different alignment */
|
||||
@ -266,10 +265,9 @@ WRITE16_MEMBER(seta_state::seta_vregs_w)
|
||||
---- ---- ---- ---0 Coin #0 Counter */
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
device_t *x1_010 = machine().device("x1snd");
|
||||
seta_coin_lockout_w (data & 0x0f);
|
||||
if (x1_010 != NULL)
|
||||
seta_sound_enable_w (x1_010, data & 0x20);
|
||||
if (m_x1 != NULL)
|
||||
m_x1->enable_w (data & 0x20);
|
||||
coin_counter_w(machine(), 0,data & 0x01);
|
||||
coin_counter_w(machine(), 1,data & 0x02);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user