mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
emumem: more idiomatic way to access members inherited from argument-dependent base templates (may or may not work around GCC11 bug causing #7616)
This commit is contained in:
parent
c10cb1f5d1
commit
0abd03a7a7
@ -12,7 +12,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename READ> template<
|
||||
std::is_same<R, read64_delegate>::value,
|
||||
typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, Endian, READ>::read_impl(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return m_delegate(*inh::m_space, ((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), mem_mask);
|
||||
return m_delegate(*this->m_space, ((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift), mem_mask);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
|
||||
@ -22,7 +22,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename READ> template<
|
||||
std::is_same<R, read64m_delegate>::value,
|
||||
typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, Endian, READ>::read_impl(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return m_delegate(*inh::m_space, ((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift));
|
||||
return m_delegate(*this->m_space, ((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift));
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
|
||||
@ -32,7 +32,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename READ> template<
|
||||
std::is_same<R, read64s_delegate>::value,
|
||||
typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, Endian, READ>::read_impl(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return m_delegate(((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), mem_mask);
|
||||
return m_delegate(((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift), mem_mask);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
|
||||
@ -42,7 +42,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename READ> template<
|
||||
std::is_same<R, read64sm_delegate>::value,
|
||||
typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, Endian, READ>::read_impl(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return m_delegate(((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift));
|
||||
return m_delegate(((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift));
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
|
||||
@ -52,7 +52,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename READ> template<
|
||||
std::is_same<R, read64mo_delegate>::value,
|
||||
typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, Endian, READ>::read_impl(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return m_delegate(*inh::m_space);
|
||||
return m_delegate(*this->m_space);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
|
||||
@ -82,7 +82,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template
|
||||
std::is_same<W, write64_delegate>::value,
|
||||
void> handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
m_delegate(*inh::m_space, ((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), data, mem_mask);
|
||||
m_delegate(*this->m_space, ((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift), data, mem_mask);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
|
||||
@ -92,7 +92,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template
|
||||
std::is_same<W, write64m_delegate>::value,
|
||||
void> handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
m_delegate(*inh::m_space, ((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), data);
|
||||
m_delegate(*this->m_space, ((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift), data);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
|
||||
@ -102,7 +102,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template
|
||||
std::is_same<W, write64s_delegate>::value,
|
||||
void> handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
m_delegate(((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), data, mem_mask);
|
||||
m_delegate(((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift), data, mem_mask);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
|
||||
@ -112,7 +112,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template
|
||||
std::is_same<W, write64sm_delegate>::value,
|
||||
void> handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
m_delegate(((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift), data);
|
||||
m_delegate(((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift), data);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
|
||||
@ -122,7 +122,7 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template
|
||||
std::is_same<W, write64mo_delegate>::value,
|
||||
void> handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
m_delegate(*inh::m_space, data);
|
||||
m_delegate(*this->m_space, data);
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEDP_H
|
||||
#define MAME_EMU_EMUMEM_HEDP_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_read_delegate/handler_entry_write_delegate
|
||||
|
||||
@ -9,7 +13,6 @@ template<int Width, int AddrShift, endianness_t Endian, typename READ> class han
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read_address<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_delegate(address_space *space, const READ &delegate) : handler_entry_read_address<Width, AddrShift, Endian>(space, 0), m_delegate(delegate) {}
|
||||
~handler_entry_read_delegate() = default;
|
||||
@ -68,7 +71,6 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> class ha
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write_address<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_delegate(address_space *space, const WRITE &delegate) : handler_entry_write_address<Width, AddrShift, Endian>(space, 0), m_delegate(delegate) {}
|
||||
~handler_entry_write_delegate() = default;
|
||||
@ -132,7 +134,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_ioport(address_space *space, ioport_port *port) : handler_entry_read<Width, AddrShift, Endian>(space, 0), m_port(port) {}
|
||||
~handler_entry_read_ioport() = default;
|
||||
@ -149,7 +150,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_ioport(address_space *space, ioport_port *port) : handler_entry_write<Width, AddrShift, Endian>(space, 0), m_port(port) {}
|
||||
~handler_entry_write_ioport() = default;
|
||||
@ -161,3 +161,5 @@ public:
|
||||
private:
|
||||
ioport_port *m_port;
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEDP_H
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEDR_H
|
||||
#define MAME_EMU_EMUMEM_HEDR_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_read_dispatch
|
||||
|
||||
@ -10,8 +14,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> class hand
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read<Width, AddrShift, Endian>;
|
||||
using mapping = typename inh::mapping;
|
||||
using mapping = typename handler_entry_read<Width, AddrShift, Endian>::mapping;
|
||||
|
||||
handler_entry_read_dispatch(address_space *space, const handler_entry::range &init, handler_entry_read<Width, AddrShift, Endian> *handler);
|
||||
handler_entry_read_dispatch(address_space *space, memory_view &view);
|
||||
@ -96,3 +99,5 @@ private:
|
||||
void populate_passthrough_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings);
|
||||
void passthrough_patch(handler_entry_read_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift, Endian> *&target);
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEDR_H
|
||||
|
@ -1,7 +1,10 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEDR_IPP
|
||||
#define MAME_EMU_EMUMEM_HEDR_IPP
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "emu.h"
|
||||
#include "emumem_mud.h"
|
||||
#include "emumem_hea.h"
|
||||
#include "emumem_heu.h"
|
||||
@ -166,7 +169,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_nomirror(start, end, ostart, oend, handler);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_nomirror(start, end, ostart, oend, handler);
|
||||
@ -232,7 +235,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_mirror(start, end, ostart, oend, mirror, handler);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_mirror(start, end, ostart, oend, mirror, handler);
|
||||
@ -285,7 +288,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(original)
|
||||
replacement = new handler_entry_read_units<Width, AddrShift, Endian>(descriptor, ukey, static_cast<handler_entry_read_units<Width, AddrShift, Endian> *>(original));
|
||||
else
|
||||
replacement = new handler_entry_read_units<Width, AddrShift, Endian>(descriptor, ukey, inh::m_space);
|
||||
replacement = new handler_entry_read_units<Width, AddrShift, Endian>(descriptor, ukey, this->m_space);
|
||||
|
||||
mappings.emplace_back(mapping{ original, replacement, ukey });
|
||||
} else
|
||||
@ -300,7 +303,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_mismatched_nomirror(start, end, ostart, oend, descriptor, rkey, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_mismatched_nomirror(start, end, ostart, oend, descriptor, rkey, mappings);
|
||||
@ -372,7 +375,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_mismatched_mirror(start, end, ostart, oend, mirror, descriptor, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_mismatched_mirror(start, end, ostart, oend, mirror, descriptor, mappings);
|
||||
@ -431,7 +434,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_passthrough_nomirror(start, end, ostart, oend, handler, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_passthrough_nomirror(start, end, ostart, oend, handler, mappings);
|
||||
@ -487,7 +490,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_passthrough_mirror(start, end, ostart, oend, mirror, handler, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_passthrough_mirror(start, end, ostart, oend, mirror, handler, mappings);
|
||||
@ -629,3 +632,5 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
|
||||
|
||||
return new handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>(this);
|
||||
}
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEDR_IPP
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEDW_H
|
||||
#define MAME_EMU_EMUMEM_HEDW_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_write_dispatch
|
||||
|
||||
@ -10,8 +14,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> class hand
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write<Width, AddrShift, Endian>;
|
||||
using mapping = typename inh::mapping;
|
||||
using mapping = typename handler_entry_write<Width, AddrShift, Endian>::mapping;
|
||||
|
||||
handler_entry_write_dispatch(address_space *space, const handler_entry::range &init, handler_entry_write<Width, AddrShift, Endian> *handler);
|
||||
handler_entry_write_dispatch(address_space *space, memory_view &view);
|
||||
@ -96,3 +99,5 @@ private:
|
||||
void populate_passthrough_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings);
|
||||
void passthrough_patch(handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift, Endian> *&target);
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEDW_H
|
||||
|
@ -1,7 +1,10 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEDW_IPP
|
||||
#define MAME_EMU_EMUMEM_HEDW_IPP
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "emu.h"
|
||||
#include "emumem_mud.h"
|
||||
#include "emumem_hea.h"
|
||||
#include "emumem_heu.h"
|
||||
@ -168,7 +171,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_nomirror(start, end, ostart, oend, handler);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_nomirror(start, end, ostart, oend, handler);
|
||||
@ -235,7 +238,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_mirror(start, end, ostart, oend, mirror, handler);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_mirror(start, end, ostart, oend, mirror, handler);
|
||||
@ -287,7 +290,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(original)
|
||||
replacement = new handler_entry_write_units<Width, AddrShift, Endian>(descriptor, ukey, static_cast<handler_entry_write_units<Width, AddrShift, Endian> *>(original));
|
||||
else
|
||||
replacement = new handler_entry_write_units<Width, AddrShift, Endian>(descriptor, ukey, inh::m_space);
|
||||
replacement = new handler_entry_write_units<Width, AddrShift, Endian>(descriptor, ukey, this->m_space);
|
||||
|
||||
mappings.emplace_back(mapping{ original, replacement, ukey });
|
||||
} else
|
||||
@ -302,7 +305,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_mismatched_nomirror(start, end, ostart, oend, descriptor, rkey, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_mismatched_nomirror(start, end, ostart, oend, descriptor, rkey, mappings);
|
||||
@ -374,7 +377,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_mismatched_mirror(start, end, ostart, oend, mirror, descriptor, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_mismatched_mirror(start, end, ostart, oend, mirror, descriptor, mappings);
|
||||
@ -433,7 +436,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_passthrough_nomirror(start, end, ostart, oend, handler, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_passthrough_nomirror(start, end, ostart, oend, handler, mappings);
|
||||
@ -493,7 +496,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
|
||||
if(cur->is_dispatch())
|
||||
cur->populate_passthrough_mirror(start, end, ostart, oend, mirror, handler, mappings);
|
||||
else {
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(handler_entry::m_space, m_u_ranges[entry], cur);
|
||||
auto subdispatch = new handler_entry_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
|
||||
cur->unref();
|
||||
m_u_dispatch[entry] = subdispatch;
|
||||
subdispatch->populate_passthrough_mirror(start, end, ostart, oend, mirror, handler, mappings);
|
||||
@ -635,3 +638,5 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
|
||||
|
||||
return new handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>(this);
|
||||
}
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEDW_IPP
|
||||
|
@ -7,44 +7,44 @@
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_memory<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return m_base[((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift)];
|
||||
return m_base[((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift)];
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void *handler_entry_read_memory<Width, AddrShift, Endian>::get_ptr(offs_t offset) const
|
||||
{
|
||||
return m_base + (((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift));
|
||||
return m_base + (((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift));
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_memory<Width, AddrShift, Endian>::name() const
|
||||
{
|
||||
return util::string_format("memory@%x", inh::m_address_base);
|
||||
return util::string_format("memory@%x", this->m_address_base);
|
||||
}
|
||||
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_memory<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
offs_t off = ((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift);
|
||||
offs_t off = ((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift);
|
||||
m_base[off] = (m_base[off] & ~mem_mask) | (data & mem_mask);
|
||||
}
|
||||
|
||||
template<> void handler_entry_write_memory<0, 0, ENDIANNESS_LITTLE>::write(offs_t offset, u8 data, u8 mem_mask) const
|
||||
{
|
||||
m_base[(offset - inh::m_address_base) & inh::m_address_mask] = data;
|
||||
m_base[(offset - this->m_address_base) & this->m_address_mask] = data;
|
||||
}
|
||||
|
||||
template<> void handler_entry_write_memory<0, 0, ENDIANNESS_BIG>::write(offs_t offset, u8 data, u8 mem_mask) const
|
||||
{
|
||||
m_base[(offset - inh::m_address_base) & inh::m_address_mask] = data;
|
||||
m_base[(offset - this->m_address_base) & this->m_address_mask] = data;
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void *handler_entry_write_memory<Width, AddrShift, Endian>::get_ptr(offs_t offset) const
|
||||
{
|
||||
return m_base + (((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift));
|
||||
return m_base + (((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift));
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_memory<Width, AddrShift, Endian>::name() const
|
||||
{
|
||||
return util::string_format("memory@%x", inh::m_address_base);
|
||||
return util::string_format("memory@%x", this->m_address_base);
|
||||
}
|
||||
|
||||
|
||||
@ -53,12 +53,12 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_memory_bank<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return static_cast<uX *>(m_bank.base())[((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift)];
|
||||
return static_cast<uX *>(m_bank.base())[((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift)];
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void *handler_entry_read_memory_bank<Width, AddrShift, Endian>::get_ptr(offs_t offset) const
|
||||
{
|
||||
return static_cast<uX *>(m_bank.base()) + (((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift));
|
||||
return static_cast<uX *>(m_bank.base()) + (((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift));
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_memory_bank<Width, AddrShift, Endian>::name() const
|
||||
@ -69,23 +69,23 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_memory_bank<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
|
||||
{
|
||||
offs_t off = ((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift);
|
||||
offs_t off = ((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift);
|
||||
static_cast<uX *>(m_bank.base())[off] = (static_cast<uX *>(m_bank.base())[off] & ~mem_mask) | (data & mem_mask);
|
||||
}
|
||||
|
||||
template<> void handler_entry_write_memory_bank<0, 0, ENDIANNESS_LITTLE>::write(offs_t offset, u8 data, u8 mem_mask) const
|
||||
{
|
||||
static_cast<uX *>(m_bank.base())[(offset - inh::m_address_base) & inh::m_address_mask] = data;
|
||||
static_cast<uX *>(m_bank.base())[(offset - this->m_address_base) & this->m_address_mask] = data;
|
||||
}
|
||||
|
||||
template<> void handler_entry_write_memory_bank<0, 0, ENDIANNESS_BIG>::write(offs_t offset, u8 data, u8 mem_mask) const
|
||||
{
|
||||
static_cast<uX *>(m_bank.base())[(offset - inh::m_address_base) & inh::m_address_mask] = data;
|
||||
static_cast<uX *>(m_bank.base())[(offset - this->m_address_base) & this->m_address_mask] = data;
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void *handler_entry_write_memory_bank<Width, AddrShift, Endian>::get_ptr(offs_t offset) const
|
||||
{
|
||||
return static_cast<uX *>(m_bank.base()) + (((offset - inh::m_address_base) & inh::m_address_mask) >> (Width + AddrShift));
|
||||
return static_cast<uX *>(m_bank.base()) + (((offset - this->m_address_base) & this->m_address_mask) >> (Width + AddrShift));
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_memory_bank<Width, AddrShift, Endian>::name() const
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEM_H
|
||||
#define MAME_EMU_EMUMEM_HEM_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_read_memory/handler_entry_write_memory
|
||||
|
||||
@ -9,7 +13,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read_address<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_memory(address_space *space, void *base) : handler_entry_read_address<Width, AddrShift, Endian>(space, 0), m_base(reinterpret_cast<uX *>(base)) {}
|
||||
~handler_entry_read_memory() = default;
|
||||
@ -27,7 +30,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write_address<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_memory(address_space *space, void *base) : handler_entry_write_address<Width, AddrShift, Endian>(space, 0), m_base(reinterpret_cast<uX *>(base)) {}
|
||||
~handler_entry_write_memory() = default;
|
||||
@ -50,7 +52,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read_address<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_memory_bank(address_space *space, memory_bank &bank) : handler_entry_read_address<Width, AddrShift, Endian>(space, 0), m_bank(bank) {}
|
||||
~handler_entry_read_memory_bank() = default;
|
||||
@ -68,7 +69,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write_address<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_memory_bank(address_space *space, memory_bank &bank) : handler_entry_write_address<Width, AddrShift, Endian>(space, 0), m_bank(bank) {}
|
||||
~handler_entry_write_memory_bank() = default;
|
||||
@ -81,3 +81,5 @@ public:
|
||||
private:
|
||||
memory_bank &m_bank;
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEM_H
|
||||
|
@ -9,7 +9,7 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
|
||||
{
|
||||
this->ref();
|
||||
|
||||
uX data = inh::m_next->read(offset, mem_mask);
|
||||
uX data = this->m_next->read(offset, mem_mask);
|
||||
m_tap(offset, data, mem_mask);
|
||||
|
||||
this->unref();
|
||||
@ -18,12 +18,12 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_tap<Width, AddrShift, Endian>::name() const
|
||||
{
|
||||
return '(' + m_name + ") " + inh::m_next->name();
|
||||
return '(' + m_name + ") " + this->m_next->name();
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_tap<Width, AddrShift, Endian> *handler_entry_read_tap<Width, AddrShift, Endian>::instantiate(handler_entry_read<Width, AddrShift, Endian> *next) const
|
||||
{
|
||||
return new handler_entry_read_tap<Width, AddrShift, Endian>(inh::m_space, inh::m_mph, next, m_name, m_tap);
|
||||
return new handler_entry_read_tap<Width, AddrShift, Endian>(this->m_space, this->m_mph, next, m_name, m_tap);
|
||||
}
|
||||
|
||||
|
||||
@ -32,20 +32,20 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
|
||||
this->ref();
|
||||
|
||||
m_tap(offset, data, mem_mask);
|
||||
inh::m_next->write(offset, data, mem_mask);
|
||||
this->m_next->write(offset, data, mem_mask);
|
||||
|
||||
this->unref();
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_tap<Width, AddrShift, Endian>::name() const
|
||||
{
|
||||
return '(' + m_name + ") " + inh::m_next->name();
|
||||
return '(' + m_name + ") " + this->m_next->name();
|
||||
}
|
||||
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_tap<Width, AddrShift, Endian> *handler_entry_write_tap<Width, AddrShift, Endian>::instantiate(handler_entry_write<Width, AddrShift, Endian> *next) const
|
||||
{
|
||||
return new handler_entry_write_tap<Width, AddrShift, Endian>(inh::m_space, inh::m_mph, next, m_name, m_tap);
|
||||
return new handler_entry_write_tap<Width, AddrShift, Endian>(this->m_space, this->m_mph, next, m_name, m_tap);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HET_H
|
||||
#define MAME_EMU_EMUMEM_HET_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_read_tap/handler_entry_write_tap
|
||||
|
||||
@ -9,7 +13,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read_passthrough<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_tap(address_space *space, memory_passthrough_handler &mph, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap) : handler_entry_read_passthrough<Width, AddrShift, Endian>(space, mph), m_name(name), m_tap(std::move(tap)) {}
|
||||
~handler_entry_read_tap() = default;
|
||||
@ -31,7 +34,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write_passthrough<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_tap(address_space *space, memory_passthrough_handler &mph, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap) : handler_entry_write_passthrough<Width, AddrShift, Endian>(space, mph), m_name(name), m_tap(std::move(tap)) {}
|
||||
~handler_entry_write_tap() = default;
|
||||
@ -48,3 +50,5 @@ protected:
|
||||
|
||||
handler_entry_write_tap(address_space *space, memory_passthrough_handler &mph, handler_entry_write<Width, AddrShift, Endian> *next, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap) : handler_entry_write_passthrough<Width, AddrShift, Endian>(space, mph, next), m_name(name), m_tap(tap) {}
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HET_H
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units<Width, AddrShift, Endian>::handler_entry_read_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, address_space *space) :
|
||||
handler_entry_read<Width, AddrShift, Endian>(space, inh::F_UNITS),
|
||||
handler_entry_read<Width, AddrShift, Endian>(space, handler_entry_read_units::F_UNITS),
|
||||
m_subunits(0)
|
||||
{
|
||||
const auto &entries = descriptor.get_entries_for_key(ukey);
|
||||
@ -17,7 +17,7 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units<Width, AddrShift, Endian>::handler_entry_read_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, const handler_entry_read_units *src) :
|
||||
handler_entry_read<Width, AddrShift, Endian>(src->m_space, inh::F_UNITS),
|
||||
handler_entry_read<Width, AddrShift, Endian>(src->m_space, handler_entry_read_units::F_UNITS),
|
||||
m_subunits(0)
|
||||
{
|
||||
uX fullmask = 0;
|
||||
@ -37,7 +37,7 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units<Width, AddrShift, Endian>::handler_entry_read_units(const handler_entry_read_units *src) :
|
||||
handler_entry_read<Width, AddrShift, Endian>(src->m_space, inh::F_UNITS),
|
||||
handler_entry_read<Width, AddrShift, Endian>(src->m_space, handler_entry_read_units::F_UNITS),
|
||||
m_subunits(src->m_subunits)
|
||||
{
|
||||
for(u32 i=0; i != src->m_subunits; i++) {
|
||||
@ -69,7 +69,7 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read_
|
||||
handler->ref(entries.size());
|
||||
for(const auto &e : entries)
|
||||
m_subunit_infos[m_subunits++] = subunit_info{ handler, e.m_amask, e.m_dmask, e.m_ashift, e.m_offset, e.m_dshift, descriptor.get_subunit_width(), descriptor.get_subunit_endian() };
|
||||
m_unmap = inh::m_space->unmap();
|
||||
m_unmap = this->m_space->unmap();
|
||||
for(int i = 0; i < m_subunits; i++)
|
||||
m_unmap &= ~m_subunit_infos[i].m_dmask;
|
||||
}
|
||||
@ -142,7 +142,7 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
|
||||
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_units<Width, AddrShift, Endian>::handler_entry_write_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, address_space *space) :
|
||||
handler_entry_write<Width, AddrShift, Endian>(space, inh::F_UNITS),
|
||||
handler_entry_write<Width, AddrShift, Endian>(space, handler_entry_write_units::F_UNITS),
|
||||
m_subunits(0)
|
||||
{
|
||||
const auto &entries = descriptor.get_entries_for_key(ukey);
|
||||
@ -151,7 +151,7 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_unit
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_units<Width, AddrShift, Endian>::handler_entry_write_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, const handler_entry_write_units<Width, AddrShift, Endian> *src) :
|
||||
handler_entry_write<Width, AddrShift, Endian>(src->m_space, inh::F_UNITS),
|
||||
handler_entry_write<Width, AddrShift, Endian>(src->m_space, handler_entry_write_units::F_UNITS),
|
||||
m_subunits(0)
|
||||
{
|
||||
uX fullmask = 0;
|
||||
@ -171,7 +171,7 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_unit
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_units<Width, AddrShift, Endian>::handler_entry_write_units(const handler_entry_write_units *src) :
|
||||
handler_entry_write<Width, AddrShift, Endian>(src->m_space, inh::F_UNITS),
|
||||
handler_entry_write<Width, AddrShift, Endian>(src->m_space, handler_entry_write_units::F_UNITS),
|
||||
m_subunits(src->m_subunits)
|
||||
{
|
||||
for(u32 i=0; i != src->m_subunits; i++) {
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEU_H
|
||||
#define MAME_EMU_EMUMEM_HEU_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_read_units/handler_entry_write_units
|
||||
|
||||
@ -9,7 +13,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, address_space *space);
|
||||
handler_entry_read_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, const handler_entry_read_units *src);
|
||||
@ -52,7 +55,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, address_space *space);
|
||||
handler_entry_write_units(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 ukey, const handler_entry_write_units<Width, AddrShift, Endian> *src);
|
||||
@ -90,3 +92,4 @@ private:
|
||||
static std::string m2r(uX mask);
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEU_H
|
||||
|
@ -7,14 +7,14 @@
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_unmapped<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
if (inh::m_space->log_unmap() && !inh::m_space->m_manager.machine().side_effects_disabled())
|
||||
inh::m_space->device().logerror(inh::m_space->is_octal()
|
||||
if (this->m_space->log_unmap() && !this->m_space->m_manager.machine().side_effects_disabled())
|
||||
this->m_space->device().logerror(this->m_space->is_octal()
|
||||
? "%s: unmapped %s memory read from %0*o & %0*o\n"
|
||||
: "%s: unmapped %s memory read from %0*X & %0*X\n",
|
||||
inh::m_space->m_manager.machine().describe_context(), inh::m_space->name(),
|
||||
inh::m_space->addrchars(), offset,
|
||||
this->m_space->m_manager.machine().describe_context(), this->m_space->name(),
|
||||
this->m_space->addrchars(), offset,
|
||||
2 << Width, mem_mask);
|
||||
return inh::m_space->unmap();
|
||||
return this->m_space->unmap();
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_unmapped<Width, AddrShift, Endian>::name() const
|
||||
@ -25,12 +25,12 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_unmapped<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask)const
|
||||
{
|
||||
if (inh::m_space->log_unmap() && !inh::m_space->m_manager.machine().side_effects_disabled())
|
||||
inh::m_space->device().logerror(inh::m_space->is_octal()
|
||||
if (this->m_space->log_unmap() && !this->m_space->m_manager.machine().side_effects_disabled())
|
||||
this->m_space->device().logerror(this->m_space->is_octal()
|
||||
? "%s: unmapped %s memory write to %0*o = %0*o & %0*o\n"
|
||||
: "%s: unmapped %s memory write to %0*X = %0*X & %0*X\n",
|
||||
inh::m_space->m_manager.machine().describe_context(), inh::m_space->name(),
|
||||
inh::m_space->addrchars(), offset,
|
||||
this->m_space->m_manager.machine().describe_context(), this->m_space->name(),
|
||||
this->m_space->addrchars(), offset,
|
||||
2 << Width, data,
|
||||
2 << Width, mem_mask);
|
||||
}
|
||||
@ -45,7 +45,7 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_nop<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
|
||||
{
|
||||
return inh::m_space->unmap();
|
||||
return this->m_space->unmap();
|
||||
}
|
||||
|
||||
template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_nop<Width, AddrShift, Endian>::name() const
|
||||
|
@ -1,5 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Olivier Galibert
|
||||
#ifndef MAME_EMU_EMUMEM_HEUN_H
|
||||
#define MAME_EMU_EMUMEM_HEUN_H
|
||||
|
||||
#pragma once
|
||||
|
||||
// handler_entry_read_unmapped/handler_entry_write_unmapped
|
||||
|
||||
@ -9,7 +13,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_unmapped(address_space *space) : handler_entry_read<Width, AddrShift, Endian>(space, 0) {}
|
||||
~handler_entry_read_unmapped() = default;
|
||||
@ -23,7 +26,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_unmapped(address_space *space) : handler_entry_write<Width, AddrShift, Endian>(space, 0) {}
|
||||
~handler_entry_write_unmapped() = default;
|
||||
@ -43,7 +45,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_read<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_read_nop(address_space *space) : handler_entry_read<Width, AddrShift, Endian>(space, 0) {}
|
||||
~handler_entry_read_nop() = default;
|
||||
@ -57,7 +58,6 @@ template<int Width, int AddrShift, endianness_t Endian> class handler_entry_writ
|
||||
{
|
||||
public:
|
||||
using uX = typename emu::detail::handler_entry_size<Width>::uX;
|
||||
using inh = handler_entry_write<Width, AddrShift, Endian>;
|
||||
|
||||
handler_entry_write_nop(address_space *space) : handler_entry_write<Width, AddrShift, Endian>(space, 0) {}
|
||||
~handler_entry_write_nop() = default;
|
||||
@ -66,3 +66,5 @@ public:
|
||||
|
||||
std::string name() const override;
|
||||
};
|
||||
|
||||
#endif // MAME_EMU_EMUMEM_HEUN_H
|
||||
|
Loading…
Reference in New Issue
Block a user