mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Modernized the Seibu ADPCM device and converted the Seibu sound system to be a device. [Osso]
This commit is contained in:
parent
84c16ae87f
commit
517f257029
@ -39,9 +39,13 @@
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/okiadpcm.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "devlegcy.h"
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Seibu Sound System
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
Games using encrypted sound cpu:
|
||||
|
||||
@ -69,6 +73,66 @@
|
||||
00002CA2: 17 37
|
||||
*/
|
||||
|
||||
const device_type SEIBU_SOUND = &device_creator<seibu_sound_device>;
|
||||
|
||||
seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, SEIBU_SOUND, "Seibu Sound System", tag, owner, clock, "seibu_sound", __FILE__),
|
||||
m_main2sub_pending(0),
|
||||
m_sub2main_pending(0)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void seibu_sound_device::device_config_complete()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void seibu_sound_device::device_start()
|
||||
{
|
||||
m_main2sub[0] = m_main2sub[1] = 0;
|
||||
m_sub2main[0] = m_sub2main[1] = 0;
|
||||
|
||||
save_item(NAME(m_main2sub_pending));
|
||||
save_item(NAME(m_sub2main_pending));
|
||||
|
||||
save_item(NAME(m_main2sub));
|
||||
save_item(NAME(m_sub2main));
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
save_item(NAME(m_main2sub[i]), i);
|
||||
save_item(NAME(m_sub2main[i]), i);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void seibu_sound_device::device_reset()
|
||||
{
|
||||
int romlength = machine().root_device().memregion("audiocpu")->bytes();
|
||||
UINT8 *rom = machine().root_device().memregion("audiocpu")->base();
|
||||
|
||||
m_sound_cpu = machine().device("audiocpu");
|
||||
update_irq_lines(VECTOR_INIT);
|
||||
if (romlength > 0x10000)
|
||||
{
|
||||
machine().root_device().membank("bank1")->configure_entries(0, (romlength - 0x10000) / 0x8000, rom + 0x10000, 0x8000);
|
||||
|
||||
/* Denjin Makai definitely needs this at start-up, it never writes to the bankswitch */
|
||||
machine().root_device().membank("bank1")->set_entry(0);
|
||||
}
|
||||
}
|
||||
|
||||
static UINT8 decrypt_data(int a,int src)
|
||||
{
|
||||
@ -103,11 +167,11 @@ static UINT8 decrypt_opcode(int a,int src)
|
||||
return src;
|
||||
}
|
||||
|
||||
void seibu_sound_decrypt(running_machine &machine,const char *cpu,int length)
|
||||
void seibu_sound_device::decrypt(const char *cpu,int length)
|
||||
{
|
||||
address_space &space = machine.device(cpu)->memory().space(AS_PROGRAM);
|
||||
UINT8 *decrypt = auto_alloc_array(machine, UINT8, length);
|
||||
UINT8 *rom = machine.root_device().memregion(cpu)->base();
|
||||
address_space &space = machine().device(cpu)->memory().space(AS_PROGRAM);
|
||||
UINT8 *decrypt = auto_alloc_array_clear(machine(), UINT8, length);
|
||||
UINT8 *rom = machine().root_device().memregion(cpu)->base();
|
||||
int i;
|
||||
|
||||
space.set_decrypted_region(0x0000, (length < 0x10000) ? (length - 1) : 0x1fff, decrypt);
|
||||
@ -121,147 +185,10 @@ void seibu_sound_decrypt(running_machine &machine,const char *cpu,int length)
|
||||
}
|
||||
|
||||
if (length > 0x10000)
|
||||
machine.root_device().membank("bank1")->configure_decrypted_entries(0, (length - 0x10000) / 0x8000, decrypt + 0x10000, 0x8000);
|
||||
machine().root_device().membank("bank1")->configure_decrypted_entries(0, (length - 0x10000) / 0x8000, decrypt + 0x10000, 0x8000);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
Handlers for early Seibu/Tad games with dual channel ADPCM
|
||||
*/
|
||||
|
||||
const seibu_adpcm_interface seibu_adpcm1_intf =
|
||||
{
|
||||
"adpcm1"
|
||||
};
|
||||
|
||||
const seibu_adpcm_interface seibu_adpcm2_intf =
|
||||
{
|
||||
"adpcm2"
|
||||
};
|
||||
|
||||
struct seibu_adpcm_state
|
||||
{
|
||||
oki_adpcm_state m_adpcm;
|
||||
sound_stream *m_stream;
|
||||
UINT32 m_current;
|
||||
UINT32 m_end;
|
||||
UINT8 m_nibble;
|
||||
UINT8 m_playing;
|
||||
UINT8 m_allocated;
|
||||
UINT8 *m_base;
|
||||
};
|
||||
|
||||
static STREAM_UPDATE( seibu_adpcm_callback )
|
||||
{
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)param;
|
||||
stream_sample_t *dest = outputs[0];
|
||||
|
||||
while (state->m_playing && samples > 0)
|
||||
{
|
||||
int val = (state->m_base[state->m_current] >> state->m_nibble) & 15;
|
||||
|
||||
state->m_nibble ^= 4;
|
||||
if (state->m_nibble == 4)
|
||||
{
|
||||
state->m_current++;
|
||||
if (state->m_current >= state->m_end)
|
||||
state->m_playing = 0;
|
||||
}
|
||||
|
||||
*dest++ = state->m_adpcm.clock(val) << 4;
|
||||
samples--;
|
||||
}
|
||||
while (samples > 0)
|
||||
{
|
||||
*dest++ = 0;
|
||||
samples--;
|
||||
}
|
||||
}
|
||||
|
||||
static DEVICE_START( seibu_adpcm )
|
||||
{
|
||||
running_machine &machine = device->machine();
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)downcast<seibu_adpcm_device *>(device)->token();
|
||||
const seibu_adpcm_interface *intf;
|
||||
|
||||
intf = (const seibu_adpcm_interface *)device->static_config();
|
||||
|
||||
state->m_playing = 0;
|
||||
state->m_stream = device->machine().sound().stream_alloc(*device, 0, 1, device->clock(), state, seibu_adpcm_callback);
|
||||
state->m_base = machine.root_device().memregion(intf->rom_region)->base();
|
||||
state->m_adpcm.reset();
|
||||
}
|
||||
|
||||
// "decrypt" is a bit flowery here, as it's probably just line-swapping to
|
||||
// simplify PCB layout/routing rather than intentional protection, but it
|
||||
// still fits, especially since the Z80s for all these games are truly encrypted.
|
||||
|
||||
void seibu_adpcm_decrypt(running_machine &machine, const char *region)
|
||||
{
|
||||
UINT8 *ROM = machine.root_device().memregion(region)->base();
|
||||
int len = machine.root_device().memregion(region)->bytes();
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
ROM[i] = BITSWAP8(ROM[i], 7, 5, 3, 1, 6, 4, 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( seibu_adpcm_adr_w )
|
||||
{
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)downcast<seibu_adpcm_device *>(device)->token();
|
||||
|
||||
if (state->m_stream)
|
||||
state->m_stream->update();
|
||||
if (offset)
|
||||
{
|
||||
state->m_end = data<<8;
|
||||
}
|
||||
else
|
||||
{
|
||||
state->m_current = data<<8;
|
||||
state->m_nibble = 4;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER( seibu_adpcm_ctl_w )
|
||||
{
|
||||
seibu_adpcm_state *state = (seibu_adpcm_state *)downcast<seibu_adpcm_device *>(device)->token();
|
||||
|
||||
// sequence is 00 02 01 each time.
|
||||
if (state->m_stream)
|
||||
state->m_stream->update();
|
||||
switch (data)
|
||||
{
|
||||
case 0:
|
||||
state->m_playing = 0;
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 1:
|
||||
state->m_playing = 1;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static device_t *sound_cpu;
|
||||
|
||||
enum
|
||||
{
|
||||
VECTOR_INIT,
|
||||
RST10_ASSERT,
|
||||
RST10_CLEAR,
|
||||
RST18_ASSERT,
|
||||
RST18_CLEAR
|
||||
};
|
||||
|
||||
static void update_irq_lines(running_machine &machine, int param)
|
||||
void seibu_sound_device::update_irq_lines(int param)
|
||||
{
|
||||
static int irq1,irq2;
|
||||
|
||||
@ -288,116 +215,97 @@ static void update_irq_lines(running_machine &machine, int param)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((irq1 & irq2) == 0xff) /* no IRQs pending */
|
||||
sound_cpu->execute().set_input_line(0,CLEAR_LINE);
|
||||
else /* IRQ pending */
|
||||
sound_cpu->execute().set_input_line_and_vector(0,ASSERT_LINE,irq1 & irq2);
|
||||
}
|
||||
if (m_sound_cpu != NULL)
|
||||
if ((irq1 & irq2) == 0xff) /* no IRQs pending */
|
||||
m_sound_cpu->execute().set_input_line(0,CLEAR_LINE);
|
||||
else /* IRQ pending */
|
||||
m_sound_cpu->execute().set_input_line_and_vector(0,ASSERT_LINE,irq1 & irq2);
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_HANDLER( seibu_irq_clear_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::irq_clear_w )
|
||||
{
|
||||
/* Denjin Makai and SD Gundam doesn't like this, it's tied to the rst18 ack ONLY so it could be related to it. */
|
||||
//update_irq_lines(space.machine(), VECTOR_INIT);
|
||||
//update_irq_lines(VECTOR_INIT);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( seibu_rst10_ack_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::rst10_ack_w )
|
||||
{
|
||||
/* Unused for now */
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( seibu_rst18_ack_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::rst18_ack_w )
|
||||
{
|
||||
update_irq_lines(space.machine(), RST18_CLEAR);
|
||||
update_irq_lines(RST18_CLEAR);
|
||||
}
|
||||
|
||||
void seibu_ym3812_irqhandler(device_t *device, int linestate)
|
||||
void seibu_sound_device::ym3812_irqhandler(int linestate)
|
||||
{
|
||||
update_irq_lines(device->machine(), linestate ? RST10_ASSERT : RST10_CLEAR);
|
||||
update_irq_lines(linestate ? RST10_ASSERT : RST10_CLEAR);
|
||||
}
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER( seibu_ym2151_irqhandler )
|
||||
WRITE_LINE_MEMBER( seibu_sound_device::ym2151_irqhandler )
|
||||
{
|
||||
update_irq_lines(device->machine(), state ? RST10_ASSERT : RST10_CLEAR);
|
||||
update_irq_lines(state ? RST10_ASSERT : RST10_CLEAR);
|
||||
}
|
||||
|
||||
void seibu_ym2203_irqhandler(device_t *device, int linestate)
|
||||
void seibu_sound_device::ym2203_irqhandler(int linestate)
|
||||
{
|
||||
update_irq_lines(device->machine(), linestate ? RST10_ASSERT : RST10_CLEAR);
|
||||
update_irq_lines(linestate ? RST10_ASSERT : RST10_CLEAR);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
MACHINE_RESET( seibu_sound )
|
||||
{
|
||||
int romlength = machine.root_device().memregion("audiocpu")->bytes();
|
||||
UINT8 *rom = machine.root_device().memregion("audiocpu")->base();
|
||||
|
||||
sound_cpu = machine.device("audiocpu");
|
||||
update_irq_lines(machine, VECTOR_INIT);
|
||||
if (romlength > 0x10000)
|
||||
{
|
||||
machine.root_device().membank("bank1")->configure_entries(0, (romlength - 0x10000) / 0x8000, rom + 0x10000, 0x8000);
|
||||
|
||||
/* Denjin Makai definitely needs this at start-up, it never writes to the bankswitch */
|
||||
machine.root_device().membank("bank1")->set_entry(0);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
static UINT8 main2sub[2],sub2main[2];
|
||||
static int main2sub_pending,sub2main_pending;
|
||||
|
||||
WRITE8_HANDLER( seibu_bank_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::bank_w )
|
||||
{
|
||||
space.machine().root_device().membank("bank1")->set_entry(data & 1);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( seibu_coin_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::coin_w )
|
||||
{
|
||||
coin_counter_w(space.machine(), 0,data & 1);
|
||||
coin_counter_w(space.machine(), 1,data & 2);
|
||||
}
|
||||
|
||||
READ8_HANDLER( seibu_soundlatch_r )
|
||||
READ8_MEMBER( seibu_sound_device::soundlatch_r )
|
||||
{
|
||||
return main2sub[offset];
|
||||
return m_main2sub[offset];
|
||||
}
|
||||
|
||||
READ8_HANDLER( seibu_main_data_pending_r )
|
||||
READ8_MEMBER( seibu_sound_device::main_data_pending_r )
|
||||
{
|
||||
return sub2main_pending ? 1 : 0;
|
||||
return m_sub2main_pending ? 1 : 0;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( seibu_main_data_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::main_data_w )
|
||||
{
|
||||
sub2main[offset] = data;
|
||||
m_sub2main[offset] = data;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( seibu_pending_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::pending_w )
|
||||
{
|
||||
/* just a guess */
|
||||
main2sub_pending = 0;
|
||||
sub2main_pending = 1;
|
||||
m_main2sub_pending = 0;
|
||||
m_sub2main_pending = 1;
|
||||
}
|
||||
|
||||
READ16_HANDLER( seibu_main_word_r )
|
||||
READ16_MEMBER( seibu_sound_device::main_word_r )
|
||||
{
|
||||
//logerror("%06x: seibu_main_word_r(%x)\n",space.device().safe_pc(),offset);
|
||||
switch (offset)
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
return sub2main[offset-2];
|
||||
return m_sub2main[offset-2];
|
||||
case 5:
|
||||
return main2sub_pending ? 1 : 0;
|
||||
return m_main2sub_pending ? 1 : 0;
|
||||
default:
|
||||
//logerror("%06x: seibu_main_word_r(%x)\n",space.device().safe_pc(),offset);
|
||||
return 0xffff;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( seibu_main_word_w )
|
||||
WRITE16_MEMBER( seibu_sound_device::main_word_w )
|
||||
{
|
||||
//printf("%06x: seibu_main_word_w(%x,%02x)\n",space.device().safe_pc(),offset,data);
|
||||
if (ACCESSING_BITS_0_7)
|
||||
@ -406,16 +314,16 @@ WRITE16_HANDLER( seibu_main_word_w )
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
main2sub[offset] = data;
|
||||
m_main2sub[offset] = data;
|
||||
break;
|
||||
case 4:
|
||||
update_irq_lines(space.machine(), RST18_ASSERT);
|
||||
update_irq_lines(RST18_ASSERT);
|
||||
break;
|
||||
case 2: //Sengoku Mahjong writes here
|
||||
case 6:
|
||||
/* just a guess */
|
||||
sub2main_pending = 0;
|
||||
main2sub_pending = 1;
|
||||
m_sub2main_pending = 0;
|
||||
m_main2sub_pending = 1;
|
||||
break;
|
||||
default:
|
||||
//logerror("%06x: seibu_main_word_w(%x,%02x)\n",space.device().safe_pc(),offset,data);
|
||||
@ -424,24 +332,24 @@ WRITE16_HANDLER( seibu_main_word_w )
|
||||
}
|
||||
}
|
||||
|
||||
READ8_HANDLER( seibu_main_v30_r )
|
||||
READ8_MEMBER( seibu_sound_device::main_v30_r )
|
||||
{
|
||||
return seibu_main_word_r(space,offset/2,0xffff) >> (8 * (offset & 1));
|
||||
return main_word_r(space,offset/2,0xffff) >> (8 * (offset & 1));
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( seibu_main_v30_w )
|
||||
WRITE8_MEMBER( seibu_sound_device::main_v30_w )
|
||||
{
|
||||
seibu_main_word_w(space,offset/2,data << (8 * (offset & 1)),0x00ff << (8 * (offset & 1)));
|
||||
main_word_w(space,offset/2,data << (8 * (offset & 1)),0x00ff << (8 * (offset & 1)));
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( seibu_main_mustb_w )
|
||||
WRITE16_MEMBER( seibu_sound_device::main_mustb_w )
|
||||
{
|
||||
main2sub[0] = data&0xff;
|
||||
main2sub[1] = data>>8;
|
||||
m_main2sub[0] = data&0xff;
|
||||
m_main2sub[1] = data>>8;
|
||||
|
||||
// logerror("seibu_main_mustb_w: %x -> %x %x\n", data, main2sub[0], main2sub[1]);
|
||||
|
||||
update_irq_lines(space.machine(), RST18_ASSERT);
|
||||
update_irq_lines(RST18_ASSERT);
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
@ -458,17 +366,17 @@ const ay8910_interface seibu_ay8910_config =
|
||||
ADDRESS_MAP_START( seibu_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_WRITE_LEGACY(seibu_bank_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym3812_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("oki", okim6295_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
@ -476,17 +384,17 @@ ADDRESS_MAP_END
|
||||
ADDRESS_MAP_START( seibu2_airraid_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_WRITENOP // bank, always 0
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
// AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("oki", okim6295_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -494,17 +402,17 @@ ADDRESS_MAP_END
|
||||
ADDRESS_MAP_START( seibu2_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_WRITE_LEGACY(seibu_bank_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("oki", okim6295_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
@ -512,17 +420,17 @@ ADDRESS_MAP_END
|
||||
ADDRESS_MAP_START( seibu2_raiden2_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_WRITE_LEGACY(seibu_bank_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
|
||||
AM_RANGE(0x6002, 0x6002) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
|
||||
@ -533,17 +441,17 @@ ADDRESS_MAP_END
|
||||
ADDRESS_MAP_START( seibu_newzeroteam_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym3812_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_WRITE_LEGACY(seibu_bank_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("oki", okim6295_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
@ -551,17 +459,17 @@ ADDRESS_MAP_END
|
||||
ADDRESS_MAP_START( seibu3_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_WRITE_LEGACY(seibu_bank_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
@ -569,33 +477,42 @@ ADDRESS_MAP_END
|
||||
ADDRESS_MAP_START( seibu3_adpcm_sound_map, AS_PROGRAM, 8, driver_device )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(seibu_pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4005, 0x4006) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_adr_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_WRITE_LEGACY(seibu_bank_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4005, 0x4006) AM_DEVWRITE("adpcm1", seibu_adpcm_device, adr_w)
|
||||
AM_RANGE(0x4007, 0x4007) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_ctl_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x6005, 0x6006) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_adr_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_DEVWRITE("adpcm1", seibu_adpcm_device, ctl_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6005, 0x6006) AM_DEVWRITE("adpcm2", seibu_adpcm_device, adr_w)
|
||||
AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
|
||||
AM_RANGE(0x601a, 0x601a) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_ctl_w)
|
||||
AM_RANGE(0x601a, 0x601a) AM_DEVWRITE("adpcm2", seibu_adpcm_device, ctl_w)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/***************************************************************************
|
||||
Seibu ADPCM device
|
||||
***************************************************************************/
|
||||
|
||||
const device_type SEIBU_ADPCM = &device_creator<seibu_adpcm_device>;
|
||||
|
||||
seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, SEIBU_ADPCM, "Seibu ADPCM", tag, owner, clock, "seibu_adpcm", __FILE__),
|
||||
device_sound_interface(mconfig, *this)
|
||||
device_sound_interface(mconfig, *this),
|
||||
m_stream(NULL),
|
||||
m_current(0),
|
||||
m_end(0),
|
||||
m_nibble(0),
|
||||
m_playing(0),
|
||||
m_allocated(0),
|
||||
m_base(NULL)
|
||||
{
|
||||
m_token = global_alloc_clear(seibu_adpcm_state);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -606,6 +523,16 @@ seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char
|
||||
|
||||
void seibu_adpcm_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const seibu_adpcm_interface *intf = reinterpret_cast<const seibu_adpcm_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
*static_cast<seibu_adpcm_interface *>(this) = *intf;
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
m_rom_region = "";
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -614,15 +541,102 @@ void seibu_adpcm_device::device_config_complete()
|
||||
|
||||
void seibu_adpcm_device::device_start()
|
||||
{
|
||||
DEVICE_START_NAME( seibu_adpcm )(this);
|
||||
m_playing = 0;
|
||||
m_stream = machine().sound().stream_alloc(*this, 0, 1, clock(), this);
|
||||
m_base = machine().root_device().memregion(m_rom_region)->base();
|
||||
m_adpcm.reset();
|
||||
}
|
||||
|
||||
// "decrypt" is a bit flowery here, as it's probably just line-swapping to
|
||||
// simplify PCB layout/routing rather than intentional protection, but it
|
||||
// still fits, especially since the Z80s for all these games are truly encrypted.
|
||||
|
||||
void seibu_adpcm_device::decrypt(const char *region)
|
||||
{
|
||||
UINT8 *ROM = machine().root_device().memregion(region)->base();
|
||||
int len = machine().root_device().memregion(region)->bytes();
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
ROM[i] = BITSWAP8(ROM[i], 7, 5, 3, 1, 6, 4, 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( seibu_adpcm_device::adr_w )
|
||||
{
|
||||
if (m_stream)
|
||||
m_stream->update();
|
||||
if (offset)
|
||||
{
|
||||
m_end = data<<8;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_current = data<<8;
|
||||
m_nibble = 4;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( seibu_adpcm_device::ctl_w )
|
||||
{
|
||||
// sequence is 00 02 01 each time.
|
||||
if (m_stream)
|
||||
m_stream->update();
|
||||
switch (data)
|
||||
{
|
||||
case 0:
|
||||
m_playing = 0;
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 1:
|
||||
m_playing = 1;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// sound_stream_update - handle a stream update
|
||||
//-------------------------------------------------
|
||||
|
||||
void seibu_adpcm_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");
|
||||
stream_sample_t *dest = outputs[0];
|
||||
|
||||
while (m_playing && samples > 0)
|
||||
{
|
||||
int val = (m_base[m_current] >> m_nibble) & 15;
|
||||
|
||||
m_nibble ^= 4;
|
||||
if (m_nibble == 4)
|
||||
{
|
||||
m_current++;
|
||||
if (m_current >= m_end)
|
||||
m_playing = 0;
|
||||
}
|
||||
|
||||
*dest++ = m_adpcm.clock(val) << 4;
|
||||
samples--;
|
||||
}
|
||||
while (samples > 0)
|
||||
{
|
||||
*dest++ = 0;
|
||||
samples--;
|
||||
}
|
||||
}
|
||||
|
||||
// Handlers for early Seibu/Tad games with dual channel ADPCM
|
||||
|
||||
|
||||
const seibu_adpcm_interface seibu_adpcm1_intf =
|
||||
{
|
||||
"adpcm1"
|
||||
};
|
||||
|
||||
const seibu_adpcm_interface seibu_adpcm2_intf =
|
||||
{
|
||||
"adpcm2"
|
||||
};
|
||||
|
@ -37,40 +37,82 @@ ADDRESS_MAP_EXTERN(seibu_newzeroteam_sound_map, 8);
|
||||
ADDRESS_MAP_EXTERN(seibu3_sound_map, 8);
|
||||
ADDRESS_MAP_EXTERN(seibu3_adpcm_sound_map, 8);
|
||||
|
||||
DECLARE_READ16_HANDLER( seibu_main_word_r );
|
||||
DECLARE_READ8_HANDLER( seibu_main_v30_r );
|
||||
DECLARE_WRITE16_HANDLER( seibu_main_word_w );
|
||||
DECLARE_WRITE8_HANDLER( seibu_main_v30_w );
|
||||
class seibu_sound_device : public device_t
|
||||
{
|
||||
public:
|
||||
seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~seibu_sound_device() {}
|
||||
|
||||
DECLARE_WRITE16_HANDLER( seibu_main_mustb_w );
|
||||
DECLARE_READ16_MEMBER( main_word_r );
|
||||
DECLARE_READ8_MEMBER( main_v30_r );
|
||||
DECLARE_WRITE16_MEMBER( main_word_w );
|
||||
DECLARE_WRITE8_MEMBER( main_v30_w );
|
||||
|
||||
DECLARE_WRITE8_HANDLER( seibu_irq_clear_w );
|
||||
DECLARE_WRITE8_HANDLER( seibu_rst10_ack_w );
|
||||
DECLARE_WRITE8_HANDLER( seibu_rst18_ack_w );
|
||||
DECLARE_WRITE8_HANDLER( seibu_bank_w );
|
||||
DECLARE_WRITE8_HANDLER( seibu_coin_w );
|
||||
void seibu_ym3812_irqhandler(device_t *device, int linestate);
|
||||
WRITE_LINE_DEVICE_HANDLER(seibu_ym2151_irqhandler);
|
||||
void seibu_ym2203_irqhandler(device_t *device, int linestate);
|
||||
DECLARE_READ8_HANDLER( seibu_soundlatch_r );
|
||||
DECLARE_READ8_HANDLER( seibu_main_data_pending_r );
|
||||
DECLARE_WRITE8_HANDLER( seibu_main_data_w );
|
||||
MACHINE_RESET( seibu_sound );
|
||||
void seibu_sound_decrypt(running_machine &machine,const char *cpu,int length);
|
||||
DECLARE_WRITE16_MEMBER( main_mustb_w );
|
||||
|
||||
void seibu_adpcm_decrypt(running_machine &machine, const char *region);
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( seibu_adpcm_adr_w );
|
||||
DECLARE_WRITE8_DEVICE_HANDLER( seibu_adpcm_ctl_w );
|
||||
DECLARE_WRITE8_MEMBER( irq_clear_w );
|
||||
DECLARE_WRITE8_MEMBER( rst10_ack_w );
|
||||
DECLARE_WRITE8_MEMBER( rst18_ack_w );
|
||||
DECLARE_WRITE8_MEMBER( bank_w );
|
||||
DECLARE_WRITE8_MEMBER( coin_w );
|
||||
void ym3812_irqhandler(int linestate);
|
||||
WRITE_LINE_MEMBER(ym2151_irqhandler);
|
||||
void ym2203_irqhandler(int linestate);
|
||||
DECLARE_READ8_MEMBER( soundlatch_r );
|
||||
DECLARE_READ8_MEMBER( main_data_pending_r );
|
||||
DECLARE_WRITE8_MEMBER( main_data_w );
|
||||
DECLARE_WRITE8_MEMBER( pending_w );
|
||||
void decrypt(const char *cpu,int length);
|
||||
void update_irq_lines(int param);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
// internal state
|
||||
device_t *m_sound_cpu;
|
||||
UINT8 m_main2sub[2];
|
||||
UINT8 m_sub2main[2];
|
||||
int m_main2sub_pending;
|
||||
int m_sub2main_pending;
|
||||
|
||||
enum
|
||||
{
|
||||
VECTOR_INIT,
|
||||
RST10_ASSERT,
|
||||
RST10_CLEAR,
|
||||
RST18_ASSERT,
|
||||
RST18_CLEAR
|
||||
};
|
||||
};
|
||||
|
||||
extern const device_type SEIBU_SOUND;
|
||||
|
||||
extern const ay8910_interface seibu_ay8910_config;
|
||||
|
||||
|
||||
// Seibu ADPCM device
|
||||
|
||||
struct seibu_adpcm_interface
|
||||
{
|
||||
const char *m_rom_region;
|
||||
};
|
||||
|
||||
class seibu_adpcm_device : public device_t,
|
||||
public device_sound_interface
|
||||
public device_sound_interface,
|
||||
public seibu_adpcm_interface
|
||||
{
|
||||
public:
|
||||
seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
~seibu_adpcm_device() { global_free(m_token); }
|
||||
~seibu_adpcm_device() {}
|
||||
|
||||
// access to legacy token
|
||||
void *token() const { assert(m_token != NULL); return m_token; }
|
||||
void decrypt(const char *region);
|
||||
DECLARE_WRITE8_MEMBER( adr_w );
|
||||
DECLARE_WRITE8_MEMBER( ctl_w );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
@ -78,26 +120,30 @@ protected:
|
||||
|
||||
// sound stream update overrides
|
||||
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
|
||||
private:
|
||||
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
oki_adpcm_state m_adpcm;
|
||||
sound_stream *m_stream;
|
||||
UINT32 m_current;
|
||||
UINT32 m_end;
|
||||
UINT8 m_nibble;
|
||||
UINT8 m_playing;
|
||||
UINT8 m_allocated;
|
||||
UINT8 *m_base;
|
||||
};
|
||||
|
||||
extern const device_type SEIBU_ADPCM;
|
||||
|
||||
|
||||
extern const ay8910_interface seibu_ay8910_config;
|
||||
|
||||
struct seibu_adpcm_interface
|
||||
{
|
||||
const char *rom_region;
|
||||
};
|
||||
|
||||
extern const seibu_adpcm_interface seibu_adpcm1_intf;
|
||||
extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
#define MCFG_SEIBU_SOUND_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, SEIBU_SOUND, 0)
|
||||
|
||||
#define SEIBU_COIN_INPUTS \
|
||||
PORT_START("COIN") \
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(4) \
|
||||
@ -113,31 +159,44 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
|
||||
#define SEIBU_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu_sound_map)
|
||||
MCFG_CPU_PROGRAM_MAP(seibu_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU2_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu2_sound_map)
|
||||
MCFG_CPU_PROGRAM_MAP(seibu2_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU2_AIRRAID_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu2_airraid_sound_map)
|
||||
MCFG_CPU_PROGRAM_MAP(seibu2_airraid_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU2_RAIDEN2_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu2_raiden2_sound_map)
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu2_raiden2_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU_NEWZEROTEAM_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu_newzeroteam_sound_map)
|
||||
MCFG_CPU_PROGRAM_MAP(seibu_newzeroteam_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU3_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu3_sound_map)
|
||||
MCFG_CPU_PROGRAM_MAP(seibu3_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU3A_SOUND_SYSTEM_CPU(freq) \
|
||||
MCFG_CPU_ADD("audiocpu", Z80, freq) \
|
||||
MCFG_CPU_PROGRAM_MAP(seibu3_adpcm_sound_map)
|
||||
MCFG_CPU_PROGRAM_MAP(seibu3_adpcm_sound_map) \
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
#define SEIBU_SOUND_SYSTEM_YM3812_INTERFACE(freq1,freq2) \
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_SOUND_ADD("ymsnd", YM3812, freq1) \
|
||||
MCFG_YM3812_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym3812_irqhandler>)) \
|
||||
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym3812_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \
|
||||
\
|
||||
MCFG_OKIM6295_ADD("oki", freq2, OKIM6295_PIN7_LOW) \
|
||||
@ -146,7 +205,7 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_SOUND_ADD("ymsnd", YM3812, freq1) \
|
||||
MCFG_YM3812_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym3812_irqhandler>)) \
|
||||
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym3812_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) \
|
||||
\
|
||||
MCFG_OKIM6295_ADD("oki", freq2, OKIM6295_PIN7_HIGH) \
|
||||
@ -155,7 +214,7 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2151_irqhandler>)) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.50) \
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.50) \
|
||||
\
|
||||
@ -165,7 +224,7 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2151_irqhandler>)) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.50) \
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.50)
|
||||
|
||||
@ -173,7 +232,7 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_YM2151_ADD("ymsnd", freq1) \
|
||||
MCFG_YM2151_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2151_irqhandler>)) \
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler)) \
|
||||
MCFG_SOUND_ROUTE(0, "mono", 0.50) \
|
||||
MCFG_SOUND_ROUTE(1, "mono", 0.50) \
|
||||
\
|
||||
@ -187,7 +246,7 @@ extern const seibu_adpcm_interface seibu_adpcm2_intf;
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") \
|
||||
\
|
||||
MCFG_SOUND_ADD("ym1", YM2203, freq) \
|
||||
MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2203_irqhandler>)) \
|
||||
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2203_irqhandler)) \
|
||||
MCFG_YM2203_AY8910_INTF(&seibu_ay8910_config) \
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) \
|
||||
\
|
||||
|
@ -124,7 +124,6 @@ DIP locations verified for Blood Bros. & Sky Smasher via manual & DIP-SW setting
|
||||
#include "sound/3812intf.h"
|
||||
#include "includes/bloodbro.h"
|
||||
#include "video/seibu_crtc.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
/* Memory Maps */
|
||||
@ -140,7 +139,7 @@ static ADDRESS_MAP_START( common_map, AS_PROGRAM, 16, bloodbro_state )
|
||||
AM_RANGE(0x08e000, 0x08e7ff) AM_RAM
|
||||
AM_RANGE(0x08e800, 0x08f7ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_word_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0x08f800, 0x08ffff) AM_RAM
|
||||
AM_RANGE(0x0a0000, 0x0a000d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0a0000, 0x0a000d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
// AM_RANGE(0x0c0000, 0x0c007f) AM_RAM AM_SHARE("scroll")
|
||||
AM_RANGE(0x0c0080, 0x0c0081) AM_WRITENOP // ??? IRQ Ack VBL?
|
||||
AM_RANGE(0x0c00c0, 0x0c00c1) AM_WRITENOP // ??? watchdog?
|
||||
@ -467,8 +466,6 @@ static MACHINE_CONFIG_START( bloodbro, bloodbro_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(XTAL_7_15909MHz/2) /* verified on pcb */
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
// video hardware
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -49,9 +49,7 @@ Dip locations verified with Fabtek manual for the trackball version
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "includes/cabal.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
MACHINE_RESET_MEMBER(cabal_state,cabalbl)
|
||||
{
|
||||
@ -101,7 +99,7 @@ READ16_MEMBER(cabal_state::track_r)
|
||||
|
||||
WRITE16_MEMBER(cabal_state::cabal_sound_irq_trigger_word_w)
|
||||
{
|
||||
seibu_main_word_w(space,4,data,mem_mask);
|
||||
m_seibu_sound->main_word_w(space,4,data,mem_mask);
|
||||
|
||||
/* spin for a while to let the Z80 read the command, otherwise coins "stick" */
|
||||
space.device().execute().spin_until_time(attotime::from_usec(50));
|
||||
@ -130,7 +128,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, cabal_state )
|
||||
AM_RANGE(0xc0080, 0xc0081) AM_WRITE(cabal_flipscreen_w)
|
||||
AM_RANGE(0xe0000, 0xe07ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_word_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xe8008, 0xe8009) AM_WRITE(cabal_sound_irq_trigger_word_w) // fix coin insertion
|
||||
AM_RANGE(0xe8000, 0xe800d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0xe8000, 0xe800d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cabalbl_main_map, AS_PROGRAM, 16, cabal_state )
|
||||
@ -176,19 +174,19 @@ WRITE8_MEMBER(cabal_state::cabalbl_coin_w)
|
||||
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cabal_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM
|
||||
AM_RANGE(0x4001, 0x4001) AM_WRITE_LEGACY(seibu_irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_WRITE_LEGACY(seibu_rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_WRITE_LEGACY(seibu_rst18_ack_w)
|
||||
AM_RANGE(0x4005, 0x4006) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_adr_w)
|
||||
AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w)
|
||||
AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w)
|
||||
AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w)
|
||||
AM_RANGE(0x4005, 0x4006) AM_DEVWRITE("adpcm1", seibu_adpcm_device, adr_w)
|
||||
AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x4010, 0x4011) AM_READ_LEGACY(seibu_soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_READ_LEGACY(seibu_main_data_pending_r)
|
||||
AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r)
|
||||
AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r)
|
||||
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
|
||||
AM_RANGE(0x4018, 0x4019) AM_WRITE_LEGACY(seibu_main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_DEVWRITE_LEGACY("adpcm1", seibu_adpcm_ctl_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_WRITE_LEGACY(seibu_coin_w)
|
||||
AM_RANGE(0x6005, 0x6006) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_adr_w)
|
||||
AM_RANGE(0x601a, 0x601a) AM_DEVWRITE_LEGACY("adpcm2", seibu_adpcm_ctl_w)
|
||||
AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w)
|
||||
AM_RANGE(0x401a, 0x401a) AM_DEVWRITE("adpcm1", seibu_adpcm_device, ctl_w)
|
||||
AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w)
|
||||
AM_RANGE(0x6005, 0x6006) AM_DEVWRITE("adpcm2", seibu_adpcm_device, adr_w)
|
||||
AM_RANGE(0x601a, 0x601a) AM_DEVWRITE("adpcm2", seibu_adpcm_device, ctl_w)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -482,8 +480,6 @@ static MACHINE_CONFIG_START( cabal, cabal_state )
|
||||
MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(59.60) /* verified on pcb */
|
||||
@ -497,10 +493,12 @@ static MACHINE_CONFIG_START( cabal, cabal_state )
|
||||
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_YM2151_ADD("ymsnd", XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_YM2151_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2151_irqhandler>))
|
||||
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2151_irqhandler))
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80)
|
||||
|
||||
MCFG_SOUND_ADD("adpcm1", SEIBU_ADPCM, 8000) /* it should use the msm5205 */
|
||||
@ -525,12 +523,12 @@ static MACHINE_CONFIG_START( cabalbl, cabal_state )
|
||||
MCFG_CPU_PROGRAM_MAP(cabalbl_sound_map)
|
||||
|
||||
/* there are 2x z80s for the ADPCM */
|
||||
MCFG_CPU_ADD("adpcm1", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_ADD("adpcm_1", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(cabalbl_talk1_map)
|
||||
MCFG_CPU_IO_MAP(cabalbl_talk1_portmap)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(cabal_state, irq0_line_hold, 8000)
|
||||
|
||||
MCFG_CPU_ADD("adpcm2", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_ADD("adpcm_2", Z80, XTAL_3_579545MHz) /* verified on pcb */
|
||||
MCFG_CPU_PROGRAM_MAP(cabalbl_talk2_map)
|
||||
MCFG_CPU_IO_MAP(cabalbl_talk2_portmap)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(cabal_state, irq0_line_hold, 8000)
|
||||
@ -772,10 +770,10 @@ ROM_START( cabalbl )
|
||||
ROM_LOAD16_BYTE( "cabal_01.bin", 0x60000, 0x10000, CRC(55c44764) SHA1(7fad1f2084664b5b4d1384c8081371b0c79c4f5e) )
|
||||
ROM_LOAD16_BYTE( "cabal_08.bin", 0x60001, 0x10000, CRC(702735c9) SHA1(e4ac799dc85ff5b7c8e578611605989c78f9e8b3) )
|
||||
|
||||
ROM_REGION( 0x10000, "adpcm1", 0 )
|
||||
ROM_REGION( 0x10000, "adpcm_1", 0 )
|
||||
ROM_LOAD( "cabal_09.bin", 0x00000, 0x10000, CRC(4ffa7fe3) SHA1(381d8e765a7b94678fb3308965c748bbe9f8e247) ) /* Z80 code/adpcm data */
|
||||
|
||||
ROM_REGION( 0x10000, "adpcm2", 0 )
|
||||
ROM_REGION( 0x10000, "adpcm_2", 0 )
|
||||
ROM_LOAD( "cabal_10.bin", 0x00000, 0x10000, CRC(958789b6) SHA1(344c3ee8a1e272b56499e5c0415bb714aec0ddcf) ) /* Z80 code/adpcm data */
|
||||
ROM_END
|
||||
|
||||
@ -849,16 +847,16 @@ void cabal_state::seibu_sound_bootleg(const char *cpu,int length)
|
||||
|
||||
DRIVER_INIT_MEMBER(cabal_state,cabal)
|
||||
{
|
||||
seibu_sound_decrypt(machine(),"audiocpu",0x2000);
|
||||
seibu_adpcm_decrypt(machine(),"adpcm1");
|
||||
seibu_adpcm_decrypt(machine(),"adpcm2");
|
||||
m_seibu_sound->decrypt("audiocpu",0x2000);
|
||||
m_adpcm1->decrypt("adpcm1");
|
||||
m_adpcm2->decrypt("adpcm2");
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(cabal_state,cabalbl2)
|
||||
{
|
||||
seibu_sound_bootleg("audiocpu",0x2000);
|
||||
seibu_adpcm_decrypt(machine(),"adpcm1");
|
||||
seibu_adpcm_decrypt(machine(),"adpcm2");
|
||||
m_adpcm1->decrypt("adpcm1");
|
||||
m_adpcm2->decrypt("adpcm2");
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,12 +94,14 @@ public:
|
||||
cshooter_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_txram(*this, "txram"),
|
||||
m_mainram(*this, "mainram"),
|
||||
m_spriteram(*this, "spriteram")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<seibu_sound_device> m_seibu_sound;
|
||||
required_shared_ptr<UINT8> m_txram;
|
||||
optional_shared_ptr<UINT8> m_mainram;
|
||||
optional_shared_ptr<UINT8> m_spriteram;
|
||||
@ -121,7 +123,6 @@ public:
|
||||
virtual void video_start();
|
||||
virtual void palette_init();
|
||||
DECLARE_MACHINE_RESET(cshooter);
|
||||
DECLARE_MACHINE_RESET(airraid);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_cshooter(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
@ -250,11 +251,6 @@ MACHINE_RESET_MEMBER(cshooter_state,cshooter)
|
||||
m_counter = 0;
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(cshooter_state,airraid)
|
||||
{
|
||||
MACHINE_RESET_CALL_LEGACY(seibu_sound);
|
||||
}
|
||||
|
||||
READ8_MEMBER(cshooter_state::cshooter_coin_r)
|
||||
{
|
||||
/* Even reads must return 0xff - Odd reads must return the contents of input port 5.
|
||||
@ -279,12 +275,12 @@ WRITE8_MEMBER(cshooter_state::bank_w)
|
||||
|
||||
READ8_MEMBER(cshooter_state::seibu_sound_comms_r)
|
||||
{
|
||||
return seibu_main_word_r(space,offset,0x00ff);
|
||||
return m_seibu_sound->main_word_r(space,offset,0x00ff);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cshooter_state::seibu_sound_comms_w)
|
||||
{
|
||||
seibu_main_word_w(space,offset,data,0x00ff);
|
||||
m_seibu_sound->main_word_w(space,offset,data,0x00ff);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -469,7 +465,7 @@ static MACHINE_CONFIG_START( cshooter, cshooter_state )
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cshooter_state,cshooter)
|
||||
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -483,6 +479,8 @@ static MACHINE_CONFIG_START( cshooter, cshooter_state )
|
||||
|
||||
/* sound hardware */
|
||||
/* YM2151 and ym3931 seibu custom cpu running at XTAL_14_31818MHz/4 */
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound")
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
#endif
|
||||
|
||||
@ -497,8 +495,6 @@ static MACHINE_CONFIG_START( airraid, cshooter_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(cshooter_state,airraid)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -678,7 +674,7 @@ DRIVER_INIT_MEMBER(cshooter_state,cshootere)
|
||||
}
|
||||
|
||||
membank("bank1")->set_base(&memregion("user1")->base()[0]);
|
||||
seibu_sound_decrypt(machine(),"audiocpu",0x2000);
|
||||
m_seibu_sound->decrypt("audiocpu",0x2000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "audio/seibu.h"
|
||||
#include "includes/dcon.h"
|
||||
#include "video/seibu_crtc.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
@ -34,7 +34,7 @@ static ADDRESS_MAP_START( dcon_map, AS_PROGRAM, 16, dcon_state )
|
||||
AM_RANGE(0x8f800, 0x8ffff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x9d000, 0x9d7ff) AM_WRITE(dcon_gfxbank_w)
|
||||
|
||||
AM_RANGE(0xa0000, 0xa000d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0xa0000, 0xa000d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0xc0000, 0xc004f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0xc0080, 0xc0081) AM_WRITENOP
|
||||
AM_RANGE(0xc00c0, 0xc00c1) AM_WRITENOP
|
||||
@ -273,8 +273,6 @@ static MACHINE_CONFIG_START( dcon, dcon_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(4000000) /* Perhaps 14318180/4? */
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -301,8 +299,6 @@ static MACHINE_CONFIG_START( sdgndmps, dcon_state )
|
||||
|
||||
SEIBU2_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -38,11 +38,10 @@ Dip locations and factory settings verified with US manual
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "includes/deadang.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
/* Read/Write Handlers */
|
||||
|
||||
@ -62,7 +61,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, deadang_state )
|
||||
AM_RANGE(0x03800, 0x03fff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x04000, 0x04fff) AM_RAM AM_SHARE("share1")
|
||||
AM_RANGE(0x05000, 0x05fff) AM_WRITEONLY
|
||||
AM_RANGE(0x06000, 0x0600f) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x06000, 0x0600f) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x06010, 0x07fff) AM_WRITEONLY
|
||||
AM_RANGE(0x08000, 0x087ff) AM_WRITE(deadang_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x08800, 0x0bfff) AM_WRITEONLY
|
||||
@ -246,8 +245,6 @@ static MACHINE_CONFIG_START( deadang, deadang_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(60)) // the game stops working with higher interleave rates..
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -412,16 +409,16 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(deadang_state,deadang)
|
||||
{
|
||||
seibu_sound_decrypt(machine(), "audiocpu", 0x2000);
|
||||
seibu_adpcm_decrypt(machine(), "adpcm1");
|
||||
seibu_adpcm_decrypt(machine(), "adpcm2");
|
||||
m_seibu_sound->decrypt("audiocpu", 0x2000);
|
||||
m_adpcm1->decrypt("adpcm1");
|
||||
m_adpcm2->decrypt("adpcm2");
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(deadang_state,ghunter)
|
||||
{
|
||||
seibu_sound_decrypt(machine(), "audiocpu", 0x2000);
|
||||
seibu_adpcm_decrypt(machine(), "adpcm1");
|
||||
seibu_adpcm_decrypt(machine(), "adpcm2");
|
||||
m_seibu_sound->decrypt("audiocpu", 0x2000);
|
||||
m_adpcm1->decrypt("adpcm1");
|
||||
m_adpcm2->decrypt("adpcm2");
|
||||
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x80000, 0x80001, read16_delegate(FUNC(deadang_state::ghunter_trackball_low_r),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xb0000, 0xb0001, read16_delegate(FUNC(deadang_state::ghunter_trackball_high_r),this));
|
||||
|
@ -65,11 +65,10 @@ Also, implemented conditional port for Coin Mode (SW1:1)
|
||||
#include "emu.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/dynduke.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
/* Memory Maps */
|
||||
|
||||
@ -83,7 +82,7 @@ static ADDRESS_MAP_START( master_map, AS_PROGRAM, 16, dynduke_state )
|
||||
AM_RANGE(0x0b004, 0x0b005) AM_WRITENOP
|
||||
AM_RANGE(0x0b006, 0x0b007) AM_WRITE(dynduke_control_w)
|
||||
AM_RANGE(0x0c000, 0x0c7ff) AM_RAM_WRITE(dynduke_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0xa0000, 0xfffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -103,7 +102,7 @@ static ADDRESS_MAP_START( masterj_map, AS_PROGRAM, 16, dynduke_state )
|
||||
AM_RANGE(0x00000, 0x06fff) AM_RAM
|
||||
AM_RANGE(0x07000, 0x07fff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x08000, 0x087ff) AM_RAM_WRITE(dynduke_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x09000, 0x0900d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x09000, 0x0900d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x0c000, 0x0c0ff) AM_RAM AM_SHARE("scroll_ram")
|
||||
AM_RANGE(0x0e000, 0x0efff) AM_RAM AM_SHARE("share1")
|
||||
AM_RANGE(0x0f000, 0x0f001) AM_READ_PORT("P1_P2")
|
||||
@ -285,8 +284,6 @@ static MACHINE_CONFIG_START( dynduke, dynduke_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(3600))
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
// video hardware
|
||||
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
|
||||
|
||||
@ -607,7 +604,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(dynduke_state,dynduke)
|
||||
{
|
||||
seibu_sound_decrypt(machine(),"audiocpu",0x20000);
|
||||
m_seibu_sound->decrypt("audiocpu",0x20000);
|
||||
}
|
||||
|
||||
/* Game Drivers */
|
||||
|
@ -55,7 +55,6 @@ Notes:
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "video/seibu_crtc.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
class goodejan_state : public driver_device
|
||||
@ -417,7 +416,7 @@ static ADDRESS_MAP_START( common_io_map, AS_IO, 16, goodejan_state )
|
||||
AM_RANGE(0xc000, 0xc001) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xc002, 0xc003) AM_READ(mahjong_panel_r)
|
||||
AM_RANGE(0xc004, 0xc005) AM_READ_PORT("DSW2") // switches
|
||||
AM_RANGE(0xd000, 0xd00f) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0xd000, 0xd00f) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( totmejan_io_map, AS_IO, 16, goodejan_state )
|
||||
@ -656,8 +655,6 @@ static MACHINE_CONFIG_START( goodejan, goodejan_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(GOODEJAN_MHZ1/2)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -75,7 +75,6 @@ Preliminary COP MCU memory map
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/seicop.h"
|
||||
#include "includes/legionna.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@ -1066,8 +1065,6 @@ static MACHINE_CONFIG_START( legionna, legionna_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -1096,8 +1093,6 @@ static MACHINE_CONFIG_START( heatbrl, legionna_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -1125,8 +1120,6 @@ static MACHINE_CONFIG_START( godzilla, legionna_state )
|
||||
|
||||
SEIBU2_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
// MCFG_SCREEN_REFRESH_RATE(61)
|
||||
@ -1155,8 +1148,6 @@ static MACHINE_CONFIG_START( denjinmk, legionna_state )
|
||||
|
||||
SEIBU2_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_SIZE(42*8, 36*8)
|
||||
@ -1184,8 +1175,6 @@ static MACHINE_CONFIG_START( grainbow, legionna_state )
|
||||
|
||||
SEIBU2_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -1214,8 +1203,6 @@ static MACHINE_CONFIG_START( cupsoc, legionna_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
@ -1252,8 +1239,6 @@ static MACHINE_CONFIG_START( cupsocbl, legionna_state )
|
||||
MCFG_CPU_PROGRAM_MAP(cupsocbl_sound_mem)
|
||||
//MCFG_PERIODIC_INT("screen", nmi_line_pulse)
|
||||
|
||||
//MCFG_MACHINE_INIT(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -29,7 +29,6 @@ YM2151:
|
||||
***************************************************************************/
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "audio/seibu.h" // for seibu_sound_decrypt on the MAIN cpu (not sound)
|
||||
#include "audio/t5182.h"
|
||||
#include "includes/mustache.h"
|
||||
|
||||
@ -195,6 +194,8 @@ static MACHINE_CONFIG_START( mustache, mustache_state )
|
||||
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SEIBU_SOUND_ADD("seibu_sound") // for seibu_sound_decrypt on the MAIN cpu (not sound)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
MCFG_YM2151_ADD("ymsnd", YM_CLOCK)
|
||||
@ -278,7 +279,7 @@ DRIVER_INIT_MEMBER(mustache_state,mustache)
|
||||
gfx2[i] = buf[BITSWAP24(i,23,22,21,20,19,18,17,16,15,12,11,10,9,8,7,6,5,4,13,14,3,2,1,0)];
|
||||
|
||||
auto_free(machine(), buf);
|
||||
seibu_sound_decrypt(machine(),"maincpu",0x8000);
|
||||
m_cpu_decrypt->decrypt("maincpu",0x8000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -195,11 +195,6 @@ MACHINE_RESET_MEMBER(nmk16_state,NMK004)
|
||||
NMK004_init(machine());
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(nmk16_state,mustang_sound)
|
||||
{
|
||||
MACHINE_RESET_CALL_LEGACY(seibu_sound);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(nmk16_state::ssmissin_sound_w)
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
@ -425,7 +420,7 @@ static ADDRESS_MAP_START( mustangb_map, AS_PROGRAM, 16, nmk16_state )
|
||||
AM_RANGE(0x08000e, 0x08000f) AM_NOP
|
||||
AM_RANGE(0x080014, 0x080015) AM_WRITE(nmk_flipscreen_w)
|
||||
AM_RANGE(0x080016, 0x080017) AM_WRITENOP // frame number?
|
||||
AM_RANGE(0x08001e, 0x08001f) AM_WRITE_LEGACY(seibu_main_mustb_w)
|
||||
AM_RANGE(0x08001e, 0x08001f) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_mustb_w)
|
||||
AM_RANGE(0x088000, 0x0887ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0x08c000, 0x08c001) AM_WRITE(mustang_scroll_w)
|
||||
AM_RANGE(0x08c002, 0x08c087) AM_WRITENOP // ??
|
||||
@ -913,7 +908,7 @@ static ADDRESS_MAP_START( tdragonb_map, AS_PROGRAM, 16, nmk16_state )
|
||||
AM_RANGE(0x0c000a, 0x0c000b) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x0c0014, 0x0c0015) AM_WRITE(nmk_flipscreen_w) /* Maybe */
|
||||
AM_RANGE(0x0c0018, 0x0c0019) AM_WRITE(nmk_tilebank_w) /* Tile Bank ? */
|
||||
AM_RANGE(0x0c001e, 0x0c001f) AM_WRITE_LEGACY(seibu_main_mustb_w)
|
||||
AM_RANGE(0x0c001e, 0x0c001f) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_mustb_w)
|
||||
AM_RANGE(0x0c4000, 0x0c4007) AM_RAM_WRITE(nmk_scroll_w)
|
||||
AM_RANGE(0x0c8000, 0x0c87ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBRGBx_word_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0x0cc000, 0x0cffff) AM_RAM_WRITE(nmk_bgvideoram0_w) AM_SHARE("nmk_bgvideoram0")
|
||||
@ -3593,8 +3588,6 @@ static MACHINE_CONFIG_START( tharrier, nmk16_state )
|
||||
MCFG_CPU_PROGRAM_MAP(tharrier_sound_map)
|
||||
MCFG_CPU_IO_MAP(tharrier_sound_io_map)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,mustang_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(56)
|
||||
@ -3723,8 +3716,6 @@ static MACHINE_CONFIG_START( mustangb, nmk16_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,mustang_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(56)
|
||||
@ -3919,8 +3910,6 @@ static MACHINE_CONFIG_START( tdragonb, nmk16_state ) /* bootleg using Raiden
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(nmk16_state,mustang_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(56)
|
||||
|
@ -16,11 +16,9 @@ Then it puts settings at 0x9e08 and 0x9e0a (bp 91acb)
|
||||
#include "emu.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/raiden2.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
class r2dx_v33_state : public driver_device
|
||||
@ -34,9 +32,19 @@ public:
|
||||
m_fg_vram(*this, "fg_vram"),
|
||||
m_tx_vram(*this, "tx_vram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_eeprom(*this, "eeprom") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_bg_vram;
|
||||
required_shared_ptr<UINT16> m_md_vram;
|
||||
required_shared_ptr<UINT16> m_fg_vram;
|
||||
required_shared_ptr<UINT16> m_tx_vram;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<seibu_sound_device> m_seibu_sound;
|
||||
optional_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
|
||||
DECLARE_WRITE16_MEMBER(rdx_bg_vram_w);
|
||||
DECLARE_WRITE16_MEMBER(rdx_md_vram_w);
|
||||
DECLARE_WRITE16_MEMBER(rdx_fg_vram_w);
|
||||
@ -60,10 +68,6 @@ public:
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_tx_tile_info);
|
||||
|
||||
required_shared_ptr<UINT16> m_bg_vram;
|
||||
required_shared_ptr<UINT16> m_md_vram;
|
||||
required_shared_ptr<UINT16> m_fg_vram;
|
||||
required_shared_ptr<UINT16> m_tx_vram;
|
||||
tilemap_t *m_bg_tilemap;
|
||||
tilemap_t *m_md_tilemap;
|
||||
tilemap_t *m_fg_tilemap;
|
||||
@ -72,8 +76,6 @@ public:
|
||||
UINT32 screen_update_rdx_v33(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(rdx_v33_interrupt);
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<eeprom_serial_93cxx_device> m_eeprom;
|
||||
};
|
||||
|
||||
|
||||
@ -440,9 +442,9 @@ READ16_MEMBER(r2dx_v33_state::nzerotea_sound_comms_r)
|
||||
{
|
||||
switch(offset+0x780)
|
||||
{
|
||||
case (0x788/2): return seibu_main_word_r(space,2,0xffff);
|
||||
case (0x78c/2): return seibu_main_word_r(space,3,0xffff);
|
||||
case (0x794/2): return seibu_main_word_r(space,5,0xffff);
|
||||
case (0x788/2): return m_seibu_sound->main_word_r(space,2,0xffff);
|
||||
case (0x78c/2): return m_seibu_sound->main_word_r(space,3,0xffff);
|
||||
case (0x794/2): return m_seibu_sound->main_word_r(space,5,0xffff);
|
||||
}
|
||||
|
||||
return 0xffff;
|
||||
@ -453,11 +455,11 @@ WRITE16_MEMBER(r2dx_v33_state::nzerotea_sound_comms_w)
|
||||
{
|
||||
switch(offset+0x780)
|
||||
{
|
||||
case (0x780/2): { seibu_main_word_w(space,0,data,0x00ff); break; }
|
||||
case (0x784/2): { seibu_main_word_w(space,1,data,0x00ff); break; }
|
||||
//case (0x790/2): { seibu_main_word_w(space,4,data,0x00ff); break; }
|
||||
case (0x794/2): { seibu_main_word_w(space,4,data,0x00ff); break; }
|
||||
case (0x798/2): { seibu_main_word_w(space,6,data,0x00ff); break; }
|
||||
case (0x780/2): { m_seibu_sound->main_word_w(space,0,data,0x00ff); break; }
|
||||
case (0x784/2): { m_seibu_sound->main_word_w(space,1,data,0x00ff); break; }
|
||||
//case (0x790/2): { m_seibu_sound->main_word_w(space,4,data,0x00ff); break; }
|
||||
case (0x794/2): { m_seibu_sound->main_word_w(space,4,data,0x00ff); break; }
|
||||
case (0x798/2): { m_seibu_sound->main_word_w(space,6,data,0x00ff); break; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -724,9 +726,7 @@ static MACHINE_CONFIG_START( nzerotea, r2dx_v33_state )
|
||||
MCFG_CPU_PROGRAM_MAP(nzerotea_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", r2dx_v33_state, rdx_v33_interrupt)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
// SEIBU2_RAIDEN2_SOUND_SYSTEM_CPU(14318180/4)
|
||||
// SEIBU2_RAIDEN2_SOUND_SYSTEM_CPU(14318180/4)
|
||||
SEIBU_NEWZEROTEAM_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
/* video hardware */
|
||||
|
@ -50,12 +50,10 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/raiden.h"
|
||||
#include "video/seibu_crtc.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
@ -64,7 +62,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, raiden_state )
|
||||
AM_RANGE(0x00000, 0x06fff) AM_RAM
|
||||
AM_RANGE(0x07000, 0x07fff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x08000, 0x08fff) AM_RAM AM_SHARE("shared_ram")
|
||||
AM_RANGE(0x0a000, 0x0a00d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0a000, 0x0a00d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raiden_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x0e000, 0x0e001) AM_READ_PORT("P1_P2")
|
||||
AM_RANGE(0x0e002, 0x0e003) AM_READ_PORT("DSW")
|
||||
@ -99,7 +97,7 @@ static ADDRESS_MAP_START( raidenu_main_map, AS_PROGRAM, 16, raiden_state )
|
||||
AM_RANGE(0x0b004, 0x0b005) AM_WRITENOP // watchdog?
|
||||
AM_RANGE(0x0b006, 0x0b007) AM_WRITE8(raiden_control_w, 0x00ff)
|
||||
AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raiden_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0xa0000, 0xfffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -126,7 +124,7 @@ static ADDRESS_MAP_START( raidenb_main_map, AS_PROGRAM, 16, raiden_state )
|
||||
AM_RANGE(0x0b004, 0x0b005) AM_WRITENOP // watchdog?
|
||||
AM_RANGE(0x0b006, 0x0b007) AM_WRITE8(raidenb_control_w, 0x00ff)
|
||||
AM_RANGE(0x0c000, 0x0c7ff) AM_WRITE(raiden_text_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0d000, 0x0d00d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x0d040, 0x0d08f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
AM_RANGE(0xa0000, 0xfffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
@ -281,8 +279,6 @@ static MACHINE_CONFIG_START( raiden, raiden_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(12000))
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
|
||||
|
||||
@ -620,7 +616,7 @@ void raiden_state::common_decrypt()
|
||||
DRIVER_INIT_MEMBER(raiden_state,raiden)
|
||||
{
|
||||
common_decrypt();
|
||||
seibu_sound_decrypt(machine(),"audiocpu",0x20000);
|
||||
m_seibu_sound->decrypt("audiocpu",0x20000);
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(raiden_state,raidenk)
|
||||
@ -630,7 +626,7 @@ DRIVER_INIT_MEMBER(raiden_state,raidenk)
|
||||
|
||||
DRIVER_INIT_MEMBER(raiden_state,raidenu)
|
||||
{
|
||||
seibu_sound_decrypt(machine(),"audiocpu",0x20000);
|
||||
m_seibu_sound->decrypt("audiocpu",0x20000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,7 +147,6 @@ Current Problem(s) - in order of priority
|
||||
#include "emu.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "machine/eepromser.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "includes/raiden2.h"
|
||||
@ -1176,8 +1175,7 @@ MACHINE_RESET_MEMBER(raiden2_state,raiden2)
|
||||
{
|
||||
common_reset();
|
||||
sprcpt_init();
|
||||
MACHINE_RESET_CALL_LEGACY(seibu_sound);
|
||||
|
||||
|
||||
membank("mainbank")->set_entry(1);
|
||||
|
||||
prg_bank = 0;
|
||||
@ -1188,8 +1186,7 @@ MACHINE_RESET_MEMBER(raiden2_state,raidendx)
|
||||
{
|
||||
common_reset();
|
||||
sprcpt_init();
|
||||
MACHINE_RESET_CALL_LEGACY(seibu_sound);
|
||||
|
||||
|
||||
membank("mainbank")->set_entry(8);
|
||||
|
||||
prg_bank = 0x08;
|
||||
@ -1203,8 +1200,7 @@ MACHINE_RESET_MEMBER(raiden2_state,zeroteam)
|
||||
fg_bank = 2;
|
||||
mid_bank = 1;
|
||||
sprcpt_init();
|
||||
MACHINE_RESET_CALL_LEGACY(seibu_sound);
|
||||
|
||||
|
||||
membank("mainbank")->set_entry(1);
|
||||
|
||||
prg_bank = 0;
|
||||
@ -1217,8 +1213,7 @@ MACHINE_RESET_MEMBER(raiden2_state,xsedae)
|
||||
fg_bank = 2;
|
||||
mid_bank = 1;
|
||||
sprcpt_init();
|
||||
MACHINE_RESET_CALL_LEGACY(seibu_sound);
|
||||
|
||||
|
||||
//membank("mainbank")->set_entry(1);
|
||||
|
||||
//cop_init();
|
||||
@ -1226,12 +1221,12 @@ MACHINE_RESET_MEMBER(raiden2_state,xsedae)
|
||||
|
||||
READ16_MEMBER(raiden2_state::raiden2_sound_comms_r)
|
||||
{
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return m_seibu_sound->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(raiden2_state::raiden2_sound_comms_w)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,data,0x00ff);
|
||||
m_seibu_sound->main_word_w(space,(offset >> 1) & 7,data,0x00ff);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(raiden2_state::raiden2_bank_w)
|
||||
|
@ -57,7 +57,6 @@ RSSENGO2.72 chr.
|
||||
#include "sound/3812intf.h"
|
||||
#include "video/seibu_crtc.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
class sengokmj_state : public driver_device
|
||||
@ -381,7 +380,7 @@ static ADDRESS_MAP_START( sengokmj_map, AS_PROGRAM, 16, sengokmj_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sengokmj_io_map, AS_IO, 16, sengokmj_state )
|
||||
AM_RANGE(0x4000, 0x400f) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x4000, 0x400f) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
/*Areas from 8000-804f are for the custom Seibu CRTC.*/
|
||||
AM_RANGE(0x8000, 0x804f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write)
|
||||
|
||||
@ -571,7 +570,6 @@ static MACHINE_CONFIG_START( sengokmj, sengokmj_state )
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(14318180/4)
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
MCFG_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
|
@ -26,7 +26,6 @@ displayed.
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "video/hd63484.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
class shanghai_state : public driver_device
|
||||
@ -190,7 +189,7 @@ static ADDRESS_MAP_START( kothello_map, AS_PROGRAM, 16, shanghai_state )
|
||||
AM_RANGE(0x09014, 0x09015) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x09016, 0x0901f) AM_WRITENOP // 0x9016 is set to 0 at the boot
|
||||
AM_RANGE(0x0a000, 0x0a1ff) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_word_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0x0b010, 0x0b01f) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x0b010, 0x0b01f) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x80000, 0xfffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -514,8 +513,6 @@ static MACHINE_CONFIG_START( kothello, shanghai_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(12000))
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(30)
|
||||
@ -533,7 +530,7 @@ static MACHINE_CONFIG_START( kothello, shanghai_state )
|
||||
|
||||
/* same as standard seibu ym2203, but "ym1" also reads "DSW" */
|
||||
MCFG_SOUND_ADD("ym1", YM2203, 14318180/4)
|
||||
MCFG_YM2203_IRQ_HANDLER(WRITELINE(driver_device, member_wrapper_line<seibu_ym2203_irqhandler>))
|
||||
MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, ym2203_irqhandler))
|
||||
MCFG_YM2203_AY8910_INTF(&kothello_ay8910_config)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
|
||||
|
||||
|
@ -37,12 +37,10 @@ for now. Even at 12 this slowdown still happens a little.
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "includes/toki.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
WRITE16_MEMBER(toki_state::tokib_soundcommand16_w)
|
||||
{
|
||||
@ -96,7 +94,7 @@ static ADDRESS_MAP_START( toki_map, AS_PROGRAM, 16, toki_state )
|
||||
AM_RANGE(0x06e800, 0x06efff) AM_RAM_WRITE(toki_background1_videoram16_w) AM_SHARE("bg1_vram16")
|
||||
AM_RANGE(0x06f000, 0x06f7ff) AM_RAM_WRITE(toki_background2_videoram16_w) AM_SHARE("bg2_vram16")
|
||||
AM_RANGE(0x06f800, 0x06ffff) AM_RAM_WRITE(toki_foreground_videoram16_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x080000, 0x08000d) AM_READWRITE_LEGACY(seibu_main_word_r, seibu_main_word_w)
|
||||
AM_RANGE(0x080000, 0x08000d) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, main_word_r, main_word_w)
|
||||
AM_RANGE(0x0a0000, 0x0a005f) AM_WRITE(toki_control_w) AM_SHARE("scrollram16")
|
||||
AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("INPUTS")
|
||||
@ -420,8 +418,6 @@ static MACHINE_CONFIG_START( toki, toki_state ) /* KOYO 20.000MHz near the cpu *
|
||||
|
||||
SEIBU_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) /* verifed on pcb */
|
||||
|
||||
MCFG_MACHINE_RESET(seibu_sound)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
|
||||
|
||||
@ -797,7 +793,7 @@ DRIVER_INIT_MEMBER(toki_state,toki)
|
||||
|
||||
auto_free(machine(), buffer);
|
||||
|
||||
seibu_sound_decrypt(machine(),"audiocpu",0x2000);
|
||||
m_seibu_sound->decrypt("audiocpu",0x2000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/msm5205.h"
|
||||
|
||||
class cabal_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -9,12 +11,24 @@ public:
|
||||
m_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_adpcm1(*this, "adpcm1"),
|
||||
m_adpcm2(*this, "adpcm2"),
|
||||
m_msm1(*this, "msm1"),
|
||||
m_msm2(*this, "msm2") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_colorram;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<seibu_sound_device> m_seibu_sound;
|
||||
optional_device<seibu_adpcm_device> m_adpcm1;
|
||||
optional_device<seibu_adpcm_device> m_adpcm2;
|
||||
optional_device<msm5205_device> m_msm1;
|
||||
optional_device<msm5205_device> m_msm2;
|
||||
|
||||
tilemap_t *m_background_layer;
|
||||
tilemap_t *m_text_layer;
|
||||
int m_sound_command1;
|
||||
@ -42,8 +56,4 @@ public:
|
||||
UINT32 screen_update_cabal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void seibu_sound_bootleg(const char *cpu,int length);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<msm5205_device> m_msm1;
|
||||
optional_device<msm5205_device> m_msm2;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "audio/seibu.h"
|
||||
|
||||
class deadang_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -8,12 +10,22 @@ public:
|
||||
m_scroll_ram(*this, "scroll_ram"),
|
||||
m_video_data(*this, "video_data"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "sub") { }
|
||||
m_subcpu(*this, "sub"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_adpcm1(*this, "adpcm1"),
|
||||
m_adpcm2(*this, "adpcm2") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_scroll_ram;
|
||||
required_shared_ptr<UINT16> m_video_data;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<seibu_sound_device> m_seibu_sound;
|
||||
required_device<seibu_adpcm_device> m_adpcm1;
|
||||
required_device<seibu_adpcm_device> m_adpcm2;
|
||||
|
||||
tilemap_t *m_pf3_layer;
|
||||
tilemap_t *m_pf2_layer;
|
||||
tilemap_t *m_pf1_layer;
|
||||
@ -38,6 +50,4 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deadang_main_scanline);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(deadang_sub_scanline);
|
||||
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "audio/seibu.h"
|
||||
#include "video/bufsprite.h"
|
||||
|
||||
class dynduke_state : public driver_device
|
||||
@ -10,13 +11,17 @@ public:
|
||||
m_videoram(*this, "videoram"),
|
||||
m_back_data(*this, "back_data"),
|
||||
m_fore_data(*this, "fore_data"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_seibu_sound(*this, "seibu_sound") { }
|
||||
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_scroll_ram;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_back_data;
|
||||
required_shared_ptr<UINT16> m_fore_data;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<seibu_sound_device> m_seibu_sound;
|
||||
|
||||
tilemap_t *m_bg_layer;
|
||||
tilemap_t *m_fg_layer;
|
||||
@ -45,5 +50,4 @@ public:
|
||||
INTERRUPT_GEN_MEMBER(dynduke_interrupt);
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri);
|
||||
void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "audio/seibu.h" // for seibu_sound_decrypt on the MAIN cpu (not sound)
|
||||
|
||||
class mustache_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -5,12 +7,17 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cpu_decrypt(*this, "seibu_sound") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<seibu_sound_device> m_cpu_decrypt;
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
int m_control_byte;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
DECLARE_WRITE8_MEMBER(mustache_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(mustache_video_control_w);
|
||||
DECLARE_WRITE8_MEMBER(mustache_scroll_w);
|
||||
@ -21,5 +28,4 @@ public:
|
||||
UINT32 screen_update_mustache(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mustache_scanline);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
@ -136,7 +136,6 @@ public:
|
||||
TILE_GET_INFO_MEMBER(macross_get_tx_tile_info);
|
||||
TILE_GET_INFO_MEMBER(bjtwin_get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_tile_info_0_8bit);
|
||||
DECLARE_MACHINE_RESET(mustang_sound);
|
||||
DECLARE_VIDEO_START(macross);
|
||||
DECLARE_MACHINE_RESET(NMK004);
|
||||
DECLARE_VIDEO_START(bioship);
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
#include "audio/seibu.h"
|
||||
#include "video/bufsprite.h"
|
||||
|
||||
class raiden_state : public driver_device
|
||||
@ -12,6 +13,7 @@ public:
|
||||
raiden_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_shared_ram(*this, "shared_ram"),
|
||||
m_videoram(*this, "videoram"),
|
||||
@ -21,6 +23,7 @@ public:
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<seibu_sound_device> m_seibu_sound;
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
required_shared_ptr<UINT16> m_shared_ram;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "audio/seibu.h"
|
||||
|
||||
class raiden2_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -8,7 +10,12 @@ public:
|
||||
mid_data(*this, "mid_data"),
|
||||
text_data(*this, "text_data"),
|
||||
sprites(*this, "sprites") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_seibu_sound(*this, "seibu_sound") { }
|
||||
|
||||
required_shared_ptr<UINT16> back_data,fore_data,mid_data, text_data, sprites;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<seibu_sound_device> m_seibu_sound;
|
||||
|
||||
DECLARE_WRITE16_MEMBER( cop_itoa_low_w );
|
||||
DECLARE_WRITE16_MEMBER( cop_itoa_high_w );
|
||||
@ -79,7 +86,6 @@ public:
|
||||
void common_reset();
|
||||
|
||||
tilemap_t *background_layer,*midground_layer,*foreground_layer,*text_layer;
|
||||
required_shared_ptr<UINT16> back_data,fore_data,mid_data, text_data, sprites;
|
||||
int bg_bank, fg_bank, mid_bank;
|
||||
UINT16 raiden2_tilemap_enable;
|
||||
UINT8 prg_bank,prot_data;
|
||||
@ -158,7 +164,6 @@ public:
|
||||
const UINT8 fade_table(int v);
|
||||
void combine32(UINT32 *val, int offset, UINT16 data, UINT16 mem_mask);
|
||||
void sprcpt_init(void);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
/*----------- defined in machine/r2crypt.c -----------*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "video/bufsprite.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "video/bufsprite.h"
|
||||
|
||||
class toki_state : public driver_device
|
||||
{
|
||||
@ -13,6 +14,7 @@ public:
|
||||
m_scrollram16(*this, "scrollram16"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_seibu_sound(*this, "seibu_sound"),
|
||||
m_msm(*this, "msm") { }
|
||||
|
||||
required_device<buffered_spriteram16_device> m_spriteram;
|
||||
@ -20,6 +22,11 @@ public:
|
||||
required_shared_ptr<UINT16> m_background2_videoram16;
|
||||
required_shared_ptr<UINT16> m_videoram;
|
||||
required_shared_ptr<UINT16> m_scrollram16;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<seibu_sound_device> m_seibu_sound;
|
||||
optional_device<msm5205_device> m_msm;
|
||||
|
||||
int m_msm5205next;
|
||||
int m_toggle;
|
||||
@ -47,7 +54,4 @@ public:
|
||||
void toki_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
void tokib_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
DECLARE_WRITE_LINE_MEMBER(toki_adpcm_int);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<msm5205_device> m_msm;
|
||||
};
|
||||
|
@ -1592,7 +1592,6 @@ raw angle|angle compare|angle mod value| res |
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "audio/seibu.h"
|
||||
#include "includes/legionna.h"
|
||||
#include "includes/raiden2.h"
|
||||
#include "machine/seicop.h"
|
||||
@ -3079,7 +3078,7 @@ static WRITE16_HANDLER( generic_cop_w )
|
||||
READ16_HANDLER( heatbrl_mcu_r )
|
||||
{
|
||||
if(offset >= 0x3c0/2 && offset <= 0x3df/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x34f/2)
|
||||
{
|
||||
@ -3114,7 +3113,7 @@ WRITE16_HANDLER( heatbrl_mcu_w )
|
||||
|
||||
if(offset >= 0x3c0/2 && offset <= 0x3df/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3130,7 +3129,7 @@ WRITE16_HANDLER( heatbrl_mcu_w )
|
||||
READ16_HANDLER( cupsoc_mcu_r )
|
||||
{
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x34f/2)
|
||||
{
|
||||
@ -3163,7 +3162,7 @@ WRITE16_HANDLER( cupsoc_mcu_w )
|
||||
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3173,7 +3172,7 @@ WRITE16_HANDLER( cupsoc_mcu_w )
|
||||
READ16_HANDLER( cupsocs_mcu_r )
|
||||
{
|
||||
if(offset >= 0x340/2 && offset <= 0x35f/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x300/2 && offset <= 0x30f/2)
|
||||
{
|
||||
@ -3212,7 +3211,7 @@ WRITE16_HANDLER( cupsocs_mcu_w )
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x35f/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3226,7 +3225,7 @@ WRITE16_HANDLER( cupsocs_mcu_w )
|
||||
READ16_HANDLER( godzilla_mcu_r )
|
||||
{
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x34f/2)
|
||||
{
|
||||
@ -3260,7 +3259,7 @@ WRITE16_HANDLER( godzilla_mcu_w )
|
||||
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3274,7 +3273,7 @@ WRITE16_HANDLER( godzilla_mcu_w )
|
||||
READ16_HANDLER( denjinmk_mcu_r )
|
||||
{
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x34f/2)
|
||||
{
|
||||
@ -3313,7 +3312,7 @@ WRITE16_HANDLER( denjinmk_mcu_w )
|
||||
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3327,7 +3326,7 @@ WRITE16_HANDLER( denjinmk_mcu_w )
|
||||
READ16_HANDLER( grainbow_mcu_r )
|
||||
{
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x34f/2)
|
||||
{
|
||||
@ -3361,7 +3360,7 @@ WRITE16_HANDLER( grainbow_mcu_w )
|
||||
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3376,7 +3375,7 @@ WRITE16_HANDLER( grainbow_mcu_w )
|
||||
READ16_HANDLER( legionna_mcu_r )
|
||||
{
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
return seibu_main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
return space.machine().device<seibu_sound_device>("seibu_sound")->main_word_r(space,(offset >> 1) & 7,0xffff);
|
||||
|
||||
if(offset >= 0x340/2 && offset <= 0x34f/2)
|
||||
{
|
||||
@ -3407,7 +3406,7 @@ WRITE16_HANDLER( legionna_mcu_w )
|
||||
|
||||
if(offset >= 0x300/2 && offset <= 0x31f/2)
|
||||
{
|
||||
seibu_main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
space.machine().device<seibu_sound_device>("seibu_sound")->main_word_w(space,(offset >> 1) & 7,cop_mcu_ram[offset],0x00ff);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user