summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emumem_hedr.ipp
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2021-07-08 21:40:35 -0400
committer GitHub <noreply@github.com>2021-07-09 11:40:35 +1000
commitee61e4074b41dec22bdb2225efcfcfbb9c1ea410 (patch)
tree0df1076b61aa64b823fddbf3d4dd1adb7d7672cf /src/emu/emumem_hedr.ipp
parenta9fefd83636dfdc104a83f7f0cfaec08f87a35e0 (diff)
emu/emumem*: Removed endianness template parameter from handler_entry_read, handler_entry_write and closely related classes. (#8255)
This appears to substantially reduce compilation time and binary size without too much impact on critical paths. The only critical-path parts really touched by this are probably handler_entry_read_units<Width, AddrShift, Endian>::read and handler_entry_write_units<Width, AddrShift, Endian>::write, which no longer need a branch on descriptor endianness for the downcast. The other instances of where the endianness now needs to be fetched from the address space are practically all in constructors, which probably don't get called too often except in drivers where the memory map is regularly rewritten (e.g. segas16b.cpp); even then the performance impact probably isn't huge.
Diffstat (limited to 'src/emu/emumem_hedr.ipp')
-rw-r--r--src/emu/emumem_hedr.ipp100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/emu/emumem_hedr.ipp b/src/emu/emumem_hedr.ipp
index 460735a2f63..1f8b296a5b6 100644
--- a/src/emu/emumem_hedr.ipp
+++ b/src/emu/emumem_hedr.ipp
@@ -12,12 +12,12 @@
#include "emumem_hep.h"
#include "emumem_hedr.h"
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> const handler_entry_read<Width, AddrShift, Endian> *const *handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::get_dispatch() const
+template<int HighBits, int Width, int AddrShift> const handler_entry_read<Width, AddrShift> *const *handler_entry_read_dispatch<HighBits, Width, AddrShift>::get_dispatch() const
{
return m_a_dispatch;
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::handler_entry_read_dispatch(address_space *space, const handler_entry::range &init, handler_entry_read<Width, AddrShift, Endian> *handler) : handler_entry_read<Width, AddrShift, Endian>(space, handler_entry::F_DISPATCH), m_view(nullptr)
+template<int HighBits, int Width, int AddrShift> handler_entry_read_dispatch<HighBits, Width, AddrShift>::handler_entry_read_dispatch(address_space *space, const handler_entry::range &init, handler_entry_read<Width, AddrShift> *handler) : handler_entry_read<Width, AddrShift>(space, handler_entry::F_DISPATCH), m_view(nullptr)
{
m_ranges_array.resize(1);
m_dispatch_array.resize(1);
@@ -27,7 +27,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
m_u_dispatch = m_dispatch_array[0].data();
if (!handler)
- handler = space->get_unmap_r<Width, AddrShift, Endian>();
+ handler = space->get_unmap_r<Width, AddrShift>();
handler->ref(COUNT);
for(unsigned int i=0; i != COUNT; i++) {
m_u_dispatch[i] = handler;
@@ -35,11 +35,11 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::handler_entry_read_dispatch(address_space *space, memory_view &view) : handler_entry_read<Width, AddrShift, Endian>(space, handler_entry::F_VIEW), m_view(&view), m_a_dispatch(nullptr), m_a_ranges(nullptr), m_u_dispatch(nullptr), m_u_ranges(nullptr)
+template<int HighBits, int Width, int AddrShift> handler_entry_read_dispatch<HighBits, Width, AddrShift>::handler_entry_read_dispatch(address_space *space, memory_view &view) : handler_entry_read<Width, AddrShift>(space, handler_entry::F_VIEW), m_view(&view), m_a_dispatch(nullptr), m_a_ranges(nullptr), m_u_dispatch(nullptr), m_u_ranges(nullptr)
{
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::handler_entry_read_dispatch(handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian> *src) : handler_entry_read<Width, AddrShift, Endian>(src->m_space, handler_entry::F_DISPATCH), m_view(nullptr)
+template<int HighBits, int Width, int AddrShift> handler_entry_read_dispatch<HighBits, Width, AddrShift>::handler_entry_read_dispatch(handler_entry_read_dispatch<HighBits, Width, AddrShift> *src) : handler_entry_read<Width, AddrShift>(src->m_space, handler_entry::F_DISPATCH), m_view(nullptr)
{
m_ranges_array.resize(1);
m_dispatch_array.resize(1);
@@ -55,7 +55,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::~handler_entry_read_dispatch()
+template<int HighBits, int Width, int AddrShift> handler_entry_read_dispatch<HighBits, Width, AddrShift>::~handler_entry_read_dispatch()
{
for(auto &d : m_dispatch_array)
for(auto p : d)
@@ -63,7 +63,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
p->unref();
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::enumerate_references(handler_entry::reflist &refs) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::enumerate_references(handler_entry::reflist &refs) const
{
for(auto &d : m_dispatch_array)
for(auto p : d)
@@ -71,7 +71,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
refs.add(p);
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::dump_map(std::vector<memory_entry> &map) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::dump_map(std::vector<memory_entry> &map) const
{
if(m_view) {
for(u32 i = 0; i != m_dispatch_array.size(); i++) {
@@ -109,22 +109,22 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
+template<int HighBits, int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_dispatch<HighBits, Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
- return dispatch_read<Level, Width, AddrShift, Endian>(HIGHMASK, offset, mem_mask, m_a_dispatch);
+ return dispatch_read<Level, Width, AddrShift>(HIGHMASK, offset, mem_mask, m_a_dispatch);
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void *handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::get_ptr(offs_t offset) const
+template<int HighBits, int Width, int AddrShift> void *handler_entry_read_dispatch<HighBits, Width, AddrShift>::get_ptr(offs_t offset) const
{
return m_a_dispatch[(offset & HIGHMASK) >> LowBits]->get_ptr(offset);
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::name() const
+template<int HighBits, int Width, int AddrShift> std::string handler_entry_read_dispatch<HighBits, Width, AddrShift>::name() const
{
return m_view ? "view" : "dispatch";
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift, Endian> *&handler) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift> *&handler) const
{
offs_t slot = (address >> LowBits) & BITMASK;
auto h = m_a_dispatch[slot];
@@ -137,11 +137,11 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::range_cut_before(offs_t address, int start)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::range_cut_before(offs_t address, int start)
{
while(--start >= 0 && m_u_dispatch[start]) {
if(int(LowBits) > -AddrShift && m_u_dispatch[start]->is_dispatch()) {
- static_cast<handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian> *>(m_u_dispatch[start])->range_cut_before(address);
+ static_cast<handler_entry_read_dispatch<LowBits, Width, AddrShift> *>(m_u_dispatch[start])->range_cut_before(address);
break;
}
if(m_u_ranges[start].end <= address)
@@ -150,11 +150,11 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::range_cut_after(offs_t address, int start)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::range_cut_after(offs_t address, int start)
{
while(++start < COUNT && m_u_dispatch[start]) {
if(int(LowBits) > -AddrShift && m_u_dispatch[start]->is_dispatch()) {
- static_cast<handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian> *>(m_u_dispatch[start])->range_cut_after(address);
+ static_cast<handler_entry_read_dispatch<LowBits, Width, AddrShift> *>(m_u_dispatch[start])->range_cut_after(address);
break;
}
if(m_u_ranges[start].start >= address)
@@ -163,20 +163,20 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift> *handler)
{
auto cur = m_u_dispatch[entry];
if(cur->is_dispatch())
cur->populate_nomirror(start, end, ostart, oend, handler);
else {
- auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift>(this->m_space, m_u_ranges[entry], cur);
cur->unref();
m_u_dispatch[entry] = subdispatch;
subdispatch->populate_nomirror(start, end, ostart, oend, handler);
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift> *handler)
{
offs_t start_entry = (start & HIGHMASK) >> LowBits;
offs_t end_entry = (end & HIGHMASK) >> LowBits;
@@ -229,13 +229,13 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift> *handler)
{
auto cur = m_u_dispatch[entry];
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>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift>(this->m_space, m_u_ranges[entry], cur);
cur->unref();
m_u_dispatch[entry] = subdispatch;
subdispatch->populate_mirror(start, end, ostart, oend, mirror, handler);
@@ -243,7 +243,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift> *handler)
{
offs_t hmirror = mirror & HIGHMASK;
offs_t lmirror = mirror & LOWMASK;
@@ -274,11 +274,11 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::mismatched_patch(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift, Endian> *&target)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::mismatched_patch(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift> *&target)
{
u8 ukey = descriptor.rkey_to_ukey(rkey);
- handler_entry_read<Width, AddrShift, Endian> *original = target->is_units() ? target : nullptr;
- handler_entry_read<Width, AddrShift, Endian> *replacement = nullptr;
+ handler_entry_read<Width, AddrShift> *original = target->is_units() ? target : nullptr;
+ handler_entry_read<Width, AddrShift> *replacement = nullptr;
for(const auto &p : mappings)
if(p.ukey == ukey && p.original == original) {
replacement = p.patched;
@@ -286,9 +286,9 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
if(!replacement) {
if(original)
- replacement = new handler_entry_read_units<Width, AddrShift, Endian>(descriptor, ukey, static_cast<handler_entry_read_units<Width, AddrShift, Endian> *>(original));
+ replacement = new handler_entry_read_units<Width, AddrShift>(descriptor, ukey, static_cast<handler_entry_read_units<Width, AddrShift> *>(original));
else
- replacement = new handler_entry_read_units<Width, AddrShift, Endian>(descriptor, ukey, this->m_space);
+ replacement = new handler_entry_read_units<Width, AddrShift>(descriptor, ukey, this->m_space);
mappings.emplace_back(mapping{ original, replacement, ukey });
} else
@@ -297,20 +297,20 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
target = replacement;
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_mismatched_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 rkey, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_mismatched_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, const memory_units_descriptor<Width, AddrShift> &descriptor, u8 rkey, std::vector<mapping> &mappings)
{
auto cur = m_u_dispatch[entry];
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>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift>(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);
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_mismatched_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 rkey, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_mismatched_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, const memory_units_descriptor<Width, AddrShift> &descriptor, u8 rkey, std::vector<mapping> &mappings)
{
offs_t start_entry = start >> LowBits;
offs_t end_entry = end >> LowBits;
@@ -367,20 +367,20 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_mismatched_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_mismatched_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, const memory_units_descriptor<Width, AddrShift> &descriptor, std::vector<mapping> &mappings)
{
auto cur = m_u_dispatch[entry];
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>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift>(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);
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_mismatched_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_mismatched_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, const memory_units_descriptor<Width, AddrShift> &descriptor, std::vector<mapping> &mappings)
{
offs_t hmirror = mirror & HIGHMASK;
offs_t lmirror = mirror & LOWMASK;
@@ -408,10 +408,10 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::passthrough_patch(handler_entry_read_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift, Endian> *&target)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::passthrough_patch(handler_entry_read_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift> *&target)
{
- handler_entry_read<Width, AddrShift, Endian> *original = target;
- handler_entry_read<Width, AddrShift, Endian> *replacement = nullptr;
+ handler_entry_read<Width, AddrShift> *original = target;
+ handler_entry_read<Width, AddrShift> *replacement = nullptr;
for(const auto &p : mappings)
if(p.original == original) {
replacement = p.patched;
@@ -426,20 +426,20 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
target = replacement;
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_passthrough_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_passthrough_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
auto cur = m_u_dispatch[entry];
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>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift>(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);
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
offs_t start_entry = (start & HIGHMASK) >> LowBits;
offs_t end_entry = (end & HIGHMASK) >> LowBits;
@@ -484,20 +484,20 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::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)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::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> *handler, std::vector<mapping> &mappings)
{
auto cur = m_u_dispatch[entry];
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>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_read_dispatch<LowBits, Width, AddrShift>(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);
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::populate_passthrough_mirror(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)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::populate_passthrough_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
offs_t hmirror = mirror & HIGHMASK;
offs_t lmirror = mirror & LOWMASK;
@@ -524,7 +524,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::detach(const std::unordered_set<handler_entry *> &handlers)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::detach(const std::unordered_set<handler_entry *> &handlers)
{
for(unsigned int i=0; i != COUNT; i++) {
if(m_u_dispatch[i]->is_dispatch()) {
@@ -535,7 +535,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
if(!m_u_dispatch[i]->is_passthrough())
continue;
- auto np = static_cast<handler_entry_read_passthrough<Width, AddrShift, Endian> *>(m_u_dispatch[i]);
+ auto np = static_cast<handler_entry_read_passthrough<Width, AddrShift> *>(m_u_dispatch[i]);
if(handlers.find(np) != handlers.end()) {
m_u_dispatch[i] = np->get_subhandler();
@@ -547,7 +547,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift> **dispatch, handler_entry::range *ranges)
{
if(!m_view)
fatalerror("init_handlers called on non-view handler_entry_read_dispatch.");
@@ -587,7 +587,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::select_a(int id)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::select_a(int id)
{
u32 i = id+1;
if(i >= m_dispatch_array.size())
@@ -597,7 +597,7 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
m_a_dispatch = m_dispatch_array[i].data();
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::select_u(int id)
+template<int HighBits, int Width, int AddrShift> void handler_entry_read_dispatch<HighBits, Width, AddrShift>::select_u(int id)
{
u32 i = id+1;
if(i > m_dispatch_array.size())
@@ -624,14 +624,14 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_read<Width, AddrShift, Endian> *handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>::dup()
+template<int HighBits, int Width, int AddrShift> handler_entry_read<Width, AddrShift> *handler_entry_read_dispatch<HighBits, Width, AddrShift>::dup()
{
if(m_view) {
handler_entry::ref();
return this;
}
- return new handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian>(this);
+ return new handler_entry_read_dispatch<HighBits, Width, AddrShift>(this);
}
#endif // MAME_EMU_EMUMEM_HEDR_IPP