merge release branch

This commit is contained in:
Vas Crabb 2016-11-30 08:05:48 +11:00
commit 76a3336c91
38 changed files with 119 additions and 81 deletions

View File

@ -4,8 +4,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mamedev.mame"
android:versionCode="179"
android:versionName="0.179"
android:versionCode="180"
android:versionName="0.180"
android:installLocation="auto">
<!-- Android 5.0 -->

View File

@ -28,11 +28,17 @@ Use that method at machine config time to provide an address map for
the bus to connect to. It has priority over a rom region if one is
also present.
| **MCFG_DEVICE_ROM**\ (tag)
Used to select a rom region to use if a device address map is not
given. Defaults to DEVICE_SELF, e.g. the device tag.
| **ROM_REGION**\ (length, tag, flags)
If a rom region with a tag identical to the device tag is provided in
the rom description for the system, it will be automatically picked up
as the connected rom. An address map has priority over the region if
If a rom region with a tag as given with **MCFG_DEVICE_ROM** if
present, or identical to the device tag otherwise, is provided in the
rom description for the system, it will be automatically picked up as
the connected rom. An address map has priority over the region if
present in the machine config.
| void **set_rom**\ (const void \*base, UINT32 size);

View File

@ -1527,14 +1527,14 @@ endif
ifeq (posix,$(SHELLTYPE))
$(GENDIR)/version.cpp: $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo '#define BARE_BUILD_VERSION "0.179"' > $@
@echo '#define BARE_BUILD_VERSION "0.180"' > $@
@echo 'extern const char bare_build_version[];' >> $@
@echo 'extern const char build_version[];' >> $@
@echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@
@echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@
else
$(GENDIR)/version.cpp: $(GENDIR)/git_desc
@echo #define BARE_BUILD_VERSION "0.179" > $@
@echo #define BARE_BUILD_VERSION "0.180" > $@
@echo extern const char bare_build_version[]; >> $@
@echo extern const char build_version[]; >> $@
@echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@

View File

@ -79,6 +79,7 @@ seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char
m_ym_write_cb(*this),
m_sound_cpu(*this, finder_base::DUMMY_TAG),
m_sound_rom(*this, finder_base::DUMMY_TAG),
m_rom_bank(*this, finder_base::DUMMY_TAG),
m_main2sub_pending(0),
m_sub2main_pending(0),
m_rst10_irq(0xff),
@ -92,6 +93,11 @@ void seibu_sound_device::static_set_cpu_tag(device_t &device, const char *tag)
downcast<seibu_sound_device &>(device).m_sound_rom.set_tag(tag);
}
void seibu_sound_device::static_set_rombank_tag(device_t &device, const char *tag)
{
downcast<seibu_sound_device &>(device).m_rom_bank.set_tag(tag);
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@ -101,16 +107,16 @@ void seibu_sound_device::device_start()
m_ym_read_cb.resolve_safe(0);
m_ym_write_cb.resolve_safe();
if (m_sound_rom.found() && membank(":seibu_bank1") != nullptr)
if (m_sound_rom.found() && m_rom_bank.found())
{
if (m_sound_rom.length() > 0x10000)
{
membank(":seibu_bank1")->configure_entries(0, (m_sound_rom.length() - 0x10000) / 0x8000, &m_sound_rom[0x10000], 0x8000);
m_rom_bank->configure_entries(0, (m_sound_rom.length() - 0x10000) / 0x8000, &m_sound_rom[0x10000], 0x8000);
/* Denjin Makai definitely needs this at start-up, it never writes to the bankswitch */
membank(":seibu_bank1")->set_entry(0);
m_rom_bank->set_entry(0);
} else
membank(":seibu_bank1")->set_base(&m_sound_rom[0x8000]);
m_rom_bank->set_base(&m_sound_rom[0x8000]);
}
m_main2sub[0] = m_main2sub[1] = 0;
@ -205,7 +211,8 @@ WRITE8_MEMBER( seibu_sound_device::ym_w )
WRITE8_MEMBER( seibu_sound_device::bank_w )
{
membank(":seibu_bank1")->set_entry(data & 1);
if (m_rom_bank.found())
m_rom_bank->set_entry(data & 1);
}
WRITE8_MEMBER( seibu_sound_device::coin_w )

View File

@ -38,6 +38,7 @@ public:
// static configuration
static void static_set_cpu_tag(device_t &device, const char *tag);
static void static_set_rombank_tag(device_t &device, const char *tag);
template<class _Object> static devcb_base &set_ym_read_callback(device_t &device, _Object object) { return downcast<seibu_sound_device &>(device).m_ym_read_cb.set_callback(object); }
template<class _Object> static devcb_base &set_ym_write_callback(device_t &device, _Object object) { return downcast<seibu_sound_device &>(device).m_ym_write_cb.set_callback(object); }
@ -72,6 +73,7 @@ private:
// internal state
required_device<cpu_device> m_sound_cpu;
optional_region_ptr<uint8_t> m_sound_rom;
optional_memory_bank m_rom_bank;
uint8_t m_main2sub[2];
uint8_t m_sub2main[2];
int m_main2sub_pending;
@ -170,6 +172,9 @@ extern const device_type SEIBU_ADPCM;
#define MCFG_SEIBU_SOUND_CPU(_audiocputag) \
seibu_sound_device::static_set_cpu_tag(*device, "^" _audiocputag);
#define MCFG_SEIBU_SOUND_ROMBANK(_banktag) \
seibu_sound_device::static_set_rombank_tag(*device, "^" _banktag);
#define MCFG_SEIBU_SOUND_YM_READ_CB(_devcb) \
devcb = &seibu_sound_device::set_ym_read_callback(*device, DEVCB_##_devcb);

View File

@ -292,12 +292,12 @@ static ADDRESS_MAP_START( airraid_sound_map, AS_PROGRAM, 8, airraid_state )
AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN")
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(0x8000, 0xffff) AM_ROMBANK("seibu_bank1")
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( airraid_sound_decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, airraid_state )
AM_RANGE(0x0000, 0x1fff) AM_DEVREAD("sei80bu", sei80bu_device, opcode_r)
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("seibu_bank1")
AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("audiocpu", 0x8000)
ADDRESS_MAP_END
@ -411,7 +411,7 @@ static MACHINE_CONFIG_START( airraid, airraid_state )
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu") //_ENCRYPTED_LOW("audiocpu")
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))

View File

@ -519,6 +519,7 @@ static MACHINE_CONFIG_START( bloodbro, bloodbro_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -198,7 +198,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cabal_state )
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_ROMBANK("seibu_bank1")
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_decrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, cabal_state )
@ -237,7 +237,7 @@ static ADDRESS_MAP_START( cabalbl2_sound_map, AS_PROGRAM, 8, cabal_state )
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_ROMBANK("seibu_bank1")
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( cabalbl2_predecrypted_opcodes_map, AS_DECRYPTED_OPCODES, 8, cabal_state )

View File

@ -296,6 +296,7 @@ static MACHINE_CONFIG_START( dcon, dcon_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END
@ -340,6 +341,7 @@ static MACHINE_CONFIG_START( sdgndmps, dcon_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))
MACHINE_CONFIG_END

View File

@ -302,6 +302,7 @@ static MACHINE_CONFIG_START( deadang, deadang_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ym1", ym2203_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ym1", ym2203_device, write))

View File

@ -349,6 +349,7 @@ static MACHINE_CONFIG_START( dynduke, dynduke_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -667,6 +667,7 @@ static MACHINE_CONFIG_START( goodejan, goodejan_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -1196,6 +1196,7 @@ static MACHINE_CONFIG_START( legionna, legionna_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END
@ -1248,6 +1249,7 @@ static MACHINE_CONFIG_START( heatbrl, legionna_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END
@ -1301,6 +1303,7 @@ static MACHINE_CONFIG_START( godzilla, legionna_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))
MACHINE_CONFIG_END
@ -1353,6 +1356,7 @@ static MACHINE_CONFIG_START( denjinmk, legionna_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))
MACHINE_CONFIG_END
@ -1405,6 +1409,7 @@ static MACHINE_CONFIG_START( grainbow, legionna_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))
MACHINE_CONFIG_END
@ -1448,18 +1453,18 @@ static MACHINE_CONFIG_START( cupsoc, legionna_state )
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_YM2151_ADD("ymsnd", 14318180/4)
MCFG_YM2151_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler))
MCFG_SOUND_ROUTE(0, "mono", 0.50)
MCFG_SOUND_ROUTE(1, "mono", 0.50)
MCFG_SOUND_ADD("ymsnd", YM3812, 14318180/4)
MCFG_YM3812_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_OKIM6295_ADD("oki", 1320000, OKIM6295_PIN7_LOW)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cupsocs, cupsoc )

View File

@ -3979,6 +3979,7 @@ static MACHINE_CONFIG_START( mustangb, nmk16_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END
@ -4165,6 +4166,7 @@ static MACHINE_CONFIG_START( tdragonb, nmk16_state ) /* bootleg using Raiden
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -839,6 +839,7 @@ static MACHINE_CONFIG_START( nzerotea, r2dx_v33_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -338,6 +338,7 @@ static MACHINE_CONFIG_START( raiden, raiden_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -1456,6 +1456,7 @@ static MACHINE_CONFIG_START( raiden2, raiden2_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2151_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2151_device, write))
MACHINE_CONFIG_END
@ -1523,6 +1524,7 @@ static MACHINE_CONFIG_START( zeroteam, raiden2_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -605,6 +605,7 @@ static MACHINE_CONFIG_START( sengokmj, sengokmj_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END

View File

@ -486,6 +486,7 @@ static MACHINE_CONFIG_START( kothello, shanghai_state )
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym2203_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym2203_device, write))

View File

@ -523,6 +523,7 @@ static MACHINE_CONFIG_START( toki, toki_state ) /* KOYO 20.000MHz near the cpu *
MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0)
MCFG_SEIBU_SOUND_CPU("audiocpu")
MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ymsnd", ym3812_device, read))
MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ymsnd", ym3812_device, write))
MACHINE_CONFIG_END