mirror of
https://github.com/holub/mame
synced 2025-05-29 00:53:09 +03:00
Removed global variables from gaelco, namco, and nile sound cores.
[Atari Ace] -- From: Atari Ace <atari_ace@frontier.net> Date: Mon, Aug 2, 2010 at 5:07 AM Subject: [patch] Remove globals from gaelco, namco and nile sound cores To: submit@mamedev.org Cc: atariace@hotmail.com Hi mamedev, This patch removes some global variables from the gaelco, namco and nile sound cores. Properly implemented devices should have all their variables in their device state to allow for multiple instances. ~aa
This commit is contained in:
parent
c85c035c5d
commit
4c693d72a5
@ -49,8 +49,6 @@ Registers per channel:
|
|||||||
#define GAELCO_NUM_CHANNELS 0x07
|
#define GAELCO_NUM_CHANNELS 0x07
|
||||||
#define VOLUME_LEVELS 0x10
|
#define VOLUME_LEVELS 0x10
|
||||||
|
|
||||||
UINT16 *gaelco_sndregs;
|
|
||||||
|
|
||||||
/* this structure defines a channel */
|
/* this structure defines a channel */
|
||||||
typedef struct _gaelco_sound_channel gaelco_sound_channel;
|
typedef struct _gaelco_sound_channel gaelco_sound_channel;
|
||||||
struct _gaelco_sound_channel
|
struct _gaelco_sound_channel
|
||||||
@ -69,6 +67,8 @@ struct _gaelco_sound_state
|
|||||||
int banks[4]; /* start of each ROM bank */
|
int banks[4]; /* start of each ROM bank */
|
||||||
gaelco_sound_channel channel[GAELCO_NUM_CHANNELS]; /* 7 stereo channels */
|
gaelco_sound_channel channel[GAELCO_NUM_CHANNELS]; /* 7 stereo channels */
|
||||||
|
|
||||||
|
UINT16 sndregs[0x38];
|
||||||
|
|
||||||
/* table for converting from 8 to 16 bits with volume control */
|
/* table for converting from 8 to 16 bits with volume control */
|
||||||
INT16 volume_table[VOLUME_LEVELS][256];
|
INT16 volume_table[VOLUME_LEVELS][256];
|
||||||
};
|
};
|
||||||
@ -115,47 +115,47 @@ static STREAM_UPDATE( gaelco_update )
|
|||||||
base_offset = ch*8 + chunkNum*4;
|
base_offset = ch*8 + chunkNum*4;
|
||||||
|
|
||||||
/* get channel parameters */
|
/* get channel parameters */
|
||||||
type = ((gaelco_sndregs[base_offset + 1] >> 4) & 0x0f);
|
type = ((info->sndregs[base_offset + 1] >> 4) & 0x0f);
|
||||||
bank = info->banks[((gaelco_sndregs[base_offset + 1] >> 0) & 0x03)];
|
bank = info->banks[((info->sndregs[base_offset + 1] >> 0) & 0x03)];
|
||||||
vol_l = ((gaelco_sndregs[base_offset + 1] >> 12) & 0x0f);
|
vol_l = ((info->sndregs[base_offset + 1] >> 12) & 0x0f);
|
||||||
vol_r = ((gaelco_sndregs[base_offset + 1] >> 8) & 0x0f);
|
vol_r = ((info->sndregs[base_offset + 1] >> 8) & 0x0f);
|
||||||
end_pos = gaelco_sndregs[base_offset + 2] << 8;
|
end_pos = info->sndregs[base_offset + 2] << 8;
|
||||||
|
|
||||||
/* generates output data (range 0x00000..0xffff) */
|
/* generates output data (range 0x00000..0xffff) */
|
||||||
if (type == 0x08){
|
if (type == 0x08){
|
||||||
/* PCM, 8 bits mono */
|
/* PCM, 8 bits mono */
|
||||||
data = info->snd_data[bank + end_pos + gaelco_sndregs[base_offset + 3]];
|
data = info->snd_data[bank + end_pos + info->sndregs[base_offset + 3]];
|
||||||
ch_data_l = info->volume_table[vol_l][data];
|
ch_data_l = info->volume_table[vol_l][data];
|
||||||
ch_data_r = info->volume_table[vol_r][data];
|
ch_data_r = info->volume_table[vol_r][data];
|
||||||
|
|
||||||
gaelco_sndregs[base_offset + 3]--;
|
info->sndregs[base_offset + 3]--;
|
||||||
} else if (type == 0x0c){
|
} else if (type == 0x0c){
|
||||||
/* PCM, 8 bits stereo */
|
/* PCM, 8 bits stereo */
|
||||||
data = info->snd_data[bank + end_pos + gaelco_sndregs[base_offset + 3]];
|
data = info->snd_data[bank + end_pos + info->sndregs[base_offset + 3]];
|
||||||
ch_data_l = info->volume_table[vol_l][data];
|
ch_data_l = info->volume_table[vol_l][data];
|
||||||
|
|
||||||
gaelco_sndregs[base_offset + 3]--;
|
info->sndregs[base_offset + 3]--;
|
||||||
|
|
||||||
if (gaelco_sndregs[base_offset + 3] > 0){
|
if (info->sndregs[base_offset + 3] > 0){
|
||||||
data = info->snd_data[bank + end_pos + gaelco_sndregs[base_offset + 3]];
|
data = info->snd_data[bank + end_pos + info->sndregs[base_offset + 3]];
|
||||||
ch_data_r = info->volume_table[vol_r][data];
|
ch_data_r = info->volume_table[vol_r][data];
|
||||||
|
|
||||||
gaelco_sndregs[base_offset + 3]--;
|
info->sndregs[base_offset + 3]--;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_SOUND(("(GAE1) Playing unknown sample format in channel: %02d, type: %02x, bank: %02x, end: %08x, Length: %04x\n", ch, type, bank, end_pos, gaelco_sndregs[base_offset + 3]));
|
LOG_SOUND(("(GAE1) Playing unknown sample format in channel: %02d, type: %02x, bank: %02x, end: %08x, Length: %04x\n", ch, type, bank, end_pos, info->sndregs[base_offset + 3]));
|
||||||
channel->active = 0;
|
channel->active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if the current sample has finished playing */
|
/* check if the current sample has finished playing */
|
||||||
if (gaelco_sndregs[base_offset + 3] == 0){
|
if (info->sndregs[base_offset + 3] == 0){
|
||||||
if (channel->loop == 0){ /* if no looping, we're done */
|
if (channel->loop == 0){ /* if no looping, we're done */
|
||||||
channel->active = 0;
|
channel->active = 0;
|
||||||
} else { /* if we're looping, swap chunks */
|
} else { /* if we're looping, swap chunks */
|
||||||
channel->chunkNum = (channel->chunkNum + 1) & 0x01;
|
channel->chunkNum = (channel->chunkNum + 1) & 0x01;
|
||||||
|
|
||||||
/* if the length of the next chunk is 0, we're done */
|
/* if the length of the next chunk is 0, we're done */
|
||||||
if (gaelco_sndregs[ch*8 + channel->chunkNum*4 + 3] == 0){
|
if (info->sndregs[ch*8 + channel->chunkNum*4 + 3] == 0){
|
||||||
channel->active = 0;
|
channel->active = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,9 +194,11 @@ static STREAM_UPDATE( gaelco_update )
|
|||||||
|
|
||||||
READ16_DEVICE_HANDLER( gaelcosnd_r )
|
READ16_DEVICE_HANDLER( gaelcosnd_r )
|
||||||
{
|
{
|
||||||
|
gaelco_sound_state *info = get_safe_token(device);
|
||||||
|
|
||||||
LOG_READ_WRITES(("%s: (GAE1): read from %04x\n", cpuexec_describe_context(device->machine), offset));
|
LOG_READ_WRITES(("%s: (GAE1): read from %04x\n", cpuexec_describe_context(device->machine), offset));
|
||||||
|
|
||||||
return gaelco_sndregs[offset];
|
return info->sndregs[offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*============================================================================
|
/*============================================================================
|
||||||
@ -213,17 +215,17 @@ WRITE16_DEVICE_HANDLER( gaelcosnd_w )
|
|||||||
/* first update the stream to this point in time */
|
/* first update the stream to this point in time */
|
||||||
stream_update(info->stream);
|
stream_update(info->stream);
|
||||||
|
|
||||||
COMBINE_DATA(&gaelco_sndregs[offset]);
|
COMBINE_DATA(&info->sndregs[offset]);
|
||||||
|
|
||||||
switch(offset & 0x07){
|
switch(offset & 0x07){
|
||||||
case 0x03:
|
case 0x03:
|
||||||
/* trigger sound */
|
/* trigger sound */
|
||||||
if ((gaelco_sndregs[offset - 1] != 0) && (data != 0)){
|
if ((info->sndregs[offset - 1] != 0) && (data != 0)){
|
||||||
if (!channel->active){
|
if (!channel->active){
|
||||||
channel->active = 1;
|
channel->active = 1;
|
||||||
channel->chunkNum = 0;
|
channel->chunkNum = 0;
|
||||||
channel->loop = 0;
|
channel->loop = 0;
|
||||||
LOG_SOUND(("(GAE1) Playing sample channel: %02d, type: %02x, bank: %02x, end: %08x, Length: %04x\n", offset >> 3, (gaelco_sndregs[offset - 2] >> 4) & 0x0f, gaelco_sndregs[offset - 2] & 0x03, gaelco_sndregs[offset - 1] << 8, data));
|
LOG_SOUND(("(GAE1) Playing sample channel: %02d, type: %02x, bank: %02x, end: %08x, Length: %04x\n", offset >> 3, (info->sndregs[offset - 2] >> 4) & 0x0f, info->sndregs[offset - 2] & 0x03, info->sndregs[offset - 1] << 8, data));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
channel->active = 0;
|
channel->active = 0;
|
||||||
@ -232,8 +234,8 @@ WRITE16_DEVICE_HANDLER( gaelcosnd_w )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x07: /* enable/disable looping */
|
case 0x07: /* enable/disable looping */
|
||||||
if ((gaelco_sndregs[offset - 1] != 0) && (data != 0)){
|
if ((info->sndregs[offset - 1] != 0) && (data != 0)){
|
||||||
LOG_SOUND(("(GAE1) Looping in channel: %02d, type: %02x, bank: %02x, end: %08x, Length: %04x\n", offset >> 3, (gaelco_sndregs[offset - 2] >> 4) & 0x0f, gaelco_sndregs[offset - 2] & 0x03, gaelco_sndregs[offset - 1] << 8, data));
|
LOG_SOUND(("(GAE1) Looping in channel: %02d, type: %02x, bank: %02x, end: %08x, Length: %04x\n", offset >> 3, (info->sndregs[offset - 2] >> 4) & 0x0f, info->sndregs[offset - 2] & 0x03, info->sndregs[offset - 1] << 8, data));
|
||||||
channel->loop = 1;
|
channel->loop = 1;
|
||||||
} else {
|
} else {
|
||||||
channel->loop = 0;
|
channel->loop = 0;
|
||||||
|
@ -12,8 +12,6 @@ struct _gaelcosnd_interface
|
|||||||
int banks[4]; /* start of each ROM bank */
|
int banks[4]; /* start of each ROM bank */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern UINT16 *gaelco_sndregs;
|
|
||||||
|
|
||||||
WRITE16_DEVICE_HANDLER( gaelcosnd_w );
|
WRITE16_DEVICE_HANDLER( gaelcosnd_w );
|
||||||
READ16_DEVICE_HANDLER( gaelcosnd_r );
|
READ16_DEVICE_HANDLER( gaelcosnd_r );
|
||||||
|
|
||||||
|
@ -51,16 +51,14 @@ typedef struct
|
|||||||
} sound_channel;
|
} sound_channel;
|
||||||
|
|
||||||
|
|
||||||
/* globals available to everyone */
|
|
||||||
UINT8 *namco_soundregs;
|
|
||||||
UINT8 *namco_wavedata;
|
|
||||||
|
|
||||||
typedef struct _namco_sound namco_sound;
|
typedef struct _namco_sound namco_sound;
|
||||||
struct _namco_sound
|
struct _namco_sound
|
||||||
{
|
{
|
||||||
/* data about the sound system */
|
/* data about the sound system */
|
||||||
sound_channel channel_list[MAX_VOICES];
|
sound_channel channel_list[MAX_VOICES];
|
||||||
sound_channel *last_channel;
|
sound_channel *last_channel;
|
||||||
|
UINT8 *soundregs;
|
||||||
|
UINT8 *wavedata;
|
||||||
|
|
||||||
/* global sound parameters */
|
/* global sound parameters */
|
||||||
int wave_size;
|
int wave_size;
|
||||||
@ -122,9 +120,8 @@ static void build_decoded_waveform(running_machine *machine, namco_sound *chip,
|
|||||||
int offset;
|
int offset;
|
||||||
int v;
|
int v;
|
||||||
|
|
||||||
if (rgnbase != NULL)
|
chip->wavedata = (rgnbase != NULL) ? rgnbase : auto_alloc_array_clear(machine, UINT8, 0x400);
|
||||||
namco_wavedata = rgnbase;
|
|
||||||
|
|
||||||
/* 20pacgal has waves in RAM but old sound system */
|
/* 20pacgal has waves in RAM but old sound system */
|
||||||
if (rgnbase == NULL && chip->num_voices != 3)
|
if (rgnbase == NULL && chip->num_voices != 3)
|
||||||
{
|
{
|
||||||
@ -146,10 +143,10 @@ static void build_decoded_waveform(running_machine *machine, namco_sound *chip,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We need waveform data. It fails if region is not specified. */
|
/* We need waveform data. It fails if region is not specified. */
|
||||||
if (namco_wavedata)
|
if (chip->wavedata)
|
||||||
{
|
{
|
||||||
for (offset = 0; offset < 256; offset++)
|
for (offset = 0; offset < 256; offset++)
|
||||||
update_namco_waveform(chip, offset, namco_wavedata[offset]);
|
update_namco_waveform(chip, offset, chip->wavedata[offset]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,6 +370,8 @@ static DEVICE_START( namco )
|
|||||||
chip->last_channel = chip->channel_list + chip->num_voices;
|
chip->last_channel = chip->channel_list + chip->num_voices;
|
||||||
chip->stereo = intf->stereo;
|
chip->stereo = intf->stereo;
|
||||||
|
|
||||||
|
chip->soundregs = auto_alloc_array_clear(device->machine, UINT8, 0x400);
|
||||||
|
|
||||||
/* adjust internal clock */
|
/* adjust internal clock */
|
||||||
chip->namco_clock = device->clock();
|
chip->namco_clock = device->clock();
|
||||||
for (clock_multiple = 0; chip->namco_clock < INTERNAL_RATE; clock_multiple++)
|
for (clock_multiple = 0; chip->namco_clock < INTERNAL_RATE; clock_multiple++)
|
||||||
@ -463,14 +462,14 @@ WRITE8_DEVICE_HANDLER( pacman_sound_w )
|
|||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
data &= 0x0f;
|
data &= 0x0f;
|
||||||
if (namco_soundregs[offset] == data)
|
if (chip->soundregs[offset] == data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* update the streams */
|
/* update the streams */
|
||||||
stream_update(chip->stream);
|
stream_update(chip->stream);
|
||||||
|
|
||||||
/* set the register */
|
/* set the register */
|
||||||
namco_soundregs[offset] = data;
|
chip->soundregs[offset] = data;
|
||||||
|
|
||||||
if (offset < 0x10)
|
if (offset < 0x10)
|
||||||
ch = (offset - 5) / 5;
|
ch = (offset - 5) / 5;
|
||||||
@ -497,11 +496,11 @@ WRITE8_DEVICE_HANDLER( pacman_sound_w )
|
|||||||
case 0x14:
|
case 0x14:
|
||||||
/* the frequency has 20 bits */
|
/* the frequency has 20 bits */
|
||||||
/* the first voice has extra frequency bits */
|
/* the first voice has extra frequency bits */
|
||||||
voice->frequency = (ch == 0) ? namco_soundregs[0x10] : 0;
|
voice->frequency = (ch == 0) ? chip->soundregs[0x10] : 0;
|
||||||
voice->frequency += (namco_soundregs[ch * 5 + 0x11] << 4);
|
voice->frequency += (chip->soundregs[ch * 5 + 0x11] << 4);
|
||||||
voice->frequency += (namco_soundregs[ch * 5 + 0x12] << 8);
|
voice->frequency += (chip->soundregs[ch * 5 + 0x12] << 8);
|
||||||
voice->frequency += (namco_soundregs[ch * 5 + 0x13] << 12);
|
voice->frequency += (chip->soundregs[ch * 5 + 0x13] << 12);
|
||||||
voice->frequency += (namco_soundregs[ch * 5 + 0x14] << 16); /* always 0 */
|
voice->frequency += (chip->soundregs[ch * 5 + 0x14] << 16); /* always 0 */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x15:
|
case 0x15:
|
||||||
@ -559,14 +558,14 @@ WRITE8_DEVICE_HANDLER( polepos_sound_w )
|
|||||||
sound_channel *voice;
|
sound_channel *voice;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
if (namco_soundregs[offset] == data)
|
if (chip->soundregs[offset] == data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* update the streams */
|
/* update the streams */
|
||||||
stream_update(chip->stream);
|
stream_update(chip->stream);
|
||||||
|
|
||||||
/* set the register */
|
/* set the register */
|
||||||
namco_soundregs[offset] = data;
|
chip->soundregs[offset] = data;
|
||||||
|
|
||||||
ch = (offset & 0x1f) / 4;
|
ch = (offset & 0x1f) / 4;
|
||||||
|
|
||||||
@ -577,8 +576,8 @@ WRITE8_DEVICE_HANDLER( polepos_sound_w )
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
case 0x01:
|
case 0x01:
|
||||||
/* the frequency has 16 bits */
|
/* the frequency has 16 bits */
|
||||||
voice->frequency = namco_soundregs[ch * 4 + 0x00];
|
voice->frequency = chip->soundregs[ch * 4 + 0x00];
|
||||||
voice->frequency += namco_soundregs[ch * 4 + 0x01] << 8;
|
voice->frequency += chip->soundregs[ch * 4 + 0x01] << 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x23:
|
case 0x23:
|
||||||
@ -588,17 +587,17 @@ WRITE8_DEVICE_HANDLER( polepos_sound_w )
|
|||||||
case 0x03:
|
case 0x03:
|
||||||
voice->volume[0] = voice->volume[1] = 0;
|
voice->volume[0] = voice->volume[1] = 0;
|
||||||
// front speakers ?
|
// front speakers ?
|
||||||
voice->volume[0] += namco_soundregs[ch * 4 + 0x03] >> 4;
|
voice->volume[0] += chip->soundregs[ch * 4 + 0x03] >> 4;
|
||||||
voice->volume[1] += namco_soundregs[ch * 4 + 0x03] & 0x0f;
|
voice->volume[1] += chip->soundregs[ch * 4 + 0x03] & 0x0f;
|
||||||
// rear speakers ?
|
// rear speakers ?
|
||||||
voice->volume[0] += namco_soundregs[ch * 4 + 0x23] >> 4;
|
voice->volume[0] += chip->soundregs[ch * 4 + 0x23] >> 4;
|
||||||
voice->volume[1] += namco_soundregs[ch * 4 + 0x02] >> 4;
|
voice->volume[1] += chip->soundregs[ch * 4 + 0x02] >> 4;
|
||||||
|
|
||||||
voice->volume[0] /= 2;
|
voice->volume[0] /= 2;
|
||||||
voice->volume[1] /= 2;
|
voice->volume[1] /= 2;
|
||||||
|
|
||||||
/* if 54XX or 52XX selected, silence this voice */
|
/* if 54XX or 52XX selected, silence this voice */
|
||||||
if (namco_soundregs[ch * 4 + 0x23] & 8)
|
if (chip->soundregs[ch * 4 + 0x23] & 8)
|
||||||
voice->volume[0] = voice->volume[1] = 0;
|
voice->volume[0] = voice->volume[1] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -631,20 +630,20 @@ void mappy_sound_enable(running_device *device, int enable)
|
|||||||
chip->sound_enable = enable;
|
chip->sound_enable = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_DEVICE_HANDLER( namco_15xx_w )
|
static WRITE8_DEVICE_HANDLER( namco_15xx_w )
|
||||||
{
|
{
|
||||||
namco_sound *chip = get_safe_token(device);
|
namco_sound *chip = get_safe_token(device);
|
||||||
sound_channel *voice;
|
sound_channel *voice;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
if (namco_soundregs[offset] == data)
|
if (chip->soundregs[offset] == data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* update the streams */
|
/* update the streams */
|
||||||
stream_update(chip->stream);
|
stream_update(chip->stream);
|
||||||
|
|
||||||
/* set the register */
|
/* set the register */
|
||||||
namco_soundregs[offset] = data;
|
chip->soundregs[offset] = data;
|
||||||
|
|
||||||
ch = offset / 8;
|
ch = offset / 8;
|
||||||
if (ch >= chip->num_voices)
|
if (ch >= chip->num_voices)
|
||||||
@ -663,9 +662,9 @@ WRITE8_DEVICE_HANDLER( namco_15xx_w )
|
|||||||
case 0x04:
|
case 0x04:
|
||||||
case 0x05:
|
case 0x05:
|
||||||
/* the frequency has 20 bits */
|
/* the frequency has 20 bits */
|
||||||
voice->frequency = namco_soundregs[ch * 8 + 0x04];
|
voice->frequency = chip->soundregs[ch * 8 + 0x04];
|
||||||
voice->frequency += namco_soundregs[ch * 8 + 0x05] << 8;
|
voice->frequency += chip->soundregs[ch * 8 + 0x05] << 8;
|
||||||
voice->frequency += (namco_soundregs[ch * 8 + 0x06] & 15) << 16; /* high bits are from here */
|
voice->frequency += (chip->soundregs[ch * 8 + 0x06] & 15) << 16; /* high bits are from here */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -712,16 +711,16 @@ static WRITE8_DEVICE_HANDLER( namcos1_sound_w )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
namco_soundregs = namco_wavedata + 0x100;
|
chip->soundregs = chip->wavedata + 0x100;
|
||||||
|
|
||||||
if (namco_soundregs[offset] == data)
|
if (chip->soundregs[offset] == data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* update the streams */
|
/* update the streams */
|
||||||
stream_update(chip->stream);
|
stream_update(chip->stream);
|
||||||
|
|
||||||
/* set the register */
|
/* set the register */
|
||||||
namco_soundregs[offset] = data;
|
chip->soundregs[offset] = data;
|
||||||
|
|
||||||
ch = offset / 8;
|
ch = offset / 8;
|
||||||
if (ch >= chip->num_voices)
|
if (ch >= chip->num_voices)
|
||||||
@ -740,9 +739,9 @@ static WRITE8_DEVICE_HANDLER( namcos1_sound_w )
|
|||||||
case 0x02:
|
case 0x02:
|
||||||
case 0x03:
|
case 0x03:
|
||||||
/* the frequency has 20 bits */
|
/* the frequency has 20 bits */
|
||||||
voice->frequency = (namco_soundregs[ch * 8 + 0x01] & 15) << 16; /* high bits are from here */
|
voice->frequency = (chip->soundregs[ch * 8 + 0x01] & 15) << 16; /* high bits are from here */
|
||||||
voice->frequency += namco_soundregs[ch * 8 + 0x02] << 8;
|
voice->frequency += chip->soundregs[ch * 8 + 0x02] << 8;
|
||||||
voice->frequency += namco_soundregs[ch * 8 + 0x03];
|
voice->frequency += chip->soundregs[ch * 8 + 0x03];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x04:
|
case 0x04:
|
||||||
@ -758,15 +757,16 @@ static WRITE8_DEVICE_HANDLER( namcos1_sound_w )
|
|||||||
|
|
||||||
WRITE8_DEVICE_HANDLER( namcos1_cus30_w )
|
WRITE8_DEVICE_HANDLER( namcos1_cus30_w )
|
||||||
{
|
{
|
||||||
|
namco_sound *chip = get_safe_token(device);
|
||||||
|
|
||||||
if (offset < 0x100)
|
if (offset < 0x100)
|
||||||
{
|
{
|
||||||
if (namco_wavedata[offset] != data)
|
if (chip->wavedata[offset] != data)
|
||||||
{
|
{
|
||||||
namco_sound *chip = get_safe_token(device);
|
|
||||||
/* update the streams */
|
/* update the streams */
|
||||||
stream_update(chip->stream);
|
stream_update(chip->stream);
|
||||||
|
|
||||||
namco_wavedata[offset] = data;
|
chip->wavedata[offset] = data;
|
||||||
|
|
||||||
/* update the decoded waveform table */
|
/* update the decoded waveform table */
|
||||||
update_namco_waveform(chip, offset, data);
|
update_namco_waveform(chip, offset, data);
|
||||||
@ -775,27 +775,31 @@ WRITE8_DEVICE_HANDLER( namcos1_cus30_w )
|
|||||||
else if (offset < 0x140)
|
else if (offset < 0x140)
|
||||||
namcos1_sound_w(device, offset - 0x100,data);
|
namcos1_sound_w(device, offset - 0x100,data);
|
||||||
else
|
else
|
||||||
namco_wavedata[offset] = data;
|
chip->wavedata[offset] = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8_DEVICE_HANDLER( namcos1_cus30_r )
|
READ8_DEVICE_HANDLER( namcos1_cus30_r )
|
||||||
{
|
{
|
||||||
return namco_wavedata[offset];
|
namco_sound *chip = get_safe_token(device);
|
||||||
|
|
||||||
|
return chip->wavedata[offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_DEVICE_HANDLER( _20pacgal_wavedata_w )
|
READ8_DEVICE_HANDLER( namco_snd_sharedram_r )
|
||||||
{
|
{
|
||||||
namco_sound *chip = get_safe_token(device);
|
namco_sound *chip = get_safe_token(device);
|
||||||
|
|
||||||
if (namco_wavedata[offset] != data)
|
return chip->soundregs[offset];
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_DEVICE_HANDLER( namco_snd_sharedram_w )
|
||||||
|
{
|
||||||
|
if (offset < 0x40)
|
||||||
|
namco_15xx_w(device, offset, data);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
/* update the streams */
|
namco_sound *chip = get_safe_token(device);
|
||||||
stream_update(chip->stream);
|
chip->soundregs[offset] = data;
|
||||||
|
|
||||||
namco_wavedata[offset] = data;
|
|
||||||
|
|
||||||
/* update the decoded waveform table */
|
|
||||||
update_namco_waveform(chip, offset, data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,18 +19,12 @@ void polepos_sound_enable(running_device *device, int enable);
|
|||||||
WRITE8_DEVICE_HANDLER( polepos_sound_w );
|
WRITE8_DEVICE_HANDLER( polepos_sound_w );
|
||||||
|
|
||||||
void mappy_sound_enable(running_device *device, int enable);
|
void mappy_sound_enable(running_device *device, int enable);
|
||||||
WRITE8_DEVICE_HANDLER( namco_15xx_w );
|
|
||||||
|
|
||||||
WRITE8_DEVICE_HANDLER( namcos1_cus30_w ); /* wavedata + sound registers + RAM */
|
WRITE8_DEVICE_HANDLER( namcos1_cus30_w ); /* wavedata + sound registers + RAM */
|
||||||
READ8_DEVICE_HANDLER( namcos1_cus30_r );
|
READ8_DEVICE_HANDLER( namcos1_cus30_r );
|
||||||
|
|
||||||
WRITE8_DEVICE_HANDLER( _20pacgal_wavedata_w );
|
READ8_DEVICE_HANDLER( namco_snd_sharedram_r );
|
||||||
|
WRITE8_DEVICE_HANDLER( namco_snd_sharedram_w );
|
||||||
extern UINT8 *namco_soundregs;
|
|
||||||
extern UINT8 *namco_wavedata;
|
|
||||||
|
|
||||||
#define pacman_soundregs namco_soundregs
|
|
||||||
#define polepos_soundregs namco_soundregs
|
|
||||||
|
|
||||||
DECLARE_LEGACY_SOUND_DEVICE(NAMCO, namco);
|
DECLARE_LEGACY_SOUND_DEVICE(NAMCO, namco);
|
||||||
DECLARE_LEGACY_SOUND_DEVICE(NAMCO_15XX, namco_15xx);
|
DECLARE_LEGACY_SOUND_DEVICE(NAMCO_15XX, namco_15xx);
|
||||||
|
@ -52,13 +52,12 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
UINT16 *nile_sound_regs;
|
|
||||||
|
|
||||||
typedef struct _nile_state nile_state;
|
typedef struct _nile_state nile_state;
|
||||||
struct _nile_state
|
struct _nile_state
|
||||||
{
|
{
|
||||||
sound_stream * stream;
|
sound_stream * stream;
|
||||||
UINT8 *sound_ram;
|
UINT8 *sound_ram;
|
||||||
|
UINT16 sound_regs[0x80];
|
||||||
int vpos[NILE_VOICES], frac[NILE_VOICES], lponce[NILE_VOICES];
|
int vpos[NILE_VOICES], frac[NILE_VOICES], lponce[NILE_VOICES];
|
||||||
UINT16 ctrl;
|
UINT16 ctrl;
|
||||||
};
|
};
|
||||||
@ -104,7 +103,7 @@ READ16_DEVICE_HANDLER( nile_snd_r )
|
|||||||
if(reg==2 || reg==3)
|
if(reg==2 || reg==3)
|
||||||
{
|
{
|
||||||
int slot=offset/16;
|
int slot=offset/16;
|
||||||
int sptr = ((nile_sound_regs[slot*16+3]<<16)|nile_sound_regs[slot*16+2])+info->vpos[slot];
|
int sptr = ((info->sound_regs[slot*16+3]<<16)|info->sound_regs[slot*16+2])+info->vpos[slot];
|
||||||
|
|
||||||
if(reg==2)
|
if(reg==2)
|
||||||
{
|
{
|
||||||
@ -115,7 +114,7 @@ READ16_DEVICE_HANDLER( nile_snd_r )
|
|||||||
return sptr>>16;
|
return sptr>>16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nile_sound_regs[offset];
|
return info->sound_regs[offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_DEVICE_HANDLER( nile_snd_w )
|
WRITE16_DEVICE_HANDLER( nile_snd_w )
|
||||||
@ -125,7 +124,7 @@ WRITE16_DEVICE_HANDLER( nile_snd_w )
|
|||||||
|
|
||||||
stream_update(info->stream);
|
stream_update(info->stream);
|
||||||
|
|
||||||
COMBINE_DATA(&nile_sound_regs[offset]);
|
COMBINE_DATA(&info->sound_regs[offset]);
|
||||||
|
|
||||||
v = offset / 16;
|
v = offset / 16;
|
||||||
r = offset % 16;
|
r = offset % 16;
|
||||||
@ -135,7 +134,7 @@ WRITE16_DEVICE_HANDLER( nile_snd_w )
|
|||||||
info->vpos[v] = info->frac[v] = info->lponce[v] = 0;
|
info->vpos[v] = info->frac[v] = info->lponce[v] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("v%02d: %04x to reg %02d (PC=%x)\n", v, nile_sound_regs[offset], r, cpu_get_pc(space->cpu));
|
//printf("v%02d: %04x to reg %02d (PC=%x)\n", v, info->sound_regs[offset], r, cpu_get_pc(space->cpu));
|
||||||
}
|
}
|
||||||
|
|
||||||
static STREAM_UPDATE( nile_update )
|
static STREAM_UPDATE( nile_update )
|
||||||
@ -155,7 +154,7 @@ static STREAM_UPDATE( nile_update )
|
|||||||
|
|
||||||
for (v = 0; v < NILE_VOICES; v++)
|
for (v = 0; v < NILE_VOICES; v++)
|
||||||
{
|
{
|
||||||
slot = &nile_sound_regs[v * 16];
|
slot = &info->sound_regs[v * 16];
|
||||||
|
|
||||||
if (info->ctrl&(1<<v))
|
if (info->ctrl&(1<<v))
|
||||||
{
|
{
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
#include "devlegcy.h"
|
#include "devlegcy.h"
|
||||||
|
|
||||||
extern UINT16 *nile_sound_regs;
|
|
||||||
|
|
||||||
WRITE16_DEVICE_HANDLER( nile_snd_w );
|
WRITE16_DEVICE_HANDLER( nile_snd_w );
|
||||||
READ16_DEVICE_HANDLER( nile_snd_r );
|
READ16_DEVICE_HANDLER( nile_snd_r );
|
||||||
WRITE16_DEVICE_HANDLER( nile_sndctrl_w );
|
WRITE16_DEVICE_HANDLER( nile_sndctrl_w );
|
||||||
|
@ -187,9 +187,9 @@ static ADDRESS_MAP_START( 20pacgal_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0a000, 0x0ffff) AM_MIRROR(0x40000) AM_ROM
|
AM_RANGE(0x0a000, 0x0ffff) AM_MIRROR(0x40000) AM_ROM
|
||||||
AM_RANGE(0x10000, 0x3ffff) AM_ROM
|
AM_RANGE(0x10000, 0x3ffff) AM_ROM
|
||||||
AM_RANGE(0x44000, 0x447ff) AM_RAM AM_BASE_MEMBER(_20pacgal_state, video_ram)
|
AM_RANGE(0x44000, 0x447ff) AM_RAM AM_BASE_MEMBER(_20pacgal_state, video_ram)
|
||||||
AM_RANGE(0x45040, 0x4505f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&namco_soundregs)
|
AM_RANGE(0x45040, 0x4505f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x44800, 0x45eff) AM_RAM
|
AM_RANGE(0x44800, 0x45eff) AM_RAM
|
||||||
AM_RANGE(0x45f00, 0x45fff) AM_DEVWRITE("namco", _20pacgal_wavedata_w) AM_BASE(&namco_wavedata)
|
AM_RANGE(0x45f00, 0x45fff) AM_DEVWRITE("namco", namcos1_cus30_w)
|
||||||
AM_RANGE(0x46000, 0x46fff) AM_WRITEONLY AM_BASE_MEMBER(_20pacgal_state, char_gfx_ram)
|
AM_RANGE(0x46000, 0x46fff) AM_WRITEONLY AM_BASE_MEMBER(_20pacgal_state, char_gfx_ram)
|
||||||
AM_RANGE(0x47100, 0x47100) AM_RAM /* leftover from original Galaga code */
|
AM_RANGE(0x47100, 0x47100) AM_RAM /* leftover from original Galaga code */
|
||||||
AM_RANGE(0x48000, 0x49fff) AM_READ_BANK("bank1") AM_WRITE(ram_48000_w) /* this should be a mirror of 08000-09ffff */
|
AM_RANGE(0x48000, 0x49fff) AM_READ_BANK("bank1") AM_WRITE(ram_48000_w) /* this should be a mirror of 08000-09ffff */
|
||||||
|
@ -198,7 +198,7 @@ static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r,hd63701_internal_registers_w)/* internal registers */
|
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r,hd63701_internal_registers_w)/* internal registers */
|
||||||
AM_RANGE(0x0080, 0x00ff) AM_RAM /* built in RAM */
|
AM_RANGE(0x0080, 0x00ff) AM_RAM /* built in RAM */
|
||||||
AM_RANGE(0x1105, 0x1105) AM_READ(soundkludge_r) /* cures speech */
|
AM_RANGE(0x1105, 0x1105) AM_READ(soundkludge_r) /* cures speech */
|
||||||
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r,namcos1_cus30_w) AM_BASE(&namco_wavedata)/* PSG device, shared RAM */
|
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) /* PSG device, shared RAM */
|
||||||
AM_RANGE(0x8000, 0xbfff) AM_ROM /* MCU external ROM */
|
AM_RANGE(0x8000, 0xbfff) AM_ROM /* MCU external ROM */
|
||||||
AM_RANGE(0x8000, 0x8000) AM_WRITENOP /* watchdog reset? */
|
AM_RANGE(0x8000, 0x8000) AM_WRITENOP /* watchdog reset? */
|
||||||
AM_RANGE(0x8800, 0x8800) AM_WRITENOP /* irq acknoledge? */
|
AM_RANGE(0x8800, 0x8800) AM_WRITENOP /* irq acknoledge? */
|
||||||
|
@ -58,7 +58,7 @@ GFXDECODEINFO(0x0400000, 128)
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( maniacsq_map, ADDRESS_SPACE_PROGRAM, 16 )
|
static ADDRESS_MAP_START( maniacsq_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x03ffff) AM_ROM /* ROM */
|
AM_RANGE(0x000000, 0x03ffff) AM_ROM /* ROM */
|
||||||
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) AM_BASE(&gaelco_sndregs) /* Sound Registers */
|
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) /* Sound Registers */
|
||||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
||||||
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
||||||
AM_RANGE(0x218004, 0x218009) AM_RAM AM_BASE(&gaelco2_vregs) /* Video Registers */
|
AM_RANGE(0x218004, 0x218009) AM_RAM AM_BASE(&gaelco2_vregs) /* Video Registers */
|
||||||
@ -216,7 +216,7 @@ static READ16_HANDLER(p2_gun_y) {return (input_port_read(space->machine, "LIGHT1
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( bang_map, ADDRESS_SPACE_PROGRAM, 16 )
|
static ADDRESS_MAP_START( bang_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
||||||
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) AM_BASE(&gaelco_sndregs) /* Sound Registers */
|
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) /* Sound Registers */
|
||||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
||||||
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
||||||
AM_RANGE(0x218004, 0x218009) AM_READONLY /* Video Registers */
|
AM_RANGE(0x218004, 0x218009) AM_READONLY /* Video Registers */
|
||||||
@ -435,7 +435,7 @@ ROM_END
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( alighunt_map, ADDRESS_SPACE_PROGRAM, 16 )
|
static ADDRESS_MAP_START( alighunt_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
||||||
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) AM_BASE(&gaelco_sndregs) /* Sound Registers */
|
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) /* Sound Registers */
|
||||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
||||||
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
||||||
AM_RANGE(0x218004, 0x218009) AM_RAM AM_BASE(&gaelco2_vregs) /* Video Registers */
|
AM_RANGE(0x218004, 0x218009) AM_RAM AM_BASE(&gaelco2_vregs) /* Video Registers */
|
||||||
@ -647,7 +647,7 @@ static READ16_HANDLER ( dallas_kludge_r )
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( touchgo_map, ADDRESS_SPACE_PROGRAM, 16 )
|
static ADDRESS_MAP_START( touchgo_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
||||||
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) AM_BASE(&gaelco_sndregs) /* Sound Registers */
|
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) /* Sound Registers */
|
||||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
||||||
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
||||||
AM_RANGE(0x218004, 0x218009) AM_RAM AM_BASE(&gaelco2_vregs) /* Video Registers */
|
AM_RANGE(0x218004, 0x218009) AM_RAM AM_BASE(&gaelco2_vregs) /* Video Registers */
|
||||||
@ -912,7 +912,7 @@ ROM_END
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( snowboar_map, ADDRESS_SPACE_PROGRAM, 16 )
|
static ADDRESS_MAP_START( snowboar_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
||||||
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) AM_BASE(&gaelco_sndregs) /* Sound Registers */
|
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) /* Sound Registers */
|
||||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
||||||
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
||||||
AM_RANGE(0x212000, 0x213fff) AM_RAM /* Extra RAM */
|
AM_RANGE(0x212000, 0x213fff) AM_RAM /* Extra RAM */
|
||||||
@ -1098,7 +1098,7 @@ ROM_END
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( wrally2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
static ADDRESS_MAP_START( wrally2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */
|
||||||
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) AM_BASE(&gaelco_sndregs) /* Sound Registers */
|
AM_RANGE(0x202890, 0x2028ff) AM_DEVREADWRITE("gaelco", gaelcosnd_r, gaelcosnd_w) /* Sound Registers */
|
||||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(gaelco2_vram_w) AM_BASE_SIZE_GENERIC(spriteram) /* Video RAM */
|
||||||
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
AM_RANGE(0x210000, 0x211fff) AM_RAM_WRITE(gaelco2_palette_w) AM_BASE_GENERIC(paletteram) /* Palette */
|
||||||
AM_RANGE(0x212000, 0x213fff) AM_RAM /* Extra RAM */
|
AM_RANGE(0x212000, 0x213fff) AM_RAM /* Extra RAM */
|
||||||
|
@ -914,7 +914,7 @@ static MACHINE_RESET( battles )
|
|||||||
static ADDRESS_MAP_START( bosco_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( bosco_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
||||||
AM_RANGE(0x6800, 0x6807) AM_READ(bosco_dsw_r)
|
AM_RANGE(0x6800, 0x6807) AM_READ(bosco_dsw_r)
|
||||||
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&namco_soundregs)
|
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
||||||
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx_0", namco_06xx_data_r, namco_06xx_data_w)
|
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx_0", namco_06xx_data_r, namco_06xx_data_w)
|
||||||
@ -936,7 +936,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( galaga_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( galaga_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
||||||
AM_RANGE(0x6800, 0x6807) AM_READ(bosco_dsw_r)
|
AM_RANGE(0x6800, 0x6807) AM_READ(bosco_dsw_r)
|
||||||
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&namco_soundregs)
|
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
||||||
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
||||||
@ -953,7 +953,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( xevious_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( xevious_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
||||||
AM_RANGE(0x6800, 0x6807) AM_READ(bosco_dsw_r)
|
AM_RANGE(0x6800, 0x6807) AM_READ(bosco_dsw_r)
|
||||||
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&namco_soundregs)
|
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
||||||
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
||||||
@ -973,7 +973,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
static ADDRESS_MAP_START( digdug_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( digdug_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_WRITENOP /* the only area different for each CPU */
|
||||||
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&namco_soundregs)
|
AM_RANGE(0x6800, 0x681f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
AM_RANGE(0x6820, 0x6827) AM_WRITE(bosco_latch_w) /* misc latches */
|
||||||
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x6830, 0x6830) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
AM_RANGE(0x7000, 0x70ff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
||||||
|
@ -167,20 +167,6 @@ static WRITE8_HANDLER( gaplus_spriteram_w )
|
|||||||
gaplus_spriteram[offset] = data;
|
gaplus_spriteram[offset] = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static READ8_HANDLER( gaplus_snd_sharedram_r )
|
|
||||||
{
|
|
||||||
return namco_soundregs[offset];
|
|
||||||
}
|
|
||||||
|
|
||||||
static WRITE8_DEVICE_HANDLER( gaplus_snd_sharedram_w )
|
|
||||||
{
|
|
||||||
if (offset < 0x40)
|
|
||||||
namco_15xx_w(device,offset,data);
|
|
||||||
else
|
|
||||||
namco_soundregs[offset] = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static WRITE8_HANDLER( gaplus_irq_1_ctrl_w )
|
static WRITE8_HANDLER( gaplus_irq_1_ctrl_w )
|
||||||
{
|
{
|
||||||
int bit = !BIT(offset, 11);
|
int bit = !BIT(offset, 11);
|
||||||
@ -268,8 +254,7 @@ static INTERRUPT_GEN( gaplus_interrupt_1 )
|
|||||||
static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x07ff) AM_READWRITE(gaplus_videoram_r, gaplus_videoram_w) AM_BASE(&gaplus_videoram) /* tilemap RAM (shared with CPU #2) */
|
AM_RANGE(0x0000, 0x07ff) AM_READWRITE(gaplus_videoram_r, gaplus_videoram_w) AM_BASE(&gaplus_videoram) /* tilemap RAM (shared with CPU #2) */
|
||||||
AM_RANGE(0x0800, 0x1fff) AM_READWRITE(gaplus_spriteram_r, gaplus_spriteram_w) AM_BASE(&gaplus_spriteram) /* shared RAM with CPU #2 (includes sprite RAM) */
|
AM_RANGE(0x0800, 0x1fff) AM_READWRITE(gaplus_spriteram_r, gaplus_spriteram_w) AM_BASE(&gaplus_spriteram) /* shared RAM with CPU #2 (includes sprite RAM) */
|
||||||
AM_RANGE(0x6000, 0x63ff) AM_READ(gaplus_snd_sharedram_r) /* shared RAM with CPU #3 */
|
AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with CPU #3 */
|
||||||
AM_RANGE(0x6000, 0x63ff) AM_DEVWRITE("namco", gaplus_snd_sharedram_w) /* shared RAM with CPU #3 */
|
|
||||||
AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("56xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("56xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x6820, 0x682f) AM_READWRITE(gaplus_customio_3_r, gaplus_customio_3_w) AM_BASE(&gaplus_customio_3) /* custom I/O chip #3 interface */
|
AM_RANGE(0x6820, 0x682f) AM_READWRITE(gaplus_customio_3_r, gaplus_customio_3_w) AM_BASE(&gaplus_customio_3) /* custom I/O chip #3 interface */
|
||||||
@ -284,8 +269,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( gaplusa_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( gaplusa_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x07ff) AM_READWRITE(gaplus_videoram_r, gaplus_videoram_w) AM_BASE(&gaplus_videoram) /* tilemap RAM (shared with CPU #2) */
|
AM_RANGE(0x0000, 0x07ff) AM_READWRITE(gaplus_videoram_r, gaplus_videoram_w) AM_BASE(&gaplus_videoram) /* tilemap RAM (shared with CPU #2) */
|
||||||
AM_RANGE(0x0800, 0x1fff) AM_READWRITE(gaplus_spriteram_r, gaplus_spriteram_w) AM_BASE(&gaplus_spriteram) /* shared RAM with CPU #2 (includes sprite RAM) */
|
AM_RANGE(0x0800, 0x1fff) AM_READWRITE(gaplus_spriteram_r, gaplus_spriteram_w) AM_BASE(&gaplus_spriteram) /* shared RAM with CPU #2 (includes sprite RAM) */
|
||||||
AM_RANGE(0x6000, 0x63ff) AM_READ(gaplus_snd_sharedram_r) /* shared RAM with CPU #3 */
|
AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with CPU #3 */
|
||||||
AM_RANGE(0x6000, 0x63ff) AM_DEVWRITE("namco", gaplus_snd_sharedram_w) /* shared RAM with CPU #3 */
|
|
||||||
AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("56xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("56xx", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x6820, 0x682f) AM_READWRITE(gaplus_customio_3_r, gaplus_customio_3_w) AM_BASE(&gaplus_customio_3) /* custom I/O chip #3 interface */
|
AM_RANGE(0x6820, 0x682f) AM_READWRITE(gaplus_customio_3_r, gaplus_customio_3_w) AM_BASE(&gaplus_customio_3) /* custom I/O chip #3 interface */
|
||||||
@ -306,8 +290,7 @@ static ADDRESS_MAP_START( cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( cpu3_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( cpu3_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_READ(gaplus_snd_sharedram_r) /* shared RAM with CPU #1 */
|
AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the main CPU + sound registers */
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_DEVWRITE("namco", gaplus_snd_sharedram_w) AM_BASE(&namco_soundregs) /* shared RAM with the main CPU + sound registers */
|
|
||||||
AM_RANGE(0x2000, 0x3fff) AM_READWRITE(watchdog_reset_r, watchdog_reset_w) /* watchdog? */
|
AM_RANGE(0x2000, 0x3fff) AM_READWRITE(watchdog_reset_r, watchdog_reset_w) /* watchdog? */
|
||||||
AM_RANGE(0x4000, 0x7fff) AM_WRITE(gaplus_irq_3_ctrl_w) /* interrupt enable/disable */
|
AM_RANGE(0x4000, 0x7fff) AM_WRITE(gaplus_irq_3_ctrl_w) /* interrupt enable/disable */
|
||||||
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM */
|
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM */
|
||||||
|
@ -128,7 +128,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", pacman_sound_enable_w)
|
AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", pacman_sound_enable_w)
|
||||||
AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
|
AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
|
||||||
AM_RANGE(0x5040, 0x507f) AM_READ_PORT("P2")
|
AM_RANGE(0x5040, 0x507f) AM_READ_PORT("P2")
|
||||||
AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x5070) AM_WRITE(pengo_palettebank_w)
|
AM_RANGE(0x5070, 0x5070) AM_WRITE(pengo_palettebank_w)
|
||||||
AM_RANGE(0x5071, 0x5071) AM_WRITE(pengo_colortablebank_w)
|
AM_RANGE(0x5071, 0x5071) AM_WRITE(pengo_colortablebank_w)
|
||||||
|
@ -577,14 +577,6 @@ TODO:
|
|||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
static WRITE8_DEVICE_HANDLER( mappy_snd_sharedram_w )
|
|
||||||
{
|
|
||||||
if (offset < 0x40)
|
|
||||||
namco_15xx_w(device,offset,data);
|
|
||||||
else
|
|
||||||
namco_soundregs[offset] = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static WRITE8_HANDLER( superpac_latch_w )
|
static WRITE8_HANDLER( superpac_latch_w )
|
||||||
{
|
{
|
||||||
running_device *namcoio_1 = space->machine->device("namcoio_1");
|
running_device *namcoio_1 = space->machine->device("namcoio_1");
|
||||||
@ -884,7 +876,7 @@ static ADDRESS_MAP_START( superpac_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(superpac_videoram_w) AM_BASE_MEMBER(mappy_state,videoram) /* video RAM */
|
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(superpac_videoram_w) AM_BASE_MEMBER(mappy_state,videoram) /* video RAM */
|
||||||
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_BASE_MEMBER(mappy_state,spriteram) /* work RAM with embedded sprite RAM */
|
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_BASE_MEMBER(mappy_state,spriteram) /* work RAM with embedded sprite RAM */
|
||||||
AM_RANGE(0x2000, 0x2000) AM_READWRITE(superpac_flipscreen_r, superpac_flipscreen_w)
|
AM_RANGE(0x2000, 0x2000) AM_READWRITE(superpac_flipscreen_r, superpac_flipscreen_w)
|
||||||
AM_RANGE(0x4000, 0x43ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") /* shared RAM with the sound CPU */
|
AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the sound CPU */
|
||||||
AM_RANGE(0x4800, 0x480f) AM_DEVREADWRITE("namcoio_1", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x4800, 0x480f) AM_DEVREADWRITE("namcoio_1", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x4810, 0x481f) AM_DEVREADWRITE("namcoio_2", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x4810, 0x481f) AM_DEVREADWRITE("namcoio_2", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x5000, 0x500f) AM_WRITE(superpac_latch_w) /* various control bits */
|
AM_RANGE(0x5000, 0x500f) AM_WRITE(superpac_latch_w) /* various control bits */
|
||||||
@ -895,7 +887,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( phozon_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( phozon_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(superpac_videoram_w) AM_SHARE("share2") AM_BASE_MEMBER(mappy_state,videoram) /* video RAM */
|
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(superpac_videoram_w) AM_SHARE("share2") AM_BASE_MEMBER(mappy_state,videoram) /* video RAM */
|
||||||
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_BASE_MEMBER(mappy_state,spriteram) AM_SHARE("share3") /* shared RAM with CPU #2/sprite RAM*/
|
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_BASE_MEMBER(mappy_state,spriteram) AM_SHARE("share3") /* shared RAM with CPU #2/sprite RAM*/
|
||||||
AM_RANGE(0x4000, 0x43ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") /* shared RAM with the sound CPU */
|
AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the sound CPU */
|
||||||
AM_RANGE(0x4800, 0x480f) AM_DEVREADWRITE("namcoio_1", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x4800, 0x480f) AM_DEVREADWRITE("namcoio_1", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x4810, 0x481f) AM_DEVREADWRITE("namcoio_2", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x4810, 0x481f) AM_DEVREADWRITE("namcoio_2", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x5000, 0x500f) AM_WRITE(phozon_latch_w) /* various control bits */
|
AM_RANGE(0x5000, 0x500f) AM_WRITE(phozon_latch_w) /* various control bits */
|
||||||
@ -907,7 +899,7 @@ static ADDRESS_MAP_START( mappy_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0000, 0x0fff) AM_RAM_WRITE(mappy_videoram_w) AM_BASE_MEMBER(mappy_state,videoram) /* video RAM */
|
AM_RANGE(0x0000, 0x0fff) AM_RAM_WRITE(mappy_videoram_w) AM_BASE_MEMBER(mappy_state,videoram) /* video RAM */
|
||||||
AM_RANGE(0x1000, 0x27ff) AM_RAM AM_BASE_MEMBER(mappy_state,spriteram) /* work RAM with embedded sprite RAM */
|
AM_RANGE(0x1000, 0x27ff) AM_RAM AM_BASE_MEMBER(mappy_state,spriteram) /* work RAM with embedded sprite RAM */
|
||||||
AM_RANGE(0x3800, 0x3fff) AM_WRITE(mappy_scroll_w) /* scroll */
|
AM_RANGE(0x3800, 0x3fff) AM_WRITE(mappy_scroll_w) /* scroll */
|
||||||
AM_RANGE(0x4000, 0x43ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") /* shared RAM with the sound CPU */
|
AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the sound CPU */
|
||||||
AM_RANGE(0x4800, 0x480f) AM_DEVREADWRITE("namcoio_1", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x4800, 0x480f) AM_DEVREADWRITE("namcoio_1", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x4810, 0x481f) AM_DEVREADWRITE("namcoio_2", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
AM_RANGE(0x4810, 0x481f) AM_DEVREADWRITE("namcoio_2", namcoio_r, namcoio_w) /* custom I/O chips interface */
|
||||||
AM_RANGE(0x5000, 0x500f) AM_WRITE(mappy_latch_w) /* various control bits */
|
AM_RANGE(0x5000, 0x500f) AM_WRITE(mappy_latch_w) /* various control bits */
|
||||||
@ -917,18 +909,18 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
|
|
||||||
static ADDRESS_MAP_START( superpac_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( superpac_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") AM_BASE(&namco_soundregs) /* shared RAM with the main CPU (also sound registers) */
|
AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the main CPU (also sound registers) */
|
||||||
AM_RANGE(0x2000, 0x200f) AM_WRITE(superpac_latch_w) /* various control bits */
|
AM_RANGE(0x2000, 0x200f) AM_WRITE(superpac_latch_w) /* various control bits */
|
||||||
AM_RANGE(0xe000, 0xffff) AM_ROM
|
AM_RANGE(0xe000, 0xffff) AM_ROM
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( phozon_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( phozon_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") AM_BASE(&namco_soundregs) /* shared RAM with the main CPU + sound registers */
|
AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the main CPU + sound registers */
|
||||||
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM */
|
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM */
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( mappy_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( mappy_cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") AM_BASE(&namco_soundregs) /* shared RAM with the main CPU (also sound registers) */
|
AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the main CPU (also sound registers) */
|
||||||
AM_RANGE(0x2000, 0x200f) AM_WRITE(mappy_latch_w) /* various control bits */
|
AM_RANGE(0x2000, 0x200f) AM_WRITE(mappy_latch_w) /* various control bits */
|
||||||
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM code */
|
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM code */
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
@ -938,7 +930,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( phozon_cpu3_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( phozon_cpu3_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(superpac_videoram_w) AM_SHARE("share2") /* video RAM */
|
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(superpac_videoram_w) AM_SHARE("share2") /* video RAM */
|
||||||
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_SHARE("share3") /* shared RAM with CPU #2/sprite RAM*/
|
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_SHARE("share3") /* shared RAM with CPU #2/sprite RAM*/
|
||||||
AM_RANGE(0x4000, 0x43ff) AM_RAM_DEVWRITE("namco", mappy_snd_sharedram_w) AM_SHARE("share1") /* shared RAM with CPU #2 */
|
AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with CPU #2 */
|
||||||
AM_RANGE(0xa000, 0xa7ff) AM_RAM /* RAM */
|
AM_RANGE(0xa000, 0xa7ff) AM_RAM /* RAM */
|
||||||
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM */
|
AM_RANGE(0xe000, 0xffff) AM_ROM /* ROM */
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
@ -466,7 +466,7 @@ static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0000, 0x3fff) AM_ROMBANK("bank17") /* Banked ROMs */
|
AM_RANGE(0x0000, 0x3fff) AM_ROMBANK("bank17") /* Banked ROMs */
|
||||||
AM_RANGE(0x4000, 0x4001) AM_DEVREAD("ymsnd", ym2151_status_port_r)
|
AM_RANGE(0x4000, 0x4001) AM_DEVREAD("ymsnd", ym2151_status_port_r)
|
||||||
AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w)
|
AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w)
|
||||||
AM_RANGE(0x5000, 0x53ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) AM_MIRROR(0x400) AM_BASE(&namco_wavedata) /* PSG ( Shared ) */
|
AM_RANGE(0x5000, 0x53ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) AM_MIRROR(0x400) /* PSG ( Shared ) */
|
||||||
AM_RANGE(0x7000, 0x77ff) AM_RAMBANK("bank18") /* TRIRAM (shared) */
|
AM_RANGE(0x7000, 0x77ff) AM_RAMBANK("bank18") /* TRIRAM (shared) */
|
||||||
AM_RANGE(0x8000, 0x9fff) AM_RAM /* Sound RAM 3 */
|
AM_RANGE(0x8000, 0x9fff) AM_RAM /* Sound RAM 3 */
|
||||||
AM_RANGE(0xc000, 0xc001) AM_WRITE(namcos1_sound_bankswitch_w) /* ROM bank selector */
|
AM_RANGE(0xc000, 0xc001) AM_WRITE(namcos1_sound_bankswitch_w) /* ROM bank selector */
|
||||||
|
@ -356,7 +356,7 @@ static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0000, 0x1fff) AM_READWRITE(rthunder_videoram1_r,rthunder_videoram1_w) AM_BASE(&rthunder_videoram1)
|
AM_RANGE(0x0000, 0x1fff) AM_READWRITE(rthunder_videoram1_r,rthunder_videoram1_w) AM_BASE(&rthunder_videoram1)
|
||||||
AM_RANGE(0x2000, 0x3fff) AM_READWRITE(rthunder_videoram2_r,rthunder_videoram2_w) AM_BASE(&rthunder_videoram2)
|
AM_RANGE(0x2000, 0x3fff) AM_READWRITE(rthunder_videoram2_r,rthunder_videoram2_w) AM_BASE(&rthunder_videoram2)
|
||||||
|
|
||||||
AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namcos1_cus30_r,namcos1_cus30_w) AM_BASE(&namco_wavedata) /* PSG device, shared RAM */
|
AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) /* PSG device, shared RAM */
|
||||||
|
|
||||||
AM_RANGE(0x4000, 0x5fff) AM_READWRITE(rthunder_spriteram_r,rthunder_spriteram_w)
|
AM_RANGE(0x4000, 0x5fff) AM_READWRITE(rthunder_spriteram_r,rthunder_spriteram_w)
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ CPU2_MEMORY( wndrmomo, 0x2000, 0x4000, 0x6000, UNUSED, UNUSED, 0xc000, 0xc800 )
|
|||||||
static ADDRESS_MAP_START( NAME##_mcu_map, ADDRESS_SPACE_PROGRAM, 8 ) \
|
static ADDRESS_MAP_START( NAME##_mcu_map, ADDRESS_SPACE_PROGRAM, 8 ) \
|
||||||
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r,hd63701_internal_registers_w) \
|
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r,hd63701_internal_registers_w) \
|
||||||
AM_RANGE(0x0080, 0x00ff) AM_RAM \
|
AM_RANGE(0x0080, 0x00ff) AM_RAM \
|
||||||
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r,namcos1_cus30_w) /* PSG device, shared RAM */ \
|
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) /* PSG device, shared RAM */ \
|
||||||
AM_RANGE(0x1400, 0x1fff) AM_RAM \
|
AM_RANGE(0x1400, 0x1fff) AM_RAM \
|
||||||
AM_RANGE(ADDR_INPUT+0x00, ADDR_INPUT+0x01) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w) \
|
AM_RANGE(ADDR_INPUT+0x00, ADDR_INPUT+0x01) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w) \
|
||||||
AM_RANGE(ADDR_INPUT+0x20, ADDR_INPUT+0x20) AM_READ_PORT("IN0") \
|
AM_RANGE(ADDR_INPUT+0x20, ADDR_INPUT+0x20) AM_READ_PORT("IN0") \
|
||||||
|
@ -267,7 +267,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r, hd63701_internal_registers_w)
|
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r, hd63701_internal_registers_w)
|
||||||
AM_RANGE(0x0080, 0x00ff) AM_RAM
|
AM_RANGE(0x0080, 0x00ff) AM_RAM
|
||||||
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) AM_BASE(&namco_wavedata) /* PSG device, shared RAM */
|
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) /* PSG device, shared RAM */
|
||||||
AM_RANGE(0x2000, 0x3fff) AM_WRITE(watchdog_reset_w) /* watchdog? */
|
AM_RANGE(0x2000, 0x3fff) AM_WRITE(watchdog_reset_w) /* watchdog? */
|
||||||
AM_RANGE(0x4000, 0x7fff) AM_WRITE(pacland_irq_2_ctrl_w)
|
AM_RANGE(0x4000, 0x7fff) AM_WRITE(pacland_irq_2_ctrl_w)
|
||||||
AM_RANGE(0x8000, 0xbfff) AM_ROM
|
AM_RANGE(0x8000, 0xbfff) AM_ROM
|
||||||
|
@ -904,7 +904,7 @@ static ADDRESS_MAP_START( pacman_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
@ -931,7 +931,7 @@ static ADDRESS_MAP_START( mspacman_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
@ -971,7 +971,7 @@ static ADDRESS_MAP_START( woodpek_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
@ -996,7 +996,7 @@ static ADDRESS_MAP_START( alibaba_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x506f) AM_MIRROR(0xaf00) AM_WRITE(alibaba_sound_w) AM_BASE(&pacman_soundregs) /* the sound region is not contiguous */
|
AM_RANGE(0x5040, 0x506f) AM_MIRROR(0xaf00) AM_WRITE(alibaba_sound_w) /* the sound region is not contiguous */
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2) /* actually at 5050-505f, here to point to free RAM */
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2) /* actually at 5050-505f, here to point to free RAM */
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
@ -1029,7 +1029,7 @@ static ADDRESS_MAP_START( dremshpr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
// AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
// AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
@ -1056,7 +1056,7 @@ static ADDRESS_MAP_START( epos_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
@ -1136,7 +1136,7 @@ static ADDRESS_MAP_START( rocktrv2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", pacman_sound_enable_w)
|
AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", pacman_sound_enable_w)
|
||||||
AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
|
AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x50c0, 0x50c0) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x50c0, 0x50c0) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0x5fe0, 0x5fe3) AM_WRITE(rocktrv2_prot_data_w) AM_BASE(&rocktrv2_prot_data)
|
AM_RANGE(0x5fe0, 0x5fe3) AM_WRITE(rocktrv2_prot_data_w) AM_BASE(&rocktrv2_prot_data)
|
||||||
AM_RANGE(0x5ff0, 0x5ff0) AM_WRITE(rocktrv2_question_bank_w)
|
AM_RANGE(0x5ff0, 0x5ff0) AM_WRITE(rocktrv2_question_bank_w)
|
||||||
@ -1163,7 +1163,7 @@ static ADDRESS_MAP_START( bigbucks_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", pacman_sound_enable_w)
|
AM_RANGE(0x5001, 0x5001) AM_DEVWRITE("namco", pacman_sound_enable_w)
|
||||||
AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
|
AM_RANGE(0x5003, 0x5003) AM_WRITE(pacman_flipscreen_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_WRITENOP /*?*/
|
AM_RANGE(0x5007, 0x5007) AM_WRITENOP /*?*/
|
||||||
AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x50c0, 0x50c0) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x50c0, 0x50c0) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0x5000, 0x503f) AM_READ_PORT("IN0") /* IN0 */
|
AM_RANGE(0x5000, 0x503f) AM_READ_PORT("IN0") /* IN0 */
|
||||||
AM_RANGE(0x5040, 0x507f) AM_READ_PORT("IN1") /* IN1 */
|
AM_RANGE(0x5040, 0x507f) AM_READ_PORT("IN1") /* IN1 */
|
||||||
@ -1189,7 +1189,7 @@ static ADDRESS_MAP_START( mschamp_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_leds_w)
|
||||||
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITENOP // AM_WRITE(pacman_coin_lockout_global_w)
|
||||||
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
|
||||||
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0xaf00) AM_WRITENOP
|
||||||
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_WRITENOP
|
||||||
|
@ -102,7 +102,7 @@ static ADDRESS_MAP_START( pengo_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(pacman_colorram_w) AM_BASE(&pacman_colorram)
|
AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(pacman_colorram_w) AM_BASE(&pacman_colorram)
|
||||||
AM_RANGE(0x8800, 0x8fef) AM_RAM
|
AM_RANGE(0x8800, 0x8fef) AM_RAM
|
||||||
AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||||
AM_RANGE(0x9000, 0x901f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x9000, 0x901f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x9020, 0x902f) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x9020, 0x902f) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x9000, 0x903f) AM_READ_PORT("DSW1")
|
AM_RANGE(0x9000, 0x903f) AM_READ_PORT("DSW1")
|
||||||
AM_RANGE(0x9040, 0x907f) AM_READ_PORT("DSW0")
|
AM_RANGE(0x9040, 0x907f) AM_READ_PORT("DSW0")
|
||||||
@ -124,7 +124,7 @@ static ADDRESS_MAP_START( jrpacmbl_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(jrpacman_videoram_w) AM_BASE(&pacman_videoram)
|
AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(jrpacman_videoram_w) AM_BASE(&pacman_videoram)
|
||||||
AM_RANGE(0x8800, 0x8fef) AM_RAM
|
AM_RANGE(0x8800, 0x8fef) AM_RAM
|
||||||
AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||||
AM_RANGE(0x9000, 0x901f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&pacman_soundregs)
|
AM_RANGE(0x9000, 0x901f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0x9020, 0x902f) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
AM_RANGE(0x9020, 0x902f) AM_WRITEONLY AM_BASE_GENERIC(spriteram2)
|
||||||
AM_RANGE(0x9030, 0x9030) AM_WRITE(jrpacman_scroll_w)
|
AM_RANGE(0x9030, 0x9030) AM_WRITE(jrpacman_scroll_w)
|
||||||
AM_RANGE(0x9040, 0x904f) AM_READ_PORT("DSW")
|
AM_RANGE(0x9040, 0x904f) AM_READ_PORT("DSW")
|
||||||
|
@ -486,7 +486,7 @@ static ADDRESS_MAP_START( z80_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
|
|
||||||
AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_READONLY /* Sound Memory */
|
AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_READONLY /* Sound Memory */
|
||||||
AM_RANGE(0x8000, 0x83bf) AM_MIRROR(0x0c00) AM_WRITEONLY /* Sound Memory */
|
AM_RANGE(0x8000, 0x83bf) AM_MIRROR(0x0c00) AM_WRITEONLY /* Sound Memory */
|
||||||
AM_RANGE(0x83c0, 0x83ff) AM_MIRROR(0x0c00) AM_DEVWRITE("namco", polepos_sound_w) AM_BASE(&polepos_soundregs)/* Sound data */
|
AM_RANGE(0x83c0, 0x83ff) AM_MIRROR(0x0c00) AM_DEVWRITE("namco", polepos_sound_w) /* Sound data */
|
||||||
|
|
||||||
AM_RANGE(0x9000, 0x9000) AM_MIRROR(0x0eff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
AM_RANGE(0x9000, 0x9000) AM_MIRROR(0x0eff) AM_DEVREADWRITE("06xx", namco_06xx_data_r, namco_06xx_data_w)
|
||||||
AM_RANGE(0x9100, 0x9100) AM_MIRROR(0x0eff) AM_DEVREADWRITE("06xx", namco_06xx_ctrl_r, namco_06xx_ctrl_w)
|
AM_RANGE(0x9100, 0x9100) AM_MIRROR(0x0eff) AM_DEVREADWRITE("06xx", namco_06xx_ctrl_r, namco_06xx_ctrl_w)
|
||||||
|
@ -323,7 +323,7 @@ static ADDRESS_MAP_START( rallyx_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0xa100, 0xa100) AM_READ_PORT("DSW")
|
AM_RANGE(0xa100, 0xa100) AM_READ_PORT("DSW")
|
||||||
AM_RANGE(0xa000, 0xa00f) AM_WRITEONLY AM_BASE_MEMBER(timeplt_state, radarattr)
|
AM_RANGE(0xa000, 0xa00f) AM_WRITEONLY AM_BASE_MEMBER(timeplt_state, radarattr)
|
||||||
AM_RANGE(0xa080, 0xa080) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0xa080, 0xa080) AM_WRITE(watchdog_reset_w)
|
||||||
AM_RANGE(0xa100, 0xa11f) AM_DEVWRITE("namco", pacman_sound_w) AM_BASE(&namco_soundregs)
|
AM_RANGE(0xa100, 0xa11f) AM_DEVWRITE("namco", pacman_sound_w)
|
||||||
AM_RANGE(0xa130, 0xa130) AM_WRITE(rallyx_scrollx_w)
|
AM_RANGE(0xa130, 0xa130) AM_WRITE(rallyx_scrollx_w)
|
||||||
AM_RANGE(0xa140, 0xa140) AM_WRITE(rallyx_scrolly_w)
|
AM_RANGE(0xa140, 0xa140) AM_WRITE(rallyx_scrolly_w)
|
||||||
AM_RANGE(0xa170, 0xa170) AM_WRITENOP /* ? */
|
AM_RANGE(0xa170, 0xa170) AM_WRITENOP /* ? */
|
||||||
|
@ -120,7 +120,7 @@ static ADDRESS_MAP_START( skykid_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x4800, 0x5fff) AM_RAM AM_BASE(&skykid_spriteram) /* RAM + Sprite RAM */
|
AM_RANGE(0x4800, 0x5fff) AM_RAM AM_BASE(&skykid_spriteram) /* RAM + Sprite RAM */
|
||||||
AM_RANGE(0x6000, 0x60ff) AM_WRITE(skykid_scroll_y_w) /* Y scroll register map */
|
AM_RANGE(0x6000, 0x60ff) AM_WRITE(skykid_scroll_y_w) /* Y scroll register map */
|
||||||
AM_RANGE(0x6200, 0x63ff) AM_WRITE(skykid_scroll_x_w) /* X scroll register map */
|
AM_RANGE(0x6200, 0x63ff) AM_WRITE(skykid_scroll_x_w) /* X scroll register map */
|
||||||
AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namcos1_cus30_r,namcos1_cus30_w) AM_BASE(&namco_wavedata)/* PSG device, shared RAM */
|
AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) /* PSG device, shared RAM */
|
||||||
AM_RANGE(0x7000, 0x7fff) AM_WRITE(skykid_irq_1_ctrl_w) /* IRQ control */
|
AM_RANGE(0x7000, 0x7fff) AM_WRITE(skykid_irq_1_ctrl_w) /* IRQ control */
|
||||||
AM_RANGE(0x7800, 0x7fff) AM_READ(watchdog_reset_r) /* watchdog reset */
|
AM_RANGE(0x7800, 0x7fff) AM_READ(watchdog_reset_r) /* watchdog reset */
|
||||||
AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM */
|
AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM */
|
||||||
@ -132,7 +132,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r, hd63701_internal_registers_w)
|
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r, hd63701_internal_registers_w)
|
||||||
AM_RANGE(0x0080, 0x00ff) AM_RAM
|
AM_RANGE(0x0080, 0x00ff) AM_RAM
|
||||||
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) AM_BASE(&namco_wavedata) /* PSG device, shared RAM */
|
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) /* PSG device, shared RAM */
|
||||||
AM_RANGE(0x2000, 0x3fff) AM_WRITE(watchdog_reset_w) /* watchdog? */
|
AM_RANGE(0x2000, 0x3fff) AM_WRITE(watchdog_reset_w) /* watchdog? */
|
||||||
AM_RANGE(0x4000, 0x7fff) AM_WRITE(skykid_irq_2_ctrl_w)
|
AM_RANGE(0x4000, 0x7fff) AM_WRITE(skykid_irq_2_ctrl_w)
|
||||||
AM_RANGE(0x8000, 0xbfff) AM_ROM
|
AM_RANGE(0x8000, 0xbfff) AM_ROM
|
||||||
|
@ -324,10 +324,12 @@ static WRITE16_HANDLER( video_regs_w )
|
|||||||
{
|
{
|
||||||
|
|
||||||
case 0x5e/2: // bank switch, used by ROM check
|
case 0x5e/2: // bank switch, used by ROM check
|
||||||
|
{
|
||||||
|
const UINT8 *rom = memory_region(space->machine, "nile");
|
||||||
LOG(("%x\n",data));
|
LOG(("%x\n",data));
|
||||||
|
memory_set_bankptr(space->machine, "bank1",(UINT16 *)(rom + (data & 0x0f)*0x200000));
|
||||||
memory_set_bankptr(space->machine, "bank1",(UINT16 *)(memory_region(space->machine, "nile") + (data & 0x0f)*0x200000));
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// set by IT4
|
// set by IT4
|
||||||
case 0x5c/2: // either 0x40 explicitely in many places, or according $2083b0 (IT4)
|
case 0x5c/2: // either 0x40 explicitely in many places, or according $2083b0 (IT4)
|
||||||
@ -548,7 +550,7 @@ static ADDRESS_MAP_START( srmp6, ADDRESS_SPACE_PROGRAM, 16 )
|
|||||||
//AM_RANGE(0x5fff00, 0x5fffff) AM_WRITE(dma_w) AM_BASE_MEMBER(srmp6_state,dmaram)
|
//AM_RANGE(0x5fff00, 0x5fffff) AM_WRITE(dma_w) AM_BASE_MEMBER(srmp6_state,dmaram)
|
||||||
|
|
||||||
AM_RANGE(0x4c0000, 0x4c006f) AM_READWRITE(video_regs_r, video_regs_w) AM_BASE_MEMBER(srmp6_state,video_regs) // ? gfx regs ST-0026 NiLe
|
AM_RANGE(0x4c0000, 0x4c006f) AM_READWRITE(video_regs_r, video_regs_w) AM_BASE_MEMBER(srmp6_state,video_regs) // ? gfx regs ST-0026 NiLe
|
||||||
AM_RANGE(0x4e0000, 0x4e00ff) AM_DEVREADWRITE("nile", nile_snd_r, nile_snd_w) AM_BASE(&nile_sound_regs)
|
AM_RANGE(0x4e0000, 0x4e00ff) AM_DEVREADWRITE("nile", nile_snd_r, nile_snd_w)
|
||||||
AM_RANGE(0x4e0100, 0x4e0101) AM_DEVREADWRITE("nile", nile_sndctrl_r, nile_sndctrl_w)
|
AM_RANGE(0x4e0100, 0x4e0101) AM_DEVREADWRITE("nile", nile_sndctrl_r, nile_sndctrl_w)
|
||||||
//AM_RANGE(0x4e0110, 0x4e0111) AM_NOP // ? accessed once ($268dc, written $b.w)
|
//AM_RANGE(0x4e0110, 0x4e0111) AM_NOP // ? accessed once ($268dc, written $b.w)
|
||||||
//AM_RANGE(0x5fff00, 0x5fff1f) AM_RAM // ? see routine $5ca8, video_regs related ???
|
//AM_RANGE(0x5fff00, 0x5fff1f) AM_RAM // ? see routine $5ca8, video_regs related ???
|
||||||
|
@ -231,7 +231,7 @@ ADDRESS_MAP_END
|
|||||||
static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r, hd63701_internal_registers_w)
|
AM_RANGE(0x0000, 0x001f) AM_READWRITE(hd63701_internal_registers_r, hd63701_internal_registers_w)
|
||||||
AM_RANGE(0x0080, 0x00ff) AM_RAM
|
AM_RANGE(0x0080, 0x00ff) AM_RAM
|
||||||
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w) AM_BASE(&namco_wavedata)
|
AM_RANGE(0x1000, 0x13ff) AM_DEVREADWRITE("namco", namcos1_cus30_r, namcos1_cus30_w)
|
||||||
AM_RANGE(0x1400, 0x154d) AM_RAM
|
AM_RANGE(0x1400, 0x154d) AM_RAM
|
||||||
AM_RANGE(0x17c0, 0x17ff) AM_RAM
|
AM_RANGE(0x17c0, 0x17ff) AM_RAM
|
||||||
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("share3")
|
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("share3")
|
||||||
|
@ -37,19 +37,6 @@ TODO:
|
|||||||
#include "includes/toypop.h"
|
#include "includes/toypop.h"
|
||||||
|
|
||||||
|
|
||||||
static READ8_DEVICE_HANDLER( toypop_sound_sharedram_r )
|
|
||||||
{
|
|
||||||
return namco_soundregs[offset];
|
|
||||||
}
|
|
||||||
|
|
||||||
static WRITE8_DEVICE_HANDLER( toypop_sound_sharedram_w )
|
|
||||||
{
|
|
||||||
if (offset < 0x40)
|
|
||||||
namco_15xx_w(device,offset,data);
|
|
||||||
else
|
|
||||||
namco_soundregs[offset] = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static READ16_HANDLER( toypop_m68000_sharedram_r )
|
static READ16_HANDLER( toypop_m68000_sharedram_r )
|
||||||
{
|
{
|
||||||
toypop_state *state = space->machine->driver_data<toypop_state>();
|
toypop_state *state = space->machine->driver_data<toypop_state>();
|
||||||
@ -201,7 +188,7 @@ static ADDRESS_MAP_START( liblrabl_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(toypop_videoram_w) AM_BASE_MEMBER(toypop_state,videoram) /* video RAM */
|
AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(toypop_videoram_w) AM_BASE_MEMBER(toypop_state,videoram) /* video RAM */
|
||||||
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_BASE_MEMBER(toypop_state,spriteram) /* general RAM, area 1 */
|
AM_RANGE(0x0800, 0x1fff) AM_RAM AM_BASE_MEMBER(toypop_state,spriteram) /* general RAM, area 1 */
|
||||||
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_MEMBER(toypop_state,m68000_sharedram) /* shared RAM with the 68000 CPU */
|
AM_RANGE(0x2800, 0x2fff) AM_RAM AM_BASE_MEMBER(toypop_state,m68000_sharedram) /* shared RAM with the 68000 CPU */
|
||||||
AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("namco", toypop_sound_sharedram_r, toypop_sound_sharedram_w) /* shared RAM with sound CPU */
|
AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with sound CPU */
|
||||||
AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O */
|
AM_RANGE(0x6800, 0x680f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O */
|
||||||
AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("56xx_1", namcoio_r, namcoio_w) /* custom I/O */
|
AM_RANGE(0x6810, 0x681f) AM_DEVREADWRITE("56xx_1", namcoio_r, namcoio_w) /* custom I/O */
|
||||||
AM_RANGE(0x6820, 0x682f) AM_DEVREADWRITE("56xx_2", namcoio_r, namcoio_w) /* custom I/O */
|
AM_RANGE(0x6820, 0x682f) AM_DEVREADWRITE("56xx_2", namcoio_r, namcoio_w) /* custom I/O */
|
||||||
@ -222,7 +209,7 @@ static ADDRESS_MAP_START( toypop_map, ADDRESS_SPACE_PROGRAM, 8 )
|
|||||||
AM_RANGE(0x6000, 0x600f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O */
|
AM_RANGE(0x6000, 0x600f) AM_DEVREADWRITE("58xx", namcoio_r, namcoio_w) /* custom I/O */
|
||||||
AM_RANGE(0x6010, 0x601f) AM_DEVREADWRITE("56xx_1", namcoio_r, namcoio_w) /* custom I/O */
|
AM_RANGE(0x6010, 0x601f) AM_DEVREADWRITE("56xx_1", namcoio_r, namcoio_w) /* custom I/O */
|
||||||
AM_RANGE(0x6020, 0x602f) AM_DEVREADWRITE("56xx_2", namcoio_r, namcoio_w) /* custom I/O */
|
AM_RANGE(0x6020, 0x602f) AM_DEVREADWRITE("56xx_2", namcoio_r, namcoio_w) /* custom I/O */
|
||||||
AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", toypop_sound_sharedram_r, toypop_sound_sharedram_w) /* shared RAM with sound CPU */
|
AM_RANGE(0x6800, 0x6bff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with sound CPU */
|
||||||
AM_RANGE(0x7000, 0x7000) AM_READWRITE(toypop_main_interrupt_enable_r, toypop_main_interrupt_disable_w) /* disable interrupt */
|
AM_RANGE(0x7000, 0x7000) AM_READWRITE(toypop_main_interrupt_enable_r, toypop_main_interrupt_disable_w) /* disable interrupt */
|
||||||
AM_RANGE(0x8000, 0x8000) AM_WRITE(toypop_m68000_clear_w) /* reset 68000 */
|
AM_RANGE(0x8000, 0x8000) AM_WRITE(toypop_m68000_clear_w) /* reset 68000 */
|
||||||
AM_RANGE(0x8800, 0x8800) AM_WRITE(toypop_m68000_assert_w) /* reset 68000 */
|
AM_RANGE(0x8800, 0x8800) AM_WRITE(toypop_m68000_assert_w) /* reset 68000 */
|
||||||
@ -240,7 +227,7 @@ ADDRESS_MAP_END
|
|||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
|
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", toypop_sound_sharedram_r, toypop_sound_sharedram_w) AM_BASE(&namco_soundregs) /* shared RAM with the main CPU + sound registers */
|
AM_RANGE(0x0000, 0x03ff) AM_DEVREADWRITE("namco", namco_snd_sharedram_r, namco_snd_sharedram_w) /* shared RAM with the main CPU + sound registers */
|
||||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(toypop_sound_interrupt_disable_w) /* ??? toypop doesn't write here */
|
AM_RANGE(0x2000, 0x2000) AM_WRITE(toypop_sound_interrupt_disable_w) /* ??? toypop doesn't write here */
|
||||||
AM_RANGE(0x4000, 0x4000) AM_WRITE(toypop_sound_interrupt_enable_acknowledge_w)
|
AM_RANGE(0x4000, 0x4000) AM_WRITE(toypop_sound_interrupt_enable_acknowledge_w)
|
||||||
AM_RANGE(0x6000, 0x6000) AM_WRITE(watchdog_reset_w)
|
AM_RANGE(0x6000, 0x6000) AM_WRITE(watchdog_reset_w)
|
||||||
|
Loading…
Reference in New Issue
Block a user