ashnojoe: Latch cleanup

This commit is contained in:
Dirk Best 2017-01-03 01:10:04 +01:00
parent d25721b3f3
commit 476036ce41
2 changed files with 3 additions and 20 deletions

View File

@ -87,15 +87,6 @@ READ16_MEMBER(ashnojoe_state::fake_4a00a_r)
return 0;
}
WRITE16_MEMBER(ashnojoe_state::ashnojoe_soundlatch_w)
{
if (ACCESSING_BITS_0_7)
{
m_soundlatch_status = 1;
m_soundlatch->write(space, 0, data & 0xff);
}
}
static ADDRESS_MAP_START( ashnojoe_map, AS_PROGRAM, 16, ashnojoe_state )
AM_RANGE(0x000000, 0x01ffff) AM_ROM
AM_RANGE(0x040000, 0x041fff) AM_RAM_WRITE(ashnojoe_tileram3_w) AM_SHARE("tileram_3")
@ -110,7 +101,7 @@ static ADDRESS_MAP_START( ashnojoe_map, AS_PROGRAM, 16, ashnojoe_state )
AM_RANGE(0x04a002, 0x04a003) AM_READ_PORT("P2")
AM_RANGE(0x04a004, 0x04a005) AM_READ_PORT("DSW")
AM_RANGE(0x04a006, 0x04a007) AM_WRITEONLY AM_SHARE("tilemap_reg")
AM_RANGE(0x04a008, 0x04a009) AM_WRITE(ashnojoe_soundlatch_w)
AM_RANGE(0x04a008, 0x04a009) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff)
AM_RANGE(0x04a00a, 0x04a00b) AM_READ(fake_4a00a_r) // ??
AM_RANGE(0x04a010, 0x04a019) AM_WRITE(joe_tilemaps_xscroll_w)
AM_RANGE(0x04a020, 0x04a029) AM_WRITE(joe_tilemaps_yscroll_w)
@ -124,15 +115,9 @@ WRITE8_MEMBER(ashnojoe_state::adpcm_w)
m_adpcm_byte = data;
}
READ8_MEMBER(ashnojoe_state::sound_latch_r)
{
m_soundlatch_status = 0;
return m_soundlatch->read(space, 0);
}
READ8_MEMBER(ashnojoe_state::sound_latch_status_r)
{
return m_soundlatch_status;
return m_soundlatch->pending_r();
}
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ashnojoe_state )
@ -145,7 +130,7 @@ static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, ashnojoe_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
AM_RANGE(0x02, 0x02) AM_WRITE(adpcm_w)
AM_RANGE(0x04, 0x04) AM_READ(sound_latch_r)
AM_RANGE(0x04, 0x04) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
AM_RANGE(0x06, 0x06) AM_READ(sound_latch_status_r)
ADDRESS_MAP_END

View File

@ -62,9 +62,7 @@ public:
required_device<generic_latch_8_device> m_soundlatch;
DECLARE_READ16_MEMBER(fake_4a00a_r);
DECLARE_WRITE16_MEMBER(ashnojoe_soundlatch_w);
DECLARE_WRITE8_MEMBER(adpcm_w);
DECLARE_READ8_MEMBER(sound_latch_r);
DECLARE_READ8_MEMBER(sound_latch_status_r);
DECLARE_WRITE16_MEMBER(ashnojoe_tileram_w);
DECLARE_WRITE16_MEMBER(ashnojoe_tileram2_w);