diff options
author | 2019-04-24 09:11:04 +0900 | |
---|---|---|
committer | 2019-04-24 09:11:04 +0900 | |
commit | 78eb5011dbdc04aa77705e4228777950cbeb7f8c (patch) | |
tree | 394b4147fd79ab72374474b235f654fcd2138166 /src | |
parent | e4ad76e351741660280a4991bbd4b738516b1539 (diff) |
emu/tilemap.cpp : Simplify handlers
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/tilemap.cpp | 12 | ||||
-rw-r--r-- | src/emu/tilemap.h | 20 | ||||
-rw-r--r-- | src/mame/drivers/atarigt.cpp | 2 | ||||
-rw-r--r-- | src/mame/video/atarivad.cpp | 18 | ||||
-rw-r--r-- | src/mame/video/skullxbo.cpp | 2 |
5 files changed, 27 insertions, 27 deletions
diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp index 9425ee88c16..c5c0ff16ad3 100644 --- a/src/emu/tilemap.cpp +++ b/src/emu/tilemap.cpp @@ -1627,14 +1627,14 @@ tilemap_device::tilemap_device(const machine_config &mconfig, const char *tag, d // write: Main memory writes //------------------------------------------------- -WRITE8_MEMBER(tilemap_device::write8) +void tilemap_device::write8(offs_t offset, u8 data) { m_basemem.write8(offset, data); offset /= m_bytes_per_entry; mark_tile_dirty(offset); } -WRITE16_MEMBER(tilemap_device::write16) +void tilemap_device::write16(offs_t offset, u16 data, u16 mem_mask) { m_basemem.write16(offset, data, mem_mask); offset = offset * 2 / m_bytes_per_entry; @@ -1643,7 +1643,7 @@ WRITE16_MEMBER(tilemap_device::write16) mark_tile_dirty(offset + 1); } -WRITE32_MEMBER(tilemap_device::write32) +void tilemap_device::write32(offs_t offset, u32 data, u32 mem_mask) { m_basemem.write32(offset, data, mem_mask); offset = offset * 4 / m_bytes_per_entry; @@ -1664,14 +1664,14 @@ WRITE32_MEMBER(tilemap_device::write32) // write_entry_ext: Extension memory writes //------------------------------------------------- -WRITE8_MEMBER(tilemap_device::write8_ext) +void tilemap_device::write8_ext(offs_t offset, u8 data) { m_extmem.write8(offset, data); offset /= m_bytes_per_entry; mark_tile_dirty(offset); } -WRITE16_MEMBER(tilemap_device::write16_ext) +void tilemap_device::write16_ext(offs_t offset, u16 data, u16 mem_mask) { m_extmem.write16(offset, data, mem_mask); offset = offset * 2 / m_bytes_per_entry; @@ -1680,7 +1680,7 @@ WRITE16_MEMBER(tilemap_device::write16_ext) mark_tile_dirty(offset + 1); } -WRITE32_MEMBER(tilemap_device::write32_ext) +void tilemap_device::write32_ext(offs_t offset, u32 data, u32 mem_mask) { m_extmem.write32(offset, data, mem_mask); offset = offset * 4 / m_bytes_per_entry; diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index d0c929658ef..23b75362f0e 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -775,18 +775,18 @@ public: memory_array &extmem() { return m_extmem; } // write handlers - DECLARE_WRITE8_MEMBER(write8); - DECLARE_WRITE16_MEMBER(write16); - DECLARE_WRITE32_MEMBER(write32); - DECLARE_WRITE8_MEMBER(write8_ext); - DECLARE_WRITE16_MEMBER(write16_ext); - DECLARE_WRITE32_MEMBER(write32_ext); + void write8(offs_t offset, u8 data); + void write16(offs_t offset, u16 data, u16 mem_mask = ~0); + void write32(offs_t offset, u32 data, u32 mem_mask = ~0); + void write8_ext(offs_t offset, u8 data); + void write16_ext(offs_t offset, u16 data, u16 mem_mask = ~0); + void write32_ext(offs_t offset, u32 data, u32 mem_mask = ~0); // optional memory accessors - u32 basemem_read(int index) { return m_basemem.read(index); } - u32 extmem_read(int index) { return m_extmem.read(index); } - void basemem_write(int index, u32 data) { m_basemem.write(index, data); mark_tile_dirty(index); } - void extmem_write(int index, u32 data) { m_extmem.write(index, data); mark_tile_dirty(index); } + u32 basemem_read(offs_t offset) { return m_basemem.read(offset); } + u32 extmem_read(offs_t offset) { return m_extmem.read(offset); } + void basemem_write(offs_t offset, u32 data) { m_basemem.write(offset, data); mark_tile_dirty(offset); } + void extmem_write(offs_t offset, u32 data) { m_extmem.write(offset, data); mark_tile_dirty(offset); } // pick one to use to avoid ambiguity errors using device_t::machine; diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index d5850333303..89c2b6c33ce 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -1313,7 +1313,7 @@ WRITE32_MEMBER(atarigt_state::tmek_pf_w) if (pc == 0x25834 || pc == 0x25860) logerror("%06X:PFW@%06X = %08X & %08X (src=%06X)\n", m_maincpu->pc(), 0xd72000 + offset*4, data, mem_mask, (uint32_t)m_maincpu->state_int(M68K_A3) - 2); - m_playfield_tilemap->write32(space, offset, data, mem_mask); + m_playfield_tilemap->write32(offset, data, mem_mask); } void atarigt_state::init_tmek() diff --git a/src/mame/video/atarivad.cpp b/src/mame/video/atarivad.cpp index 0798a0d7b8a..36d676ff930 100644 --- a/src/mame/video/atarivad.cpp +++ b/src/mame/video/atarivad.cpp @@ -91,7 +91,7 @@ READ16_MEMBER(atari_vad_device::control_read) WRITE16_MEMBER(atari_vad_device::alpha_w) { - m_alpha_tilemap->write16(space, offset, data, mem_mask); + m_alpha_tilemap->write16(offset, data, mem_mask); } @@ -102,9 +102,9 @@ WRITE16_MEMBER(atari_vad_device::alpha_w) WRITE16_MEMBER(atari_vad_device::playfield_upper_w) { - m_playfield_tilemap->write16_ext(space, offset, data, mem_mask); + m_playfield_tilemap->write16_ext(offset, data, mem_mask); if (m_playfield2_tilemap != nullptr) - m_playfield2_tilemap->write16_ext(space, offset, data, mem_mask); + m_playfield2_tilemap->write16_ext(offset, data, mem_mask); } @@ -116,9 +116,9 @@ WRITE16_MEMBER(atari_vad_device::playfield_upper_w) WRITE16_MEMBER(atari_vad_device::playfield_latched_lsb_w) { - m_playfield_tilemap->write16(space, offset, data, mem_mask); + m_playfield_tilemap->write16(offset, data, mem_mask); if ((m_control[0x0a] & 0x80) != 0) - m_playfield_tilemap->write16_ext(space, offset, m_control[0x1d], uint16_t(0x00ff)); + m_playfield_tilemap->write16_ext(offset, m_control[0x1d], uint16_t(0x00ff)); } @@ -130,9 +130,9 @@ WRITE16_MEMBER(atari_vad_device::playfield_latched_lsb_w) WRITE16_MEMBER(atari_vad_device::playfield_latched_msb_w) { - m_playfield_tilemap->write16(space, offset, data, mem_mask); + m_playfield_tilemap->write16(offset, data, mem_mask); if ((m_control[0x0a] & 0x80) != 0) - m_playfield_tilemap->write16_ext(space, offset, m_control[0x1c], uint16_t(0xff00)); + m_playfield_tilemap->write16_ext(offset, m_control[0x1c], uint16_t(0xff00)); } @@ -144,9 +144,9 @@ WRITE16_MEMBER(atari_vad_device::playfield_latched_msb_w) WRITE16_MEMBER(atari_vad_device::playfield2_latched_msb_w) { - m_playfield2_tilemap->write16(space, offset, data, mem_mask); + m_playfield2_tilemap->write16(offset, data, mem_mask); if ((m_control[0x0a] & 0x80) != 0) - m_playfield2_tilemap->write16_ext(space, offset, m_control[0x1c], uint16_t(0xff00)); + m_playfield2_tilemap->write16_ext(offset, m_control[0x1c], uint16_t(0xff00)); } diff --git a/src/mame/video/skullxbo.cpp b/src/mame/video/skullxbo.cpp index dd0507fa1a1..f3497502bab 100644 --- a/src/mame/video/skullxbo.cpp +++ b/src/mame/video/skullxbo.cpp @@ -161,7 +161,7 @@ WRITE16_MEMBER( skullxbo_state::playfield_latch_w ) WRITE16_MEMBER(skullxbo_state::playfield_latched_w) { - m_playfield_tilemap->write16(space, offset, data, mem_mask); + m_playfield_tilemap->write16(offset, data, mem_mask); if (m_playfield_latch != -1) { uint16_t oldval = m_playfield_tilemap->extmem_read(offset); |