Clean up last crshrace commit (nw)

This commit is contained in:
Alex W. Jackson 2014-02-27 17:38:14 +00:00
parent 7c18697a80
commit 6cdd8e429e
2 changed files with 14 additions and 42 deletions

View File

@ -136,27 +136,9 @@ Dip locations verified with Service Mode.
#define CRSHRACE_3P_HACK 0
READ16_MEMBER(crshrace_state::extrarom1_r)
{
UINT8 *rom = m_user1_region->base();
offset *= 2;
return rom[offset] | (rom[offset + 1] << 8);
}
READ16_MEMBER(crshrace_state::extrarom2_r)
{
UINT8 *rom = m_user2_region->base();
offset *= 2;
return rom[offset] | (rom[offset + 1] << 8);
}
WRITE8_MEMBER(crshrace_state::crshrace_sh_bankswitch_w)
{
m_bank1->set_entry(data & 0x03);
m_z80bank->set_entry(data & 0x03);
}
WRITE16_MEMBER(crshrace_state::sound_command_w)
@ -183,9 +165,8 @@ WRITE8_MEMBER(crshrace_state::pending_command_clear_w)
static ADDRESS_MAP_START( crshrace_map, AS_PROGRAM, 16, crshrace_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x300000, 0x3fffff) AM_READ(extrarom1_r)
AM_RANGE(0x400000, 0x4fffff) AM_READ(extrarom2_r)
AM_RANGE(0x500000, 0x5fffff) AM_READ(extrarom2_r) /* mirror */
AM_RANGE(0x300000, 0x3fffff) AM_ROM AM_REGION("user1", 0)
AM_RANGE(0x400000, 0x4fffff) AM_ROM AM_REGION("user2", 0) AM_MIRROR(0x100000)
AM_RANGE(0xa00000, 0xa0ffff) AM_RAM AM_SHARE("spriteram2")
AM_RANGE(0xd00000, 0xd01fff) AM_RAM_WRITE(crshrace_videoram1_w) AM_SHARE("videoram1")
AM_RANGE(0xe00000, 0xe01fff) AM_RAM AM_SHARE("spriteram")
@ -433,7 +414,7 @@ static const k053936_interface crshrace_k053936_intf =
void crshrace_state::machine_start()
{
m_bank1->configure_entries(0, 4, m_audiocpu_region->base() + 0x10000, 0x8000);
m_z80bank->configure_entries(0, 4, memregion("audiocpu")->base() + 0x10000, 0x8000);
save_item(NAME(m_roz_bank));
save_item(NAME(m_gfxctrl));
@ -501,11 +482,11 @@ ROM_START( crshrace )
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_WORD_SWAP( "1", 0x000000, 0x80000, CRC(21e34fb7) SHA1(be47b4a9bce2d6ce0a127dffe032c61547b2a3c0) )
ROM_REGION( 0x100000, "user1", 0 ) /* extra ROM */
ROM_LOAD( "w21", 0x000000, 0x100000, CRC(a5df7325) SHA1(614095a086164af5b5e73245744411187d81deec) )
ROM_REGION16_BE( 0x100000, "user1", 0 ) /* extra ROM */
ROM_LOAD16_WORD_SWAP( "w21", 0x000000, 0x100000, CRC(a5df7325) SHA1(614095a086164af5b5e73245744411187d81deec) )
ROM_REGION( 0x100000, "user2", 0 ) /* extra ROM */
ROM_LOAD( "w22", 0x000000, 0x100000, CRC(fc9d666d) SHA1(45aafcce82b668f93e51b5e4d092b1d0077e5192) )
ROM_REGION16_BE( 0x100000, "user2", 0 ) /* extra ROM */
ROM_LOAD16_WORD_SWAP( "w22", 0x000000, 0x100000, CRC(fc9d666d) SHA1(45aafcce82b668f93e51b5e4d092b1d0077e5192) )
ROM_REGION( 0x30000, "audiocpu", 0 ) /* 64k for the audio CPU + banks */
ROM_LOAD( "2", 0x00000, 0x20000, CRC(e70a900f) SHA1(edfe5df2dab5a7dccebe1a6f978144bcd516ab03) )
@ -535,11 +516,11 @@ ROM_START( crshrace2 )
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_WORD_SWAP( "01-ic10.bin", 0x000000, 0x80000, CRC(b284aacd) SHA1(f0ef279cdec30eb32e8aa8cdd51e289b70f2d6f5) )
ROM_REGION( 0x100000, "user1", 0 ) /* extra ROM */
ROM_LOAD( "w21", 0x000000, 0x100000, CRC(a5df7325) SHA1(614095a086164af5b5e73245744411187d81deec) ) // IC14.BIN
ROM_REGION16_BE( 0x100000, "user1", 0 ) /* extra ROM */
ROM_LOAD16_WORD_SWAP( "w21", 0x000000, 0x100000, CRC(a5df7325) SHA1(614095a086164af5b5e73245744411187d81deec) ) // IC14.BIN
ROM_REGION( 0x100000, "user2", 0 ) /* extra ROM */
ROM_LOAD( "w22", 0x000000, 0x100000, CRC(fc9d666d) SHA1(45aafcce82b668f93e51b5e4d092b1d0077e5192) ) // IC13.BIN
ROM_REGION16_BE( 0x100000, "user2", 0 ) /* extra ROM */
ROM_LOAD16_WORD_SWAP( "w22", 0x000000, 0x100000, CRC(fc9d666d) SHA1(45aafcce82b668f93e51b5e4d092b1d0077e5192) ) // IC13.BIN
ROM_REGION( 0x30000, "audiocpu", 0 ) /* 64k for the audio CPU + banks */
ROM_LOAD( "2", 0x00000, 0x20000, CRC(e70a900f) SHA1(edfe5df2dab5a7dccebe1a6f978144bcd516ab03) ) // 02-IC58.BIN

View File

@ -10,10 +10,7 @@ public:
: driver_device(mconfig, type, tag),
m_videoram1(*this, "videoram1"),
m_videoram2(*this, "videoram2"),
m_bank1(*this, "bank1"),
m_user1_region(*this, "user1"),
m_user2_region(*this, "user2"),
m_audiocpu_region(*this, "audiocpu"),
m_z80bank(*this, "bank1"),
m_audiocpu(*this, "audiocpu"),
m_k053936(*this, "k053936"),
m_spriteram(*this, "spriteram"),
@ -26,11 +23,7 @@ public:
required_shared_ptr<UINT16> m_videoram1;
required_shared_ptr<UINT16> m_videoram2;
required_memory_bank m_bank1;
required_memory_region m_user1_region;
required_memory_region m_user2_region;
required_memory_region m_audiocpu_region;
required_memory_bank m_z80bank;
required_device<z80_device> m_audiocpu;
required_device<k053936_device> m_k053936;
@ -52,8 +45,6 @@ public:
int m_pending_command;
/* devices */
DECLARE_READ16_MEMBER(extrarom1_r);
DECLARE_READ16_MEMBER(extrarom2_r);
DECLARE_WRITE8_MEMBER(crshrace_sh_bankswitch_w);
DECLARE_WRITE16_MEMBER(sound_command_w);
DECLARE_WRITE8_MEMBER(pending_command_clear_w);